Removed unnessecary function calls, my project's neat as

FUUUUUUUCCCCCKKKKKKK
This commit is contained in:
alisolarflare 2016-11-03 15:50:41 -04:00
parent 70b2e89e10
commit 2baeb7c065
8 changed files with 13 additions and 37 deletions

View file

@ -12,6 +12,8 @@ import alisolarflare.components.links.AliLinkModule;
import alisolarflare.components.shulker.AliShulkerModule; import alisolarflare.components.shulker.AliShulkerModule;
import alisolarflare.events.uhc.UHCModule; import alisolarflare.events.uhc.UHCModule;
import alisolarflare.magic.MagicModule; import alisolarflare.magic.MagicModule;
import alisolarflare.minigames.freeforall.FreeForAllModule;
import alisolarflare.minigames.lobby.LobbyModule;
public class AliPresents extends JavaPlugin{ public class AliPresents extends JavaPlugin{
public void onEnable(){ public void onEnable(){
@ -32,7 +34,12 @@ public class AliPresents extends JavaPlugin{
new GPowerModule().register(this); new GPowerModule().register(this);
new AliLinkModule().register(this); new AliLinkModule().register(this);
new AliShulkerModule().register(this); new AliShulkerModule().register(this);
new UHCModule().register(this); new UHCModule().register(this);
new MagicModule().register(this); new MagicModule().register(this);
new FreeForAllModule().register(this);
new LobbyModule().register(this);
} }
} }

View file

@ -5,13 +5,12 @@ import org.bukkit.plugin.java.JavaPlugin;
import alisolarflare.Module; import alisolarflare.Module;
import alisolarflare.components.flairdoor.commands.FlairMe; import alisolarflare.components.flairdoor.commands.FlairMe;
import alisolarflare.components.flairdoor.listeners.PortalListener; import alisolarflare.components.flairdoor.listeners.PortalListener;
import buttondevteam.lib.TBMCCoreAPI;
public class FlairDoorModule extends Module { public class FlairDoorModule extends Module {
@Override @Override
public void register(JavaPlugin plugin) { public void register(JavaPlugin plugin) {
registerCommand(plugin, new FlairMe()); registerCommand(plugin, new FlairMe());
TBMCCoreAPI.RegisterEventsForExceptions(new PortalListener(plugin), plugin); registerListener(plugin, new PortalListener(plugin));
} }
} }

View file

@ -5,7 +5,6 @@ import org.bukkit.plugin.java.JavaPlugin;
import alisolarflare.Module; import alisolarflare.Module;
import alisolarflare.components.gpowers.commands.gPowerCommand; import alisolarflare.components.gpowers.commands.gPowerCommand;
import alisolarflare.components.gpowers.listeners.gPowerListener; import alisolarflare.components.gpowers.listeners.gPowerListener;
import buttondevteam.lib.TBMCCoreAPI;
public class GPowerModule extends Module { public class GPowerModule extends Module {
@ -13,7 +12,7 @@ public class GPowerModule extends Module {
public void register(JavaPlugin plugin) { public void register(JavaPlugin plugin) {
registerCommand(plugin, new gPowerCommand()); registerCommand(plugin, new gPowerCommand());
TBMCCoreAPI.RegisterEventsForExceptions(new gPowerListener(plugin), plugin); registerListener(plugin, new gPowerListener(plugin));
} }
} }

View file

@ -15,6 +15,7 @@ public class AliLinkModule extends Module {
@Override @Override
public void register(JavaPlugin plugin) { public void register(JavaPlugin plugin) {
setAliLink = new SetAliLink(plugin); setAliLink = new SetAliLink(plugin);
registerCommand(plugin, new PressAliLink(plugin, setAliLink)); registerCommand(plugin, new PressAliLink(plugin, setAliLink));
registerCommand(plugin, setAliLink); registerCommand(plugin, setAliLink);

View file

@ -12,24 +12,13 @@ public class UHCModule extends Module {
public UHCMatch match; public UHCMatch match;
public void register(JavaPlugin plugin) { public void register(JavaPlugin plugin) {
registerMemoryUnits(plugin);
registerCommands(plugin);
registerListeners(plugin);
}
private void registerMemoryUnits(JavaPlugin plugin) {
if (plugin.getConfig().contains("UHCMatchState")){ if (plugin.getConfig().contains("UHCMatchState")){
match = new UHCMatch(plugin.getConfig(), MatchState.valueOf(plugin.getConfig().getString("UHCMatchState"))); match = new UHCMatch(plugin.getConfig(), MatchState.valueOf(plugin.getConfig().getString("UHCMatchState")));
}else{ }else{
match = new UHCMatch(plugin.getConfig(), MatchState.IDLE); 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 AddToUHC(match));
registerCommand(plugin, new StartMatch(match)); registerCommand(plugin, new StartMatch(match));
} }
} }

View file

@ -12,7 +12,5 @@ public class MagicModule extends Module{
public void register(JavaPlugin plugin) { public void register(JavaPlugin plugin) {
registerListener(plugin, new AliArrowListener(plugin)); registerListener(plugin, new AliArrowListener(plugin));
registerListener(plugin, new BoomBowListener()); registerListener(plugin, new BoomBowListener());
} }
} }

View file

@ -12,19 +12,9 @@ public class FreeForAllModule extends Module{
@Override @Override
public void register(JavaPlugin plugin) { public void register(JavaPlugin plugin) {
registerMemory();
registerEvents();
registerCommands(plugin);
}
private void registerMemory() {
this.spawnSet = new SpawnSet(); this.spawnSet = new SpawnSet();
}
private void registerEvents() {
}
private void registerCommands(JavaPlugin plugin) {
registerCommand(plugin, new SetFFAS(spawnSet)); registerCommand(plugin, new SetFFAS(spawnSet));
} }
public int getGameState() {return GameState;} public int getGameState() {return GameState;}

View file

@ -13,13 +13,6 @@ public class LobbyModule extends Module{
public List<String> fighters; public List<String> fighters;
public void register(JavaPlugin plugin){ public void register(JavaPlugin plugin){
registerEvents();
registerCommands(plugin);
}
private void registerEvents() {
}
private void registerCommands(JavaPlugin plugin) {
registerCommand(plugin, new ButtonFight(this)); registerCommand(plugin, new ButtonFight(this));
registerCommand(plugin, new ButtonLeave(this)); registerCommand(plugin, new ButtonLeave(this));
registerCommand(plugin, new ListFighters(this)); registerCommand(plugin, new ListFighters(this));