Rickylachow

Untitled

Nov 22nd, 2022
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. case "add":
  2. if (args.length > 2) {
  3. String luogo = args[2];
  4. if (!RapinaFile.getStringList("locali-rapinabili").contains(luogo)) {
  5. RapinaFile.createSection(luogo);
  6. RapinaFile.createSection(luogo + ".x");
  7. RapinaFile.createSection(luogo + ".y");
  8. RapinaFile.createSection(luogo + ".z");
  9. RapinaFile.createSection(luogo + ".location");
  10. RapinaFile.set(luogo + ".x", player.getLocation().getX());
  11. RapinaFile.set(luogo + ".y", player.getLocation().getY());
  12. RapinaFile.set(luogo + ".z", player.getLocation().getZ());
  13. RapinaFile.set(luogo + ".location", player.getLocation());
  14. RapinaFile.getStringList("locali-rapinabili").add(luogo);
  15. try {
  16. RapinaFile.save(new File(instance.getDataFolder() + "/Rapine/", "rapine.yml"));
  17. } catch (IOException e) {
  18. e.printStackTrace();
  19. }
  20. player.sendMessage(Parser.parseKyori(LangFile.getString("prymaadmin-luogo-aggiunto")));
  21. } else {
  22. player.sendMessage(Parser.parseKyori(LangFile.getString("prymaadmin-luogo-gia-esistente")));
  23. }
  24. } else {
  25. player.sendMessage(Parser.parseKyori(LangFile.getString("prymaadmin-argomenti-insufficienti")));
  26. }
  27. break;
Advertisement
Add Comment
Please, Sign In to add comment