Skip to content

This API creates a connection between each individual module and our system core and is therefore integrated into each of our server-side systems. It gives access to essential tools and is also used to get data from server-side resources.

License

Notifications You must be signed in to change notification settings

MineValley/CoreAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo - CoreAPI

The CoreAPI provides essential features and access to the internal server core of MineValleyEU, used in all modules.

Note

The documentation for this API is still a work in progress and does not yet cover the entire functionality. We are working on adding more Javadoc to make the API easier to use.

Maven Integration

To use the CoreAPI in your module, we provide a Maven repository hosted on GitHub.
Before proceeding, ensure you’ve added a token to your settings.xml file (details below).

<repository>
    <id>github</id>
    <url>https://maven.pkg.github.com/MineValley/CoreAPI</url>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>
<dependency>
    <groupId>minevalley.core</groupId>
    <artifactId>api</artifactId>
    <version>LATEST</version>
</dependency>

Linking Your GitHub Account

While the API is publicly accessible, a GitHub account is required to access the repository. If you already have an account, follow these steps to create a token:

Important

Opting for a token with no expiration increases the likelihood of unauthorized access and should be carefully considered.
Reusing the same token across multiple purposes or devices significantly increases the potential damage in the event of a leak.

Creating a Personal Access Token

  1. Go to Settings on GitHub (top-right corner, click your profile picture → Settings).
  2. Scroll down and select Developer settingsPersonal access tokensTokens (classic).
  3. Click Generate new token and choose Generate new token (classic) from the dropdown.
  4. Add a meaningful name in the Note field (e.g., "MineValley" or "CoreAPI").
  5. Under Expiration, select a valid duration for the token. Once expired, you'll need to create a new token.
    Alternatively, you can select No expiration for permanent use.
  6. Check the box for read:packages.
  7. Click Generate token and copy the token.

Adding the Token to Your Maven Settings

Once you have your token, add it to the settings.xml file of your Maven installation. Replace USERNAME with your GitHub username and TOKEN with the generated token.

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <servers>
        <server>
            <id>github</id>
            <username>USERNAME</username>
            <password>TOKEN</password>
        </server>
    </servers>
</settings>

Tip: In IntelliJ, you can create a settings.xml file by right-clicking on the pom.xml of any project and selecting Create settings.xml.

Troubleshooting / FAQ

I'm having issues with Eclipse.

  • Use IntelliJ.

I’m unsure if I used the correct GitHub username.

  • You can find your GitHub username on your profile page. If in doubt, try logging in with your username. If it works, it’s correct.

Can I choose the content of <id> freely?

  • Yes, the content of <id> in both the settings.xml and pom.xml files can be freely chosen, but it must be identical in both files.

I followed all steps, but the dependency could not be found.

  1. Click Maven in the right-hand sidebar.
  2. Press the Reload All Maven Projects button (top-left).
  3. If the problem persists, go to FileInvalidate Caches...Invalidate and Restart.

About

This API creates a connection between each individual module and our system core and is therefore integrated into each of our server-side systems. It gives access to essential tools and is also used to get data from server-side resources.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages