Replace boilerplate README with project-specific documentation
Build / build (push) Successful in 17s
Build / build (push) Successful in 17s
This commit is contained in:
@@ -1,43 +1,35 @@
|
|||||||
# HomesAPI
|
# HomesAPI
|
||||||
### initialisierung des Basis API Codes
|
|
||||||
|
|
||||||
```java
|
[](https://git.softwarerat.com/zlaura/HomesAPI/actions)
|
||||||
public void onEnable(){
|
|
||||||
Bansystem bansystem = new Bansystem();
|
|
||||||
bansystem.enableAPI("Benutzer","Passwort","Host","Datenbank");
|
|
||||||
ban = bansystem.getBan();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Verwendung des Home Systems:
|
A Paper API library providing a per-player homes system (create/list/teleport-to named homes), backed by YAML storage.
|
||||||
### erstellen eines Homes
|
|
||||||
````java
|
|
||||||
Homes home;
|
|
||||||
public void addHome(PlayerHome p){
|
|
||||||
//erstellt anhand der PlayerHome informationen ein Home
|
|
||||||
home.createNewHome(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
````
|
## Requirements
|
||||||
|
|
||||||
### alle Homes eines Spielers holen
|
- Java 18
|
||||||
|
- Maven
|
||||||
|
- Paper API 1.21.11
|
||||||
|
|
||||||
````java
|
## Building
|
||||||
Homes home;
|
|
||||||
public ArrayList<String> getHomes{
|
|
||||||
ArrayList<String> homes = new ArrayList<>();
|
|
||||||
//erstellt eine ArrayList mit den HomeNames
|
|
||||||
home.getPlayerHome.forEach(h -> {homes.add(h.getName)});
|
|
||||||
return homes;
|
|
||||||
}
|
|
||||||
````
|
|
||||||
|
|
||||||
### ein Home eines Spielers anhand des Namens holen
|
```bash
|
||||||
|
mvn -B package
|
||||||
|
```
|
||||||
|
|
||||||
````java
|
## Using it in another project
|
||||||
Homes home;
|
|
||||||
public String getHomeWorld(String name){
|
Published as a Maven snapshot to the private registry at `https://git.softwarerat.com/api/packages/zlaura/maven`:
|
||||||
home.getHomeByName(name);
|
|
||||||
return home.getWorld;
|
```xml
|
||||||
}
|
<dependency>
|
||||||
````
|
<groupId>com.softwarerat</groupId>
|
||||||
|
<artifactId>HomesAPI</artifactId>
|
||||||
|
<version>1.3-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
Used by [SMPCore](https://git.softwarerat.com/zlaura/SMPCore).
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
No license file is present in this repository; all rights reserved by the author unless stated otherwise.
|
||||||
|
|||||||
Reference in New Issue
Block a user