-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 424ffce
Showing
14 changed files
with
606 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea/modules.xml | ||
.idea/jarRepositories.xml | ||
.idea/compiler.xml | ||
.idea/libraries/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### Eclipse ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Mac OS ### | ||
.DS_Store |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>xyz.geik.autosystem</groupId> | ||
<artifactId>AutoSystem</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<properties> | ||
<shaded.package>org.cas.osd.platform.ciam.shaded</shaded.package> | ||
<maven.compiler.source>8</maven.compiler.source> | ||
<maven.compiler.target>8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- Spigot 1.18.1 --> | ||
<dependency> | ||
<groupId>org.spigotmc</groupId> | ||
<artifactId>spigot-api</artifactId> | ||
<version>1.19.2-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- Lombok --> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.18.22</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- GLib Dependency --> | ||
<dependency> | ||
<groupId>com.github.poyrazinan</groupId> | ||
<artifactId>GLib</artifactId> | ||
<version>a148ed022d</version> | ||
</dependency> | ||
<!-- WildStacker Dependency --> | ||
<dependency> | ||
<groupId>com.bgsoftware</groupId> | ||
<artifactId>WildStackerAPI</artifactId> | ||
<version>3.8.0</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<repositories> | ||
<!-- Spigot Repo --> | ||
<repository> | ||
<id>spigot-repo</id> | ||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
<!-- Jitpack Repo --> | ||
<repository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
</repository> | ||
<!-- WildStacker Repo --> | ||
<repository> | ||
<id>bg-repo</id> | ||
<url>https://repo.bg-software.com/repository/api/</url> | ||
</repository> | ||
</repositories> | ||
|
||
<build> | ||
<plugins> | ||
<!-- Shade plugin for store dependency on jar --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>3.2.4</version> | ||
<configuration> | ||
<artifactSet> | ||
<includes> | ||
<include>com.github.poyrazinan:*:*:*</include> | ||
</includes> | ||
</artifactSet> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.8.1</version> | ||
<configuration> | ||
<source /> | ||
<target /> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.1.2</version> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package xyz.geik.autosystem; | ||
|
||
import de.leonhard.storage.Config; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.plugin.PluginManager; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
import xyz.geik.autosystem.handlers.AutoKillListener; | ||
import xyz.geik.autosystem.handlers.KillEvent; | ||
import xyz.geik.glib.GLibAPI; | ||
import xyz.geik.glib.file.StorageAPI; | ||
|
||
public class Main extends JavaPlugin { | ||
|
||
private static Main instance; | ||
private static Config config; | ||
|
||
public void onEnable() { | ||
instance = this; | ||
new GLibAPI(this); | ||
config = new StorageAPI().initConfig("config"); | ||
registerEvents(); | ||
} | ||
|
||
private void registerEvents() { | ||
PluginManager pm = Bukkit.getPluginManager(); | ||
pm.registerEvents(new AutoKillListener(), this); | ||
pm.registerEvents(new KillEvent(), this); | ||
} | ||
|
||
public static Main getInstance() { | ||
return instance; | ||
} | ||
|
||
public static Config getConfigFile() { | ||
return config; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/xyz/geik/autosystem/api/SpawnerKillEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package xyz.geik.autosystem.api; | ||
|
||
import lombok.Getter; | ||
import org.bukkit.entity.Entity; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
@Getter | ||
public class SpawnerKillEvent extends Event { | ||
|
||
private boolean isCancelled; | ||
private Entity entity; | ||
private int entityAmount; | ||
|
||
public SpawnerKillEvent(Entity entity, int entityAmount) { | ||
this.entity = entity; | ||
this.entityAmount = entityAmount; | ||
} | ||
|
||
private static final HandlerList HANDLERS = new HandlerList(); | ||
|
||
@Override | ||
public HandlerList getHandlers() | ||
{ | ||
return HANDLERS; | ||
} | ||
|
||
public static HandlerList getHandlerList() | ||
{ | ||
return HANDLERS; | ||
} | ||
|
||
public boolean isCancelled() | ||
{ | ||
return this.isCancelled; | ||
} | ||
|
||
public void setCancelled(boolean arg0) | ||
{ | ||
this.isCancelled = arg0; | ||
} | ||
} |
Oops, something went wrong.