Created
January 3, 2015 04:56
-
-
Save Signifies/2fdb1f11cdebe9560f1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Troll extends JavaPlugin{ | |
public void onEnable() { } | |
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String args[]) { | |
/** | |
* No reason to deny Console use. The Console can troll to. | |
*/ | |
/** | |
* /fakejoin command | |
*/ | |
if (cmd.getName().equalsIgnoreCase("fakejoin")) { | |
/** | |
* Check to see if player has permission. | |
*/ | |
if (sender.hasPermission("fakejoin.use")) { | |
/** | |
* Check arguments after command | |
*/ | |
if (args.length == 0) { | |
sender.sendMessage(ChatColor.RED + "You haven't used enough arguments."); | |
} else { | |
/** | |
* Check to see if Player is null or offline, | |
* so you don't throw a null pointerException. | |
*/ | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment