Skip to content

Instantly share code, notes, and snippets.

@Signifies
Created January 3, 2015 04:56
Show Gist options
  • Save Signifies/2fdb1f11cdebe9560f1d to your computer and use it in GitHub Desktop.
Save Signifies/2fdb1f11cdebe9560f1d to your computer and use it in GitHub Desktop.
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