Guest User

Untitled

a guest
Feb 6th, 2016
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. package ro.flaviusDolha.multiCommands.commands;
  2.  
  3. import org.bukkit.ChatColor;
  4. import org.bukkit.command.Command;
  5. import org.bukkit.command.CommandExecutor;
  6. import org.bukkit.command.CommandSender;
  7. import org.bukkit.entity.Player;
  8.  
  9. public class Hello implements CommandExecutor {
  10.  
  11. public boolean onCommand(CommandSender sender, Command command,
  12. String label, String[] args) {
  13. if(!(sender instanceof Player)) {
  14. sender.sendMessage("You must be a player to use this command!");
  15. return false;
  16. }
  17. Player player = (Player) sender;
  18. player.sendMessage(ChatColor.GOLD + "You did the command " + player.getName() + ChatColor.AQUA + "!");
  19. return true;
  20. }
  21. }
Add Comment
Please, Sign In to add comment