Player Move Event Problems

Discussion in 'Plugin Development' started by l4pierce, Aug 15, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    l4pierce

  2. Offline

    Courier

    Didn't look at your code, but it looks like your imports are incorrect. You are importing net.minecraft.server.World instead of org.bukkit.World.
     
  3. Offline

    l4pierce

    Thanks! That fixed that problem. Now i get this error http://pastebin.com/f19cYEHc upon using /nl, I updated github if you feel like taking a look at it :p. It would be very much appreciated!
     
  4. Offline

    Courier

    Okay, I looked at your code. For one thing, your program will error if you type a command from the console. You should add something like this to the beginning of your onCommand(...)
    Code:java
    1. if(!(sender instanceof Player))
    2. {
    3. sender.sendMessage("This command can not be used by the console");
    4. return;
    5. }
    I can't tell exactly where you NPE is, because the line number is not displayed in the log. It says "Unknown source" where it usually shows the line number. Did you obfuscate your code?
     
  5. Offline

    l4pierce

    As far as i know, no i didnt obfuscate it. I'm fairly new to java myself, I got my code from continuting the NightLight plugin.
     
  6. Offline

    keensta

    Possibly try finishing the permissionHandler before trying to use it.
     
Thread Status:
Not open for further replies.

Share This Page