Skip to content

Commit

Permalink
take use of list elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Snabeldier committed Jan 6, 2025
1 parent 250bc36 commit bbcc357
Showing 1 changed file with 47 additions and 35 deletions.
82 changes: 47 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,45 @@
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.
> 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).

```xml

<repository>
<id>github</id>
<url>https://maven.pkg.github.com/MineValley/CoreAPI</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>github</id>
<url>https://maven.pkg.github.com/MineValley/CoreAPI</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
```

```xml

<dependency>
<groupId>minevalley.core</groupId>
<artifactId>api</artifactId>
<version>LATEST</version>
<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:
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.
> 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

Expand All @@ -50,45 +56,51 @@ While the API is publicly accessible, a GitHub account is required to access the

### 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.
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
<?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>
<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
> **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

<strong>I'm having issues with Eclipse.</strong>
<br>
Use IntelliJ.
<ul>
<li>Use IntelliJ.</li>
</ul>


<strong>I’m unsure if I used the correct GitHub username.</strong>
<br>
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.
<ul>
<li>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.</li>
</ul>


<strong>Can I choose the content of &lt;id&gt; freely?</strong>
<br>
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.
<ul>
<li>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.</li>
</ul>

<strong>I followed all steps, but the dependency could not be found.</strong>
<br>
1. Click **Maven** in the right-hand sidebar.
<br>
2. Press the **Reload All Maven Projects** button (top-left).
<br>
3. If the problem persists, go to **File****Invalidate Caches ...****Invalidate and Restart**.

<ol>
<li>Click **Maven** in the right-hand sidebar.</li>
<li>Press the **Reload All Maven Projects** button (top-left).</li>
<li>If the problem persists, go to **File** → **Invalidate Caches ...** → **Invalidate and Restart**.</li>
</ol>

0 comments on commit bbcc357

Please sign in to comment.