Guest User

Untitled

a guest
Sep 15th, 2017
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. public class PomocCommand
  2. implements CommandExecutor
  3. {
  4. Main plugin;
  5.  
  6. public PomocCommand(Main plugin)
  7. {
  8. this.plugin = plugin;
  9. this.plugin.getCommand("pomoc").setExecutor(this);
  10. }
  11.  
  12. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
  13. {
  14. if ((sender instanceof Player))
  15. {
  16. Player player = (Player)sender;
  17. for (String c : this.plugin.getConfig().getStringList("pomoc"))
  18. {
  19. c = c.replace("&", "ยง");
  20. c = c.replace("NICK_PLAYER", player.getName());
  21. player.sendMessage(c);
  22. }
  23. }
  24. else
  25. {
  26. sender.sendMessage("To polecenie moze zostac tylko wykonane przez gracza");
  27. }
  28. return false;
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment