Hey. I've been working on a plugin, but recently after adding a config to it I got the old null pointer exception (Is it up to date?), which I am familiar with, and I know most ways to fix it. The command was working before then but now it throws that exception and does not work at all. plugin.yml: pastebin.com/jdJEhsnh Code: pastebin.com/cRur7Pwq Command (SafePvPMode): pastebin.com/cncN4J96 Error: pastebin.com/fmHqKJ97
Show the stacktrace (the NPE from console) and the code, and point out what line of code the stacktrace is referencing, please.
The Error happened at line 22 in your SafePvPMode class, that is this code: Code (Text): if(!(sender instanceof Player)){ All i know is that this can't produce a nullpointer, we need the lines from the imports too, or you post the line 22 from your class Edit: found your error, you ask for a static load of your "noPermission" , "toggleOn" and "toggleOff" from the plugin instance that hasn't been initalized to that time, add your lines to the constructor so that you load the values there and not on a static field like this: Code (Text): String noPermission; String toggleOn; String toggleOff; public SafePvPMode(SafePvP instance){ plugin = instance; noPermission = ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("permissionmessage")); ... }