Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onEnable(){
- loadConfiguration();
- // Note that before the if statement was added, it still threw the null pointer exception.
- if(getCommand("safepvpmode") != null){
- getCommand("safepvpmode").setExecutor(new SafePvPMode(this));
- // This line ^ (14) throws the exception.
- }
- new ToggleListener(this);
- }
- public void loadConfiguration() {
- String toggleOnMessage = "toggleonmessage";
- String toggleOffMessage = "toggleoffmessage";
- String noPermission = "permissionmessage";
- getConfig().addDefault(toggleOnMessage, ChatColor.GREEN + "You will no longer destroy blocks when PvPing.");
- getConfig().addDefault(toggleOffMessage, ChatColor.GREEN + "You will now destroy blocks when PvPing.");
- getConfig().addDefault(noPermission, ChatColor.RED + "You do not have permission.");
- getConfig().options().copyDefaults(true);
- saveConfig();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement