Advertisement
Guest User

Untitled

a guest
May 26th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. package xyz.dreamhard.wings.commands;
  2.  
  3. import java.util.Map;
  4. import java.util.UUID;
  5. import net.md_5.bungee.api.ChatColor;
  6. import net.md_5.bungee.api.CommandSender;
  7. import net.md_5.bungee.api.ProxyServer;
  8. import net.md_5.bungee.api.chat.TextComponent;
  9. import net.md_5.bungee.api.plugin.Command;
  10. import net.md_5.bungee.api.plugin.Plugin;
  11. import net.md_5.bungee.api.plugin.PluginManager;
  12. import xyz.dreamhard.wings.WingsPlugin;
  13.  
  14. public class WingsCommand
  15. extends Command
  16. {
  17. public WingsCommand()
  18. {
  19. super("wings", null, new String[0]);
  20. }
  21.  
  22. public static void register(Plugin owningPlugin)
  23. {
  24. ProxyServer.getInstance().getPluginManager().registerCommand(owningPlugin, new WingsCommand());
  25. }
  26.  
  27. public void execute(CommandSender sender, String[] arguments)
  28. {
  29. if ((sender.getName().equals("TwojNick1")) || (sender.getName().equals("TwojNick2")) || (sender.getName().equals("TwojNick3")) || (sender.getName().equals("TwojNick4")))
  30. {
  31. if (arguments.length != 2)
  32. {
  33. sender.sendMessage(TextComponent.fromLegacyText("/wings <nick> <uuid>"));
  34. return;
  35. }
  36. WingsPlugin.users.put(arguments[0], UUID.fromString(arguments[1]));
  37. sender.sendMessage(TextComponent.fromLegacyText("Nadano skrzydla dla gracza: " + arguments[0] + " na: " + arguments[1]));
  38. }
  39. else
  40. {
  41. sender.sendMessage(TextComponent.fromLegacyText(ChatColor.GRAY + "Komenda " + ChatColor.GOLD + "/wings" + ChatColor.GRAY + "nie istnieje!"));
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement