first commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
plugins {
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// API
|
||||
implementation(project(":boosters-api"))
|
||||
// Galaxy
|
||||
compileOnly("com.alttd:galaxy-api:1.17.1-R0.1-SNAPSHOT")
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.alttd.boosters;
|
||||
|
||||
import com.alttd.boosters.api.BoosterAPI;
|
||||
|
||||
public class BoosterAPIProvider implements BoosterAPI {
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.alttd.boosters;
|
||||
|
||||
import com.alttd.boosters.api.BoosterAPI;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public final class BoostersPlugin extends JavaPlugin {
|
||||
|
||||
private static BoostersPlugin instance;
|
||||
private static BoosterAPI boosterAPI;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
boosterAPI = new BoosterAPIProvider();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
|
||||
public void registerListener(Listener... listeners) {
|
||||
for (Listener listener : listeners) {
|
||||
getServer().getPluginManager().registerEvents(listener, this);
|
||||
}
|
||||
}
|
||||
|
||||
public void registerCommand(String commandName, CommandExecutor CommandExecutor) {
|
||||
getCommand(commandName).setExecutor(CommandExecutor);
|
||||
}
|
||||
|
||||
public static BoostersPlugin getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public BoosterAPI getAPI() {
|
||||
return boosterAPI;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# we can have gradle generate this file
|
||||
name: BoosterPlugin
|
||||
version: 1.0 # TODO version from gradle
|
||||
main: com.alttd.boosters.BoosterPlugin
|
||||
api-version: 1.17
|
||||
load: STARTUP
|
||||
authors: [Destro, Teriuihi]
|
||||
Reference in New Issue
Block a user