From 2baeb7c0652ea8369c068871ede5b39e4e8599fc Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Thu, 3 Nov 2016 15:50:41 -0400 Subject: [PATCH] Removed unnessecary function calls, my project's neat as FUUUUUUUCCCCCKKKKKKK --- src/alisolarflare/AliPresents.java | 7 +++++++ .../components/flairdoor/FlairDoorModule.java | 3 +-- .../components/gpowers/GPowerModule.java | 3 +-- .../components/links/AliLinkModule.java | 1 + src/alisolarflare/events/uhc/UHCModule.java | 15 ++------------- src/alisolarflare/magic/MagicModule.java | 2 -- .../minigames/freeforall/FreeForAllModule.java | 12 +----------- .../minigames/lobby/LobbyModule.java | 7 ------- 8 files changed, 13 insertions(+), 37 deletions(-) diff --git a/src/alisolarflare/AliPresents.java b/src/alisolarflare/AliPresents.java index e738436..cbea14d 100644 --- a/src/alisolarflare/AliPresents.java +++ b/src/alisolarflare/AliPresents.java @@ -12,6 +12,8 @@ import alisolarflare.components.links.AliLinkModule; import alisolarflare.components.shulker.AliShulkerModule; import alisolarflare.events.uhc.UHCModule; import alisolarflare.magic.MagicModule; +import alisolarflare.minigames.freeforall.FreeForAllModule; +import alisolarflare.minigames.lobby.LobbyModule; public class AliPresents extends JavaPlugin{ public void onEnable(){ @@ -32,7 +34,12 @@ public class AliPresents extends JavaPlugin{ new GPowerModule().register(this); new AliLinkModule().register(this); new AliShulkerModule().register(this); + new UHCModule().register(this); + new MagicModule().register(this); + + new FreeForAllModule().register(this); + new LobbyModule().register(this); } } diff --git a/src/alisolarflare/components/flairdoor/FlairDoorModule.java b/src/alisolarflare/components/flairdoor/FlairDoorModule.java index 0368634..c7e266a 100644 --- a/src/alisolarflare/components/flairdoor/FlairDoorModule.java +++ b/src/alisolarflare/components/flairdoor/FlairDoorModule.java @@ -5,13 +5,12 @@ import org.bukkit.plugin.java.JavaPlugin; import alisolarflare.Module; import alisolarflare.components.flairdoor.commands.FlairMe; import alisolarflare.components.flairdoor.listeners.PortalListener; -import buttondevteam.lib.TBMCCoreAPI; public class FlairDoorModule extends Module { @Override public void register(JavaPlugin plugin) { registerCommand(plugin, new FlairMe()); - TBMCCoreAPI.RegisterEventsForExceptions(new PortalListener(plugin), plugin); + registerListener(plugin, new PortalListener(plugin)); } } diff --git a/src/alisolarflare/components/gpowers/GPowerModule.java b/src/alisolarflare/components/gpowers/GPowerModule.java index 8eb4287..91caeb0 100644 --- a/src/alisolarflare/components/gpowers/GPowerModule.java +++ b/src/alisolarflare/components/gpowers/GPowerModule.java @@ -5,7 +5,6 @@ import org.bukkit.plugin.java.JavaPlugin; import alisolarflare.Module; import alisolarflare.components.gpowers.commands.gPowerCommand; import alisolarflare.components.gpowers.listeners.gPowerListener; -import buttondevteam.lib.TBMCCoreAPI; public class GPowerModule extends Module { @@ -13,7 +12,7 @@ public class GPowerModule extends Module { public void register(JavaPlugin plugin) { registerCommand(plugin, new gPowerCommand()); - TBMCCoreAPI.RegisterEventsForExceptions(new gPowerListener(plugin), plugin); + registerListener(plugin, new gPowerListener(plugin)); } } diff --git a/src/alisolarflare/components/links/AliLinkModule.java b/src/alisolarflare/components/links/AliLinkModule.java index 1ef6c46..a6d44a9 100644 --- a/src/alisolarflare/components/links/AliLinkModule.java +++ b/src/alisolarflare/components/links/AliLinkModule.java @@ -15,6 +15,7 @@ public class AliLinkModule extends Module { @Override public void register(JavaPlugin plugin) { setAliLink = new SetAliLink(plugin); + registerCommand(plugin, new PressAliLink(plugin, setAliLink)); registerCommand(plugin, setAliLink); diff --git a/src/alisolarflare/events/uhc/UHCModule.java b/src/alisolarflare/events/uhc/UHCModule.java index ddb9bdb..51f6891 100644 --- a/src/alisolarflare/events/uhc/UHCModule.java +++ b/src/alisolarflare/events/uhc/UHCModule.java @@ -12,24 +12,13 @@ public class UHCModule extends Module { public UHCMatch match; public void register(JavaPlugin plugin) { - registerMemoryUnits(plugin); - registerCommands(plugin); - registerListeners(plugin); - } - private void registerMemoryUnits(JavaPlugin plugin) { if (plugin.getConfig().contains("UHCMatchState")){ match = new UHCMatch(plugin.getConfig(), MatchState.valueOf(plugin.getConfig().getString("UHCMatchState"))); }else{ match = new UHCMatch(plugin.getConfig(), MatchState.IDLE); } - } - private void registerListeners(JavaPlugin plugin) { - } - - private void registerCommands(JavaPlugin plugin) { + registerCommand(plugin, new AddToUHC(match)); registerCommand(plugin, new StartMatch(match)); - } - - + } } diff --git a/src/alisolarflare/magic/MagicModule.java b/src/alisolarflare/magic/MagicModule.java index 4da9fc3..6b77bb1 100644 --- a/src/alisolarflare/magic/MagicModule.java +++ b/src/alisolarflare/magic/MagicModule.java @@ -12,7 +12,5 @@ public class MagicModule extends Module{ public void register(JavaPlugin plugin) { registerListener(plugin, new AliArrowListener(plugin)); registerListener(plugin, new BoomBowListener()); - } - } diff --git a/src/alisolarflare/minigames/freeforall/FreeForAllModule.java b/src/alisolarflare/minigames/freeforall/FreeForAllModule.java index 181562f..5560929 100644 --- a/src/alisolarflare/minigames/freeforall/FreeForAllModule.java +++ b/src/alisolarflare/minigames/freeforall/FreeForAllModule.java @@ -12,19 +12,9 @@ public class FreeForAllModule extends Module{ @Override public void register(JavaPlugin plugin) { - registerMemory(); - registerEvents(); - registerCommands(plugin); - } - private void registerMemory() { this.spawnSet = new SpawnSet(); - } - - private void registerEvents() { - } - - private void registerCommands(JavaPlugin plugin) { registerCommand(plugin, new SetFFAS(spawnSet)); + } public int getGameState() {return GameState;} diff --git a/src/alisolarflare/minigames/lobby/LobbyModule.java b/src/alisolarflare/minigames/lobby/LobbyModule.java index 640b91a..63f74e6 100644 --- a/src/alisolarflare/minigames/lobby/LobbyModule.java +++ b/src/alisolarflare/minigames/lobby/LobbyModule.java @@ -13,13 +13,6 @@ public class LobbyModule extends Module{ public List fighters; public void register(JavaPlugin plugin){ - registerEvents(); - registerCommands(plugin); - } - private void registerEvents() { - } - - private void registerCommands(JavaPlugin plugin) { registerCommand(plugin, new ButtonFight(this)); registerCommand(plugin, new ButtonLeave(this)); registerCommand(plugin, new ListFighters(this));