Lisenochek

Untitled

Dec 15th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. package ru.lisenochek.ftfiches.command;
  2.  
  3. import org.bukkit.command.Command;
  4. import org.bukkit.command.CommandExecutor;
  5. import org.bukkit.command.CommandSender;
  6. import org.bukkit.entity.Player;
  7. import ru.lisenochek.ftfiches.NPC.CreatorNPC;
  8. import ru.lisenochek.ftfiches.utils.C;
  9.  
  10. public class NPCCommand implements CommandExecutor {
  11.  
  12. @Override
  13. public boolean onCommand(CommandSender s, Command cmd, String str, String[] args) {
  14.  
  15. Player p = (Player) s;
  16.  
  17. if (args.length == 0) {
  18.  
  19. p.sendMessage("");
  20. p.sendMessage(C.getEntityPrefix() + C.c("&7/npc spawn (baby/normal) (имя) &a- призвать жителя."));
  21. p.sendMessage(C.getEntityPrefix() + C.c("&7/npc delete &a- удалить жителя."));
  22. p.sendMessage("");
  23. }
  24.  
  25. if (args.length >= 1 && args[0].equalsIgnoreCase("spawn")) {
  26.  
  27. if (args.length != 3) {
  28. p.sendMessage("");
  29. p.sendMessage(C.getEntityPrefix() + C.c("&cМало аргументов!"));
  30. p.sendMessage(C.getEntityPrefix() + C.c("&7/npc spawn (baby/normal) (имя) &a- призвать жителя."));
  31. p.sendMessage("");
  32. return true;
  33. }
  34.  
  35. CreatorNPC.createNPC(p.getLocation(), args[1], args[2]);
  36. }
  37. return true;
  38. }
  39. }
Add Comment
Please, Sign In to add comment