Skip to content

Commit

Permalink
[ci skip] Add bungee and fix imports for README
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberedCake committed Jul 6, 2022
1 parent 4154fdc commit 7348f4f
Showing 1 changed file with 97 additions and 7 deletions.
104 changes: 97 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can view the to-do list and future plans [by clicking here](https://github.c
<summary><b>INSTALL FOR SPIGOT</b> (click to expand/shrink)</summary>

## Installation - Spigot
### (It is recommended that you use [PaperSpigot](https://papermc.io/) instead of Spigot, but Spigot is still supported and PaperSpigot works on the 'spigot' portion of the library!)
### (It is recommended that you use [PaperSpigot](https://papermc.io/downloads) instead of Spigot, but Spigot is still supported and PaperSpigot works on the 'spigot' portion of the library!)

<details>
<summary><b>INSTALL WITH GRADLE [RECOMMENDED]</b> (click to expand/shrink)</summary>
Expand Down Expand Up @@ -74,22 +74,26 @@ Step 3) Reload your maven project and follow the usage instructions below.
To use CyberAPI, write this in your main onEnable method:

```java
import net.cybercake.cyberapi.CyberAPI;
import net.cybercake.cyberapi.settings.Settings;
import net.cybercake.cyberapi.spigot.CyberAPI;
import net.cybercake.cyberapi.common.builders.settings.Settings;

public class MainClass extends CyberAPI { // you must extend CyberAPI instead of JavaPlugin

@Override
public void onEnable() {
startCyberAPI( // this method will start CyberAPI and is **required** to be the first thing in your onEnable() method
new Settings()
Settings.builder()
// put your settings here, usually in the form of .<setting>(<value>)

.commandsPath("<your groupID>.commands")
// usually it's a good idea to define your commands package so that CyberAPI doesn't go searching through
// everything if you are using the 'better commands' feature

.build() // build once you have changed the settings you want
);

// now you have access to everything CyberAPI!
// the official website for the javadocs will be coming soon, but it's not here yet!
// have fun!
// view the docs here: https://docs.spigot.cybercake.net/
}

}
Expand All @@ -100,5 +104,91 @@ public class MainClass extends CyberAPI { // you must extend CyberAPI instead of
<details>
<summary><b>INSTALL FOR BUNGEECORD</b> (click to expand/shrink)</summary>

## Coming soon!
## Installation - Bungeecord
### (It is recommended that you use [Waterfall](https://papermc.io/downloads#Waterfall) instead of Bungeecord, but Bungeecord is still supported and Waterfall works on the 'bungee' portion of the library!)

<details>
<summary><b>INSTALL WITH GRADLE [RECOMMENDED]</b> (click to expand/shrink)</summary>

--------------------------------------------------------------------------------------------------------------
Step 1) Include the below code in your build.gradle "repositories" section.
```gradle
repositories {
maven { url 'https://jitpack.io' }
}
```

Step 2) Include the below code in your build.gradle "dependencies" and replace "LATEST" with the latest version that you see here: [![](https://jitpack.io/v/CyberedCake/CyberAPI.svg?label=Latest+Version)](https://jitpack.io/p/CyberedCake/CyberAPI) <br>
Step 2) <b>NOTE: You must keep the "v" at the beginning of the version number!</b>
```gradle
dependencies {
implementation 'com.github.CyberedCake.CyberAPI:bungee:vLATEST'
}
```

Step 3) Reload your gradle project and follow the usage instructions below.

--------------------------------------------------------------------------------------------------------------
</details>

<details>
<summary><b>INSTALL WITH MAVEN</b> (click to expand/shrink)</summary>

--------------------------------------------------------------------------------------------------------------
Step 1) Include the below code in your pom.xml "repositories" section.
```xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
```

Step 2) Include the below code in your pom.xml as a "dependency" and replace "LATEST" with the latest version that you see here: [![](https://jitpack.io/v/CyberedCake/CyberAPI.svg?label=Latest+Version)](https://jitpack.io/p/CyberedCake/CyberAPI) <br>
Step 2) <b>NOTE: You must keep the "v" at the beginning of the version number!</b>
```xml
<dependencies>
<dependency>
<groupId>com.github.CyberedCake.CyberAPI</groupId>
<artifactId>bungee</artifactId>
<version>vLATEST</version>
</dependency>
</dependencies>
```

Step 3) Reload your maven project and follow the usage instructions below.

--------------------------------------------------------------------------------------------------------------
</details>

## How to use - Bungeecord
To use CyberAPI, write this in your main onEnable method:

```java
import net.cybercake.cyberapi.bungee.CyberAPI;
import net.cybercake.cyberapi.common.builders.settings.Settings;

public class MainClass extends CyberAPI { // you must extend CyberAPI instead of Plugin

@Override
public void onEnable() {
startCyberAPI( // this method will start CyberAPI and is **required** to be the first thing in your onEnable() method
Settings.builder()
// put your settings here, usually in the form of .<setting>(<value>)

.commandsPath("<your groupID>.commands")
// usually it's a good idea to define your commands package so that CyberAPI doesn't go searching through
// everything if you are using the 'better commands' feature

.build() // build once you have changed the settings you want
);

// now you have access to everything CyberAPI!
// view the docs here: https://docs.bungee.cybercake.net/
}

}
```

</details>

0 comments on commit 7348f4f

Please sign in to comment.