Compare commits

...
40 Commits
Author SHA1 Message Date
Thijs Wiefferink 8d132c66c4 Prepare for the v2.2.1 release
- Update version number
- Update language files from Transifex
2015-10-17 21:03:30 +02:00
Thijs Wiefferink 50e3e59543 Fix indentation and error message of WorldEdit 6 integration handler 2015-10-15 12:13:15 +02:00
Thijs Wiefferink eb21b9567e Change signtags from [arent] and [abuy] to [asrent] and [asbuy]
Changes #45
2015-10-08 22:49:41 +02:00
Thijs Wiefferink 4dba305f6d Change the default sign tags to something more specific
Note: Change documentation pages to include this.

Fixes #45
2015-10-06 22:41:59 +02:00
Thijs Wiefferink 7481d8287f Retrieve money from landlords when unrenting/selling a region.
Prevents exploits by giving money to landlords, and then
unrenting/selling to get money back from 'the server' (nobody). Now it
will get the money back from the landlord, or if that is not possible
then not give anything back.

Fixes #75
2015-10-06 22:15:09 +02:00
Thijs Wiefferink 4d41decbe5 Config part of week indicators 2015-10-03 21:14:24 +02:00
Thijs Wiefferink 7fc5a5af81 Add weeks time indicators, clean other indicators
The old Dutch time indicators have been removed from the lists, this
might cause problems for people if they regenerate their config but
don't add these tags again.

Added console warnings at startup to indicate incorrect duration
strings.

Fixes #32
2015-10-03 21:12:38 +02:00
Thijs Wiefferink d26fa99b95 Fix using the seconds modifier with /as setduration
AreaShop could correctly read and use all seconds modifiers that are
defined in the config, but the `/as setduration` command would not
accept it as input.

Fixes #82
2015-10-03 20:38:38 +02:00
Thijs Wiefferink 39d755d2db Make removing regions from AreaShop less destructible for region flags
First AreaShop would reset all flags, now it will only reset the
greeting and farewell flags. This is to make sure players do not get
confused about the region, if the greeting is still there then players
might think it is still connected to AreaShop.

Fixes #72
2015-10-03 20:27:19 +02:00
Thijs Wiefferink 48ab46ecf7 Fix indirect breaking of signs causing it to disconnect
If you would break a block behind/below a sign AreaShop would disconnect
it from the region, which is most of the times not the wanted behaviour.
This commit changes it to simply leave a floating sign there, so that it
is still visible and not disconnected from the region.

Fixes #15
2015-10-03 20:10:44 +02:00
Thijs Wiefferink b3fa31e1cc Remove debug message 2015-10-02 20:44:25 +02:00
Thijs Wiefferink 783085fbf7 Cache region variable replacements 2015-10-02 20:41:00 +02:00
Thijs Wiefferink aa093b0c8a Fix sign clicking still executing while event is cancelled. 2015-09-26 01:06:22 +02:00
Thijs Wiefferink 9c357fe929 Remove lastActive from region file when unrented/sold
No problems if it is there, but just keeping the region file clean.
2015-09-11 22:44:12 +02:00
Thijs Wiefferink 4d70571a23 Improve failed file loading
- Detects incorrectly loaded config.yml and default.yml
(YamlConfiguration prints errors to console and continues silently,
returning an empty configuration if something is wrong normally)
- Will go into error state when loading fails
- Improved some error handling to make sure that no extra errors are
thrown because of trying to close non-existing streams.
2015-09-10 21:58:57 +02:00
Thijs Wiefferink 29a4105ece Add Vault to the repo to make it easier to compile 2015-09-06 17:05:38 +02:00
Thijs Wiefferink edc7136063 Fix '/as info' always showing landlord line
It would always show the landlord line, if there was no actual landlord
it would show '<UNKNOWN>' as name, which is very confusing.

Fixes #46
2015-09-06 16:42:16 +02:00
Thijs Wiefferink 6fabc75be4 Fix '/as info' trying to filter by group too much
'/as info region' would also try to filter by group using the region
name, which would almost always cause an error message (group not found)
2015-09-06 16:38:23 +02:00
Thijs Wiefferink 085507bf8b Add required dependencies section 2015-08-30 00:10:12 +02:00
Thijs Wiefferink 73ed3366ae Update README.md 2015-08-29 22:27:14 +02:00
Thijs Wiefferink 9ca029176d Fix '/as find' not getting your balance correctly
- If you search with your balance (and do not give a maxprice) it would
always use 0.0 as your balance, therefore not finding any regions.
- Also fixes the incorrect feedback, it would say it searched with a
maxprice instead of your balance and the other way around if no regions
are found.
- Fixed maxprice and balance display to use correct currency symbols and
layouts (decimals, metric prefixes, separator).

Fixes #59
2015-08-29 20:06:16 +02:00
Thijs Wiefferink bf181d69d7 Update README.md 2015-08-29 19:46:05 +02:00
Thijs Wiefferink 68c57515da Update README.md 2015-08-29 19:44:54 +02:00
Thijs Wiefferink 903d6c309f Update README.md 2015-08-29 19:44:39 +02:00
Thijs Wiefferink 0a02eb3254 Update README.md 2015-08-29 19:42:57 +02:00
Thijs Wiefferink bf04589fab Merge links to issues with the top menu 2015-08-29 19:42:11 +02:00
Thijs Wiefferink 14dd094803 Update README.md 2015-08-27 22:51:49 +02:00
Thijs Wiefferink 02df35304c Update README.md 2015-08-27 22:48:11 +02:00
Thijs Wiefferink 4321667ec5 Merge branch 'master' of https://github.com/NLthijs48/AreaShop 2015-08-26 20:05:03 +02:00
Thijs Wiefferink 5cf5df78c8 Add permissions to prevent buying resell regions
- Permission 'areashop.buynormal' can be negated to only allow buying
regions that are in resell mode
- Permission 'areashop.buyresell' can be negated to only allow buying
regions that are not in resell mode

This change does not affect existing permissions setups (above
permissions are true by default)
2015-08-26 20:04:50 +02:00
Thijs Wiefferink 8608d6ce1d Update README.md 2015-08-25 17:40:08 +02:00
Thijs Wiefferink 614336862e Update README.md 2015-08-25 17:38:02 +02:00
Thijs Wiefferink a4ea175f1b Update README.md 2015-08-25 17:33:52 +02:00
Thijs Wiefferink c96043aa38 Update README.md 2015-08-25 17:30:11 +02:00
Thijs Wiefferink d5a29f6c32 Update README.MD: WIP frontpage
Frontpage like the BukkitDev and Spigot Resources section.
2015-08-25 17:29:21 +02:00
Thijs Wiefferink 5176a1c2c5 Update README.md 2015-08-21 21:45:42 +02:00
Thijs Wiefferink 89569ea182 Update README.md 2015-08-17 23:11:46 +02:00
Thijs Wiefferink f349657a59 Fix bug with teleporting to signs
Fixes #47
2015-08-13 22:04:22 +02:00
Thijs Wiefferink 40d3d4d8af Add group filtering to /as info <rented|forrent|sold|forsale>
- Filter regions by group for the mentioned subcommands of /as info
- Clean/refactor code
- Sort the output
- Add Comparable, equals() and toString() to GeneralRegion

Closes #44
2015-08-11 22:41:30 +02:00
Thijs Wiefferink 0d5db8fa4e Add option to deny extending when over rent/total limits
Turned on by default, added config setting
'allowRegionExtendsWhenAboveLimits' to disable this change. Normally
this is expected behaviour, which pushes users to let the region run out
if they should not be able to rent it anymore (was impossible to do
before).

Closes #41
2015-08-10 21:43:29 +02:00
27 changed files with 652 additions and 679 deletions

No files matched your search

+3 -3
View File
@@ -5,7 +5,7 @@
<artifactId>areashop</artifactId>
<packaging>jar</packaging>
<name>AreaShop</name>
<version>2.2.0</version> <!-- Main plugin version -->
<version>2.2.1</version> <!-- Main plugin version -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -90,7 +90,7 @@
<artifactId>vault</artifactId>
<version>1.4.1</version>
<scope>system</scope>
<systemPath>${basedir}/../Dependencies/Vault.jar</systemPath>
<systemPath>${basedir}/../dependencies/Vault.jar</systemPath>
</dependency>
</dependencies>
@@ -139,7 +139,7 @@
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<copy file="./target/${project.build.finalName}.jar" tofile="C:\Games\Minecraft\Spigot 1.8.7\plugins\${project.build.finalName}.jar"/>
<copy file="./target/${project.build.finalName}.jar" tofile="C:\Games\Minecraft\Spigot\plugins\${project.build.finalName}.jar"/>
</tasks>
</configuration>
<executions>
@@ -191,7 +191,7 @@ public final class AreaShop extends JavaPlugin implements AreaShopInterface {
// Load all data from files and check versions
fileManager = new FileManager(this);
error = error & !fileManager.loadFiles();
error = error | !fileManager.loadFiles();
// Print loaded version of WG and WE in debug
if(wgVersion != null) {
@@ -688,9 +688,11 @@ public final class AreaShop extends JavaPlugin implements AreaShopInterface {
/* Check if the suffix is one of these values */
String suffix = time.substring(time.indexOf(' ')+1, time.length());
ArrayList<String> identifiers = new ArrayList<String>();
identifiers.addAll(this.getConfig().getStringList("seconds"));
identifiers.addAll(this.getConfig().getStringList("minutes"));
identifiers.addAll(this.getConfig().getStringList("hours"));
identifiers.addAll(this.getConfig().getStringList("days"));
identifiers.addAll(this.getConfig().getStringList("weeks"));
identifiers.addAll(this.getConfig().getStringList("months"));
identifiers.addAll(this.getConfig().getStringList("years"));
if(!identifiers.contains(suffix)) {
@@ -722,6 +724,7 @@ public final class AreaShop extends JavaPlugin implements AreaShopInterface {
ArrayList<String> minutes = new ArrayList<String>(this.getConfig().getStringList("minutes"));
ArrayList<String> hours = new ArrayList<String>(this.getConfig().getStringList("hours"));
ArrayList<String> days = new ArrayList<String>(this.getConfig().getStringList("days"));
ArrayList<String> weeks = new ArrayList<String>(this.getConfig().getStringList("weeks"));
ArrayList<String> months = new ArrayList<String>(this.getConfig().getStringList("months"));
ArrayList<String> years = new ArrayList<String>(this.getConfig().getStringList("years"));
@@ -739,6 +742,8 @@ public final class AreaShop extends JavaPlugin implements AreaShopInterface {
calendar.add(Calendar.HOUR, durationInt);
} else if(days.contains(durationString)) {
calendar.add(Calendar.DAY_OF_MONTH, durationInt);
} else if(weeks.contains(durationString)) {
calendar.add(Calendar.DAY_OF_MONTH, durationInt*7);
} else if(months.contains(durationString)) {
calendar.add(Calendar.MONTH, durationInt);
} else if(years.contains(durationString)) {
@@ -237,7 +237,6 @@ public class Utils {
}
public static List<GeneralRegion> getApplicableASRegions(Location location, RegionType type) {
List<GeneralRegion> result = new ArrayList<GeneralRegion>();
// TODO move to version specific classes
Set<ProtectedRegion> regions = AreaShop.getInstance().getWorldGuardHandler().getApplicableRegionsSet(location);
if(regions != null) {
List<GeneralRegion> candidates = new ArrayList<GeneralRegion>();
@@ -175,7 +175,7 @@ public class AddCommand extends CommandAreaShop {
plugin.getFileManager().addBuy(buy);
buy.handleSchematicEvent(RegionEvent.CREATED);
// Set the flags for the region
buy.updateRegionFlags();
buy.updateRegionFlags();
// Run commands
buy.runEventCommands(RegionEvent.CREATED, false);
}
@@ -1,7 +1,5 @@
package nl.evolutioncoding.areashop.commands;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
@@ -51,7 +49,7 @@ public class FindCommand extends CommandAreaShop {
Player player = (Player)sender;
double balance = 0.0;
if(plugin.getEconomy() != null) {
plugin.getEconomy().getBalance(player);
balance = plugin.getEconomy().getBalance(player);
}
double maxPrice = 0;
boolean maxPriceSet = false;
@@ -65,7 +63,7 @@ public class FindCommand extends CommandAreaShop {
plugin.message(sender, "find-wrongMaxPrice", args[2]);
return;
}
}
}
// Parse optional group argument
if(args.length >= 4) {
group = plugin.getFileManager().getGroup(args[3]);
@@ -87,32 +85,25 @@ public class FindCommand extends CommandAreaShop {
if(!results.isEmpty()) {
// Draw a random one
BuyRegion region = results.get(new Random().nextInt(results.size()));
BigDecimal bigDecimal = new BigDecimal(balance);
bigDecimal = bigDecimal.setScale(2, RoundingMode.HALF_UP);
balance = bigDecimal.doubleValue();
String onlyInGroup = "";
if(group != null) {
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-successMax", "buy", region.getName(), maxPrice, onlyInGroup);
plugin.message(player, "find-successMax", "buy", region.getName(), plugin.formatCurrency(maxPrice), onlyInGroup);
} else {
plugin.message(player, "find-success", "buy", region.getName(), balance, onlyInGroup);
plugin.message(player, "find-success", "buy", region.getName(), plugin.formatCurrency(balance), onlyInGroup);
}
region.teleportPlayer(player, region.getBooleanSetting("general.findTeleportToSign"), false);
} else {
BigDecimal bigDecimal = new BigDecimal(balance);
bigDecimal = bigDecimal.setScale(2, RoundingMode.HALF_UP);
balance = bigDecimal.doubleValue();
String onlyInGroup = "";
if(group != null) {
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-noneFound", "buy", maxPrice, onlyInGroup);
plugin.message(player, "find-noneFoundMax", "buy", plugin.formatCurrency(maxPrice), onlyInGroup);
} else {
plugin.message(player, "find-noneFoundMax", "buy", balance, onlyInGroup);
plugin.message(player, "find-noneFound", "buy", plugin.formatCurrency(balance), onlyInGroup);
}
}
} else {
@@ -128,32 +119,25 @@ public class FindCommand extends CommandAreaShop {
if(!results.isEmpty()) {
// Draw a random one
RentRegion region = results.get(new Random().nextInt(results.size()));
BigDecimal bigDecimal = new BigDecimal(balance);
bigDecimal = bigDecimal.setScale(2, RoundingMode.HALF_UP);
balance = bigDecimal.doubleValue();
String onlyInGroup = "";
if(group != null) {
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-successMax", "rent", region.getName(), maxPrice, onlyInGroup);
plugin.message(player, "find-successMax", "rent", region.getName(), plugin.formatCurrency(maxPrice), onlyInGroup);
} else {
plugin.message(player, "find-success", "rent", region.getName(), balance, onlyInGroup);
plugin.message(player, "find-success", "rent", region.getName(), plugin.formatCurrency(balance), onlyInGroup);
}
region.teleportPlayer(player, region.getBooleanSetting("general.findTeleportToSign"), false);
} else {
BigDecimal bigDecimal = new BigDecimal(balance);
bigDecimal = bigDecimal.setScale(2, RoundingMode.HALF_UP);
balance = bigDecimal.doubleValue();
String onlyInGroup = "";
if(group != null) {
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-noneFound", "rent", maxPrice, onlyInGroup);
plugin.message(player, "find-noneFoundMax", "rent", plugin.formatCurrency(maxPrice), onlyInGroup);
} else {
plugin.message(player, "find-noneFoundMax", "rent", balance, onlyInGroup);
plugin.message(player, "find-noneFound", "rent", plugin.formatCurrency(balance), onlyInGroup);
}
}
}
@@ -3,8 +3,11 @@ package nl.evolutioncoding.areashop.commands;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
@@ -13,6 +16,7 @@ import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RegionGroup;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.command.Command;
@@ -38,6 +42,31 @@ public class InfoCommand extends CommandAreaShop {
return null;
}
/**
* Filter group of regions, join their names and printout the correct message
* @param sender The CommandSender to receive the message
* @param regions The regions
* @param filterGroup The group to filter to the regions with
* @param keySomeFound The key of the message to display when some regions are found
* @param keyNoneFound The key of the message to display when no regions are found
*/
public void displayMessage(CommandSender sender, Set<? extends GeneralRegion> regions, RegionGroup filterGroup, String keySomeFound, String keyNoneFound) {
if(filterGroup != null) {
Iterator<? extends GeneralRegion> it = regions.iterator();
while(it.hasNext()) {
GeneralRegion region = it.next();
if(!filterGroup.isMember(region)) {
it.remove();
}
}
}
if(regions.isEmpty()) {
plugin.message(sender, keyNoneFound);
} else {
plugin.message(sender, keySomeFound, StringUtils.join(regions.iterator(), ", "));
}
}
@Override
public void execute(CommandSender sender, Command command, String[] args) {
if(!sender.hasPermission("areashop.info")) {
@@ -45,166 +74,90 @@ public class InfoCommand extends CommandAreaShop {
return;
}
if(args.length > 1 && args[1] != null) {
/* List of all regions */
if(args[1].equalsIgnoreCase("all")) {
String message = "";
/* Message for rents */
Iterator<RentRegion> itRent = plugin.getFileManager().getRents().iterator();
if(itRent.hasNext()) {
message = itRent.next().getName();
while(itRent.hasNext()) {
message += ", " + itRent.next().getName();
}
}
if(message.equals("")) {
plugin.message(sender, "info-all-noRents");
} else {
plugin.message(sender, "info-all-rents", message);
}
/* Message for buys */
message = "";
Iterator<BuyRegion> itBuy = plugin.getFileManager().getBuys().iterator();
if(itBuy.hasNext()) {
message = itBuy.next().getName();
while(itBuy.hasNext()) {
message += ", " + itBuy.next().getName();
}
}
if(message.equals("")) {
plugin.message(sender, "info-all-noBuys");
} else {
plugin.message(sender, "info-all-buys", message);
// Get filter group (only used by some commands)
RegionGroup filterGroup = null;
Set<String> groupFilters = new HashSet<String>(Arrays.asList("all", "rented", "forrent", "sold", "forsale"));
if(groupFilters.contains(args[0].toLowerCase())) {
filterGroup = plugin.getFileManager().getGroup(args[2]);
if(filterGroup == null) {
plugin.message(sender, "info-noFiltergroup", args[2]);
return;
}
}
/* List of rented regions */
// All regions
if(args[1].equalsIgnoreCase("all")) {
Set<GeneralRegion> regions = new TreeSet<GeneralRegion>(plugin.getFileManager().getRents());
displayMessage(sender, regions, filterGroup, "info-all-rents", "info-all-noRents");
regions = new TreeSet<GeneralRegion>(plugin.getFileManager().getBuys());
displayMessage(sender, regions, filterGroup, "info-all-buys", "info-all-noBuys");
}
// Rented regions
else if(args[1].equalsIgnoreCase("rented")) {
String message = "";
Iterator<RentRegion> it = plugin.getFileManager().getRents().iterator();
boolean first = true;
while(it.hasNext()) {
RentRegion next = it.next();
if(next.isRented()) {
if(!first) {
message += ", " + next.getName();
} else {
first = false;
message += next.getName();
}
Set<GeneralRegion> regions = new TreeSet<GeneralRegion>();
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isRented()) {
regions.add(region);
}
}
if(message.equals("")) {
plugin.message(sender, "info-noRented");
} else {
plugin.message(sender, "info-rented", message);
}
displayMessage(sender, regions, filterGroup, "info-rented", "info-noRented");
}
/* List of unrented regions */
// Forrent regions
else if(args[1].equalsIgnoreCase("forrent")) {
String message = "";
Iterator<RentRegion> it = plugin.getFileManager().getRents().iterator();
boolean first = true;
while(it.hasNext()) {
RentRegion next = it.next();
if(!next.isRented()) {
if(!first) {
message += ", " + next.getName();
} else {
first = false;
message = next.getName();
}
Set<GeneralRegion> regions = new TreeSet<GeneralRegion>();
for(RentRegion region : plugin.getFileManager().getRents()) {
if(!region.isRented()) {
regions.add(region);
}
}
if(message.equals("")) {
plugin.message(sender, "info-noUnrented");
} else {
plugin.message(sender, "info-unrented", message);
}
} else if(args[1].equalsIgnoreCase("sold")) {
String message = "";
Iterator<BuyRegion> it = plugin.getFileManager().getBuys().iterator();
boolean first = true;
while(it.hasNext()) {
BuyRegion next = it.next();
if(next.isSold()) {
if(!first) {
message += ", ";
} else {
first = false;
}
message += next.getName();
displayMessage(sender, regions, filterGroup, "info-unrented", "info-noUnrented");
}
// Sold regions
else if(args[1].equalsIgnoreCase("sold")) {
Set<GeneralRegion> regions = new TreeSet<GeneralRegion>();
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold()) {
regions.add(region);
}
}
if(message.equals("")) {
plugin.message(sender, "info-noSold");
} else {
plugin.message(sender, "info-sold", message);
}
} else if(args[1].equalsIgnoreCase("forsale")) {
String message = "";
Iterator<BuyRegion> it = plugin.getFileManager().getBuys().iterator();
boolean first = true;
while(it.hasNext()) {
BuyRegion next =it.next();
if(!next.isSold()) {
if(!first) {
message += ", " + next.getName();
} else {
first = false;
message = next.getName();
}
displayMessage(sender, regions, filterGroup, "info-sold", "info-noSold");
}
// Forsale regions
else if(args[1].equalsIgnoreCase("forsale")) {
Set<GeneralRegion> regions = new TreeSet<GeneralRegion>();
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(!region.isSold()) {
regions.add(region);
}
}
if(message.equals("")) {
plugin.message(sender, "info-noForsale");
} else {
plugin.message(sender, "info-forsale", message);
}
} else if(args[1].equalsIgnoreCase("player")) {
displayMessage(sender, regions, filterGroup, "info-forsale", "info-noForsale");
}
// Player regions
else if(args[1].equalsIgnoreCase("player")) {
if(args.length > 2 && args[2] != null) {
String message = "";
Iterator<RentRegion> itRent = plugin.getFileManager().getRents().iterator();
boolean first = true;
while(itRent.hasNext()) {
RentRegion next = itRent.next();
if(next.isRented() && next.getPlayerName().equalsIgnoreCase(args[2])) {
if(!first) {
message += ", " + next.getName();
} else {
first = false;
message = next.getName();
}
Set<GeneralRegion> regions = new TreeSet<GeneralRegion>();
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isRented() && region.getPlayerName().equalsIgnoreCase(args[2])) {
regions.add(region);
}
}
if(message.equals("")) {
plugin.message(sender, "info-playerNoRents", args[2]);
} else {
plugin.message(sender, "info-playerRents", args[2], message);
}
displayMessage(sender, regions, null, "info-playerRents", "info-playerNoRents");
message = "";
Iterator<BuyRegion> itBuy = plugin.getFileManager().getBuys().iterator();
first = true;
while(itBuy.hasNext()) {
BuyRegion next = itBuy.next();
if(next.isSold() && next.getPlayerName().equalsIgnoreCase(args[2])) {
if(!first) {
message += ", ";
} else {
first = false;
}
message += next.getName();
regions = new TreeSet<GeneralRegion>();
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold() && region.getPlayerName().equalsIgnoreCase(args[2])) {
regions.add(region);
}
}
if(message.equals("")) {
plugin.message(sender, "info-playerNoBuys", args[2]);
} else {
plugin.message(sender, "info-playerBuys", args[2], message);
}
displayMessage(sender, regions, null, "info-playerBuys", "info-playerNoBuys");
} else {
plugin.message(sender, "info-playerHelp");
}
} else if(args[1].equalsIgnoreCase("region")) {
}
// Region info
else if(args[1].equalsIgnoreCase("region")) {
if(args.length > 1) {
RentRegion rent = null;
BuyRegion buy = null;
@@ -373,42 +326,24 @@ public class InfoCommand extends CommandAreaShop {
/* List of regions without a group */
else if(args[1].equalsIgnoreCase("nogroup")) {
String message = "";
/* Message for rents */
List<String> rents = plugin.getFileManager().getRentNames();
// Remove regions that have a group
// Rental regions
Set<String> rents = new TreeSet<String>(plugin.getFileManager().getRentNames());
for(RegionGroup group : plugin.getFileManager().getGroups()) {
rents.removeAll(group.getMembers());
}
// Create the list message
Iterator<String> itRent = rents.iterator();
if(itRent.hasNext()) {
message = itRent.next();
while(itRent.hasNext()) {
message += ", " + itRent.next();
}
}
String message = StringUtils.join(rents, ", ");
if(message.equals("")) {
plugin.message(sender, "info-nogroupNoRents");
} else {
plugin.message(sender, "info-nogroupRents", message);
}
/* Message for buys */
message = "";
// Remove regions that have a group
List<String> buys = plugin.getFileManager().getBuyNames();
// Buy regions
Set<String> buys = new TreeSet<String>(plugin.getFileManager().getBuyNames());
for(RegionGroup group : plugin.getFileManager().getGroups()) {
buys.removeAll(group.getMembers());
}
// Create the list message
Iterator<String> itBuy = buys.iterator();
if(itBuy.hasNext()) {
message = itBuy.next();
while(itBuy.hasNext()) {
message += ", " + itBuy.next();
}
}
message = StringUtils.join(buys, ", ");
if(message.equals("")) {
plugin.message(sender, "info-nogroupNoBuys");
} else {
@@ -68,6 +68,7 @@ public class SchematiceventCommand extends CommandAreaShop {
return;
}
region.handleSchematicEvent(event);
region.updateSigns();
plugin.message(sender, "schemevent-success", args[2], region.getName());
}
@@ -60,7 +60,7 @@ public final class SignBreakListener implements Listener {
* Called when the physics of a block change
* @param event The event
*/
@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.HIGHEST)
public void onIndirectSignBreak(BlockPhysicsEvent event){
Block block = event.getBlock();
if(event.isCancelled()) {
@@ -71,12 +71,11 @@ public final class SignBreakListener implements Listener {
Block attachedTo = block.getRelative(((org.bukkit.material.Sign)sign.getData()).getAttachedFace());
if(attachedTo.getType() == Material.AIR){
/* Check if the rent sign is really the same as a saved rent */
GeneralRegion region = plugin.getFileManager().getRegionBySignLocation(block.getLocation());
final GeneralRegion region = plugin.getFileManager().getRegionBySignLocation(block.getLocation());
if(region == null) {
return;
}
region.removeSign(block.getLocation());
plugin.getLogger().warning("A sign of region " + region.getName() + " has been removed by indirectly breaking it (block below/behind is destroyed)");
event.setCancelled(true); // Cancel the sign breaking, will create a floating sign but at least it is not disconnected/gone
}
}
}
@@ -30,6 +30,9 @@ public class SignClickListener implements Listener {
*/
@EventHandler(priority = EventPriority.HIGH)
public void onSignClick(PlayerInteractEvent event) {
if(event.isCancelled()) {
return;
}
Block block = event.getClickedBlock();
/* Check for clicking a sign and rightclicking */
if((event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.LEFT_CLICK_BLOCK)
@@ -803,21 +803,22 @@ public class FileManager {
/**
* Load all files from disk
* @return true
* @return true if the files are loaded correctly, otherwise false
*/
public boolean loadFiles() {
boolean result = false;
boolean result = true;
// Load config.yml + add defaults from .jar
result = result & loadConfigFile();
// Load default.yml + add defaults from .jar
result = result & loadDefaultFile();
// Convert old formats to the latest
// Convert old formats to the latest (object saving to .yml saving)
preUpdateFiles();
// Load region files (regions folder)
result = result & loadRegionFiles();
loadRegionFiles();
// Convert old formats to the latest (changes in .yml saving format)
postUpdateFiles();
// Load groups.yml
result = result & loadGroupsFile();
loadGroupsFile();
return result;
}
@@ -827,6 +828,7 @@ public class FileManager {
* @return true if it has been loaded successfully, otherwise false
*/
public boolean loadDefaultFile() {
boolean result = true;
File defaultFile = new File(defaultPath);
// Safe the file from the jar to disk if it does not exist
if(!defaultFile.exists()) {
@@ -857,29 +859,33 @@ public class FileManager {
InputStreamReader reader = null;
try {
reader = new InputStreamReader(new FileInputStream(defaultFile), Charsets.UTF_8);
} catch (FileNotFoundException e) {}
} catch (FileNotFoundException e) {
result = false;
}
if(reader != null) {
defaultConfig = YamlConfiguration.loadConfiguration(reader);
if(defaultConfig.getKeys(false).size() == 0) {
plugin.getLogger().warning("File 'default.yml' is empty, check for errors in the log.");
result = false;
}
try {
reader.close();
} catch (IOException e) {}
}
try {
reader.close();
} catch (IOException e) {}
if(defaultConfig == null) {
defaultConfig = new YamlConfiguration();
if(result) {
// Addding the defaults from the normal file that is inside the jar is disabled, not nice when removing lines for things you don't want
InputStream inputStream = plugin.getResource(AreaShop.defaultFile);
if(inputStream != null) {
reader = new InputStreamReader(inputStream, Charsets.UTF_8);
}
if(reader != null) {
defaultConfig.addDefaults(YamlConfiguration.loadConfiguration(reader));
try {
reader.close();
} catch (IOException e) {}
}
}
// Addding the defaults from the normal file that is inside the jar is disabled, not nice when removing lines for things you don't want
InputStream inputStream = plugin.getResource(AreaShop.defaultFile);
if(inputStream != null) {
reader = new InputStreamReader(inputStream, Charsets.UTF_8);
}
if(reader != null) {
defaultConfig.addDefaults(YamlConfiguration.loadConfiguration(reader));
}
try {
reader.close();
} catch (IOException e) {}
return defaultConfig != null;
return result;
}
/**
@@ -887,6 +893,7 @@ public class FileManager {
* @return true if it has been loaded successfully, otherwise false
*/
public boolean loadConfigFile() {
boolean result = true;
File configFile = new File(configPath);
// Safe the file from the jar to disk if it does not exist
if(!configFile.exists()) {
@@ -909,7 +916,6 @@ public class FileManager {
input.close();
output.close();
} catch (IOException e1) {} catch (NullPointerException e2) {}
plugin.getLogger().warning("Something went wrong saving the config file: " + configFile.getPath());
}
}
@@ -917,40 +923,42 @@ public class FileManager {
InputStreamReader reader = null;
try {
reader = new InputStreamReader(new FileInputStream(configFile), Charsets.UTF_8);
} catch (FileNotFoundException e) {}
} catch (FileNotFoundException e) {
result = false;
}
if(reader != null) {
config = YamlConfiguration.loadConfiguration(reader);
if(config.getKeys(false).size() == 0) {
plugin.getLogger().warning("File 'config.yml' is empty, check for errors in the log.");
result = false;
}
try {
reader.close();
} catch (IOException e) {}
}
try {
reader.close();
} catch (IOException e) {}
if(config == null) {
config = new YamlConfiguration();
}
// Add the values from the config.yml file inside of the .jar as defaults
InputStream inputStream = plugin.getResource(AreaShop.configFile);
if(inputStream != null) {
reader = new InputStreamReader(inputStream, Charsets.UTF_8);
}
if(reader != null) {
config.addDefaults(YamlConfiguration.loadConfiguration(reader));
}
try {
reader.close();
} catch (IOException e) {}
// Set the debug and chatprefix variables
plugin.setDebug(this.getConfig().getBoolean("debug"));
plugin.setChatprefix(this.getConfig().getString("chatPrefix"));
return config != null;
if(result) {
// Add the values from the config.yml file inside of the .jar as defaults
InputStream inputStream = plugin.getResource(AreaShop.configFile);
if(inputStream != null) {
reader = new InputStreamReader(inputStream, Charsets.UTF_8);
}
if(reader != null) {
config.addDefaults(YamlConfiguration.loadConfiguration(reader));
try {
reader.close();
} catch (IOException e) {}
}
// Set the debug and chatprefix variables
plugin.setDebug(this.getConfig().getBoolean("debug"));
plugin.setChatprefix(this.getConfig().getString("chatPrefix"));
}
return result;
}
/**
* Load the groups.yml file from disk
* @return
*/
public boolean loadGroupsFile() {
public void loadGroupsFile() {
File groupFile = new File(groupsPath);
InputStreamReader reader = null;
if(groupFile.exists() && groupFile.isFile()) {
@@ -959,11 +967,10 @@ public class FileManager {
} catch (FileNotFoundException e) {}
if(reader != null) {
groupsConfig = YamlConfiguration.loadConfiguration(reader);
try {
reader.close();
} catch (IOException e) {}
}
try {
reader.close();
} catch (IOException e) {}
}
if(groupsConfig == null) {
groupsConfig = new YamlConfiguration();
@@ -972,14 +979,12 @@ public class FileManager {
RegionGroup group = new RegionGroup(plugin, groupName);
groups.put(groupName, group);
}
return true;
}
/**
* Load all region files
* @return true
*/
public boolean loadRegionFiles() {
public void loadRegionFiles() {
regions.clear();
File file = new File(regionsPath);
if(!file.exists()) {
@@ -997,10 +1002,10 @@ public class FileManager {
} catch (FileNotFoundException e) {}
if(reader != null) {
config = YamlConfiguration.loadConfiguration(reader);
try {
reader.close();
} catch (IOException e) {}
}
try {
reader.close();
} catch (IOException e) {}
// Construct the correct type of region
if(RegionType.RENT.getValue().equals(config.getString("general.type"))) {
RentRegion rent = new RentRegion(plugin, config);
@@ -1017,6 +1022,7 @@ public class FileManager {
public void run() {
List<GeneralRegion> noWorld = new ArrayList<GeneralRegion>();
List<GeneralRegion> noRegion = new ArrayList<GeneralRegion>();
List<GeneralRegion> incorrectDuration = new ArrayList<GeneralRegion>();
for(GeneralRegion region : AreaShop.getInstance().getFileManager().getRegions()) {
// Add broken regions to a list
if(region != null) {
@@ -1026,6 +1032,9 @@ public class FileManager {
if(region.getRegion() == null) {
noRegion.add(region);
}
if(region.isRentRegion() && !plugin.checkTimeFormat(((RentRegion)region).getDurationString())) {
incorrectDuration.add(region);
}
}
}
// All files are loaded, print possible problems to the console
@@ -1057,11 +1066,16 @@ public class FileManager {
if(noWorldRegions) {
plugin.getLogger().warning("Remove these regions from AreaShop with '/as del' or load the world(s) on the server again.");
}
if(!incorrectDuration.isEmpty()) {
List<String> incorrectDurationNames = new ArrayList<String>();
for(GeneralRegion region : incorrectDuration) {
incorrectDurationNames.add(region.getName());
}
plugin.getLogger().warning("The following regions have an incorrect time format as duration: "+Utils.createCommaSeparatedList(incorrectDurationNames));
}
}
}.runTask(plugin);
}
// Warnings will be printed in console, no other things can go wrong
return true;
}
@@ -21,7 +21,7 @@ import com.google.common.base.Charsets;
public class LanguageManager {
private AreaShop plugin = null;
private String languages[] = {"EN", "NL", "FI", "DE", "FR", "PL", "ZH_TW"};
private String languages[] = {"EN", "NL", "DE", "FR", "FI", "PL", "ZH_TW"};
private HashMap<String, String> currentLanguage, defaultLanguage;
/**
@@ -258,6 +258,17 @@ public class BuyRegion extends GeneralRegion {
plugin.message(player, "general-noEconomy");
return false;
}
if(isInResellingMode()) {
if(!player.hasPermission("areashop.buyresell")) {
plugin.message(player, "buy-noPermissionResell");
return false;
}
} else {
if(!player.hasPermission("areashop.buynormal")) {
plugin.message(player, "buy-noPermissionNoResell");
return false;
}
}
if(getWorld() == null) {
plugin.message(player, "general-noWorld", getWorldName());
return false;
@@ -279,7 +290,7 @@ public class BuyRegion extends GeneralRegion {
return false;
}
// Check region limits
LimitResult limitResult = this.limitsAllowBuying(player);
LimitResult limitResult = this.limitsAllow(RegionType.BUY, player);
AreaShop.debug("LimitResult: " + limitResult.toString());
if(!limitResult.actionAllowed()) {
if(limitResult.getLimitingFactor() == LimitType.TOTAL) {
@@ -352,13 +363,15 @@ public class BuyRegion extends GeneralRegion {
}
String landlordName = getLandlordName();
r = null;
if(landlordPlayer != null && landlordPlayer.getName() != null) {
r = plugin.getEconomy().depositPlayer(landlordPlayer, getWorldName(), getPrice());
} else if(landlordName != null) {
r = plugin.getEconomy().depositPlayer(landlordName, getWorldName(), getPrice());
}
if(r != null && !r.transactionSuccess()) {
plugin.getLogger().warning("Something went wrong with paying '" + landlordName + "' " + getFormattedPrice() + " for his sell of region " + getName() + " to " + player.getName());
if(landlordName != null) {
if(landlordPlayer != null && landlordPlayer.getName() != null) {
r = plugin.getEconomy().depositPlayer(landlordPlayer, getWorldName(), getPrice());
} else {
r = plugin.getEconomy().depositPlayer(landlordName, getWorldName(), getPrice());
}
if(r != null && !r.transactionSuccess()) {
plugin.getLogger().warning("Something went wrong with paying '" + landlordName + "' " + getFormattedPrice() + " for his sell of region " + getName() + " to " + player.getName());
}
}
AreaShop.debug(player.getName() + " has bought region " + getName() + " for " + getFormattedPrice());
@@ -411,12 +424,30 @@ public class BuyRegion extends GeneralRegion {
this.runEventCommands(RegionEvent.SOLD, true);
disableReselling();
/* Give part of the buying price back */
// Give part of the buying price back
double moneyBack = getMoneyBackAmount();
if(moneyBack > 0 && giveMoneyBack) {
/* Give back the money */
boolean noPayBack = false;
OfflinePlayer landlordPlayer = null;
if(getLandlord() != null) {
landlordPlayer = Bukkit.getOfflinePlayer(getLandlord());
}
String landlordName = getLandlordName();
EconomyResponse r = null;
if(landlordName != null) {
if(landlordPlayer != null && landlordPlayer.getName() != null) {
r = plugin.getEconomy().withdrawPlayer(landlordPlayer, getWorldName(), moneyBack);
} else {
r = plugin.getEconomy().withdrawPlayer(landlordName, getWorldName(), moneyBack);
}
if(r == null || !r.transactionSuccess()) {
noPayBack = true;
}
}
// Give back the money
OfflinePlayer player = Bukkit.getOfflinePlayer(getBuyer());
if(player != null) {
if(player != null && !noPayBack) {
EconomyResponse response = null;
boolean error = false;
try {
@@ -434,16 +465,16 @@ public class BuyRegion extends GeneralRegion {
}
}
/* Debug message */
AreaShop.debug(getPlayerName() + " has sold " + getName() + ", got " + plugin.formatCurrency(moneyBack) + " money back");
/* Update everything */
// Update everything
handleSchematicEvent(RegionEvent.SOLD);
updateRegionFlags(RegionState.FORSALE);
/* Remove friends and the owner */
// Remove friends and the owner
clearFriends();
setBuyer(null);
setBuyer(null);
removeLastActiveTime();
updateSigns();
// Run commands
@@ -44,7 +44,7 @@ import com.sk89q.worldguard.protection.flags.RegionGroupFlag;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import com.sk89q.worldguard.protection.regions.ProtectedRegion.CircularInheritanceException;
public abstract class GeneralRegion implements GeneralRegionInterface {
public abstract class GeneralRegion implements GeneralRegionInterface, Comparable<GeneralRegion> {
protected YamlConfiguration config;
private static ArrayList<Material> canSpawnIn = new ArrayList<Material>(Arrays.asList(Material.WOOD_DOOR, Material.WOODEN_DOOR, Material.SIGN_POST, Material.WALL_SIGN, Material.STONE_PLATE, Material.IRON_DOOR_BLOCK, Material.WOOD_PLATE, Material.TRAP_DOOR, Material.REDSTONE_LAMP_OFF, Material.REDSTONE_LAMP_ON, Material.DRAGON_EGG, Material.GOLD_PLATE, Material.IRON_PLATE));
private static ArrayList<Material> cannotSpawnOn = new ArrayList<Material>(Arrays.asList(Material.PISTON_EXTENSION, Material.PISTON_MOVING_PIECE, Material.SIGN_POST, Material.WALL_SIGN, Material.STONE_PLATE, Material.IRON_DOOR_BLOCK, Material.WOOD_PLATE, Material.TRAP_DOOR, Material.REDSTONE_LAMP_OFF, Material.REDSTONE_LAMP_ON, Material.CACTUS, Material.IRON_FENCE, Material.FENCE_GATE, Material.THIN_GLASS, Material.NETHER_FENCE, Material.DRAGON_EGG, Material.GOLD_PLATE, Material.IRON_PLATE, Material.STAINED_GLASS_PANE));
@@ -52,6 +52,9 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
protected AreaShop plugin = null;
private boolean saveRequired = false;
private boolean deleted = false;
private HashMap<String, Object> replacementsCache = null;
private long replacementsCacheTime = 0;
/* Enum for region types */
public enum RegionType {
@@ -124,7 +127,8 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
public enum LimitType {
RENTS("rents"),
BUYS("buys"),
TOTAL("total");
TOTAL("total"),
EXTEND("extend");
private final String value;
private LimitType(String value) {
@@ -156,6 +160,22 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
*/
public abstract RegionType getType();
// Sorting by name
@Override
public int compareTo(GeneralRegion o) {
return getName().compareTo(o.getName());
}
@Override
public String toString() {
return getName();
}
@Override
public boolean equals(Object region) {
return region instanceof GeneralRegion && ((GeneralRegion)region).getName().equals(getName());
}
/**
* Update the region flags according the region data
*/
@@ -296,6 +316,10 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
}
}
public void removeLastActiveTime() {
setSetting("general.lastActive", null);
}
/**
* Get the World of the region
* @return The World where the region is located
@@ -372,7 +396,7 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
if(result == null || result.isEmpty()) {
result = config.getString("general.landlordName");
if(result == null || result.isEmpty()) {
result = "<UNKNOWN>";
result = null;
}
}
return result;
@@ -487,6 +511,11 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
* @return Map with the keys that need to be replaced with the value of the object
*/
public HashMap<String, Object> getAllReplacements() {
// Reply with cache if we have one
if(replacementsCache != null && (Calendar.getInstance().getTimeInMillis() - replacementsCacheTime) < 1000) {
return replacementsCache;
}
HashMap<String, Object> result = getSpecificReplacements();
result.put(AreaShop.tagRegionName, getName());
@@ -517,8 +546,8 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
dateString = date.format(Calendar.getInstance().getTime());
result.put(AreaShop.tagDateTimeShort, dateString);
// TODO: add more? coordinates?
replacementsCache = result;
replacementsCacheTime = Calendar.getInstance().getTimeInMillis();
return result;
}
@@ -1003,9 +1032,8 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
public void resetRegionFlags() {
ProtectedRegion region = getRegion();
if(region != null) {
for(Flag<?> flag : DefaultFlag.getFlags()) {
region.setFlag(flag, null);
}
region.setFlag(DefaultFlag.GREET_MESSAGE, null);
region.setFlag(DefaultFlag.FAREWELL_MESSAGE, null);
}
}
@@ -1179,6 +1207,7 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
* Indicate this region needs to be saved, saving will happen by a repeating task
*/
public void saveRequired() {
replacementsCache = null; // Remove cache
saveRequired = true;
}
@@ -1249,25 +1278,9 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
owner = player.getUniqueId().equals(((BuyRegion)this).getBuyer());
}
List<Location> signs = getSignLocations();
boolean signAvailable = !signs.isEmpty();
if(toSign) {
if(signAvailable) {
// Use the location 1 below the sign to prevent weird spawing above the sign
startLocation = signs.get(0).subtract(0.0, 1.0, 0.0);
startLocation.setPitch(player.getLocation().getPitch());
startLocation.setYaw(player.getLocation().getYaw());
} else {
// No sign available
plugin.message(player, "teleport-changedToNoSign");
toSign = false;
}
}
if(checkPermissions) {
// Teleport to sign instead if they dont have permission for teleporting to region
if(signAvailable &&
(!toSign && owner && !player.hasPermission("areashop.teleport") && player.hasPermission("areashop.teleportsign")
if( (!toSign && owner && !player.hasPermission("areashop.teleport") && player.hasPermission("areashop.teleportsign")
|| !toSign && !owner && !friend && !player.hasPermission("areashop.teleportall") && player.hasPermission("areashop.teleportsignall")
|| !toSign && !owner && friend && !player.hasPermission("areashop.teleportfriend") && player.hasPermission("areashop.teleportfriendsign"))) {
plugin.message(player, "teleport-changedToSign");
@@ -1294,7 +1307,21 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
return false;
}
}
List<Location> signs = getSignLocations();
boolean signAvailable = !signs.isEmpty();
if(toSign) {
if(signAvailable) {
// Use the location 1 below the sign to prevent weird spawing above the sign
startLocation = signs.get(0).subtract(0.0, 1.0, 0.0);
startLocation.setPitch(player.getLocation().getPitch());
startLocation.setYaw(player.getLocation().getYaw());
} else {
// No sign available
plugin.message(player, "teleport-changedToNoSign");
toSign = false;
}
}
if(startLocation == null && this.hasTeleportLocation()) {
startLocation = getTeleportLocation();
@@ -1761,127 +1788,60 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
// LIMIT FUNCTIONS
/**
* Check if the player can buy this region, detailed info in the result object
* Check if the player can buy/rent this region, detailed info in the result object
* @param type The type of region to check
* @param player The player to check it for
* @return LimitResult containing if it is allowed, why and limiting factor
*/
public LimitResult limitsAllowBuying(Player player) {
if(player.hasPermission("areashop.limitbypass")) {
return new LimitResult(true, null, 0, 0, null);
}
// Get current total regions
List<GeneralRegion> totalRegions = new ArrayList<GeneralRegion>();
for(GeneralRegion region : plugin.getFileManager().getRegions()) {
if(region.isOwner(player)) {
totalRegions.add(region);
}
}
// Get currently bought regions
List<BuyRegion> buyRegions = new ArrayList<BuyRegion>();
for(GeneralRegion region : totalRegions) {
if(region.isBuyRegion()) {
buyRegions.add((BuyRegion)region);
}
}
// Check all limitgroups the player has
List<String> groups = new ArrayList<String>(plugin.getConfig().getConfigurationSection("limitGroups").getKeys(false));
while(!groups.isEmpty()) {
String group = groups.get(0);
if(player.hasPermission("areashop.limits." + group) && this.matchesLimitGroup(group)) {
int totalLimit = plugin.getConfig().getInt("limitGroups." + group + ".total");
int buysLimit = plugin.getConfig().getInt("limitGroups." + group + ".buys");
int totalCurrent = hasRegionsInLimitGroup(player, group, totalRegions);
int buysCurrent = hasBuyRegionsInLimitGroup(player, group, buyRegions);
if(totalLimit == -1) {
totalLimit = Integer.MAX_VALUE;
}
if(buysLimit == -1) {
buysLimit = Integer.MAX_VALUE;
}
String totalHighestGroup = group;
String buysHighestGroup = group;
groups.remove(group);
// Get the highest number from the groups of the same category
List<String> groupsCopy = new ArrayList<String>(groups);
for(String checkGroup : groupsCopy) {
if(player.hasPermission("areashop.limits." + checkGroup) && this.matchesLimitGroup(checkGroup)) {
if(limitGroupsOfSameCategory(group, checkGroup)) {
groups.remove(checkGroup);
int totalLimitOther = plugin.getConfig().getInt("limitGroups." + checkGroup + ".total");
int buyLimitOther = plugin.getConfig().getInt("limitGroups." + checkGroup + ".buys");
if(totalLimitOther > totalLimit) {
totalLimit = totalLimitOther;
totalHighestGroup = checkGroup;
} else if(totalLimitOther == -1) {
totalLimit = Integer.MAX_VALUE;
}
if(buyLimitOther > buysLimit) {
buysLimit = buyLimitOther;
buysHighestGroup = checkGroup;
} else if(buyLimitOther == -1) {
buysLimit = Integer.MAX_VALUE;
}
}
} else {
groups.remove(checkGroup);
}
}
// Check if the limits stop the player from buying the region
if(totalCurrent >= totalLimit) {
return new LimitResult(false, LimitType.TOTAL, totalLimit, totalCurrent, totalHighestGroup);
}
if(buysCurrent >= buysLimit) {
return new LimitResult(false, LimitType.BUYS, buysLimit, buysCurrent, buysHighestGroup);
}
}
groups.remove(group);
}
return new LimitResult(true, null, 0, 0, null);
public LimitResult limitsAllow(RegionType type, Player player) {
return limitsAllow(type, player, false);
}
/**
* Check if the player can rent this region, detailed info in the result object
* Check if the player can buy/rent this region, detailed info in the result object
* @param type The type of region to check
* @param player The player to check it for
* @param extend Check for extending of rental regions
* @return LimitResult containing if it is allowed, why and limiting factor
*/
public LimitResult limitsAllowRenting(Player player) {
public LimitResult limitsAllow(RegionType type, Player player, boolean extend) {
if(player.hasPermission("areashop.limitbypass")) {
return new LimitResult(true, null, 0, 0, null);
}
// Get current total regions
List<GeneralRegion> totalRegions = new ArrayList<GeneralRegion>();
for(GeneralRegion region : plugin.getFileManager().getRegions()) {
if(region.isOwner(player)) {
totalRegions.add(region);
}
GeneralRegion exclude = null;
if(extend) {
exclude = this;
}
// Get currently bought regions
List<RentRegion> rentRegions = new ArrayList<RentRegion>();
for(GeneralRegion region : totalRegions) {
if(region.isRentRegion()) {
rentRegions.add((RentRegion)region);
}
String typePath = null;
if(type == RegionType.RENT) {
typePath = "rents";
} else {
typePath = "buys";
}
// Check all limitgroups the player has
List<String> groups = new ArrayList<String>(plugin.getConfig().getConfigurationSection("limitGroups").getKeys(false));
while(!groups.isEmpty()) {
String group = groups.get(0);
if(player.hasPermission("areashop.limits." + group) && this.matchesLimitGroup(group)) {
AreaShop.debug(player.getName() + " has limitGroup: " + group);
int totalLimit = plugin.getConfig().getInt("limitGroups." + group + ".total");
int rentsLimit = plugin.getConfig().getInt("limitGroups." + group + ".rents");
int totalCurrent = hasRegionsInLimitGroup(player, group, totalRegions);
int rentsCurrent = hasRentRegionsInLimitGroup(player, group, rentRegions);
int typeLimit = plugin.getConfig().getInt("limitGroups." + group + "."+typePath);
//AreaShop.debug("typeLimitOther="+typeLimit+", typePath="+typePath);
int totalCurrent = hasRegionsInLimitGroup(player, group, plugin.getFileManager().getRegions(), exclude);
int typeCurrent = 0;
if(type == RegionType.RENT) {
typeCurrent = hasRegionsInLimitGroup(player, group, plugin.getFileManager().getRents(), exclude);
} else {
typeCurrent = hasRegionsInLimitGroup(player, group, plugin.getFileManager().getBuys(), exclude);
}
if(totalLimit == -1) {
totalLimit = Integer.MAX_VALUE;
}
if(rentsLimit == -1) {
rentsLimit = Integer.MAX_VALUE;
if(typeLimit == -1) {
typeLimit = Integer.MAX_VALUE;
}
String totalHighestGroup = group;
String rentsHighestGroup = group;
String typeHighestGroup = group;
groups.remove(group);
// Get the highest number from the groups of the same category
List<String> groupsCopy = new ArrayList<String>(groups);
@@ -1890,18 +1850,18 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
if(limitGroupsOfSameCategory(group, checkGroup)) {
groups.remove(checkGroup);
int totalLimitOther = plugin.getConfig().getInt("limitGroups." + checkGroup + ".total");
int rentLimitOther = plugin.getConfig().getInt("limitGroups." + checkGroup + ".rents");
int typeLimitOther = plugin.getConfig().getInt("limitGroups." + checkGroup + "."+typePath);
if(totalLimitOther > totalLimit) {
totalLimit = totalLimitOther;
totalHighestGroup = checkGroup;
} else if(totalLimitOther == -1) {
totalLimit = Integer.MAX_VALUE;
}
if(rentLimitOther > rentsLimit) {
rentsLimit = rentLimitOther;
rentsHighestGroup = checkGroup;
} else if(rentLimitOther == -1) {
rentsLimit = Integer.MAX_VALUE;
if(typeLimitOther > typeLimit) {
typeLimit = typeLimitOther;
typeHighestGroup = checkGroup;
} else if(typeLimitOther == -1) {
typeLimit = Integer.MAX_VALUE;
}
}
} else {
@@ -1909,12 +1869,22 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
}
}
// Check if the limits stop the player from buying the region
if(typeCurrent >= typeLimit) {
LimitType limitType = null;
if(type == RegionType.RENT) {
if(extend) {
limitType = LimitType.EXTEND;
} else {
limitType = LimitType.RENTS;
}
} else {
limitType = LimitType.BUYS;
}
return new LimitResult(false, limitType, typeLimit, typeCurrent, typeHighestGroup);
}
if(totalCurrent >= totalLimit) {
return new LimitResult(false, LimitType.TOTAL, totalLimit, totalCurrent, totalHighestGroup);
}
if(rentsCurrent >= rentsLimit) {
return new LimitResult(false, LimitType.RENTS, rentsLimit, rentsCurrent, rentsHighestGroup);
}
}
}
groups.remove(group);
}
@@ -1979,44 +1949,6 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
return true;
}
/**
* Get the amount of buy regions a player has matching a certain limits group (config.yml > limitGroups)
* @param player The player to check the amount for
* @param limitGroup The group to check
* @param buyRegions All the regions a player has bought
* @return The number of regions that the player has bought matching the limit group (worlds and groups filters)
*/
public int hasBuyRegionsInLimitGroup(Player player, String limitGroup, List<BuyRegion> buyRegions) {
int result = 0;
for(BuyRegion region : buyRegions) {
if(region.isBuyer(player)) {
if(region.matchesLimitGroup(limitGroup)) {
result++;
}
}
}
return result;
}
/**
* Get the amount of rent regions a player has matching a certain limits group (config.yml > limitGroups)
* @param player The player to check the amount for
* @param limitGroup The group to check
* @param rentRegions All the regions a player has bought
* @return The number of regions that the player has rented matching the limit group (worlds and groups filters)
*/
public int hasRentRegionsInLimitGroup(Player player, String limitGroup, List<RentRegion> rentRegions) {
int result = 0;
for(RentRegion region : rentRegions) {
if(region.isRenter(player)) {
if(region.matchesLimitGroup(limitGroup)) {
result++;
}
}
}
return result;
}
/**
* Get the amount of regions a player has matching a certain limits group (config.yml > limitGroups)
* @param player The player to check the amount for
@@ -2024,13 +1956,11 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
* @param buyRegions All the regions a player has bought or rented
* @return The number of regions that the player has bought or rented matching the limit group (worlds and groups filters)
*/
public int hasRegionsInLimitGroup(Player player, String limitGroup, List<GeneralRegion> regions) {
public int hasRegionsInLimitGroup(Player player, String limitGroup, List<? extends GeneralRegion> regions, GeneralRegion exclude) {
int result = 0;
for(GeneralRegion region : regions) {
if(region.isOwner(player)) {
if(region.matchesLimitGroup(limitGroup)) {
result++;
}
if(region.isOwner(player) && region.matchesLimitGroup(limitGroup) && (exclude == null || !exclude.getName().equals(region.getName()))) {
result++;
}
}
return result;
@@ -1,7 +1,9 @@
package nl.evolutioncoding.areashop.regions;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import nl.evolutioncoding.areashop.AreaShop;
@@ -93,6 +95,18 @@ public class RegionGroup {
return getSettings().getStringList("regions");
}
/**
* Get all members of the group as GeneralRegions
* @return A Set with all group members
*/
public Set<GeneralRegion> getMemberRegions() {
Set<GeneralRegion> result = new HashSet<GeneralRegion>();
for(String name : getMembers()) {
result.add(plugin.getFileManager().getRegion(name));
}
return result;
}
/**
* Get the name of the group
* @return The name of the group
@@ -341,7 +341,7 @@ public class RentRegion extends GeneralRegion {
public boolean checkExpiration() {
long now = Calendar.getInstance().getTimeInMillis();
if(!isDeleted() && isRented() && now > getRentedUntil()) {
/* Send message to the player if online */
// Send message to the player if online
Player player = Bukkit.getPlayer(getRenter());
if(player != null) {
plugin.message(player, "unrent-expired", getName());
@@ -396,7 +396,7 @@ public class RentRegion extends GeneralRegion {
*/
@SuppressWarnings("deprecation")
public boolean rent(Player player) {
/* Check if the player has permission */
//Check if the player has permission
if(player.hasPermission("areashop.rent")) {
if(plugin.getEconomy() == null) {
plugin.message(player, "general-noEconomy");
@@ -426,9 +426,15 @@ public class RentRegion extends GeneralRegion {
plugin.message(player, "rent-restrictedToWorld", getWorldName(), player.getWorld().getName());
return false;
}
// Check region limits if this is not extending
if(!extend) {
LimitResult limitResult = this.limitsAllowRenting(player);
// Check region limits if this is not extending
if(!(extend && config.getBoolean("allowRegionExtendsWhenAboveLimits"))) {
LimitResult limitResult = null;
if(extend) {
limitResult = this.limitsAllow(RegionType.RENT, player, extend);
} else {
limitResult = this.limitsAllow(RegionType.RENT, player);
}
AreaShop.debug("LimitResult: " + limitResult.toString());
if(!limitResult.actionAllowed()) {
if(limitResult.getLimitingFactor() == LimitType.TOTAL) {
@@ -439,7 +445,10 @@ public class RentRegion extends GeneralRegion {
plugin.message(player, "rent-maximum", limitResult.getMaximum(), limitResult.getCurrent(), limitResult.getLimitingGroup());
return false;
}
// Should not be reached, but is safe like this
if(limitResult.getLimitingFactor() == LimitType.EXTEND) {
plugin.message(player, "rent-maximumExtend", limitResult.getMaximum(), limitResult.getCurrent()+1, limitResult.getLimitingGroup());
return false;
}
return false;
}
}
@@ -467,7 +476,7 @@ public class RentRegion extends GeneralRegion {
}
if(plugin.getEconomy().has(player, getWorldName(), getPrice())) {
/* Substract the money from the players balance */
// Substract the money from the players balance
EconomyResponse r = plugin.getEconomy().withdrawPlayer(player, getWorldName(), getPrice());
if(!r.transactionSuccess()) {
plugin.message(player, "rent-payError");
@@ -480,15 +489,17 @@ public class RentRegion extends GeneralRegion {
}
String landlordName = getLandlordName();
r = null;
if(landlordPlayer != null && landlordPlayer.getName() != null) {
r = plugin.getEconomy().depositPlayer(landlordPlayer, getWorldName(), getPrice());
} else if(landlordName != null) {
r = plugin.getEconomy().depositPlayer(landlordName, getWorldName(), getPrice());
if(landlordName != null) {
if(landlordPlayer != null && landlordPlayer.getName() != null) {
r = plugin.getEconomy().depositPlayer(landlordPlayer, getWorldName(), getPrice());
} else {
r = plugin.getEconomy().depositPlayer(landlordName, getWorldName(), getPrice());
}
if(r == null || !r.transactionSuccess()) {
plugin.getLogger().warning("Something went wrong with paying '" + landlordName + "' " + getFormattedPrice() + " for his rent of region " + getName() + " to " + player.getName());
}
}
if(r == null || !r.transactionSuccess()) {
plugin.getLogger().warning("Something went wrong with paying '" + landlordName + "' " + getFormattedPrice() + " for his rent of region " + getName() + " to " + player.getName());
}
if(!extend) {
// Run commands
runEventCommands(RegionEvent.RENTED, true);
@@ -497,7 +508,7 @@ public class RentRegion extends GeneralRegion {
runEventCommands(RegionEvent.EXTENDED, true);
}
/* Get the time until the region will be rented */
// Get the time until the region will be rented
Calendar calendar = Calendar.getInstance();
if(extend) {
calendar.setTimeInMillis(getRentedUntil());
@@ -506,7 +517,7 @@ public class RentRegion extends GeneralRegion {
SimpleDateFormat dateFull = new SimpleDateFormat(plugin.getConfig().getString("timeFormatChat"));
AreaShop.debug(player.getName() + " has rented region " + getName() + " for " + getFormattedPrice() + " until " + dateFull.format(calendar.getTime()));
/* Add values to the rent and send it to FileManager */
// Add values to the rent and send it to FileManager
setRentedUntil(calendar.getTimeInMillis());
setRenter(player.getUniqueId());
@@ -518,11 +529,11 @@ public class RentRegion extends GeneralRegion {
setTimesExtended(getTimesExtended() + 1);
}
/* Change the sign and the region flags */
// Change the sign and the region flags
updateSigns();
updateRegionFlags(RegionState.RENTED);
/* Send message to the player */
// Send message to the player
if(extend) {
plugin.message(player, "rent-extended", getName(), dateFull.format(calendar.getTime()));
} else {
@@ -538,7 +549,7 @@ public class RentRegion extends GeneralRegion {
}
return true;
} else {
/* Player has not enough money */
// Player has not enough money
if(extend) {
plugin.message(player, "rent-lowMoneyExtend", plugin.formatCurrency(plugin.getEconomy().getBalance(player, getWorldName())), getFormattedPrice());
} else {
@@ -564,10 +575,28 @@ public class RentRegion extends GeneralRegion {
this.runEventCommands(RegionEvent.UNRENTED, true);
double moneyBack = getMoneyBackAmount();
if(moneyBack > 0 && giveMoneyBack) {
/* Give back the money */
boolean noPayBack = false;
OfflinePlayer landlordPlayer = null;
if(getLandlord() != null) {
landlordPlayer = Bukkit.getOfflinePlayer(getLandlord());
}
String landlordName = getLandlordName();
EconomyResponse r = null;
if(landlordName != null) {
if(landlordPlayer != null && landlordPlayer.getName() != null) {
r = plugin.getEconomy().withdrawPlayer(landlordPlayer, getWorldName(), moneyBack);
} else {
r = plugin.getEconomy().withdrawPlayer(landlordName, getWorldName(), moneyBack);
}
if(r == null || !r.transactionSuccess()) {
noPayBack = true;
}
}
// Give back the money
OfflinePlayer player = Bukkit.getOfflinePlayer(getRenter());
if(player != null) {
EconomyResponse r = null;
if(player != null && !noPayBack) {
r = null;
boolean error = false;
try {
if(player != null && player.getName() != null) {
@@ -584,18 +613,19 @@ public class RentRegion extends GeneralRegion {
}
}
/* Debug message */
// Debug message
AreaShop.debug(getPlayerName() + " has unrented " + getName() + ", got " + plugin.formatCurrency(moneyBack) + " money back");
/* Update the signs and region flags */
// Update the signs and region flags
handleSchematicEvent(RegionEvent.UNRENTED);
updateRegionFlags(RegionState.FORRENT);
/* Remove friends, the owner and renteduntil values */
// Remove friends, the owner and renteduntil values
clearFriends();
setRenter(null);
setRentedUntil(null);
setTimesExtended(-1);
removeLastActiveTime();
updateSigns();
// Run commands
+11 -7
View File
@@ -12,9 +12,9 @@ language: EN
## The tags you need to write on the sign to trigger the plugin.
signTags:
## Tag for adding a rent region.
rent: '[rent]'
rent: '[asrent]'
## Tag for adding a buy region.
buy: '[buy]'
buy: '[asbuy]'
## Tag for adding a sign to an existing region.
add: '[as]'
@@ -48,11 +48,15 @@ timeFormatChat: 'dd MMMMMMMMMMMMMMMMM yyyy HH:mm'
## Time indicators, used for specifing time periods (for example rent duration).
## Be careful with deleting words, will break settings using those, adding is no problem.
seconds: [s, sec, secs, second, seconds]
minutes: [m, min, mins, minute, minutes, minuten, minuut]
hours: [h, hour, hours, uur, uren]
days: [d, day, days, dag, dagen]
months: [M, month, months, maanden, maand]
years: [y, year, years, jaar, jaren]
minutes: [m, min, mins, minute, minutes]
hours: [h, hour, hours]
days: [d, day, days]
weeks: [w, week, weeks]
months: [M, month, months]
years: [y, year, years]
## Allow or disallow extending rental region when the player is above his limits enforced by the 'limitGroups' below.
## false will ensure a player will eventually lose his region when he has no access anymore (rankup with other limits for example)
allowRegionExtendsWhenAboveLimits: false
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
+39 -20
View File
@@ -1,6 +1,6 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: German, Version: V2.2.0, Percentage translated: 100% ║
# ║ Language: German, Version: V2.2.1, Percentage translated: 100% ║
# ║ This file will be overwritten at each startup/reload of the plugin, if you want to change anything then do the following: ║
# ║ 1: Make a copy of this file ║
# ║ 2: Rename it to <servername>.yml (don't use a language code as filename, could otherwise be overwritten in future updates) ║
@@ -10,16 +10,21 @@
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
total-maximum: "Du kannst nicht mehr als %0% Region(en) mieten/kaufen (Du hast bereits %1% in Gruppe '%2%')."
general-notReady: "AreaShop ist noch nicht vollständig geladen, bitte warten."
general-noWorld: "Diese Aktion kann nicht durchgeführt werden, da die Welt dieser Region im Moment nicht verfügbar ist (Welt '%0%')."
general-noRegion: "Diese Aktion kann nicht durchgeführt werden, da die WorldGuard Region im Moment nicht verfügbar ist (Region '%0%')."
general-noEconomy: "AreaShop kann kein (korrekt) installiertes Economy-Plugin finden, bitte informiere den Serverinhaber darüber."
cmd-notValid: "Der Befehl ist ungültig, nutze '/as help' für weitere Informationen."
cmd-onlyByPlayer: "Dieser Befehl kann nur von einem Spieler benutzt werden."
cmd-weOnlyByPlayer: "Eine WorldEdit-Selektion kann nur von einem Spieler gewählt werden, gib die Region als extra Argument an."
cmd-noSelection: "Du hast mit WorldEdit Nichts markiert."
cmd-noRegionsFound: "In deiner Selektion wurden keine mit AreaShop registrierten Regionen gefunden."
cmd-noSelection: "Du hast mit WorldEdit nichts markiert."
cmd-noRegionsFound: "In deiner Selektion wurden keine in AreaShop registrierten Regionen gefunden."
cmd-noWERegionsFound: "Es wurden keine WorldEdit-Regionen gefunden, die sich mit deiner Selektion überschneiden."
cmd-notRegistered: "Die angegebene Region ist nicht eingetragen: %0%."
cmd-noRegionsAtLocation: "Keine Regionen an deiner Stelle gefunden, gib die Region als Argument an."
cmd-notRegistered: "Die angegebene Region ist nicht registriert: %0%."
cmd-noRegionsAtLocation: "Keine Regionen an deiner Position gefunden, gib die Region als Argument an."
cmd-moreRegionsAtLocation: "Mehr als eine Region wurde an deiner Position gefunden, gib die Region als Argument an."
cmd-automaticRegionOnlyByPlayer: "Automatische Auswahl einer Region ist nur für Spieler möglich, gibt die Region als Argument an."
cmd-automaticRegionOnlyByPlayer: "Die Automatische Auswahl einer Region ist nur für Spieler möglich, gib die Region als Argument an."
help-header: "Hilfeseite mit Befehlen, die du ausführen kannst."
help-alias: "Befehlsaliase: /areashop, /as."
@@ -61,26 +66,30 @@ help-delFriend: "&6/as delfriend &7-&r Entferne einen Freund von deiner Region."
help-delFriendAll: "&6/as delfriend &7-&r Entferne einen Spieler von einer Region."
help-linksigns: "&6/as linksigns &7-&r Benutze Schilder Massenverlinkungsmodus"
help-stack: "&6/as stack &7-&r Erstellt mehrere Regionen und fügt sie hinzu."
help-setlandlord: "&6/as setlandlord &7-&r Setzt den Vermieter einer Region."
rent-help: "/as rent [Region], Wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest."
rent-noPermission: "Du bist nicht berechtigt, diese Region zu mieten."
rent-maximum: "Du kannst nicht mehr als %0% Region(en) mieten (Du hast bereits %1% in Gruppe '%2%')."
rent-maximumExtend: "Du kannst diese Miete nicht verlängern weil du mehr als %0% Region(en) hast. (Du hast bereits %1% in Gruppe '%2%')."
rent-payError: "Die Bezahlung hat nicht funktioniert. Bitte versuche es später noch einmal."
rent-rented: "Du hast %0% von %1% gemietet."
rent-rented: "Du hast die Region %0% bis %1% gemietet."
rent-extended: "Du hast die Miete verlängert von %0% bis %1%."
rent-extend: "Du kannst die Miete verlängern, indem du mit rechts noch einmal auf das Schild klickst oder den Befehl /as rent nutzt."
rent-extend: "Du kannst die Miete verlängern, indem du noch einen Rechtsklick auf das Schild machst oder den Befehl /as rent nutzt."
rent-lowMoneyExtend: "Du hast nicht genug Geld, um die Miete zu verlängern (Du hast %0%, benötigst aber %1%)."
rent-lowMoneyRent: "Du hast nicht genug Geld, um diese Region zu mieten (Du hast %0%, benötigst aber %1%)."
rent-someoneElse: "Diese Region ist bereits vermietet."
rent-notRentable: "Diese Region ist nicht mietbar."
rent-maxExtends: "Du kannst die Miete nicht verlängern (Die Miete ist maximal %0% mal verlängerbar), du kannst die Region allerdings neu mieten, sobald sie wieder zu vermieten ist."
rent-maxRentTime: "Du kannst die Mietdauer dieser Region nicht erneut verlängern. Die maximale Zeit beträgt %0% Minuten und du hast sie bereits für %1% Minuten gemietet."
rent-maxRentTime: "Du kannst diese Region nicht noch mehr im Voraus mieten. Die maximale Zeit beträgt %0% und Du hast diese Region im Moment für %1% gemietet."
rent-restrictedToWorld: "Du musst dich in der '%0%' Welt befinden, um diese Region mieten zu können (Du bist in '%1%')."
rent-restrictedToRegion: "Du musst innerhalb von '%0%' sein, um es zu mieten."
rent-expireWarning: "Deine Region %region% hat %timeleft% übrig. Gehe sicher, dass du es rechtzeitig verlängerst, wenn du sie behalten willst."
buy-help: "/as buy [Region], Wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest."
buy-noPermission: "Du bist nicht berechtigt, eine Region zu kaufen."
buy-noPermissionResell: "Du hast keine Berechtigung eine Region im Weiterverkaufs-Modus zu kaufen."
buy-noPermissionNoResell: "Du hast keine Berechtigung um eine Region zu kaufen, die nicht im Weiterverkaufs-Modus ist."
buy-notBuyable: "Diese Region steht nicht zum Verkauf bereit."
buy-maximum: "Du kannst nicht mehr als %0% Region(en) erwerben (Du hast bereits %1% in Gruppe '%2%')."
buy-payError: "Die Bezahlung hat nicht funktioniert. Bitte versuche es später noch einmal."
@@ -110,13 +119,13 @@ sell-soldYours: "Region erfolgreich verkauft."
sell-noPermission: "Du bist nicht berechtigt, diese Region zu verkaufen."
sell-noPermissionOther: "Du bist nicht berechtigt, eine Region zu verkaufen."
reload-reloaded: "Alle Dateien wurden erfolgreich neu geladen."
reload-reloading: "Alle Dateien wurden neu geladen, nun werden alle Mieten überprüft und alle Regionen aktualisiert."
reload-updateStart: "&Aktualisiere %0% Regionen mit %1% Regionen pro Sekunde."
reload-updateComplete: "&7Regionen erfolgreich aktualisiert."
reload-noPermission: "Du hast keine Berechtigungen um die Konfigurationsdateien neu zu laden."
reload-updateCommandChanged: "'/as updaterents' und '/as updatebuys' wurden entfernt, bitte benutze '/as reload' um die Regionen neu zu laden."
info-help: "/as info <all|rented|forrent|sold|forsale|player|region|nogroup>."
info-help: "/as info\n all\n rented [Grupppe]\n forrent [Grupppe]\n sold [Grupppe]\n forsale [Grupppe]\n player <Spieler>\n region <Region>\n nogroup"
info-noPermission: "Du hast keine Berechtigung, Informationen über Regionen zu erhalten."
info-all-rents: "Mietbare Regionen: &7%0%."
info-all-noRents: "Es gibt momentan keine mietbaren Regionen."
@@ -134,6 +143,7 @@ info-sold: "Verkaufte Regionen: &7%0%."
info-noSold: "Es sind momentan keine Regionen verkauft."
info-forsale: "Zum Verkauf stehende Regionen: &7%0%."
info-noForsale: "Sämtliche Regionen sind verkauft."
info-noFiltergroup: "Gruppe '%0%' existiert nicht und kann deshalb nicht genutzt werden um die Ergebnisse zu limitieren."
info-playerHelp: "/as info player <Spielername>."
info-playerRents: "Von %0% gemietete Regionen: &7%1%."
info-playerNoRents: "%0% hat bisher keine Region(en) gemietet."
@@ -171,13 +181,7 @@ info-regionRestrictedWorldBuy: "&2&l►&r Du musst in der Welt '%world%' sein, u
info-regionRestoringRent: "&2&l►&r Die Wiederherstellung ist aktiviert. &7(Region wird bei Mietkündigung zurückgesetzt)%0%."
info-regionRestoringBuy: "&2&l►&r Die Wiederherstellung ist aktiviert. &7(Region wird beim Verkauf zurückgesetzt)%0%."
info-regionRestoringProfile: " (Profil: %0%)"
info-regionNoSign: "Für diese Region gibt es bisher kein Schild."
info-regionPriceDuration: "Preis: &7%0% pro %1%."
info-regionPrice: "Preis: &7%0%."
info-regionRestore: "Wiederherstellung aktiviert: &7%0%."
info-regionRestoreProfile: "Wiederherstellungs-Profil: &7%0%."
info-regionTPLocation: "Teleport-Adresse: &7Welt=%0%, X=%1%, Y=%2%, Z=%3%, Pitch=%4%, Yaw=%5%."
info-regionNoTP: "Keine Teleport-Adressen vorhanden."
info-regionLandlord: "&2&l►&r Vermieter: &7%landlord% (Erhält das Geld)."
info-regionNotExisting: "Die angegebene Region ist nicht registriert: %0%."
setrestore-help: "/as setrestore <Region> <true|false|general> [Profil]."
@@ -191,8 +195,10 @@ setprice-noPermission: "Du bist nicht berechtigt, den Preis einer Region zu änd
setprice-help: "/as setprice <Preis> [Region], Wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest."
setprice-notRegistered: "Die angegebene Region ist nicht registriert: %0%."
setprice-wrongPrice: "'%0%' ist kein gültiger Preis."
setprice-successRent: "Preis der Region %0% geändert auf %1% von %2%."
setprice-successBuy: "Preis der Region %0% geändert auf %1%."
setprice-successRent: "Der Preis der Region %region% änderte sich zu %price% per %duration%."
setprice-successBuy: "Der Preis der Region %region% wurde zu %price% geändert."
setprice-successRemoved: "Der Preis der Region %region% wurde entfernt, ab jetzt wird der Preis einer Gruppe oder der default.yml-Datei benutzt. Neuer Preis: %price%."
setprice-noLandlord: "Du hast keine Rechte um den Preis zu ändern, da du nicht der Vermieter der Region %region% bist."
setduration-noPermission: "Du hast keine Berechtigung, die Mietdauer zu verändern."
setduration-help: "/as setduration <Anzahl> <Zeiteinheit> [Region], wählt automatisch die Region, in der du dich gerade befindest, wenn nichts angegeben wird."
@@ -200,6 +206,8 @@ setduration-notRegistered: "%0% ist nicht als mietbar registriert."
setduration-wrongAmount: "'%0%' ist keine gültige Anzahl, gib eine ganze Zahl an."
setduration-wrongFormat: "'%0%' ist kein gültiges Zeitformat, schau in der Doku auf Bukkit nach."
setduration-success: "Dauer von Region %0% geändert zu '%1%'."
setduration-noLandlord: "Du hast keine Rechte um die Dauer der Miete zu ändern, da du nicht der Vermieter der Region %region% bist."
setduration-successRemoved: "Die Mietdauer der Region %region% wurde entfernt, es wird nun die Dauer von einer Gruppe oder der default.yml Datei benutzt. Neue Mietdauer: %duration%."
setup-noRegion: "Du hast in der zweiten Zeile keine Region angegeben."
setup-wrongRegion: "Die angegebene Region existiert nicht."
@@ -215,6 +223,7 @@ setup-noPermissionRent: "Du hast keine Berechtigungen um mietbare Regionen aufzu
setup-noPermissionBuy: "Du hast keine Berechtigungen um kaufbare Regionen aufzusetzen."
setup-couldNotDetect: "Mehrere Regionen mit der selben Priorität und/oder Eltern/Kind-Verhältnis gefunden, bitte gib die gewünschte Region in der zweiten Zeile an (zwei der gefundenen Regionen: %0% und %1%)."
setup-blacklisted: "%0% ist auf der Blacklist und kann nicht in AreaShop eingefügt werden."
setup-noPermission: "Du kannst die Region '%0%' nicht hinzufügen, da du weder Besitzer noch Mitglied der Region bist oder keine Rechte dazu hast."
destroy-noPermissionRent: "Du hast keine Berechtigungen um eine mietbare Region zu deregistrieren. "
destroy-noPermissionBuy: "Du hast keine Berechtigungen um eine kaufbare Region zu deregistrieren. "
@@ -233,6 +242,8 @@ teleport-success: "Du wurdest zu %0% teleportiert."
teleport-successSign: "Du wurdest zu %0% teleportiert."
teleport-noSafe: "Keine sichere Position in %0% gefunden, kein Boden vorhanden oder maximale Anzahl an Versuchen erreicht (%1%/%2%)."
teleport-blocked: "Du kannst dich nicht teleportieren, weil sich die Position außerhalb der Region befindet und du dich nur in die Region teleportieren kannst."
teleport-changedToSign: "Du hast nur Rechte um zum Schild der Region zu teleportieren und nicht um in die Region zu teleportieren. Teleportiere zum Schild."
teleport-changedToNoSign: "Es ist kein Schild zum teleportieren verfügbar, versuche stattdessen in die Region zu teleportieren."
setteleport-help: "/as settp [Region] [reset], Wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest."
setteleport-noPermission: "Du bist nicht berechtigt, einen Teleport-Punkt zu setzen."
@@ -292,6 +303,8 @@ add-blacklisted: "Auf der Blacklist: &7%0%."
add-specifyWorld: "Bei Verwendung der Konsole bitte Welt der Region eintragen."
add-incorrectWorld: "Welt '%0%' nicht gefunden, versuche es bitte noch einmal (Groß- und Kleinschreibung beachten)."
add-noRegion: "Region '%0%' existiert nicht in dieser Welt."
add-noPermissionRegions: "Keine Rechte zum hinzufügen: &7%0%."
add-noPermissionOwnerMember: "&7Entweder bist du weder Mitglied noch Besitzer der Region oder hast keine Rechte um deine Regionen hinzuzufügen."
del-noRegion: "Die angegebene Region ist nicht registriert: %0%."
del-noPermission: "Du bist nicht berechtigt, Regionen zu entfernen."
@@ -395,6 +408,12 @@ stack-addStart: "&7Füge %0% Regionen mit %1% Regionen pro Sekunde hinzu."
stack-addComplete: "&7Regionen erfolgreich hinzugefügt."
stack-unclearDirection: "Bitte gucke nur nach Norden, Osten, Süden oder Westen. Du guckst im Moment nach %0%."
setlandlord-help: "/as setlandlord <Spieler> [Region], die Region in der du stehst wird verwendet, wenn keine angegeben wird."
setlandlord-noPermission: "Du hast keine Rechte um den Vermieter einer Region zu setzen."
setlandlord-didNotPlayBefore: "&7Hinweis: '%0%' war noch nie auf dem Server. Bist du dir sicher, dass du den richtigen Spieler verwendest?"
setlandlord-noRegion: "Die angegebene Region ist nicht registriert: %0%."
setlandlord-success: "%0% wurde erfolgreich als Vermieter der Region %1% gesetzt."
timeleft-years: "%0% Jahre"
timeleft-months: "%0% Monate"
timeleft-days: "%0% Tage"
+10 -6
View File
@@ -1,6 +1,6 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: English, Version: V2.2.0, Percentage translated: 100% (source), author: NLThijs48 ║
# ║ Language: English, Version: V2.2.1, Percentage translated: 100% (source), author: NLThijs48 ║
# ║ This file will be overwritten at each startup/reload of the plugin, if you want to change anything then do the following: ║
# ║ 1: Make a copy of this file ║
# ║ 2: Rename it to <servername>.yml (don't use a language code as filename, could otherwise be overwritten in future updates) ║
@@ -13,7 +13,7 @@ total-maximum: "You can't rent and buy more than %0% region(s) in total (you alr
general-notReady: "AreaShop has not fully loaded yet, please wait."
general-noWorld: "You cannot do that, the world of this region is currently unavailable (world '%0%')."
general-noRegion: "You cannot do that, the WorldGuard region is currently unavailable (region '%0%')."
general-noEconomy: "There is no economy plugin installed or it is not setup correctly, notify the server owner about this."
general-noEconomy: "There is no Economy plugin installed or it is not setup correctly, notify the server owner about this."
cmd-notValid: "That command is not valid, use '/as help' for info."
cmd-onlyByPlayer: "This command can only be run by a player."
@@ -71,6 +71,7 @@ help-setlandlord: "&6/as setlandlord &7-&r Set the landlord of a region."
rent-help: "/as rent [regionname], the region you stand in will be used if not specified."
rent-noPermission: "You don't have permission to rent a region."
rent-maximum: "You can't rent more than %0% region(s) (you already have %1% in group '%2%')."
rent-maximumExtend: "You can't extend this rent because you have more than %0% region(s) (you already have %1% in group '%2%')."
rent-payError: "Something went wrong with paying, try again later."
rent-rented: "You rented %0% until %1%."
rent-extended: "You extended your rent of %0% until %1%."
@@ -87,6 +88,8 @@ rent-expireWarning: "Your region %region% has %timeleft% left, be sure to extend
buy-help: "/as buy [regionname], the region you stand in will be used if not specified."
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-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."
@@ -122,7 +125,7 @@ reload-updateComplete: "&7Updating regions complete."
reload-noPermission: "You don't have permission to reload the config files."
reload-updateCommandChanged: "'/as updaterents' and '/as updatebuys' have been removed, '/as reload' will also update the regions now so use that command instead."
info-help: "/as info <all|rented|forrent|sold|forsale|player|region|nogroup>."
info-help: "/as info\n all\n rented [group]\n forrent [group]\n sold [group]\n forsale [group]\n player <player>\n region <region>\n nogroup"
info-noPermission: "You don't have permission to get information about regions."
info-all-rents: "Regions registered for renting: &7%0%."
info-all-noRents: "There are no regions registered for renting."
@@ -140,10 +143,11 @@ info-sold: "Sold regions: &7%0%."
info-noSold: "No regions are sold."
info-forsale: "Regions for sale: &7%0%."
info-noForsale: "All regions are sold."
info-noFiltergroup: "Group '%0%' does not exist and therefore cannot be used to limit the results."
info-playerHelp: "/as info player <name>."
info-playerRents: "Regions rented by %0%: &7%1%"
info-playerRents: "Regions rented by %0%: &7%1%"
info-playerNoRents: "%0% has not rented a region."
info-playerBuys: "Regions bought by %0%: &7%1%."
info-playerBuys: "Regions bought by %0%: &7%1%."
info-playerNoBuys: "%0% has not bought a region."
info-regionHelp: "/as info region [name], the region you stand in will be used if not specified."
info-regionHeaderRent: "&2Information about %region%:"
@@ -427,4 +431,4 @@ greeting-forsale: "%region% can be bought for %price%."
greeting-bought: "%region% is bought by %player%."
greeting-resale: "%region% can be bought for %resaleprice% from %player%."
update-playerNotify: "&2Update from AreaShop V%0% to %1% available, get the latest version at http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/."
update-playerNotify: "&2Update from AreaShop V%0% to %1% available, get the latest version at https://github.com/NLthijs48/AreaShop/releases."
+1 -13
View File
@@ -1,6 +1,6 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: Finnish, Version: V2.2.0, Percentage translated: 100% ║
# ║ Language: Finnish, Version: V2.2.1, Percentage translated: 92% ║
# ║ This file will be overwritten at each startup/reload of the plugin, if you want to change anything then do the following: ║
# ║ 1: Make a copy of this file ║
# ║ 2: Rename it to <servername>.yml (don't use a language code as filename, could otherwise be overwritten in future updates) ║
@@ -74,7 +74,6 @@ rent-lowMoneyRent: "Sinulla ei ole tarpeeksi rahaa vuokrata tätä alueetta (sin
rent-someoneElse: "Joku muu on jo vuokraamassa tätä aluetta."
rent-notRentable: "Tuo alue ei ole saatavissa vuokraamiselle."
rent-maxExtends: "Et voi enään laajentaa tätä vuokra-aluetta (maksimi on %0% kertaa), kuitenkin vuokra-ajan päättymisen jälkeen voit vuokrata tämän uudestaan."
rent-maxRentTime: "Et voi vuokrata tätä aluetta pidemmäksi ajaksi kerrallaan, maksimi aika on %0% minuuttia ja sinulla on nyt vuokra-aikaa jäljellä %1% minuuttia."
rent-restrictedToWorld: "Sinun pitää olla '%0%' maailmassa vuokrataksesi tuon alueen (olet nyt '%1%')"
rent-restrictedToRegion: "Sinun pitää olla alueen '%0%' sisässä vuokrataksesi sen."
rent-expireWarning: "Sinun alueessa %region% on aikaa jäljellä %timeleft%, muista pidentää vuokra-aikaa jos haluat pitää sen."
@@ -110,13 +109,11 @@ sell-soldYours: "Sinun alueesi on myyty."
sell-noPermission: "Sinulla ei ole oikeuksia myydä aluetta."
sell-noPermissionOther: "Sinulla ei ole oikeuksia myydä jonkun toisen aluetta."
reload-reloaded: "Kaikki tiedostot on päivitetty onnistuneesti."
reload-updateStart: "&7Päivitetään %0% aluetta vauhdilla %1% per sekunti."
reload-updateComplete: "&7Alueiden päivitys on valmis."
reload-noPermission: "Sinulla ei ole oikeuksia päivittää config-tiedostoja."
reload-updateCommandChanged: "'/as updaterents' ja '/as updatebuys' ovat poistettu, '/as reload' päivittää alueet joten voit käyttää sitä komentoa."
info-help: "/as info <all|rented|forrent|sold|forsale|player|region|nogroup>"
info-noPermission: "Sinulla ei ole oikeuksia saada lisätietoja alueista."
info-all-rents: "Alueet jotka ovat tehty vuokrattaviksi: &7%0%."
info-all-noRents: "Vuokrattavissa olevia alueita ole."
@@ -171,13 +168,6 @@ info-regionRestrictedWorldBuy: "&2&l►&r Sinun täytyy olla maailmassa '%world%
info-regionRestoringRent: "&2&l►&r Palautus päällä &7(alue nollaantuu vuokran lopettamisen yhteydessä)%0%."
info-regionRestoringBuy: "&2&l►&r Palautus on päällä &7(alue nollaantuu myynnin jälkeen)%0%."
info-regionRestoringProfile: "(profiili: %0%)"
info-regionNoSign: "Kylttiä ei ole tehty tuolle alueelle."
info-regionPriceDuration: "Hinta: &7%0% jokaista %1% kohtaan."
info-regionPrice: "Hinta: &7%0%."
info-regionRestore: "Palautus päällä: &7%0%."
info-regionRestoreProfile: "Palautetaan profiili: &7%0%."
info-regionTPLocation: "Teleporttaus-paikka: &7Maailma=%0%, X=%1%, Y=%2%, Z=%3%, Pitch=%4%, Yaw=%5%."
info-regionNoTP: "Teleporttaus-paikkaa ei ole asetettu."
info-regionNotExisting: "Aluetta ei ole olemassa: %0%."
setrestore-help: "/as setrestore <alue> <true|false|general> [profiili]."
@@ -191,8 +181,6 @@ setprice-noPermission: "Sinulla ei ole oikeuksia vaihtaa hintaa millä alue myyd
setprice-help: "/as set price <hinta> [alue], alue jolla seisot valitaan, jos et käytä alueen nimeä."
setprice-notRegistered: "Aluetta ei ole olemassa: %0%."
setprice-wrongPrice: "'%0%' ei ole kelvollinen hinta."
setprice-successRent: "Alueen %0% hinta vaihdettu %1% per %2%."
setprice-successBuy: "Alueen %0% hinta vaihdettu %1%."
setduration-noPermission: "Sinulla ei ole oikeuksia vaihtaa vuokran pituutta."
setduration-help: "/as setduration <määrä> <tunniste> [alue], alue jolla seisot valitaan, jos et käytä alueen nimeä."
+9 -13
View File
@@ -1,6 +1,6 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: French, Version: V2.2.0, Percentage translated: 99% ║
# ║ Language: French, Version: V2.2.1, Percentage translated: 94% ║
# ║ This file will be overwritten at each startup/reload of the plugin, if you want to change anything then do the following: ║
# ║ 1: Make a copy of this file ║
# ║ 2: Rename it to <servername>.yml (don't use a language code as filename, could otherwise be overwritten in future updates) ║
@@ -10,6 +10,11 @@
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
total-maximum: "Vous ne pouvez pas louer ou acheter plus de %0% région(s) au total (vous possédez déjà %1% dans le groupe '%2%')."
general-notReady: "AreaShop n'a pas été encore lancé, merci d'attendre."
general-noWorld: "Vous ne pouvez pas faire ceci, le monde de cette région est actuellement inaccessible (monde '%0%')."
general-noRegion: "Vous ne pouvez pas faire ceci, la région WorldGuard n'est pas accessible region ('%0%')"
general-noEconomy: "Il n'y a pas de plugin d'économie sur votre serveur, ou bien qu'il n'est pas correctement installé. Merci de prévenir l'opérateur du serveur dès que possible."
cmd-notValid: "Cette commande est incorrecte, utilisez '/as help' pour plus de détails."
cmd-onlyByPlayer: "Cette commande ne peut être utilisée que par un joueur."
cmd-weOnlyByPlayer: "Utiliser une sélection WorldEdit n'est possible qu'en tant que joueur. Spécifiez le nom de la région en argument supplémentaire."
@@ -74,7 +79,6 @@ rent-lowMoneyRent: "Vous n'avez pas assez d'argent pour louer cette région (vou
rent-someoneElse: "Quelqu'un d'autre loue déjà cette région."
rent-notRentable: "Cette région n'est pas disponible à la location."
rent-maxExtends: "Vous ne pouvez plus prolonger cette location (le maximum est de %0% fois). Mais lorsque la location sera terminée, vous pourrez de nouveau louer cette région."
rent-maxRentTime: "Vous ne pouvez pas louer plus longtemps à l'avance, le maximum est de %0% minutes et vous avez déjà loué pour %1% minutes."
rent-restrictedToWorld: "Vous devez être dans le monde '%0%' pour louer cette région (vous êtes dans '%1%')."
rent-restrictedToRegion: "Vous devez être dans la région '%0%' pour la louer."
rent-expireWarning: "Votre région '%region%' n'a plus que %timeleft% de temps de location, soyez sûr d'allonger ce temps de location si vous voulez la conserver."
@@ -110,13 +114,12 @@ sell-soldYours: "Votre région a été vendue."
sell-noPermission: "Vous n'avez pas la permission de vendre une région."
sell-noPermissionOther: "Vous n'avez pas la permission de vendre une autre région."
reload-reloaded: "Tous les fichiers ont été rechargés avec succès."
reload-reloading: "Fichiers rechargés, vérification des locations et des mises à jour des régions."
reload-updateStart: "&7Met à jour %0% régions, %1% par seconde."
reload-updateComplete: "&7Mise à jour des régions terminée."
reload-noPermission: "Vous n'avez pas la permission de recharger les fichiers."
reload-updateCommandChanged: "'/as updaterents' et '/as updatebuys' ont été supprimées, '/as reload' est la commande à utiliser pour mettre à jour les régions."
info-help: "/as info <all|rented|forrent|sold|forsale|player|region|nogroup>."
info-noPermission: "Vous n'avez pas la permission d'avoir des informations à propos des régions."
info-all-rents: "Régions enregistrées en location : &7%0%"
info-all-noRents: "Il n'y a pas de régions enregistrées en location."
@@ -171,13 +174,6 @@ info-regionRestrictedWorldBuy: "&2&l►&r Vous devez à l'intérieur du monde '%
info-regionRestoringRent: "&2&l►&r La restauration est activée &7(la région sera remise à zéro a la fin de la location)%0%"
info-regionRestoringBuy: "&2&l►&r La restauration est activée &7(la région sera remise à zéro a la fin de la location)%0%"
info-regionRestoringProfile: "(Profil : %0%)"
info-regionNoSign: "Il n'y a pas de panneau enregistré pour cette région."
info-regionPriceDuration: "Prix : &7%0% pour chaque %1%"
info-regionPrice: "Prix : &7%0%"
info-regionRestore: "Restauration activée : &7%0%"
info-regionRestoreProfile: "Profil de restauration : &7%0%"
info-regionTPLocation: "Lieu de téléportation : &7World=%0%, X=%1%, Y=%2%, Z=%3%, Pitch=%4%, Yaw=%5%"
info-regionNoTP: "Aucun lieu de téléportation défini."
info-regionNotExisting: "La région spécifiée n'est pas enregistrée : %0%."
setrestore-help: "/as setrestore <region> <true|false|general> [profile]"
@@ -191,8 +187,8 @@ setprice-noPermission: "Vous n'avez pas la permission de changer le prix d'une r
setprice-help: "/as setprice <price> [region], Si non spécifiée, cible la région dans laquelle vous vous trouvez."
setprice-notRegistered: "La région spécifiée n'est pas enregistrée : %0%."
setprice-wrongPrice: "'%0%' n'est pas un prix valide."
setprice-successRent: "Prix de la région '%0%' changé de %1% à %2%."
setprice-successBuy: "Prix de la région '%0%' changé à %1%."
setprice-successRent: "Le prix de la région %region% à changé pour %price% par %duration%."
setprice-successBuy: "Le prix de la région %region% a changé pour %price%"
setduration-noPermission: "Vous n'avez pas la permission de changer le temps d'une location."
setduration-help: "/as setduration <amount> <identifier> [region], la région dans laquelle vous vous trouvez sera utilisée si vous ne précisez pas quelle région doit être utilisée."
+32 -13
View File
@@ -1,6 +1,6 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: Dutch, Version: V2.2.0, Percentage translated: 100% ║
# ║ Language: Dutch, Version: V2.2.1, Percentage translated: 100% ║
# ║ This file will be overwritten at each startup/reload of the plugin, if you want to change anything then do the following: ║
# ║ 1: Make a copy of this file ║
# ║ 2: Rename it to <servername>.yml (don't use a language code as filename, could otherwise be overwritten in future updates) ║
@@ -10,6 +10,11 @@
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
total-maximum: "Je kunt niet meer dan %0% gebied(en) kopen en huren in totaal (je hebt er al %1% in groep '%2%')."
general-notReady: "AreaShop is not niet volledig geladen, even geduld."
general-noWorld: "Je kunt deze actie niet uitvoeren, de wereld van dit gebied is niet beschikbaar (wereld '%0%')."
general-noRegion: "Je kunt deze actie niet uitvoeren, het WorldGuard gebied is niet beschikbaar (gebied '%0%')."
general-noEconomy: "Er is geen Economy plugin geïnstalleerd of deze is incorrect opgezet, stel de server eigenaar hiervan op de hoogte."
cmd-notValid: "Dat commando is niet geldig , gebruik '/as help' voor informatie."
cmd-onlyByPlayer: "Dit commando kan alleen door een speler uitgevoert worden."
cmd-weOnlyByPlayer: "Gebruikmaken van een WorldEdit selectie is alleen mogelijk als speler, geef de naam van het gebied mee als extra argument."
@@ -61,10 +66,12 @@ help-delFriend: "&6/as delfriend &7-&r Verwijder een vriend van je gebied."
help-delFriendAll: "&6/as delfriend &7-&r Verwijder een vriend van een gebied."
help-linksigns: "&6/as linksigns &7-&r Gebruik massa bord koppelen mode."
help-stack: "&6/as stack &7-&r Creer meerdere gebieden en voeg ze toe."
help-setlandlord: "&6/as setlandlord &7-&r Stel de landeigenaar in van een gebied."
rent-help: "/as rent <gebiednaam>."
rent-noPermission: "Je hebt geen toestemming om een gebied te huren."
rent-maximum: "Je kunt niet meer dan %0% gebied(en) huren (je hebt er al %1% in groep '%2%')."
rent-maximumExtend: "Je kunt dit gebied niet meer verlengen omdat je meer dan %0% gebied(en) bezit (je hebt er al %1% in groep '%2%')."
rent-payError: "Er is iets mis gegaan met betalen, probeer het later opnieuw."
rent-rented: "Je hebt %0% tot %1% gehuurd."
rent-extended: "Je hebt je huur van %0% verlengt tot %1%."
@@ -74,13 +81,15 @@ rent-lowMoneyRent: "Je hebt niet genoeg geld om het gebied te huren (je hebt %0%
rent-someoneElse: "Iemand anders heeft dit gebied al gehuurd."
rent-notRentable: "Dat gebied is niet beschikbaar om te huren."
rent-maxExtends: "Je kunt de huur niet meer verlengen (het maximum is %0% keer), je kunt echter wel het gebied opnieuw huren als het afgelopen is."
rent-maxRentTime: "Je kunt dit huur gebied niet meer tijd van tevoren huren, de maximum tijd is %0% minuten en je hebt het al voor %1% minuten gehuurt."
rent-maxRentTime: "Je kunt dit huur gebied niet meer tijd van tevoren huren, de maximum tijd is %0% en je hebt het al voor %1% gehuurt."
rent-restrictedToWorld: "Je moet in de '%0%' wereld zijn om dit gebied te huren (je bent in '%1%')."
rent-restrictedToRegion: "Je moet in '%0%' staan om hem te huren."
rent-expireWarning: "Je gebied %region% heeft nog %timeleft% over, verleng het als je het wilt houden.."
buy-help: "/as buy <gebiednaam>."
buy-noPermission: "Je hebt geen toestemming om een gebied te kopen."
buy-noPermissionResell: "Je hebt geen toestemming om een koop gebied in doorverkoop mode te kopen."
buy-noPermissionNoResell: "Je hebt geen toestemming om een koop gebied die niet in doorverkoop mode staat te kopen."
buy-notBuyable: "Dat gebied is niet beschikbaar om te kopen."
buy-maximum: "Je kunt niet meer dan %0% gebied(en) kopen (je hebt er al %1% in de groep '%2%')."
buy-payError: "Er is iets mis gegaan met betalen, probeer het later opnieuw."
@@ -110,13 +119,13 @@ sell-soldYours: "Je gebied is verkocht."
sell-noPermission: "Je hebt geen toestemming om een gebied te verkopen."
sell-noPermissionOther: "Je hebt geen toestemming om een gebied van iemand anders te verkopen."
reload-reloaded: "Alle bestanden zijn succesvol herladen."
reload-reloading: "Alle bestanden zijn herladen, gebieden aan het checken en updaten."
reload-updateStart: "&7%0% gebieden aan het updaten met %1% per seconde."
reload-updateComplete: "&7Updaten van gebieden compleet."
reload-noPermission: "Je hebt geen toestemming om configuratiebestanden te herladen."
reload-updateCommandChanged: "'/as updaterents' en '/as updatebuys' zijn verwijderd, '/as reload' updated nu ook de gebieden, gebruik dus dat commando."
info-help: "/as info <all|rented|forrent|sold|forsale|player|region|nogroup>."
info-help: "/as info\nall\nrented [groep]\nforrent [groep]\nsold [groep]\nforsale [groep]\nplayer <speler>\nregion <gebied>\nnogroup"
info-noPermission: "Je hebt geen toestemming om informatie over gebieden te bekijken."
info-all-rents: "Gebieden geregistreerd voor de verhuur: %0%."
info-all-noRents: "Er zijn geen gebieden geregistreerd voor de verhuur."
@@ -134,6 +143,7 @@ info-sold: "Verkochte gebieden: %0%."
info-noSold: "Alle gebieden zijn verkocht."
info-forsale: "Gebieden te koop: %0%."
info-noForsale: "Alle gebieden zijn verkocht."
info-noFiltergroup: "Groep '%0%' bestaat niet en kan daardoor niet gebruikt worden om de resultaten te limiteren."
info-playerHelp: "/as info player <naam>."
info-playerRents: "Gebieden gehuurd door %0%: %1%."
info-playerNoRents: "%0% heeft geen gebied gehuurd."
@@ -171,13 +181,7 @@ info-regionRestrictedWorldBuy: "&2&l►&r Je moet in de wereld '%world%' staan o
info-regionRestoringRent: "&2&l►&r Herstel is ingeschakeld &7(gebied zal resetten bij een huurstop)%0%."
info-regionRestoringBuy: "&2&l►&r Herstel is ingeschakeld &7(gebied zal resetten bij een verkoop)%0%."
info-regionRestoringProfile: " (profiel: %0%)"
info-regionNoSign: "Er is geen bordje geregistreerd voor dit gebied."
info-regionPriceDuration: "Prijs: %0% voor elke %1%."
info-regionPrice: "Prijs: %0%."
info-regionRestore: "Herstellen ingeschakeld: %0%."
info-regionRestoreProfile: "Herstel profiel: %0%."
info-regionTPLocation: "Teleporteer locatie: &7Wereld=%0%, X=%1%, Y=%2%, Z=%3%, Helling=%4%, Draaiing=%5%."
info-regionNoTP: "Geen teleporteer locatie ingesteld."
info-regionLandlord: "&2&l►&r Landeigenaar: &7%landlord% (ontvangt het geld)."
info-regionNotExisting: "Het aangegeven gebied is niet geregistreerd: %0%."
setrestore-help: "/as setrestore <gebied> <true|false|general> [profiel]."
@@ -191,8 +195,10 @@ setprice-noPermission: "Je hebt geen toestemming om de prijs van een gebied te v
setprice-help: "/as setprice <prijs> [gebied], het gebied waarin je staat zal worden gebruikt als je deze niet aangeeft."
setprice-notRegistered: "Het aangegeven gebied is niet geregistreerd: %0%."
setprice-wrongPrice: "'%0%' is geen geldige prijs."
setprice-successRent: "Prijs van gebied %0% is veranderd naar %1% per %2%."
setprice-successBuy: "De prijs van het gebied %0% is veranderd naar %1%."
setprice-successRent: "Prijs van gebied %region% is veranderd naar %price% per %duration%."
setprice-successBuy: "De prijs van het gebied %region% is veranderd naar %price%."
setprice-successRemoved: "Prijs van %region% is verwijderd, hij zal nu de prijs van de groep of default.yml file gebruiken, nieuwe prijs: %price%."
setprice-noLandlord: "Je hebt geen toestemming om de prijs te veranderen omdat je niet de landeigenaar bent van %region%."
setduration-noPermission: "Je hebt geen toestemming om de duur van het huur gebied aan te passen."
setduration-help: "/as setduration <aantal> <identificator> [gebied], het gebied waarin je staat zal worden gebruikt als je niets aangeeft."
@@ -200,6 +206,8 @@ setduration-notRegistered: "%0% is niet geregistreerd voor verhuur."
setduration-wrongAmount: "'%0%' is geen geldig aantal, gebruik een geheel nummer."
setduration-wrongFormat: "'%0%' is geen goed tijdsformaat, bekijk de documentatie op Bukkit."
setduration-success: "Duur van het gebied %0% veranderd naar '%1%'."
setduration-noLandlord: "Je hebt geen toestemming om de tijdsduur te veranderen omdat je niet de landeigenaar bent van %region%."
setduration-successRemoved: "Tijdsduur van %region% is verwijderd, hij zal nu de tijdsduur van een group of default.yml gebruiken, nieuwe tijdsduur: %duration%."
setup-noRegion: "Je hebt geen gebied aangegeven op de tweede regel."
setup-wrongRegion: "Het aangegeven gebied bestaat niet."
@@ -215,6 +223,7 @@ setup-noPermissionRent: "Je hebt geen toestemming om huur gebieden op te zetten.
setup-noPermissionBuy: "Je hebt geen toestemming om koop gebieden op te zetten."
setup-couldNotDetect: "Meerdere gebieden gevonden met dezelfde prioriteit en/of parent/child relatie, geeft een specifieke aan op de tweede regel (2 van de gebieden die gevonden zijn: %0% en %1%)."
setup-blacklisted: "%0% staat op de blacklist en kan niet toegevoegd worden aan AreaShop."
setup-noPermission: "Je kunt de region '%0%' niet toevoegen, je bent geen owner/member of hebt geen toestemming."
destroy-noPermissionRent: "Je hebt geen toestemming om huur gebieden te verwijderen."
destroy-noPermissionBuy: "Je hebt geen toestemming om koop gebieden te verwijderen."
@@ -233,6 +242,8 @@ teleport-success: "Je bent naar %0% geteleporteerd."
teleport-successSign: "Je bent geteleporteerd naar het bordje van %0%."
teleport-noSafe: "Geen veilige plek gevonden in gebied %0%, verander het gebied of stel de teleporteer positie in."
teleport-blocked: "Je kunt niet teleporteren omdat de positie buiten het gebied ligt en je geforceerd word erbinnen te teleporteren."
teleport-changedToSign: "Je hebt alleen toestemming om te teleporteren naar het bord en niet binnen de region, teleporteren naar het bord."
teleport-changedToNoSign: "Er is geen bord beschikbaar om naar te teleporteren, proberen om naar het gebied te teleporteren."
setteleport-help: "/as settp [gebied] [reset], het gebied waar je in staat zal worden gebruikt als je deze niet aangeeft."
setteleport-noPermission: "Je hebt geen toestemming om de teleporteer lokatie in te stellen."
@@ -292,6 +303,8 @@ add-blacklisted: "Op de blacklist: &7%0%."
add-specifyWorld: "Geef de wereld van het gebied aan als je het commando vanuit de console gebruikt."
add-incorrectWorld: "Wereld '%0%' niet gevonden, probeer opnieuw (hoofdlettergevoelig)."
add-noRegion: "Gebied '%0%' bestaat niet in deze wereld."
add-noPermissionRegions: "Geen toestemming om toe te voegen: &7%0%."
add-noPermissionOwnerMember: "&7Je bent geen member/owner van het gebied of hebt geen toestemming om je gebieden toe te voegen."
del-noRegion: "Het aangegeven gebied is niet geregistreerd: %0%."
del-noPermission: "Je hebt geen toestemming om gebieden te verwijderen."
@@ -395,6 +408,12 @@ stack-addStart: "&7%0% gebieden aan het toevoegen met %1% per seconde."
stack-addComplete: "&7Toevoegen van gebieden voltooid."
stack-unclearDirection: "Kijk precies in het noorden, oosten, zuiden of westen, op dit moment gedetecteert: %0%."
setlandlord-help: "/as setlandlord <speler> [gebied], het gebied waar je in staat zal worden gebruikt als niet aangegeven."
setlandlord-noPermission: "Je hebt geen toestemming om de landeigenaar in te stellen voor een gebied."
setlandlord-didNotPlayBefore: "&7Opmerking: '%0%' heeft nog niet op de server gespeeld, gebruik je de goede speler?"
setlandlord-noRegion: "Het aangegeven gebied is niet geregistreerd: %0%."
setlandlord-success: "%0% is succesvol ingesteld als landeigenaar voor %1%."
timeleft-years: "%0% jaren"
timeleft-months: "%0% maanden"
timeleft-days: "%0% dagen"
+1 -13
View File
@@ -1,6 +1,6 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: Polish, Version: V2.2.0, Percentage translated: 88% ║
# ║ Language: Polish, Version: V2.2.1, Percentage translated: 81% ║
# ║ This file will be overwritten at each startup/reload of the plugin, if you want to change anything then do the following: ║
# ║ 1: Make a copy of this file ║
# ║ 2: Rename it to <servername>.yml (don't use a language code as filename, could otherwise be overwritten in future updates) ║
@@ -72,7 +72,6 @@ rent-lowMoneyRent: "Nie masz wystarczajacej liczby pieniedzy, by wynajac ten reg
rent-someoneElse: "Ktos juz wynajal ten region."
rent-notRentable: "Ten region nie jest dostepny do wynajmu."
rent-maxExtends: "Nie mozesz juz przedluzyc okresu wynajmu (maksymalna ilosc to %0% razy), aczkolwie kiedy skonczy sie okres wynajmu mozesz wynajac ten teren znowu."
rent-maxRentTime: "Nie mozesz wiecej razy z gory wynajac tego regionu, maksymalny czas to %0% minut, a ty wynajmujesz go przez %1% minut."
rent-restrictedToWorld: "Musisz byc w swiecie '%0%' zeby wypozyczyc ten region (jestes w '%1%')."
rent-restrictedToRegion: "Musisz byc na terenie '%0%' zeby wynajac ten region."
rent-expireWarning: "Czas wynajmu %region% konczy sie. Pozostalo %timeleft%. Przedluz wynajem jesli chcesz go zatrzymac."
@@ -106,13 +105,11 @@ sell-soldYours: "Twoj region zostal sprzedany."
sell-noPermission: "Nie masz uprawnien, zeby sprzedac region."
sell-noPermissionOther: "Nie masz uprawnien, by sprzedac region, ktorego nie posiadasz."
reload-reloaded: "Przeladowano wszystkie pliki."
reload-updateStart: "&7Odswiezono %0% regionow (%1%/sekunde)."
reload-updateComplete: "&7Odswiezono wszystkie regiony."
reload-noPermission: "Nie masz uprawnien, zeby przeladowac plugin."
reload-updateCommandChanged: "'/as updaterents' i '/as updatebuys' zostaly usuniete, '/as reload' tez odswieza regiony, wiec uzywaj teraz tej komendy."
info-help: "/as info <all|rented|forrent|sold|forsale|player|region|nogroup>."
info-noPermission: "Nie masz uprawnien, by uzyskac informacje na temat regionow."
info-all-rents: "Regiony do wynajecia: &7%0%."
info-all-noRents: "Aktualnie nie ma regionow do wynajecia."
@@ -161,13 +158,6 @@ info-regionInactiveSell: "&2&l►&r Autosprzedaz po: &7%inactivetime% nieobecnos
info-regionRestoringRent: "&2&l►&r Przywracanie jest wlaczone &7(Region bedzie resetowany po skonczeniu wynajmu)%0%."
info-regionRestoringBuy: "&2&l►&r Przywracanie jest wlaczone &7(Region bedzie resetowany po sprzedazy)%0%."
info-regionRestoringProfile: " (profil: %0%)"
info-regionNoSign: "Do tego regionu nie ma przypisanych tabliczek."
info-regionPriceDuration: "Cena: &7%0% za %1%."
info-regionPrice: "Cena: &7%0%."
info-regionRestore: "Przywracanie wlaczone: &7%0%."
info-regionRestoreProfile: "Profil przywracania: &7%0%."
info-regionTPLocation: "Lokalizacja teleportu: &7wiat=%0%, X=%1%, Y=%2%, Z=%3%, Wysokosc=%4%, Kierunek=%5%."
info-regionNoTP: "Nie ma ustawionej lokalizacji teleportu."
setrestore-help: "/as setrestore <region> <true|false|general> [profile]."
setrestore-noPermission: "Nie masz uprawnien zeby zmieniac ustawienia odzyskiwania."
@@ -178,8 +168,6 @@ setrestore-successProfile: "Ustawiono ustawienia odzyskiwania %0% na '%1%' i pro
setprice-noPermission: "Nie masz uprawnien, by zmienic cene regionu."
setprice-help: "/as setprice <price> [nazwa_regionu], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
setprice-wrongPrice: "'%0%' nie jest poprawna cena."
setprice-successRent: "Cena %0% zmieniona na %1% per %2%."
setprice-successBuy: "Cena %0% zmieniona na %1%."
setduration-noPermission: "Nie masz uprawnien by zmienic czas wynajmu."
setduration-help: "/as setduration <amount> <identifier> [nazwa_regionu], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
+1 -11
View File
@@ -1,6 +1,6 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: Chinese (Taiwan), Version: V2.2.0, Percentage translated: 79% ║
# ║ Language: Chinese (Taiwan), Version: V2.2.1, Percentage translated: 73% ║
# ║ This file will be overwritten at each startup/reload of the plugin, if you want to change anything then do the following: ║
# ║ 1: Make a copy of this file ║
# ║ 2: Rename it to <servername>.yml (don't use a language code as filename, could otherwise be overwritten in future updates) ║
@@ -70,7 +70,6 @@ rent-lowMoneyRent: "你沒有足夠的錢租賃該土地(你擁有%0%而你還
rent-someoneElse: "其他人已經租賃該土地"
rent-notRentable: "該土地不能租賃"
rent-maxExtends: "你已經無法再延展你的租期了(最大上限次數為%0%次), 然而在租期過後你可以再次租賃該土地"
rent-maxRentTime: "你無法提前租賃該土地,最大上限時間為 %0% 分鐘,而你目前已經租賃該土地 %1% 分鐘"
rent-restrictedToWorld: "你必須要在 '%0%'世界才能租賃該土地(你目前正在 '%1%')"
rent-restrictedToRegion: "你必須要在 '%0%'才能租賃該土地"
rent-expireWarning: "你的土地 %region% 還剩下%timeleft% ,如果你還想保留該土地請延展租期"
@@ -144,13 +143,6 @@ info-regionInactiveSell: "&2&l►&r 玩家閒置而自動出售的時間為: &7
info-regionRestoringRent: "&2&l►&r 重製啟用 &7(土地將被重新設為未被租賃)%0%"
info-regionRestoringBuy: "&2&l►&r 重製啟用 &7(土地將被重新設為出售)%0%"
info-regionRestoringProfile: "(資料: %0%)"
info-regionNoSign: "該土地沒有被註冊的告示牌"
info-regionPriceDuration: "價格:每一個 %1% 為&7%0%"
info-regionPrice: "價格: &7%0%"
info-regionRestore: "重製啟用: &7%0%"
info-regionRestoreProfile: "重製資料:&7%0%"
info-regionTPLocation: "傳送地點: &7World=%0%, X=%1%, Y=%2%, Z=%3%, Pitch=%4%, Yaw=%5%"
info-regionNoTP: "沒有設定的傳送地點"
setrestore-help: "/as setrestore <region> <true|false|general> [profile]"
setrestore-noPermission: "你沒有權限修改重製設定"
@@ -161,8 +153,6 @@ setrestore-successProfile: "成功設定重製由 %0% 至 '%1%' 而資料至 '%2
setprice-noPermission: "你沒有權限修改土地價格"
setprice-help: "/as setprice <price> [region], 若你不指定土地名稱,則預設為你所站立的土地"
setprice-wrongPrice: "'%0%' 不是有效的價格"
setprice-successRent: "土地價格由 %0% 修改至 %1% ,個別價格為 %2%"
setprice-successBuy: "土地價格由 %0% 修改至 %1%"
setduration-noPermission: "你沒有權限修改租期"
setduration-help: "/as setduration <amount> <identifier> [region], 若你不指定土地名稱,則預設為你所站立的土地"
+12 -4
View File
@@ -1,11 +1,11 @@
name: AreaShop
name: AreaShop
main: nl.evolutioncoding.areashop.AreaShop
version: ${project.version}
description: "Selling and renting WorldGuard regions to your players, highly configurable."
depend: [Vault, WorldGuard, WorldEdit]
softdepend: [Multiverse-Core]
author: NLThijs48
website: http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/
website: https://github.com/NLthijs48/AreaShop
commands:
AreaShop:
description: 'For all commands use /as help.'
@@ -22,6 +22,8 @@ permissions:
areashop.destroybuy: true
areashop.rent: true
areashop.buy: true
areashop.buyresell: true
areashop.buynormal: true
areashop.unrent: true
areashop.info: true
areashop.reload: true
@@ -71,6 +73,12 @@ permissions:
areashop.buy:
description: Allows you to buy a region
default: true
areashop.buyresell:
description: Allows you to buy a region that is in resell mode
default: true
areashop.buynormal:
description: Allows you to buy a region that is not in resell mode
default: true
areashop.unrent:
description: Allows you to unrent a specific region
default: op
@@ -227,10 +235,10 @@ permissions:
areashop.addfriendall:
description: Allows you to add friends to all regions
default: op
areashop.delfriend:
areashop.delfriend:
description: Allows you to delete friends from your regions
default: true
areashop.delfriendall:
areashop.delfriendall:
description: Allows you to delete friends from all regions
default: op
areashop.notifyupdate:
+69 -56
View File
@@ -1,70 +1,83 @@
#AreaShop
![AreaShop logo](https://cloud.githubusercontent.com/assets/6951068/9471294/f016d8ee-4b4f-11e5-9bda-d61b1c423ebb.png)<br/>
**Usage and configuration:**
[►Download (releases)](https://github.com/NLthijs48/AreaShop/releases)&nbsp;&nbsp;
[►Commands and Permissions](https://github.com/NLthijs48/AreaShop/wiki/Commands-and-Permissions)
<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[►Basic regions setup](https://github.com/NLthijs48/AreaShop/wiki/Basic-regions-setup)&nbsp;&nbsp;
[►Advanced regions setup](https://github.com/NLthijs48/AreaShop/wiki/Advanced-regions-setup)&nbsp;&nbsp;
[►Configuration files](https://github.com/NLthijs48/AreaShop/wiki/The-config-system)<br/>
**Advanced features:**
[►Save/restore region blocks](https://github.com/NLthijs48/AreaShop/wiki/Region-blocks-save-restore)&nbsp;&nbsp;
[►Change the language](https://github.com/NLthijs48/AreaShop/wiki/Language-support)&nbsp;&nbsp;
[►Limitgroups](https://github.com/NLthijs48/AreaShop/wiki/Limitgroups-information-and-examples)<br/>
**Troubleshooting:**
[►Frequently Asked Questions](https://github.com/NLthijs48/AreaShop/wiki/Frequently-Asked-Questions)&nbsp;&nbsp;
[►Common errors](https://github.com/NLthijs48/AreaShop/wiki/Common-errors)<br/>
**Support:**
[►Ask question](https://github.com/NLthijs48/AreaShop/issues/new?body=Indicate%20the%20steps%20you%20did%20while%20encountering%20the%20problem,%20the%20expected%20outcome,%20and%20the%20actual%20outcome.%20Provide%20links%20to%20your%20config.yml,%20default.yml%20and%20groups.yml%20files%20(use%20pastebin.com%20or%20similar).%20Also%20provide%20a%20full%20startup%20log%20of%20your%20server%20(this%20indicates%20the%20plugin%20versions%20used).&labels=Support)&nbsp;&nbsp;
[►Request feature](https://github.com/NLthijs48/AreaShop/issues/new?body=Describe%20the%20feature%20with%20as%20much%20detail%20as%20possible:%20command,%20permissions,%20messages%20in%20chat,%20etc.%20Also%20indicate%20for%20which%20situations%20you%20would%20use%20it%20and%20why%20it%20should%20be%20added.&labels=Feature)&nbsp;&nbsp;
[►Planned features](https://github.com/NLthijs48/AreaShop/labels/Feature)&nbsp;&nbsp;
[►Report bug](https://github.com/NLthijs48/AreaShop/issues/new?body=Indicate%20the%20steps%20you%20did%20while%20encountering%20the%20problem,%20the%20expected%20outcome,%20and%20the%20actual%20outcome.%20Provide%20links%20to%20your%20config.yml,%20default.yml%20and%20groups.yml%20files%20(use%20pastebin.com%20or%20similar).%20Also%20provide%20a%20full%20startup%20log%20of%20your%20server%20(this%20indicates%20the%20plugin%20versions%20used).&labels=Bug)&nbsp;&nbsp;
[►Open bugs](https://github.com/NLthijs48/AreaShop/labels/Bug)<br/>
**Development:**
[►Changelog](https://github.com/NLthijs48/AreaShop/wiki/Changelog)&nbsp;&nbsp;
[►Compiling](https://github.com/NLthijs48/AreaShop/wiki/Compiling-AreaShop)&nbsp;&nbsp;
[►Modules, packages and classes overview](https://github.com/NLthijs48/AreaShop/wiki/Modules,-packages-and-classes-overview)<br/>
**Connections:**
[►AreaShop in Spigot Resources](http://www.spigotmc.org/resources/areashop.2991/)&nbsp;&nbsp;
[►AreaShop on BukkitDev](http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/)
Check the documentation at http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/
***
Every time I make a change to the code that is somewhat finished and possibly tested I will push the code to GitHub, this way you can follow the commit log to see the progress.
This plugin is for giving players the option to rent or buy a region. It could be used to let them rent a jail in your Prison server or maybe a shop in the market of the Survival server. The player interacts with signs, making it easy to use. It also has a lot of commands to check the status of all regions, manage the renting and buying of a region and also features for admins. Also the plugin is capable of saving the region and restoring it later, this is very flexible and can be set general and per region, check the [config](https://github.com/NLthijs48/AreaShop/wiki/The-config-system) for more information.
# Compiling yourself OLD
This information below is only usefull for old AreaShop versions, and not for the current version at the master branch. The current version is a Maven project and can be build like that (information below will be updated later).
Below is some information about how to compile AreaShop, as a normal user you would not need this. You can simply download a stable and tested release here from the [releases page](https://github.com/NLthijs48/AreaShop/releases), the [BukkitDev](http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/) platform or the [Spigot](http://www.spigotmc.org/resources/areashop.2991/) resources section. If you however want to compile a development build yourself (code will be pushed to GitHub after adding something, but an official release is only made after some longer time).
### All features in a list
* Rent and sell regions to players + Players can resell their bought regions to other players.
* [Signs](https://github.com/NLthijs48/AreaShop/wiki/Basic-regions-setup) for easy interacting and current status.
* Change the [language](https://github.com/NLthijs48/AreaShop/wiki/Language-support) of the plugin or use of of the already provided language files (check [here](https://github.com/NLthijs48/AreaShop/tree/master/AreaShop/src/main/resources/lang) for supported languages, these are already packed with the plugin, just change the language setting in `config.yml`).
* Automatically let the plugin [restore](https://github.com/NLthijs48/AreaShop/wiki/Region-blocks-save-restore) the region with schematics.
* Change which [commands](https://github.com/NLthijs48/AreaShop/wiki/Commands-and-Permissions) players can use with [permissions](https://github.com/NLthijs48/AreaShop/wiki/Commands-and-Permissions).
* Customize the plugin by changing the [config files](https://github.com/NLthijs48/AreaShop/wiki/The-config-system).
* Automatically place the region name on the sign if it is placed inside a region.
* Teleport to rent/buy regions and optionally set the teleport location (teleporting is safe and within the region).
* Adding friends to regions (which also can teleport then).
* Automatic unrent/sell for regions of which the owner is offline for a certain time.
* Warning to players when their rent is about to run out (at login and while they are online).
* [Group system](https://github.com/NLthijs48/AreaShop/wiki/The-config-system) to set options for a couple of regions instead of all of them.
* All heavy tasks are spread over time (each tick a part is executed until done), so the plugin should not cause any lag.
* Rent/buy limits can be different per permission node (player group), world or group of regions (possible situation: Normal players can buy 1 market region in survival + 1 build region in survival and 2 plots in creative, while VIPs have double limits for all those), [check these examples](https://github.com/NLthijs48/AreaShop/wiki/Limitgroups-information-and-examples).
* Supports name changes because of saving player info by UUID, for more details check the FAQ entry: [What happens when a player changes his name?](https://github.com/NLthijs48/AreaShop/wiki/Frequently-Asked-Questions#what-happens-when-a-player-changes-his-name).
#### Cloning the repository
You can clone the AreaShop repository here from GitHub to your local computer, if you have the GitHub Windows client installed then you can simply click the "Clone in Desktop" button on the bottom right corner fo the page. Otherwise you can use the "git clone" command. If you don't know how to use git or have no interest in using it then you can also simply click "Download ZIP" to download the project.
You need to have WorldEdit, WorldGuard and Vault installed on your server, WorldGuard is used for creating and managing regions, WorldEdit for the saving and restoring the blocks in regions and Vault is used to let players pay for the regions.
#### Creating a project
Now you can create a project with your IDE, I use Eclipse myself, so that is what I mainly explain it for (but the same things are possible with other IDEs). If you cloned the git repository then you can create a project based on that, otherwise you can create a new empty Java project and add the files manually.
### Tutorial & Feature overview (AreaShop V2.0.1)
**Made by [Koz4Christ](https://www.youtube.com/user/koz4christ)**<br/>
[![Tutorial Video](https://cloud.githubusercontent.com/assets/6951068/9532789/152c33f8-4d0e-11e5-8d1c-9e80c19ceab8.png)](https://www.youtube.com/watch?v=328WrStVkzs)
#### Adding dependencies
First you need to make sure that you use the correct Java version, AreaShop is currently compiled with Java 7, but a higher version is also fine (but make sure that your Minecraft server also has that higher Java version). To compile the current master branch you will need to add the correct dependencies. I'm compiling with the lowest possible versions to make sure that everyone can use AreaShop, but compiling with higher versions is possible if you also have those versions on your server. The versions found below are recommended:
- Bukkit 1.7.9 R0.2 (later versions should work, but might require some small changes in the code)
- [WorldGuard](http://dev.bukkit.org/bukkit-plugins/worldguard/files/) 6.0
- [WorldEdit](http://dev.bukkit.org/bukkit-plugins/worldedit/files/) 6.0
- [Vault](http://dev.bukkit.org/bukkit-plugins/vault/files/) 1.4.1 (later versions should work)
### Prison cell setup tutorial (AreaShop V2.1.0)
**Made by [PerkulatorTime](https://www.youtube.com/user/PerkulatorTime)**<br/>
[![Tutorial Video](https://cloud.githubusercontent.com/assets/6951068/9532788/147526cc-4d0e-11e5-9672-1274faae280a.png)](https://www.youtube.com/watch?v=OQOsOG-EdNc)
#### Exporting
Now your project should have no errors left (warnings can be ignored usually), if you have any then you will have to fix them or send me a message. In Eclipse you can rightclick your project, then select "Export", a window should pop up. Now select "JAR file" that is located in the "Java" folder and click "Next". Then select the "src" and "lang" folder inside you project, and make sure that "config.yml", "default.yml" and "plugin.yml" are also selected. Also select an output path as export destination, and then click "Finish". Now you should have a .jar file ready to use in your server.
Old video for AreaShop v1.0: [Tutorial by VariationVault](https://www.youtube.com/watch?v=k2HMCxCCOYo)
#### Questions
If you have any questions about how to use AreaShop or how to change the code of AreaShop then feel free to message me. You can reach me through [BukkitDev](http://dev.bukkit.org/profiles/NLThijs48/) or [Spigot](http://www.spigotmc.org/members/nlthijs48.15658/).
### Required dependencies
* Java 7 or higher (latest recommended)
* Bukkit/Spigot 1.7.9 or higher (modded servers often include Bukkit/Spigot support, so it should also work on that, but it is not specifically tested for it)
* [WorldGuard](http://dev.bukkit.org/bukkit-plugins/worldguard/): 5.9 or higher (6.0+ recommended)
* [WorldEdit](http://dev.bukkit.org/bukkit-plugins/worldedit/): 5.6.3 or higher (6.0+ recommended)
* [Vault](http://dev.bukkit.org/bukkit-plugins/vault/): 1.4.1 or higher
* An economy plugin supported by Vault (check the [Vault page](http://dev.bukkit.org/bukkit-plugins/vault/) for a list of these)
# Development tips
Below you can find a basic overview of the structure of AreaShop, this can help you understand the plugin and make it easier to change something.
### Metrics
This plugin utilizes Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
#### Description of packages and classes
The following packages and classes can be found inside the AreaShop plugin:
*A unique identifier, the server's version of Java, whether the server is in offline or online mode, the plugin's version, the server's version, the OS version/name and architecture, the core count for the CPU, the number of players online, the Metrics version.*
**nl.evolutioncoding.areashop** (general classes):
- **AreaShop.java**: Base class of the plugin, handles the startup and shutdown sequence, registers tasks, has useful methods to get dependancies or send messages and also contains a lot of constants.
- **Metrics.java**: Class from MCStats, used to send some anonymous statistics to see how many people use the plugin. Check the results [here](http://mcstats.org/plugin/AreaShop).
- **Updater.java**: Updater class to notify players about new updates, also contains code to download/install updates automatically but that is a feature of the library that is unused.
- **Utils.java**: Contains a few methods that might be useful, currently the conversion from Location to config string and the other way around, creating a comma separated list and getting a Facing from a yaw.
This information will give me an indication how much the plugin is used and encourages me to continue development. Opting out of this service can be done by setting `sendStats` in the config of this plugin to `false`, if you want to disable Metrics for any plugin go to `plugins/Plugin Metrics/config.yml` and change `opt-out` to `true`. Check graphs of the statistics at this page: [mcstats.org/plugin/AreaShop](http://mcstats.org/plugin/AreaShop)
**nl.evolutioncoding.areashop.commands** (command classes):
- **CommandAreaShop.java**: Base abstract class for a command.
- **All others**: A command from AreaShop, extends the CommandAreaShop class and implements the required methods (command start, execution, help entry, tabcomplete).
![Metrics server and player stats](http://i.mcstats.org/AreaShop/Global+Statistics.borderless.png)
**nl.evolutioncoding.areashop.exceptions** (exceptions):
- **RegionCreateException.java**: An exception that is thrown if a region cannot be successfully created (nonexisten world or WorldGuard region).
### Do you want to translate AreaShop?
Help translating the plugin into different languages and to keep the translations up to date. Go to [this page](https://github.com/NLthijs48/AreaShop/wiki/Language-support#translating-on-transifex) for more information. Translating goes through the [Transifex](https://www.transifex.com/projects/p/areashop/) website and is very easy, sending files back and forth is not needed, you can translate lines online and whenever you want. Every line you translate will be saved, no need to do it all at once (this also allows for easy collaboration).
**nl.evolutioncoding.areashop.listeners** (listeners):
- **PlayerLoginListener.java**: Notifies admins about updates, displays messages about rental regions expiring, handles name changes.
- **SignBreakListener.java**: Handles breaking AreaShop signs, blocks it when the user does not have permission, removes the sign if they do have permission.
- **SignChangeListener.java**: Handles placing AreaShop signs, checks if the user has permission and after that creates and adds a region to AreaShop (also triggers a bunch of events that happen when a region is added).
- **SignClickListener.java**: Handles clicking a sign, simply gives the event to the region that the sign is attached to.
**nl.evolutioncoding.areashop.managers** (managers):
- **CommandManager.java**: Entry point for all Bukkit commands, handles commands and tab completions. All command classes are registered here and will be used when a command is received for them.
- **FileManager.java**: Handles all File IO, loads all config files (config.yml, default.yml, groups.yml), all region files and the versions file (used to determine if a file upgrade is required). Also saves all registered region in memory, and has a bunch of methods to get them (get all, get rentals, get buys, get name lists, etc). Manages region groups, these can also be asked for here. Used to add/remove regions, update them (signs and region flags), and has methods to save files (be sure you use the "saveGroupsIsRequired()" function instead of "saveGroupsNow()", files will be saved by a task later or at shutdown, also applies for region saving). Has methods to get a list of regions (AreaShop regions and WorldEdit regions) at a certain location, or those that intersect a WorldEdit selection.
- **LanguageManager.java**: Handles loading and saving of language files. Has methods to get messages from the currently loaded and backup language file (only the selected file and the English one are loaded in memory). If you want to send a message use the "message()" method on AreaShop, that one also handles the sending itself.
- **SignLinkerManager.java**: Handles everyting that has to do with the "/as linksigns" command, acts upon certain events.
**nl.evolutioncoding.areashop.regions** (regions and groups):
- **GeneralRegion.java**: Contains all general methods that a buy and rental region share, also has a couple of enums. Has methods to ask for all properties of a region, and methods to change these properties. Most properties will first be taken from the region file itself, after that from the groups.yml file (if the region is assigned to any groups) and at last from default.yml. If you change a property it will automatically mark the region as "saveRequired", which will make sure that the region is saved to disk the next time the scheduled task comes around or at shutdown. Has commands to teleport players to the region, run events on the region or update the region (signs and region flags). This class should never be contructed, always use BuyRegion or RentRegion. Use "isRentRegion()" and "isBuyRegion()" to determine what an object of this class actually is.
- **BuyRegion.java**: Class for buy regions, inherits everything from GeneralRegion. Adds a price to the region and adds an owner. Has methods to buy/sell the region.
- **RentRegion.java**: Class for rental regions, inherits everything from GeneralRegion. Adds a price, duration and owner to the region. Has methods to rent/unrent the region (for extending simply rent again).
- **RegionGroup.java**: A regiongroup which can be used to apply certain settings to with the config system. Has a list of regions that belong to it. Has methods to get settings, but these are normally not used (getting settings in a region already takes it from the region, a group or from default.yml).
#### TODO
- Guide for saving custom data for the AreaShop regions
- Starting guide, which methods to use to get regions etc.
- -
[![Donate through PayPal to support development](https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?return=http%3A%2F%2Fdev.bukkit.org%2Fbukkit-plugins%2Fregionbuyandrent%2F&cn=Add+special+instructions+to+the+addon+author%28s%29&business=nlthijs48%40gmail.com&bn=PP-DonationsBF%3Abtn_donateCC_LG.gif%3ANonHosted&cancel_return=http%3A%2F%2Fdev.bukkit.org%2Fbukkit-plugins%2Fregionbuyandrent%2F&lc=US&item_name=AreaShop+%28from+Bukkit.org%29&cmd=_donations&rm=1&no_shipping=1&currency_code=USD)
@@ -34,7 +34,7 @@ import com.sk89q.worldedit.world.registry.WorldData;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
public class WorldEditHandler6 extends WorldEditInterface {
public WorldEditHandler6(AreaShopInterface pluginInterface) {
super(pluginInterface);
}
@@ -43,7 +43,7 @@ public class WorldEditHandler6 extends WorldEditInterface {
public boolean restoreRegionBlocks(File file, GeneralRegionInterface regionInterface) {
com.sk89q.worldedit.world.World world = null;
if(regionInterface.getName() != null) {
world = LocalWorldAdapter.adapt(new BukkitWorld(regionInterface.getWorld()));
world = LocalWorldAdapter.adapt(new BukkitWorld(regionInterface.getWorld()));
}
if(world == null) {
pluginInterface.getLogger().info("Did not restore region " + regionInterface.getName() + ", world not found: " + regionInterface.getWorldName());
@@ -57,52 +57,51 @@ public class WorldEditHandler6 extends WorldEditInterface {
// Read the schematic and paste it into the world
Closer closer = Closer.create();
try {
FileInputStream fis = closer.register(new FileInputStream(file));
BufferedInputStream bis = closer.register(new BufferedInputStream(fis));
ClipboardReader reader = ClipboardFormat.SCHEMATIC.getReader(bis);
WorldData worldData = world.getWorldData();
LocalSession session = new LocalSession(pluginInterface.getWorldEdit().getLocalConfiguration());
Clipboard clipboard = reader.read(worldData);
if(clipboard.getDimensions().getY() != regionInterface.getHeight()
try {
FileInputStream fis = closer.register(new FileInputStream(file));
BufferedInputStream bis = closer.register(new BufferedInputStream(fis));
ClipboardReader reader = ClipboardFormat.SCHEMATIC.getReader(bis);
WorldData worldData = world.getWorldData();
LocalSession session = new LocalSession(pluginInterface.getWorldEdit().getLocalConfiguration());
Clipboard clipboard = reader.read(worldData);
if(clipboard.getDimensions().getY() != regionInterface.getHeight()
|| clipboard.getDimensions().getX() != regionInterface.getWidth()
|| clipboard.getDimensions().getZ() != regionInterface.getDepth()) {
pluginInterface.getLogger().warning("Size of the region " + regionInterface.getName() + " is not the same as the schematic to restore!");
pluginInterface.debugI("schematic|region, x:" + clipboard.getDimensions().getX() + "|" + regionInterface.getWidth() + ", y:" + clipboard.getDimensions().getY() + "|" + regionInterface.getHeight() + ", z:" + clipboard.getDimensions().getZ() + "|" + regionInterface.getDepth());
}
clipboard.setOrigin(clipboard.getMinimumPoint());
ClipboardHolder clipboardHolder = new ClipboardHolder(clipboard, worldData);
session.setBlockChangeLimit(pluginInterface.getConfig().getInt("maximumBlocks"));
session.setClipboard(clipboardHolder);
Operation operation = clipboardHolder
.createPaste(editSession, editSession.getWorld().getWorldData())
.to(origin)
.build();
Operations.completeLegacy(operation);
} catch (MaxChangedBlocksException e) {
pluginInterface.getLogger().warning("Exeeded the block limit while restoring schematic of " + regionInterface.getName());
clipboard.setOrigin(clipboard.getMinimumPoint());
ClipboardHolder clipboardHolder = new ClipboardHolder(clipboard, worldData);
session.setBlockChangeLimit(pluginInterface.getConfig().getInt("maximumBlocks"));
session.setClipboard(clipboardHolder);
Operation operation = clipboardHolder
.createPaste(editSession, editSession.getWorld().getWorldData())
.to(origin)
.build();
Operations.completeLegacy(operation);
} catch (MaxChangedBlocksException e) {
pluginInterface.getLogger().warning("Exeeded the block limit while restoring schematic of " + regionInterface.getName());
return false;
} catch (IOException e) {
pluginInterface.getLogger().warning("An error occured while restoring schematic of " + regionInterface.getName() + ", enable debug to see the complete stacktrace");
pluginInterface.debugI(ExceptionUtils.getStackTrace(e));
return false;
} finally {
try {
closer.close();
} catch (IOException ignored) {
}
}
try {
closer.close();
} catch (IOException ignored) {
}
}
editSession.flushQueue();
return true;
}
@Override
public boolean saveRegionBlocks(File file, GeneralRegionInterface regionInterface) {
// Find the correct world wrapper in WorldEdit, seems weird there is no getWorld(String name) method
com.sk89q.worldedit.world.World world = null;
if(regionInterface.getWorld() != null) {
world = LocalWorldAdapter.adapt(new BukkitWorld(regionInterface.getWorld()));
world = LocalWorldAdapter.adapt(new BukkitWorld(regionInterface.getWorld()));
}
if(world == null) {
pluginInterface.getLogger().warning("Did not save region " + regionInterface.getName() + ", world not found: " + regionInterface.getWorldName());
@@ -112,32 +111,32 @@ public class WorldEditHandler6 extends WorldEditInterface {
// Create a clipboard
CuboidRegion selection = new CuboidRegion(world, regionInterface.getRegion().getMinimumPoint(), regionInterface.getRegion().getMaximumPoint());
BlockArrayClipboard clipboard = new BlockArrayClipboard(selection);
clipboard.setOrigin(regionInterface.getRegion().getMinimumPoint());
ForwardExtentCopy copy = new ForwardExtentCopy(editSession, new CuboidRegion(world, regionInterface.getRegion().getMinimumPoint(), regionInterface.getRegion().getMaximumPoint()), clipboard, regionInterface.getRegion().getMinimumPoint());
try {
clipboard.setOrigin(regionInterface.getRegion().getMinimumPoint());
ForwardExtentCopy copy = new ForwardExtentCopy(editSession, new CuboidRegion(world, regionInterface.getRegion().getMinimumPoint(), regionInterface.getRegion().getMaximumPoint()), clipboard, regionInterface.getRegion().getMinimumPoint());
try {
Operations.completeLegacy(copy);
} catch (MaxChangedBlocksException e1) {
pluginInterface.getLogger().warning("Exeeded the block limit while saving schematic of " + regionInterface.getName());
pluginInterface.getLogger().warning("Exeeded the block limit while saving schematic of " + regionInterface.getName());
return false;
}
Closer closer = Closer.create();
try {
FileOutputStream fos = closer.register(new FileOutputStream(file));
BufferedOutputStream bos = closer.register(new BufferedOutputStream(fos));
ClipboardWriter writer = closer.register(ClipboardFormat.SCHEMATIC.getWriter(bos));
writer.write(clipboard, world.getWorldData());
Closer closer = Closer.create();
try {
FileOutputStream fos = closer.register(new FileOutputStream(file));
BufferedOutputStream bos = closer.register(new BufferedOutputStream(fos));
ClipboardWriter writer = closer.register(ClipboardFormat.SCHEMATIC.getWriter(bos));
writer.write(clipboard, world.getWorldData());
} catch (IOException e) {
pluginInterface.getLogger().warning("An error occured while restoring schematic of " + regionInterface.getName() + ", enable debug to see the complete stacktrace");
pluginInterface.getLogger().warning("An error occured while saving schematic of " + regionInterface.getName() + ", enable debug to see the complete stacktrace");
pluginInterface.debugI(ExceptionUtils.getStackTrace(e));
return false;
} finally {
try {
closer.close();
} catch (IOException ignored) {
}
}
try {
closer.close();
} catch (IOException ignored) {
}
}
return true;
}
}
}
BIN
View File
Binary file not shown.