Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case "add":
- if (args.length > 2) {
- String luogo = args[2];
- if (!RapinaFile.getStringList("locali-rapinabili").contains(luogo)) {
- RapinaFile.createSection(luogo);
- RapinaFile.createSection(luogo + ".x");
- RapinaFile.createSection(luogo + ".y");
- RapinaFile.createSection(luogo + ".z");
- RapinaFile.createSection(luogo + ".location");
- RapinaFile.set(luogo + ".x", player.getLocation().getX());
- RapinaFile.set(luogo + ".y", player.getLocation().getY());
- RapinaFile.set(luogo + ".z", player.getLocation().getZ());
- RapinaFile.set(luogo + ".location", player.getLocation());
- RapinaFile.getStringList("locali-rapinabili").add(luogo);
- try {
- RapinaFile.save(new File(instance.getDataFolder() + "/Rapine/", "rapine.yml"));
- } catch (IOException e) {
- e.printStackTrace();
- }
- player.sendMessage(Parser.parseKyori(LangFile.getString("prymaadmin-luogo-aggiunto")));
- } else {
- player.sendMessage(Parser.parseKyori(LangFile.getString("prymaadmin-luogo-gia-esistente")));
- }
- } else {
- player.sendMessage(Parser.parseKyori(LangFile.getString("prymaadmin-argomenti-insufficienti")));
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment