diff --git a/SchematicSystem_Main/src/de/steamwar/schematicsystem/SchematicSystem.java b/SchematicSystem_Main/src/de/steamwar/schematicsystem/SchematicSystem.java index a6d2e96..c1ec05d 100644 --- a/SchematicSystem_Main/src/de/steamwar/schematicsystem/SchematicSystem.java +++ b/SchematicSystem_Main/src/de/steamwar/schematicsystem/SchematicSystem.java @@ -2,11 +2,9 @@ package de.steamwar.schematicsystem; import de.steamwar.core.CommandRemover; import de.steamwar.schematicsystem.commands.SchematicCommand; -import de.steamwar.schematicsystem.listener.PlayerJoinListener; import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; import java.io.File; @@ -31,8 +29,5 @@ public class SchematicSystem extends JavaPlugin { CommandRemover.removeAll("/schematic", "/schem", "//schematic", "//schem"); getCommand("schem").setExecutor(new SchematicCommand()); - - PluginManager pm = Bukkit.getPluginManager(); - pm.registerEvents(new PlayerJoinListener(), this); } } diff --git a/SchematicSystem_Main/src/de/steamwar/schematicsystem/listener/PlayerJoinListener.java b/SchematicSystem_Main/src/de/steamwar/schematicsystem/listener/PlayerJoinListener.java deleted file mode 100644 index 07d75f5..0000000 --- a/SchematicSystem_Main/src/de/steamwar/schematicsystem/listener/PlayerJoinListener.java +++ /dev/null @@ -1,30 +0,0 @@ -package de.steamwar.schematicsystem.listener; - -import de.steamwar.schematicsystem.SchematicSystem; -import de.steamwar.sql.Schematic; -import de.steamwar.sql.SchematicType; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerJoinEvent; - -import java.util.LinkedList; -import java.util.List; - -public class PlayerJoinListener implements Listener { - - @EventHandler - public void handlePlayerJoin(PlayerJoinEvent event) { - Player player = event.getPlayer(); - - - List uncheckedSchematics = new LinkedList<>(); - for(SchematicType type : SchematicType.values()){ - if(type.check()) - uncheckedSchematics.addAll(Schematic.getSchemsOfType(player.getUniqueId(), type)); - } - - if(!uncheckedSchematics.isEmpty()) - player.sendMessage(SchematicSystem.PREFIX + "§7Du hast noch §e" + uncheckedSchematics.size() + " §7ungeprüfte Schematic(s)!"); - } -}