diff --git a/make_jar.jardesc b/make_jar.jardesc index cad0ee5..90a0308 100644 --- a/make_jar.jardesc +++ b/make_jar.jardesc @@ -1,6 +1,6 @@ - + diff --git a/resources/plugin.yml b/resources/plugin.yml index b6ebc4f..d5e7ea0 100644 --- a/resources/plugin.yml +++ b/resources/plugin.yml @@ -1,6 +1,6 @@ name: PandacraftUtils main: net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils -version: 3.0 +version: 3.1 diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java index 8caa0c3..cacfd8f 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java @@ -17,7 +17,6 @@ import net.mc_pandacraft.java.plugin.pandacraftutils.modules.cheat_protect.Creat import net.mc_pandacraft.java.plugin.pandacraftutils.modules.cheat_protect.NoPvpProtectManager; import net.mc_pandacraft.java.plugin.pandacraftutils.players.OnlinePlayerManager; -import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; @@ -73,15 +72,15 @@ public class PandacraftUtils extends JavaPlugin { afkManager = new AfkManager(); wESelectionDisplayManager = new WESelectionDisplayManager(); - commandAliasManager = new CommandAliasManager(this); - spawnTimeManager = new SpawnTimeManager(this); + commandAliasManager = new CommandAliasManager(); + spawnTimeManager = new SpawnTimeManager(); chatAnalysisManager = new ChatAnalysisManager(); - creativCheatManager = new CreativCheatManager(this); - noPvpProtectManager = new NoPvpProtectManager(this); - loginLogoutMessageManager = new LoginLogoutMessageManager(this); - calculatorManager = new CalculatorManager(this); + creativCheatManager = new CreativCheatManager(); + noPvpProtectManager = new NoPvpProtectManager(); + loginLogoutMessageManager = new LoginLogoutMessageManager(); + calculatorManager = new CalculatorManager(); survivalCuboManager = new SurvivalCuboManager(); - serverPingListener = new PacketOutServerInfoListener(this); + serverPingListener = new PacketOutServerInfoListener(); staffQueueManager = new StaffQueueManager(); tpsAnalysisManager = new TPSAnalysisManager(); autoMessagesManager = new AutoMessagesManager(); diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/CalculatorManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/CalculatorManager.java index 11162bc..4ae8a5c 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/CalculatorManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/CalculatorManager.java @@ -20,15 +20,13 @@ import org.bukkit.event.player.PlayerQuitEvent; public class CalculatorManager implements Listener { - private PandacraftUtils plugin; + private PandacraftUtils plugin = PandacraftUtils.getInstance(); private Map> history = new HashMap>(); - public CalculatorManager(PandacraftUtils pl) { - plugin = pl; - + public CalculatorManager() { plugin.getServer().getPluginManager().registerEvents(this, plugin); // analyse des joueurs déjà en ligne (/reload) diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/CommandAliasManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/CommandAliasManager.java index 47bff70..87f8e62 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/CommandAliasManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/CommandAliasManager.java @@ -13,11 +13,10 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerCommandPreprocessEvent; public class CommandAliasManager implements Listener { - private PandacraftUtils plugin; + private PandacraftUtils plugin = PandacraftUtils.getInstance(); - public CommandAliasManager(PandacraftUtils pl) { - plugin = pl; + public CommandAliasManager() { plugin.getServer().getPluginManager().registerEvents(this, plugin); diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/LoginLogoutMessageManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/LoginLogoutMessageManager.java index e1c941b..9997125 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/LoginLogoutMessageManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/LoginLogoutMessageManager.java @@ -18,13 +18,12 @@ import de.luricos.bukkit.xAuth.events.xAuthLoginEvent; public class LoginLogoutMessageManager implements Listener { - private PandacraftUtils plugin; + private PandacraftUtils plugin = PandacraftUtils.getInstance(); private List loggedInPlayer = new ArrayList(); - public LoginLogoutMessageManager(PandacraftUtils pl) { - plugin = pl; + public LoginLogoutMessageManager() { plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/PacketOutServerInfoListener.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/PacketOutServerInfoListener.java index ba9422c..63b9de6 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/PacketOutServerInfoListener.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/PacketOutServerInfoListener.java @@ -18,11 +18,10 @@ import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils; import net.mc_pandacraft.java.plugin.pandacraftutils.plugin_interface.EssentialsInterface; public class PacketOutServerInfoListener { - private PandacraftUtils plugin; + private PandacraftUtils plugin = PandacraftUtils.getInstance(); - public PacketOutServerInfoListener(PandacraftUtils pl) { - plugin = pl; + public PacketOutServerInfoListener() { ProtocolLibrary .getProtocolManager() diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/SpawnTimeManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/SpawnTimeManager.java index 64fcc92..ca94516 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/SpawnTimeManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/SpawnTimeManager.java @@ -9,15 +9,14 @@ import org.bukkit.scheduler.BukkitRunnable; public class SpawnTimeManager extends BukkitRunnable { - private PandacraftUtils plugin; + private PandacraftUtils plugin = PandacraftUtils.getInstance(); int timeTick = 0; private String initial_map_name = "spawn"; - public SpawnTimeManager(PandacraftUtils pl) { - plugin = pl; + public SpawnTimeManager() { run(); plugin.getServer().getScheduler().runTaskTimer(plugin, this, 1L, 2L); } diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/cheat_protect/CreativCheatManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/cheat_protect/CreativCheatManager.java index 141388a..b6b2eb7 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/cheat_protect/CreativCheatManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/cheat_protect/CreativCheatManager.java @@ -7,11 +7,10 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerMoveEvent; public class CreativCheatManager implements Listener { - private PandacraftUtils plugin; + private PandacraftUtils plugin = PandacraftUtils.getInstance(); - public CreativCheatManager(PandacraftUtils pl) + public CreativCheatManager() { - plugin = pl; plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/cheat_protect/NoPvpProtectManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/cheat_protect/NoPvpProtectManager.java index aeeb1df..8c287bb 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/cheat_protect/NoPvpProtectManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/cheat_protect/NoPvpProtectManager.java @@ -21,7 +21,7 @@ import org.bukkit.event.player.PlayerBucketEmptyEvent; public class NoPvpProtectManager implements Listener { - private PandacraftUtils plugin; + private PandacraftUtils plugin = PandacraftUtils.getInstance(); private double lava_distance = 5; private double fire_distance = 5; @@ -29,9 +29,8 @@ public class NoPvpProtectManager implements Listener { private String last_logger_message = ""; - public NoPvpProtectManager(PandacraftUtils pl) + public NoPvpProtectManager() { - plugin = pl; plugin.getServer().getPluginManager().registerEvents(this, plugin); }