src/main/java/de/viper/survivalplus/SurvivalPlus.java aktualisiert
This commit is contained in:
@@ -60,8 +60,8 @@ public class SurvivalPlus extends JavaPlugin {
|
||||
private SitListener sitListener;
|
||||
private PlayerJoinListener playerJoinListener;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
updateConfigFiles(); // Config-Dateien aktualisieren
|
||||
createHomesFile();
|
||||
createGravesFile();
|
||||
@@ -79,6 +79,12 @@ public class SurvivalPlus extends JavaPlugin {
|
||||
// StatsManager vor den Listenern initialisieren
|
||||
statsManager = new StatsManager(this);
|
||||
|
||||
// Listener initialisieren (sitListener zuerst!)
|
||||
sitListener = new SitListener(this);
|
||||
afkListener = new AFKListener(this);
|
||||
graveListener = new GraveListener(this);
|
||||
playerJoinListener = new PlayerJoinListener(friendCommand);
|
||||
|
||||
// Commands registrieren
|
||||
getCommand("gm").setExecutor(new GamemodeCommand(this));
|
||||
getCommand("sp").setExecutor(new PluginCommand(this));
|
||||
@@ -101,12 +107,14 @@ public class SurvivalPlus extends JavaPlugin {
|
||||
getCommand("trash").setExecutor(new TrashCommand());
|
||||
getCommand("workbench").setExecutor(new WorkbenchCommand());
|
||||
getCommand("anvil").setExecutor(new AnvilCommand());
|
||||
|
||||
TeleportCommands teleportCommands = new TeleportCommands(this);
|
||||
getCommand("tp").setExecutor(teleportCommands);
|
||||
getCommand("tphere").setExecutor(teleportCommands);
|
||||
getCommand("tpa").setExecutor(teleportCommands);
|
||||
getCommand("tpaccept").setExecutor(teleportCommands);
|
||||
getCommand("tpdeny").setExecutor(teleportCommands);
|
||||
|
||||
getCommand("kit").setExecutor(new KitCommand(this));
|
||||
|
||||
// BlockManager erstellen
|
||||
@@ -118,11 +126,6 @@ public class SurvivalPlus extends JavaPlugin {
|
||||
// Listener registrieren
|
||||
BackpackRecipe.register(this, langConfig);
|
||||
|
||||
sitListener = new SitListener(this);
|
||||
afkListener = new AFKListener(this);
|
||||
graveListener = new GraveListener(this);
|
||||
playerJoinListener = new PlayerJoinListener(friendCommand);
|
||||
|
||||
pluginManager.registerEvents(new ChatBlockListener(blockManager), this);
|
||||
pluginManager.registerEvents(new InventoryClickListener(this), this);
|
||||
pluginManager.registerEvents(sitListener, this);
|
||||
@@ -141,7 +144,7 @@ public class SurvivalPlus extends JavaPlugin {
|
||||
getCommand("blocklist").setExecutor(new BlockListCommand(blockManager, config));
|
||||
getCommand("unblock").setExecutor(new UnblockCommand(blockManager, config));
|
||||
|
||||
// Stats-Befehl
|
||||
// Stats-Befehl registrieren
|
||||
getCommand("stats").setExecutor(new StatsCommand(this, statsManager));
|
||||
|
||||
sleepListener = new SleepListener(this);
|
||||
@@ -166,11 +169,11 @@ public class SurvivalPlus extends JavaPlugin {
|
||||
// AutoClear Task starten
|
||||
startAutoClearTask();
|
||||
|
||||
// Beispiel ArmorStand
|
||||
// Beispiel ArmorStand spawnen
|
||||
spawnArmorStandExample();
|
||||
|
||||
getLogger().info(getMessage("plugin.enabled"));
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnArmorStandExample() {
|
||||
World world = Bukkit.getWorld("world");
|
||||
|
Reference in New Issue
Block a user