Guest User

Mah code c:

a guest
Apr 7th, 2014
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.ZygoZ;
  2.  
  3. import org.bukkit.ChatColor;
  4. import org.bukkit.Location;
  5. import org.bukkit.World;
  6. import org.bukkit.command.Command;
  7. import org.bukkit.command.CommandSender;
  8. import org.bukkit.entity.Player;
  9. import org.bukkit.event.world.WorldEvent;
  10. import org.bukkit.plugin.PluginManager;
  11. import org.bukkit.plugin.java.JavaPlugin;
  12.  
  13. @SuppressWarnings("unused")
  14. public class Flash extends JavaPlugin {
  15.  
  16. @Override
  17. public void onDisable() {
  18.  
  19. }
  20.  
  21. @Override
  22. public void onEnable() {
  23.  
  24. }
  25.  
  26. public boolean onCommand (CommandSender sender, Command cmd, String label, String[] args) {
  27. Player player = (Player) sender;
  28. if(label.equalsIgnoreCase("flash")) {
  29. if (args.length == 0) {
  30. player.sendMessage(ChatColor.DARK_RED + "Forkert! Brug:" + ChatColor.GOLD + ChatColor.BOLD + " '/flash <Navn>'");
  31. }if(args.length == 1){
  32.  
  33. Player targetPlayer = player.getServer().getPlayer(args[0]);
  34. Location location1 = player.getLocation();
  35. player.sendMessage(ChatColor.GREEN + "Du er blevet flashed hen til " + ChatColor.AQUA + ChatColor.BOLD + targetPlayer.getName() + ChatColor.RESET + ChatColor.GREEN + "!");
  36. targetPlayer.sendMessage(ChatColor.BOLD + player.getName() + ChatColor.RESET + ChatColor.GREEN + " har flashed sig hen til dig!");
  37. if(targetPlayer !=null)
  38. player.sendMessage(ChatColor.DARK_RED + "Forkert! Brug:" + ChatColor.GOLD + ChatColor.BOLD + " '/flash <Navn>'");
  39. else {
  40. player.sendMessage("Could not find player (in danish)");
  41. }
  42. }
  43. return false;
  44. }
  45.  
  46. }
RAW Paste Data