Guest User

Untitled

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