merge cleanup
This commit is contained in:
parent
7346044eea
commit
4db38606f2
@ -11,6 +11,7 @@ import org.bukkit.Location;
|
|||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.mcteam.ancientgates.commands.*;
|
import org.mcteam.ancientgates.commands.*;
|
||||||
import org.mcteam.ancientgates.gson.Gson;
|
import org.mcteam.ancientgates.gson.Gson;
|
||||||
@ -72,8 +73,9 @@ public class Plugin extends JavaPlugin
|
|||||||
Gate.load();
|
Gate.load();
|
||||||
|
|
||||||
// Register events
|
// Register events
|
||||||
getServer().getPluginManager().registerEvents(this.playerListener, this);
|
PluginManager pm = this.getServer().getPluginManager();
|
||||||
getServer().getPluginManager().registerEvents(this.blockListener, this);
|
pm.registerEvents(this.playerListener, this);
|
||||||
|
pm.registerEvents(this.blockListener, this);
|
||||||
|
|
||||||
log("Enabled");
|
log("Enabled");
|
||||||
}
|
}
|
||||||
@ -90,13 +92,15 @@ public class Plugin extends JavaPlugin
|
|||||||
// Commands
|
// Commands
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
public String getBaseCommand()
|
||||||
public String getBaseCommand() {
|
{
|
||||||
if (this.baseCommand != null) {
|
if (this.baseCommand != null)
|
||||||
return this.baseCommand;
|
return this.baseCommand;
|
||||||
}
|
|
||||||
Map<String, Map<String, Object>> Commands = (Map<String, Map<String, Object>>) this.getDescription().getCommands();
|
Map<String, Map<String, Object>> Commands = this.getDescription().getCommands();
|
||||||
|
|
||||||
this.baseCommand = Commands.keySet().iterator().next();
|
this.baseCommand = Commands.keySet().iterator().next();
|
||||||
|
|
||||||
return this.baseCommand;
|
return this.baseCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user