diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/AddfriendCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/AddfriendCommand.java index 1f91f158..e05090e2 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/AddfriendCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/AddfriendCommand.java @@ -75,49 +75,49 @@ public void execute(CommandSender sender, String[] args) { if(sender.hasPermission("areashop.addfriendall")) { if((region.isRentRegion() && !((RentRegion)region).isRented()) || (region.isBuyRegion() && !((BuyRegion)region).isSold())) { - plugin.message(sender, "addfriend-noOwner"); + plugin.message(sender, "addfriend-noOwner", region); return; } OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]); if(friend.getLastPlayed() == 0 && !plugin.getConfig().getBoolean("addFriendNotExistingPlayers")) { - plugin.message(sender, "addfriend-notVisited", args[1]); + plugin.message(sender, "addfriend-notVisited", args[1], region); return; } if(region.getFriends().contains(friend.getUniqueId())) { - plugin.message(sender, "addfriend-alreadyAdded", friend.getName()); + plugin.message(sender, "addfriend-alreadyAdded", friend.getName(), region); return; } if(region.isOwner(friend.getUniqueId())) { - plugin.message(sender, "addfriend-self", friend.getName()); + plugin.message(sender, "addfriend-self", friend.getName(), region); return; } region.addFriend(friend.getUniqueId()); region.update(); - plugin.message(sender, "addfriend-successOther", friend.getName(), region.getName()); + plugin.message(sender, "addfriend-successOther", friend.getName(), region); } else { if(sender.hasPermission("areashop.addfriend") && sender instanceof Player) { if(region.isOwner((Player)sender)) { OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]); if(friend.getLastPlayed() == 0 && !plugin.getConfig().getBoolean("addFriendNotExistingPlayers")) { - plugin.message(sender, "addfriend-notVisited", args[1]); + plugin.message(sender, "addfriend-notVisited", args[1], region); return; } if(region.getFriends().contains(friend.getUniqueId())) { - plugin.message(sender, "addfriend-alreadyAdded", friend.getName()); + plugin.message(sender, "addfriend-alreadyAdded", friend.getName(), region); return; } if(region.isOwner(friend.getUniqueId())) { - plugin.message(sender, "addfriend-self", friend.getName()); + plugin.message(sender, "addfriend-self", friend.getName(), region); return; } region.addFriend(friend.getUniqueId()); region.update(); - plugin.message(sender, "addfriend-success", friend.getName(), region.getName()); + plugin.message(sender, "addfriend-success", friend.getName(), region); } else { - plugin.message(sender, "addfriend-noPermissionOther"); + plugin.message(sender, "addfriend-noPermissionOther", region); } } else { - plugin.message(sender, "addfriend-noPermission"); + plugin.message(sender, "addfriend-noPermission", region); } } } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/AddsignCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/AddsignCommand.java index f3d8145c..4088a7fb 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/AddsignCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/AddsignCommand.java @@ -86,13 +86,13 @@ public void execute(CommandSender sender, String[] args) { profile = args[2]; Set profiles = plugin.getConfig().getConfigurationSection("signProfiles").getKeys(false); if(!profiles.contains(profile)) { - plugin.message(sender, "addsign-wrongProfile", Utils.createCommaSeparatedList(profiles)); + plugin.message(sender, "addsign-wrongProfile", Utils.createCommaSeparatedList(profiles), region); return; } } GeneralRegion signRegion = plugin.getFileManager().getRegionBySignLocation(block.getLocation()); if(signRegion != null) { - plugin.message(sender, "addsign-alreadyRegistered", signRegion.getName()); + plugin.message(sender, "addsign-alreadyRegistered", signRegion); return; } @@ -100,7 +100,7 @@ public void execute(CommandSender sender, String[] args) { if(profile == null) { plugin.message(sender, "addsign-success", region); } else { - plugin.message(sender, "addsign-successProfile", region, profile); + plugin.message(sender, "addsign-successProfile", profile, region); } region.update(); } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelCommand.java index bfe357d3..8f82c23d 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelCommand.java @@ -60,7 +60,7 @@ public void execute(CommandSender sender, String[] args) { plugin.message(player, "cmd-noRegionsFound"); return; } - // Start removing the region that he has permission for + // Start removing the regions that he has permission for ArrayList namesSuccess = new ArrayList<>(); ArrayList namesFailed = new ArrayList<>(); for(GeneralRegion region : regions) { @@ -100,17 +100,17 @@ public void execute(CommandSender sender, String[] args) { // Remove the rent if the player has permission if(sender.hasPermission("areashop.destroyrent") || (isLandlord && sender.hasPermission("areashop.destroyrent.landlord"))) { plugin.getFileManager().removeRent((RentRegion)region, true); - plugin.message(sender, "destroy-successRent", region.getName()); + plugin.message(sender, "destroy-successRent", region); } else { - plugin.message(sender, "destroy-noPermissionRent"); + plugin.message(sender, "destroy-noPermissionRent", region); } } else if(region.isBuyRegion()) { // Remove the buy if the player has permission if(sender.hasPermission("areashop.destroybuy") || (isLandlord && sender.hasPermission("areashop.destroybuy.landlord"))) { plugin.getFileManager().removeBuy((BuyRegion)region, true); - plugin.message(sender, "destroy-successBuy", region.getName()); + plugin.message(sender, "destroy-successBuy", region); } else { - plugin.message(sender, "destroy-noPermissionBuy"); + plugin.message(sender, "destroy-noPermissionBuy", region); } } Bukkit.getPluginManager().callEvent(new RemovedRegionEvent(region)); diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelfriendCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelfriendCommand.java index 9bde4eaf..b7633306 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelfriendCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelfriendCommand.java @@ -73,33 +73,33 @@ public void execute(CommandSender sender, String[] args) { if(sender.hasPermission("areashop.delfriendall")) { if((region.isRentRegion() && !((RentRegion)region).isRented()) || (region.isBuyRegion() && !((BuyRegion)region).isSold())) { - plugin.message(sender, "delfriend-noOwner"); + plugin.message(sender, "delfriend-noOwner", region); return; } OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]); if(!region.getFriends().contains(friend.getUniqueId())) { - plugin.message(sender, "delfriend-notAdded", friend.getName()); + plugin.message(sender, "delfriend-notAdded", friend.getName(), region); return; } region.deleteFriend(friend.getUniqueId()); region.update(); - plugin.message(sender, "delfriend-successOther", friend.getName(), region.getName()); + plugin.message(sender, "delfriend-successOther", friend.getName(), region); } else { if(sender.hasPermission("areashop.delfriend") && sender instanceof Player) { if(region.isOwner((Player)sender)) { OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]); if(!region.getFriends().contains(friend.getUniqueId())) { - plugin.message(sender, "delfriend-notAdded", friend.getName()); + plugin.message(sender, "delfriend-notAdded", friend.getName(), region); return; } region.deleteFriend(friend.getUniqueId()); region.update(); - plugin.message(sender, "delfriend-success", friend.getName(), region.getName()); + plugin.message(sender, "delfriend-success", friend.getName(), region); } else { - plugin.message(sender, "delfriend-noPermissionOther"); + plugin.message(sender, "delfriend-noPermissionOther", region); } } else { - plugin.message(sender, "delfriend-noPermission"); + plugin.message(sender, "delfriend-noPermission", region); } } } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelsignCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelsignCommand.java index 629b43dd..c1b806f5 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelsignCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/DelsignCommand.java @@ -60,7 +60,7 @@ public void execute(CommandSender sender, String[] args) { plugin.message(sender, "delsign-noRegion"); return; } - plugin.message(sender, "delsign-success", region.getName()); + plugin.message(sender, "delsign-success", region); region.removeSign(block.getLocation()); region.update(); } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/FindCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/FindCommand.java index 5497bf54..a909f653 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/FindCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/FindCommand.java @@ -89,9 +89,9 @@ public void execute(CommandSender sender, String[] args) { onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]); } if(maxPriceSet) { - plugin.message(player, "find-successMax", "buy", region.getName(), Utils.formatCurrency(maxPrice), onlyInGroup); + plugin.message(player, "find-successMax", "buy", Utils.formatCurrency(maxPrice), onlyInGroup, region); } else { - plugin.message(player, "find-success", "buy", region.getName(), Utils.formatCurrency(balance), onlyInGroup); + plugin.message(player, "find-success", "buy", Utils.formatCurrency(balance), onlyInGroup, region); } region.teleportPlayer(player, region.getBooleanSetting("general.findTeleportToSign"), false); } else { @@ -123,9 +123,9 @@ public void execute(CommandSender sender, String[] args) { onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]); } if(maxPriceSet) { - plugin.message(player, "find-successMax", "rent", region.getName(), Utils.formatCurrency(maxPrice), onlyInGroup); + plugin.message(player, "find-successMax", "rent", Utils.formatCurrency(maxPrice), onlyInGroup, region); } else { - plugin.message(player, "find-success", "rent", region.getName(), Utils.formatCurrency(balance), onlyInGroup); + plugin.message(player, "find-success", "rent", Utils.formatCurrency(balance), onlyInGroup, region); } region.teleportPlayer(player, region.getBooleanSetting("general.findTeleportToSign"), false); } else { diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/GroupaddCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/GroupaddCommand.java index 26c29f07..2b7d3485 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/GroupaddCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/GroupaddCommand.java @@ -88,9 +88,9 @@ public void execute(CommandSender sender, String[] args) { } if(group.addMember(region)) { region.update(); - plugin.message(sender, "groupadd-success", region.getName(), group.getName(), group.getMembers().size()); + plugin.message(sender, "groupadd-success", group.getName(), group.getMembers().size(), region); } else { - plugin.message(sender, "groupadd-failed", region.getName(), group.getName()); + plugin.message(sender, "groupadd-failed", group.getName(), region); } } } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/GroupdelCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/GroupdelCommand.java index 7864c0ad..2437abdc 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/GroupdelCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/GroupdelCommand.java @@ -89,9 +89,9 @@ public void execute(CommandSender sender, String[] args) { } if(group.removeMember(region)) { region.update(); - plugin.message(sender, "groupdel-success", region.getName(), group.getName(), group.getMembers().size()); + plugin.message(sender, "groupdel-success", group.getName(), group.getMembers().size(), region); } else { - plugin.message(sender, "groupdel-failed", region.getName(), group.getName()); + plugin.message(sender, "groupdel-failed", group.getName(), region); } } } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/ResellCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/ResellCommand.java index 4592facd..5d232e4f 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/ResellCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/ResellCommand.java @@ -91,10 +91,10 @@ public void execute(CommandSender sender, String[] args) { buy.update(); plugin.message(sender, "resell-success", buy); } else { - plugin.message(sender, "resell-noPermissionOther"); + plugin.message(sender, "resell-noPermissionOther", buy); } } else { - plugin.message(sender, "resell-noPermission"); + plugin.message(sender, "resell-noPermission", buy); } } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SchematiceventCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SchematiceventCommand.java index b9f3f9d3..f1a2127b 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SchematiceventCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SchematiceventCommand.java @@ -62,12 +62,12 @@ public void execute(CommandSender sender, String[] args) { for(RegionEvent value : RegionEvent.values()) { values.add(value.getValue().toLowerCase()); } - plugin.message(sender, "schemevent-wrongEvent", args[2], Utils.createCommaSeparatedList(values)); + plugin.message(sender, "schemevent-wrongEvent", args[2], Utils.createCommaSeparatedList(values), region); return; } region.handleSchematicEvent(event); region.update(); - plugin.message(sender, "schemevent-success", args[2], region.getName()); + plugin.message(sender, "schemevent-success", args[2], region); } @Override diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SellCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SellCommand.java index 555c7654..ba5534f2 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SellCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SellCommand.java @@ -62,7 +62,7 @@ public void execute(CommandSender sender, String[] args) { return; } if(!buy.isSold()) { - plugin.message(sender, "sell-notBought"); + plugin.message(sender, "sell-notBought", buy); return; } buy.sell(true, sender); diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetdurationCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetdurationCommand.java index 2b1949a0..ecba082b 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetdurationCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetdurationCommand.java @@ -80,16 +80,16 @@ public void execute(CommandSender sender, String[] args) { try { Integer.parseInt(args[1]); } catch(NumberFormatException e) { - plugin.message(sender, "setduration-wrongAmount", args[1]); + plugin.message(sender, "setduration-wrongAmount", args[1], rent); return; } if(!Utils.checkTimeFormat(args[1]+" "+args[2])) { - plugin.message(sender, "setduration-wrongFormat", args[1]+" "+args[2]); + plugin.message(sender, "setduration-wrongFormat", args[1]+" "+args[2], rent); return; } rent.setDuration(args[1]+" "+args[2]); rent.update(); - plugin.message(sender, "setduration-success", rent.getName(), rent.getDurationString()); + plugin.message(sender, "setduration-success", rent); } @Override diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetlandlordCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetlandlordCommand.java index dc24849a..a6d0fbea 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetlandlordCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetlandlordCommand.java @@ -73,7 +73,7 @@ public void execute(CommandSender sender, String[] args) { } region.setLandlord(player.getUniqueId(), playerName); region.update(); - plugin.message(sender, "setlandlord-success", playerName, region.getName()); + plugin.message(sender, "setlandlord-success", playerName, region); } @Override diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetownerCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetownerCommand.java index 6a497ba1..e83a72af 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetownerCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetownerCommand.java @@ -71,11 +71,11 @@ public void execute(CommandSender sender, String[] args) { } if(region.isRentRegion() && !sender.hasPermission("areashop.setownerrent")) { - plugin.message(sender, "setowner-noPermissionRent"); + plugin.message(sender, "setowner-noPermissionRent", region); return; } if(region.isBuyRegion() && !sender.hasPermission("areashop.setownerbuy")) { - plugin.message(sender, "setowner-noPermissionBuy"); + plugin.message(sender, "setowner-noPermissionBuy", region); return; } @@ -86,7 +86,7 @@ public void execute(CommandSender sender, String[] args) { uuid = player.getUniqueId(); } if(uuid == null) { - plugin.message(sender, "setowner-noPlayer", args[1]); + plugin.message(sender, "setowner-noPlayer", args[1], region); return; } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetpriceCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetpriceCommand.java index 8ad48073..92813155 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetpriceCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetpriceCommand.java @@ -83,7 +83,7 @@ public void execute(CommandSender sender, String[] args) { try { price = Double.parseDouble(args[1]); } catch(NumberFormatException e) { - plugin.message(sender, "setprice-wrongPrice", args[1]); + plugin.message(sender, "setprice-wrongPrice", args[1], region); return; } if(region.isRentRegion()) { diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetrestoreCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetrestoreCommand.java index 609deecc..aeaa668f 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetrestoreCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetrestoreCommand.java @@ -54,9 +54,9 @@ public void execute(CommandSender sender, String[] args) { } if(args.length > 3) { region.setSchematicProfile(args[3]); - plugin.message(sender, "setrestore-successProfile", region.getName(), valueString, args[3]); + plugin.message(sender, "setrestore-successProfile", valueString, args[3], region); } else { - plugin.message(sender, "setrestore-success", region.getName(), valueString); + plugin.message(sender, "setrestore-success", valueString, region); } region.update(); } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetteleportCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetteleportCommand.java index 3698a2f6..1519b859 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetteleportCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/SetteleportCommand.java @@ -73,10 +73,10 @@ public void execute(CommandSender sender, String[] args) { owner = player.getUniqueId().equals(((BuyRegion)region).getBuyer()); } if(!player.hasPermission("areashop.setteleport")) { - plugin.message(player, "setteleport-noPermission"); + plugin.message(player, "setteleport-noPermission", region); return; } else if(!owner && !player.hasPermission("areashop.setteleportall")) { - plugin.message(player, "setteleport-noPermissionOther"); + plugin.message(player, "setteleport-noPermissionOther", region); return; } @@ -84,16 +84,16 @@ public void execute(CommandSender sender, String[] args) { if(args.length > 2 && args[2] != null && (args[2].equalsIgnoreCase("reset") || args[2].equalsIgnoreCase("yes") || args[2].equalsIgnoreCase("true"))) { region.setTeleport(null); region.update(); - plugin.message(player, "setteleport-reset", region.getName()); + plugin.message(player, "setteleport-reset", region); return; } if(!player.hasPermission("areashop.setteleportoutsideregion") && (wgRegion == null || !wgRegion.contains(player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()))) { - plugin.message(player, "setteleport-notInside", region.getName()); + plugin.message(player, "setteleport-notInside", region); return; } region.setTeleport(player.getLocation()); region.update(); - plugin.message(player, "setteleport-success", region.getName()); + plugin.message(player, "setteleport-success", region); } @Override diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/StopresellCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/StopresellCommand.java index d5f86410..866a6aad 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/StopresellCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/StopresellCommand.java @@ -80,10 +80,10 @@ public void execute(CommandSender sender, String[] args) { buy.update(); plugin.message(sender, "stopresell-success", buy); } else { - plugin.message(sender, "stopresell-noPermissionOther"); + plugin.message(sender, "stopresell-noPermissionOther", buy); } } else { - plugin.message(sender, "stopresell-noPermission"); + plugin.message(sender, "stopresell-noPermission", buy); } } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/UnrentCommand.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/UnrentCommand.java index cc699e49..86c7dcd4 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/UnrentCommand.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/commands/UnrentCommand.java @@ -62,7 +62,7 @@ public void execute(CommandSender sender, String[] args) { return; } if(!rent.isRented()) { - plugin.message(sender, "unrent-notRented"); + plugin.message(sender, "unrent-notRented", rent); return; } rent.unRent(true, sender); diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/listeners/SignBreakListener.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/listeners/SignBreakListener.java index 26d3cefb..54bb05ea 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/listeners/SignBreakListener.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/listeners/SignBreakListener.java @@ -47,10 +47,10 @@ public void onSignBreak(BlockBreakEvent event) { // Remove the sign of the rental region if the player has permission if(event.getPlayer().hasPermission("areashop.delsign")) { region.removeSign(block.getLocation()); - plugin.message(event.getPlayer(), "delsign-success", region.getName()); + plugin.message(event.getPlayer(), "delsign-success", region); } else { // Cancel the breaking of the sign event.setCancelled(true); - plugin.message(event.getPlayer(), "delsign-noPermission"); + plugin.message(event.getPlayer(), "delsign-noPermission", region); } } } diff --git a/AreaShop/src/main/java/nl/evolutioncoding/areashop/listeners/SignChangeListener.java b/AreaShop/src/main/java/nl/evolutioncoding/areashop/listeners/SignChangeListener.java index cd2a10ce..64692906 100644 --- a/AreaShop/src/main/java/nl/evolutioncoding/areashop/listeners/SignChangeListener.java +++ b/AreaShop/src/main/java/nl/evolutioncoding/areashop/listeners/SignChangeListener.java @@ -309,7 +309,7 @@ public void run() { plugin.message(player, "addsign-success", region); } else { region.addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), thirdLine); - plugin.message(player, "addsign-successProfile", region, thirdLine); + plugin.message(player, "addsign-successProfile", thirdLine, region); } // Update the region later because this event will do it first diff --git a/AreaShop/src/main/resources/config.yml b/AreaShop/src/main/resources/config.yml index 9d90cb5a..9e2bb7d2 100644 --- a/AreaShop/src/main/resources/config.yml +++ b/AreaShop/src/main/resources/config.yml @@ -90,6 +90,8 @@ limitGroups: ## %uuid% The UUID of the player that rents/buys the region. ## %friends% The names of friends added to this region separated by ', '. ## %friendsuuid% The UUID's of friends added to this region separated by ', '. +## $landlord$ The name of the landlord. +## %landlorduuid% The UUID of the landlord. ## %price% The price of the region formatted with the configured characters before and after the number. ## %rawprice% The price without formatting, like '10.0' or '7.77'. ## %duration% The duration of a rent region, for example '1 d', '4 minutes' or '2 years'. diff --git a/AreaShop/src/main/resources/lang/EN.yml b/AreaShop/src/main/resources/lang/EN.yml index 721ee832..1f02d2ad 100644 --- a/AreaShop/src/main/resources/lang/EN.yml +++ b/AreaShop/src/main/resources/lang/EN.yml @@ -93,14 +93,14 @@ buy-help: "/as buy [regionname], the region you stand in will be used if not spe buy-noPermission: "You don't have permission to buy a region." buy-noPermissionResell: "You don't have permission to buy a region in resell mode." buy-noPermissionNoResell: "You don't have permission to buy a region that is not in resell mode." -buy-notBuyable: "That region is not available for buying." +buy-notBuyable: "Region %region% is not available for buying." buy-maximum: "You can't buy more than %0% region(s) (you already have %1% in group '%2%')." buy-payError: "Something went wrong with paying, try again later." buy-succes: "You successfully bought %region%." buy-successResale: "You successfully bought %region% from %0%." buy-successSeller: "Your region %region% has been sold to %player% for %0%." buy-lowMoney: "You don't have enough money to buy this region (you have %0% and you need %price%)." -buy-lowMoneyResell: "You don't have enough money to buy this region (you have %0% and you need %resellprice%)." +buy-lowMoneyResell: "You don't have enugh money to buy this region (you have %0% and you need %resellprice%)." buy-yours: "You already own this region." buy-someoneElse: "Someone else already bought this region." buy-restrictedToWorld: "You need to be in the '%world%' world to buy this region (you are in '%0%')." @@ -194,8 +194,8 @@ setrestore-help: "/as setrestore [profile]." setrestore-noPermission: "You don't have permission to change the restore settings." setrestore-notRegistered: "The specified region is not registered: %0%." setrestore-invalidSetting: "'%0%' is not a valid state, should be true, false or general." -setrestore-success: "Successfully set the restore setting of %0% to '%1%'." -setrestore-successProfile: "Successfully set the restore setting of %0% to '%1%' and the profile to '%2%'." +setrestore-success: "Successfully set the restore setting of %region% to '%0%'." +setrestore-successProfile: "Successfully set the restore setting of %region% to '%0%' and the profile to '%1%'." setprice-noPermission: "You don't have permission to change the price of a region." setprice-help: "/as setprice [region], the region you stand in will be used if not specified." @@ -211,7 +211,7 @@ setduration-help: "/as setduration [region], the region yo setduration-notRegistered: "%0% is not registered for renting." setduration-wrongAmount: "'%0%' is not a valid amount, use a whole number." setduration-wrongFormat: "'%0%' is not a proper timeformat, check the documentation on Bukkit." -setduration-success: "Duration of region %0% changed to '%1%'." +setduration-success: "Duration of region %region% changed to '%duration%'." setduration-noLandlord: "You don't have permission to change the duration because you are not the landlord of %region%." setduration-successRemoved: "Duration of %region% has been removed, it will now use the duration from a group or the default.yml file, new duration: %duration%." @@ -233,8 +233,8 @@ setup-noPermission: "You cannot add the region '%0%', you are not an owner/membe destroy-noPermissionRent: "You don't have permission for deregistering a rental region." destroy-noPermissionBuy: "You don't have permission for deregistering a buy region." -destroy-successRent: "%0% successfully deregistered as rental region." -destroy-successBuy: "%0% successfully deregistered as buy region." +destroy-successRent: "%region% successfully deregistered as rental region." +destroy-successBuy: "%region% successfully deregistered as buy region." teleport-help: "/as tp [sign]." teleport-noRentOrBuy: "The specified region is not registered: %0%." @@ -255,14 +255,14 @@ setteleport-help: "/as settp [region] [reset], the region you stand in will be u setteleport-noPermission: "You don't have permission to set the teleport location." setteleport-noPermissionOther: "You don't have permission to set the teleport location for a region you do not own." setteleport-noRentOrBuy: "The specified region is not registered: %0%." -setteleport-success: "Teleport location of %0% set." +setteleport-success: "Teleport location of %region% set." setteleport-notInside: "The location has to be inside the region." -setteleport-reset: "Teleport location of %0% has been reset." +setteleport-reset: "Teleport location of %region% has been reset." find-help: "/as find [maxprice] [group]." find-noPermission: "You don't have permission to search regions and teleport to them." -find-success: "Found a %0% region: %1%, while searching with a max price of your balance: %2%%3%." -find-successMax: "Found a %0% region: %1%, while searching with a max price of %2%%3%." +find-success: "Found a %0% region: %region%, while searching with a max price of your balance: %1%%2%." +find-successMax: "Found a %0% region: %region%, while searching with a max price of %1%%2%." find-wrongMaxPrice: "The specified maximum price is not a correct number: %0%." find-wrongGroup: "The specified group does not exist: %0%." find-noneFound: "No %0% region found while searching with a max price of your balance: %1%%2%." @@ -272,16 +272,16 @@ find-onlyInGroup: ", only searched for regions in group: %0%." groupadd-help: "/as groupadd [region], if no region specified all regions from your WorldEdit selection are used." groupadd-noPermission: "You don't have permission to add regions to groups." groupadd-noRegion: "The specified region is not registered: %0%." -groupadd-success: "Region %0% has been added to group '%1%', this group now has %2% member(s)." -groupadd-failed: "Region %0% is already a member of group '%1%'." +groupadd-success: "Region %region% has been added to group '%0%', this group now has %1% member(s)." +groupadd-failed: "Region %region% is already a member of group '%0%'." groupadd-weSuccess: "Added to group %0%: &7%1%." groupadd-weFailed: "Were already in group %0%: &7%1%." groupdel-help: "/as groupdel [region], if no region specified all regions from your WorldEdit selection are used." groupdel-noPermission: "You don't have permission to remove regions from groups." groupdel-noRegion: "The specified region is not registered: %0%." -groupdel-success: "Region %0% has been removed from group '%1%', this group now has %2% member(s)." -groupdel-failed: "Region %0% is not a member of group '%1%'." +groupdel-success: "Region %region% has been removed from group '%0%', this group now has %1% member(s)." +groupdel-failed: "Region %region% is not a member of group '%0%'." groupdel-weSuccess: "Removed from group %0%: &7%1%." groupdel-weFailed: "Were not in group %0% anyway: &7%1%." @@ -298,7 +298,7 @@ groupinfo-noMembers: "Group %0% does not have any members." schemevent-help: "/as schemevent ." schemevent-noRegion: "The specified region is not registered: %0%." schemevent-wrongEvent: "The specified event '%0%' does not exist, use one of the following: &7%1%." -schemevent-success: "Event '%0%' has successfully been triggered for region %1%." +schemevent-success: "Event '%0%' has successfully been triggered for region %region%." schemevent-noPermission: "You don't have permission to trigger schematic events." add-help: "/as add [region] [world]." @@ -326,13 +326,13 @@ addsign-couldNotDetectSign: "Found multiple regions around the sign, specify reg addsign-wrongProfile: "The specified profile does not exist, use one of the following (check config): &7%0%." addsign-success: "The sign has been added to %region%." addsign-successProfile: "The sign has been added to %region% with profile %0%." -addsign-alreadyRegistered: "That sign is already registered for region %0%." +addsign-alreadyRegistered: "That sign is already registered for region %region%." addsign-noPermission: "You don't have permission to add a sign." delsign-noSign: "You are not looking at a sign." delsign-noPermission: "You don't have permission to delete a sign." delsign-noRegion: "That sign does not belong to an AreaShop region." -delsign-success: "The sign has been removed from region %0%." +delsign-success: "The sign has been removed from region %region%." me-noPermission: "You don't have permission to check which regions you have." me-notAPlayer: "You are not a player so you can't have any regions." @@ -376,18 +376,18 @@ stopresell-noPermissionOther: "You don't have permission to set regions back to addfriend-help: "/as addfriend [region], the region you stand in will be used if not specified." addfriend-noPermissionOther: "You don't have permission to add friends to regions that are not yours." addfriend-noPermission: "You don't have permission to add friends to your region." -addfriend-successOther: "%0% has been added as friend to region %1%." -addfriend-success: "%0% has been added as friend to your region %1%." +addfriend-successOther: "%0% has been added as friend to region %region%." +addfriend-success: "%0% has been added as friend to your region %region%." addfriend-alreadyAdded: "%0% is already added as friend for this region." addfriend-self: "Adding the owner of the region as friend would be pointless." addfriend-noOwner: "You cannot add friends to a region without owner." -addfriend-notVisited: "You cannot add %0% because he did not visit the server yet" +addfriend-notVisited: "You cannot add %0% because he did not visit the server yet." delfriend-help: "/as delfriend [region], the region you stand in will be used if not specified." delfriend-noPermissionOther: "You don't have permission to delete friends from regions that are not yours." delfriend-noPermission: "You don't have permission to delete friends from your region." -delfriend-successOther: "%0% has been deleted as friend from region %1%." -delfriend-success: "%0% has been deleted as friend from your region %1%." +delfriend-successOther: "%0% has been deleted as friend from region %region%." +delfriend-success: "%0% has been deleted as friend from your region %region%." delfriend-notAdded: "%0% is not added as friend for this region." delfriend-noOwner: "You cannot remove friends from a region without owner." @@ -416,9 +416,8 @@ stack-unclearDirection: "Please look clearly in the north, east, south or west d setlandlord-help: "/as setlandlord [region], the region you stand in will be used if not specified." setlandlord-noPermission: "You don't have permission to set the landlord for a region." -setlandlord-didNotPlayBefore: "&7Note: '%0%' did not play on the server yet, are you using the correct player?" setlandlord-noRegion: "The specified region is not registered: %0%." -setlandlord-success: "%0% has successfully been set as landlord of %1%." +setlandlord-success: "%landlord% has successfully been set as landlord of %region%." timeleft-years: "%0% years" timeleft-months: "%0% months"