Skip to content

Commit

Permalink
Update project description
Browse files Browse the repository at this point in the history
Signed-off-by: DevDrizzy <[email protected]>
  • Loading branch information
DevDrizzy committed Dec 1, 2023
1 parent e326622 commit c23a18a
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 21 deletions.
6 changes: 0 additions & 6 deletions Paper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
</properties>

<dependencies>
<dependency>
<groupId>org.github.spigot</groupId>
<artifactId>1.8.8</artifactId>
<version>1.8.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xyz.refinedev.api</groupId>
<artifactId>SpigotAPI-API</artifactId>
Expand Down
73 changes: 67 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,70 @@
# SpigotAPI
The most modern and support friendly public SpigotAPI
The most modern and support friendly public SpigotAPI (1.8 only)

This SpigotAPI supports and enchances how implement KnockbackAPI support from different spigot forks, along with helping the issue of
EntityHider with spigots that don't have it.
This SpigotAPI supports KnockbackAPI from different spigot forks, along with helping the issue of EntityHider with spigots that don't have it.
Also, useful if you need PotionExpireEvent or EquipmentSetEvent.

To contribute or add another spigot, just create a new module with the same package path, then implement the correct API interface
and add the usage from the Spigot. Besure to never push the actual spigot jar here, only its API with permission of developer.
You can then create a pull-request with your changes. This API will be used in a lot of RefineDevelopment's plugins.
## Features
- Support for popular spigots.
- Support for HCF Bukkit Events. (PotionExpireEvent, EquipmentSetEvent)
- Custom Entity Hider using protocol lib.
- Easy to use.

## Installing
You can either shade this repository into your plugin, or run it as a plugin by itself.

1. Clone this repository
2. Enter the directory: `cd SpigotAPI`
3. Build & install with Maven: `mvn clean package install`

OR
```xml
<repositories>
<repository>
<id>refine-public</id>
<url>https://maven.refinedev.xyz/repository/refine-public/</url>
</repository>
</repositories>
```
Next, add SpigotAPI to your project's dependencies via Maven

Add this to your `pom.xml` `<dependencies>`:
```xml
<dependency>
<groupId>xyz.refinedev.api</groupId>
<artifactId>SpigotAPI</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
```

## Usage
This only requires ProtocolLib if you use the API's EntityHider.
You can initiate and set up the API using the following code:

```java
import xyz.refinedev.api.spigot.SpigotHandler;
import xyz.refinedev.api.spigot.SpigotType;

public class ExamplePlugin extends JavaPlugin {

private SpigotHandler spigotHandler;

@Override
public void onEnable() {
this.spigotHandler = new SpigotHandler(instance);
// This will automatically detect if Entity Hider is needed or not.
// If it's needed, then it'll register it accordingly.
this.spigotHandler.init(true); // Boolean is for HCF mode.

SpigotType type = this.spigotHandler.getType();
if (type != SpigotType.Default) {
this.getLogger().info("Found " + type.getName() + ", hooking in for support, HCF-TeamFights will be supported.");
}

// Usage can be like so
Player player = Bukkit.getPlayer("NotDrizzy"); // your player object
this.spigotHandler.getKnockback().setKnockback(player, "knockback name");
}
}
```
10 changes: 1 addition & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<distributionManagement>
<repository>
<id>refine-releases</id>
<url>https://maven.insidious.cc/repository/maven-releases/</url>
</repository>
</distributionManagement>


<repositories>
<repository>
<id>jitpack.io</id>
Expand All @@ -66,7 +58,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
<version>1.18.26</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit c23a18a

Please sign in to comment.