diff --git a/README.md b/README.md new file mode 100644 index 0000000..444b176 --- /dev/null +++ b/README.md @@ -0,0 +1,97 @@ +# ![Logo](https://cdn.minevalley.eu/branding/logo_64px_cropped.png) - CraftingAPI + +The CraftingAPI provides access to custom crafting recipes for MineValleyEU, enabling the creation of shaped and shapeless recipes with custom crafting durations. + +## Maven Integration + +To use this API 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). + +```xml + + CraftingAPI + https://maven.pkg.github.com/MineValley/CraftingAPI + + true + + +``` + +```xml + + minevalley.crafting + api + 1.0.0 + +``` + +## 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 settings** → **Personal access tokens** → **Tokens (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"). +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 + + + + + CraftingAPI + USERNAME + TOKEN + + + +``` + +> **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. + + +I'm unsure if I used the correct GitHub username. + + +Can I choose the content of <id> freely? + + +I followed all steps, but the dependency could not be found. +
    +
  1. Click Maven in the right-hand sidebar.
  2. +
  3. Press the Reload All Maven Projects button (top-left).
  4. +
  5. If the problem persists, go to FileInvalidate Caches...Invalidate and Restart.
  6. +