Can someone check my work?

Discussion in 'Plugin Development' started by ladylady1, Feb 23, 2015.

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


    Hey, I'm a noob with java still fairly new but I've been working on it for awhile. I made this plugin so when someone tries to TPO they are killed instead, Unless they possess the permission I have in the code then it actually TP's it to them.

    Here's the code, hopefully I did well.

    Thanks and best Regards
  2. Offline


    1. check this out first if you are new. Your plugin WON'T work with this setup
    2. you should test it before you post something here.
    3. check if args[] is filled before getting the value at index 0
    4. you if statement is to late for the player he is already killed before tping. I recommed an if then else statement.
    5. check if target is not null
  3. Offline


    @guitargun you dont have to add a main method while doing plugins! (public static void main(String[] args))
  4. Offline


    I know I edited that part out.
  5. Offline


    Don't override methods when it isn't necessary. Don't add enable and disable messages. Check array lengths before using a value in one. Don't blindly cast without checking.
  6. Offline


    I have this now but it just seems to teleport and doesn't check if the person has the permission like it's supposed too.
    I also cant use an else or else if statement at the bottom and just throws and error.
  7. Offline


    @ladylady1 check your {} also your else, if and else if have problems. again check your {}. if you don't know why check the oracle documentation again.
Thread Status:
Not open for further replies.

Share This Page