Compare commits

...
46 Commits
Author SHA1 Message Date
Thijs Wiefferink 816d136a62 Change version number to 2.3.0, update languages
- Only English and Dutch are available yet
2016-07-24 21:48:39 +02:00
Thijs Wiefferink 121de7dc7e Add build number option to Maven
- Build number option can be used by Jenkins to add the build number
- Build number of soruce on Github will be #CUSTOM to mark custom builds
- Release versions will not contain a build number
- Closes #185
2016-07-24 20:59:25 +02:00
Thijs Wiefferink f7c86881cc Fix the default flagProfiles settings, fix migration issues. 2016-07-24 20:25:58 +02:00
Thijs Wiefferink 351d51b664 Correct message for reselling region entries. 2016-07-23 19:31:45 +02:00
Thijs Wiefferink 5a28476cf0 Add better limits for messages
- Recursive replacements are handled by catching stackoverflow exceptions
- Messages are limited 30000 in length for the produced JSON string since the client cannot handle more
- Error message print out the message key and start of the message
2016-07-23 17:21:08 +02:00
Thijs Wiefferink 8143bdae27 Add pages to the /as info command to prevent crashes
- Output displayed in pages of 18 (+ header and footer it fills the max of 20 you can see without scrolling)
- Footer shows current and max page, and has buttons to go to next/previous
- Commands accept [group] [page] both as optional arguments, works because page is a number (number as group would be weird)
- Entries show basic info about regions (owner/price/duration), and of course can be clicked to show all info
- Made debug command more generic
- Closes #172
2016-07-23 02:57:31 +02:00
Thijs Wiefferink b62744fe10 Add warnings for missing settings in limit groups.
Closes #164
2016-07-21 23:00:19 +02:00
Thijs Wiefferink fe0b63c760 Remove incorrect check 2016-07-17 23:51:24 +02:00
Thijs Wiefferink def774c7a1 Link javadoc of external classes properly
Classes of Bukkit, WorldGuard and WorldEdit that appear in the javadoc now link to the javadoc of them.
2016-06-27 23:38:44 +02:00
Thijs Wiefferink 7c5cb5f5aa Add javadoc to getApplicableRegions methods 2016-06-27 23:16:21 +02:00
Thijs Wiefferink 8af6e1d6f1 Fix small Maven warning 2016-06-25 22:20:21 +02:00
Thijs Wiefferink e0e6c39dae Fix WorldGuard version detection for later stable releases 2016-06-21 22:42:56 +02:00
Thijs Wiefferink dabe46bd47 Move all sign related methods into SignsFeature
- Each GeneralRegion now has a SignsFeature
- Each SignsFeature contains RegionSign instances representing the actual signs
 - The RegionSign class contains methods to update them etc
 - There is one SignsFeature that is not linked to a region, but registered as listener to update the signs at events
2016-06-20 20:16:13 +02:00
Thijs Wiefferink ec478a05d1 Move region friends code to separate Feature class 2016-06-20 18:22:35 +02:00
Thijs Wiefferink e21c0aafde Add events for adding/removing friends
- Cancellable event for adding friends: AddFriendEvent (region, friend and who is trying to add it available)
- Cancellable event for removing friends: DeleteFriendEvent (region, friend and who is trying to delete it available)
- Closes #54
2016-06-20 17:03:12 +02:00
Thijs Wiefferink 52bf88f4a5 Prevent RemovedRegionEvent triggering twice
Add debug logging for RemovedRegionEvent and AddedRegionEvent
2016-06-20 16:32:10 +02:00
Thijs Wiefferink e4de560a65 Prevent Maven warning
It was trying to include the WorldGuard6 handler class twice in the jar file
2016-06-20 16:28:23 +02:00
Thijs Wiefferink 6481da29e4 Add compatibility for WorldGuard build 1674 and up.
- Added a module for WorldGuard 6.1.3 to adapt to changes in flag related methods.
- No compatibility with build 1672, since there is no dependency in the Maven repo of WorldGuard to target this (this is a dev build though so I don't expect people using it long-term)
- Move properties for setting Java version to the parent pom file (other modules inherit them)
- Move repositories to the parent pom file (other modules inherit them)
- Fix AreaShop module not declaring its parent
- Fixes #170
2016-06-18 23:23:22 +02:00
Thijs Wiefferink f287cc91a6 Remove leftover logging 2016-06-13 21:11:00 +02:00
Thijs Wiefferink 95b7b50346 Add development builds and javadocs links 2016-06-13 20:59:08 +02:00
Thijs Wiefferink 21db2ff440 Improve Maven setup for javadoc and source
- Generate a .jar file with the sources if -Dsources is provided
- Generate javadocs if -Djavadoc=/path/to/destination is provided
- Copy final .jar file to directory if -DcopyResult=/path/to/server is provided
- Adding missing javadoc comments
2016-06-13 20:36:17 +02:00
Thijs Wiefferink 36dd978a92 Cleanup the config file and settings
- Moved scheduled task settings to hiddenConfig.yml (settings that are not visible, but still usable)
- Remove 'postCommandErrors' setting
- Also execute commands defined in 'expirationWarningProfiles' when player is not online
- Move around settings in config.yml and improve explanations
- Closes #168
2016-06-13 17:03:20 +02:00
Thijs Wiefferink 6cc3f2a52f Combine all messages about region not registered
And replace mentions of 'this region' with the actual region name.
2016-06-13 14:47:10 +02:00
Thijs Wiefferink 852731b1ad Add action confirmations when using signs
- Confirmations by default for selling/unrenting by signs, not for renting/buying
- Fixed a bug with message composing which would duplicate hover/click parts.
- Added `/as message <player> <message...>` for internal/console use (not shown in help).
- Closes #50
2016-06-12 21:39:12 +02:00
Thijs Wiefferink 30faa77da9 Fix small error in multiple regions found message 2016-06-12 19:38:05 +02:00
Thijs Wiefferink ec57b922b8 Messages: Version fixes, fallback to plain.
- Properly parse NMS version number to support 1.10
- Fallback to plain messages if sending a fancy message breaks (we try again after restart/reload)
2016-06-12 16:48:47 +02:00
Thijs Wiefferink c2bcc6008b Add hover/click to some forgotten mentions of regions 2016-06-12 13:25:55 +02:00
Thijs Wiefferink 72a05bedce Merge personal/all help messages. 2016-06-11 22:40:09 +02:00
Thijs Wiefferink bc73a8b20d Cleanup links to issues 2016-06-11 17:35:00 +02:00
Thijs Wiefferink 832e8218b6 Add issue template for bugs/feature requests 2016-06-11 17:29:47 +02:00
Thijs Wiefferink 6fcb629133 Move to the me.wiefferink package
The nl.evolutioncoding domain is soon not mine anymore, and this new one I do intend on keeping.
2016-06-07 22:39:45 +02:00
Thijs Wiefferink 7d6a1f35c1 Messages: Add hover/click items to region info
- The hover/click parts only appear if you have permission to use the command linked to it
- Red crosses added next to the friends in the friend list to remove them
2016-06-05 17:04:38 +02:00
Thijs Wiefferink 60257d45c2 Messages: Add a bunch of click/hover actions to '/as info region <region>'
- rent/unrent/buy/sell/extend
- teleport, set teleport location
2016-06-04 22:46:10 +02:00
Thijs Wiefferink 2300227d87 Messages: Fix problem with message insertion sometimes missing leftover part 2016-06-04 20:57:14 +02:00
Thijs Wiefferink b1852b10bb Improve /as me, remove /as info player
And change underline to bold for clickable things (underline leaks through in the next line, giving annoying layout issues)
2016-06-02 22:39:30 +02:00
Thijs Wiefferink 88fdb0c3fc Add 'ALL' flagProfiles state that is always applied
And add block-break and block-place by default.
2016-05-31 22:36:18 +02:00
Christoph Krüger 491e55fc77 Change Vault dependency to Maven repo instead of .jar
Use the Maven repository of Vault instead of including a jar file in the repository.
2016-05-28 23:19:23 +02:00
Thijs Wiefferink c7b0a2c663 Let /as help respect the areashop.help permission
Closes #155
2016-05-28 17:04:06 +02:00
Thijs Wiefferink 868f4d6b58 Events: Add refunded money to UnrentedRegionEvent and SoldRegionEvent
Closes #147
2016-05-28 17:00:52 +02:00
Thijs Wiefferink 0d4b034181 Messages: Detect and stop replacement loops. 2016-05-28 16:51:32 +02:00
Thijs Wiefferink 5f20689ba3 Improve language variable argument detection 2016-05-27 21:01:14 +02:00
Thijs Wiefferink 38b658fccf Message changes: click on regions/players
- Click on region name for region details
- Click on player name for regions of the player
- Click on landlord name for regions of the landlord
- Change color codes to things like [blue] instead of &9 (both are supported though)
2016-05-24 23:18:25 +02:00
Thijs Wiefferink 28ed20c0b5 Message system fixes and improved robustness
Hover/click message for '/as info'
2016-05-23 12:16:19 +02:00
Thijs Wiefferink aaff36b2eb Add hover/click support for messages #18
- Language files support a way to add hover tooltips, click commands and click insert commands (using FancyMessageFormat created together with PhoenixIV)
- Language variables support arguments
- Help listing (/as help) uses the new hover/click things, more to come
- See #18 for the TODO list
2016-05-22 21:36:58 +02:00
Spidev46 49b536cab0 There is a mistake with the messages (#153)
Confirmation message of reselling a region does not go to the old owner.
2016-05-22 21:19:10 +02:00
Thijs Wiefferink 9a9969dea3 Fix problems with detecting most important region when placing a sign.
WorldGuard filters child regions from the ApplicableRegionSet for some reason, so setting parent/child relations on regions messes up the detection because the children can never be found.
2016-03-07 12:21:33 +01:00
113 changed files with 16269 additions and 15539 deletions

No files matched your search

+3 -1
View File
@@ -28,4 +28,6 @@ local.properties
.buildpath
# IntelliJ IDEA
*.iml
*.iml
.idea
dependency-reduced-pom.xml
+122 -48
View File
@@ -1,26 +1,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>nl.evolutioncoding</groupId>
<artifactId>areashop</artifactId>
<packaging>jar</packaging>
<name>AreaShop</name>
<version>2.2.2</version> <!-- Main plugin version -->
<version>2.3.0</version> <!-- Main plugin version -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public</url>
</repository>
<repository>
<id>sk89q-repo-wg</id>
<url>http://maven.sk89q.com/artifactory/repo/</url>
</repository>
</repositories>
<parent>
<groupId>me.wiefferink</groupId>
<artifactId>areashop-parent</artifactId>
<version>parent</version>
</parent>
<dependencies>
<dependency>
@@ -32,7 +22,7 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>nl.evolutioncoding</groupId>
<groupId>me.wiefferink</groupId>
<artifactId>areashop-worldguard-5</artifactId>
<version>WorldGuard-5</version>
<type>jar</type>
@@ -40,7 +30,7 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>nl.evolutioncoding</groupId>
<groupId>me.wiefferink</groupId>
<artifactId>areashop-worldguard-6</artifactId>
<version>WorldGuard-6</version>
<type>jar</type>
@@ -48,7 +38,15 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>nl.evolutioncoding</groupId>
<groupId>me.wiefferink</groupId>
<artifactId>areashop-worldguard-6_1_3</artifactId>
<version>WorldGuard-6_1_3</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>me.wiefferink</groupId>
<artifactId>areashop-interface</artifactId>
<version>AreaShopInterface</version>
<type>jar</type>
@@ -56,7 +54,7 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>nl.evolutioncoding</groupId>
<groupId>me.wiefferink</groupId>
<artifactId>areashop-worldedit-5</artifactId>
<version>WorldEdit-5</version>
<type>jar</type>
@@ -64,7 +62,7 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>nl.evolutioncoding</groupId>
<groupId>me.wiefferink</groupId>
<artifactId>areashop-worldedit-6</artifactId>
<version>WorldEdit-6</version>
<type>jar</type>
@@ -86,18 +84,114 @@
<type>jar</type>
</dependency>
<dependency>
<groupId>net.milkbowl</groupId>
<artifactId>vault</artifactId>
<version>1.4.1</version>
<scope>system</scope>
<systemPath>${basedir}/../dependencies/Vault.jar</systemPath>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<profiles>
<!-- Copy the jar file to a test server, activate by using -DcopyResult="/path/to/test/server" -->
<profile>
<id>test-locally</id>
<activation>
<property>
<name>copyResult</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<configuration>
<target>
<copy file="./target/${project.build.finalName}.jar" tofile="${copyResult}\${project.build.finalName}.jar"/>
</target>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Package the source files in a jar, activate by using -Dsources -->
<profile>
<id>package-sources</id>
<activation>
<property>
<name>sources</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Produce javadoc files, activate by using -Djavadoc -->
<profile>
<id>generate-javadoc</id>
<activation>
<property>
<name>javadoc</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<executions>
<execution>
<phase>package</phase>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<excludePackageNames>me.wiefferink.areashop.lib</excludePackageNames>
<destDir>${javadoc}</destDir>
<links>
<link>https://hub.spigotmc.org/javadocs/bukkit/</link>
<link>http://docs.sk89q.com/worldedit/apidocs/</link>
<link>http://docs.sk89q.com/worldguard/apidocs/</link>
</links>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<directory>target</directory>
<finalName>AreaShop</finalName>
<!-- Include all required resources -->
<resources>
<resource>
<targetPath>.</targetPath>
@@ -106,6 +200,7 @@
<includes>
<include>plugin.yml</include>
<include>config.yml</include>
<include>hiddenConfig.yml</include>
<include>default.yml</include>
<include>README.md</include>
<include>lang/*.yml</include>
@@ -129,27 +224,6 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!-- Copy resulting file to local server, change to your own path -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<copy file="./target/${project.build.finalName}.jar" tofile="C:\Games\Minecraft\Spigot\plugins\${project.build.finalName}.jar"/>
</tasks>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@@ -1,239 +1,239 @@
package nl.evolutioncoding.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.Selection;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.managers.FileManager.AddResult;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion.RegionEvent;
import nl.evolutioncoding.areashop.regions.GeneralRegion.RegionType;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.ArrayList;
import java.util.List;
public class AddCommand extends CommandAreaShop {
public AddCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop add";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.createrent") || target.hasPermission("areashop.createbuy")) {
return plugin.getLanguageManager().getLang("help-add");
}
return null;
}
@Override
public void execute(final CommandSender sender, final String[] args) {
if( !sender.hasPermission("areashop.createrent")
&& !sender.hasPermission("areashop.createrent.member")
&& !sender.hasPermission("areashop.createrent.owner")
&& !sender.hasPermission("areashop.createbuy")
&& !sender.hasPermission("areashop.createbuy.member")
&& !sender.hasPermission("areashop.createbuy.owner")) {
plugin.message(sender, "add-noPermission");
return;
}
if(args.length < 2 || args[1] == null || (!"rent".equals(args[1].toLowerCase()) && !"buy".equals(args[1].toLowerCase()))) {
plugin.message(sender, "add-help");
return;
}
List<ProtectedRegion> regions = new ArrayList<>();
World world;
Player player = null;
if(sender instanceof Player) {
player = (Player)sender;
}
if(args.length == 2) {
if(player == null) {
plugin.message(sender, "cmd-weOnlyByPlayer");
return;
}
Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "cmd-noSelection");
return;
}
world = selection.getWorld();
regions = Utils.getWERegionsInSelection(selection);
if(regions.size() == 0) {
plugin.message(player, "cmd-noWERegionsFound");
return;
}
} else {
if(player != null) {
if(args.length == 4) {
world = Bukkit.getWorld(args[3]);
if(world == null) {
plugin.message(sender, "add-incorrectWorld", args[3]);
return;
}
} else {
world = ((Player)sender).getWorld();
}
} else {
if(args.length < 4) {
plugin.message(sender, "add-specifyWorld");
return;
} else {
world = Bukkit.getWorld(args[3]);
if(world == null) {
plugin.message(sender, "add-incorrectWorld", args[3]);
return;
}
}
}
ProtectedRegion region = plugin.getWorldGuard().getRegionManager(world).getRegion(args[2]);
if(region == null) {
plugin.message(sender, "add-noRegion", args[2]);
return;
}
regions.add(region);
}
final boolean isRent = "rent".equals(args[1].toLowerCase());
final List<ProtectedRegion> finalRegions = regions;
final Player finalPlayer = player;
final World finalWorld = world;
AreaShop.debug("Starting add task with " + regions.size() + " regions");
new BukkitRunnable() {
private int current = 0;
private ArrayList<String> namesSuccess = new ArrayList<>();
private ArrayList<String> namesAlready = new ArrayList<>();
private ArrayList<String> namesBlacklisted = new ArrayList<>();
private ArrayList<String> namesNoPermission = new ArrayList<>();
private ArrayList<String> namesExternal = new ArrayList<>();
@Override
public void run() {
for(int i=0; i<plugin.getConfig().getInt("adding.regionsPerTick"); i++) {
if(current < finalRegions.size()) {
ProtectedRegion region = finalRegions.get(current);
// Determine if the player is an owner or member of the region
boolean isMember = finalPlayer != null && plugin.getWorldGuardHandler().containsMember(region, finalPlayer.getUniqueId());
boolean isOwner = finalPlayer != null && plugin.getWorldGuardHandler().containsMember(region, finalPlayer.getUniqueId());
String type;
if(isRent) {
type = "rent";
} else {
type = "buy";
}
AddResult result = plugin.getFileManager().checkRegionAdd(sender, region, isRent ? RegionType.RENT : RegionType.BUY);
if(result == AddResult.ALREADYADDED) {
namesAlready.add(region.getId());
} else if(result == AddResult.BLACKLISTED) {
namesBlacklisted.add(region.getId());
} else if(result == AddResult.NOPERMISSION) {
namesNoPermission.add(region.getId());
} else {
// Check if the player should be landlord
boolean landlord = (!sender.hasPermission("areashop.create" + type)
&& ((sender.hasPermission("areashop.create" + type + ".owner") && isOwner)
|| (sender.hasPermission("areashop.create" + type + ".member") && isMember)));
if(isRent) {
RentRegion rent = new RentRegion(plugin, region.getId(), finalWorld);
// Set landlord
if(landlord) {
rent.setLandlord(finalPlayer.getUniqueId(), finalPlayer.getName());
}
// Run commands
rent.runEventCommands(RegionEvent.CREATED, true);
plugin.getFileManager().addRent(rent);
rent.handleSchematicEvent(RegionEvent.CREATED);
rent.update();
// Run commands
rent.runEventCommands(RegionEvent.CREATED, false);
namesSuccess.add(region.getId());
} else {
BuyRegion buy = new BuyRegion(plugin, region.getId(), finalWorld);
// Set landlord
if(landlord) {
buy.setLandlord(finalPlayer.getUniqueId(), finalPlayer.getName());
}
// Run commands
buy.runEventCommands(RegionEvent.CREATED, true);
plugin.getFileManager().addBuy(buy);
buy.handleSchematicEvent(RegionEvent.CREATED);
buy.update();
// Run commands
buy.runEventCommands(RegionEvent.CREATED, false);
namesSuccess.add(region.getId());
}
}
current++;
}
}
if(current >= finalRegions.size()) {
if(!namesSuccess.isEmpty()) {
plugin.message(sender, "add-success", args[1], Utils.createCommaSeparatedList(namesSuccess));
}
if(!namesAlready.isEmpty()) {
plugin.message(sender, "add-failed", Utils.createCommaSeparatedList(namesAlready));
}
if(!namesBlacklisted.isEmpty()) {
plugin.message(sender, "add-blacklisted", Utils.createCommaSeparatedList(namesBlacklisted));
}
if(!namesNoPermission.isEmpty()) {
plugin.message(sender, "add-noPermissionRegions", Utils.createCommaSeparatedList(namesNoPermission));
plugin.message(sender, "add-noPermissionOwnerMember");
}
this.cancel();
}
}
}.runTaskTimer(plugin, 1, 1);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
if(sender.hasPermission("areashop.createrent")) {
result.add("rent");
}
if(sender.hasPermission("areashop.createbuy")) {
result.add("buy");
}
} else if(toComplete == 3) {
if(sender instanceof Player) {
Player player = (Player)sender;
if(sender.hasPermission("areashop.createrent") || sender.hasPermission("areashop.createbuy")) {
for(ProtectedRegion region : plugin.getWorldGuard().getRegionManager(player.getWorld()).getRegions().values()) {
result.add(region.getId());
}
}
}
}
return result;
}
}
package me.wiefferink.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.Selection;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.managers.FileManager;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeSet;
public class AddCommand extends CommandAreaShop {
public AddCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop add";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.createrent") || target.hasPermission("areashop.createbuy")) {
return "help-add";
}
return null;
}
@Override
public void execute(final CommandSender sender, final String[] args) {
if( !sender.hasPermission("areashop.createrent")
&& !sender.hasPermission("areashop.createrent.member")
&& !sender.hasPermission("areashop.createrent.owner")
&& !sender.hasPermission("areashop.createbuy")
&& !sender.hasPermission("areashop.createbuy.member")
&& !sender.hasPermission("areashop.createbuy.owner")) {
plugin.message(sender, "add-noPermission");
return;
}
if(args.length < 2 || args[1] == null || (!"rent".equals(args[1].toLowerCase()) && !"buy".equals(args[1].toLowerCase()))) {
plugin.message(sender, "add-help");
return;
}
List<ProtectedRegion> regions = new ArrayList<>();
World world;
Player player = null;
if(sender instanceof Player) {
player = (Player)sender;
}
if(args.length == 2) {
if(player == null) {
plugin.message(sender, "cmd-weOnlyByPlayer");
return;
}
Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "cmd-noSelection");
return;
}
world = selection.getWorld();
regions = Utils.getWERegionsInSelection(selection);
if(regions.size() == 0) {
plugin.message(player, "cmd-noWERegionsFound");
return;
}
} else {
if(player != null) {
if(args.length == 4) {
world = Bukkit.getWorld(args[3]);
if(world == null) {
plugin.message(sender, "add-incorrectWorld", args[3]);
return;
}
} else {
world = ((Player)sender).getWorld();
}
} else {
if(args.length < 4) {
plugin.message(sender, "add-specifyWorld");
return;
} else {
world = Bukkit.getWorld(args[3]);
if(world == null) {
plugin.message(sender, "add-incorrectWorld", args[3]);
return;
}
}
}
ProtectedRegion region = plugin.getWorldGuard().getRegionManager(world).getRegion(args[2]);
if(region == null) {
plugin.message(sender, "add-noRegion", args[2]);
return;
}
regions.add(region);
}
final boolean isRent = "rent".equals(args[1].toLowerCase());
final List<ProtectedRegion> finalRegions = regions;
final Player finalPlayer = player;
final World finalWorld = world;
AreaShop.debug("Starting add task with " + regions.size() + " regions");
new BukkitRunnable() {
private int current = 0;
private TreeSet<GeneralRegion> regionsSuccess = new TreeSet<>();
private TreeSet<GeneralRegion> regionsAlready = new TreeSet<>();
private TreeSet<String> namesBlacklisted = new TreeSet<>();
private TreeSet<String> namesNoPermission = new TreeSet<>();
private TreeSet<String> namesExternal = new TreeSet<>();
@Override
public void run() {
for(int i=0; i<plugin.getConfig().getInt("adding.regionsPerTick"); i++) {
if(current < finalRegions.size()) {
ProtectedRegion region = finalRegions.get(current);
// Determine if the player is an owner or member of the region
boolean isMember = finalPlayer != null && plugin.getWorldGuardHandler().containsMember(region, finalPlayer.getUniqueId());
boolean isOwner = finalPlayer != null && plugin.getWorldGuardHandler().containsMember(region, finalPlayer.getUniqueId());
String type;
if(isRent) {
type = "rent";
} else {
type = "buy";
}
FileManager.AddResult result = plugin.getFileManager().checkRegionAdd(sender, region, isRent ? GeneralRegion.RegionType.RENT : GeneralRegion.RegionType.BUY);
if(result == FileManager.AddResult.ALREADYADDED) {
regionsAlready.add(plugin.getFileManager().getRegion(region.getId()));
} else if(result == FileManager.AddResult.BLACKLISTED) {
namesBlacklisted.add(region.getId());
} else if(result == FileManager.AddResult.NOPERMISSION) {
namesNoPermission.add(region.getId());
} else {
// Check if the player should be landlord
boolean landlord = (!sender.hasPermission("areashop.create" + type)
&& ((sender.hasPermission("areashop.create" + type + ".owner") && isOwner)
|| (sender.hasPermission("areashop.create" + type + ".member") && isMember)));
if(isRent) {
RentRegion rent = new RentRegion(plugin, region.getId(), finalWorld);
// Set landlord
if(landlord) {
rent.setLandlord(finalPlayer.getUniqueId(), finalPlayer.getName());
}
// Run commands
rent.runEventCommands(GeneralRegion.RegionEvent.CREATED, true);
plugin.getFileManager().addRent(rent);
rent.handleSchematicEvent(GeneralRegion.RegionEvent.CREATED);
rent.update();
// Run commands
rent.runEventCommands(GeneralRegion.RegionEvent.CREATED, false);
regionsSuccess.add(rent);
} else {
BuyRegion buy = new BuyRegion(plugin, region.getId(), finalWorld);
// Set landlord
if(landlord) {
buy.setLandlord(finalPlayer.getUniqueId(), finalPlayer.getName());
}
// Run commands
buy.runEventCommands(GeneralRegion.RegionEvent.CREATED, true);
plugin.getFileManager().addBuy(buy);
buy.handleSchematicEvent(GeneralRegion.RegionEvent.CREATED);
buy.update();
// Run commands
buy.runEventCommands(GeneralRegion.RegionEvent.CREATED, false);
regionsSuccess.add(buy);
}
}
current++;
}
}
if(current >= finalRegions.size()) {
if(!regionsSuccess.isEmpty()) {
plugin.message(sender, "add-success", args[1], Utils.combinedMessage(regionsSuccess, "region"));
}
if(!regionsAlready.isEmpty()) {
plugin.message(sender, "add-failed", Utils.combinedMessage(regionsAlready, "region"));
}
if(!namesBlacklisted.isEmpty()) {
plugin.message(sender, "add-blacklisted", Utils.createCommaSeparatedList(namesBlacklisted));
}
if(!namesNoPermission.isEmpty()) {
plugin.message(sender, "add-noPermissionRegions", Utils.createCommaSeparatedList(namesNoPermission));
plugin.message(sender, "add-noPermissionOwnerMember");
}
this.cancel();
}
}
}.runTaskTimer(plugin, 1, 1);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
if(sender.hasPermission("areashop.createrent")) {
result.add("rent");
}
if(sender.hasPermission("areashop.createbuy")) {
result.add("buy");
}
} else if(toComplete == 3) {
if(sender instanceof Player) {
Player player = (Player)sender;
if(sender.hasPermission("areashop.createrent") || sender.hasPermission("areashop.createbuy")) {
for(ProtectedRegion region : plugin.getWorldGuard().getRegionManager(player.getWorld()).getRegions().values()) {
result.add(region.getId());
}
}
}
}
return result;
}
}
@@ -1,145 +1,146 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class AddfriendCommand extends CommandAreaShop {
public AddfriendCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop addfriend";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.addfriendall")) {
return plugin.getLanguageManager().getLang("help-addFriendAll");
} else if(target.hasPermission("areashop.addfriend")) {
return plugin.getLanguageManager().getLang("help-addFriend");
}
return null;
}
@SuppressWarnings("deprecation")
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.addfriend") && !sender.hasPermission("areashop.addfriendall")) {
plugin.message(sender, "addfriend-noPermission");
return;
}
if(args.length < 2) {
plugin.message(sender, "addfriend-help");
return;
}
GeneralRegion region;
if(args.length <= 2) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[2]);
return;
}
}
if(sender.hasPermission("areashop.addfriendall")) {
if((region.isRentRegion() && !((RentRegion)region).isRented())
|| (region.isBuyRegion() && !((BuyRegion)region).isSold())) {
plugin.message(sender, "addfriend-noOwner", region);
return;
}
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
if(friend.getLastPlayed() == 0 && !plugin.getConfig().getBoolean("addFriendNotExistingPlayers")) {
plugin.message(sender, "addfriend-notVisited", args[1], region);
return;
}
if(region.getFriends().contains(friend.getUniqueId())) {
plugin.message(sender, "addfriend-alreadyAdded", friend.getName(), region);
return;
}
if(region.isOwner(friend.getUniqueId())) {
plugin.message(sender, "addfriend-self", friend.getName(), region);
return;
}
region.addFriend(friend.getUniqueId());
region.update();
plugin.message(sender, "addfriend-successOther", friend.getName(), region);
} else {
if(sender.hasPermission("areashop.addfriend") && sender instanceof Player) {
if(region.isOwner((Player)sender)) {
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
if(friend.getLastPlayed() == 0 && !plugin.getConfig().getBoolean("addFriendNotExistingPlayers")) {
plugin.message(sender, "addfriend-notVisited", args[1], region);
return;
}
if(region.getFriends().contains(friend.getUniqueId())) {
plugin.message(sender, "addfriend-alreadyAdded", friend.getName(), region);
return;
}
if(region.isOwner(friend.getUniqueId())) {
plugin.message(sender, "addfriend-self", friend.getName(), region);
return;
}
region.addFriend(friend.getUniqueId());
region.update();
plugin.message(sender, "addfriend-success", friend.getName(), region);
} else {
plugin.message(sender, "addfriend-noPermissionOther", region);
}
} else {
plugin.message(sender, "addfriend-noPermission", region);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(toComplete == 3) {
result.addAll(plugin.getFileManager().getRegionNames());
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class AddfriendCommand extends CommandAreaShop {
public AddfriendCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop addfriend";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.addfriendall") || target.hasPermission("areashop.addfriend")) {
return "help-addFriend";
}
return null;
}
@SuppressWarnings("deprecation")
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.addfriend") && !sender.hasPermission("areashop.addfriendall")) {
plugin.message(sender, "addfriend-noPermission");
return;
}
if(args.length < 2) {
plugin.message(sender, "addfriend-help");
return;
}
GeneralRegion region;
if(args.length <= 2) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[2]);
return;
}
}
if(sender.hasPermission("areashop.addfriendall")) {
if((region.isRentRegion() && !((RentRegion)region).isRented())
|| (region.isBuyRegion() && !((BuyRegion)region).isSold())) {
plugin.message(sender, "addfriend-noOwner", region);
return;
}
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
if(friend.getLastPlayed() == 0 && !plugin.getConfig().getBoolean("addFriendNotExistingPlayers")) {
plugin.message(sender, "addfriend-notVisited", args[1], region);
return;
}
if(region.getFriendsFeature().getFriends().contains(friend.getUniqueId())) {
plugin.message(sender, "addfriend-alreadyAdded", friend.getName(), region);
return;
}
if(region.isOwner(friend.getUniqueId())) {
plugin.message(sender, "addfriend-self", friend.getName(), region);
return;
}
if(region.getFriendsFeature().addFriend(friend.getUniqueId(), sender)) {
region.update();
plugin.message(sender, "addfriend-successOther", friend.getName(), region);
}
} else {
if(sender.hasPermission("areashop.addfriend") && sender instanceof Player) {
if(region.isOwner((Player)sender)) {
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
if(friend.getLastPlayed() == 0 && !plugin.getConfig().getBoolean("addFriendNotExistingPlayers")) {
plugin.message(sender, "addfriend-notVisited", args[1], region);
return;
}
if(region.getFriendsFeature().getFriends().contains(friend.getUniqueId())) {
plugin.message(sender, "addfriend-alreadyAdded", friend.getName(), region);
return;
}
if(region.isOwner(friend.getUniqueId())) {
plugin.message(sender, "addfriend-self", friend.getName(), region);
return;
}
if(region.getFriendsFeature().addFriend(friend.getUniqueId(), sender)) {
region.update();
plugin.message(sender, "addfriend-success", friend.getName(), region);
}
} else {
plugin.message(sender, "addfriend-noPermissionOther", region);
}
} else {
plugin.message(sender, "addfriend-noPermission", region);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(toComplete == 3) {
result.addAll(plugin.getFileManager().getRegionNames());
}
return result;
}
}
@@ -1,129 +1,130 @@
package nl.evolutioncoding.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.material.Sign;
import org.bukkit.util.BlockIterator;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class AddsignCommand extends CommandAreaShop {
public AddsignCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop addsign";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.addsign")) {
return plugin.getLanguageManager().getLang("help-addsign");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.addsign")) {
plugin.message(sender, "addsign-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
// Get the sign
Block block = null;
BlockIterator blockIterator = new BlockIterator(player, 100);
while(blockIterator.hasNext() && block == null) {
Block next = blockIterator.next();
if(next.getType() != Material.AIR) {
block = next;
}
}
if(block == null || !(block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)) {
plugin.message(sender, "addsign-noSign");
return;
}
GeneralRegion region;
if(args.length > 1) {
// Get region by argument
region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(sender, "addsign-noRegion", args[1]);
return;
}
} else {
// Get region by sign position
List<GeneralRegion> regions = Utils.getASRegionsInSelection(new CuboidSelection(block.getWorld(), block.getLocation(), block.getLocation()));
if(regions.isEmpty()) {
plugin.message(sender, "addsign-noRegions");
return;
} else if(regions.size() > 1) {
plugin.message(sender, "addsign-couldNotDetect", regions.get(0).getName(), regions.get(1).getName());
return;
}
region = regions.get(0);
}
Sign sign = (Sign)block.getState().getData();
String profile = null;
if(args.length > 2) {
profile = args[2];
Set<String> profiles = plugin.getConfig().getConfigurationSection("signProfiles").getKeys(false);
if(!profiles.contains(profile)) {
plugin.message(sender, "addsign-wrongProfile", Utils.createCommaSeparatedList(profiles), region);
return;
}
}
GeneralRegion signRegion = plugin.getFileManager().getRegionBySignLocation(block.getLocation());
if(signRegion != null) {
plugin.message(sender, "addsign-alreadyRegistered", signRegion);
return;
}
region.addSign(block.getLocation(), block.getType(), sign.getFacing(), profile);
if(profile == null) {
plugin.message(sender, "addsign-success", region);
} else {
plugin.message(sender, "addsign-successProfile", profile, region);
}
region.update();
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
result.addAll(plugin.getConfig().getStringList("signProfiles"));
}
return result;
}
}
package me.wiefferink.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.features.SignsFeature;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.material.Sign;
import org.bukkit.util.BlockIterator;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class AddsignCommand extends CommandAreaShop {
public AddsignCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop addsign";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.addsign")) {
return "help-addsign";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.addsign")) {
plugin.message(sender, "addsign-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
// Get the sign
Block block = null;
BlockIterator blockIterator = new BlockIterator(player, 100);
while(blockIterator.hasNext() && block == null) {
Block next = blockIterator.next();
if(next.getType() != Material.AIR) {
block = next;
}
}
if(block == null || !(block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)) {
plugin.message(sender, "addsign-noSign");
return;
}
GeneralRegion region;
if(args.length > 1) {
// Get region by argument
region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[1]);
return;
}
} else {
// Get region by sign position
List<GeneralRegion> regions = Utils.getASRegionsInSelection(new CuboidSelection(block.getWorld(), block.getLocation(), block.getLocation()));
if(regions.isEmpty()) {
plugin.message(sender, "addsign-noRegions");
return;
} else if(regions.size() > 1) {
plugin.message(sender, "addsign-couldNotDetect", regions.get(0).getName(), regions.get(1).getName());
return;
}
region = regions.get(0);
}
Sign sign = (Sign)block.getState().getData();
String profile = null;
if(args.length > 2) {
profile = args[2];
Set<String> profiles = plugin.getConfig().getConfigurationSection("signProfiles").getKeys(false);
if(!profiles.contains(profile)) {
plugin.message(sender, "addsign-wrongProfile", Utils.createCommaSeparatedList(profiles), region);
return;
}
}
SignsFeature.RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if(regionSign != null) {
plugin.message(sender, "addsign-alreadyRegistered", regionSign.getRegion());
return;
}
region.getSignsFeature().addSign(block.getLocation(), block.getType(), sign.getFacing(), profile);
if(profile == null) {
plugin.message(sender, "addsign-success", region);
} else {
plugin.message(sender, "addsign-successProfile", profile, region);
}
region.update();
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
result.addAll(plugin.getConfig().getStringList("signProfiles"));
}
return result;
}
}
@@ -1,74 +1,74 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class BuyCommand extends CommandAreaShop {
public BuyCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop buy";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.buy")) {
return plugin.getLanguageManager().getLang("help-buy");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.buy")) {
plugin.message(sender, "buy-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
if(args.length > 1 && args[1] != null) {
BuyRegion region = plugin.getFileManager().getBuy(args[1]);
if(region == null) {
plugin.message(player, "buy-notBuyable");
} else {
region.buy(player);
}
} else {
// get the region by location
List<BuyRegion> regions = Utils.getApplicableBuyRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
} else {
regions.get(0).buy(player);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(!region.isSold()) {
result.add(region.getName());
}
}
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class BuyCommand extends CommandAreaShop {
public BuyCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop buy";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.buy")) {
return "help-buy";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.buy")) {
plugin.message(sender, "buy-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
if(args.length > 1 && args[1] != null) {
BuyRegion region = plugin.getFileManager().getBuy(args[1]);
if(region == null) {
plugin.message(player, "buy-notBuyable");
} else {
region.buy(player);
}
} else {
// get the region by location
List<BuyRegion> regions = Utils.getApplicableBuyRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
} else {
regions.get(0).buy(player);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(!region.isSold()) {
result.add(region.getName());
}
}
}
return result;
}
}
@@ -1,67 +1,68 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.List;
/**
* Abstract class for generalising command classes
*/
public abstract class CommandAreaShop {
AreaShop plugin;
/**
* Save the instance of the main plugin class
* @param plugin The main plugin
*/
public CommandAreaShop(AreaShop plugin) {
this.plugin = plugin;
}
public boolean canExecute(Command command, String[] args) {
String commandString = command.getName();
for(String argument : args) {
commandString += " " + argument;
}
if(commandString.length() > getCommandStart().length()) {
return commandString.toLowerCase().startsWith(getCommandStart().toLowerCase() + " ");
}
return commandString.toLowerCase().startsWith(getCommandStart().toLowerCase());
}
/**
* Get a list of string to complete a command with (raw list, not matching ones not filtered out)
* @param toComplete The number of the argument that has to be completed
* @param start The already given start of the command
* @return A collection with all the possibilities for argument to complete
*/
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
return new ArrayList<>();
}
/**
* Get the argument that comes after the base command that this command reacts to
* @return The string that should be in front of the command for this class to act
*/
public abstract String getCommandStart();
/**
* Returns the correct help string for the reciever
* @param target The CommandSender that the help message is for
* @return The help message according to the permissions of the reciever
*/
public abstract String getHelp(CommandSender target);
/**
* Execute a (sub)command if the conditions are met
* @param sender The commandSender that executed the command
* @param args The arguments that are given
*/
public abstract void execute(CommandSender sender, String[] args);
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.List;
/**
* Abstract class for generalising command classes
*/
public abstract class CommandAreaShop {
AreaShop plugin;
/**
* Save the instance of the main plugin class
* @param plugin The main plugin
*/
public CommandAreaShop(AreaShop plugin) {
this.plugin = plugin;
}
public boolean canExecute(Command command, String[] args) {
String commandString = command.getName();
for(String argument : args) {
commandString += " " + argument;
}
if(commandString.length() > getCommandStart().length()) {
return commandString.toLowerCase().startsWith(getCommandStart().toLowerCase() + " ");
}
return commandString.toLowerCase().startsWith(getCommandStart().toLowerCase());
}
/**
* Get a list of string to complete a command with (raw list, not matching ones not filtered out)
* @param toComplete The number of the argument that has to be completed
* @param start The already given start of the command
* @param sender The CommandSender that wants to tab complete
* @return A collection with all the possibilities for argument to complete
*/
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
return new ArrayList<>();
}
/**
* Get the argument that comes after the base command that this command reacts to
* @return The string that should be in front of the command for this class to act
*/
public abstract String getCommandStart();
/**
* Returns the correct help string key to be used on the help page
* @param target The CommandSender that the help message is for
* @return The help message key according to the permissions of the reciever
*/
public abstract String getHelp(CommandSender target);
/**
* Execute a (sub)command if the conditions are met
* @param sender The commandSender that executed the command
* @param args The arguments that are given
*/
public abstract void execute(CommandSender sender, String[] args);
}
@@ -1,139 +1,136 @@
package nl.evolutioncoding.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.Selection;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.events.notify.RemovedRegionEvent;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class DelCommand extends CommandAreaShop {
public DelCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop del";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.destroyrent") || target.hasPermission("areashop.destroybuy")) {
return plugin.getLanguageManager().getLang("help-del");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if( !sender.hasPermission("areashop.destroybuy")
&& !sender.hasPermission("areashop.destroybuy.landlord")
&& !sender.hasPermission("areashop.destroyrent")
&& !sender.hasPermission("areashop.destroyrent.landlord")) {
plugin.message(sender, "del-noPermission");
return;
}
if(args.length < 2) {
// Only players can have a selection
if(!(sender instanceof Player)) {
plugin.message(sender, "cmd-weOnlyByPlayer");
return;
}
Player player = (Player)sender;
Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "cmd-noSelection");
return;
}
List<GeneralRegion> regions = Utils.getASRegionsInSelection(selection);
if(regions == null || regions.size() == 0) {
plugin.message(player, "cmd-noRegionsFound");
return;
}
// Start removing the regions that he has permission for
ArrayList<String> namesSuccess = new ArrayList<>();
ArrayList<String> namesFailed = new ArrayList<>();
for(GeneralRegion region : regions) {
boolean isLandlord = region.isLandlord(((Player)sender).getUniqueId());
if(region.isRentRegion()) {
if(!sender.hasPermission("areashop.destroyrent") && !(isLandlord && sender.hasPermission("areashop.destroyrent.landlord"))) {
namesFailed.add(region.getName());
} else {
plugin.getFileManager().removeRent((RentRegion)region, true);
namesSuccess.add(region.getName());
}
} else if(region.isBuyRegion()) {
if(!sender.hasPermission("areashop.destroybuy") && !(isLandlord && sender.hasPermission("areashop.destroybuy.landlord"))) {
namesFailed.add(region.getName());
} else {
plugin.getFileManager().removeBuy((BuyRegion)region, true);
namesSuccess.add(region.getName());
}
}
Bukkit.getPluginManager().callEvent(new RemovedRegionEvent(region));
}
// send messages
if(namesSuccess.size() != 0) {
plugin.message(sender, "del-success", Utils.createCommaSeparatedList(namesSuccess));
}
if(namesFailed.size() != 0) {
plugin.message(sender, "del-failed", Utils.createCommaSeparatedList(namesFailed));
}
} else {
GeneralRegion region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(sender, "del-noRegion", args[1]);
return;
}
boolean isLandlord = sender instanceof Player && region.isLandlord(((Player)sender).getUniqueId());
if(region.isRentRegion()) {
// Remove the rent if the player has permission
if(sender.hasPermission("areashop.destroyrent") || (isLandlord && sender.hasPermission("areashop.destroyrent.landlord"))) {
plugin.getFileManager().removeRent((RentRegion)region, true);
plugin.message(sender, "destroy-successRent", region);
} else {
plugin.message(sender, "destroy-noPermissionRent", region);
}
} else if(region.isBuyRegion()) {
// Remove the buy if the player has permission
if(sender.hasPermission("areashop.destroybuy") || (isLandlord && sender.hasPermission("areashop.destroybuy.landlord"))) {
plugin.getFileManager().removeBuy((BuyRegion)region, true);
plugin.message(sender, "destroy-successBuy", region);
} else {
plugin.message(sender, "destroy-noPermissionBuy", region);
}
}
Bukkit.getPluginManager().callEvent(new RemovedRegionEvent(region));
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getRegionNames();
}
return result;
}
}
package me.wiefferink.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.Selection;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeSet;
public class DelCommand extends CommandAreaShop {
public DelCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop del";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.destroyrent") || target.hasPermission("areashop.destroybuy")) {
return "help-del";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if( !sender.hasPermission("areashop.destroybuy")
&& !sender.hasPermission("areashop.destroybuy.landlord")
&& !sender.hasPermission("areashop.destroyrent")
&& !sender.hasPermission("areashop.destroyrent.landlord")) {
plugin.message(sender, "del-noPermission");
return;
}
if(args.length < 2) {
// Only players can have a selection
if(!(sender instanceof Player)) {
plugin.message(sender, "cmd-weOnlyByPlayer");
return;
}
Player player = (Player)sender;
Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "cmd-noSelection");
return;
}
List<GeneralRegion> regions = Utils.getASRegionsInSelection(selection);
if(regions == null || regions.size() == 0) {
plugin.message(player, "cmd-noRegionsFound");
return;
}
// Start removing the regions that he has permission for
ArrayList<String> namesSuccess = new ArrayList<>();
TreeSet<GeneralRegion> namesFailed = new TreeSet<>();
for(GeneralRegion region : regions) {
boolean isLandlord = region.isLandlord(((Player)sender).getUniqueId());
if(region.isRentRegion()) {
if(!sender.hasPermission("areashop.destroyrent") && !(isLandlord && sender.hasPermission("areashop.destroyrent.landlord"))) {
namesFailed.add(region);
} else {
plugin.getFileManager().removeRent((RentRegion)region, true);
namesSuccess.add(region.getName());
}
} else if(region.isBuyRegion()) {
if(!sender.hasPermission("areashop.destroybuy") && !(isLandlord && sender.hasPermission("areashop.destroybuy.landlord"))) {
namesFailed.add(region);
} else {
plugin.getFileManager().removeBuy((BuyRegion)region, true);
namesSuccess.add(region.getName());
}
}
}
// send messages
if(namesSuccess.size() != 0) {
plugin.message(sender, "del-success", Utils.createCommaSeparatedList(namesSuccess));
}
if(namesFailed.size() != 0) {
plugin.message(sender, "del-failed", Utils.combinedMessage(namesFailed, "region"));
}
} else {
GeneralRegion region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[1]);
return;
}
boolean isLandlord = sender instanceof Player && region.isLandlord(((Player)sender).getUniqueId());
if(region.isRentRegion()) {
// Remove the rent if the player has permission
if(sender.hasPermission("areashop.destroyrent") || (isLandlord && sender.hasPermission("areashop.destroyrent.landlord"))) {
plugin.getFileManager().removeRent((RentRegion)region, true);
plugin.message(sender, "destroy-successRent", region);
} else {
plugin.message(sender, "destroy-noPermissionRent", region);
}
} else if(region.isBuyRegion()) {
// Remove the buy if the player has permission
if(sender.hasPermission("areashop.destroybuy") || (isLandlord && sender.hasPermission("areashop.destroybuy.landlord"))) {
plugin.getFileManager().removeBuy((BuyRegion)region, true);
plugin.message(sender, "destroy-successBuy", region);
} else {
plugin.message(sender, "destroy-noPermissionBuy", region);
}
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getRegionNames();
}
return result;
}
}
@@ -1,127 +1,144 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class DelfriendCommand extends CommandAreaShop {
public DelfriendCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop delfriend";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.delfriendall")) {
return plugin.getLanguageManager().getLang("help-delFriendAll");
} else if(target.hasPermission("areashop.delfriend")) {
return plugin.getLanguageManager().getLang("help-delFriend");
}
return null;
}
@SuppressWarnings("deprecation")
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.delfriend") && !sender.hasPermission("areashop.delfriendall")) {
plugin.message(sender, "delfriend-noPermission");
return;
}
if(args.length < 2) {
plugin.message(sender, "delfriend-help");
return;
}
GeneralRegion region;
if(args.length <= 2) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[2]);
return;
}
}
if(sender.hasPermission("areashop.delfriendall")) {
if((region.isRentRegion() && !((RentRegion)region).isRented())
|| (region.isBuyRegion() && !((BuyRegion)region).isSold())) {
plugin.message(sender, "delfriend-noOwner", region);
return;
}
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
if(!region.getFriends().contains(friend.getUniqueId())) {
plugin.message(sender, "delfriend-notAdded", friend.getName(), region);
return;
}
region.deleteFriend(friend.getUniqueId());
region.update();
plugin.message(sender, "delfriend-successOther", friend.getName(), region);
} else {
if(sender.hasPermission("areashop.delfriend") && sender instanceof Player) {
if(region.isOwner((Player)sender)) {
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
if(!region.getFriends().contains(friend.getUniqueId())) {
plugin.message(sender, "delfriend-notAdded", friend.getName(), region);
return;
}
region.deleteFriend(friend.getUniqueId());
region.update();
plugin.message(sender, "delfriend-success", friend.getName(), region);
} else {
plugin.message(sender, "delfriend-noPermissionOther", region);
}
} else {
plugin.message(sender, "delfriend-noPermission", region);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(toComplete == 3) {
result.addAll(plugin.getFileManager().getRegionNames());
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class DelfriendCommand extends CommandAreaShop {
public DelfriendCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop delfriend";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.delfriendall") || target.hasPermission("areashop.delfriend")) {
return "help-delFriend";
}
return null;
}
/**
* Check if a person can remove friends
* @param person The person to check
* @param region The region to check for
* @return true if the person can remove friends, otherwise false
*/
public static boolean canUse(CommandSender person, GeneralRegion region) {
if(person.hasPermission("areashop.delfriendall")) {
return true;
}
if(person instanceof Player) {
Player player = (Player)person;
return region.isOwner(player) && player.hasPermission("areashop.delfriend");
}
return false;
}
@SuppressWarnings("deprecation")
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.delfriend") && !sender.hasPermission("areashop.delfriendall")) {
plugin.message(sender, "delfriend-noPermission");
return;
}
if(args.length < 2) {
plugin.message(sender, "delfriend-help");
return;
}
GeneralRegion region;
if(args.length <= 2) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[2]);
return;
}
}
if(sender.hasPermission("areashop.delfriendall")) {
if((region.isRentRegion() && !((RentRegion)region).isRented())
|| (region.isBuyRegion() && !((BuyRegion)region).isSold())) {
plugin.message(sender, "delfriend-noOwner", region);
return;
}
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
if(!region.getFriendsFeature().getFriends().contains(friend.getUniqueId())) {
plugin.message(sender, "delfriend-notAdded", friend.getName(), region);
return;
}
if(region.getFriendsFeature().deleteFriend(friend.getUniqueId(), sender)) {
region.update();
plugin.message(sender, "delfriend-successOther", friend.getName(), region);
}
} else {
if(sender.hasPermission("areashop.delfriend") && sender instanceof Player) {
if(region.isOwner((Player)sender)) {
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
if(!region.getFriendsFeature().getFriends().contains(friend.getUniqueId())) {
plugin.message(sender, "delfriend-notAdded", friend.getName(), region);
return;
}
if(region.getFriendsFeature().deleteFriend(friend.getUniqueId(), sender)) {
region.update();
plugin.message(sender, "delfriend-success", friend.getName(), region);
}
} else {
plugin.message(sender, "delfriend-noPermissionOther", region);
}
} else {
plugin.message(sender, "delfriend-noPermission", region);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(toComplete == 3) {
result.addAll(plugin.getFileManager().getRegionNames());
}
return result;
}
}
@@ -1,83 +1,82 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.util.BlockIterator;
import java.util.ArrayList;
import java.util.List;
public class DelsignCommand extends CommandAreaShop {
public DelsignCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop delsign";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.delsign")) {
return plugin.getLanguageManager().getLang("help-delsign");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.delsign")) {
plugin.message(sender, "delsign-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
// Get the sign
Block block = null;
BlockIterator blockIterator = new BlockIterator(player, 100);
while(blockIterator.hasNext() && block == null) {
Block next = blockIterator.next();
if(next.getType() != Material.AIR) {
block = next;
}
}
if(block == null || !(block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)) {
plugin.message(sender, "delsign-noSign");
return;
}
GeneralRegion region = plugin.getFileManager().getRegionBySignLocation(block.getLocation());
if(region == null) {
plugin.message(sender, "delsign-noRegion");
return;
}
plugin.message(sender, "delsign-success", region);
region.removeSign(block.getLocation());
region.update();
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
return new ArrayList<>();
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.features.SignsFeature;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.util.BlockIterator;
import java.util.ArrayList;
import java.util.List;
public class DelsignCommand extends CommandAreaShop {
public DelsignCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop delsign";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.delsign")) {
return "help-delsign";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.delsign")) {
plugin.message(sender, "delsign-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
// Get the sign
Block block = null;
BlockIterator blockIterator = new BlockIterator(player, 100);
while(blockIterator.hasNext() && block == null) {
Block next = blockIterator.next();
if(next.getType() != Material.AIR) {
block = next;
}
}
if(block == null || !(block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)) {
plugin.message(sender, "delsign-noSign");
return;
}
SignsFeature.RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if(regionSign == null) {
plugin.message(sender, "delsign-noRegion");
return;
}
plugin.message(sender, "delsign-success", regionSign.getRegion());
regionSign.remove();
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
return new ArrayList<>();
}
}
@@ -1,183 +1,184 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.RegionGroup;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class FindCommand extends CommandAreaShop {
public FindCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop find";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.find")) {
return plugin.getLanguageManager().getLang("help-find");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.find")) {
plugin.message(sender, "find-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
if(args.length <= 1 || args[1] == null || (!args[1].equalsIgnoreCase("buy") && !args[1].equalsIgnoreCase("rent"))) {
plugin.message(sender, "find-help");
return;
}
Player player = (Player)sender;
double balance = 0.0;
if(plugin.getEconomy() != null) {
balance = plugin.getEconomy().getBalance(player);
}
double maxPrice = 0;
boolean maxPriceSet = false;
RegionGroup group = null;
// Parse optional price argument
if(args.length >= 3) {
try {
maxPrice = Double.parseDouble(args[2]);
maxPriceSet = true;
} catch(NumberFormatException e) {
plugin.message(sender, "find-wrongMaxPrice", args[2]);
return;
}
}
// Parse optional group argument
if(args.length >= 4) {
group = plugin.getFileManager().getGroup(args[3]);
if(group == null) {
plugin.message(sender, "find-wrongGroup", args[3]);
return;
}
}
if(args[1].equalsIgnoreCase("buy")) {
List<BuyRegion> regions = plugin.getFileManager().getBuys();
List<BuyRegion> results = new ArrayList<>();
for(BuyRegion region : regions) {
if(!region.isSold()
&& ((region.getPrice() <= balance && !maxPriceSet) || (region.getPrice() <= maxPrice && maxPriceSet))
&& (group == null || group.isMember(region))) {
results.add(region);
}
}
if(!results.isEmpty()) {
// Draw a random one
BuyRegion region = results.get(new Random().nextInt(results.size()));
String onlyInGroup = "";
if(group != null) {
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-successMax", "buy", Utils.formatCurrency(maxPrice), onlyInGroup, region);
} else {
plugin.message(player, "find-success", "buy", Utils.formatCurrency(balance), onlyInGroup, region);
}
region.teleportPlayer(player, region.getBooleanSetting("general.findTeleportToSign"), false);
} else {
String onlyInGroup = "";
if(group != null) {
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-noneFoundMax", "buy", Utils.formatCurrency(maxPrice), onlyInGroup);
} else {
plugin.message(player, "find-noneFound", "buy", Utils.formatCurrency(balance), onlyInGroup);
}
}
} else {
List<RentRegion> regions = plugin.getFileManager().getRents();
List<RentRegion> results = new ArrayList<>();
for(RentRegion region : regions) {
if(!region.isRented()
&& ((region.getPrice() <= balance && !maxPriceSet) || (region.getPrice() <= maxPrice && maxPriceSet))
&& (group == null || group.isMember(region))) {
results.add(region);
}
}
if(!results.isEmpty()) {
// Draw a random one
RentRegion region = results.get(new Random().nextInt(results.size()));
String onlyInGroup = "";
if(group != null) {
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-successMax", "rent", Utils.formatCurrency(maxPrice), onlyInGroup, region);
} else {
plugin.message(player, "find-success", "rent", Utils.formatCurrency(balance), onlyInGroup, region);
}
region.teleportPlayer(player, region.getBooleanSetting("general.findTeleportToSign"), false);
} else {
String onlyInGroup = "";
if(group != null) {
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-noneFoundMax", "rent", Utils.formatCurrency(maxPrice), onlyInGroup);
} else {
plugin.message(player, "find-noneFound", "rent", Utils.formatCurrency(balance), onlyInGroup);
}
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
result.add("buy");
result.add("rent");
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.messages.Message;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.RegionGroup;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class FindCommand extends CommandAreaShop {
public FindCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop find";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.find")) {
return "help-find";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.find")) {
plugin.message(sender, "find-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
if(args.length <= 1 || args[1] == null || (!args[1].equalsIgnoreCase("buy") && !args[1].equalsIgnoreCase("rent"))) {
plugin.message(sender, "find-help");
return;
}
Player player = (Player)sender;
double balance = 0.0;
if(plugin.getEconomy() != null) {
balance = plugin.getEconomy().getBalance(player);
}
double maxPrice = 0;
boolean maxPriceSet = false;
RegionGroup group = null;
// Parse optional price argument
if(args.length >= 3) {
try {
maxPrice = Double.parseDouble(args[2]);
maxPriceSet = true;
} catch(NumberFormatException e) {
plugin.message(sender, "find-wrongMaxPrice", args[2]);
return;
}
}
// Parse optional group argument
if(args.length >= 4) {
group = plugin.getFileManager().getGroup(args[3]);
if(group == null) {
plugin.message(sender, "find-wrongGroup", args[3]);
return;
}
}
if(args[1].equalsIgnoreCase("buy")) {
List<BuyRegion> regions = plugin.getFileManager().getBuys();
List<BuyRegion> results = new ArrayList<>();
for(BuyRegion region : regions) {
if(!region.isSold()
&& ((region.getPrice() <= balance && !maxPriceSet) || (region.getPrice() <= maxPrice && maxPriceSet))
&& (group == null || group.isMember(region))) {
results.add(region);
}
}
if(!results.isEmpty()) {
// Draw a random one
BuyRegion region = results.get(new Random().nextInt(results.size()));
Message onlyInGroup = Message.none();
if(group != null) {
onlyInGroup = Message.fromKey("find-onlyInGroup").replacements(args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-successMax", "buy", Utils.formatCurrency(maxPrice), onlyInGroup, region);
} else {
plugin.message(player, "find-success", "buy", Utils.formatCurrency(balance), onlyInGroup, region);
}
region.teleportPlayer(player, region.getBooleanSetting("general.findTeleportToSign"), false);
} else {
Message onlyInGroup = Message.none();
if(group != null) {
onlyInGroup = Message.fromKey("find-onlyInGroup").replacements(args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-noneFoundMax", "buy", Utils.formatCurrency(maxPrice), onlyInGroup);
} else {
plugin.message(player, "find-noneFound", "buy", Utils.formatCurrency(balance), onlyInGroup);
}
}
} else {
List<RentRegion> regions = plugin.getFileManager().getRents();
List<RentRegion> results = new ArrayList<>();
for(RentRegion region : regions) {
if(!region.isRented()
&& ((region.getPrice() <= balance && !maxPriceSet) || (region.getPrice() <= maxPrice && maxPriceSet))
&& (group == null || group.isMember(region))) {
results.add(region);
}
}
if(!results.isEmpty()) {
// Draw a random one
RentRegion region = results.get(new Random().nextInt(results.size()));
Message onlyInGroup = Message.none();
if(group != null) {
onlyInGroup = Message.fromKey("find-onlyInGroup").replacements(args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-successMax", "rent", Utils.formatCurrency(maxPrice), onlyInGroup, region);
} else {
plugin.message(player, "find-success", "rent", Utils.formatCurrency(balance), onlyInGroup, region);
}
region.teleportPlayer(player, region.getBooleanSetting("general.findTeleportToSign"), false);
} else {
Message onlyInGroup = Message.none();
if(group != null) {
onlyInGroup = Message.fromKey("find-onlyInGroup").replacements(args[3]);
}
if(maxPriceSet) {
plugin.message(player, "find-noneFoundMax", "rent", Utils.formatCurrency(maxPrice), onlyInGroup);
} else {
plugin.message(player, "find-noneFound", "rent", Utils.formatCurrency(balance), onlyInGroup);
}
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
result.add("buy");
result.add("rent");
}
return result;
}
}
@@ -1,119 +1,118 @@
package nl.evolutioncoding.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.Selection;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RegionGroup;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class GroupaddCommand extends CommandAreaShop {
public GroupaddCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop groupadd";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.groupadd")) {
return plugin.getLanguageManager().getLang("help-groupadd");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.groupadd")) {
plugin.message(sender, "groupadd-noPermission");
return;
}
if(args.length < 2 || args[1] == null) {
plugin.message(sender, "groupadd-help");
return;
}
RegionGroup group = plugin.getFileManager().getGroup(args[1]);
if(group == null) {
group = new RegionGroup(plugin, args[1]);
plugin.getFileManager().addGroup(group);
}
if(args.length == 2) {
if(!(sender instanceof Player)) {
plugin.message(sender, "cmd-weOnlyByPlayer");
return;
}
Player player = (Player)sender;
Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "cmd-noSelection");
return;
}
List<GeneralRegion> regions = Utils.getASRegionsInSelection(selection);
if(regions.size() == 0) {
plugin.message(player, "cmd-noRegionsFound");
return;
}
ArrayList<String> namesSuccess = new ArrayList<>();
ArrayList<String> namesFailed = new ArrayList<>();
ArrayList<GeneralRegion> toUpdate = new ArrayList<>();
for(GeneralRegion region : regions) {
if(group.addMember(region)) {
namesSuccess.add(region.getName());
toUpdate.add(region);
} else {
namesFailed.add(region.getName());
}
}
if(namesSuccess.size() != 0) {
plugin.message(player, "groupadd-weSuccess", group.getName(), Utils.createCommaSeparatedList(namesSuccess));
}
if(namesFailed.size() != 0) {
plugin.message(player, "groupadd-weFailed", group.getName(), Utils.createCommaSeparatedList(namesFailed));
}
// Update all regions, this does it in a task, updating them without lag
plugin.getFileManager().updateRegions(toUpdate, player);
} else {
GeneralRegion region = plugin.getFileManager().getRegion(args[2]);
if(region == null) {
plugin.message(sender, "groupadd-noRegion", args[2]);
return;
}
if(group.addMember(region)) {
region.update();
plugin.message(sender, "groupadd-success", group.getName(), group.getMembers().size(), region);
} else {
plugin.message(sender, "groupadd-failed", group.getName(), region);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getGroupNames();
} else if(toComplete == 3) {
result = plugin.getFileManager().getRegionNames();
}
return result;
}
}
package me.wiefferink.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.Selection;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RegionGroup;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeSet;
public class GroupaddCommand extends CommandAreaShop {
public GroupaddCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop groupadd";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.groupadd")) {
return "help-groupadd";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.groupadd")) {
plugin.message(sender, "groupadd-noPermission");
return;
}
if(args.length < 2 || args[1] == null) {
plugin.message(sender, "groupadd-help");
return;
}
RegionGroup group = plugin.getFileManager().getGroup(args[1]);
if(group == null) {
group = new RegionGroup(plugin, args[1]);
plugin.getFileManager().addGroup(group);
}
if(args.length == 2) {
if(!(sender instanceof Player)) {
plugin.message(sender, "cmd-weOnlyByPlayer");
return;
}
Player player = (Player)sender;
Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "cmd-noSelection");
return;
}
List<GeneralRegion> regions = Utils.getASRegionsInSelection(selection);
if(regions.size() == 0) {
plugin.message(player, "cmd-noRegionsFound");
return;
}
TreeSet<GeneralRegion> regionsSuccess = new TreeSet<>();
TreeSet<GeneralRegion> regionsFailed = new TreeSet<>();
for(GeneralRegion region : regions) {
if(group.addMember(region)) {
regionsSuccess.add(region);
} else {
regionsFailed.add(region);
}
}
if(regionsSuccess.size() != 0) {
plugin.message(player, "groupadd-weSuccess", group.getName(), Utils.combinedMessage(regionsSuccess, "region"));
}
if(regionsFailed.size() != 0) {
plugin.message(player, "groupadd-weFailed", group.getName(), Utils.combinedMessage(regionsFailed, "region"));
}
// Update all regions, this does it in a task, updating them without lag
plugin.getFileManager().updateRegions(new ArrayList<>(regionsSuccess), player);
} else {
GeneralRegion region = plugin.getFileManager().getRegion(args[2]);
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[2]);
return;
}
if(group.addMember(region)) {
region.update();
plugin.message(sender, "groupadd-success", group.getName(), group.getMembers().size(), region);
} else {
plugin.message(sender, "groupadd-failed", group.getName(), region);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getGroupNames();
} else if(toComplete == 3) {
result = plugin.getFileManager().getRegionNames();
}
return result;
}
}
@@ -1,120 +1,119 @@
package nl.evolutioncoding.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.Selection;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RegionGroup;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class GroupdelCommand extends CommandAreaShop {
public GroupdelCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop groupdel";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.groupdel")) {
return plugin.getLanguageManager().getLang("help-groupdel");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.groupdel")) {
plugin.message(sender, "groupdel-noPermission");
return;
}
if(args.length < 2 || args[1] == null) {
plugin.message(sender, "groupdel-help");
return;
}
RegionGroup group = plugin.getFileManager().getGroup(args[1]);
if(group == null) {
group = new RegionGroup(plugin, args[1]);
plugin.getFileManager().addGroup(group);
}
if(args.length == 2) {
if(!(sender instanceof Player)) {
plugin.message(sender, "cmd-weOnlyByPlayer");
return;
}
Player player = (Player)sender;
Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "cmd-noSelection");
return;
}
List<GeneralRegion> regions = Utils.getASRegionsInSelection(selection);
if(regions.size() == 0) {
plugin.message(player, "cmd-noRegionsFound");
return;
}
ArrayList<String> namesSuccess = new ArrayList<>();
ArrayList<String> namesFailed = new ArrayList<>();
ArrayList<GeneralRegion> toUpdate = new ArrayList<>();
for(GeneralRegion region : regions) {
if(group.removeMember(region)) {
namesSuccess.add(region.getName());
toUpdate.add(region);
} else {
namesFailed.add(region.getName());
}
}
if(namesSuccess.size() != 0) {
plugin.message(player, "groupdel-weSuccess", group.getName(), Utils.createCommaSeparatedList(namesSuccess));
}
if(namesFailed.size() != 0) {
plugin.message(player, "groupdel-weFailed", group.getName(), Utils.createCommaSeparatedList(namesFailed));
}
// Update all regions, this does it in a task, updating them without lag
plugin.getFileManager().updateRegions(toUpdate, player);
group.saveRequired();
} else {
GeneralRegion region = plugin.getFileManager().getRegion(args[2]);
if(region == null) {
plugin.message(sender, "groupdel-noRegion", args[2]);
return;
}
if(group.removeMember(region)) {
region.update();
plugin.message(sender, "groupdel-success", group.getName(), group.getMembers().size(), region);
} else {
plugin.message(sender, "groupdel-failed", group.getName(), region);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getGroupNames();
} else if(toComplete == 3) {
result = plugin.getFileManager().getRegionNames();
}
return result;
}
}
package me.wiefferink.areashop.commands;
import com.sk89q.worldedit.bukkit.selections.Selection;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RegionGroup;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeSet;
public class GroupdelCommand extends CommandAreaShop {
public GroupdelCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop groupdel";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.groupdel")) {
return "help-groupdel";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.groupdel")) {
plugin.message(sender, "groupdel-noPermission");
return;
}
if(args.length < 2 || args[1] == null) {
plugin.message(sender, "groupdel-help");
return;
}
RegionGroup group = plugin.getFileManager().getGroup(args[1]);
if(group == null) {
group = new RegionGroup(plugin, args[1]);
plugin.getFileManager().addGroup(group);
}
if(args.length == 2) {
if(!(sender instanceof Player)) {
plugin.message(sender, "cmd-weOnlyByPlayer");
return;
}
Player player = (Player)sender;
Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "cmd-noSelection");
return;
}
List<GeneralRegion> regions = Utils.getASRegionsInSelection(selection);
if(regions.size() == 0) {
plugin.message(player, "cmd-noRegionsFound");
return;
}
TreeSet<GeneralRegion> regionsSuccess = new TreeSet<>();
TreeSet<GeneralRegion> regionsFailed = new TreeSet<>();
for(GeneralRegion region : regions) {
if(group.removeMember(region)) {
regionsSuccess.add(region);
} else {
regionsFailed.add(region);
}
}
if(regionsSuccess.size() != 0) {
plugin.message(player, "groupdel-weSuccess", group.getName(), Utils.combinedMessage(regionsSuccess, "region"));
}
if(regionsFailed.size() != 0) {
plugin.message(player, "groupdel-weFailed", group.getName(), Utils.combinedMessage(regionsFailed, "region"));
}
// Update all regions, this does it in a task, updating them without lag
plugin.getFileManager().updateRegions(new ArrayList<>(regionsSuccess), player);
group.saveRequired();
} else {
GeneralRegion region = plugin.getFileManager().getRegion(args[2]);
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[2]);
return;
}
if(group.removeMember(region)) {
region.update();
plugin.message(sender, "groupdel-success", group.getName(), group.getMembers().size(), region);
} else {
plugin.message(sender, "groupdel-failed", group.getName(), region);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getGroupNames();
} else if(toComplete == 3) {
result = plugin.getFileManager().getRegionNames();
}
return result;
}
}
@@ -1,73 +1,73 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.RegionGroup;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.List;
public class GroupinfoCommand extends CommandAreaShop {
public GroupinfoCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop groupinfo";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.groupinfo")) {
return plugin.getLanguageManager().getLang("help-groupinfo");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.groupinfo")) {
plugin.message(sender, "groupinfo-noPermission");
return;
}
if(args.length < 2 || args[1] == null) {
plugin.message(sender, "groupinfo-help");
return;
}
RegionGroup group = plugin.getFileManager().getGroup(args[1]);
if(group == null) {
plugin.message(sender, "groupinfo-noGroup", args[1]);
return;
}
List<String> members = group.getMembers();
if(members.size() == 0) {
plugin.message(sender, "groupinfo-noMembers", group.getName());
} else {
plugin.message(sender, "groupinfo-members", group.getName(), Utils.createCommaSeparatedList(members));
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getGroupNames();
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.RegionGroup;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.List;
public class GroupinfoCommand extends CommandAreaShop {
public GroupinfoCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop groupinfo";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.groupinfo")) {
return "help-groupinfo";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.groupinfo")) {
plugin.message(sender, "groupinfo-noPermission");
return;
}
if(args.length < 2 || args[1] == null) {
plugin.message(sender, "groupinfo-help");
return;
}
RegionGroup group = plugin.getFileManager().getGroup(args[1]);
if(group == null) {
plugin.message(sender, "groupinfo-noGroup", args[1]);
return;
}
List<String> members = group.getMembers();
if(members.size() == 0) {
plugin.message(sender, "groupinfo-noMembers", group.getName());
} else {
plugin.message(sender, "groupinfo-members", group.getName(), Utils.createCommaSeparatedList(members));
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getGroupNames();
}
return result;
}
}
@@ -1,58 +1,58 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.List;
public class GrouplistCommand extends CommandAreaShop {
public GrouplistCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop grouplist";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.grouplist")) {
return plugin.getLanguageManager().getLang("help-grouplist");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.grouplist")) {
plugin.message(sender, "grouplist-noPermission");
return;
}
List<String> groups = plugin.getFileManager().getGroupNames();
if(groups.size() == 0) {
plugin.message(sender, "grouplist-noGroups");
} else {
plugin.message(sender, "grouplist-success", Utils.createCommaSeparatedList(groups));
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
return new ArrayList<>();
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.List;
public class GrouplistCommand extends CommandAreaShop {
public GrouplistCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop grouplist";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.grouplist")) {
return "help-grouplist";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.grouplist")) {
plugin.message(sender, "grouplist-noPermission");
return;
}
List<String> groups = plugin.getFileManager().getGroupNames();
if(groups.size() == 0) {
plugin.message(sender, "grouplist-noGroups");
} else {
plugin.message(sender, "grouplist-success", Utils.createCommaSeparatedList(groups));
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
return new ArrayList<>();
}
}
@@ -1,29 +1,29 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import org.bukkit.command.CommandSender;
public class HelpCommand extends CommandAreaShop {
public HelpCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop help";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.help")) {
return plugin.getLanguageManager().getLang("help-help");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
plugin.getCommandManager().showHelp(sender);
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import org.bukkit.command.CommandSender;
public class HelpCommand extends CommandAreaShop {
public HelpCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop help";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.help")) {
return "help-help";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
plugin.getCommandManager().showHelp(sender);
}
}
@@ -0,0 +1,530 @@
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.messages.Message;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RegionGroup;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.*;
public class InfoCommand extends CommandAreaShop {
public InfoCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop info";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.info")) {
return "help-info";
}
return null;
}
/**
* Display a page of a list of regions
* @param sender The CommandSender to send the messages to
* @param regions The regions to display
* @param filterGroup The group to filter the regions by
* @param keyHeader The header to print above the page
* @param pageInput The page number, if any
* @param baseCommand The command to execute for next/previous page
*/
private void showSortedPagedList(CommandSender sender, List<? extends GeneralRegion> regions, RegionGroup filterGroup, String keyHeader, String pageInput, String baseCommand) {
int ITEMS_PER_PAGE = 18;
int page = 1;
if(pageInput != null && Utils.isNumeric(pageInput)) {
try {
page = Integer.parseInt(pageInput);
} catch(NumberFormatException e) {
plugin.message(sender, "info-wrongPage", pageInput);
return;
}
}
if(filterGroup != null) {
for(Iterator<? extends GeneralRegion> it = regions.iterator(); it.hasNext(); ) {
if(!filterGroup.isMember(it.next())) {
it.remove();
}
}
}
if(regions.isEmpty()) {
plugin.message(sender, "info-noRegions");
} else {
long start = Calendar.getInstance().getTimeInMillis();
// First sort by type, then by name
Collections.sort(regions, new Comparator<GeneralRegion>() {
@Override
public int compare(GeneralRegion one, GeneralRegion two) {
int typeCompare = getTypeOrder(two).compareTo(getTypeOrder(one));
if(typeCompare != 0) {
return typeCompare;
} else {
return one.getName().compareTo(two.getName());
}
}
});
// Header
Message limitedToGroup = Message.none();
if(filterGroup != null) {
limitedToGroup = Message.fromKey("info-limitedToGroup").replacements(filterGroup.getName());
}
plugin.message(sender, keyHeader, limitedToGroup);
// Page entries
int totalPages = (int)Math.ceil(regions.size()/(double)ITEMS_PER_PAGE); // Clip page to correct boundaries, not much need to tell the user
if(regions.size() == ITEMS_PER_PAGE+1) { // 19 total items is mapped to 1 page of 19
ITEMS_PER_PAGE++;
totalPages = 1;
}
page = Math.max(1, Math.min(totalPages, page));
for(int i = (page-1)*ITEMS_PER_PAGE; i < page*ITEMS_PER_PAGE && i < regions.size(); i++) {
String state;
GeneralRegion region = regions.get(i);
if(region.getType() == GeneralRegion.RegionType.RENT) {
if(region.getOwner() == null) {
state = "Forrent";
} else {
state = "Rented";
}
} else {
if(region.getOwner() == null) {
state = "Forsale";
} else if(!((BuyRegion)region).isInResellingMode()) {
state = "Sold";
} else {
state = "Reselling";
}
}
plugin.messageNoPrefix(sender, "info-entry"+state, region);
}
Message footer = Message.none();
// Previous button
if(page > 1) {
footer.append(Message.fromKey("info-pagePrevious").replacements(baseCommand+" "+(page-1)));
} else {
footer.append(Message.fromKey("info-pageNoPrevious"));
}
// Page status
if(totalPages > 1) {
String pageString = ""+page;
for(int i = pageString.length(); i < (totalPages+"").length(); i++) {
pageString = "0"+pageString;
}
footer.append(Message.fromKey("info-pageStatus").replacements(page, totalPages));
if(page < totalPages) {
footer.append(Message.fromKey("info-pageNext").replacements(baseCommand+" "+(page+1)));
} else {
footer.append(Message.fromKey("info-pageNoNext"));
}
footer.send(sender);
long end = Calendar.getInstance().getTimeInMillis();
}
}
}
/**
* Get an integer to order by type, usable for Comparators
* @param region The region to get the order for
* @return An integer for sorting by type
*/
private Integer getTypeOrder(GeneralRegion region) {
if(region.getType() == GeneralRegion.RegionType.RENT) {
if(region.getOwner() == null) {
return 1;
} else {
return 2;
}
} else {
if(region.getOwner() == null) {
return 3;
} else if(!((BuyRegion)region).isInResellingMode()) {
return 4;
} else {
return 5;
}
}
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.info")) {
plugin.message(sender, "info-noPermission");
return;
}
if(args.length > 1 && args[1] != null) {
// Get filter group (only used by some commands)
RegionGroup filterGroup = null;
Set<String> groupFilters = new HashSet<>(Arrays.asList("all", "rented", "forrent", "sold", "forsale", "reselling"));
if(groupFilters.contains(args[1].toLowerCase()) && args.length > 2) {
if(!Utils.isNumeric(args[2])) {
filterGroup = plugin.getFileManager().getGroup(args[2]);
if(filterGroup == null) {
plugin.message(sender, "info-noFiltergroup", args[2]);
return;
}
// Pass page number to args[2] if available
if(args.length > 3) {
args[2] = args[3];
}
}
}
// All regions
if(args[1].equalsIgnoreCase("all")) {
showSortedPagedList(sender, plugin.getFileManager().getRegions(), filterGroup, "info-allHeader", (args.length > 2 ? args[2] : null), "/areashop info all");
}
// Rented regions
else if(args[1].equalsIgnoreCase("rented")) {
List<RentRegion> regions = plugin.getFileManager().getRents();
for(Iterator<RentRegion> it = regions.iterator(); it.hasNext(); ) {
if(!it.next().isRented()) {
it.remove();
}
}
showSortedPagedList(sender, regions, filterGroup, "info-rentedHeader", (args.length > 2 ? args[2] : null), "/areashop info rented");
}
// Forrent regions
else if(args[1].equalsIgnoreCase("forrent")) {
List<RentRegion> regions = plugin.getFileManager().getRents();
for(Iterator<RentRegion> it = regions.iterator(); it.hasNext(); ) {
if(it.next().isRented()) {
it.remove();
}
}
showSortedPagedList(sender, regions, filterGroup, "info-forrentHeader", (args.length > 2 ? args[2] : null), "/areashop info forrent");
}
// Sold regions
else if(args[1].equalsIgnoreCase("sold")) {
List<BuyRegion> regions = plugin.getFileManager().getBuys();
for(Iterator<BuyRegion> it = regions.iterator(); it.hasNext(); ) {
if(!it.next().isSold()) {
it.remove();
}
}
showSortedPagedList(sender, regions, filterGroup, "info-soldHeader", (args.length > 2 ? args[2] : null), "/areashop info sold");
}
// Forsale regions
else if(args[1].equalsIgnoreCase("forsale")) {
List<BuyRegion> regions = plugin.getFileManager().getBuys();
for(Iterator<BuyRegion> it = regions.iterator(); it.hasNext(); ) {
if(it.next().isSold()) {
it.remove();
}
}
showSortedPagedList(sender, regions, filterGroup, "info-forsaleHeader", (args.length > 2 ? args[2] : null), "/areashop info forsale");
}
// Reselling regions
else if(args[1].equalsIgnoreCase("reselling")) {
List<BuyRegion> regions = plugin.getFileManager().getBuys();
for(Iterator<BuyRegion> it = regions.iterator(); it.hasNext(); ) {
if(!it.next().isInResellingMode()) {
it.remove();
}
}
showSortedPagedList(sender, regions, filterGroup, "info-resellingHeader", (args.length > 2 ? args[2] : null), "/areashop info reselling");
}
// List of regions without a group
else if(args[1].equalsIgnoreCase("nogroup")) {
List<GeneralRegion> regions = plugin.getFileManager().getRegions();
for(RegionGroup group : plugin.getFileManager().getGroups()) {
regions.removeAll(group.getMemberRegions());
}
if(regions.isEmpty()) {
plugin.message(sender, "info-nogroupNone");
} else {
showSortedPagedList(sender, regions, filterGroup, "info-nogroupHeader", (args.length > 2 ? args[2] : null), "/areashop info nogroup");
}
}
// Region info
else if(args[1].equalsIgnoreCase("region")) {
if(args.length > 1) {
RentRegion rent = null;
BuyRegion buy = null;
if(args.length > 2) {
rent = plugin.getFileManager().getRent(args[2]);
buy = plugin.getFileManager().getBuy(args[2]);
} else {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
if(regions.get(0).isRentRegion()) {
rent = (RentRegion)regions.get(0);
} else if(regions.get(0).isBuyRegion()) {
buy = (BuyRegion)regions.get(0);
}
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
}
if(rent == null && buy == null) {
plugin.message(sender, "info-regionNotExisting", args[2]);
return;
}
if(rent != null) {
plugin.message(sender, "info-regionHeaderRent", rent);
if(rent.isRented()) {
plugin.messageNoPrefix(sender, "info-regionRented", rent);
plugin.messageNoPrefix(sender, "info-regionExtending", rent);
// Money back
if(UnrentCommand.canUse(sender, buy)) {
plugin.messageNoPrefix(sender, "info-regionMoneyBackRentClick", rent);
} else {
plugin.messageNoPrefix(sender, "info-regionMoneyBackRent", rent);
}
// Friends
if(!rent.getFriendsFeature().getFriendNames().isEmpty()) {
String messagePart = "info-friend";
if(DelfriendCommand.canUse(sender, rent)) {
messagePart = "info-friendRemove";
}
plugin.messageNoPrefix(sender, "info-regionFriends", rent, Utils.combinedMessage(rent.getFriendsFeature().getFriendNames(), messagePart));
}
} else {
plugin.messageNoPrefix(sender, "info-regionCanBeRented", rent);
}
if(rent.getLandlordName() != null) {
plugin.messageNoPrefix(sender, "info-regionLandlord", rent);
}
// Maximum extends
if(rent.getMaxExtends() != -1) {
if(rent.getMaxExtends() == 0) {
plugin.messageNoPrefix(sender, "info-regionNoExtending", rent);
} else if(rent.isRented()) {
plugin.messageNoPrefix(sender, "info-regionExtendsLeft", rent);
} else {
plugin.messageNoPrefix(sender, "info-regionMaxExtends", rent);
}
}
if(rent.getMaxRentTime() != -1) {
plugin.messageNoPrefix(sender, "info-regionMaxRentTime", rent);
}
if(rent.getInactiveTimeUntilUnrent() != -1) {
plugin.messageNoPrefix(sender, "info-regionInactiveUnrent", rent);
}
// Teleport
Message tp = Message.fromKey("info-prefix");
boolean foundSomething = false;
if(TeleportCommand.canUse(sender, rent)) {
foundSomething = true;
tp.append(Message.fromKey("info-regionTeleport").replacements(rent));
}
if(SetteleportCommand.canUse(sender, rent)) {
if(foundSomething) {
tp.append(", ");
}
foundSomething = true;
tp.append(Message.fromKey("info-setRegionTeleport").replacements(rent));
}
if(foundSomething) {
tp.append(".");
tp.send(sender);
}
// Signs
List<String> signLocations = new ArrayList<>();
for(Location location : rent.getSignsFeature().getSignLocations()) {
signLocations.add(Message.fromKey("info-regionSignLocation").replacements(location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ()).getPlain());
}
if(!signLocations.isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionSigns", signLocations.toArray());
}
// Groups
if(sender.hasPermission("areashop.groupinfo") && !rent.getGroupNames().isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionGroups", Utils.createCommaSeparatedList(rent.getGroupNames()));
}
// Restoring
if(rent.isRestoreEnabled()) {
if(sender.hasPermission("areashop.setrestore")) {
plugin.messageNoPrefix(sender, "info-regionRestoringRent", rent, Message.fromKey("info-regionRestoringProfile").replacements(rent.getRestoreProfile()));
} else {
plugin.messageNoPrefix(sender, "info-regionRestoringRent", rent, "");
}
}
// Restrictions
if(!rent.isRented()) {
if(rent.restrictedToRegion()) {
plugin.messageNoPrefix(sender, "info-regionRestrictedRegionRent", rent);
} else if(rent.restrictedToWorld()) {
plugin.messageNoPrefix(sender, "info-regionRestrictedWorldRent", rent);
}
}
plugin.messageNoPrefix(sender, "info-regionFooterRent", rent);
} else if(buy != null) {
plugin.message(sender, "info-regionHeaderBuy", buy);
if(buy.isSold()) {
if(buy.isInResellingMode()) {
plugin.messageNoPrefix(sender, "info-regionReselling", buy);
plugin.messageNoPrefix(sender, "info-regionReselPrice", buy);
} else {
plugin.messageNoPrefix(sender, "info-regionBought", buy);
}
// Money back
if(SellCommand.canUse(sender, buy)) {
plugin.messageNoPrefix(sender, "info-regionMoneyBackBuyClick", buy);
} else {
plugin.messageNoPrefix(sender, "info-regionMoneyBackBuy", buy);
}
// Friends
if(!buy.getFriendsFeature().getFriendNames().isEmpty()) {
String messagePart = "info-friend";
if(DelfriendCommand.canUse(sender, buy)) {
messagePart = "info-friendRemove";
}
plugin.messageNoPrefix(sender, "info-regionFriends", buy, Utils.combinedMessage(buy.getFriendsFeature().getFriendNames(), messagePart));
}
} else {
plugin.messageNoPrefix(sender, "info-regionCanBeBought", buy);
}
if(buy.getLandlord() != null) {
plugin.messageNoPrefix(sender, "info-regionLandlord", buy);
}
if(buy.getInactiveTimeUntilSell() != -1) {
plugin.messageNoPrefix(sender, "info-regionInactiveSell", buy);
}
// Teleport
Message tp = Message.fromKey("info-prefix");
boolean foundSomething = false;
if(TeleportCommand.canUse(sender, buy)) {
foundSomething = true;
tp.append(Message.fromKey("info-regionTeleport").replacements(buy));
}
if(SetteleportCommand.canUse(sender, buy)) {
if(foundSomething) {
tp.append(", ");
}
foundSomething = true;
tp.append(Message.fromKey("info-setRegionTeleport").replacements(buy));
}
if(foundSomething) {
tp.append(".");
tp.send(sender);
}
// Signs
List<String> signLocations = new ArrayList<>();
for(Location location : buy.getSignsFeature().getSignLocations()) {
signLocations.add(Message.fromKey("info-regionSignLocation").replacements(location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ()).getPlain());
}
if(!signLocations.isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionSigns", signLocations.toArray());
}
// Groups
if(sender.hasPermission("areashop.groupinfo") && !buy.getGroupNames().isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionGroups", Utils.createCommaSeparatedList(buy.getGroupNames()));
}
// Restoring
if(buy.isRestoreEnabled()) {
if(sender.hasPermission("areashop.setrestore")) {
plugin.messageNoPrefix(sender, "info-regionRestoringBuy", buy, Message.fromKey("info-regionRestoringProfile").replacements(buy.getRestoreProfile()));
} else {
plugin.messageNoPrefix(sender, "info-regionRestoringBuy", buy, "");
}
}
// Restrictions
if(!buy.isSold()) {
if(buy.restrictedToRegion()) {
plugin.messageNoPrefix(sender, "info-regionRestrictedRegionBuy", buy);
} else if(buy.restrictedToWorld()) {
plugin.messageNoPrefix(sender, "info-regionRestrictedWorldBuy", buy);
}
}
plugin.messageNoPrefix(sender, "info-regionFooterBuy", buy);
}
} else {
plugin.message(sender, "info-regionHelp");
}
} else {
plugin.message(sender, "info-help");
}
} else {
plugin.message(sender, "info-help");
}
}
/**
* Create a comma-space separated list from a collection of strings
* @param list The collection with strings
* @return A comma-space separated list of the strings in the collection
*/
public String createCommaString(Collection<String> list) {
String result = "";
boolean first = true;
for(String part : list) {
if(first) {
result += part;
first = false;
} else {
result += ", " + part;
}
}
return result;
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(Arrays.asList("all", "rented", "forrent", "sold", "forsale", "player", "region", "nogroup", "reselling"));
} else if(toComplete == 3) {
if(start[2].equalsIgnoreCase("player")) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(start[2].equalsIgnoreCase("region")) {
result.addAll(plugin.getFileManager().getBuyNames());
result.addAll(plugin.getFileManager().getRentNames());
}
}
return result;
}
}
@@ -1,81 +1,88 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class LinksignsCommand extends CommandAreaShop {
public LinksignsCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop linksigns";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.linksigns")) {
return plugin.getLanguageManager().getLang("help-linksigns");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.linksigns")) {
plugin.message(sender, "linksigns-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
if(plugin.getSignlinkerManager().isInSignLinkMode(player)) {
plugin.getSignlinkerManager().exitSignLinkMode(player);
} else {
// Get the profile
String profile = null;
if(args.length > 1) {
profile = args[1];
Set<String> profiles = plugin.getConfig().getConfigurationSection("signProfiles").getKeys(false);
if(!profiles.contains(profile)) {
plugin.message(sender, "addsign-wrongProfile", Utils.createCommaSeparatedList(profiles));
return;
}
}
plugin.getSignlinkerManager().enterSignLinkMode(player, profile);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
result.addAll(plugin.getConfig().getStringList("signProfiles"));
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.messages.Message;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class LinksignsCommand extends CommandAreaShop {
public LinksignsCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop linksigns";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.linksigns")) {
return "help-linksigns";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.linksigns")) {
plugin.message(sender, "linksigns-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
if(plugin.getSignlinkerManager().isInSignLinkMode(player)) {
plugin.getSignlinkerManager().exitSignLinkMode(player);
} else {
// Get the profile
String profile = null;
if(args.length > 1) {
profile = args[1];
Set<String> profiles = plugin.getConfig().getConfigurationSection("signProfiles").getKeys(false);
if(!profiles.contains(profile)) {
ArrayList<String> message = new ArrayList<>();
for(String p : profiles) {
if(!message.isEmpty()) {
message.add(", ");
}
message.addAll(Message.fromKey("addsign-profile").replacements(p).get());
}
plugin.message(sender, "addsign-wrongProfile", Message.fromList(message));
return;
}
}
plugin.getSignlinkerManager().enterSignLinkMode(player, profile);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
result.addAll(plugin.getConfig().getStringList("signProfiles"));
}
return result;
}
}
@@ -1,115 +1,136 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.HashSet;
import java.util.Set;
public class MeCommand extends CommandAreaShop {
public MeCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop me";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.me")) {
return plugin.getLanguageManager().getLang("help-me");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.me")) {
plugin.message(sender, "me-noPermission");
return;
}
if(!(sender instanceof Player)) {
plugin.message(sender, "me-notAPlayer");
return;
}
Player player = (Player)sender;
// Get the regions owned by the player
Set<RentRegion> rentRegions = new HashSet<>();
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isOwner(player)) {
rentRegions.add(region);
}
}
Set<BuyRegion> buyRegions = new HashSet<>();
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isOwner(player)) {
buyRegions.add(region);
}
}
// Send messages
if(rentRegions.isEmpty()) {
plugin.message(player, "me-noRentRegions");
} else {
plugin.message(player, "me-rentRegions");
for(RentRegion region : rentRegions) {
plugin.messageNoPrefix(player, "me-rentLine", region);
}
}
if(buyRegions.isEmpty()) {
plugin.message(player, "me-noBuyRegions");
} else {
plugin.message(player, "me-buyRegions");
for(BuyRegion region : buyRegions) {
plugin.messageNoPrefix(player, "me-buyLine", region);
}
}
Set<GeneralRegion> friendRegions = new HashSet<>();
for(GeneralRegion region : plugin.getFileManager().getRegions()) {
if(region.getFriends() != null && region.getFriends().contains(player.getUniqueId())) {
friendRegions.add(region);
}
}
if(friendRegions.isEmpty()) {
plugin.message(player, "me-noFriendRegions");
} else {
plugin.message(player, "me-friendRegions");
for(GeneralRegion region : friendRegions) {
plugin.messageNoPrefix(player, "me-friendLine", region);
}
}
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.HashSet;
import java.util.Set;
public class MeCommand extends CommandAreaShop {
public MeCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop me";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.me")) {
return "help-me";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.me")) {
plugin.message(sender, "me-noPermission");
return;
}
OfflinePlayer player = null;
if(!(sender instanceof Player)) {
if(args.length <= 1) {
plugin.message(sender, "me-notAPlayer");
return;
}
} else {
player = (OfflinePlayer)sender;
}
if(args.length > 1) {
player = Bukkit.getOfflinePlayer(args[1]);
if(player == null) {
plugin.message(sender, "me-noPlayer", args[1]);
return;
}
}
if(player == null) {
return;
}
// Get the regions owned by the player
Set<RentRegion> rentRegions = new HashSet<>();
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isOwner(player)) {
rentRegions.add(region);
}
}
Set<BuyRegion> buyRegions = new HashSet<>();
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isOwner(player)) {
buyRegions.add(region);
}
}
// Get the regions the player is added as friend
Set<GeneralRegion> friendRegions = new HashSet<>();
for(GeneralRegion region : plugin.getFileManager().getRegions()) {
if(region.getFriendsFeature().getFriends() != null && region.getFriendsFeature().getFriends().contains(player.getUniqueId())) {
friendRegions.add(region);
}
}
// Send messages
boolean foundSome = !rentRegions.isEmpty() || !buyRegions.isEmpty() || !friendRegions.isEmpty();
if(foundSome) {
plugin.message(sender, "me-header", player.getName());
}
if(!rentRegions.isEmpty()) {
for(RentRegion region : rentRegions) {
plugin.messageNoPrefix(sender, "me-rentLine", region);
}
}
if(!buyRegions.isEmpty()) {
for(BuyRegion region : buyRegions) {
plugin.messageNoPrefix(sender, "me-buyLine", region);
}
}
if(!friendRegions.isEmpty()) {
for(GeneralRegion region : friendRegions) {
plugin.messageNoPrefix(sender, "me-friendLine", region);
}
}
if(!foundSome) {
plugin.message(sender, "me-nothing", player.getName());
}
}
public static void show() {
}
}
@@ -0,0 +1,79 @@
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.messages.Message;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class MessageCommand extends CommandAreaShop {
public MessageCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop message";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.message")) {
return "help-message";
}
return null;
}
@Override
public void execute(final CommandSender sender, final String[] args) {
if(!sender.hasPermission("areashop.message")) {
plugin.message(sender, "message-noPermission");
return;
}
if(args.length < 3) {
plugin.message(sender, "message-help");
return;
}
Player player = Bukkit.getPlayer(args[1]);
if(player == null) {
plugin.message(sender, "message-notOnline", args[1]);
return;
}
String[] messageArgs = new String[args.length-2];
System.arraycopy(args, 2, messageArgs, 0, args.length-2);
String message = StringUtils.join(messageArgs);
Message.fromString(message).send(player);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
}
return result;
}
}
@@ -1,34 +1,34 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import org.bukkit.command.CommandSender;
public class ReloadCommand extends CommandAreaShop {
public ReloadCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop reload";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.reload")) {
return plugin.getLanguageManager().getLang("help-reload");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(sender.hasPermission("areashop.reload")) {
// Reload the configuration files and update all region flags/signs
plugin.reload(sender);
} else {
plugin.message(sender, "reload-noPermission");
}
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import org.bukkit.command.CommandSender;
public class ReloadCommand extends CommandAreaShop {
public ReloadCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop reload";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.reload")) {
return "help-reload";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(sender.hasPermission("areashop.reload")) {
// Reload the configuration files and update all region flags/signs
plugin.reload(sender);
} else {
plugin.message(sender, "reload-noPermission");
}
}
}
@@ -1,74 +1,74 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class RentCommand extends CommandAreaShop {
public RentCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop rent";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.rent")) {
return plugin.getLanguageManager().getLang("help-rent");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.rent")) {
plugin.message(sender, "rent-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
if(args.length > 1 && args[1] != null) {
RentRegion rent = plugin.getFileManager().getRent(args[1]);
if(rent == null) {
plugin.message(sender, "rent-notRentable");
} else {
rent.rent(player);
}
} else {
// get the region by location
List<RentRegion> regions = Utils.getApplicableRentRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
} else {
regions.get(0).rent(player);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(RentRegion region : plugin.getFileManager().getRents()) {
if(!region.isRented()) {
result.add(region.getName());
}
}
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class RentCommand extends CommandAreaShop {
public RentCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop rent";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.rent")) {
return "help-rent";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.rent")) {
plugin.message(sender, "rent-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
Player player = (Player)sender;
if(args.length > 1 && args[1] != null) {
RentRegion rent = plugin.getFileManager().getRent(args[1]);
if(rent == null) {
plugin.message(sender, "rent-notRentable");
} else {
rent.rent(player);
}
} else {
// get the region by location
List<RentRegion> regions = Utils.getApplicableRentRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
} else {
regions.get(0).rent(player);
}
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(RentRegion region : plugin.getFileManager().getRents()) {
if(!region.isRented()) {
result.add(region.getName());
}
}
}
return result;
}
}
@@ -1,129 +1,127 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class ResellCommand extends CommandAreaShop {
public ResellCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop resell";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.resellall")) {
return plugin.getLanguageManager().getLang("help-resellAll");
} else if(target.hasPermission("areashop.resell")) {
return plugin.getLanguageManager().getLang("help-resell");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.resell") && !sender.hasPermission("areashop.resellall")) {
plugin.message(sender, "resell-noPermissionOther");
return;
}
if(args.length <= 1) {
plugin.message(sender, "resell-help");
return;
}
double price;
try {
price = Double.parseDouble(args[1]);
} catch(NumberFormatException e) {
plugin.message(sender, "resell-wrongPrice", args[1]);
return;
}
BuyRegion buy;
if(args.length <= 2) {
if (sender instanceof Player) {
// get the region by location
List<BuyRegion> regions = Utils.getApplicableBuyRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
buy = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
buy = plugin.getFileManager().getBuy(args[2]);
if(buy == null) {
plugin.message(sender, "resell-notRegistered", args[2]);
return;
}
}
if(buy == null) {
plugin.message(sender, "resell-noRegionFound");
return;
}
if(!buy.isSold()) {
plugin.message(sender, "resell-notBought", buy);
return;
}
if(sender.hasPermission("areashop.resellall")) {
buy.enableReselling(price);
buy.update();
plugin.message(sender, "resell-success", buy);
} else if(sender.hasPermission("areashop.resell") && sender instanceof Player) {
if(buy.isOwner((Player)sender)) {
buy.enableReselling(price);
buy.update();
plugin.message(sender, "resell-success", buy);
} else {
plugin.message(sender, "resell-noPermissionOther", buy);
}
} else {
plugin.message(sender, "resell-noPermission", buy);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 3) {
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold() && !region.isInResellingMode()) {
result.add(region.getName());
}
}
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class ResellCommand extends CommandAreaShop {
public ResellCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop resell";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.resellall") || target.hasPermission("areashop.resell")) {
return "help-resell";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.resell") && !sender.hasPermission("areashop.resellall")) {
plugin.message(sender, "resell-noPermissionOther");
return;
}
if(args.length <= 1) {
plugin.message(sender, "resell-help");
return;
}
double price;
try {
price = Double.parseDouble(args[1]);
} catch(NumberFormatException e) {
plugin.message(sender, "resell-wrongPrice", args[1]);
return;
}
BuyRegion buy;
if(args.length <= 2) {
if (sender instanceof Player) {
// get the region by location
List<BuyRegion> regions = Utils.getApplicableBuyRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
buy = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
buy = plugin.getFileManager().getBuy(args[2]);
if(buy == null) {
plugin.message(sender, "resell-notRegistered", args[2]);
return;
}
}
if(buy == null) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
}
if(!buy.isSold()) {
plugin.message(sender, "resell-notBought", buy);
return;
}
if(sender.hasPermission("areashop.resellall")) {
buy.enableReselling(price);
buy.update();
plugin.message(sender, "resell-success", buy);
} else if(sender.hasPermission("areashop.resell") && sender instanceof Player) {
if(buy.isOwner((Player)sender)) {
buy.enableReselling(price);
buy.update();
plugin.message(sender, "resell-success", buy);
} else {
plugin.message(sender, "resell-noPermissionOther", buy);
}
} else {
plugin.message(sender, "resell-noPermission", buy);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 3) {
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold() && !region.isInResellingMode()) {
result.add(region.getName());
}
}
}
return result;
}
}
@@ -1,90 +1,89 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion.RegionEvent;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class SchematiceventCommand extends CommandAreaShop {
public SchematiceventCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop schemevent";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.schematicevents")) {
return plugin.getLanguageManager().getLang("help-schemevent");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.schematicevents")) {
plugin.message(sender, "schemevent-noPermission");
return;
}
if(args.length < 3 || args[1] == null || args[2] == null) {
plugin.message(sender, "schemevent-help");
return;
}
GeneralRegion region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(sender, "schemevent-noRegion", args[1]);
return;
}
if(region.getRegion() == null) {
plugin.message(sender, "general-noRegion", region);
return;
}
RegionEvent event = null;
boolean exception = false;
try {
event = RegionEvent.valueOf(args[2].toUpperCase());
} catch(IllegalArgumentException e) {
exception = true;
}
// Check for a totally wrong event or a non matching event
if(exception) {
ArrayList<String> values = new ArrayList<>();
for(RegionEvent value : RegionEvent.values()) {
values.add(value.getValue().toLowerCase());
}
plugin.message(sender, "schemevent-wrongEvent", args[2], Utils.createCommaSeparatedList(values), region);
return;
}
region.handleSchematicEvent(event);
region.update();
plugin.message(sender, "schemevent-success", args[2], region);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
GeneralRegion region = plugin.getFileManager().getRegion(start[2]);
if(region != null) {
if(region.isRentRegion()) {
result.addAll(Arrays.asList("created", "deleted", "rented", "unrented"));
} else if(region.isBuyRegion()) {
result.addAll(Arrays.asList("created", "deleted", "bought", "sold"));
}
}
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class SchematiceventCommand extends CommandAreaShop {
public SchematiceventCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop schemevent";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.schematicevents")) {
return "help-schemevent";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.schematicevents")) {
plugin.message(sender, "schemevent-noPermission");
return;
}
if(args.length < 3 || args[1] == null || args[2] == null) {
plugin.message(sender, "schemevent-help");
return;
}
GeneralRegion region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[1]);
return;
}
if(region.getRegion() == null) {
plugin.message(sender, "general-noRegion", region);
return;
}
GeneralRegion.RegionEvent event = null;
boolean exception = false;
try {
event = GeneralRegion.RegionEvent.valueOf(args[2].toUpperCase());
} catch(IllegalArgumentException e) {
exception = true;
}
// Check for a totally wrong event or a non matching event
if(exception) {
ArrayList<String> values = new ArrayList<>();
for(GeneralRegion.RegionEvent value : GeneralRegion.RegionEvent.values()) {
values.add(value.getValue().toLowerCase());
}
plugin.message(sender, "schemevent-wrongEvent", args[2], Utils.createCommaSeparatedList(values), region);
return;
}
region.handleSchematicEvent(event);
region.update();
plugin.message(sender, "schemevent-success", args[2], region);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
GeneralRegion region = plugin.getFileManager().getRegion(start[2]);
if(region != null) {
if(region.isRentRegion()) {
result.addAll(Arrays.asList("created", "deleted", "rented", "unrented"));
} else if(region.isBuyRegion()) {
result.addAll(Arrays.asList("created", "deleted", "bought", "sold"));
}
}
}
return result;
}
}
@@ -1,99 +1,115 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SellCommand extends CommandAreaShop {
public SellCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop sell";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.sell")) {
return plugin.getLanguageManager().getLang("help-sell");
} else if(target.hasPermission("areashop.sellown")) {
return plugin.getLanguageManager().getLang("help-sellOwn");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.sell") && !sender.hasPermission("areashop.sellown")) {
plugin.message(sender, "sell-noPermission");
return;
}
BuyRegion buy;
if(args.length <= 1) {
if (sender instanceof Player) {
// get the region by location
List<BuyRegion> regions = Utils.getApplicableBuyRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
buy = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
buy = plugin.getFileManager().getBuy(args[1]);
}
if(buy == null) {
plugin.message(sender, "sell-notRegistered");
return;
}
if(!buy.isSold()) {
plugin.message(sender, "sell-notBought", buy);
return;
}
buy.sell(true, sender);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold()) {
result.add(region.getName());
}
}
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SellCommand extends CommandAreaShop {
public SellCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop sell";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.sell") || target.hasPermission("areashop.sellown")) {
return "help-sell";
}
return null;
}
/**
* Check if a person can sell the region
* @param person The person to check
* @param region The region to check for
* @return true if the person can sell it, otherwise false
*/
public static boolean canUse(CommandSender person, GeneralRegion region) {
if(person.hasPermission("areashop.sell")) {
return true;
}
if(person instanceof Player) {
Player player = (Player)person;
return region.isOwner(player) && person.hasPermission("areashop.sellown");
}
return false;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.sell") && !sender.hasPermission("areashop.sellown")) {
plugin.message(sender, "sell-noPermission");
return;
}
BuyRegion buy;
if(args.length <= 1) {
if (sender instanceof Player) {
// get the region by location
List<BuyRegion> regions = Utils.getApplicableBuyRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
buy = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
buy = plugin.getFileManager().getBuy(args[1]);
}
if(buy == null) {
plugin.message(sender, "sell-notRegistered");
return;
}
if(!buy.isSold()) {
plugin.message(sender, "sell-notBought", buy);
return;
}
buy.sell(true, sender);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold()) {
result.add(region.getName());
}
}
}
return result;
}
}
@@ -1,110 +1,110 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SetdurationCommand extends CommandAreaShop {
public SetdurationCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setduration";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setduration")) {
return plugin.getLanguageManager().getLang("help-setduration");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setduration") && (!sender.hasPermission("areashop.setduration.landlord") && sender instanceof Player)) {
plugin.message(sender, "setduration-noPermission");
return;
}
if(args.length < 3 || args[1] == null || args[2] == null) {
plugin.message(sender, "setduration-help");
return;
}
int regionArgument = 3;
if(args.length >= 2 && ("default".equalsIgnoreCase(args[1]) || "reset".equalsIgnoreCase(args[1]))) {
regionArgument = 2;
}
RentRegion rent;
if(args.length <= regionArgument) {
if (sender instanceof Player) {
// get the region by location
List<RentRegion> regions = Utils.getApplicableRentRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
rent = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
rent = plugin.getFileManager().getRent(args[regionArgument]);
}
if(rent == null) {
plugin.message(sender, "setduration-notRegistered", args[regionArgument]);
return;
}
if(!sender.hasPermission("areashop.setduration") && !(sender instanceof Player && rent.isLandlord(((Player)sender).getUniqueId()))) {
plugin.message(sender, "setduration-noLandlord", rent);
return;
}
if("default".equalsIgnoreCase(args[1]) || "reset".equalsIgnoreCase(args[1])) {
rent.setDuration(null);
rent.update();
plugin.message(sender, "setduration-successRemoved", rent);
return;
}
try {
Integer.parseInt(args[1]);
} catch(NumberFormatException e) {
plugin.message(sender, "setduration-wrongAmount", args[1], rent);
return;
}
if(!Utils.checkTimeFormat(args[1]+" "+args[2])) {
plugin.message(sender, "setduration-wrongFormat", args[1]+" "+args[2], rent);
return;
}
rent.setDuration(args[1]+" "+args[2]);
rent.update();
plugin.message(sender, "setduration-success", rent);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getRentNames();
} else if(toComplete == 4) {
result.addAll(plugin.getConfig().getStringList("minutes"));
result.addAll(plugin.getConfig().getStringList("hours"));
result.addAll(plugin.getConfig().getStringList("days"));
result.addAll(plugin.getConfig().getStringList("months"));
result.addAll(plugin.getConfig().getStringList("years"));
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SetdurationCommand extends CommandAreaShop {
public SetdurationCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setduration";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setduration")) {
return "help-setduration";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setduration") && (!sender.hasPermission("areashop.setduration.landlord") && sender instanceof Player)) {
plugin.message(sender, "setduration-noPermission");
return;
}
if(args.length < 3 || args[1] == null || args[2] == null) {
plugin.message(sender, "setduration-help");
return;
}
int regionArgument = 3;
if(args.length >= 2 && ("default".equalsIgnoreCase(args[1]) || "reset".equalsIgnoreCase(args[1]))) {
regionArgument = 2;
}
RentRegion rent;
if(args.length <= regionArgument) {
if (sender instanceof Player) {
// get the region by location
List<RentRegion> regions = Utils.getApplicableRentRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
rent = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
rent = plugin.getFileManager().getRent(args[regionArgument]);
}
if(rent == null) {
plugin.message(sender, "setduration-notRegistered", args[regionArgument]);
return;
}
if(!sender.hasPermission("areashop.setduration") && !(sender instanceof Player && rent.isLandlord(((Player)sender).getUniqueId()))) {
plugin.message(sender, "setduration-noLandlord", rent);
return;
}
if("default".equalsIgnoreCase(args[1]) || "reset".equalsIgnoreCase(args[1])) {
rent.setDuration(null);
rent.update();
plugin.message(sender, "setduration-successRemoved", rent);
return;
}
try {
Integer.parseInt(args[1]);
} catch(NumberFormatException e) {
plugin.message(sender, "setduration-wrongAmount", args[1], rent);
return;
}
if(!Utils.checkTimeFormat(args[1]+" "+args[2])) {
plugin.message(sender, "setduration-wrongFormat", args[1]+" "+args[2], rent);
return;
}
rent.setDuration(args[1]+" "+args[2]);
rent.update();
plugin.message(sender, "setduration-success", rent);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getRentNames();
} else if(toComplete == 4) {
result.addAll(plugin.getConfig().getStringList("minutes"));
result.addAll(plugin.getConfig().getStringList("hours"));
result.addAll(plugin.getConfig().getStringList("days"));
result.addAll(plugin.getConfig().getStringList("months"));
result.addAll(plugin.getConfig().getStringList("years"));
}
return result;
}
}
@@ -1,92 +1,92 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SetlandlordCommand extends CommandAreaShop {
public SetlandlordCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setlandlord";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setlandlord")) {
return plugin.getLanguageManager().getLang("help-setlandlord");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setlandlord")) {
plugin.message(sender, "setlandlord-noPermission");
return;
}
if(args.length < 2) {
plugin.message(sender, "setlandlord-help");
return;
}
@SuppressWarnings("deprecation")
OfflinePlayer player = Bukkit.getOfflinePlayer(args[1]);
GeneralRegion region;
if(args.length < 3) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
}
if(region == null) {
plugin.message(sender, "setlandlord-noRegion", args[2]);
return;
}
String playerName = player.getName();
if(playerName == null || playerName.isEmpty()) {
playerName = args[1];
}
region.setLandlord(player.getUniqueId(), playerName);
region.update();
plugin.message(sender, "setlandlord-success", playerName, region);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(toComplete == 3) {
result.addAll(plugin.getFileManager().getRegionNames());
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SetlandlordCommand extends CommandAreaShop {
public SetlandlordCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setlandlord";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setlandlord")) {
return "help-setlandlord";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setlandlord")) {
plugin.message(sender, "setlandlord-noPermission");
return;
}
if(args.length < 2) {
plugin.message(sender, "setlandlord-help");
return;
}
@SuppressWarnings("deprecation")
OfflinePlayer player = Bukkit.getOfflinePlayer(args[1]);
GeneralRegion region;
if(args.length < 3) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
}
if(region == null) {
plugin.message(sender, "cmd-notRegistered", args[2]);
return;
}
String playerName = player.getName();
if(playerName == null || playerName.isEmpty()) {
playerName = args[1];
}
region.setLandlord(player.getUniqueId(), playerName);
region.update();
plugin.message(sender, "setlandlord-success", playerName, region);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(toComplete == 3) {
result.addAll(plugin.getFileManager().getRegionNames());
}
return result;
}
}
@@ -1,145 +1,145 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.UUID;
public class SetownerCommand extends CommandAreaShop {
public SetownerCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setowner";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setownerrent") || target.hasPermission("areashop.setownerbuy")) {
return plugin.getLanguageManager().getLang("help-setowner");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setownerrent") && !sender.hasPermission("areashop.setownerbuy")) {
plugin.message(sender, "setowner-noPermission");
return;
}
GeneralRegion region;
if(args.length < 2) {
plugin.message(sender, "setowner-help");
return;
}
if(args.length == 2) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
}
if(region == null) {
plugin.message(sender, "setowner-notRegistered");
return;
}
if(region.isRentRegion() && !sender.hasPermission("areashop.setownerrent")) {
plugin.message(sender, "setowner-noPermissionRent", region);
return;
}
if(region.isBuyRegion() && !sender.hasPermission("areashop.setownerbuy")) {
plugin.message(sender, "setowner-noPermissionBuy", region);
return;
}
UUID uuid = null;
@SuppressWarnings("deprecation")
OfflinePlayer player = Bukkit.getOfflinePlayer(args[1]);
if(player != null) {
uuid = player.getUniqueId();
}
if(uuid == null) {
plugin.message(sender, "setowner-noPlayer", args[1], region);
return;
}
if(region.isRentRegion()) {
RentRegion rent = (RentRegion)region;
if(rent.isRenter(uuid)) {
// extend
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(rent.getRentedUntil() + rent.getDuration());
rent.setRentedUntil(calendar.getTimeInMillis());
rent.setRenter(uuid);
rent.update();
plugin.message(sender, "setowner-succesRentExtend", region);
} else {
// change
Calendar calendar = Calendar.getInstance();
long current = calendar.getTimeInMillis();
if(rent.isRented()) {
current = rent.getRentedUntil();
}
calendar.setTimeInMillis(current + rent.getDuration());
rent.setRentedUntil(calendar.getTimeInMillis());
rent.setRenter(uuid);
rent.update();
plugin.message(sender, "setowner-succesRent", region);
}
}
if(region.isBuyRegion()) {
BuyRegion buy = (BuyRegion)region;
buy.setBuyer(uuid);
buy.update();
plugin.message(sender, "setowner-succesBuy", region);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(toComplete == 3) {
result.addAll(plugin.getFileManager().getRegionNames());
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.UUID;
public class SetownerCommand extends CommandAreaShop {
public SetownerCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setowner";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setownerrent") || target.hasPermission("areashop.setownerbuy")) {
return "help-setowner";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setownerrent") && !sender.hasPermission("areashop.setownerbuy")) {
plugin.message(sender, "setowner-noPermission");
return;
}
GeneralRegion region;
if(args.length < 2) {
plugin.message(sender, "setowner-help");
return;
}
if(args.length == 2) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
}
if(region == null) {
plugin.message(sender, "setowner-notRegistered");
return;
}
if(region.isRentRegion() && !sender.hasPermission("areashop.setownerrent")) {
plugin.message(sender, "setowner-noPermissionRent", region);
return;
}
if(region.isBuyRegion() && !sender.hasPermission("areashop.setownerbuy")) {
plugin.message(sender, "setowner-noPermissionBuy", region);
return;
}
UUID uuid = null;
@SuppressWarnings("deprecation")
OfflinePlayer player = Bukkit.getOfflinePlayer(args[1]);
if(player != null) {
uuid = player.getUniqueId();
}
if(uuid == null) {
plugin.message(sender, "setowner-noPlayer", args[1], region);
return;
}
if(region.isRentRegion()) {
RentRegion rent = (RentRegion)region;
if(rent.isRenter(uuid)) {
// extend
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(rent.getRentedUntil() + rent.getDuration());
rent.setRentedUntil(calendar.getTimeInMillis());
rent.setRenter(uuid);
rent.update();
plugin.message(sender, "setowner-succesRentExtend", region);
} else {
// change
Calendar calendar = Calendar.getInstance();
long current = calendar.getTimeInMillis();
if(rent.isRented()) {
current = rent.getRentedUntil();
}
calendar.setTimeInMillis(current + rent.getDuration());
rent.setRentedUntil(calendar.getTimeInMillis());
rent.setRenter(uuid);
rent.update();
plugin.message(sender, "setowner-succesRent", region);
}
}
if(region.isBuyRegion()) {
BuyRegion buy = (BuyRegion)region;
buy.setBuyer(uuid);
buy.update();
plugin.message(sender, "setowner-succesBuy", region);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(toComplete == 3) {
result.addAll(plugin.getFileManager().getRegionNames());
}
return result;
}
}
@@ -1,108 +1,108 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SetpriceCommand extends CommandAreaShop {
public SetpriceCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setprice";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setprice")) {
return plugin.getLanguageManager().getLang("help-setprice");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setprice") && (!sender.hasPermission("areashop.setprice.landlord") && sender instanceof Player)) {
plugin.message(sender, "setprice-noPermission");
return;
}
if(args.length < 2 || args[1] == null) {
plugin.message(sender, "setprice-help");
return;
}
GeneralRegion region;
if(args.length < 3) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
}
if(region == null) {
plugin.message(sender, "setprice-notRegistered", args[2]);
return;
}
if(!sender.hasPermission("areashop.setprice") && !(sender instanceof Player && region.isLandlord(((Player)sender).getUniqueId()))) {
plugin.message(sender, "setprice-noLandlord", region);
return;
}
if("default".equalsIgnoreCase(args[1]) || "reset".equalsIgnoreCase(args[1])) {
if(region.isRentRegion()) {
((RentRegion)region).removePrice();
} else if(region.isBuyRegion()) {
((BuyRegion)region).removePrice();
}
region.update();
plugin.message(sender, "setprice-successRemoved", region);
return;
}
double price;
try {
price = Double.parseDouble(args[1]);
} catch(NumberFormatException e) {
plugin.message(sender, "setprice-wrongPrice", args[1], region);
return;
}
if(region.isRentRegion()) {
((RentRegion)region).setPrice(price);
plugin.message(sender, "setprice-successRent", region);
} else if(region.isBuyRegion()) {
((BuyRegion)region).setPrice(price);
plugin.message(sender, "setprice-successBuy", region);
}
region.update();
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 3) {
result = plugin.getFileManager().getRegionNames();
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SetpriceCommand extends CommandAreaShop {
public SetpriceCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setprice";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setprice")) {
return "help-setprice";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setprice") && (!sender.hasPermission("areashop.setprice.landlord") && sender instanceof Player)) {
plugin.message(sender, "setprice-noPermission");
return;
}
if(args.length < 2 || args[1] == null) {
plugin.message(sender, "setprice-help");
return;
}
GeneralRegion region;
if(args.length < 3) {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
region = plugin.getFileManager().getRegion(args[2]);
}
if(region == null) {
plugin.message(sender, "setprice-notRegistered", args[2]);
return;
}
if(!sender.hasPermission("areashop.setprice") && !(sender instanceof Player && region.isLandlord(((Player)sender).getUniqueId()))) {
plugin.message(sender, "setprice-noLandlord", region);
return;
}
if("default".equalsIgnoreCase(args[1]) || "reset".equalsIgnoreCase(args[1])) {
if(region.isRentRegion()) {
((RentRegion)region).removePrice();
} else if(region.isBuyRegion()) {
((BuyRegion)region).removePrice();
}
region.update();
plugin.message(sender, "setprice-successRemoved", region);
return;
}
double price;
try {
price = Double.parseDouble(args[1]);
} catch(NumberFormatException e) {
plugin.message(sender, "setprice-wrongPrice", args[1], region);
return;
}
if(region.isRentRegion()) {
((RentRegion)region).setPrice(price);
plugin.message(sender, "setprice-successRent", region);
} else if(region.isBuyRegion()) {
((BuyRegion)region).setPrice(price);
plugin.message(sender, "setprice-successBuy", region);
}
region.update();
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 3) {
result = plugin.getFileManager().getRegionNames();
}
return result;
}
}
@@ -1,78 +1,78 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.List;
public class SetrestoreCommand extends CommandAreaShop {
public SetrestoreCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setrestore";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setrestore")) {
return plugin.getLanguageManager().getLang("help-setrestore");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setrestore")) {
plugin.message(sender, "setrestore-noPermission");
return;
}
if(args.length <= 2 || args[1] == null || args[2] == null) {
plugin.message(sender, "setrestore-help");
return;
}
GeneralRegion region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(sender, "setrestore-notRegistered", args[1]);
return;
}
Boolean value = null;
if(args[2].equalsIgnoreCase("true")) {
value = true;
} else if(args[2].equalsIgnoreCase("false")) {
value = false;
}
region.setRestoreSetting(value);
String valueString = "general";
if(value != null) {
valueString = value+"";
}
if(args.length > 3) {
region.setSchematicProfile(args[3]);
plugin.message(sender, "setrestore-successProfile", valueString, args[3], region);
} else {
plugin.message(sender, "setrestore-success", valueString, region);
}
region.update();
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getRegionNames();
} else if(toComplete == 3) {
result.add("true");
result.add("false");
result.add("general");
} else if(toComplete == 4) {
result.addAll(plugin.getConfig().getConfigurationSection("schematicProfiles").getKeys(false));
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
import java.util.List;
public class SetrestoreCommand extends CommandAreaShop {
public SetrestoreCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop setrestore";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.setrestore")) {
return "help-setrestore";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setrestore")) {
plugin.message(sender, "setrestore-noPermission");
return;
}
if(args.length <= 2 || args[1] == null || args[2] == null) {
plugin.message(sender, "setrestore-help");
return;
}
GeneralRegion region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(sender, "setrestore-notRegistered", args[1]);
return;
}
Boolean value = null;
if(args[2].equalsIgnoreCase("true")) {
value = true;
} else if(args[2].equalsIgnoreCase("false")) {
value = false;
}
region.setRestoreSetting(value);
String valueString = "general";
if(value != null) {
valueString = value+"";
}
if(args.length > 3) {
region.setSchematicProfile(args[3]);
plugin.message(sender, "setrestore-successProfile", valueString, args[3], region);
} else {
plugin.message(sender, "setrestore-success", valueString, region);
}
region.update();
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result = plugin.getFileManager().getRegionNames();
} else if(toComplete == 3) {
result.add("true");
result.add("false");
result.add("general");
} else if(toComplete == 4) {
result.addAll(plugin.getConfig().getConfigurationSection("schematicProfiles").getKeys(false));
}
return result;
}
}
@@ -1,110 +1,123 @@
package nl.evolutioncoding.areashop.commands;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SetteleportCommand extends CommandAreaShop {
public SetteleportCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop settp";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.teleportall")) {
return plugin.getLanguageManager().getLang("help-setteleportAll");
} else if(target.hasPermission("areashop.teleport")) {
return plugin.getLanguageManager().getLang("help-setteleport");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setteleport") && !sender.hasPermission("areashop.setteleportall")) {
plugin.message(sender, "setteleport-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "onlyByPlayer");
return;
}
Player player = (Player)sender;
GeneralRegion region;
if(args.length < 2) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player)sender).getLocation());
if(regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if(regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
region = plugin.getFileManager().getRegion(args[1]);
}
boolean owner;
if(region == null) {
plugin.message(player, "setteleport-noRentOrBuy", args[1]);
return;
}
if(region.isRentRegion()) {
owner = player.getUniqueId().equals(((RentRegion)region).getRenter());
} else {
owner = player.getUniqueId().equals(((BuyRegion)region).getBuyer());
}
if(!player.hasPermission("areashop.setteleport")) {
plugin.message(player, "setteleport-noPermission", region);
return;
} else if(!owner && !player.hasPermission("areashop.setteleportall")) {
plugin.message(player, "setteleport-noPermissionOther", region);
return;
}
ProtectedRegion wgRegion = region.getRegion();
if(args.length > 2 && args[2] != null && (args[2].equalsIgnoreCase("reset") || args[2].equalsIgnoreCase("yes") || args[2].equalsIgnoreCase("true"))) {
region.setTeleport(null);
region.update();
plugin.message(player, "setteleport-reset", region);
return;
}
if(!player.hasPermission("areashop.setteleportoutsideregion") && (wgRegion == null || !wgRegion.contains(player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()))) {
plugin.message(player, "setteleport-notInside", region);
return;
}
region.setTeleport(player.getLocation());
region.update();
plugin.message(player, "setteleport-success", region);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
result.add("reset");
}
return result;
}
}
package me.wiefferink.areashop.commands;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class SetteleportCommand extends CommandAreaShop {
public SetteleportCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop settp";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.teleportall") || target.hasPermission("areashop.teleport")) {
return "help-setteleport";
}
return null;
}
/**
* Check if a person can set the teleport location of the region
* @param person The person to check
* @param region The region to check for
* @return true if the person can set the teleport location, otherwise false
*/
public static boolean canUse(CommandSender person, GeneralRegion region) {
if(!(person instanceof Player)) {
return false;
}
Player player = (Player)person;
return player.hasPermission("areashop.setteleportall")
|| region.isOwner(player) && player.hasPermission("areashop.setteleport");
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.setteleport") && !sender.hasPermission("areashop.setteleportall")) {
plugin.message(sender, "setteleport-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "onlyByPlayer");
return;
}
Player player = (Player)sender;
GeneralRegion region;
if(args.length < 2) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player)sender).getLocation());
if(regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if(regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
region = regions.get(0);
}
} else {
region = plugin.getFileManager().getRegion(args[1]);
}
boolean owner;
if(region == null) {
plugin.message(player, "setteleport-noRentOrBuy", args[1]);
return;
}
if(region.isRentRegion()) {
owner = player.getUniqueId().equals(((RentRegion)region).getRenter());
} else {
owner = player.getUniqueId().equals(((BuyRegion)region).getBuyer());
}
if(!player.hasPermission("areashop.setteleport")) {
plugin.message(player, "setteleport-noPermission", region);
return;
} else if(!owner && !player.hasPermission("areashop.setteleportall")) {
plugin.message(player, "setteleport-noPermissionOther", region);
return;
}
ProtectedRegion wgRegion = region.getRegion();
if(args.length > 2 && args[2] != null && (args[2].equalsIgnoreCase("reset") || args[2].equalsIgnoreCase("yes") || args[2].equalsIgnoreCase("true"))) {
region.setTeleport(null);
region.update();
plugin.message(player, "setteleport-reset", region);
return;
}
if(!player.hasPermission("areashop.setteleportoutsideregion") && (wgRegion == null || !wgRegion.contains(player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()))) {
plugin.message(player, "setteleport-notInside", region);
return;
}
region.setTeleport(player.getLocation());
region.update();
plugin.message(player, "setteleport-success", region);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
result.add("reset");
}
return result;
}
}
@@ -1,228 +1,229 @@
package nl.evolutioncoding.areashop.commands;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.bukkit.selections.Selection;
import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion.RegionEvent;
import nl.evolutioncoding.areashop.regions.RegionGroup;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.Location;
import org.bukkit.block.BlockFace;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.ArrayList;
import java.util.List;
public class StackCommand extends CommandAreaShop {
public StackCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop stack";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.stack")) {
return plugin.getLanguageManager().getLang("help-stack");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
// Check permission
if(!sender.hasPermission("areashop.stack")) {
plugin.message(sender, "stack-noPermission");
return;
}
// Only from ingame
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
final Player player = (Player)sender;
// Specify enough arguments
if(args.length < 5) {
plugin.message(sender, "stack-help");
return;
}
// Check amount
int tempAmount = -1;
try {
tempAmount = Integer.parseInt(args[1]);
} catch(NumberFormatException e) {
// Incorrect number
}
if(tempAmount <= 0) {
plugin.message(player, "stack-wrongAmount", args[1]);
return;
}
// Check gap
int gap;
try {
gap = Integer.parseInt(args[2]);
} catch(NumberFormatException e) {
plugin.message(player, "stack-wrongGap", args[2]);
return;
}
// Check region type
if(!"rent".equalsIgnoreCase(args[4]) && !"buy".equalsIgnoreCase(args[4])) {
plugin.message(sender, "stack-help");
return;
}
// Get WorldEdit selection
final Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "stack-noSelection");
return;
}
// Get or create group
RegionGroup group = null;
if(args.length > 5) {
group = plugin.getFileManager().getGroup(args[5]);
if(group == null) {
group = new RegionGroup(plugin, args[5]);
plugin.getFileManager().addGroup(group);
}
}
// Get facing of the player (must be clearly one of the four directions to make sure it is no mistake)
BlockFace facing = Utils.yawToFacing(player.getLocation().getYaw());
if(!(facing == BlockFace.NORTH || facing == BlockFace.EAST || facing == BlockFace.SOUTH || facing == BlockFace.WEST)) {
plugin.message(player, "stack-unclearDirection", facing.toString().toLowerCase().replace('_', '-'));
return;
}
final Location shift = new Location(selection.getWorld(), 0, 0, 0);
if(facing == BlockFace.SOUTH) {
shift.setZ(-selection.getLength() - gap);
} else if(facing == BlockFace.WEST) {
shift.setX(selection.getWidth() + gap);
} else if(facing == BlockFace.NORTH) {
shift.setZ(selection.getLength() + gap);
} else if(facing == BlockFace.EAST) {
shift.setX(-selection.getWidth() - gap);
}
AreaShop.debug(" calculated shift vector: " + shift + ", with facing=" + facing);
// Create regions and add them to AreaShop
final String namePrefix = args[3];
final int regionsPerTick = plugin.getConfig().getInt("adding.regionsPerTick");
final boolean rentRegions = "rent".equalsIgnoreCase(args[4]);
final int amount = tempAmount;
final RegionGroup finalGroup = group;
String type;
if(rentRegions) {
type = "rent";
} else {
type = "buy";
}
String groupsMessage = "";
if(group != null) {
groupsMessage = plugin.getLanguageManager().getLang("stack-addToGroup", group.getName());
}
plugin.message(player, "stack-accepted", amount, type, gap, namePrefix, groupsMessage);
plugin.message(player, "stack-addStart", amount, regionsPerTick*20);
new BukkitRunnable() {
private int current = 0;
private RegionManager manager = AreaShop.getInstance().getWorldGuard().getRegionManager(selection.getWorld());
private int counter = 1;
@Override
public void run() {
for(int i=0; i<regionsPerTick; i++) {
if(current < amount) {
// Create the region name
String counterName = counter+"";
int minimumLength = plugin.getConfig().getInt("stackRegionNumberLength");
while(counterName.length() < minimumLength) {
counterName = "0"+counterName;
}
String regionName = namePrefix + counterName;
while(manager.getRegion(regionName) != null || AreaShop.getInstance().getFileManager().getRegion(regionName) != null) {
counter++;
counterName = counter+"";
minimumLength = plugin.getConfig().getInt("stackRegionNumberLength");
while(counterName.length() < minimumLength) {
counterName = "0"+counterName;
}
regionName = namePrefix + counterName;
}
// Add the region to WorldGuard (at startposition shifted by the number of this region times the blocks it should shift)
ProtectedCuboidRegion region = new ProtectedCuboidRegion(regionName,
new BlockVector(
selection.getMinimumPoint().getBlockX() + shift.getBlockX()*current,
selection.getMinimumPoint().getBlockY() + shift.getBlockY()*current,
selection.getMinimumPoint().getBlockZ() + shift.getBlockZ()*current
),
new BlockVector(
selection.getMaximumPoint().getBlockX() + shift.getBlockX()*current,
selection.getMaximumPoint().getBlockY() + shift.getBlockY()*current,
selection.getMaximumPoint().getBlockZ() + shift.getBlockZ()*current
)
);
manager.addRegion(region);
// Add the region to AreaShop
if(rentRegions) {
RentRegion rent = new RentRegion(plugin, region.getId(), selection.getWorld());
if(finalGroup != null) {
finalGroup.addMember(rent);
}
rent.runEventCommands(RegionEvent.CREATED, true);
plugin.getFileManager().addRent(rent);
rent.handleSchematicEvent(RegionEvent.CREATED);
rent.runEventCommands(RegionEvent.CREATED, false);
rent.update();
} else {
BuyRegion buy = new BuyRegion(plugin, region.getId(), selection.getWorld());
if(finalGroup != null) {
finalGroup.addMember(buy);
}
buy.runEventCommands(RegionEvent.CREATED, true);
plugin.getFileManager().addBuy(buy);
buy.handleSchematicEvent(RegionEvent.CREATED);
buy.runEventCommands(RegionEvent.CREATED, false);
buy.update();
}
current++;
}
}
if(current >= amount) {
if(player.isOnline()) {
plugin.message(player, "stack-addComplete");
}
this.cancel();
}
}
}.runTaskTimer(plugin, 1, 1);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 5) {
result.add("rent");
result.add("buy");
} else if(toComplete == 6) {
result.addAll(plugin.getFileManager().getGroupNames());
}
return result;
}
}
package me.wiefferink.areashop.commands;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.bukkit.selections.Selection;
import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.messages.Message;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RegionGroup;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.Location;
import org.bukkit.block.BlockFace;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.ArrayList;
import java.util.List;
public class StackCommand extends CommandAreaShop {
public StackCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop stack";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.stack")) {
return "help-stack";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
// Check permission
if(!sender.hasPermission("areashop.stack")) {
plugin.message(sender, "stack-noPermission");
return;
}
// Only from ingame
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
final Player player = (Player)sender;
// Specify enough arguments
if(args.length < 5) {
plugin.message(sender, "stack-help");
return;
}
// Check amount
int tempAmount = -1;
try {
tempAmount = Integer.parseInt(args[1]);
} catch(NumberFormatException e) {
// Incorrect number
}
if(tempAmount <= 0) {
plugin.message(player, "stack-wrongAmount", args[1]);
return;
}
// Check gap
int gap;
try {
gap = Integer.parseInt(args[2]);
} catch(NumberFormatException e) {
plugin.message(player, "stack-wrongGap", args[2]);
return;
}
// Check region type
if(!"rent".equalsIgnoreCase(args[4]) && !"buy".equalsIgnoreCase(args[4])) {
plugin.message(sender, "stack-help");
return;
}
// Get WorldEdit selection
final Selection selection = plugin.getWorldEdit().getSelection(player);
if(selection == null) {
plugin.message(player, "stack-noSelection");
return;
}
// Get or create group
RegionGroup group = null;
if(args.length > 5) {
group = plugin.getFileManager().getGroup(args[5]);
if(group == null) {
group = new RegionGroup(plugin, args[5]);
plugin.getFileManager().addGroup(group);
}
}
// Get facing of the player (must be clearly one of the four directions to make sure it is no mistake)
BlockFace facing = Utils.yawToFacing(player.getLocation().getYaw());
if(!(facing == BlockFace.NORTH || facing == BlockFace.EAST || facing == BlockFace.SOUTH || facing == BlockFace.WEST)) {
plugin.message(player, "stack-unclearDirection", facing.toString().toLowerCase().replace('_', '-'));
return;
}
final Location shift = new Location(selection.getWorld(), 0, 0, 0);
if(facing == BlockFace.SOUTH) {
shift.setZ(-selection.getLength() - gap);
} else if(facing == BlockFace.WEST) {
shift.setX(selection.getWidth() + gap);
} else if(facing == BlockFace.NORTH) {
shift.setZ(selection.getLength() + gap);
} else if(facing == BlockFace.EAST) {
shift.setX(-selection.getWidth() - gap);
}
AreaShop.debug(" calculated shift vector: " + shift + ", with facing=" + facing);
// Create regions and add them to AreaShop
final String namePrefix = args[3];
final int regionsPerTick = plugin.getConfig().getInt("adding.regionsPerTick");
final boolean rentRegions = "rent".equalsIgnoreCase(args[4]);
final int amount = tempAmount;
final RegionGroup finalGroup = group;
String type;
if(rentRegions) {
type = "rent";
} else {
type = "buy";
}
Message groupsMessage = Message.none();
if(group != null) {
groupsMessage = Message.fromKey("stack-addToGroup").replacements(group.getName());
}
plugin.message(player, "stack-accepted", amount, type, gap, namePrefix, groupsMessage);
plugin.message(player, "stack-addStart", amount, regionsPerTick*20);
new BukkitRunnable() {
private int current = 0;
private RegionManager manager = AreaShop.getInstance().getWorldGuard().getRegionManager(selection.getWorld());
private int counter = 1;
@Override
public void run() {
for(int i=0; i<regionsPerTick; i++) {
if(current < amount) {
// Create the region name
String counterName = counter+"";
int minimumLength = plugin.getConfig().getInt("stackRegionNumberLength");
while(counterName.length() < minimumLength) {
counterName = "0"+counterName;
}
String regionName = namePrefix + counterName;
while(manager.getRegion(regionName) != null || AreaShop.getInstance().getFileManager().getRegion(regionName) != null) {
counter++;
counterName = counter+"";
minimumLength = plugin.getConfig().getInt("stackRegionNumberLength");
while(counterName.length() < minimumLength) {
counterName = "0"+counterName;
}
regionName = namePrefix + counterName;
}
// Add the region to WorldGuard (at startposition shifted by the number of this region times the blocks it should shift)
ProtectedCuboidRegion region = new ProtectedCuboidRegion(regionName,
new BlockVector(
selection.getMinimumPoint().getBlockX() + shift.getBlockX()*current,
selection.getMinimumPoint().getBlockY() + shift.getBlockY()*current,
selection.getMinimumPoint().getBlockZ() + shift.getBlockZ()*current
),
new BlockVector(
selection.getMaximumPoint().getBlockX() + shift.getBlockX()*current,
selection.getMaximumPoint().getBlockY() + shift.getBlockY()*current,
selection.getMaximumPoint().getBlockZ() + shift.getBlockZ()*current
)
);
manager.addRegion(region);
// Add the region to AreaShop
if(rentRegions) {
RentRegion rent = new RentRegion(plugin, region.getId(), selection.getWorld());
if(finalGroup != null) {
finalGroup.addMember(rent);
}
rent.runEventCommands(GeneralRegion.RegionEvent.CREATED, true);
plugin.getFileManager().addRent(rent);
rent.handleSchematicEvent(GeneralRegion.RegionEvent.CREATED);
rent.runEventCommands(GeneralRegion.RegionEvent.CREATED, false);
rent.update();
} else {
BuyRegion buy = new BuyRegion(plugin, region.getId(), selection.getWorld());
if(finalGroup != null) {
finalGroup.addMember(buy);
}
buy.runEventCommands(GeneralRegion.RegionEvent.CREATED, true);
plugin.getFileManager().addBuy(buy);
buy.handleSchematicEvent(GeneralRegion.RegionEvent.CREATED);
buy.runEventCommands(GeneralRegion.RegionEvent.CREATED, false);
buy.update();
}
current++;
}
}
if(current >= amount) {
if(player.isOnline()) {
plugin.message(player, "stack-addComplete");
}
this.cancel();
}
}
}.runTaskTimer(plugin, 1, 1);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 5) {
result.add("rent");
result.add("buy");
} else if(toComplete == 6) {
result.addAll(plugin.getFileManager().getGroupNames());
}
return result;
}
}
@@ -1,118 +1,116 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class StopresellCommand extends CommandAreaShop {
public StopresellCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop stopresell";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.stopresellall")) {
return plugin.getLanguageManager().getLang("help-stopResellAll");
} else if(target.hasPermission("areashop.stopresell")) {
return plugin.getLanguageManager().getLang("help-stopResell");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.stopresell") && !sender.hasPermission("areashop.stopresellall")) {
plugin.message(sender, "stopresell-noPermissionOther");
return;
}
BuyRegion buy;
if(args.length <= 1) {
if (sender instanceof Player) {
// get the region by location
List<BuyRegion> regions = Utils.getApplicableBuyRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
buy = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
buy = plugin.getFileManager().getBuy(args[1]);
if(buy == null) {
plugin.message(sender, "stopresell-notRegistered", args[1]);
return;
}
}
if(buy == null) {
plugin.message(sender, "stopresell-noRegionFound");
return;
}
if(!buy.isInResellingMode()) {
plugin.message(sender, "stopresell-notResell", buy);
return;
}
if(sender.hasPermission("areashop.stopresellall")) {
buy.disableReselling();
buy.update();
plugin.message(sender, "stopresell-success", buy);
} else if(sender.hasPermission("areashop.stopresell") && sender instanceof Player) {
if(buy.isOwner((Player)sender)) {
buy.disableReselling();
buy.update();
plugin.message(sender, "stopresell-success", buy);
} else {
plugin.message(sender, "stopresell-noPermissionOther", buy);
}
} else {
plugin.message(sender, "stopresell-noPermission", buy);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold() && region.isInResellingMode()) {
result.add(region.getName());
}
}
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.BuyRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class StopresellCommand extends CommandAreaShop {
public StopresellCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop stopresell";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.stopresellall") || target.hasPermission("areashop.stopresell")) {
return "help-stopResell";
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.stopresell") && !sender.hasPermission("areashop.stopresellall")) {
plugin.message(sender, "stopresell-noPermissionOther");
return;
}
BuyRegion buy;
if(args.length <= 1) {
if (sender instanceof Player) {
// get the region by location
List<BuyRegion> regions = Utils.getApplicableBuyRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
buy = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
buy = plugin.getFileManager().getBuy(args[1]);
if(buy == null) {
plugin.message(sender, "stopresell-notRegistered", args[1]);
return;
}
}
if(buy == null) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
}
if(!buy.isInResellingMode()) {
plugin.message(sender, "stopresell-notResell", buy);
return;
}
if(sender.hasPermission("areashop.stopresellall")) {
buy.disableReselling();
buy.update();
plugin.message(sender, "stopresell-success", buy);
} else if(sender.hasPermission("areashop.stopresell") && sender instanceof Player) {
if(buy.isOwner((Player)sender)) {
buy.disableReselling();
buy.update();
plugin.message(sender, "stopresell-success", buy);
} else {
plugin.message(sender, "stopresell-noPermissionOther", buy);
}
} else {
plugin.message(sender, "stopresell-noPermission", buy);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold() && region.isInResellingMode()) {
result.add(region.getName());
}
}
}
return result;
}
}
@@ -1,71 +1,85 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class TeleportCommand extends CommandAreaShop {
public TeleportCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop tp";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.teleportall")) {
return plugin.getLanguageManager().getLang("help-teleportAll");
} else if(target.hasPermission("areashop.teleport")) {
return plugin.getLanguageManager().getLang("help-teleport");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.teleport") && !sender.hasPermission("areashop.teleportall") && !sender.hasPermission("areashop.teleportsign") && !sender.hasPermission("areashop.teleportsignall") && !sender.hasPermission("areashop.teleportfriend") && !sender.hasPermission("teleportfriendsign")) {
plugin.message(sender, "teleport-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
if(args.length <= 1 || args[1] == null) {
plugin.message(sender, "teleport-help");
return;
}
Player player = (Player)sender;
GeneralRegion region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(player, "teleport-noRentOrBuy", args[1]);
return;
}
if(args.length >= 3 && (args[2].equalsIgnoreCase("sign") || args[2].equalsIgnoreCase("yes") || args[2].equalsIgnoreCase("true"))) {
region.teleportPlayer(player, true);
} else {
region.teleportPlayer(player, false);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
result.add("sign");
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class TeleportCommand extends CommandAreaShop {
public TeleportCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop tp";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.teleportall") || target.hasPermission("areashop.teleport")) {
return "help-teleport";
}
return null;
}
/**
* Check if a person can teleport to the region (assuming he is not teleporting to a sign)
* @param person The person to check
* @param region The region to check for
* @return true if the person can teleport to it, otherwise false
*/
public static boolean canUse(CommandSender person, GeneralRegion region) {
if(!(person instanceof Player)) {
return false;
}
Player player = (Player)person;
return player.hasPermission("areashop.teleportall")
|| region.isOwner(player) && player.hasPermission("areashop.teleport")
|| region.getFriendsFeature().getFriends().contains(player.getUniqueId()) && player.hasPermission("areashop.teleportfriend");
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.teleport") && !sender.hasPermission("areashop.teleportall") && !sender.hasPermission("areashop.teleportsign") && !sender.hasPermission("areashop.teleportsignall") && !sender.hasPermission("areashop.teleportfriend") && !sender.hasPermission("teleportfriendsign")) {
plugin.message(sender, "teleport-noPermission");
return;
}
if (!(sender instanceof Player)) {
plugin.message(sender, "cmd-onlyByPlayer");
return;
}
if(args.length <= 1 || args[1] == null) {
plugin.message(sender, "teleport-help");
return;
}
Player player = (Player)sender;
GeneralRegion region = plugin.getFileManager().getRegion(args[1]);
if(region == null) {
plugin.message(player, "teleport-noRentOrBuy", args[1]);
return;
}
if(args.length >= 3 && (args[2].equalsIgnoreCase("sign") || args[2].equalsIgnoreCase("yes") || args[2].equalsIgnoreCase("true"))) {
region.teleportPlayer(player, true);
} else {
region.teleportPlayer(player, false);
}
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(plugin.getFileManager().getRegionNames());
} else if(toComplete == 3) {
result.add("sign");
}
return result;
}
}
@@ -1,91 +1,107 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class UnrentCommand extends CommandAreaShop {
public UnrentCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop unrent";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.unrent")) {
return plugin.getLanguageManager().getLang("help-unrent");
} else if(target.hasPermission("areashop.unrentown")) {
return plugin.getLanguageManager().getLang("help-unrentOwn");
}
return null;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.unrent") && !sender.hasPermission("areashop.unrentown")) {
plugin.message(sender, "unrent-noPermission");
return;
}
RentRegion rent;
if(args.length <= 1) {
if (sender instanceof Player) {
// get the region by location
List<RentRegion> regions = Utils.getApplicableRentRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
rent = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
rent = plugin.getFileManager().getRent(args[1]);
}
if(rent == null) {
plugin.message(sender, "unrent-notRegistered");
return;
}
if(!rent.isRented()) {
plugin.message(sender, "unrent-notRented", rent);
return;
}
rent.unRent(true, sender);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isRented()) {
result.add(region.getName());
}
}
}
return result;
}
}
package me.wiefferink.areashop.commands;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class UnrentCommand extends CommandAreaShop {
public UnrentCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop unrent";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.unrent") || target.hasPermission("areashop.unrentown")) {
return "help-unrent";
}
return null;
}
/**
* Check if a person can unrent the region
* @param person The person to check
* @param region The region to check for
* @return true if the person can unrent it, otherwise false
*/
public static boolean canUse(CommandSender person, GeneralRegion region) {
if(person.hasPermission("areashop.unrent")) {
return true;
}
if(person instanceof Player) {
Player player = (Player)person;
return region.isOwner(player) && person.hasPermission("areashop.unrentown");
}
return false;
}
@Override
public void execute(CommandSender sender, String[] args) {
if(!sender.hasPermission("areashop.unrent") && !sender.hasPermission("areashop.unrentown")) {
plugin.message(sender, "unrent-noPermission");
return;
}
RentRegion rent;
if(args.length <= 1) {
if (sender instanceof Player) {
// get the region by location
List<RentRegion> regions = Utils.getApplicableRentRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
rent = regions.get(0);
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
} else {
rent = plugin.getFileManager().getRent(args[1]);
}
if(rent == null) {
plugin.message(sender, "unrent-notRegistered");
return;
}
if(!rent.isRented()) {
plugin.message(sender, "unrent-notRented", rent);
return;
}
rent.unRent(true, sender);
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
ArrayList<String> result = new ArrayList<>();
if(toComplete == 2) {
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isRented()) {
result.add(region.getName());
}
}
}
return result;
}
}
@@ -1,4 +1,4 @@
package nl.evolutioncoding.areashop.events;
package me.wiefferink.areashop.events;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
@@ -1,4 +1,4 @@
package nl.evolutioncoding.areashop.events;
package me.wiefferink.areashop.events;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.ask;
package me.wiefferink.areashop.events.ask;
import nl.evolutioncoding.areashop.events.CancellableAreaShopEvent;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import me.wiefferink.areashop.events.CancellableAreaShopEvent;
import me.wiefferink.areashop.regions.BuyRegion;
import org.bukkit.entity.Player;
/**
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.ask;
package me.wiefferink.areashop.events.ask;
import nl.evolutioncoding.areashop.events.CancellableAreaShopEvent;
import nl.evolutioncoding.areashop.regions.RentRegion;
import me.wiefferink.areashop.events.CancellableAreaShopEvent;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.entity.Player;
/**
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.ask;
package me.wiefferink.areashop.events.ask;
import nl.evolutioncoding.areashop.events.CancellableAreaShopEvent;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import me.wiefferink.areashop.events.CancellableAreaShopEvent;
import me.wiefferink.areashop.regions.BuyRegion;
import org.bukkit.entity.Player;
/**
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.ask;
package me.wiefferink.areashop.events.ask;
import nl.evolutioncoding.areashop.events.CancellableAreaShopEvent;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import me.wiefferink.areashop.events.CancellableAreaShopEvent;
import me.wiefferink.areashop.regions.BuyRegion;
/**
* Broadcasted when a region is about to get sold
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.ask;
package me.wiefferink.areashop.events.ask;
import nl.evolutioncoding.areashop.events.CancellableAreaShopEvent;
import nl.evolutioncoding.areashop.regions.RentRegion;
import me.wiefferink.areashop.events.CancellableAreaShopEvent;
import me.wiefferink.areashop.regions.RentRegion;
/**
* Broadcasted when a region is about to be unrented
@@ -0,0 +1,52 @@
package me.wiefferink.areashop.events.askandnotify;
import me.wiefferink.areashop.events.CancellableAreaShopEvent;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
/**
* Broadcasted when a friend is being added to a region
*/
public class AddFriendEvent extends CancellableAreaShopEvent {
private GeneralRegion region;
private OfflinePlayer friend;
private CommandSender by;
/**
* Constructor
* @param region The region the friend is getting added to
* @param friend The friend that is about to be added
* @param by The CommandSender that is adding the friend, or null if none
*/
public AddFriendEvent(GeneralRegion region, OfflinePlayer friend, CommandSender by) {
this.region = region;
this.friend = friend;
this.by = by;
}
/**
* Get the region where the friend is getting added to
* @return the region
*/
public GeneralRegion getRegion() {
return region;
}
/**
* Get the OfflinePlayer that is getting added as friend
* @return The friend that is getting added
*/
public OfflinePlayer getFriend() {
return friend;
}
/**
* Get the CommandSender that is adding the friend
* @return null if none, a CommandSender if done by someone (likely Player or ConsoleCommandSender)
*/
public CommandSender getBy() {
return by;
}
}
@@ -0,0 +1,52 @@
package me.wiefferink.areashop.events.askandnotify;
import me.wiefferink.areashop.events.CancellableAreaShopEvent;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
/**
* Broadcasted when a friend is being added to a region
*/
public class DeleteFriendEvent extends CancellableAreaShopEvent {
private GeneralRegion region;
private OfflinePlayer friend;
private CommandSender by;
/**
* Constructor
* @param region The region the friend is getting added to
* @param friend The friend that is about to be added
* @param by The CommandSender that is adding the friend, or null if none
*/
public DeleteFriendEvent(GeneralRegion region, OfflinePlayer friend, CommandSender by) {
this.region = region;
this.friend = friend;
this.by = by;
}
/**
* Get the region where the friend is getting added to
* @return the region
*/
public GeneralRegion getRegion() {
return region;
}
/**
* Get the OfflinePlayer that is getting added as friend
* @return The friend that is getting added
*/
public OfflinePlayer getFriend() {
return friend;
}
/**
* Get the CommandSender that is adding the friend
* @return null if none, a CommandSender if done by someone (likely Player or ConsoleCommandSender)
*/
public CommandSender getBy() {
return by;
}
}
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.notify;
package me.wiefferink.areashop.events.notify;
import nl.evolutioncoding.areashop.events.NotifyAreaShopEvent;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.events.NotifyAreaShopEvent;
import me.wiefferink.areashop.regions.GeneralRegion;
/**
* Broadcasted when a region has been added to AreaShop
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.notify;
package me.wiefferink.areashop.events.notify;
import nl.evolutioncoding.areashop.events.NotifyAreaShopEvent;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import me.wiefferink.areashop.events.NotifyAreaShopEvent;
import me.wiefferink.areashop.regions.BuyRegion;
/**
* Broadcasted when a region has been bought
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.notify;
package me.wiefferink.areashop.events.notify;
import nl.evolutioncoding.areashop.events.NotifyAreaShopEvent;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.events.NotifyAreaShopEvent;
import me.wiefferink.areashop.regions.GeneralRegion;
/**
* Broadcasted when the data of a region changes.
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.notify;
package me.wiefferink.areashop.events.notify;
import nl.evolutioncoding.areashop.events.NotifyAreaShopEvent;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.events.NotifyAreaShopEvent;
import me.wiefferink.areashop.regions.GeneralRegion;
/**
* Broadcasted when a region has been removed from AreaShop
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.notify;
package me.wiefferink.areashop.events.notify;
import nl.evolutioncoding.areashop.events.NotifyAreaShopEvent;
import nl.evolutioncoding.areashop.regions.RentRegion;
import me.wiefferink.areashop.events.NotifyAreaShopEvent;
import me.wiefferink.areashop.regions.RentRegion;
/**
* Broadcasted when a region has been rented
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.notify;
package me.wiefferink.areashop.events.notify;
import nl.evolutioncoding.areashop.events.NotifyAreaShopEvent;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import me.wiefferink.areashop.events.NotifyAreaShopEvent;
import me.wiefferink.areashop.regions.BuyRegion;
import java.util.UUID;
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.notify;
package me.wiefferink.areashop.events.notify;
import nl.evolutioncoding.areashop.events.NotifyAreaShopEvent;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import me.wiefferink.areashop.events.NotifyAreaShopEvent;
import me.wiefferink.areashop.regions.BuyRegion;
import java.util.UUID;
@@ -12,15 +12,18 @@ public class SoldRegionEvent extends NotifyAreaShopEvent {
private BuyRegion region;
private UUID oldBuyer;
private double refundedMoney;
/**
* Constructor
* @param region The region that has been sold
* @param oldBuyer The player for which the region has been sold
* @param refundedMoney The amount of money that has been refunded
*/
public SoldRegionEvent(BuyRegion region, UUID oldBuyer) {
public SoldRegionEvent(BuyRegion region, UUID oldBuyer, double refundedMoney) {
this.region = region;
this.oldBuyer = oldBuyer;
this.refundedMoney = refundedMoney;
}
/**
@@ -38,4 +41,12 @@ public class SoldRegionEvent extends NotifyAreaShopEvent {
public UUID getOldBuyer() {
return oldBuyer;
}
/**
* Get the amount that is paid back to the player
* @return The amount of money paid back to the player
*/
public double getRefundedMoney() {
return refundedMoney;
}
}
@@ -1,7 +1,7 @@
package nl.evolutioncoding.areashop.events.notify;
package me.wiefferink.areashop.events.notify;
import nl.evolutioncoding.areashop.events.NotifyAreaShopEvent;
import nl.evolutioncoding.areashop.regions.RentRegion;
import me.wiefferink.areashop.events.NotifyAreaShopEvent;
import me.wiefferink.areashop.regions.RentRegion;
import java.util.UUID;
@@ -12,15 +12,18 @@ public class UnrentedRegionEvent extends NotifyAreaShopEvent {
private RentRegion region;
private UUID oldRenter;
private double refundedMoney;
/**
* Constructor
* @param region The region that has been unrented
* @param oldRenter The player that rented the region before it was unrented
* @param refundedMoney The amount of money that has been refunded
*/
public UnrentedRegionEvent(RentRegion region, UUID oldRenter) {
public UnrentedRegionEvent(RentRegion region, UUID oldRenter, double refundedMoney) {
this.region = region;
this.oldRenter = oldRenter;
this.refundedMoney = refundedMoney;
}
/**
@@ -38,4 +41,12 @@ public class UnrentedRegionEvent extends NotifyAreaShopEvent {
public UUID getOldRenter() {
return oldRenter;
}
/**
* Get the amount that is paid back to the player
* @return The amount of money paid back to the player
*/
public double getRefundedMoney() {
return refundedMoney;
}
}
@@ -1,18 +1,16 @@
package nl.evolutioncoding.areashop.features;
package me.wiefferink.areashop.features;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.events.ask.*;
import nl.evolutioncoding.areashop.events.notify.*;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.events.ask.*;
import me.wiefferink.areashop.events.askandnotify.AddFriendEvent;
import me.wiefferink.areashop.events.askandnotify.DeleteFriendEvent;
import me.wiefferink.areashop.events.notify.*;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
public class DebugFeature extends Feature implements Listener {
public DebugFeature(AreaShop plugin) {
super(plugin);
}
@EventHandler
public void buyingRegion(BuyingRegionEvent event) {
AreaShop.debug("BuyingRegionEvent: " + event.getPlayer().getName() + " is trying to buy " + event.getRegion().getName());
@@ -67,4 +65,24 @@ public class DebugFeature extends Feature implements Listener {
public void regionUpdate(RegionUpdateEvent event) {
//AreaShop.debug("RegionUpdateEvent: " + event.getRegion().getName() + " updated");
}
@EventHandler
public void addedRegion(AddedRegionEvent event) {
AreaShop.debug("AddedRegionEvent: "+event.getRegion().getName());
}
@EventHandler
public void removedRegion(RemovedRegionEvent event) {
AreaShop.debug("RemovedRegionEvent: "+event.getRegion().getName());
}
@EventHandler
public void addedFriend(AddFriendEvent event) {
AreaShop.debug("AddFriendEvent: region "+event.getRegion().getName()+", "+event.getFriend().getName()+" by "+(event.getBy() == null ? "<nobody>" : event.getBy().getName()));
}
@EventHandler
public void deleteFriend(DeleteFriendEvent event) {
AreaShop.debug("DeleteFriendEvent: region "+event.getRegion().getName()+", "+event.getFriend().getName()+" by "+(event.getBy() == null ? "<nobody>" : event.getBy().getName()));
}
}
@@ -0,0 +1,7 @@
package me.wiefferink.areashop.features;
import me.wiefferink.areashop.AreaShop;
public class Feature {
AreaShop plugin = AreaShop.getInstance();
}
@@ -0,0 +1,107 @@
package me.wiefferink.areashop.features;
import me.wiefferink.areashop.events.askandnotify.AddFriendEvent;
import me.wiefferink.areashop.events.askandnotify.DeleteFriendEvent;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import java.util.*;
public class FriendsFeature extends Feature {
private GeneralRegion region;
public FriendsFeature(GeneralRegion region) {
this.region = region;
}
/**
* Add a friend to the region
* @param player The UUID of the player to add
* @param by The CommandSender that is adding the friend, or null
* @return true if the friend has been added, false if adding a friend was cancelled by another plugin
*/
public boolean addFriend(UUID player, CommandSender by) {
// Fire and check event
AddFriendEvent event = new AddFriendEvent(region, Bukkit.getOfflinePlayer(player), by);
Bukkit.getPluginManager().callEvent(event);
if(event.isCancelled()) {
plugin.message(by, "general-cancelled", event.getReason(), this);
return false;
}
Set<String> friends = new HashSet<>(region.getConfig().getStringList("general.friends"));
friends.add(player.toString());
List<String> list = new ArrayList<>(friends);
region.setSetting("general.friends", list);
return true;
}
/**
* Delete a friend from the region
* @param player The UUID of the player to delete
* @param by The CommandSender that is adding the friend, or null
* @return true if the friend has been added, false if adding a friend was cancelled by another plugin
*/
public boolean deleteFriend(UUID player, CommandSender by) {
// Fire and check event
DeleteFriendEvent event = new DeleteFriendEvent(region, Bukkit.getOfflinePlayer(player), by);
Bukkit.getPluginManager().callEvent(event);
if(event.isCancelled()) {
plugin.message(by, "general-cancelled", event.getReason(), this);
return false;
}
Set<String> friends = new HashSet<>(region.getConfig().getStringList("general.friends"));
friends.remove(player.toString());
List<String> list = new ArrayList<>(friends);
if(list.isEmpty()) {
region.setSetting("general.friends", null);
} else {
region.setSetting("general.friends", list);
}
return true;
}
/**
* Get the list of friends added to this region
* @return Friends added to this region
*/
public Set<UUID> getFriends() {
HashSet<UUID> result = new HashSet<>();
for(String friend : region.getConfig().getStringList("general.friends")) {
try {
UUID id = UUID.fromString(friend);
result.add(id);
} catch(IllegalArgumentException e) {
// Don't add it
}
}
return result;
}
/**
* Get the list of friends added to this region
* @return Friends added to this region
*/
public Set<String> getFriendNames() {
HashSet<String> result = new HashSet<>();
for(UUID friend : getFriends()) {
OfflinePlayer player = Bukkit.getOfflinePlayer(friend);
if(player != null) {
result.add(player.getName());
}
}
return result;
}
/**
* Remove all friends that are added to this region
*/
public void clearFriends() {
region.setSetting("general.friends", null);
}
}
@@ -0,0 +1,346 @@
package me.wiefferink.areashop.features;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.events.notify.RegionUpdateEvent;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Sign;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import java.util.*;
public class SignsFeature extends Feature implements Listener {
private static Map<String, RegionSign> allSigns = new HashMap<>();
private GeneralRegion region;
private Map<String, RegionSign> signs;
public SignsFeature() {
}
public SignsFeature(GeneralRegion region) {
this.region = region;
signs = new HashMap<>();
// Setup current signs
ConfigurationSection signSection = region.getConfig().getConfigurationSection("general.signs");
if(signSection != null) {
for(String signKey : signSection.getKeys(false)) {
RegionSign sign = new RegionSign(region, this, signKey);
Location location = sign.getLocation();
if(location == null) {
plugin.getLogger().warning("Sign with key "+signKey+" of region "+region.getName()+" does not have a proper location");
continue;
}
signs.put(sign.getStringLocation(), sign);
}
allSigns.putAll(signs);
}
}
/**
* Convert a location to a string to use as map key
* @param location The location to get the key for
* @return A string to use in a map for a location
*/
public static String locationToString(Location location) {
return location.getWorld().getName()+";"+location.getBlockX()+";"+location.getBlockY()+";"+location.getBlockZ();
}
/**
* Get a sign by a location
* @param location The location to get the sign for
* @return The RegionSign that is at the location, or null if none
*/
public static RegionSign getSignByLocation(Location location) {
return allSigns.get(locationToString(location));
}
@EventHandler
public void regionUpdate(RegionUpdateEvent event) {
event.getRegion().getSignsFeature().update();
}
/**
* Update all signs connected to this region
* @return true if all signs are updated correctly, false if one or more updates failed
*/
public boolean update() {
boolean result = true;
for(RegionSign sign : signs.values()) {
result = result&sign.update();
}
return result;
}
/**
* Check if any of the signs need periodic updating
* @return true if one or more of the signs need periodic updating, otherwise false
*/
public boolean needsPeriodicUpdate() {
boolean result = false;
for(RegionSign sign : signs.values()) {
result = result|sign.needsPeriodicUpdate();
}
return result;
}
/**
* Get a list with all sign locations
* @return A List with all sign locations
*/
public List<Location> getSignLocations() {
List<Location> result = new ArrayList<>();
for(RegionSign sign : signs.values()) {
result.add(sign.getLocation());
}
return result;
}
/**
* Add a sign to this region
* @param location The location of the sign
* @param signType The type of the sign (WALL_SIGN or SIGN_POST)
* @param facing The orientation of the sign
* @param profile The profile to use with this sign (null for default)
*/
public void addSign(Location location, Material signType, BlockFace facing, String profile) {
int i = 0;
while(region.getConfig().isSet("general.signs."+i)) {
i++;
}
String signPath = "general.signs."+i+".";
region.setSetting(signPath+"location", Utils.locationToConfig(location));
region.setSetting(signPath+"facing", facing.name());
region.setSetting(signPath+"signType", signType.name());
if(profile != null && profile.length() != 0) {
region.setSetting(signPath+"profile", profile);
}
// Add to the map
RegionSign sign = new RegionSign(region, this, i+"");
signs.put(sign.getStringLocation(), sign);
allSigns.put(sign.getStringLocation(), sign);
}
/**
* Checks if there is a sign from this region at the specified location
* @param location Location to check
* @return true if this region has a sign at the location, otherwise false
*/
public boolean isSignOfRegion(Location location) {
Set<String> signs;
if(region.getConfig().getConfigurationSection("general.signs") == null) {
return false;
}
signs = region.getConfig().getConfigurationSection("general.signs").getKeys(false);
for(String sign : signs) {
Location signLocation = Utils.configToLocation(region.getConfig().getConfigurationSection("general.signs."+sign+".location"));
if(signLocation != null
&& signLocation.getWorld().equals(location.getWorld())
&& signLocation.getBlockX() == location.getBlockX()
&& signLocation.getBlockY() == location.getBlockY()
&& signLocation.getBlockZ() == location.getBlockZ()) {
return true;
}
}
return false;
}
/**
* Sign that is connected to a region to display information and interact with the region
*/
public class RegionSign {
private GeneralRegion region;
private SignsFeature signsFeature;
private String key;
public RegionSign(GeneralRegion region, SignsFeature signsFeature, String key) {
this.region = region;
this.signsFeature = signsFeature;
this.key = key;
}
/**
* Get the location of this sign
* @return The location of this sign
*/
public Location getLocation() {
return Utils.configToLocation(region.getConfig().getConfigurationSection("general.signs."+key+".location"));
}
/**
* Location string to be used as key in maps
* @return Location string
*/
public String getStringLocation() {
return locationToString(getLocation());
}
/**
* Get the region this sign is linked to
* @return The region this sign is linked to
*/
public GeneralRegion getRegion() {
return region;
}
/**
* Remove this sign from the region
*/
public void remove() {
getLocation().getBlock().setType(Material.AIR);
signs.remove(getStringLocation());
allSigns.remove(getStringLocation());
region.setSetting("general.signs."+key, null);
}
public String getProfile() {
String profile = region.getConfig().getString("general.signs."+key+".profile");
if(profile == null || profile.length() == 0) {
profile = region.getStringSetting("general.signProfile");
}
return profile;
}
/**
* Update this sign
* @return true if the update was successful, otherwise false
*/
public boolean update() {
if(region.isDeleted()) {
return false;
}
YamlConfiguration config = region.getConfig();
// Get the prefix
String prefix = "signProfiles."+getProfile()+"."+region.getState().getValue().toLowerCase()+".";
// Get the lines
String[] signLines = new String[4];
signLines[0] = plugin.getConfig().getString(prefix+"line1");
signLines[1] = plugin.getConfig().getString(prefix+"line2");
signLines[2] = plugin.getConfig().getString(prefix+"line3");
signLines[3] = plugin.getConfig().getString(prefix+"line4");
// Check if the sign should be present
Block block = getLocation().getBlock();
if(!plugin.getConfig().isSet(prefix)
|| ((signLines[0] == null || signLines[0].length() == 0)
&& (signLines[1] == null || signLines[1].length() == 0)
&& (signLines[2] == null || signLines[2].length() == 0)
&& (signLines[3] == null || signLines[3].length() == 0))) {
block.setType(Material.AIR);
} else {
Sign signState = null;
if(block.getType() != Material.WALL_SIGN && block.getType() != Material.SIGN_POST) {
Material signType;
try {
signType = Material.valueOf(config.getString("general.signs."+key+".signType"));
} catch(NullPointerException|IllegalArgumentException e) {
signType = null;
}
if(signType != Material.WALL_SIGN && signType != Material.SIGN_POST) {
AreaShop.debug(" setting sign failed");
return false;
}
block.setType(signType);
signState = (Sign)block.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)signState.getData();
BlockFace signFace;
try {
signFace = BlockFace.valueOf(config.getString("general.signs."+key+".facing"));
} catch(NullPointerException|IllegalArgumentException e) {
signFace = null;
}
if(signFace != null) {
signData.setFacingDirection(signFace);
signState.setData(signData);
}
}
if(signState == null) {
signState = (Sign)block.getState();
}
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)signState.getData();
if(!config.isString("general.signs."+key+".signType")) {
region.setSetting("general.signs."+key+".signType", signState.getType().toString());
}
if(!config.isString("general.signs."+key+".facing")) {
region.setSetting("general.signs."+key+".facing", signData.getFacing().toString());
}
// Apply replacements and color and then set it on the sign
for(int i = 0; i < signLines.length; i++) {
if(signLines[i] == null) {
signState.setLine(i, "");
continue;
}
signLines[i] = region.applyAllReplacements(signLines[i]);
signLines[i] = Utils.applyColors(signLines[i]);
signState.setLine(i, signLines[i]);
}
signState.update();
}
return true;
}
/**
* Check if the sign needs to update periodically
* @return true if it needs periodic updates, otherwise false
*/
public boolean needsPeriodicUpdate() {
// Get the prefix
String prefix = "signProfiles."+getProfile()+"."+region.getState().getValue().toLowerCase()+".line";
String line;
// Get the lines
for(int i = 1; i < 5; i++) {
line = plugin.getConfig().getString(prefix+i);
if(line != null && line.length() != 0 && line.contains(AreaShop.tagTimeLeft)) {
return true;
}
}
return false;
}
/**
* Run commands when a player clicks a sign
* @param clicker The player that clicked the sign
* @param clickType The type of clicking
* @return true if the commands ran successfully, false if any of them failed
*/
public boolean runSignCommands(Player clicker, GeneralRegion.ClickType clickType) {
// Get the profile set in the config
String profile = region.getConfig().getString("general.signs."+key+".profile");
if(profile == null || profile.length() == 0) {
profile = region.getStringSetting("general.signProfile");
}
// Get paths (state may change after running them)
String playerPath = "signProfiles."+profile+"."+region.getState().getValue().toLowerCase()+"."+clickType.getValue()+"Player";
String consolePath = "signProfiles."+profile+"."+region.getState().getValue().toLowerCase()+"."+clickType.getValue()+"Console";
// Run player commands if specified
List<String> playerCommands = new ArrayList<>();
for(String command : plugin.getConfig().getStringList(playerPath)) {
playerCommands.add(command.replace(AreaShop.tagClicker, clicker.getName()));
}
region.runCommands(clicker, playerCommands);
// Run console commands if specified
List<String> consoleCommands = new ArrayList<>();
for(String command : plugin.getConfig().getStringList(consolePath)) {
consoleCommands.add(command.replace(AreaShop.tagClicker, clicker.getName()));
}
region.runCommands(Bukkit.getConsoleSender(), consoleCommands);
return !playerCommands.isEmpty() || !consoleCommands.isEmpty();
}
}
}
@@ -1,14 +1,14 @@
package nl.evolutioncoding.areashop.features;
package me.wiefferink.areashop.features;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.protection.flags.DefaultFlag;
import com.sk89q.worldguard.protection.flags.Flag;
import com.sk89q.worldguard.protection.flags.InvalidFlagFormat;
import com.sk89q.worldguard.protection.flags.RegionGroupFlag;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.events.notify.RegionUpdateEvent;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.events.notify.RegionUpdateEvent;
import me.wiefferink.areashop.messages.Message;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@@ -17,9 +17,6 @@ import java.util.Set;
public class WorldGuardRegionFlagsFeature extends Feature implements Listener {
public WorldGuardRegionFlagsFeature(AreaShop plugin) {
super(plugin);
}
@EventHandler
public void regionUpdate(RegionUpdateEvent event) {
@@ -33,11 +30,31 @@ public class WorldGuardRegionFlagsFeature extends Feature implements Listener {
*/
protected boolean updateRegionFlags(GeneralRegion region) {
boolean result = true;
ConfigurationSection flags = plugin.getConfig().getConfigurationSection("flagProfiles." + region.getStringSetting("general.flagProfile") + "." + region.getState().getValue());
if(flags == null) {
AreaShop.debug("Flags section is null for region " + region.getName());
return false;
// General region flags
String allPath = "flagProfiles."+region.getStringSetting("general.flagProfile")+".ALL";
ConfigurationSection generalFlags = plugin.getConfig().getConfigurationSection(allPath);
if(plugin.getConfig().isSet(allPath) && generalFlags != null) { // Explicitely check if it is set, so don't apply if only in the default config
result = updateRegionFlags(region, generalFlags);
}
// Specific region flags
String specificPath = "flagProfiles."+region.getStringSetting("general.flagProfile")+"."+region.getState().getValue();
if(plugin.getConfig().isSet(specificPath)) { // Do no apply default flags if they are removed from the active config
ConfigurationSection specificFlags = plugin.getConfig().getConfigurationSection(specificPath);
result = result && specificFlags != null && updateRegionFlags(region, specificFlags);
}
return result;
}
/**
* Set the region flags/options to the values of a ConfigurationSection
* @param region The region to update the flags for
* @param flags The flags to apply
* @return true if the flags have been set correctly, otherwise false
*/
protected boolean updateRegionFlags(GeneralRegion region, ConfigurationSection flags) {
boolean result = true;
Set<String> flagNames = flags.getKeys(false);
WorldGuardPlugin worldGuard = plugin.getWorldGuard();
@@ -49,8 +66,7 @@ public class WorldGuardRegionFlagsFeature extends Feature implements Listener {
}
// Loop through all flags that are set in the config
for(String flagName : flagNames) {
String value = flags.getString(flagName);
value = region.applyAllReplacements(value);
String value = Message.fromString(flags.getString(flagName)).replacements(region).getPlain();
// In the config normal Bukkit color codes are used, those only need to be translated on 5.X WorldGuard versions
if(plugin.getWorldGuard().getDescription().getVersion().startsWith("5.")) {
value = translateBukkitToWorldGuardColors(value);
@@ -90,7 +106,7 @@ public class WorldGuardRegionFlagsFeature extends Feature implements Listener {
String flagSetting = null;
com.sk89q.worldguard.protection.flags.RegionGroup groupValue = null;
Flag<?> foundFlag = DefaultFlag.fuzzyMatchFlag(flagName);
Flag<?> foundFlag = plugin.getWorldGuardHandler().fuzzyMatchFlag(flagName);
if(foundFlag == null) {
plugin.getLogger().warning("Found wrong flag in flagProfiles section: " + flagName + ", check if that is the correct WorldGuard flag");
continue;
@@ -110,7 +126,7 @@ public class WorldGuardRegionFlagsFeature extends Feature implements Listener {
if(part.startsWith("g:")) {
if(part.length() > 2) {
try {
groupValue = groupFlag.parseInput(worldGuard, null, part.substring(2));
groupValue = plugin.getWorldGuardHandler().parseFlagGroupInput(groupFlag, part.substring(2));
} catch(InvalidFlagFormat e) {
plugin.getLogger().warning("Found wrong group value for flag " + flagName);
}
@@ -154,10 +170,11 @@ public class WorldGuardRegionFlagsFeature extends Feature implements Listener {
* @param region The WorldGuard region to set
* @param flag The flag to set
* @param value The value to set the flag to
* @param <V> They type of flag to set
* @throws InvalidFlagFormat When the value of the flag is wrong
*/
protected static <V> void setFlag(ProtectedRegion region, Flag<V> flag, String value) throws InvalidFlagFormat {
region.setFlag(flag, flag.parseInput(WorldGuardPlugin.inst(), null, value));
private <V> void setFlag(ProtectedRegion region, Flag<V> flag, String value) throws InvalidFlagFormat {
region.setFlag(flag, plugin.getWorldGuardHandler().parseFlagInput(flag, value));
}
/**
@@ -1,170 +1,170 @@
package nl.evolutioncoding.areashop.listeners;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerKickEvent;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerLoginEvent.Result;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.ArrayList;
import java.util.List;
/**
* Checks for placement of signs for this plugin
* @author NLThijs48
*/
public final class PlayerLoginLogoutListener implements Listener {
private AreaShop plugin;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public PlayerLoginLogoutListener(AreaShop plugin) {
this.plugin = plugin;
}
/**
* Called when a sign is changed
* @param event The event
*/
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerLogin(PlayerLoginEvent event) {
if(event.getResult() != Result.ALLOWED) {
return;
}
final Player player = event.getPlayer();
// Notify admins for plugin updates
if(plugin.updateAvailable() && player.hasPermission("areashop.notifyupdate")) {
AreaShop.getInstance().message(player, "update-playerNotify", AreaShop.getInstance().getDescription().getVersion(), AreaShop.getInstance().getUpdater().getLatestName());
}
// Schedule task to check for notifications, prevents a lag spike at login
new BukkitRunnable() {
@Override
public void run() {
// Delay until all regions are loaded
if(!plugin.isReady()) {
return;
}
if(!player.isOnline()) {
this.cancel();
return;
}
// Notify for rents that almost run out
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isRenter(player)) {
String warningSetting = region.getStringSetting("rent.warningOnLoginTime");
if(warningSetting == null || warningSetting.isEmpty()) {
continue;
}
long warningTime = Utils.durationStringToLong(warningSetting);
if(region.getTimeLeft() < warningTime) {
// Send the warning message later to let it appear after general MOTD messages
AreaShop.getInstance().message(player, "rent-expireWarning", region);
}
}
}
this.cancel();
}
}.runTaskTimer(plugin, 25, 25);
// Check if the player has regions that use an old name of him and update them
final List<GeneralRegion> regions = new ArrayList<>(plugin.getFileManager().getRegions());
new BukkitRunnable() {
private int current = 0;
@Override
public void run() {
// Delay until all regions are loaded
if(!plugin.isReady()) {
return;
}
// Check all regions
for(int i=0; i<plugin.getConfig().getInt("nameupdate.regionsPerTick"); i++) {
if(current < regions.size()) {
GeneralRegion region = regions.get(current);
if(region.isOwner(player)) {
if(region.isBuyRegion()) {
if(!player.getName().equals(region.getStringSetting("buy.buyerName"))) {
region.setSetting("buy.buyerName", player.getName());
region.update();
}
} else if(region.isRentRegion()) {
if(!player.getName().equals(region.getStringSetting("rent.renterName"))) {
region.setSetting("rent.renterName", player.getName());
region.update();
}
}
}
current++;
}
}
if(current >= regions.size()) {
this.cancel();
}
}
}.runTaskTimer(plugin, 22, 1); // Wait a bit before starting to prevent a lot of stress on the server when a player joins (a lot of plugins already do stuff then)
}
// Active time updates
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerLogout(PlayerQuitEvent event) {
updateLastActive(event.getPlayer());
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerKick(PlayerKickEvent event) {
updateLastActive(event.getPlayer());
}
/**
* Update the last active time for all regions the player is owner off
* @param player The player to update the active times for
*/
private void updateLastActive(Player player) {
for(GeneralRegion region : plugin.getFileManager().getRegions()) {
if(region.isOwner(player)) {
region.updateLastActiveTime();
}
}
}
}
package me.wiefferink.areashop.listeners;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerKickEvent;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerLoginEvent.Result;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.ArrayList;
import java.util.List;
/**
* Checks for placement of signs for this plugin
* @author NLThijs48
*/
public final class PlayerLoginLogoutListener implements Listener {
private AreaShop plugin;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public PlayerLoginLogoutListener(AreaShop plugin) {
this.plugin = plugin;
}
/**
* Called when a sign is changed
* @param event The event
*/
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerLogin(PlayerLoginEvent event) {
if(event.getResult() != Result.ALLOWED) {
return;
}
final Player player = event.getPlayer();
// Notify admins for plugin updates
if(plugin.updateAvailable() && player.hasPermission("areashop.notifyupdate")) {
AreaShop.getInstance().message(player, "update-playerNotify", AreaShop.getInstance().getDescription().getVersion(), AreaShop.getInstance().getUpdater().getLatestName());
}
// Schedule task to check for notifications, prevents a lag spike at login
new BukkitRunnable() {
@Override
public void run() {
// Delay until all regions are loaded
if(!plugin.isReady()) {
return;
}
if(!player.isOnline()) {
this.cancel();
return;
}
// Notify for rents that almost run out
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isRenter(player)) {
String warningSetting = region.getStringSetting("rent.warningOnLoginTime");
if(warningSetting == null || warningSetting.isEmpty()) {
continue;
}
long warningTime = Utils.durationStringToLong(warningSetting);
if(region.getTimeLeft() < warningTime) {
// Send the warning message later to let it appear after general MOTD messages
AreaShop.getInstance().message(player, "rent-expireWarning", region);
}
}
}
this.cancel();
}
}.runTaskTimer(plugin, 25, 25);
// Check if the player has regions that use an old name of him and update them
final List<GeneralRegion> regions = new ArrayList<>(plugin.getFileManager().getRegions());
new BukkitRunnable() {
private int current = 0;
@Override
public void run() {
// Delay until all regions are loaded
if(!plugin.isReady()) {
return;
}
// Check all regions
for(int i=0; i<plugin.getConfig().getInt("nameupdate.regionsPerTick"); i++) {
if(current < regions.size()) {
GeneralRegion region = regions.get(current);
if(region.isOwner(player)) {
if(region.isBuyRegion()) {
if(!player.getName().equals(region.getStringSetting("buy.buyerName"))) {
region.setSetting("buy.buyerName", player.getName());
region.update();
}
} else if(region.isRentRegion()) {
if(!player.getName().equals(region.getStringSetting("rent.renterName"))) {
region.setSetting("rent.renterName", player.getName());
region.update();
}
}
}
current++;
}
}
if(current >= regions.size()) {
this.cancel();
}
}
}.runTaskTimer(plugin, 22, 1); // Wait a bit before starting to prevent a lot of stress on the server when a player joins (a lot of plugins already do stuff then)
}
// Active time updates
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerLogout(PlayerQuitEvent event) {
updateLastActive(event.getPlayer());
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerKick(PlayerKickEvent event) {
updateLastActive(event.getPlayer());
}
/**
* Update the last active time for all regions the player is owner off
* @param player The player to update the active times for
*/
private void updateLastActive(Player player) {
for(GeneralRegion region : plugin.getFileManager().getRegions()) {
if(region.isOwner(player)) {
region.updateLastActiveTime();
}
}
}
}
@@ -1,132 +1,131 @@
package nl.evolutioncoding.areashop.listeners;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.Sign;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
/**
* Checks for placement of signs for this plugin
* @author NLThijs48
*/
public final class SignBreakListener implements Listener {
private AreaShop plugin;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public SignBreakListener(AreaShop plugin) {
this.plugin = plugin;
}
/**
* Called when a block is broken
* @param event The event
*/
@EventHandler(priority = EventPriority.HIGH)
public void onSignBreak(BlockBreakEvent event) {
if(event.isCancelled()) {
return;
}
Block block = event.getBlock();
// Check if it is a sign
if(block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST) {
// Check if the rent sign is really the same as a saved rent
GeneralRegion region = plugin.getFileManager().getRegionBySignLocation(block.getLocation());
if(region == null) {
return;
}
// Remove the sign of the rental region if the player has permission
if(event.getPlayer().hasPermission("areashop.delsign")) {
region.removeSign(block.getLocation());
plugin.message(event.getPlayer(), "delsign-success", region);
} else { // Cancel the breaking of the sign
event.setCancelled(true);
plugin.message(event.getPlayer(), "delsign-noPermission", region);
}
}
}
/**
* Called when the physics of a block change
* @param event The event
*/
@EventHandler(priority = EventPriority.HIGHEST)
public void onIndirectSignBreak(BlockPhysicsEvent event){
Block block = event.getBlock();
if(event.isCancelled()) {
return;
}
if(block.getType() == Material.SIGN_POST || block.getType() == Material.WALL_SIGN){
Sign sign = (Sign)block.getState();
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
final GeneralRegion region = plugin.getFileManager().getRegionBySignLocation(block.getLocation());
if(region == null) {
return;
}
event.setCancelled(true); // Cancel the sign breaking, will create a floating sign but at least it is not disconnected/gone
}
}
}
}
package me.wiefferink.areashop.listeners;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.features.SignsFeature;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.Sign;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
/**
* Checks for placement of signs for this plugin
* @author NLThijs48
*/
public final class SignBreakListener implements Listener {
private AreaShop plugin;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public SignBreakListener(AreaShop plugin) {
this.plugin = plugin;
}
/**
* Called when a block is broken
* @param event The event
*/
@EventHandler(priority = EventPriority.HIGH)
public void onSignBreak(BlockBreakEvent event) {
if(event.isCancelled()) {
return;
}
Block block = event.getBlock();
// Check if it is a sign
if(block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST) {
// Check if the rent sign is really the same as a saved rent
SignsFeature.RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if(regionSign == null) {
return;
}
// Remove the sign of the rental region if the player has permission
if(event.getPlayer().hasPermission("areashop.delsign")) {
regionSign.remove();
plugin.message(event.getPlayer(), "delsign-success", regionSign.getRegion());
} else { // Cancel the breaking of the sign
event.setCancelled(true);
plugin.message(event.getPlayer(), "delsign-noPermission", regionSign.getRegion());
}
}
}
/**
* Called when the physics of a block change
* @param event The event
*/
@EventHandler(priority = EventPriority.HIGHEST)
public void onIndirectSignBreak(BlockPhysicsEvent event){
Block block = event.getBlock();
if(event.isCancelled()) {
return;
}
if(block.getType() == Material.SIGN_POST || block.getType() == Material.WALL_SIGN){
Sign sign = (Sign)block.getState();
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
SignsFeature.RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if(regionSign != null) {
event.setCancelled(true); // Cancel the sign breaking, will create a floating sign but at least it is not disconnected/gone
}
}
}
}
}
@@ -1,357 +1,359 @@
package nl.evolutioncoding.areashop.listeners;
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
import com.sk89q.worldguard.protection.ApplicableRegionSet;
import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.managers.FileManager.AddResult;
import nl.evolutioncoding.areashop.regions.BuyRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion.RegionEvent;
import nl.evolutioncoding.areashop.regions.GeneralRegion.RegionType;
import nl.evolutioncoding.areashop.regions.RentRegion;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.material.Sign;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.List;
import java.util.Set;
/**
* Checks for placement of signs for this plugin
* @author NLThijs48
*/
public final class SignChangeListener implements Listener {
private AreaShop plugin;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public SignChangeListener(AreaShop plugin) {
this.plugin = plugin;
}
/**
* Called when a sign is changed
* @param event The event
*/
@EventHandler(priority = EventPriority.MONITOR)
public void onSignChange(SignChangeEvent event) {
if(event.isCancelled()) {
return;
}
Player player = event.getPlayer();
if(!plugin.isReady()) {
plugin.message(player, "general-notReady");
return;
}
// Check if the sign is meant for this plugin
if(event.getLine(0).contains(plugin.getConfig().getString("signTags.rent"))) {
if(!player.hasPermission("areashop.createrent") && !player.hasPermission("areashop.createrent.member") && !player.hasPermission("areashop.createrent.owner")) {
plugin.message(player, "setup-noPermissionRent");
return;
}
// Get the other lines
String secondLine = event.getLine(1);
String thirdLine = event.getLine(2);
String fourthLine = event.getLine(3);
// Get the regionManager for accessing regions
RegionManager regionManager = plugin.getWorldGuard().getRegionManager(event.getPlayer().getWorld());
// If the secondLine does not contain a name try to find the region by location
if(secondLine == null || secondLine.length() == 0) {
Set<ProtectedRegion> regions = plugin.getWorldGuardHandler().getApplicableRegionsSet(event.getBlock().getLocation());
if(regions != null) {
boolean first = true;
ProtectedRegion candidate = null;
for(ProtectedRegion pr : regions) {
if(first) {
candidate = pr;
first = false;
} else {
if(pr.getPriority() > candidate.getPriority()) {
candidate = pr;
} else if(pr.getParent() != null && pr.getParent().equals(candidate)) {
candidate = pr;
} else {
plugin.message(player, "setup-couldNotDetect", candidate.getId(), pr.getId());
return;
}
}
}
if(candidate != null) {
secondLine = candidate.getId();
}
}
}
boolean priceSet = fourthLine != null && fourthLine.length() != 0;
boolean durationSet = thirdLine != null && thirdLine.length() != 0;
// check if all the lines are correct
if(secondLine == null || secondLine.length() == 0) {
plugin.message(player, "setup-noRegion");
return;
}
ProtectedRegion region = regionManager.getRegion(secondLine);
if(region == null) {
plugin.message(player, "setup-wrongRegion");
return;
}
AddResult addResult = plugin.getFileManager().checkRegionAdd(player, regionManager.getRegion(secondLine), RegionType.RENT);
if(addResult == AddResult.BLACKLISTED) {
plugin.message(player, "setup-blacklisted", secondLine);
} else if(addResult == AddResult.ALREADYADDED) {
plugin.message(player, "setup-alreadyRentSign");
} else if(addResult == AddResult.NOPERMISSION) {
plugin.message(player, "setup-noPermission", secondLine);
} else if(thirdLine != null && thirdLine.length() != 0 && !Utils.checkTimeFormat(thirdLine)) {
plugin.message(player, "setup-wrongDuration");
} else {
double price = 0.0;
if(priceSet) {
// Check the fourth line
try {
price = Double.parseDouble(fourthLine);
} catch (NumberFormatException e) {
plugin.message(player, "setup-wrongPrice");
return;
}
}
// Add rent to the FileManager
final RentRegion rent = new RentRegion(plugin, secondLine, event.getPlayer().getWorld());
boolean isMember = plugin.getWorldGuardHandler().containsMember(rent.getRegion(), player.getUniqueId());
boolean isOwner = plugin.getWorldGuardHandler().containsOwner(rent.getRegion(), player.getUniqueId());
boolean landlord = (!player.hasPermission("areashop.createrent")
&& ((player.hasPermission("areashop.createrent.owner") && isOwner)
|| (player.hasPermission("areashop.createrent.member") && isMember)));
if(landlord) {
rent.setLandlord(player.getUniqueId(), player.getName());
}
if(priceSet) {
rent.setPrice(price);
}
if(durationSet) {
rent.setDuration(thirdLine);
}
Sign sign = (Sign)event.getBlock().getState().getData();
rent.addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), null);
// Run commands
rent.runEventCommands(RegionEvent.CREATED, true);
plugin.getFileManager().addRent(rent);
rent.handleSchematicEvent(RegionEvent.CREATED);
plugin.message(player, "setup-rentSuccess", rent.getName());
// Update the region after the event has written its lines
new BukkitRunnable() {
@Override
public void run() {
rent.update();
}
}.runTaskLater(plugin, 1);
// Run commands
rent.runEventCommands(RegionEvent.CREATED, false);
}
} else if (event.getLine(0).contains(plugin.getConfig().getString("signTags.buy"))) {
// Check for permission
if(!player.hasPermission("areashop.createbuy") && !player.hasPermission("areashop.createbuy.member") && !player.hasPermission("areashop.createbuy.owner")) {
plugin.message(player, "setup-noPermissionBuy");
return;
}
// Get the other lines
String secondLine = event.getLine(1);
String thirdLine = event.getLine(2);
// Get the regionManager for accessing regions
RegionManager regionManager = plugin.getWorldGuard().getRegionManager(event.getPlayer().getWorld());
if(regionManager == null) {
return;
}
// If the secondLine does not contain a name try to find the region by location
if(secondLine == null || secondLine.length() == 0) {
ApplicableRegionSet regions = regionManager.getApplicableRegions(event.getBlock().getLocation());
if(regions != null) {
boolean first = true;
ProtectedRegion candidate = null;
for(ProtectedRegion pr : regions) {
if(first) {
candidate = pr;
first = false;
} else {
if(pr.getPriority() > candidate.getPriority()) {
candidate = pr;
} else if(pr.getParent() != null && pr.getParent().equals(candidate)) {
candidate = pr;
} else if(pr.getPriority() == candidate.getPriority()) {
plugin.message(player, "setup-couldNotDetect", candidate.getId(), pr.getId());
return;
}
}
}
if(candidate != null) {
secondLine = candidate.getId();
}
}
}
boolean priceSet = thirdLine != null && thirdLine.length() != 0;
// Check if all the lines are correct
if(secondLine == null || secondLine.length() == 0) {
plugin.message(player, "setup-noRegion");
return;
}
ProtectedRegion region = regionManager.getRegion(secondLine);
if(region == null) {
plugin.message(player, "setup-wrongRegion");
return;
}
AddResult addResult = plugin.getFileManager().checkRegionAdd(player, region, RegionType.BUY);
if(addResult == AddResult.BLACKLISTED) {
plugin.message(player, "setup-blacklisted", secondLine);
} else if(addResult == AddResult.ALREADYADDED) {
plugin.message(player, "setup-alreadyRentSign");
} else if(addResult == AddResult.NOPERMISSION) {
plugin.message(player, "setup-noPermission", secondLine);
} else {
double price = 0.0;
if(priceSet) {
// Check the fourth line
try {
price = Double.parseDouble(thirdLine);
} catch (NumberFormatException e) {
plugin.message(player, "setup-wrongPrice");
return;
}
}
// Add buy to the FileManager
final BuyRegion buy = new BuyRegion(plugin, secondLine, event.getPlayer().getWorld());
boolean isMember = plugin.getWorldGuardHandler().containsMember(buy.getRegion(), player.getUniqueId());
boolean isOwner = plugin.getWorldGuardHandler().containsOwner(buy.getRegion(), player.getUniqueId());
boolean landlord = (!player.hasPermission("areashop.createbuy")
&& ((player.hasPermission("areashop.createbuy.owner") && isOwner)
|| (player.hasPermission("areashop.createbuy.member") && isMember)));
if(landlord) {
buy.setLandlord(player.getUniqueId(), player.getName());
}
if(priceSet) {
buy.setPrice(price);
}
Sign sign = (Sign)event.getBlock().getState().getData();
buy.addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), null);
// Run commands
buy.runEventCommands(RegionEvent.CREATED, true);
plugin.getFileManager().addBuy(buy);
buy.handleSchematicEvent(RegionEvent.CREATED);
plugin.message(player, "setup-buySuccess", region.getId());
// Update the region after the event has written its lines
new BukkitRunnable() {
@Override
public void run() {
buy.update();
}
}.runTaskLater(plugin, 1);
// Run commands
buy.runEventCommands(RegionEvent.CREATED, false);
}
} else if(event.getLine(0).contains(plugin.getConfig().getString("signTags.add"))) {
// Check for permission
if(!player.hasPermission("areashop.addsign")) {
plugin.message(player, "addsign-noPermission");
return;
}
// Get the other lines
String secondLine = event.getLine(1);
String thirdLine = event.getLine(2);
GeneralRegion region;
if(secondLine != null && secondLine.length() != 0) {
// Get region by secondLine of the sign
region = plugin.getFileManager().getRegion(secondLine);
if(region == null) {
plugin.message(player, "addsign-noRegion", secondLine);
return;
}
} else {
// Get region by sign position
List<GeneralRegion> regions = Utils.getASRegionsInSelection(new CuboidSelection(event.getBlock().getWorld(), event.getBlock().getLocation(), event.getBlock().getLocation()));
if(regions.isEmpty()) {
plugin.message(player, "addsign-noRegions");
return;
} else if(regions.size() > 1) {
plugin.message(player, "addsign-couldNotDetectSign", regions.get(0).getName(), regions.get(1).getName());
return;
}
region = regions.get(0);
}
Sign sign = (Sign)event.getBlock().getState().getData();
if(thirdLine == null || thirdLine.length() == 0) {
region.addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), null);
plugin.message(player, "addsign-success", region);
} else {
region.addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), thirdLine);
plugin.message(player, "addsign-successProfile", thirdLine, region);
}
// Update the region later because this event will do it first
final GeneralRegion regionUpdate = region;
new BukkitRunnable() {
@Override
public void run() {
regionUpdate.update();
}
}.runTaskLater(plugin, 1);
}
}
}
package me.wiefferink.areashop.listeners;
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.managers.FileManager;
import me.wiefferink.areashop.regions.BuyRegion;
import me.wiefferink.areashop.regions.GeneralRegion;
import me.wiefferink.areashop.regions.RentRegion;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.material.Sign;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.List;
import java.util.Set;
/**
* Checks for placement of signs for this plugin
* @author NLThijs48
*/
public final class SignChangeListener implements Listener {
private AreaShop plugin;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public SignChangeListener(AreaShop plugin) {
this.plugin = plugin;
}
/**
* Called when a sign is changed
* @param event The event
*/
@EventHandler(priority = EventPriority.MONITOR)
public void onSignChange(SignChangeEvent event) {
if(event.isCancelled()) {
return;
}
Player player = event.getPlayer();
if(!plugin.isReady()) {
plugin.message(player, "general-notReady");
return;
}
// Check if the sign is meant for this plugin
if(event.getLine(0).contains(plugin.getConfig().getString("signTags.rent"))) {
if(!player.hasPermission("areashop.createrent") && !player.hasPermission("areashop.createrent.member") && !player.hasPermission("areashop.createrent.owner")) {
plugin.message(player, "setup-noPermissionRent");
return;
}
// Get the other lines
String secondLine = event.getLine(1);
String thirdLine = event.getLine(2);
String fourthLine = event.getLine(3);
// Get the regionManager for accessing regions
RegionManager regionManager = plugin.getWorldGuard().getRegionManager(event.getPlayer().getWorld());
// If the secondLine does not contain a name try to find the region by location
if(secondLine == null || secondLine.length() == 0) {
Set<ProtectedRegion> regions = plugin.getWorldGuardHandler().getApplicableRegionsSet(event.getBlock().getLocation());
if(regions != null) {
boolean first = true;
ProtectedRegion candidate = null;
for(ProtectedRegion pr : regions) {
if(first) {
candidate = pr;
first = false;
} else {
if(pr.getPriority() > candidate.getPriority()) {
candidate = pr;
} else if(pr.getPriority() < candidate.getPriority()) {
// Already got the correct one
} else if(pr.getParent() != null && pr.getParent().equals(candidate)) {
candidate = pr;
} else if(candidate.getParent() != null && candidate.getParent().equals(pr)) {
// Already got the correct one
} else {
plugin.message(player, "setup-couldNotDetect", candidate.getId(), pr.getId());
return;
}
}
}
if(candidate != null) {
secondLine = candidate.getId();
}
}
}
boolean priceSet = fourthLine != null && fourthLine.length() != 0;
boolean durationSet = thirdLine != null && thirdLine.length() != 0;
// check if all the lines are correct
if(secondLine == null || secondLine.length() == 0) {
plugin.message(player, "setup-noRegion");
return;
}
ProtectedRegion region = regionManager.getRegion(secondLine);
if(region == null) {
plugin.message(player, "cmd-notRegistered", secondLine);
return;
}
FileManager.AddResult addResult = plugin.getFileManager().checkRegionAdd(player, regionManager.getRegion(secondLine), GeneralRegion.RegionType.RENT);
if(addResult == FileManager.AddResult.BLACKLISTED) {
plugin.message(player, "setup-blacklisted", secondLine);
} else if(addResult == FileManager.AddResult.ALREADYADDED) {
plugin.message(player, "setup-alreadyRentSign");
} else if(addResult == FileManager.AddResult.NOPERMISSION) {
plugin.message(player, "setup-noPermission", secondLine);
} else if(thirdLine != null && thirdLine.length() != 0 && !Utils.checkTimeFormat(thirdLine)) {
plugin.message(player, "setup-wrongDuration");
} else {
double price = 0.0;
if(priceSet) {
// Check the fourth line
try {
price = Double.parseDouble(fourthLine);
} catch (NumberFormatException e) {
plugin.message(player, "setup-wrongPrice");
return;
}
}
// Add rent to the FileManager
final RentRegion rent = new RentRegion(plugin, secondLine, event.getPlayer().getWorld());
boolean isMember = plugin.getWorldGuardHandler().containsMember(rent.getRegion(), player.getUniqueId());
boolean isOwner = plugin.getWorldGuardHandler().containsOwner(rent.getRegion(), player.getUniqueId());
boolean landlord = (!player.hasPermission("areashop.createrent")
&& ((player.hasPermission("areashop.createrent.owner") && isOwner)
|| (player.hasPermission("areashop.createrent.member") && isMember)));
if(landlord) {
rent.setLandlord(player.getUniqueId(), player.getName());
}
if(priceSet) {
rent.setPrice(price);
}
if(durationSet) {
rent.setDuration(thirdLine);
}
Sign sign = (Sign)event.getBlock().getState().getData();
rent.getSignsFeature().addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), null);
// Run commands
rent.runEventCommands(GeneralRegion.RegionEvent.CREATED, true);
plugin.getFileManager().addRent(rent);
rent.handleSchematicEvent(GeneralRegion.RegionEvent.CREATED);
plugin.message(player, "setup-rentSuccess", rent);
// Update the region after the event has written its lines
new BukkitRunnable() {
@Override
public void run() {
rent.update();
}
}.runTaskLater(plugin, 1);
// Run commands
rent.runEventCommands(GeneralRegion.RegionEvent.CREATED, false);
}
} else if (event.getLine(0).contains(plugin.getConfig().getString("signTags.buy"))) {
// Check for permission
if(!player.hasPermission("areashop.createbuy") && !player.hasPermission("areashop.createbuy.member") && !player.hasPermission("areashop.createbuy.owner")) {
plugin.message(player, "setup-noPermissionBuy");
return;
}
// Get the other lines
String secondLine = event.getLine(1);
String thirdLine = event.getLine(2);
// Get the regionManager for accessing regions
RegionManager regionManager = plugin.getWorldGuard().getRegionManager(event.getPlayer().getWorld());
// If the secondLine does not contain a name try to find the region by location
if(secondLine == null || secondLine.length() == 0) {
Set<ProtectedRegion> regions = plugin.getWorldGuardHandler().getApplicableRegionsSet(event.getBlock().getLocation());
if(regions != null) {
boolean first = true;
ProtectedRegion candidate = null;
for(ProtectedRegion pr : regions) {
if(first) {
candidate = pr;
first = false;
} else {
if(pr.getPriority() > candidate.getPriority()) {
candidate = pr;
} else if(pr.getPriority() < candidate.getPriority()) {
// Already got the correct one
} else if(pr.getParent() != null && pr.getParent().equals(candidate)) {
candidate = pr;
} else if(candidate.getParent() != null && candidate.getParent().equals(pr)) {
// Already got the correct one
} else {
plugin.message(player, "setup-couldNotDetect", candidate.getId(), pr.getId());
return;
}
}
}
if(candidate != null) {
secondLine = candidate.getId();
}
}
}
boolean priceSet = thirdLine != null && thirdLine.length() != 0;
// Check if all the lines are correct
if(secondLine == null || secondLine.length() == 0) {
plugin.message(player, "setup-noRegion");
return;
}
ProtectedRegion region = regionManager.getRegion(secondLine);
if(region == null) {
plugin.message(player, "add-noRegion", secondLine);
return;
}
FileManager.AddResult addResult = plugin.getFileManager().checkRegionAdd(player, region, GeneralRegion.RegionType.BUY);
if(addResult == FileManager.AddResult.BLACKLISTED) {
plugin.message(player, "setup-blacklisted", secondLine);
} else if(addResult == FileManager.AddResult.ALREADYADDED) {
plugin.message(player, "setup-alreadyRentSign");
} else if(addResult == FileManager.AddResult.NOPERMISSION) {
plugin.message(player, "setup-noPermission", secondLine);
} else {
double price = 0.0;
if(priceSet) {
// Check the fourth line
try {
price = Double.parseDouble(thirdLine);
} catch (NumberFormatException e) {
plugin.message(player, "setup-wrongPrice");
return;
}
}
// Add buy to the FileManager
final BuyRegion buy = new BuyRegion(plugin, secondLine, event.getPlayer().getWorld());
boolean isMember = plugin.getWorldGuardHandler().containsMember(buy.getRegion(), player.getUniqueId());
boolean isOwner = plugin.getWorldGuardHandler().containsOwner(buy.getRegion(), player.getUniqueId());
boolean landlord = (!player.hasPermission("areashop.createbuy")
&& ((player.hasPermission("areashop.createbuy.owner") && isOwner)
|| (player.hasPermission("areashop.createbuy.member") && isMember)));
if(landlord) {
buy.setLandlord(player.getUniqueId(), player.getName());
}
if(priceSet) {
buy.setPrice(price);
}
Sign sign = (Sign)event.getBlock().getState().getData();
buy.getSignsFeature().addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), null);
// Run commands
buy.runEventCommands(GeneralRegion.RegionEvent.CREATED, true);
plugin.getFileManager().addBuy(buy);
buy.handleSchematicEvent(GeneralRegion.RegionEvent.CREATED);
plugin.message(player, "setup-buySuccess", buy);
// Update the region after the event has written its lines
new BukkitRunnable() {
@Override
public void run() {
buy.update();
}
}.runTaskLater(plugin, 1);
// Run commands
buy.runEventCommands(GeneralRegion.RegionEvent.CREATED, false);
}
} else if(event.getLine(0).contains(plugin.getConfig().getString("signTags.add"))) {
// Check for permission
if(!player.hasPermission("areashop.addsign")) {
plugin.message(player, "addsign-noPermission");
return;
}
// Get the other lines
String secondLine = event.getLine(1);
String thirdLine = event.getLine(2);
GeneralRegion region;
if(secondLine != null && secondLine.length() != 0) {
// Get region by secondLine of the sign
region = plugin.getFileManager().getRegion(secondLine);
if(region == null) {
plugin.message(player, "add-noRegion", secondLine);
return;
}
} else {
// Get region by sign position
List<GeneralRegion> regions = Utils.getASRegionsInSelection(new CuboidSelection(event.getBlock().getWorld(), event.getBlock().getLocation(), event.getBlock().getLocation()));
if(regions.isEmpty()) {
plugin.message(player, "addsign-noRegions");
return;
} else if(regions.size() > 1) {
plugin.message(player, "addsign-couldNotDetectSign", regions.get(0).getName(), regions.get(1).getName());
return;
}
region = regions.get(0);
}
Sign sign = (Sign)event.getBlock().getState().getData();
if(thirdLine == null || thirdLine.length() == 0) {
region.getSignsFeature().addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), null);
plugin.message(player, "addsign-success", region);
} else {
region.getSignsFeature().addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), thirdLine);
plugin.message(player, "addsign-successProfile", thirdLine, region);
}
// Update the region later because this event will do it first
final GeneralRegion regionUpdate = region;
new BukkitRunnable() {
@Override
public void run() {
regionUpdate.update();
}
}.runTaskLater(plugin, 1);
}
}
}
@@ -1,95 +1,94 @@
package nl.evolutioncoding.areashop.listeners;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import nl.evolutioncoding.areashop.regions.GeneralRegion.ClickType;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
public class SignClickListener implements Listener {
private AreaShop plugin;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public SignClickListener(AreaShop plugin) {
this.plugin = plugin;
}
/**
* Called when a player interacts
* @param event The event
*/
@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)
&& (block.getType() == Material.SIGN_POST || block.getType() == Material.WALL_SIGN)) {
// Check if the rent sign is really the same as a saved rent
GeneralRegion result = plugin.getFileManager().getRegionBySignLocation(block.getLocation());
if(result == null) {
return;
}
String signName = result.getSignName(block.getLocation());
Player player = event.getPlayer();
if(plugin.getSignlinkerManager().isInSignLinkMode(player)) {
return;
}
// Get the clicktype
ClickType clickType = null;
if(player.isSneaking() && event.getAction() == Action.LEFT_CLICK_BLOCK) {
clickType = ClickType.SHIFTLEFTCLICK;
} else if(!player.isSneaking() && event.getAction() == Action.LEFT_CLICK_BLOCK) {
clickType = ClickType.LEFTCLICK;
} else if(player.isSneaking() && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
clickType = ClickType.SHIFTRIGHTCLICK;
} else if(!player.isSneaking() && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
clickType = ClickType.RIGHTCLICK;
}
// Run the commands
boolean runned = result.runSignCommands(signName, player, clickType);
// Only cancel event if at least one command has been executed
event.setCancelled(runned);
}
}
}
package me.wiefferink.areashop.listeners;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.features.SignsFeature;
import me.wiefferink.areashop.regions.GeneralRegion.ClickType;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
public class SignClickListener implements Listener {
private AreaShop plugin;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public SignClickListener(AreaShop plugin) {
this.plugin = plugin;
}
/**
* Called when a player interacts
* @param event The event
*/
@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)
&& (block.getType() == Material.SIGN_POST || block.getType() == Material.WALL_SIGN)) {
// Check if the rent sign is really the same as a saved rent
SignsFeature.RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if(regionSign == null) {
return;
}
Player player = event.getPlayer();
if(plugin.getSignlinkerManager().isInSignLinkMode(player)) {
return;
}
// Get the clicktype
ClickType clickType = null;
if(player.isSneaking() && event.getAction() == Action.LEFT_CLICK_BLOCK) {
clickType = ClickType.SHIFTLEFTCLICK;
} else if(!player.isSneaking() && event.getAction() == Action.LEFT_CLICK_BLOCK) {
clickType = ClickType.LEFTCLICK;
} else if(player.isSneaking() && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
clickType = ClickType.SHIFTRIGHTCLICK;
} else if(!player.isSneaking() && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
clickType = ClickType.RIGHTCLICK;
}
// Run the commands
boolean ran = regionSign.runSignCommands(player, clickType);
// Only cancel event if at least one command has been executed
event.setCancelled(ran);
}
}
}
@@ -1,183 +1,186 @@
package nl.evolutioncoding.areashop.managers;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.commands.*;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.SortedSet;
import java.util.TreeSet;
public class CommandManager implements CommandExecutor, TabCompleter {
private AreaShop plugin;
private ArrayList<CommandAreaShop> commands;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public CommandManager(AreaShop plugin) {
this.plugin = plugin;
commands = new ArrayList<>();
commands.add(new HelpCommand(plugin));
commands.add(new RentCommand(plugin));
commands.add(new UnrentCommand(plugin));
commands.add(new BuyCommand(plugin));
commands.add(new SellCommand(plugin));
commands.add(new MeCommand(plugin));
commands.add(new InfoCommand(plugin));
commands.add(new TeleportCommand(plugin));
commands.add(new SetteleportCommand(plugin));
commands.add(new AddfriendCommand(plugin));
commands.add(new DelfriendCommand(plugin));
commands.add(new FindCommand(plugin));
commands.add(new ResellCommand(plugin));
commands.add(new StopresellCommand(plugin));
commands.add(new SetrestoreCommand(plugin));
commands.add(new SetpriceCommand(plugin));
commands.add(new SetownerCommand(plugin));
commands.add(new SetdurationCommand(plugin));
commands.add(new ReloadCommand(plugin));
commands.add(new GroupaddCommand(plugin));
commands.add(new GroupdelCommand(plugin));
commands.add(new GrouplistCommand(plugin));
commands.add(new GroupinfoCommand(plugin));
commands.add(new SchematiceventCommand(plugin));
commands.add(new AddCommand(plugin));
commands.add(new DelCommand(plugin));
commands.add(new AddsignCommand(plugin));
commands.add(new DelsignCommand(plugin));
commands.add(new LinksignsCommand(plugin));
commands.add(new StackCommand(plugin));
commands.add(new SetlandlordCommand(plugin));
// Register commands in bukkit
plugin.getCommand("AreaShop").setExecutor(this);
plugin.getCommand("AreaShop").setTabCompleter(this);
}
/**
* Get the list with AreaShop commands
* @return The list with AreaShop commands
*/
public ArrayList<CommandAreaShop> getCommands() {
return commands;
}
/**
* Shows the help page for the CommandSender
* @param target The CommandSender to show the help to
*/
public void showHelp(CommandSender target) {
// Add all messages to a list
ArrayList<String> messages = new ArrayList<>();
messages.add(plugin.getConfig().getString("chatPrefix") + plugin.getLanguageManager().getLang("help-header"));
messages.add(plugin.getConfig().getString("chatPrefix") + plugin.getLanguageManager().getLang("help-alias"));
for(CommandAreaShop command : commands) {
String help = command.getHelp(target);
if(help != null && help.length() != 0) {
messages.add(help);
}
}
// Send the messages to the target
for(String message : messages) {
if(!plugin.getConfig().getBoolean("useColorsInConsole") && !(target instanceof Player)) {
target.sendMessage(ChatColor.stripColor(Utils.applyColors(message)));
} else {
target.sendMessage(Utils.applyColors(message));
}
}
}
@Override
public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) {
if(!plugin.isReady()) {
plugin.message(sender, "general-notReady");
return true;
}
boolean executed = false;
for(int i=0; i<commands.size() && !executed; i++) {
if(commands.get(i).canExecute(command, args)) {
commands.get(i).execute(sender, args);
executed = true;
}
}
if(!executed && args.length == 0) {
this.showHelp(sender);
} else if(!executed && args.length > 0) {
// Indicate that the '/as updaterents' and '/as updatebuys' commands are removed
if("updaterents".equalsIgnoreCase(args[0]) || "updatebuys".equalsIgnoreCase(args[0])) {
plugin.message(sender, "reload-updateCommandChanged");
} else {
plugin.message(sender, "cmd-notValid");
}
}
return true;
}
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
List<String> result = new ArrayList<>();
if(!sender.hasPermission("areashop.tabcomplete")) {
return result;
}
int toCompleteNumber = args.length;
String toCompletePrefix = args[args.length-1].toLowerCase();
AreaShop.debug("toCompleteNumber=" + toCompleteNumber + ", toCompletePrefix=" + toCompletePrefix + ", length=" + toCompletePrefix.length());
if(toCompleteNumber == 1) {
for(CommandAreaShop c : commands) {
String begin = c.getCommandStart();
result.add(begin.substring(begin.indexOf(' ') +1));
}
} else {
String[] start = new String[args.length];
start[0] = command.getName();
for(int i=1; i<args.length; i++) {
start[i] = args[i-1];
}
for(CommandAreaShop c : commands) {
if(c.canExecute(command, args)) {
result = c.getTabCompleteList(toCompleteNumber, start, sender);
}
}
}
// Filter and sort the results
if(result.size() > 0) {
SortedSet<String> set = new TreeSet<>();
for(String suggestion : result) {
if(suggestion.toLowerCase().startsWith(toCompletePrefix)) {
set.add(suggestion);
}
}
result.clear();
result.addAll(set);
}
AreaShop.debug("Tabcomplete #" + toCompleteNumber + ", prefix="+ toCompletePrefix + ", result=" + result.toString());
return result;
}
}
package me.wiefferink.areashop.managers;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.commands.*;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import java.util.ArrayList;
import java.util.List;
import java.util.SortedSet;
import java.util.TreeSet;
public class CommandManager implements CommandExecutor, TabCompleter {
private AreaShop plugin;
private ArrayList<CommandAreaShop> commands;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public CommandManager(AreaShop plugin) {
this.plugin = plugin;
commands = new ArrayList<>();
commands.add(new HelpCommand(plugin));
commands.add(new RentCommand(plugin));
commands.add(new UnrentCommand(plugin));
commands.add(new BuyCommand(plugin));
commands.add(new SellCommand(plugin));
commands.add(new MeCommand(plugin));
commands.add(new InfoCommand(plugin));
commands.add(new TeleportCommand(plugin));
commands.add(new SetteleportCommand(plugin));
commands.add(new AddfriendCommand(plugin));
commands.add(new DelfriendCommand(plugin));
commands.add(new FindCommand(plugin));
commands.add(new ResellCommand(plugin));
commands.add(new StopresellCommand(plugin));
commands.add(new SetrestoreCommand(plugin));
commands.add(new SetpriceCommand(plugin));
commands.add(new SetownerCommand(plugin));
commands.add(new SetdurationCommand(plugin));
commands.add(new ReloadCommand(plugin));
commands.add(new GroupaddCommand(plugin));
commands.add(new GroupdelCommand(plugin));
commands.add(new GrouplistCommand(plugin));
commands.add(new GroupinfoCommand(plugin));
commands.add(new SchematiceventCommand(plugin));
commands.add(new AddCommand(plugin));
commands.add(new DelCommand(plugin));
commands.add(new AddsignCommand(plugin));
commands.add(new DelsignCommand(plugin));
commands.add(new LinksignsCommand(plugin));
commands.add(new StackCommand(plugin));
commands.add(new SetlandlordCommand(plugin));
commands.add(new MessageCommand(plugin));
// Register commands in bukkit
plugin.getCommand("AreaShop").setExecutor(this);
plugin.getCommand("AreaShop").setTabCompleter(this);
}
/**
* Get the list with AreaShop commands
* @return The list with AreaShop commands
*/
public ArrayList<CommandAreaShop> getCommands() {
return commands;
}
/**
* Shows the help page for the CommandSender
* @param target The CommandSender to show the help to
*/
public void showHelp(CommandSender target) {
if(!target.hasPermission("areashop.help")) {
plugin.message(target, "help-noPermission");
return;
}
// Add all messages to a list
ArrayList<String> messages = new ArrayList<>();
plugin.message(target, "help-header");
plugin.message(target, "help-alias");
for(CommandAreaShop command : commands) {
String help = command.getHelp(target);
if(help != null && help.length() != 0) {
messages.add(help);
}
}
// Send the messages to the target
for(String message : messages) {
plugin.messageNoPrefix(target, message);
}
}
@Override
public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) {
if(!plugin.isReady()) {
plugin.message(sender, "general-notReady");
return true;
}
// Redirect `/as info player <player>` to `/as me <player>`
if(args.length == 3 && "info".equals(args[0]) && "player".equals(args[1])) {
args[0] = "me";
args[1] = args[2];
}
// Execute command
boolean executed = false;
for(int i=0; i<commands.size() && !executed; i++) {
if(commands.get(i).canExecute(command, args)) {
commands.get(i).execute(sender, args);
executed = true;
}
}
if(!executed && args.length == 0) {
this.showHelp(sender);
} else if(!executed && args.length > 0) {
// Indicate that the '/as updaterents' and '/as updatebuys' commands are removed
if("updaterents".equalsIgnoreCase(args[0]) || "updatebuys".equalsIgnoreCase(args[0])) {
plugin.message(sender, "reload-updateCommandChanged");
} else {
plugin.message(sender, "cmd-notValid");
}
}
return true;
}
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
List<String> result = new ArrayList<>();
if(!sender.hasPermission("areashop.tabcomplete")) {
return result;
}
int toCompleteNumber = args.length;
String toCompletePrefix = args[args.length-1].toLowerCase();
//AreaShop.debug("toCompleteNumber=" + toCompleteNumber + ", toCompletePrefix=" + toCompletePrefix + ", length=" + toCompletePrefix.length());
if(toCompleteNumber == 1) {
for(CommandAreaShop c : commands) {
String begin = c.getCommandStart();
result.add(begin.substring(begin.indexOf(' ') +1));
}
} else {
String[] start = new String[args.length];
start[0] = command.getName();
for(int i=1; i<args.length; i++) {
start[i] = args[i-1];
}
for(CommandAreaShop c : commands) {
if(c.canExecute(command, args)) {
result = c.getTabCompleteList(toCompleteNumber, start, sender);
}
}
}
// Filter and sort the results
if(result.size() > 0) {
SortedSet<String> set = new TreeSet<>();
for(String suggestion : result) {
if(suggestion.toLowerCase().startsWith(toCompletePrefix)) {
set.add(suggestion);
}
}
result.clear();
result.addAll(set);
}
//AreaShop.debug("Tabcomplete #" + toCompleteNumber + ", prefix="+ toCompletePrefix + ", result=" + result.toString());
return result;
}
}
@@ -1,216 +1,220 @@
package nl.evolutioncoding.areashop.managers;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.material.Sign;
import org.bukkit.util.BlockIterator;
import java.util.*;
public class SignLinkerManager implements Listener {
private AreaShop plugin = null;
private Map<UUID, SignLinker> signLinkers;
private boolean eventsRegistered;
public SignLinkerManager(AreaShop plugin) {
this.plugin = plugin;
signLinkers = new HashMap<>();
eventsRegistered = false;
}
/**
* Let a player enter sign linking mode
* @param player The player that has to enter sign linking mode
* @param profile The profile to use for the signs (null for default)
*/
public void enterSignLinkMode(Player player, String profile) {
signLinkers.put(player.getUniqueId(), new SignLinker(player, profile));
plugin.message(player, "linksigns-first");
plugin.message(player, "linksigns-next");
if(!eventsRegistered) {
eventsRegistered = true;
plugin.getServer().getPluginManager().registerEvents(this, plugin);
}
}
/**
* Let a player exit sign linking mode
* @param player The player that has to exit sign linking mode
*/
public void exitSignLinkMode(Player player) {
signLinkers.remove(player.getUniqueId());
if(eventsRegistered && signLinkers.isEmpty()) {
eventsRegistered = false;
HandlerList.unregisterAll(this);
}
plugin.message(player, "linksigns-stopped");
}
/**
* Check if the player is in sign linking mode
* @param player The player to check
* @return true if the player is in sign linking mode, otherwise false
*/
public boolean isInSignLinkMode(Player player) {
return signLinkers.containsKey(player.getUniqueId());
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerInteract(PlayerInteractEvent event) {
AreaShop.debug("PlayerInteractEvent of " + event.getPlayer().getName() + ", " + signLinkers.size() + " signlinkers");
if(isInSignLinkMode(event.getPlayer())) {
event.setCancelled(true);
Player player = event.getPlayer();
SignLinker linker = signLinkers.get(event.getPlayer().getUniqueId());
if(event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
// Get the region
BlockIterator blockIterator = new BlockIterator(player, 100);
while(blockIterator.hasNext()) {
Block next = blockIterator.next();
List<GeneralRegion> regions = Utils.getASRegionsByLocation(next.getLocation());
if(regions.size() == 1) {
linker.setRegion(regions.get(0));
return;
} else if(regions.size() > 1) {
Set<String> names = new HashSet<>();
for(GeneralRegion region : regions) {
names.add(region.getName());
}
plugin.message(player, "linksigns-multipleRegions", Utils.createCommaSeparatedList(names));
plugin.message(player, "linksigns-multipleRegionsAdvice");
return;
}
}
// No regions found within the maximum range
plugin.message(player, "linksigns-noRegions");
} else if(event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK) {
Block block = null;
BlockIterator blockIterator = new BlockIterator(player, 100);
while(blockIterator.hasNext() && block == null) {
Block next = blockIterator.next();
if(next.getType() != Material.AIR) {
block = next;
}
}
if(block == null || !(block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)) {
plugin.message(player, "linksigns-noSign");
return;
}
GeneralRegion signRegion = plugin.getFileManager().getRegionBySignLocation(block.getLocation());
if(signRegion != null) {
plugin.message(player, "linksigns-alreadyRegistered", signRegion);
return;
}
Sign sign = (Sign)block.getState().getData();
linker.setSign(block.getLocation(), block.getType(), sign.getFacing());
}
}
}
/**
* Handle disconnection players
*/
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerLeave(PlayerQuitEvent event) {
AreaShop.debug("PlayerQuitEvent of " + event.getPlayer().getName() + ", " + signLinkers.size() + " signlinkers");
signLinkers.remove(event.getPlayer().getUniqueId());
}
/**
* Class to keep track of the signlinking data
*/
private class SignLinker {
private boolean hasSign = false;
private boolean hasRegion = false;
public Player linker = null;
public String profile = null;
public GeneralRegion region = null;
public Location location = null;
public Material type = null;
public BlockFace facing = null;
public SignLinker(Player linker, String profile) {
this.linker = linker;
this.profile = profile;
}
public void setRegion(GeneralRegion region) {
this.region = region;
hasRegion = true;
if(!isComplete()) {
plugin.message(linker, "linksigns-regionFound", region);
}
finish();
}
public void setSign(Location location, Material type, BlockFace facing) {
this.location = location;
this.type = type;
this.facing = facing;
hasSign = true;
if(!isComplete()) {
plugin.message(linker, "linksigns-signFound", location.getBlockX(), location.getBlockY(), location.getBlockZ());
}
finish();
}
public void finish() {
if(isComplete()) {
region.addSign(location, type, facing, profile);
if(profile == null) {
plugin.message(linker, "addsign-success", region);
} else {
plugin.message(linker, "addsign-successProfile", region, profile);
}
region.update();
reset();
plugin.message(linker, "linksigns-next");
}
}
public void reset() {
hasSign = false;
hasRegion = false;
}
public boolean isComplete() {
return hasSign && hasRegion;
}
}
}
package me.wiefferink.areashop.managers;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.features.SignsFeature;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.material.Sign;
import org.bukkit.util.BlockIterator;
import java.util.*;
public class SignLinkerManager implements Listener {
private AreaShop plugin = null;
private Map<UUID, SignLinker> signLinkers;
private boolean eventsRegistered;
public SignLinkerManager(AreaShop plugin) {
this.plugin = plugin;
signLinkers = new HashMap<>();
eventsRegistered = false;
}
/**
* Let a player enter sign linking mode
* @param player The player that has to enter sign linking mode
* @param profile The profile to use for the signs (null for default)
*/
public void enterSignLinkMode(Player player, String profile) {
signLinkers.put(player.getUniqueId(), new SignLinker(player, profile));
plugin.message(player, "linksigns-first");
plugin.message(player, "linksigns-next");
if(!eventsRegistered) {
eventsRegistered = true;
plugin.getServer().getPluginManager().registerEvents(this, plugin);
}
}
/**
* Let a player exit sign linking mode
* @param player The player that has to exit sign linking mode
*/
public void exitSignLinkMode(Player player) {
signLinkers.remove(player.getUniqueId());
if(eventsRegistered && signLinkers.isEmpty()) {
eventsRegistered = false;
HandlerList.unregisterAll(this);
}
plugin.message(player, "linksigns-stopped");
}
/**
* Check if the player is in sign linking mode
* @param player The player to check
* @return true if the player is in sign linking mode, otherwise false
*/
public boolean isInSignLinkMode(Player player) {
return signLinkers.containsKey(player.getUniqueId());
}
/**
* On player interactions
* @param event The PlayerInteractEvent
*/
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerInteract(PlayerInteractEvent event) {
if(isInSignLinkMode(event.getPlayer())) {
event.setCancelled(true);
Player player = event.getPlayer();
SignLinker linker = signLinkers.get(event.getPlayer().getUniqueId());
if(event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
// Get the region
BlockIterator blockIterator = new BlockIterator(player, 100);
while(blockIterator.hasNext()) {
Block next = blockIterator.next();
List<GeneralRegion> regions = Utils.getASRegionsByLocation(next.getLocation());
if(regions.size() == 1) {
linker.setRegion(regions.get(0));
return;
} else if(regions.size() > 1) {
Set<String> names = new HashSet<>();
for(GeneralRegion region : regions) {
names.add(region.getName());
}
plugin.message(player, "linksigns-multipleRegions", Utils.createCommaSeparatedList(names));
plugin.message(player, "linksigns-multipleRegionsAdvice");
return;
}
}
// No regions found within the maximum range
plugin.message(player, "linksigns-noRegions");
} else if(event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK) {
Block block = null;
BlockIterator blockIterator = new BlockIterator(player, 100);
while(blockIterator.hasNext() && block == null) {
Block next = blockIterator.next();
if(next.getType() != Material.AIR) {
block = next;
}
}
if(block == null || !(block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)) {
plugin.message(player, "linksigns-noSign");
return;
}
SignsFeature.RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if(regionSign != null) {
plugin.message(player, "linksigns-alreadyRegistered", regionSign.getRegion());
return;
}
Sign sign = (Sign)block.getState().getData();
linker.setSign(block.getLocation(), block.getType(), sign.getFacing());
}
}
}
/**
* Handle disconnection players
* @param event The PlayerQuitEvent
*/
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerLeave(PlayerQuitEvent event) {
signLinkers.remove(event.getPlayer().getUniqueId());
}
/**
* Class to keep track of the signlinking data
*/
private class SignLinker {
private boolean hasSign = false;
private boolean hasRegion = false;
public Player linker = null;
public String profile = null;
public GeneralRegion region = null;
public Location location = null;
public Material type = null;
public BlockFace facing = null;
public SignLinker(Player linker, String profile) {
this.linker = linker;
this.profile = profile;
}
public void setRegion(GeneralRegion region) {
this.region = region;
hasRegion = true;
if(!isComplete()) {
plugin.message(linker, "linksigns-regionFound", region);
}
finish();
}
public void setSign(Location location, Material type, BlockFace facing) {
this.location = location;
this.type = type;
this.facing = facing;
hasSign = true;
if(!isComplete()) {
plugin.message(linker, "linksigns-signFound", location.getBlockX(), location.getBlockY(), location.getBlockZ());
}
finish();
}
public void finish() {
if(isComplete()) {
region.getSignsFeature().addSign(location, type, facing, profile);
if(profile == null) {
plugin.message(linker, "addsign-success", region);
} else {
plugin.message(linker, "addsign-successProfile", region, profile);
}
region.update();
reset();
plugin.message(linker, "linksigns-next");
}
}
public void reset() {
hasSign = false;
hasRegion = false;
}
public boolean isComplete() {
return hasSign && hasRegion;
}
}
}
@@ -0,0 +1,108 @@
package me.wiefferink.areashop.messages;
import org.apache.commons.lang.Validate;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collection;
/**
* Class made by glan3b (Github: https://github.com/glen3b) for the Fanciful project (Github: https://github.com/mkremins/fanciful)
*/
/**
* Represents a wrapper around an array class of an arbitrary reference type,
* which properly implements "value" hash code and equality functions.
* <p>
* This class is intended for use as a key to a map.
* </p>
* @param <E> The type of elements in the array.
* @author Glen Husman
* @see Arrays
*/
public final class ArrayWrapper<E> {
/**
* Creates an array wrapper with some elements.
* @param elements The elements of the array.
*/
public ArrayWrapper(E... elements) {
setArray(elements);
}
private E[] _array;
/**
* Retrieves a reference to the wrapped array instance.
* @return The array wrapped by this instance.
*/
public E[] getArray() {
return _array;
}
/**
* Set this wrapper to wrap a new array instance.
* @param array The new wrapped array.
*/
public void setArray(E[] array) {
Validate.notNull(array, "The array must not be null.");
_array = array;
}
/**
* Determines if this object has a value equivalent to another object.
* @see Arrays#equals(Object[], Object[])
*/
@SuppressWarnings("rawtypes")
@Override
public boolean equals(Object other) {
if(!(other instanceof ArrayWrapper)) {
return false;
}
return Arrays.equals(_array, ((ArrayWrapper)other)._array);
}
/**
* Gets the hash code represented by this objects value.
* @return This object's hash code.
* @see Arrays#hashCode(Object[])
*/
@Override
public int hashCode() {
return Arrays.hashCode(_array);
}
/**
* Converts an iterable element collection to an array of elements.
* The iteration order of the specified object will be used as the array element order.
* @param list The iterable of objects which will be converted to an array.
* @param c The type of the elements of the array.
* @param <T> The type
* @return An array of elements in the specified iterable.
*/
@SuppressWarnings("unchecked")
public static <T> T[] toArray(Iterable<? extends T> list, Class<T> c) {
int size = -1;
if(list instanceof Collection<?>) {
@SuppressWarnings("rawtypes")
Collection coll = (Collection)list;
size = coll.size();
}
if(size < 0) {
size = 0;
// Ugly hack: Count it ourselves
for(@SuppressWarnings("unused") T element : list) {
size++;
}
}
T[] result = (T[])Array.newInstance(c, size);
int i = 0;
for(T element : list) { // Assumes iteration order is consistent
result[i++] = element; // Assign array element at index THEN increment counter
}
return result;
}
}
@@ -0,0 +1,867 @@
package me.wiefferink.areashop.messages;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* FancyMessageFormat converter, a library that enables to convert
* messages in the FancyMessageFormat to Minecraft's bulky tellraw
* format.
* @author NLThijs48 | http://wiefferink.me
* @author Tobias aka Phoenix | http://www.phoenix-iv.de
*/
public class FancyMessageFormat {
private static final char TAG_BEFORE = '[';
private static final char TAG_AFTER = ']';
private static final char END_TAG_INDICATOR = '/';
/**
* The special character that prefixes all basic chat formatting codes.
*/
private static final char SIMPLE_FORMAT_PREFIX_CHAR = '\u00A7';
/**
* Resets all previous chat colors or formats.
*/
private static final char SIMPLE_FORMAT_RESET_CHAR = 'r';
/**
* Lookup table for all continuous tags (marked by [])
*/
private static final HashMap<String, Tag> BRACKET_TAG_LIST = new HashMap<>();
/**
* Lookup table for all interactive tags
*/
private static final HashMap<String, Tag> INTERACTIVE_TAG_LIST = new HashMap<>();
static {
// Enlist all possible tags
// (They go into a HashMap for lookup purposes)
cacheTags(BRACKET_TAG_LIST, Color.class);
cacheTags(BRACKET_TAG_LIST, FormatType.class);
cacheTags(BRACKET_TAG_LIST, FormatCloseTag.class);
cacheTags(BRACKET_TAG_LIST, ControlTag.class);
// Interactive tags
cacheTags(INTERACTIVE_TAG_LIST, ClickType.class);
cacheTags(INTERACTIVE_TAG_LIST, HoverType.class);
}
/**
* Puts all constants in the given Tag class into the given lookup table.
*/
private static <T extends Tag> void cacheTags(HashMap<String, Tag> tagList, Class<T> tags) {
for(Tag tag : tags.getEnumConstants()) {
for(String key : tag.getTags()) {
tagList.put(key, tag);
}
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------- Public / Interface -------------------------------
// ------------------------------------------------------------------------------------------
/**
* Parses the given FancyMessageFormat message to a JSON array that can be
* used with the tellraw command and the like.
* @param message The mesage to convert to JSON
* @return JSON string that can be send to a player
*/
public static String convertToJSON(final String message) {
return convertToJSON(Collections.singleton(message));
}
/**
* Parses the given FancyMessageFormat message to a JSON array that can be
* used with the tellraw command and the like.
* @param inputLines Input message split at line breaks.
* @return JSON string that can be send to a player
*/
public static String convertToJSON(final Iterable<String> inputLines) {
ArrayList<String> lines = cleanInputString(inputLines);
LinkedList<InteractiveMessagePart> message = parse(lines);
StringBuilder sb = new StringBuilder();
if(message.size() == 1) {
sb.append(message.getFirst().toJSON());
} else if(message.size() > 0) {
sb.append("{text=\"\",extra:[");
for(InteractiveMessagePart messagePart : message) {
sb.append(messagePart.toJSON());
sb.append(',');
}
sb.deleteCharAt(sb.length()-1);
sb.append("]}");
}
return sb.toString();
}
/**
* Parses the given FancyMessageFormat message to a String containing control characters
* for formatting that can be used for console outputs, but also for normal player
* messages.
* <p>
* The returned message will only contain colors, bold, italic, underlining and 'magic'
* characters. Hovers and other advanced tellraw tags will be skipped.
* @param message Input message split at line breaks.
* @return Plain message that can be send
*/
public static String convertToConsole(final String message) {
return convertToConsole(Collections.singleton(message));
}
/**
* Parses the given FancyMessageFormat message to a String containing control characters
* for formatting that can be used for console outputs, but also for normal player
* messages.
* <p>
* The returned message will only contain colors, bold, italic, underlining and 'magic'
* characters. Hovers and other advanced tellraw tags will be skipped.
* @param inputLines The raw message lines to process
* @return Plain message that can be send
*/
public static String convertToConsole(final Iterable<String> inputLines) {
if(inputLines == null) {
return null;
}
LinkedList<InteractiveMessagePart> parts = parse(inputLines, false);
StringBuilder result = new StringBuilder();
for(InteractiveMessagePart part : parts) {
result.append(part.toSimpleString());
}
return result.toString();
}
/**
* Insert a message at the specified position
* @param message The current message
* @param insert The message to insert
* @param line The line number to insert at
* @param start The start of the variable to replace
* @param end The end of the variable to replace
*/
public static void insertMessage(List<String> message, List<String> insert, int line, int start, int end) {
String lineContent = message.remove(line);
if(isTaggedInteractive(lineContent)) {
lineContent = lineContent.replace("", "");
message.add(line, lineContent.substring(0, start)+convertToConsole(insert)+lineContent.substring(end));
return;
}
// Find interactive lines meant for this message
List<String> interactives = new ArrayList<>();
while(line < message.size() && isTaggedInteractive(message.get(line))) {
interactives.add(message.remove(line));
}
// Split the line and add the parts
int at = line;
if(start > 0) {
message.add(line, lineContent.substring(0, start));
at++;
message.addAll(at, interactives);
at += interactives.size();
}
message.addAll(at, insert);
at += insert.size();
message.addAll(at, interactives);
at += interactives.size();
if(end < lineContent.length()) {
message.add(at, lineContent.substring(end));
at++;
message.addAll(at, interactives);
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------- Private functions -------------------------------
// ------------------------------------------------------------------------------------------
/**
* <ul>
* <li>Splits lines at line breaks (creating a new line in the Array).
* <li>Removes empty lines at the beginning.
* <li>Removes lines with properties in front of the first text-line.
* </ul>
*/
private static ArrayList<String> cleanInputString(Iterable<String> inputLines) {
// Split lines at line breaks
// In the end we will have a list with one line per element
ArrayList<String> lines = new ArrayList<>();
for(String line : inputLines) {
lines.addAll(Arrays.asList(line.split("\\r?\\n")));
}
// Remove any special lines at the start (a real text line should be first)
while(!lines.isEmpty() && isTaggedInteractive(lines.get(0))) {
lines.remove(0);
}
return lines;
}
private static LinkedList<InteractiveMessagePart> parse(Iterable<String> inputLines) {
return parse(inputLines, true);
}
private static LinkedList<InteractiveMessagePart> parse(final Iterable<String> inputLines, boolean doInteractives) {
LinkedList<InteractiveMessagePart> message = new LinkedList<>();
Color currentColor = null;
Set<FormatType> currentFormatting = new HashSet<>();
lineLoop:
for(String line : inputLines) {
InteractiveMessagePart messagePart;
TaggedContent interactiveTag = getInteractiveTag(line);
boolean isTextLine = interactiveTag == null;
if(!doInteractives && !isTextLine) {
continue;
}
boolean isHoverLine = false;
if(isTextLine) {
messagePart = new InteractiveMessagePart();
message.add(messagePart);
} else /* if Interactive formatting */ {
if(message.isEmpty()) {
continue;
}
messagePart = message.getLast();
Tag tag = interactiveTag.tag;
if(tag instanceof ClickType) {
messagePart.clickType = (ClickType)interactiveTag.tag;
messagePart.clickContent = interactiveTag.subsequentContent;
} else if(tag instanceof HoverType) {
line = interactiveTag.subsequentContent;
isHoverLine = true;
if(messagePart.hoverType != tag) {
// Hover type changed
messagePart.hoverContent = new LinkedList<>();
messagePart.hoverType = (HoverType)tag;
}
// Add hover content below
}
}
if(isTextLine || isHoverLine) {
// Parse inline tags
Color currentLineColor = currentColor;
Set<FormatType> currentLineFormatting = currentFormatting;
LinkedList<TextMessagePart> targetList = messagePart.content;
boolean parseBreak = true;
if(isHoverLine) {
// Reset - use own
currentLineColor = null;
currentLineFormatting = new HashSet<>();
targetList = messagePart.hoverContent;
parseBreak = false;
// Add line break after previous hover line
if(!targetList.isEmpty()) {
targetList.getLast().text += '\n';
}
}
// Split into pieces at places where formatting changes
while(!line.isEmpty()) {
String textToAdd;
TaggedContent nextTag = getNextTag(line, parseBreak);
boolean tagged = nextTag != null;
if(!tagged) {
textToAdd = line;
line = "";
} else {
textToAdd = nextTag.precedingContent;
line = nextTag.subsequentContent;
}
// Add a text part with the correct formatting
if((tagged && nextTag.tag == ControlTag.BREAK) || !textToAdd.isEmpty()) {
TextMessagePart part = new TextMessagePart();
part.text = textToAdd;
part.formatTypes = new HashSet<>(currentLineFormatting);
part.color = currentLineColor;
targetList.add(part);
}
// Handle the change in formatting if a Tag has been detected (this needs to be after creating the InteractiveMessagePart)
if(tagged) {
// Handle the formatting tag
Tag tag = nextTag.tag;
if(tag instanceof Color) {
currentLineColor = (Color)tag;
} else if(tag instanceof FormatType) {
currentLineFormatting.add((FormatType)tag);
} else if(tag instanceof FormatCloseTag) {
currentLineFormatting.remove(((FormatCloseTag)tag).closes);
} else if(tag == ControlTag.BREAK) {
if(!targetList.isEmpty()) {
targetList.getLast().text += '\n';
}
continue lineLoop;
} else if(tag == ControlTag.RESET) {
currentLineFormatting.clear();
currentLineColor = Color.WHITE;
}
}
}
if(!isHoverLine) {
// Adapt global attributes
currentColor = currentLineColor;
if(messagePart.content.size() == 0) { // Prevent interactive parts without content
message.removeLast();
}
}
}
}
return message;
}
/**
* Searches and returns the first continuous tag found in the given String.
* @return The tag (plus its preceding and subsequent content) if found.
* Null if nothing is found.
*/
private static TaggedContent getNextTag(String line, boolean parseBreak) {
Pattern pattern = Pattern.compile("\\[[/a-zA-Z1-9]+\\]|&[1-9abcdeflonskr]");
Matcher matcher = pattern.matcher(line);
// TODO Fix for escape things, and something with parseBreak?
while(matcher.find()) {
Tag tag = null;
if(matcher.group().startsWith("&")) {
for(Color color : Color.class.getEnumConstants()) {
if(color.getNativeFormattingCode() == matcher.group().charAt(1)) {
tag = color;
}
}
for(FormatType format : FormatType.class.getEnumConstants()) {
if(format.getNativeFormattingCode() == matcher.group().charAt(1)) {
tag = format;
}
}
if(matcher.group().charAt(1) == SIMPLE_FORMAT_RESET_CHAR) {
tag = ControlTag.RESET;
}
} else {
tag = BRACKET_TAG_LIST.get(matcher.group().substring(1, matcher.group().length()-1).toLowerCase());
}
// Continue search if we found something like [abc] that is not a tag
if(tag != null) {
return new TaggedContent(line.substring(0, matcher.start()), tag, line.substring(matcher.end()));
}
}
return null;
/*
for(int startIndex = 0; startIndex < line.length(); startIndex++) {
int start = line.indexOf(TAG_BEFORE, startIndex);
if(start != -1) {
int end = line.indexOf(TAG_AFTER, start);
if(end != -1) {
String inBetween = line.substring(start+1, end).toLowerCase();
if(BRACKET_TAG_LIST.containsKey(inBetween)) {
Tag tag = BRACKET_TAG_LIST.get(inBetween);
if(tag == ControlTag.ESCAPE) {
// Ignore next char
line = line.substring(0, start)+line.substring(end+1);
startIndex = start;
} else if(!parseBreak && tag == ControlTag.ESCAPE) {
// Ignore break
startIndex = end+1;
} else {
String previousContent = line.substring(0, start);
String subsequentContent = line.substring(end+1);
return new TaggedContent(previousContent, tag, subsequentContent);
}
} else {
startIndex = start;
}
} else {
return null;
}
} else {
return null;
}
}
return null;
*/
}
/**
* If the given line defines an interactive property (e.g. "hover: myText")
* the tag / property will be returned. Otherwise null is returned.
*/
private static TaggedContent getInteractiveTag(String line) {
for(int index = 0; index < line.length(); index++) {
char c = line.charAt(index);
if(c == ' ' || c == '\t') {
// Ignore (Skip spacing)
} else {
int end = line.indexOf(": ", index);
if(end != -1) {
String inBetween = line.substring(index, end).toLowerCase();
if(INTERACTIVE_TAG_LIST.containsKey(inBetween)) {
Tag tag = INTERACTIVE_TAG_LIST.get(inBetween);
String subsequentContent = line.substring(end+2);
return new TaggedContent(null, tag, subsequentContent);
}
}
return null;
}
}
return null;
}
/**
* Check if a line is an advanced declaration like hover or command
* @param line The line to check
* @return true if the line is interactive, false when it is a text line
*/
public static boolean isTaggedInteractive(String line) {
return getInteractiveTag(line) != null;
}
/**
* Produce a string in double quotes with backslash sequences in all the
* right places.
* @param string A String
* @return A String correctly formatted for insertion in a JSON text.
*/
/*
* Copyright (c) 2002 JSON.org
* Licensed under the Apache License, Version 2.0
*/
private static String quoteStringJson(String string) {
if(string == null || string.length() == 0) {
return "\"\"";
}
char c;
int i;
int len = string.length();
StringBuilder sb = new StringBuilder(len+4);
String t;
sb.append('"');
for(i = 0; i < len; i += 1) {
c = string.charAt(i);
switch(c) {
case '\\':
case '"':
sb.append('\\');
sb.append(c);
break;
case '/':
sb.append('\\');
sb.append(c);
break;
case '\b':
sb.append("\\b");
break;
case '\t':
sb.append("\\t");
break;
case '\n':
sb.append("\\n");
break;
case '\f':
sb.append("\\f");
break;
case '\r':
sb.append("\\r");
break;
default:
if(c < ' ') {
t = "000"+Integer.toHexString(c);
sb.append("\\u");
sb.append(t.substring(t.length()-4));
} else {
sb.append(c);
}
}
}
sb.append('"');
return sb.toString();
}
// ------------------------------------------------------------------------------------------
// ------------------------------- Helper classes -------------------------------
// ------------------------------------------------------------------------------------------
private static class TaggedContent {
final String precedingContent;
final Tag tag;
final String subsequentContent;
public TaggedContent(String pre, Tag tag, String sub) {
this.precedingContent = pre;
this.tag = tag;
this.subsequentContent = sub;
}
}
/**
* Holds a string with basic (non-interactive) formatting.
*/
private static class TextMessagePart {
String text = "";
Color color = null;
Set<FormatType> formatTypes = new HashSet<>();
/**
* Get a simple colored/formatted string
* @return String with formatting
*/
String toSimpleString() {
StringBuilder sb = new StringBuilder();
// Color
if(color != null) {
sb.append(SIMPLE_FORMAT_PREFIX_CHAR);
sb.append(color.getNativeFormattingCode());
}
// Formatting
for(FormatType format : formatTypes) {
sb.append(SIMPLE_FORMAT_PREFIX_CHAR);
sb.append(format.getNativeFormattingCode());
}
// Text
sb.append(text);
return sb.toString();
}
/**
* Get a JSON component for this message part
* @return This part formatted in JSON
*/
String toJSON() {
StringBuilder sb = new StringBuilder();
sb.append('{');
sb.append("text:").append(quoteStringJson(text));
if(color != null && color != Color.WHITE) {
sb.append(",color:").append(color.jsonValue);
}
for(FormatType formatting : formatTypes) {
sb.append(',');
sb.append(formatting.jsonKey).append(':');
sb.append("true");
}
sb.append('}');
return sb.toString();
}
boolean hasFormatting() {
return !(color == Color.WHITE && formatTypes.isEmpty());
}
@Override
public String toString() {
return "TextMessagePart(text:"+text+", color:"+color+", formatting:"+formatTypes.toString()+")";
}
}
/**
* Holds a string with interactive formatting.
*/
private static class InteractiveMessagePart {
LinkedList<TextMessagePart> content = new LinkedList<>();
// Click
ClickType clickType = null;
String clickContent = "";
// Hover
HoverType hoverType = null;
LinkedList<TextMessagePart> hoverContent = null;
/**
* Get a simple colored/formatted string
* @return String with formatting
*/
String toSimpleString() {
StringBuilder sb = new StringBuilder();
for(TextMessagePart part : content) {
sb.append(part.toSimpleString());
}
return sb.toString();
}
/**
* Get a JSON component for this message part
* @return This part formatted in JSON
*/
String toJSON() {
StringBuilder sb = new StringBuilder();
if(content.size() == 1) {
// Add attributes to TextMessagePart object
sb.append(content.getFirst().toJSON());
sb.deleteCharAt(sb.length()-1);
} else {
sb.append('{');
sb.append("text=\"\",extra:[");
for(TextMessagePart textPart : content) {
sb.append(textPart.toJSON());
sb.append(',');
}
sb.deleteCharAt(sb.length()-1);
sb.append(']');
}
if(clickType != null) {
sb.append(',');
sb.append("clickEvent:{");
sb.append("action:").append(clickType.getJsonKey()).append(',');
sb.append("value:").append(quoteStringJson(clickContent));
sb.append('}');
}
if(hoverType != null) {
sb.append(',');
sb.append("hoverEvent:{");
sb.append("action:").append(hoverType.getJsonKey()).append(',');
sb.append("value:");
if(hoverContent.size() == 1) {
TextMessagePart hoverPart = hoverContent.getFirst();
if(hoverPart.hasFormatting()) {
sb.append(hoverPart.toJSON());
} else {
sb.append(quoteStringJson(hoverPart.text));
}
} else {
sb.append('[');
for(TextMessagePart hoverPart : hoverContent) {
sb.append(hoverPart.toJSON());
sb.append(',');
}
sb.deleteCharAt(sb.length()-1);
sb.append(']');
}
sb.append('}');
}
sb.append('}');
return sb.toString();
}
@Override
public String toString() {
return "InteractiveMessagePart(textMessageParts:"+content+", clickType:"+clickType+", clickContent:"+clickContent+", hoverType:"+hoverType+", hoverContent:"+hoverContent+")";
}
}
// --------------------------------------- Tags ---------------------------------------
interface Tag {
/**
* Tag text(s) used in the FancyMessageFormat (The text between '[' and ']')
*/
String[] getTags();
}
/**
* Indicates formatting that is applied until explicitly stopped.
* Can also be used in simple Minecraft messages (Non-JSON).
*/
interface ContinuousTag extends Tag {
/**
* The character that defines upcoming formatting in a native (non-JSON) Minecraft message.
*/
char getNativeFormattingCode();
}
/**
* Indicates formatting that allows cursor interaction. Requires the
* Minecraft JSON / tellraw format.
*/
interface InteractiveMessageTag extends Tag {
String getJsonKey();
}
enum Color implements ContinuousTag {
WHITE('f'),
BLACK('0'),
BLUE('9'),
DARK_BLUE('1', "darkblue"),
GREEN('a'),
DARK_GREEN('2', "darkgreen"),
AQUA('b'),
DARK_AQUA('3', "darkaqua"),
RED('c'),
DARK_RED('4', "darkred"),
LIGHT_PURPLE('d', "lightpurple"),
DARK_PURPLE('5', "darkpurple"),
YELLOW('e'),
GOLD('6'),
GRAY('7', "grey"),
DARK_GRAY('8', "dark_grey", "darkgray", "darkgrey");
final char bytecode;
final String jsonValue;
final String[] tags;
Color(char bytecode, String... extraTags) {
this.bytecode = bytecode;
this.jsonValue = this.name().toLowerCase();
this.tags = new String[extraTags.length+1];
this.tags[0] = this.name().toLowerCase();
System.arraycopy(extraTags, 0, this.tags, 1, extraTags.length);
}
@Override
public String[] getTags() {
return tags;
}
@Override
public char getNativeFormattingCode() {
return bytecode;
}
}
enum FormatType implements ContinuousTag {
BOLD('l', "bold", "b", "bold"),
ITALIC('o', "italic", "i", "italic"),
UNDERLINE('n', "underlined", "u", "underline"),
STRIKETHROUGH('s', "strikethrough", "s", "strike", "strikethrough"),
OBFUSCATE('k', "obfuscated", "obfuscate");
final char bytecode;
final String jsonKey;
final String[] tags;
FormatType(char bytecode, String jsonKey, String... tags) {
this.bytecode = bytecode;
this.jsonKey = jsonKey;
this.tags = tags;
}
@Override
public String[] getTags() {
return tags;
}
@Override
public char getNativeFormattingCode() {
return bytecode;
}
}
enum FormatCloseTag implements Tag {
BOLD_END(FormatType.BOLD),
ITALIC_END(FormatType.ITALIC),
UNDERLINE_END(FormatType.UNDERLINE),
STRIKETHROUGH_END(FormatType.STRIKETHROUGH),
OBFUSCATE_END(FormatType.OBFUSCATE);
/**
* Formatting that is stopped at this point
*/
final FormatType closes;
private final String[] tags;
FormatCloseTag(FormatType openingTag) {
this.closes = openingTag;
// Auto-generate close tags
tags = new String[closes.tags.length];
for(int i = 0; i < tags.length; i++) {
tags[i] = END_TAG_INDICATOR+closes.tags[i];
}
}
@Override
public String[] getTags() {
return tags;
}
}
enum ControlTag implements Tag {
BREAK("break"),
ESCAPE("esc"),
RESET("reset");
private final String[] tags;
ControlTag(String... tags) {
this.tags = tags;
}
@Override
public String[] getTags() {
return tags;
}
}
/**
* Types of clicking
*/
enum ClickType implements InteractiveMessageTag {
LINK("open_url", "link"),
COMMAND("run_command", "command"),
SUGGEST("suggest_command", "suggest");
private final String jsonKey;
private final String[] tags;
ClickType(String jsonKey, String... tags) {
this.jsonKey = jsonKey;
this.tags = tags;
}
@Override
public String[] getTags() {
return tags;
}
@Override
public String getJsonKey() {
return jsonKey;
}
}
enum HoverType implements InteractiveMessageTag {
HOVER;
@Override
public String[] getTags() {
return new String[]{"hover"};
}
@Override
public String getJsonKey() {
return "show_text";
}
}
}
@@ -0,0 +1,100 @@
package me.wiefferink.areashop.messages;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.lang.reflect.*;
import java.util.logging.Level;
/**
* Methods written by the Fanciful project (Github: https://github.com/mkremins/fanciful)
*/
public class FancyMessageSender {
private static Constructor<?> nmsPacketPlayOutChatConstructor;
public static boolean sendJSON(Player player, String jsonString) {
try {
Object handle = Reflection.getHandle(player);
Object connection = Reflection.getField(handle.getClass(), "playerConnection").get(handle);
Reflection.getMethod(connection.getClass(), "sendPacket", Reflection.getNMSClass("Packet")).invoke(connection, createChatPacket(jsonString));
return true;
} catch(IllegalArgumentException e) {
Bukkit.getLogger().log(Level.WARNING, "Argument could not be passed.", e);
} catch(IllegalAccessException e) {
Bukkit.getLogger().log(Level.WARNING, "Could not access method.", e);
} catch(InstantiationException e) {
Bukkit.getLogger().log(Level.WARNING, "Underlying class is abstract.", e);
} catch(InvocationTargetException e) {
Bukkit.getLogger().log(Level.WARNING, "A error has occured durring invoking of method.", e);
} catch(NoSuchMethodException e) {
Bukkit.getLogger().log(Level.WARNING, "Could not find method.", e);
} catch(ClassNotFoundException e) {
Bukkit.getLogger().log(Level.WARNING, "Could not find class.", e);
}
return false;
}
// The ChatSerializer's instance of Gson
private static Object nmsChatSerializerGsonInstance;
private static Method fromJsonMethod;
private static Object createChatPacket(String json) throws IllegalArgumentException, IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
if(nmsChatSerializerGsonInstance == null) {
// Find the field and its value, completely bypassing obfuscation
Class<?> chatSerializerClazz;
String version = Reflection.getVersion();
if(version == null || version.length() < 2) {
throw new RuntimeException("Could not get NMS version, found: "+version);
}
version = version.substring(1, version.length()-1); // Strip v and the . at the end
String[] parts = version.split("_");
if(parts.length < 3) {
throw new RuntimeException("Not enough parts in the version, found: "+version);
}
int majorVersion = Integer.parseInt(parts[0]);
int minorVersion = Integer.parseInt(parts[1]);
int revision = Integer.parseInt(parts[2].substring(1));
if((majorVersion <= 1 && minorVersion < 8) || (majorVersion == 1 && minorVersion == 8 && revision == 1)) {
chatSerializerClazz = Reflection.getNMSClass("ChatSerializer");
} else {
chatSerializerClazz = Reflection.getNMSClass("IChatBaseComponent$ChatSerializer");
}
if(chatSerializerClazz == null) {
throw new ClassNotFoundException("Can't find the ChatSerializer class");
}
for(Field declaredField : chatSerializerClazz.getDeclaredFields()) {
if(Modifier.isFinal(declaredField.getModifiers()) && Modifier.isStatic(declaredField.getModifiers()) && declaredField.getType().getName().endsWith("Gson")) {
// We've found our field
declaredField.setAccessible(true);
nmsChatSerializerGsonInstance = declaredField.get(null);
fromJsonMethod = nmsChatSerializerGsonInstance.getClass().getMethod("fromJson", String.class, Class.class);
break;
}
}
}
// Since the method is so simple, and all the obfuscated methods have the same name, it's easier to reimplement 'IChatBaseComponent a(String)' than to reflectively call it
// Of course, the implementation may change, but fuzzy matches might break with signature changes
Object serializedChatComponent = fromJsonMethod.invoke(nmsChatSerializerGsonInstance, json, Reflection.getNMSClass("IChatBaseComponent"));
if(nmsPacketPlayOutChatConstructor == null) {
try {
nmsPacketPlayOutChatConstructor = Reflection.getNMSClass("PacketPlayOutChat").getDeclaredConstructor(Reflection.getNMSClass("IChatBaseComponent"));
nmsPacketPlayOutChatConstructor.setAccessible(true);
} catch(NoSuchMethodException e) {
Bukkit.getLogger().log(Level.SEVERE, "Could not find Minecraft method or constructor.", e);
} catch(SecurityException e) {
Bukkit.getLogger().log(Level.WARNING, "Could not access constructor.", e);
}
}
return nmsPacketPlayOutChatConstructor.newInstance(serializedChatComponent);
}
}
@@ -0,0 +1,163 @@
package me.wiefferink.areashop.messages;
import com.google.common.base.Charsets;
import me.wiefferink.areashop.AreaShop;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.*;
import java.util.*;
public class LanguageManager {
private AreaShop plugin = null;
private String languages[] = {"EN", "NL"};
private Map<String, List<String>> currentLanguage, defaultLanguage;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public LanguageManager(AreaShop plugin) {
this.plugin = plugin;
startup();
}
/**
* Save the default language files and open the current and backup language file
*/
public void startup() {
this.saveDefaults();
currentLanguage = loadLanguage(plugin.getConfig().getString("language"));
defaultLanguage = loadLanguage(languages[0]);
}
/**
* Saves the default language files if not already present
*/
public void saveDefaults() {
// Create the language folder if it not exists
File langFolder;
langFolder = new File(plugin.getDataFolder()+File.separator+AreaShop.languageFolder);
if(!langFolder.exists()) {
if(!langFolder.mkdirs()) {
plugin.getLogger().warning("Could not create language directory: "+langFolder.getAbsolutePath());
return;
}
}
// Create the language files, overwrites if a file already exists
// Overriding is necessary because otherwise with an update the new lang
// files would not be used, when translating your own use another
// file name as the default
File langFile;
for(String language : languages) {
langFile = new File(plugin.getDataFolder()+File.separator+AreaShop.languageFolder+File.separator+language+".yml");
try(
InputStream input = plugin.getResource(AreaShop.languageFolder+"/"+language+".yml");
OutputStream output = new FileOutputStream(langFile)
) {
if(input == null) {
plugin.getLogger().warning("Could not save default language to the '"+AreaShop.languageFolder+"' folder: "+language+".yml");
continue;
}
int read;
byte[] bytes = new byte[1024];
while((read = input.read(bytes)) != -1) {
output.write(bytes, 0, read);
}
input.close();
output.close();
} catch(IOException e) {
plugin.getLogger().warning("Something went wrong saving a default language file: "+langFile.getPath());
}
}
}
/**
* Loads the specified language
* @param key The language to load
* @return Map with the messages loaded from the file
*/
public Map<String, List<String>> loadLanguage(String key) {
Map<String, List<String>> result = new HashMap<>();
// Load the strings
File file = new File(plugin.getDataFolder()+File.separator+AreaShop.languageFolder+File.separator+key+".yml");
try(
InputStreamReader reader = new InputStreamReader(new FileInputStream(file), Charsets.UTF_8)
) {
YamlConfiguration ymlFile = YamlConfiguration.loadConfiguration(reader);
if(ymlFile.getKeys(false).isEmpty()) {
plugin.getLogger().warning("Language file "+key+".yml has zero messages.");
return result;
}
for(String messageKey : ymlFile.getKeys(false)) {
if(ymlFile.isList(messageKey)) {
result.put(messageKey, new ArrayList<>(ymlFile.getStringList(messageKey)));
} else {
result.put(messageKey, new ArrayList<>(Collections.singletonList(ymlFile.getString(messageKey))));
}
}
} catch(IOException e) {
plugin.getLogger().warning("Could not load set language file: "+file.getAbsolutePath());
}
return result;
}
/**
* Get the message for a certain key, without doing any processing
* @param key The key of the message to get
* @return The message as a list of strings
*/
public List<String> getRawMessage(String key) {
List<String> message;
if(key.equalsIgnoreCase(Message.CHATLANGUAGEVARIABLE)) {
message = plugin.getChatPrefix();
} else if(currentLanguage.containsKey(key)) {
message = currentLanguage.get(key);
} else {
message = defaultLanguage.get(key);
}
if(message == null) {
return new ArrayList<>();
}
return new ArrayList<>(message);
}
}
@@ -0,0 +1,390 @@
package me.wiefferink.areashop.messages;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.regions.GeneralRegion;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Message {
public static final String VARIABLESTART = "%";
public static final String VARIABLEEND = "%";
public static final String LANGUAGEVARIABLE = "lang:";
public static final String CHATLANGUAGEVARIABLE = "prefix";
public static final int REPLACEMENTLIMIT = 50; // Maximum number of replacement rounds (the replaced value can have variables again)
public static final int MAXIMUMJSONLENGTH = 30000; // Limit of the client is 32767 for the complete message
private static boolean fancyWorks = true;
private List<String> message;
private Object[] replacements;
private String key = null;
/**
* Internal use only
*/
private Message() {
message = new ArrayList<>();
}
/**
* Empty message object
* @return this
*/
public static Message none() {
return new Message();
}
/**
* Construct a message from a language key
* @param key The key of the message to use
* @return this
*/
public static Message fromKey(String key) {
return new Message().setMessageFromKey(key);
}
/**
* Construct a message from a string
* @param message The message to use
* @return this
*/
public static Message fromString(String message) {
return new Message().setMessage(message);
}
/**
* Construct a message from a string list
* @param message The message to use
* @return this
*/
public static Message fromList(List<String> message) {
return new Message().setMessage(message);
}
/**
* Get the message with all replacements done
* @return Message as a list
*/
public List<String> get() {
executeReplacements();
return message;
}
/**
* Get the message with all replacements done
* @param limit the limit to hold to
* @return Message as a list
*/
private List<String> get(Limit limit) {
executeReplacements(limit);
return message;
}
/**
* Get the raw message without replacing anything
* @return The message
*/
public List<String> getRaw() {
return message;
}
/**
* Get a plain string for the message (for example for using in the console)
* @return The message as simple string
*/
public String getPlain() {
executeReplacements();
return FancyMessageFormat.convertToConsole(message);
}
/**
* Add the default prefix to the message
* @param doIt true if the prefix should be added, otherwise false
* @return this
*/
public Message prefix(boolean doIt) {
if(doIt) {
message.add(0, VARIABLESTART+LANGUAGEVARIABLE+CHATLANGUAGEVARIABLE+VARIABLEEND);
}
return this;
}
public Message prefix() {
return prefix(true);
}
/**
* Set the replacements to apply to the message
* @param replacements The replacements to apply
* - GeneralRegion: All region replacements are applied
* - Message: Message is inserted
* - other: index tag is replaced, like %0%
* @return this
*/
public Message replacements(Object... replacements) {
this.replacements = replacements;
return this;
}
/**
* Append lines to the message
* @param lines The lines to append
* @return this
*/
public Message append(List<String> lines) {
message.addAll(lines);
return this;
}
/**
* Append a message to this message
* @param message The message to append
* @return this
*/
public Message append(Message message) {
return append(message.get());
}
/**
* Append lines to the message
* @param line The line to append
* @return this
*/
public Message append(String line) {
message.add(line);
return this;
}
/**
* Send the message to a target
* @param target The target to send the message to (Player, CommandSender, Logger)
* @return this
*/
public Message send(Object target) {
if(message == null || message.size() == 0 || (message.size() == 1 && message.get(0).length() == 0) || target == null) {
return this;
}
executeReplacements();
if(target instanceof Player) {
boolean sendPlain = true;
if(AreaShop.getInstance().getConfig().getBoolean("useFancyMessages") && fancyWorks) {
try {
String jsonString = FancyMessageFormat.convertToJSON(message);
if(jsonString.length() > MAXIMUMJSONLENGTH) {
AreaShop.getInstance().getLogger().severe("Message with key "+key+" could not be send, results in a JSON string that is too big to send to the client, start of the message: "+Utils.getMessageStart(this, 100));
return this;
}
boolean result = FancyMessageSender.sendJSON((Player)target, jsonString);
sendPlain = !result;
fancyWorks = result;
} catch(Exception e) {
fancyWorks = false;
AreaShop.getInstance().getLogger().warning("Sending fancy message did not work, falling back to plain messages. Message key: "+key);
}
}
if(sendPlain) { // Fancy messages disabled or broken
((Player)target).sendMessage(FancyMessageFormat.convertToConsole(message));
}
} else {
String plainMessage = FancyMessageFormat.convertToConsole(message);
if(!AreaShop.getInstance().getConfig().getBoolean("useColorsInConsole")) {
plainMessage = ChatColor.stripColor(plainMessage);
}
if(target instanceof CommandSender) {
((CommandSender)target).sendMessage(plainMessage);
} else if(target instanceof Logger) {
((Logger)target).info(plainMessage);
} else {
AreaShop.getInstance().getLogger().warning("Could not send message, target is wrong: "+plainMessage);
}
}
return this;
}
// INTERNAL METHODS
/**
* Set the internal message
* @param message The message to set
* @return this
*/
private Message setMessage(List<String> message) {
this.message = message;
if(this.message == null) {
this.message = new ArrayList<>();
}
return this;
}
/**
* Set the internal message with a key
* @param key The message key to get the message for
* @return this
*/
private Message setMessageFromKey(String key) {
this.key = key;
return this.setMessage(AreaShop.getInstance().getLanguageManager().getRawMessage(key));
}
/**
* Set the internal message with a string
* @param message The message to set
* @return this
*/
private Message setMessage(String message) {
List<String> list = new ArrayList<>();
list.add(message);
return this.setMessage(list);
}
/**
* Apply all replacements to the message
*/
private void executeReplacements() {
executeReplacements(new Limit(REPLACEMENTLIMIT, this));
}
private void executeReplacements(Limit limit) {
// Replace variables until they are all gone, or when the limit is reached
Pattern variable = Pattern.compile(Pattern.quote(VARIABLESTART)+"[a-zA-Z]+"+Pattern.quote(VARIABLEEND));
try {
boolean shouldReplace = true;
while(shouldReplace) {
List<String> original = new ArrayList<>(message);
limit.left--;
if(limit.reached()) {
if(!limit.notified) {
limit.notified = true;
AreaShop.getInstance().getLogger().severe("Reached replacement limit, probably has replacements loops, problematic message key: "+limit.message.key+", first characters of the message: "+Utils.getMessageStart(limit.message, 100));
}
break;
}
replaceArgumentVariables(limit);
replaceLanguageVariables(limit);
shouldReplace = !message.equals(original);
}
} catch(StackOverflowError e) {
limit.left = 0;
limit.notified = true;
AreaShop.getInstance().getLogger().severe("Too many recursive replacements for message with key: "+limit.message.key+" (probably includes itself as replacement), start of the message: "+Utils.getMessageStart(limit.message, 100));
}
}
/**
* Replace argument variables in a message
* The arguments to apply as replacements:
* - If it is a GeneralRegion the replacements of the region will be applied
* - Else the parameter will replace its number surrounded with VARIABLESTART and VARIABLEEND
*/
private void replaceArgumentVariables(Limit limit) {
if(message == null || message.size() == 0 || replacements == null) {
return;
}
boolean result = false;
for(int i = 0; i < message.size(); i++) {
int number = 0;
for(Object param : replacements) {
if(param != null) {
if(param instanceof GeneralRegion) {
message.set(i, ((GeneralRegion)param).applyAllReplacements(message.get(i)));
} else if(param instanceof Message) {
Pattern variables = Pattern.compile(Pattern.quote(VARIABLESTART)+number+Pattern.quote(VARIABLEEND));
Matcher matches = variables.matcher(message.get(i));
if(matches.find()) {
FancyMessageFormat.insertMessage(message, ((Message)param).get(limit), i, matches.start(), matches.end());
}
number++;
} else {
message.set(i, message.get(i).replace(VARIABLESTART+number+VARIABLEEND, param.toString()));
number++;
}
}
}
}
}
/**
* Replace all language variables in a message
*/
private void replaceLanguageVariables(Limit limit) {
if(message == null || message.size() == 0) {
return;
}
Pattern variables = Pattern.compile(
Pattern.quote(VARIABLESTART)+
Pattern.quote(LANGUAGEVARIABLE)+"[a-zA-Z-]+"+ // Language key
"(\\|(.*?\\|)+)?"+ // Optional message arguments
Pattern.quote(VARIABLEEND)
);
for(int i = 0; i < message.size(); i++) {
Matcher matches = variables.matcher(message.get(i));
if(matches.find()) {
String variable = matches.group();
String key;
Object[] arguments = null;
if(variable.contains("|")) {
key = variable.substring(6, variable.indexOf("|"));
arguments = variable.substring(variable.indexOf("|")+1, variable.length()-1).split("\\|");
} else {
key = variable.substring(6, variable.length()-1);
}
Message insert = Message.fromKey(key);
if(arguments != null) {
insert.replacements(arguments);
}
// Insert message
int startDiff = message.size()-i;
FancyMessageFormat.insertMessage(message, insert.get(limit), i, matches.start(), matches.end());
// Skip to end of insert, language tags already replaced
i = message.size()-startDiff;
}
}
}
@Override
public String toString() {
return "Message(key:"+key+", message:"+message+")";
}
/**
* Class to store a limit
*/
private class Limit {
public int left = 0;
public boolean notified = false;
public Message message;
/**
* Set the initial limit
* @param count The limit to use
*/
public Limit(int count, Message message) {
left = count;
this.message = message;
}
/**
* Check if the limit is reached
* @return true if the limit is reached, otherwise false
*/
public boolean reached() {
return left <= 0;
}
}
}
@@ -0,0 +1,219 @@
package me.wiefferink.areashop.messages;
import org.bukkit.Bukkit;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Class made by glan3b (Github: https://github.com/glen3b) for the Fanciful project (Github: https://github.com/mkremins/fanciful)
*/
/**
* A class containing static utility methods and caches which are intended as reflective conveniences.
* Unless otherwise noted, upon failure methods will return {@code null}.
*/
public final class Reflection {
private static String _versionString;
private Reflection() {
}
/**
* Gets the version string from the package name of the CraftBukkit server implementation.
* This is needed to bypass the JAR package name changing on each update.
* @return The version string of the OBC and NMS packages, <em>including the trailing dot</em>.
*/
public synchronized static String getVersion() {
if(_versionString == null) {
if(Bukkit.getServer() == null) {
// The server hasn't started, static initializer call?
return null;
}
String name = Bukkit.getServer().getClass().getPackage().getName();
_versionString = name.substring(name.lastIndexOf('.')+1)+".";
}
return _versionString;
}
/**
* Stores loaded classes from the {@code net.minecraft.server} package.
*/
private static final Map<String, Class<?>> _loadedNMSClasses = new HashMap<String, Class<?>>();
/**
* Stores loaded classes from the {@code org.bukkit.craftbukkit} package (and subpackages).
*/
private static final Map<String, Class<?>> _loadedOBCClasses = new HashMap<String, Class<?>>();
/**
* Gets a {@link Class} object representing a type contained within the {@code net.minecraft.server} versioned package.
* The class instances returned by this method are cached, such that no lookup will be done twice (unless multiple threads are accessing this method simultaneously).
* @param className The name of the class, excluding the package, within NMS.
* @return The class instance representing the specified NMS class, or {@code null} if it could not be loaded.
*/
public synchronized static Class<?> getNMSClass(String className) {
if(_loadedNMSClasses.containsKey(className)) {
return _loadedNMSClasses.get(className);
}
String fullName = "net.minecraft.server."+getVersion()+className;
Class<?> clazz = null;
try {
clazz = Class.forName(fullName);
} catch(Exception e) {
e.printStackTrace();
_loadedNMSClasses.put(className, null);
return null;
}
_loadedNMSClasses.put(className, clazz);
return clazz;
}
/**
* Gets a {@link Class} object representing a type contained within the {@code org.bukkit.craftbukkit} versioned package.
* The class instances returned by this method are cached, such that no lookup will be done twice (unless multiple threads are accessing this method simultaneously).
* @param className The name of the class, excluding the package, within OBC. This name may contain a subpackage name, such as {@code inventory.CraftItemStack}.
* @return The class instance representing the specified OBC class, or {@code null} if it could not be loaded.
*/
public synchronized static Class<?> getOBCClass(String className) {
if(_loadedOBCClasses.containsKey(className)) {
return _loadedOBCClasses.get(className);
}
String fullName = "org.bukkit.craftbukkit."+getVersion()+className;
Class<?> clazz = null;
try {
clazz = Class.forName(fullName);
} catch(Exception e) {
e.printStackTrace();
_loadedOBCClasses.put(className, null);
return null;
}
_loadedOBCClasses.put(className, clazz);
return clazz;
}
/**
* Attempts to get the NMS handle of a CraftBukkit object.
* <p>
* The only match currently attempted by this method is a retrieval by using a parameterless {@code getHandle()} method implemented by the runtime type of the specified object.
* </p>
* @param obj The object for which to retrieve an NMS handle.
* @return The NMS handle of the specified object, or {@code null} if it could not be retrieved using {@code getHandle()}.
*/
public synchronized static Object getHandle(Object obj) {
try {
return getMethod(obj.getClass(), "getHandle").invoke(obj);
} catch(Exception e) {
e.printStackTrace();
return null;
}
}
private static final Map<Class<?>, Map<String, Field>> _loadedFields = new HashMap<Class<?>, Map<String, Field>>();
/**
* Retrieves a {@link Field} instance declared by the specified class with the specified name.
* Java access modifiers are ignored during this retrieval. No guarantee is made as to whether the field
* returned will be an instance or static field.
* <p>
* A global caching mechanism within this class is used to store fields. Combined with synchronization, this guarantees that
* no field will be reflectively looked up twice.
* </p>
* <p>
* If a field is deemed suitable for return, {@link Field#setAccessible(boolean) setAccessible} will be invoked with an argument of {@code true} before it is returned.
* This ensures that callers do not have to check or worry about Java access modifiers when dealing with the returned instance.
* </p>
* @param clazz The class which contains the field to retrieve.
* @param name The declared name of the field in the class.
* @return A field object with the specified name declared by the specified class.
* @see Class#getDeclaredField(String)
*/
public synchronized static Field getField(Class<?> clazz, String name) {
Map<String, Field> loaded;
if(!_loadedFields.containsKey(clazz)) {
loaded = new HashMap<String, Field>();
_loadedFields.put(clazz, loaded);
} else {
loaded = _loadedFields.get(clazz);
}
if(loaded.containsKey(name)) {
// If the field is loaded (or cached as not existing), return the relevant value, which might be null
return loaded.get(name);
}
try {
Field field = clazz.getDeclaredField(name);
field.setAccessible(true);
loaded.put(name, field);
return field;
} catch(Exception e) {
// Error loading
e.printStackTrace();
// Cache field as not existing
loaded.put(name, null);
return null;
}
}
/**
* Contains loaded methods in a cache.
* The map maps [types to maps of [method names to maps of [parameter types to method instances]]].
*/
private static final Map<Class<?>, Map<String, Map<ArrayWrapper<Class<?>>, Method>>> _loadedMethods = new HashMap<Class<?>, Map<String, Map<ArrayWrapper<Class<?>>, Method>>>();
/**
* Retrieves a {@link Method} instance declared by the specified class with the specified name and argument types.
* Java access modifiers are ignored during this retrieval. No guarantee is made as to whether the field
* returned will be an instance or static field.
* <p>
* A global caching mechanism within this class is used to store method. Combined with synchronization, this guarantees that
* no method will be reflectively looked up twice.
* </p>
* <p>
* If a method is deemed suitable for return, {@link Method#setAccessible(boolean) setAccessible} will be invoked with an argument of {@code true} before it is returned.
* This ensures that callers do not have to check or worry about Java access modifiers when dealing with the returned instance.
* </p>
* <p>
* This method does <em>not</em> search superclasses of the specified type for methods with the specified signature.
* Callers wishing this behavior should use {@link Class#getDeclaredMethod(String, Class...)}.
* @param clazz The class which contains the method to retrieve.
* @param name The declared name of the method in the class.
* @param args The formal argument types of the method.
* @return A method object with the specified name declared by the specified class.
*/
public synchronized static Method getMethod(Class<?> clazz, String name,
Class<?>... args) {
if(!_loadedMethods.containsKey(clazz)) {
_loadedMethods.put(clazz, new HashMap<String, Map<ArrayWrapper<Class<?>>, Method>>());
}
Map<String, Map<ArrayWrapper<Class<?>>, Method>> loadedMethodNames = _loadedMethods.get(clazz);
if(!loadedMethodNames.containsKey(name)) {
loadedMethodNames.put(name, new HashMap<ArrayWrapper<Class<?>>, Method>());
}
Map<ArrayWrapper<Class<?>>, Method> loadedSignatures = loadedMethodNames.get(name);
ArrayWrapper<Class<?>> wrappedArg = new ArrayWrapper<Class<?>>(args);
if(loadedSignatures.containsKey(wrappedArg)) {
return loadedSignatures.get(wrappedArg);
}
for(Method m : clazz.getMethods()) {
if(m.getName().equals(name) && Arrays.equals(args, m.getParameterTypes())) {
m.setAccessible(true);
loadedSignatures.put(wrappedArg, m);
return m;
}
}
loadedSignatures.put(wrappedArg, null);
return null;
}
}
@@ -1,171 +1,171 @@
package nl.evolutioncoding.areashop.regions;
import nl.evolutioncoding.areashop.AreaShop;
import org.bukkit.configuration.ConfigurationSection;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class RegionGroup {
private AreaShop plugin;
private String name;
/**
* Constructor, used when creating new groups or restoring them from groups.yml at server boot
* @param plugin The AreaShop plugin
* @param name Name of the group, has to be unique
*/
public RegionGroup(AreaShop plugin, String name) {
this.plugin = plugin;
this.name = name;
setSetting("name", name);
// Delete duplicates
List<String> members = getMembers();
int previousCount = members.size();
List<String> newMembers = new ArrayList<>();
while(!members.isEmpty()) {
String member = members.remove(0);
// If the region has been deleted also clean it from the group
if(plugin.getFileManager().getRegion(member) != null) {
newMembers.add(member);
}
while(members.contains(member)) {
members.remove(member);
}
}
if(newMembers.size() != previousCount) {
setSetting("regions", newMembers);
AreaShop.debug("group save required because of changed member size");
saveRequired();
}
if(getMembers().size() == 0) {
plugin.getFileManager().removeGroup(this);
}
}
/**
* Adds a member to a group
* @param region The region to add to the group (GeneralRegion or a subclass of it)
* @return true if the region was not already added, otherwise false
*/
public boolean addMember(GeneralRegion region) {
List<String> members = getMembers();
if(members.contains(region.getLowerCaseName())) {
return false;
} else {
members.add(region.getName());
setSetting("regions", members);
this.saveRequired();
return true;
}
}
/**
* Remove a member from the group
* @param region The region to remove
* @return true if the region was in the group before, otherwise false
*/
public boolean removeMember(GeneralRegion region) {
List<String> members = getMembers();
boolean result = isMember(region);
members.remove(region.getName());
if(members.isEmpty()) {
plugin.getFileManager().removeGroup(this);
} else {
setSetting("regions", members);
}
if(result) {
this.saveRequired();
}
return result;
}
/**
* Get all members of the group
* @return A list with the names of all members of the group
*/
public List<String> getMembers() {
if(getSettings() == null || getSettings().getStringList("regions") == null) {
return new ArrayList<>();
}
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<>();
for(String name : getMembers()) {
result.add(plugin.getFileManager().getRegion(name));
}
return result;
}
/**
* Get the name of the group
* @return The name of the group
*/
public String getName() {
return name;
}
/**
* Get the lowercase name of the group (used for getting the config etc)
* @return The name of the group in lowercase
*/
public String getLowerCaseName() {
return getName().toLowerCase();
}
/**
* Check if a region is member of the group
* @param region Region to check
* @return true if the region is in the group, otherwise false
*/
public boolean isMember(GeneralRegion region) {
return getMembers().contains(region.getName());
}
/**
* Get the priority of the group (higher overwrites)
* @return The priority of the group
*/
public int getPriority() {
return getSettings().getInt("priority");
}
/**
* Get the configurationsection with the settings of this group
* @return The ConfigurationSection with the settings of the group
*/
public ConfigurationSection getSettings() {
return plugin.getFileManager().getGroupSettings(name);
}
/**
* Set a setting of this group
* @param path The path to set
* @param setting The value to set
*/
public void setSetting(String path, Object setting) {
plugin.getFileManager().setGroupSetting(this, path, setting);
}
/**
* Indicates this file needs to be saved, will actually get saved later by a task
*/
public void saveRequired() {
plugin.getFileManager().saveGroupsIsRequired();
}
/**
* Save the groups to disk now, normally saveRequired() is preferred because of performance
*/
public void saveNow() {
plugin.getFileManager().saveGroupsNow();
}
}
package me.wiefferink.areashop.regions;
import me.wiefferink.areashop.AreaShop;
import org.bukkit.configuration.ConfigurationSection;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class RegionGroup {
private AreaShop plugin;
private String name;
/**
* Constructor, used when creating new groups or restoring them from groups.yml at server boot
* @param plugin The AreaShop plugin
* @param name Name of the group, has to be unique
*/
public RegionGroup(AreaShop plugin, String name) {
this.plugin = plugin;
this.name = name;
setSetting("name", name);
// Delete duplicates
List<String> members = getMembers();
int previousCount = members.size();
List<String> newMembers = new ArrayList<>();
while(!members.isEmpty()) {
String member = members.remove(0);
// If the region has been deleted also clean it from the group
if(plugin.getFileManager().getRegion(member) != null) {
newMembers.add(member);
}
while(members.contains(member)) {
members.remove(member);
}
}
if(newMembers.size() != previousCount) {
setSetting("regions", newMembers);
AreaShop.debug("group save required because of changed member size");
saveRequired();
}
if(getMembers().size() == 0) {
plugin.getFileManager().removeGroup(this);
}
}
/**
* Adds a member to a group
* @param region The region to add to the group (GeneralRegion or a subclass of it)
* @return true if the region was not already added, otherwise false
*/
public boolean addMember(GeneralRegion region) {
List<String> members = getMembers();
if(members.contains(region.getLowerCaseName())) {
return false;
} else {
members.add(region.getName());
setSetting("regions", members);
this.saveRequired();
return true;
}
}
/**
* Remove a member from the group
* @param region The region to remove
* @return true if the region was in the group before, otherwise false
*/
public boolean removeMember(GeneralRegion region) {
List<String> members = getMembers();
boolean result = isMember(region);
members.remove(region.getName());
if(members.isEmpty()) {
plugin.getFileManager().removeGroup(this);
} else {
setSetting("regions", members);
}
if(result) {
this.saveRequired();
}
return result;
}
/**
* Get all members of the group
* @return A list with the names of all members of the group
*/
public List<String> getMembers() {
if(getSettings() == null || getSettings().getStringList("regions") == null) {
return new ArrayList<>();
}
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<>();
for(String name : getMembers()) {
result.add(plugin.getFileManager().getRegion(name));
}
return result;
}
/**
* Get the name of the group
* @return The name of the group
*/
public String getName() {
return name;
}
/**
* Get the lowercase name of the group (used for getting the config etc)
* @return The name of the group in lowercase
*/
public String getLowerCaseName() {
return getName().toLowerCase();
}
/**
* Check if a region is member of the group
* @param region Region to check
* @return true if the region is in the group, otherwise false
*/
public boolean isMember(GeneralRegion region) {
return getMembers().contains(region.getName());
}
/**
* Get the priority of the group (higher overwrites)
* @return The priority of the group
*/
public int getPriority() {
return getSettings().getInt("priority");
}
/**
* Get the configurationsection with the settings of this group
* @return The ConfigurationSection with the settings of the group
*/
public ConfigurationSection getSettings() {
return plugin.getFileManager().getGroupSettings(name);
}
/**
* Set a setting of this group
* @param path The path to set
* @param setting The value to set
*/
public void setSetting(String path, Object setting) {
plugin.getFileManager().setGroupSetting(this, path, setting);
}
/**
* Indicates this file needs to be saved, will actually get saved later by a task
*/
public void saveRequired() {
plugin.getFileManager().saveGroupsIsRequired();
}
/**
* Save the groups to disk now, normally saveRequired() is preferred because of performance
*/
public void saveNow() {
plugin.getFileManager().saveGroupsNow();
}
}
@@ -1,12 +1,12 @@
package nl.evolutioncoding.areashop.regions;
package me.wiefferink.areashop.regions;
import me.wiefferink.areashop.AreaShop;
import me.wiefferink.areashop.Utils;
import me.wiefferink.areashop.events.ask.RentingRegionEvent;
import me.wiefferink.areashop.events.ask.UnrentingRegionEvent;
import me.wiefferink.areashop.events.notify.RentedRegionEvent;
import me.wiefferink.areashop.events.notify.UnrentedRegionEvent;
import net.milkbowl.vault.economy.EconomyResponse;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.events.ask.RentingRegionEvent;
import nl.evolutioncoding.areashop.events.ask.UnrentingRegionEvent;
import nl.evolutioncoding.areashop.events.notify.RentedRegionEvent;
import nl.evolutioncoding.areashop.events.notify.UnrentedRegionEvent;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.World;
@@ -21,6 +21,8 @@ import java.util.Date;
import java.util.HashMap;
import java.util.UUID;
import static me.wiefferink.areashop.Utils.millisToHumanFormat;
public class RentRegion extends GeneralRegion {
private long warningsDoneUntil = Calendar.getInstance().getTimeInMillis();
@@ -154,7 +156,7 @@ public class RentRegion extends GeneralRegion {
}
result.put(AreaShop.tagMaxExtends, this.getMaxExtends());
result.put(AreaShop.tagExtendsLeft, getMaxExtends() - getTimesExtended());
result.put(AreaShop.tagMaxRentTime, this.millisToHumanFormat(getMaxRentTime()));
result.put(AreaShop.tagMaxRentTime, millisToHumanFormat(getMaxRentTime()));
result.put(AreaShop.tagMaxInactiveTime, this.getFormattedInactiveTimeUntilUnrent());
return result;
}
@@ -169,7 +171,7 @@ public class RentRegion extends GeneralRegion {
/**
* Get the name of the player renting this region
* @return Name of the player renting this region, if unavailable by UUID it will return the old cached name, if that is unavailable it will return <UNKNOWN>
* @return Name of the player renting this region, if unavailable by UUID it will return the old cached name, if that is unavailable it will return &lt;UNKNOWN&gt;
*/
public String getPlayerName() {
String result = Utils.toName(getRenter());
@@ -227,7 +229,7 @@ public class RentRegion extends GeneralRegion {
}
/**
* Get the duration string, includes number<space>indentifier
* Get the duration string, includes 'number indentifier'
* @return The duration string
*/
public String getDurationString() {
@@ -251,7 +253,7 @@ public class RentRegion extends GeneralRegion {
* @return Time left on the rent, for example '29 days', '3 months', '1 second'
*/
public String getTimeLeftString() {
return millisToHumanFormat(getTimeLeft());
return Utils.millisToHumanFormat(getTimeLeft());
}
/**
@@ -267,7 +269,7 @@ public class RentRegion extends GeneralRegion {
* @return String indicating the inactive time until unrent
*/
public String getFormattedInactiveTimeUntilUnrent() {
return this.millisToHumanFormat(getInactiveTimeUntilUnrent());
return Utils.millisToHumanFormat(getInactiveTimeUntilUnrent());
}
/**
@@ -351,7 +353,7 @@ public class RentRegion extends GeneralRegion {
/**
* Send the expiration warnings from the selected profile which is specified in the config
* Sends all warnings since previous call until now+<normal delay>, delay can be found in the config as well
* Sends all warnings since previous call until (now + normal delay), delay can be found in the config as well
*/
public void sendExpirationWarnings() {
// send from warningsDoneUntil to current+delay
@@ -359,30 +361,28 @@ public class RentRegion extends GeneralRegion {
return;
}
Player player = Bukkit.getPlayer(getRenter());
if(player != null) {
long sendUntil = Calendar.getInstance().getTimeInMillis() + (plugin.getConfig().getInt("expireWarning.delay") * 60 * 1000);
// loop through warning defined in the config for the profile that is set for this region
String configPath = "expirationWarningProfiles." + getStringSetting("rent.expirationWarningProfile");
ConfigurationSection section = plugin.getConfig().getConfigurationSection(configPath);
if(section == null) {
long sendUntil = Calendar.getInstance().getTimeInMillis()+(plugin.getConfig().getInt("expireWarning.delay")*60*1000);
// loop through warning defined in the config for the profile that is set for this region
String configPath = "expirationWarningProfiles."+getStringSetting("rent.expirationWarningProfile");
ConfigurationSection section = plugin.getConfig().getConfigurationSection(configPath);
if(section == null) {
return;
}
for(String timeBefore : section.getKeys(false)) {
long timeBeforeParsed = Utils.durationStringToLong(timeBefore);
if(timeBeforeParsed <= 0) {
return;
}
for(String timeBefore : section.getKeys(false)) {
long timeBeforeParsed = Utils.durationStringToLong(timeBefore);
if(timeBeforeParsed <= 0) {
return;
long checkTime = getRentedUntil()-timeBeforeParsed;
if(checkTime > warningsDoneUntil && checkTime <= sendUntil) {
if(plugin.getConfig().getBoolean(configPath+"."+timeBefore+".warnPlayer") && player != null) {
message(player, "rent-expireWarning");
}
long checkTime = getRentedUntil() - timeBeforeParsed;
if(checkTime > warningsDoneUntil && checkTime <= sendUntil) {
if(plugin.getConfig().getBoolean(configPath + "." + timeBefore + ".warnPlayer")) {
message(player, "rent-expireWarning");
}
this.runCommands(Bukkit.getConsoleSender(), plugin.getConfig().getStringList(configPath + "." + timeBefore + ".commands"));
}
this.runCommands(Bukkit.getConsoleSender(), plugin.getConfig().getStringList(configPath+"."+timeBefore+".commands"));
}
warningsDoneUntil = sendUntil;
}
}
warningsDoneUntil = sendUntil;
}
/**
@@ -559,7 +559,6 @@ public class RentRegion extends GeneralRegion {
message(player, "rent-extended");
} else {
message(player, "rent-rented");
message(player, "rent-extend");
}
if(!extend) {
// Run commands
@@ -590,6 +589,7 @@ public class RentRegion extends GeneralRegion {
* Unrent a region, reset to unrented
* @param giveMoneyBack true if money should be given back to the player, false otherwise
* @param executor The CommandSender that should get the cancelled message if there is any, or null
* @return true if unrenting succeeded, othwerwise false
*/
@SuppressWarnings("deprecation")
public boolean unRent(boolean giveMoneyBack, CommandSender executor) {
@@ -663,14 +663,10 @@ public class RentRegion extends GeneralRegion {
handleSchematicEvent(RegionEvent.UNRENTED);
// Send messages
if(!own) {
message(executor, "unrent-other");
} else {
message(executor, "unrent-unrented");
}
message(executor, "unrent-unrented");
// Remove friends, the owner and renteduntil values
clearFriends();
getFriendsFeature().clearFriends();
UUID oldRenter = getRenter();
setRenter(null);
setRentedUntil(null);
@@ -678,7 +674,7 @@ public class RentRegion extends GeneralRegion {
removeLastActiveTime();
// Notify about updates
this.notifyAndUpdate(new UnrentedRegionEvent(this, oldRenter));
this.notifyAndUpdate(new UnrentedRegionEvent(this, oldRenter, Math.max(0, moneyBack)));
// Run commands
this.runEventCommands(RegionEvent.UNRENTED, false);
@@ -1,422 +0,0 @@
package nl.evolutioncoding.areashop.commands;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.regions.BuyRegion;
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.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.*;
public class InfoCommand extends CommandAreaShop {
public InfoCommand(AreaShop plugin) {
super(plugin);
}
@Override
public String getCommandStart() {
return "areashop info";
}
@Override
public String getHelp(CommandSender target) {
if(target.hasPermission("areashop.info")) {
return plugin.getLanguageManager().getLang("help-info");
}
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
*/
private 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, String[] args) {
if(!sender.hasPermission("areashop.info")) {
plugin.message(sender, "info-noPermission");
return;
}
if(args.length > 1 && args[1] != null) {
// Get filter group (only used by some commands)
RegionGroup filterGroup = null;
Set<String> groupFilters = new HashSet<>(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;
}
}
// 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")) {
Set<GeneralRegion> regions = new TreeSet<>();
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isRented()) {
regions.add(region);
}
}
displayMessage(sender, regions, filterGroup, "info-rented", "info-noRented");
}
// Forrent regions
else if(args[1].equalsIgnoreCase("forrent")) {
Set<GeneralRegion> regions = new TreeSet<>();
for(RentRegion region : plugin.getFileManager().getRents()) {
if(!region.isRented()) {
regions.add(region);
}
}
displayMessage(sender, regions, filterGroup, "info-unrented", "info-noUnrented");
}
// Sold regions
else if(args[1].equalsIgnoreCase("sold")) {
Set<GeneralRegion> regions = new TreeSet<>();
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold()) {
regions.add(region);
}
}
displayMessage(sender, regions, filterGroup, "info-sold", "info-noSold");
}
// Forsale regions
else if(args[1].equalsIgnoreCase("forsale")) {
Set<GeneralRegion> regions = new TreeSet<>();
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(!region.isSold()) {
regions.add(region);
}
}
displayMessage(sender, regions, filterGroup, "info-forsale", "info-noForsale");
}
// Player regions
else if(args[1].equalsIgnoreCase("player")) {
if(args.length > 2 && args[2] != null) {
// Rents
Set<GeneralRegion> regions = new TreeSet<>();
for(RentRegion region : plugin.getFileManager().getRents()) {
if(region.isRented() && region.getPlayerName().equalsIgnoreCase(args[2])) {
regions.add(region);
}
}
if(regions.isEmpty()) {
plugin.message(sender, "info-playerNoRents", args[2]);
} else {
plugin.message(sender, "info-playerRents", args[2], StringUtils.join(regions.iterator(), ", "));
}
// Buys
regions = new TreeSet<>();
for(BuyRegion region : plugin.getFileManager().getBuys()) {
if(region.isSold() && region.getPlayerName().equalsIgnoreCase(args[2])) {
regions.add(region);
}
}
if(regions.isEmpty()) {
plugin.message(sender, "info-playerNoBuys", args[2]);
} else {
plugin.message(sender, "info-playerBuys", args[2], StringUtils.join(regions.iterator(), ", "));
}
} else {
plugin.message(sender, "info-playerHelp");
}
}
// Region info
else if(args[1].equalsIgnoreCase("region")) {
if(args.length > 1) {
RentRegion rent = null;
BuyRegion buy = null;
if(args.length > 2) {
rent = plugin.getFileManager().getRent(args[2]);
buy = plugin.getFileManager().getBuy(args[2]);
} else {
if (sender instanceof Player) {
// get the region by location
List<GeneralRegion> regions = Utils.getAllApplicableRegions(((Player) sender).getLocation());
if (regions.isEmpty()) {
plugin.message(sender, "cmd-noRegionsAtLocation");
return;
} else if (regions.size() > 1) {
plugin.message(sender, "cmd-moreRegionsAtLocation");
return;
} else {
if(regions.get(0).isRentRegion()) {
rent = (RentRegion)regions.get(0);
} else if(regions.get(0).isBuyRegion()) {
buy = (BuyRegion)regions.get(0);
}
}
} else {
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
return;
}
}
if(rent == null && buy == null) {
plugin.message(sender, "info-regionNotExisting", args[2]);
return;
}
if(rent != null) {
plugin.message(sender, "info-regionHeaderRent", rent);
if(rent.isRented()) {
plugin.messageNoPrefix(sender, "info-regionRented", rent);
plugin.messageNoPrefix(sender, "info-regionExtending", rent);
plugin.messageNoPrefix(sender, "info-regionMoneyBackRent", rent);
if(!rent.getFriendNames().isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionFriends", rent);
}
} else {
plugin.messageNoPrefix(sender, "info-regionCanBeRented", rent);
}
if(rent.getLandlordName() != null) {
plugin.messageNoPrefix(sender, "info-regionLandlord", rent);
}
if(rent.getMaxExtends() != -1) {
if(rent.getMaxExtends() == 0) {
plugin.messageNoPrefix(sender, "info-regionNoExtending", rent);
} else if(rent.isRented()) {
plugin.messageNoPrefix(sender, "info-regionExtendsLeft", rent);
} else {
plugin.messageNoPrefix(sender, "info-regionMaxExtends", rent);
}
}
if(rent.getMaxRentTime() != -1) {
plugin.messageNoPrefix(sender, "info-regionMaxRentTime", rent);
}
if(rent.getInactiveTimeUntilUnrent() != -1) {
plugin.messageNoPrefix(sender, "info-regionInactiveUnrent", rent);
}
if(sender.hasPermission("areashop.teleport") || sender.hasPermission("areashop.teleportall")) {
Location teleport = rent.getTeleportLocation();
if(teleport == null) {
if(rent.isRented()) {
plugin.messageNoPrefix(sender, "info-regionNoTeleport", rent, plugin.getLanguageManager().getLang("info-regionTeleportHint", rent));
} else {
plugin.messageNoPrefix(sender, "info-regionNoTeleport", rent, "");
}
} else {
plugin.messageNoPrefix(sender, "info-regionTeleportAt", rent, teleport.getWorld().getName(), teleport.getBlockX(), teleport.getBlockY(), teleport.getBlockZ(), (int)teleport.getPitch(), (int)teleport.getYaw());
}
}
List<String> signLocations = new ArrayList<>();
for(Location location : rent.getSignLocations()) {
signLocations.add(plugin.getLanguageManager().getLang("info-regionSignLocation", location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ()));
}
if(!signLocations.isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionSigns", Utils.createCommaSeparatedList(signLocations));
}
if(sender.hasPermission("areashop.groupinfo") && !rent.getGroupNames().isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionGroups", Utils.createCommaSeparatedList(rent.getGroupNames()));
}
if(rent.isRestoreEnabled()) {
if(sender.hasPermission("areashop.setrestore")) {
plugin.messageNoPrefix(sender, "info-regionRestoringRent", rent, plugin.getLanguageManager().getLang("info-regionRestoringProfile", rent.getRestoreProfile()));
} else {
plugin.messageNoPrefix(sender, "info-regionRestoringRent", rent, "");
}
}
if(!rent.isRented()) {
if(rent.restrictedToRegion()) {
plugin.messageNoPrefix(sender, "info-regionRestrictedRegionRent", rent);
} else if(rent.restrictedToWorld()) {
plugin.messageNoPrefix(sender, "info-regionRestrictedWorldRent", rent);
}
}
plugin.messageNoPrefix(sender, "info-regionFooterRent", rent);
} else if(buy != null) {
plugin.message(sender, "info-regionHeaderBuy", buy);
if(buy.isSold()) {
if(buy.isInResellingMode()) {
plugin.messageNoPrefix(sender, "info-regionReselling", buy);
plugin.messageNoPrefix(sender, "info-regionReselPrice", buy);
} else {
plugin.messageNoPrefix(sender, "info-regionBought", buy);
}
plugin.messageNoPrefix(sender, "info-regionMoneyBackBuy", buy);
if(!buy.getFriendNames().isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionFriends", buy);
}
} else {
plugin.messageNoPrefix(sender, "info-regionCanBeBought", buy);
}
if(buy.getLandlord() != null) {
plugin.messageNoPrefix(sender, "info-regionLandlord", buy);
}
if(buy.getInactiveTimeUntilSell() != -1) {
plugin.messageNoPrefix(sender, "info-regionInactiveSell", buy);
}
if(sender.hasPermission("areashop.teleport") || sender.hasPermission("areashop.teleportall")) {
Location teleport = buy.getTeleportLocation();
if(teleport == null) {
if(buy.isSold()) {
plugin.messageNoPrefix(sender, "info-regionNoTeleport", buy, plugin.getLanguageManager().getLang("info-regionTeleportHint", buy));
} else {
plugin.messageNoPrefix(sender, "info-regionNoTeleport", buy, "");
}
} else {
plugin.messageNoPrefix(sender, "info-regionTeleportAt", buy, teleport.getWorld().getName(), teleport.getBlockX(), teleport.getBlockY(), teleport.getBlockZ(), (int)teleport.getPitch(), (int)teleport.getYaw());
}
}
List<String> signLocations = new ArrayList<>();
for(Location location : buy.getSignLocations()) {
signLocations.add(plugin.getLanguageManager().getLang("info-regionSignLocation", location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ()));
}
if(!signLocations.isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionSigns", Utils.createCommaSeparatedList(signLocations));
}
if(sender.hasPermission("areashop.groupinfo") && !buy.getGroupNames().isEmpty()) {
plugin.messageNoPrefix(sender, "info-regionGroups", Utils.createCommaSeparatedList(buy.getGroupNames()));
}
if(buy.isRestoreEnabled()) {
if(sender.hasPermission("areashop.setrestore")) {
plugin.messageNoPrefix(sender, "info-regionRestoringBuy", buy, plugin.getLanguageManager().getLang("info-regionRestoringProfile", buy.getRestoreProfile()));
} else {
plugin.messageNoPrefix(sender, "info-regionRestoringBuy", buy, "");
}
}
if(!buy.isSold()) {
if(buy.restrictedToRegion()) {
plugin.messageNoPrefix(sender, "info-regionRestrictedRegionBuy", buy);
} else if(buy.restrictedToWorld()) {
plugin.messageNoPrefix(sender, "info-regionRestrictedWorldBuy", buy);
}
}
plugin.messageNoPrefix(sender, "info-regionFooterBuy", buy);
}
} else {
plugin.message(sender, "info-regionHelp");
}
}
// List of regions without a group
else if(args[1].equalsIgnoreCase("nogroup")) {
// Rental regions
Set<String> rents = new TreeSet<>(plugin.getFileManager().getRentNames());
for(RegionGroup group : plugin.getFileManager().getGroups()) {
rents.removeAll(group.getMembers());
}
String message = StringUtils.join(rents, ", ");
if(message.equals("")) {
plugin.message(sender, "info-nogroupNoRents");
} else {
plugin.message(sender, "info-nogroupRents", message);
}
// Buy regions
Set<String> buys = new TreeSet<>(plugin.getFileManager().getBuyNames());
for(RegionGroup group : plugin.getFileManager().getGroups()) {
buys.removeAll(group.getMembers());
}
message = StringUtils.join(buys, ", ");
if(message.equals("")) {
plugin.message(sender, "info-nogroupNoBuys");
} else {
plugin.message(sender, "info-nogroupBuys", message);
}
} else {
plugin.message(sender, "info-help");
}
} else {
plugin.message(sender, "info-help");
}
}
/**
* Create a comma-space separated list from a collection of strings
* @param list The collection with strings
* @return A comma-space separated list of the strings in the collection
*/
public String createCommaString(Collection<String> list) {
String result = "";
boolean first = true;
for(String part : list) {
if(first) {
result += part;
first = false;
} else {
result += ", " + part;
}
}
return result;
}
@Override
public List<String> getTabCompleteList(int toComplete, String[] start, CommandSender sender) {
List<String> result = new ArrayList<>();
if(toComplete == 2) {
result.addAll(Arrays.asList("all", "rented", "forrent", "sold", "forsale", "player", "region", "nogroup"));
} else if(toComplete == 3) {
if(start[2].equalsIgnoreCase("player")) {
for(Player player : Utils.getOnlinePlayers()) {
result.add(player.getName());
}
} else if(start[2].equalsIgnoreCase("region")) {
result.addAll(plugin.getFileManager().getBuyNames());
result.addAll(plugin.getFileManager().getRentNames());
}
}
return result;
}
}
@@ -1,12 +0,0 @@
package nl.evolutioncoding.areashop.features;
import nl.evolutioncoding.areashop.AreaShop;
public class Feature {
AreaShop plugin;
public Feature(AreaShop plugin) {
this.plugin = plugin;
}
}
@@ -1,126 +0,0 @@
package nl.evolutioncoding.areashop.features;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.Utils;
import nl.evolutioncoding.areashop.events.notify.RegionUpdateEvent;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Sign;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import java.util.Set;
public class SignDisplayFeature extends Feature implements Listener {
public SignDisplayFeature(AreaShop plugin) {
super(plugin);
}
@EventHandler
public void regionUpdate(RegionUpdateEvent event) {
updateSigns(event.getRegion());
}
/**
* Update the signs connected to this region
* @return true if the update was successful, otherwise false
*/
public boolean updateSigns(GeneralRegion region) {
if(region.isDeleted()) {
return false;
}
YamlConfiguration config = region.getConfig();
boolean result = true;
Set<String> signs = null;
if(config.getConfigurationSection("general.signs") != null) {
signs = config.getConfigurationSection("general.signs").getKeys(false);
}
if(signs == null) {
return true;
}
for(String sign : signs) {
Location location = Utils.configToLocation(config.getConfigurationSection("general.signs." + sign + ".location"));
if(location == null) {
AreaShop.debug("Sign location incorrect region=" + region.getName() + ", signKey=" + sign);
result = false;
} else {
// Get the profile set in the config
String profile = config.getString("general.signs." + sign + ".profile");
if(profile == null || profile.length() == 0) {
profile = region.getStringSetting("general.signProfile");
}
// Get the prefix
String prefix = "signProfiles." + profile + "." + region.getState().getValue().toLowerCase() + ".";
// Get the lines
String[] signLines = new String[4];
signLines[0] = plugin.getConfig().getString(prefix + "line1");
signLines[1] = plugin.getConfig().getString(prefix + "line2");
signLines[2] = plugin.getConfig().getString(prefix + "line3");
signLines[3] = plugin.getConfig().getString(prefix + "line4");
// Check if the sign should be present
Block block = location.getBlock();
if(!plugin.getConfig().isSet(prefix)
|| ((signLines[0] == null || signLines[0].length() == 0)
&& (signLines[1] == null || signLines[1].length() == 0)
&& (signLines[2] == null || signLines[2].length() == 0)
&& (signLines[3] == null || signLines[3].length() == 0))) {
block.setType(Material.AIR);
} else {
Sign signState = null;
if(block.getType() != Material.WALL_SIGN && block.getType() != Material.SIGN_POST) {
Material signType;
try {
signType = Material.valueOf(config.getString("general.signs." + sign + ".signType"));
} catch(NullPointerException | IllegalArgumentException e) {
signType = null;
}
if(signType != Material.WALL_SIGN && signType != Material.SIGN_POST) {
AreaShop.debug(" setting sign failed");
continue;
}
block.setType(signType);
signState = (Sign)block.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)signState.getData();
BlockFace signFace;
try {
signFace = BlockFace.valueOf(config.getString("general.signs." + sign + ".facing"));
} catch(NullPointerException | IllegalArgumentException e) {
signFace = null;
}
if(signFace != null) {
signData.setFacingDirection(signFace);
signState.setData(signData);
}
}
if(signState == null) {
signState = (Sign)block.getState();
}
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)signState.getData();
if(!config.isString("general.signs." + sign + ".signType")) {
region.setSetting("general.signs." + sign + ".signType", signState.getType().toString());
}
if(!config.isString("general.signs." + sign + ".facing")) {
region.setSetting("general.signs." + sign + ".facing", signData.getFacing().toString());
}
// Apply replacements and color and then set it on the sign
for(int i = 0; i < signLines.length; i++) {
if(signLines[i] == null) {
signState.setLine(i, "");
continue;
}
signLines[i] = region.applyAllReplacements(signLines[i]);
signLines[i] = Utils.applyColors(signLines[i]);
signState.setLine(i, signLines[i]);
}
signState.update();
}
}
}
return result;
}
}
@@ -1,199 +0,0 @@
package nl.evolutioncoding.areashop.managers;
import com.google.common.base.Charsets;
import nl.evolutioncoding.areashop.AreaShop;
import nl.evolutioncoding.areashop.regions.GeneralRegion;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public class LanguageManager {
private AreaShop plugin = null;
private String languages[] = {"EN", "NL", "DE", "CS", "FR", "FI", "PL"};
private HashMap<String, String> currentLanguage, defaultLanguage;
/**
* Constructor
* @param plugin The AreaShop plugin
*/
public LanguageManager(AreaShop plugin) {
this.plugin = plugin;
startup();
}
/**
* Save the default language files and open the current and backup language file
*/
public void startup() {
this.saveDefaults();
this.loadLanguage();
}
/**
* Saves the default language files if not already present
*/
public void saveDefaults() {
// Create the language folder if it not exists
File langFolder;
langFolder = new File(plugin.getDataFolder() + File.separator + AreaShop.languageFolder);
if(!langFolder.exists()) {
if(!langFolder.mkdirs()) {
plugin.getLogger().warning("Could not create language directory: " + langFolder.getAbsolutePath());
return;
}
}
// Create the language files, overwrites if a file already exists
// Overriding is necessary because otherwise with an update the new lang
// files would not be used, when translating your own use another
// file name as the default
File langFile;
for(String language : languages) {
langFile = new File(plugin.getDataFolder() + File.separator + AreaShop.languageFolder + File.separator + language + ".yml");
try(
InputStream input = plugin.getResource(AreaShop.languageFolder + "/" + language + ".yml");
OutputStream output = new FileOutputStream(langFile)
) {
if(input == null) {
plugin.getLogger().warning("Could not save default language to the '" + AreaShop.languageFolder + "' folder: " + language + ".yml");
continue;
}
int read;
byte[] bytes = new byte[1024];
while ((read = input.read(bytes)) != -1) {
output.write(bytes, 0, read);
}
input.close();
output.close();
} catch(IOException e) {
plugin.getLogger().warning("Something went wrong saving a default language file: " + langFile.getPath());
}
}
}
/**
* Loads the current language file specified in the config
*/
public void loadLanguage() {
Map<String, Object> map;
Set<String> set;
YamlConfiguration ymlFile;
// Save the current language file to the HashMap
currentLanguage = new HashMap<>();
File file = new File(plugin.getDataFolder() + File.separator + AreaShop.languageFolder + File.separator + plugin.getConfig().getString("language") + ".yml");
try(
InputStreamReader reader = new InputStreamReader(new FileInputStream(file), Charsets.UTF_8)
) {
ymlFile = YamlConfiguration.loadConfiguration(reader);
map = ymlFile.getValues(true);
set = map.keySet();
for(String key : set) {
if(map.get(key) instanceof String) {
currentLanguage.put(key, (String)map.get(key));
}
}
} catch(IOException e) {
plugin.getLogger().warning("Could not load set language file: " + file.getAbsolutePath());
}
// Save the default strings to the HashMap
defaultLanguage = new HashMap<>();
File standard = new File(plugin.getDataFolder() + File.separator + AreaShop.languageFolder + "/" + languages[0]+ ".yml");
try(
InputStreamReader reader = new InputStreamReader(new FileInputStream(standard), Charsets.UTF_8)
) {
ymlFile = YamlConfiguration.loadConfiguration(reader);
map = ymlFile.getValues(true);
set = map.keySet();
for(String key : set) {
if(map.get(key) instanceof String) {
defaultLanguage.put(key, (String)map.get(key));
}
}
} catch(IOException e) {
plugin.getLogger().warning("Could not load default language file: " + file.getAbsolutePath());
}
}
/**
* Function to get the string in the language that has been set
* @param key Key to the language string
* @param params The replacements for the %1% tags
* @return String The language string specified with the key
*/
public String getLang(String key, Object... params) {
String result;
// Get the language string
if(currentLanguage.containsKey(key)) {
result = currentLanguage.get(key);
} else {
result = defaultLanguage.get(key);
}
if(result == null) {
plugin.getLogger().info("Wrong key for getting translation: " + key + ", please contact the author about this");
} else {
// Replace all tags like %0% and if given a GeneralRegion apply all replacements
int number=0;
for(Object param : params) {
if(param != null) {
if(param instanceof GeneralRegion) {
result = ((GeneralRegion)param).applyAllReplacements(result);
} else {
result = result.replace("%" + number + "%", param.toString());
number++;
}
}
}
}
return result;
}
}
+112 -141
View File
@@ -7,7 +7,12 @@
# │ GENERAL: Options that influence the global state of the plugin │
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
## Chatprefix used for all messages in the chat, also changes the greeting messages.
chatPrefix: '&2[AreaShop]&r '
chatPrefix:
- '[darkgreen][AreaShop][reset]'
- ' hover: AreaShop region management plugin'
- ' hover: %lang:action|Click to check the available commands|%'
- ' command: /areashop help'
- ' '
## The language file that should be used, check the 'lang' folder for build-in languages (use the filename without .yml here).
## More information can be found here: https://github.com/NLthijs48/AreaShop/wiki/Language-support.
language: EN
@@ -27,7 +32,7 @@ signTags:
moneyCharacter: '$'
## The characters displayed after a price.
moneyCharacterAfter: ''
## How many numbers behind the dot should be shown (2 will make numbers like '8.55', '9.01', '5,20').
## How many numbers behind the dot should be shown (2 will make numbers like '8.55', '9.01', '5.20').
fractionalNumbers: 2
## Set this to true if you want to hide '.0' for a number like '15.0' ('4.50' will still stay '4.50').
hideEmptyFractionalPart: true
@@ -55,9 +60,6 @@ days: [d, day, days]
weeks: [w, week, weeks]
months: [M, month, months]
years: [y, year, years]
## Allow or disallow extending a rental region when the player is above his limits enforced by the 'limitGroups' section below.
## false will ensure a player will eventually lose his region when he has no access anymore.
allowRegionExtendsWhenAboveLimits: false
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
@@ -66,10 +68,9 @@ allowRegionExtendsWhenAboveLimits: false
## Configure the max total regions, max rent regions and max buy regions with different groups (-1 is unlimited).
## Assign a group to players by giving them the permission 'areashop.limits.<group>'.
## Every player already has the group 'default', OPs bypass the limits because of the 'areashop.limitbypass' permission.
## All the groups applied to the player will be checked and only if they all allow an extra region it will be permitted.
## Add a 'worlds' or 'groups' list to a group to only count regions from those worlds and/or groups.
## Give players permissions globally and not world specific! This ensures renting/buying while in another world works correctly.
## More information can be found here: https://github.com/NLthijs48/AreaShop/wiki/Limitgroups-information-and-examples.
## All the groups applied to the player will be checked and only if they all allow an extra region it will be allowed.
## More information like limits for regions of a certain group or in a certain word can be found here:
## https://github.com/NLthijs48/AreaShop/wiki/Limitgroups-information-and-examples.
limitGroups:
default:
total: 1
@@ -80,56 +81,17 @@ limitGroups:
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
# │ PROFILES: Assigned in general (default.yml), for a group (groups.yml) or individually (<region>.yml) │
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
## The idea of profiles is that you can make different variations of them, and then assign the different variations to different
## subsects of regions (by assigning a profile to a region group, or an individual region).
## Below is a list of tags that can be used in all settings of profiles.
## If a tag has no value (for example %player% when the region is not rented/bought) then the tag will not get replaced.
## %region% The region name (with correct capitalization).
## %player% The name of the player that rents/buys the region (with correct capitalization).
## %uuid% The UUID of the player that rents/buys the region.
## %friends% The names of friends added to this region separated by ', '.
## %friendsuuid% The UUID's of friends added to this region separated by ', '.
## $landlord$ The name of the landlord.
## %landlorduuid% The UUID of the landlord.
## %price% The price of the region formatted with the configured characters before and after the number.
## %rawprice% The price without formatting, like '10.0' or '7.77'.
## %duration% The duration of a rent region, for example '1 d', '4 minutes' or '2 years'.
## %world% The name of the world that the region is in.
## %type% The type of the region, 'rent' or 'buy'.
## %until% The end time of a rent formatted as configured with 'timeFormatChat'.
## %untilshort% The end time of a rent formatted as configured with 'timeFormatSign'.
## %width% The width of the region (amount of blocks on the x-axis).
## %depth% The depth of the region (amount of blocks on the z-axis).
## %height% The height of the region (amount of blocks on the y-axis).
## %timeleft% The time left on the rent (uses the unit of time that fits best, minutes used from 121 seconds till 120 minutes).
## %clicker% The name of the player that clicked the sign (only to be used in the signProfiles section).
## %resellprice% The price of a region when it is in resell mode.
## %rawresellprice% The resellprice without formatting, like '10.0' or '7.77'.
## %moneyback% The amount of money the player will get back when unrenting/selling the region (formatted with currency layout).
## %rawmoneyback% The moneyback without formatting, like '10.0' or '7.77'.
## %moneybackpercent% The percentage of the price the player will get back when unrenting the region.
## %maxextends% The maximum number of extends a player can do on the region.
## %extendsleft% The number of extends that are left (maxextends - timesextended).
## %maxrenttime% The maximum time you can rent a region in advance (human readable).
## %inactivetime% The maximum time a player may be inactive before unrent/sell (human readable).
## %year% The current year.
## %month% The current month in the year.
## %day% The current day in the month.
## %hour% The current hour in the day (0-23).
## %minute% The current minute of the hour.
## %second% The current second of the minute.
## %millisecond% The current millisecond of the second.
## %epoch% The number of milliseconds since January 1, 1970 (Unix Epoch).
## The idea of profiles is that you can make different variations of them, and then assign the different variations to
## subsets of regions (by assigning a profile to a region group, or an individual region).
## Determines the layout and functions of the signs linked to regions.
## Set 'general.signProfile' in default.yml, groups or individual regions to set the profile.
## The following sections can be added for performing certain commands when the sign is clicked:
## rightClickPlayer, rightClickConsole, shiftRightClickPlayer, shiftRightClickConsole,
## leftClickPlayer, leftClickConsole, shiftLeftClickPlayer, shiftLeftClickConsole.
## Sections with 'Player' at the end will be run by the player that clicks the sign and 'Console' ones from the console.
signProfiles:
default:
## The following sections can be added for performing certain commands when the sign is clicked:
## rightClickPlayer, rightClickConsole, shiftRightClickPlayer, shiftRightClickConsole,
## leftClickPlayer, leftClickConsole, shiftLeftClickPlayer, shiftLeftClickConsole.
## Sections with 'Player' at the end will be run by the player that clicks the sign and 'Console' ones from the console.
forrent:
line1: '&2&l[For Rent]'
line2: '%region%'
@@ -137,6 +99,7 @@ signProfiles:
line4: '%price%'
rightClickPlayer:
- 'areashop rent %region%'
#- 'areashop message %clicker% %lang:confirm-rent|%region%|%' # Alternative to first ask for confirmation
leftClickPlayer:
- 'areashop info region %region%'
rented:
@@ -146,10 +109,11 @@ signProfiles:
line4: '%untilshort%'
rightClickPlayer:
- 'areashop rent %region%'
#- 'areashop message %clicker% %lang:confirm-extend|%region%|%' # Alternative to first ask for confirmation
leftClickPlayer:
- 'areashop info region %region%'
shiftRightClickPlayer:
- 'areashop unrent %region%'
- 'areashop message %clicker% %lang:confirm-unrent|%region%|%'
forsale:
line1: '&2&l[For Sale]'
line2: '%region%'
@@ -157,6 +121,7 @@ signProfiles:
line4:
rightClickPlayer:
- 'areashop buy %region%'
#- 'areashop message %clicker% %lang:confirm-buy|%region%|%' # Alternative to first ask for confirmation
leftClickPlayer:
- 'areashop info region %region%'
resell:
@@ -166,6 +131,7 @@ signProfiles:
line4: '&8%player%'
rightClickPlayer:
- 'areashop buy %region%'
#- 'areashop message %clicker% %lang:confirm-buy|%region%|%' # Alternative to first ask for confirmation
leftClickPlayer:
- 'areashop info region %region%'
shiftRightClickPlayer:
@@ -180,12 +146,41 @@ signProfiles:
leftClickPlayer:
- 'areashop info region %region%'
shiftRightClickPlayer:
- 'areashop sell %region%'
## Option to run certain commands when a region event happens.
- 'areashop message %clicker% %lang:confirm-sell|%region%|%'
## Flag profiles specify which flags to set on the WorldGuard regions depending on their state.
## All normal region flags as present in WorldGuard can be used, and also members, owners, priority and parent.
## The members and owners flag normally take a list of UUID's separated by a comma, adding by name is possible with 'n:<name>'.
## You can add groups by using 'g:<groupname>', so an example woul be: '%uuid%, %friendsuuid%, g:vip, n:coolGuy'.
## For allow/deny flags like 'entry' and 'exit' you can set the group setting by using 'g:<scope>', <scope> is one of the following:
## members, non_members, owners, non_owners, all. Example, only members can enter the region:
## entry: 'deny g:non_members'
## '' will remove the flag from the region.
flagProfiles:
default:
ALL: # Flags to apply for all states
priority: 10
members: ''
interact: 'deny g:non_members' # Only allow region members/owners to use things in the region (chests, furnace, animals, etc.)
forrent:
greeting: '%lang:prefix%%lang:greeting-forrent%'
rented:
members: '%uuid%, %friendsuuid%'
greeting: '%lang:prefix%%lang:greeting-rented%'
forsale:
greeting: '%lang:prefix%%lang:greeting-forsale%'
sold:
members: '%uuid%, %friendsuuid%'
greeting: '%lang:prefix%%lang:greeting-bought%'
resale:
members: '%uuid%, %friendsuuid%'
greeting: '%lang:prefix%%lang:greeting-resale%'
## Run commands when an event happens.
## Commands at a 'before' section will execute before the region details are changed in the AreaShop system
## and before any other actions occurred (setting the owner, saving/loading schematics, etc.),
## the 'after' commands will be run when all changes are done.
## After 'before' or 'after' you can add a list of commands (see example at the created event).
## You can add a list of commands to 'before' and 'after'.
eventCommandProfiles:
default:
created:
@@ -213,10 +208,10 @@ eventCommandProfiles:
resell:
before:
after:
## For the following events you can specify if you want to restore or save the region to a schematic.
## After 'save:' or 'restore:' you enter the name of the file to restore from/to.
## If you want your regions all looking the same then you can leave out the %region% part to use the same schematic for all.
## The limit 'maximumBlocks' applies to restoring/saving schematics, be sure your regions are below the limit.
## The limit 'maximumBlocks' applies to restoring/saving schematics, be sure your region size is below the limit.
## More information can be found here: https://github.com/NLthijs48/AreaShop/wiki/Region-blocks-save-restore.
schematicProfiles:
default:
@@ -241,44 +236,8 @@ schematicProfiles:
resell:
save: ''
restore: ''
## Flag profiles to specify which flags should be set on the WorldGuard regions when the region is in a certain state.
## All normal region flags as present in WorldGuard can be used, and also members, owners, priority and parent.
## Each line represents a WorldGuard setting that should be set to a certain value when the region is in the specified state.
## The members and owners flag normally take a list of UUID's separated by 'comma space', adding by name is possible with 'n:<name>'.
## You can add groups by using 'g:<groupname>', so in total you could use: '%uuid%, %friendsuuid%, g:vip, n:coolGuy'.
## For flags like 'entry' and 'exit' you can add group setting by using 'g:<scope>' behind it, <scope> is one of the following:
## members, non_members, owners, non_owners, all. Example, only members can enter the region:
## entry: 'deny g:non_members'
## Use '' for a flag to reset it.
flagProfiles:
default:
forrent:
priority: 10 # Set region priority higher than default regions (it must be higher than other regions at the same place)
members: '' # Remove all members.
greeting: '%lang:prefix%%lang:greeting-forrent%'
rented:
priority: 10
members: '%uuid%, %friendsuuid%' # Add the renter and added friends as region members.
greeting: '%lang:prefix%%lang:greeting-rented%'
interact: 'deny g:non_members' # Only allow region members/owners to use things in the region (chests, crafting bench, etc)
build: 'deny g:non_members' # Only allow region members/owners to build (change to 'deny' to disallow building)
forsale:
priority: 10
members: ''
greeting: '%lang:prefix%%lang:greeting-forsale%'
sold:
priority: 10
members: '%uuid%, %friendsuuid%'
greeting: '%lang:prefix%%lang:greeting-bought%'
interact: 'deny g:non_members'
build: 'deny g:non_members'
resale:
priority: 10
members: '%uuid%, %friendsuuid%'
greeting: '%lang:prefix%%lang:greeting-resale%'
interact: 'deny g:non_members'
build: 'deny g:non_members'
## Profiles that specify when players should get messages about their rental region that almost runs out.
## Profiles that specify what happens when their rental region almost runs out.
## Time identifiers specify how much time before the rent is actually over the player should be notified.
## When warnPlayer is set to true a message will be send that is specified in the language file.
## All commands in the list below 'commands:' will execute together with the warning, all normal variables can be used.
@@ -305,7 +264,7 @@ expirationWarningProfiles:
## The '\d' represents the numerical digits 0-9, the + symbol represents 1 or more times repeated.
## This means it would also block 'house_123' and 'house_000456'. It will not block 'ahouse_1' or 'house_'.
blacklist:
- '__global__' # Would give access to the complete world, and is therefore not a good idea to ever add.
- '__global__'
## Minimum length of the numbers that are suffixed for region names generated by the '/as stack' command.
## When having this at 3 it will generate names like this: 'region-001', 'region-014', 'region-4567'.
stackRegionNumberLength: 3
@@ -319,8 +278,8 @@ sendStats: true
checkForUpdates: true
## Use colors when sending messages to console and log files.
useColorsInConsole: false
## Post error messages in the console when a command run from the config fails (from the 'runCommands' section for example).
postCommandErrors: true
## Use tellraw style messages
useFancyMessages: true
## Update all region flags and signs after starting the plugin (uses the 'regionsPerTick' setting from the 'update' section).
## This ensures that changes to the config are directly visible after restarting the server.
updateRegionsOnStartup: true
@@ -328,48 +287,60 @@ updateRegionsOnStartup: true
debug: false
## Version of the config, do not change!
version: ${project.version}
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
# │ LIMITS AND TIMINGS: Options for limits and the frequencies for certain functions (be very careful with these!). │
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
## Maximum number of blocks to save to or restore from a .schemetic.
## Maximum number of blocks to save to or restore from a .schemetic file.
maximumBlocks: 1000000
## Maximum number of locations the teleport function should check to find a safe spot.
maximumTries: 50000
## Setting the 'delay' setting to 0 or lower will prevent the taks from runnning, if you don't use a certain feature you
## could switch the task off this way.
## The 'delay' settings are specified using a number followed by one of the identifiers as defined above in the config.
## The 'regionsPerTick' settings are to configure how fast something goes, lower value is less lag, but slower updates.
## There are 20 ticks in 1 second, so if you set 'regionPerTick' to 5, then 5*20=100 regions per second will be updated.
## Timings for saving files that need saving.
saving:
delay: '10 minutes'
regionsPerTick: 1
## Timings for rent expiration checking.
expiration:
delay: '59 seconds'
regionsPerTick: 5
## Timings for expiration warning to online players.
expireWarning:
delay: '5 minutes'
regionsPerTick: 5
## Timings for updating signs and region flags ('/as reload' or after '/as groupadd' or '/as groupdel').
update:
regionsPerTick: 5
## Time between checking if any regions need to be unrented because the player was not online for the specified time period.
inactive:
delay: '15 minutes'
regionsPerTick: 5
## Timings for the periodic updating of signs (for timeleft tags etc).
signs:
delay: '60 seconds'
regionsPerTick: 3
## Number of regions per tick to check when a player joins to see if his name changed for regions he owned (updates the regions when changed).
nameupdate:
regionsPerTick: 10
## Timings for adding regions to AreaShop ('/as stack').
adding:
regionsPerTick: 2
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
# │ VARIABLES: Variables that can be used in messages and settings where a region is available. │
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
## If a tag has no value (for example %player% when the region is not rented/bought) then the tag will not get replaced.
## %region% The region name (with correct capitalization).
## %player% The name of the player that rents/buys the region (with correct capitalization).
## %uuid% The UUID of the player that rents/buys the region.
## %friends% The names of friends added to this region separated by ', '.
## %friendsuuid% The UUID's of friends added to this region separated by ', '.
## $landlord$ The name of the landlord.
## %landlorduuid% The UUID of the landlord.
## %price% The price of the region formatted with the configured characters before and after the number.
## %rawprice% The price without formatting, like '10.0' or '7.77'.
## %duration% The duration of a rent region, for example '1 d', '4 minutes' or '2 years'.
## %world% The name of the world that the region is in.
## %type% The type of the region, 'rent' or 'buy'.
## %until% The end time of a rent formatted as configured with 'timeFormatChat'.
## %untilshort% The end time of a rent formatted as configured with 'timeFormatSign'.
## %width% The width of the region (number of blocks on the x-axis).
## %depth% The depth of the region (number of blocks on the z-axis).
## %height% The height of the region (number of blocks on the y-axis).
## %timeleft% The time left on the rent (uses the unit of time that fits best, minutes used from 121 seconds till 120 minutes).
## %clicker% The name of the player that clicked the sign (only to be used in the signProfiles section).
## %resellprice% The price of a region when it is in resell mode.
## %rawresellprice% The resellprice without formatting.
## %moneyback% The amount of money the player will get back when unrenting/selling the region (formatted with currency layout).
## %rawmoneyback% The moneyback without formatting.
## %moneybackpercent% The percentage of the price the player will get back when unrenting the region.
## %maxextends% The maximum number of extends a player can do on the region.
## %extendsleft% The number of extends that are left (maxextends - timesextended).
## %maxrenttime% The maximum time you can rent a region in advance (human readable).
## %inactivetime% The maximum time a player may be inactive before unrent/sell (human readable).
## %year% The current year.
## %month% The current month in the year.
## %day% The current day in the month.
## %hour% The current hour in the day (0-23).
## %minute% The current minute of the hour.
## %second% The current second of the minute.
## %millisecond% The current millisecond of the second.
## %epoch% The number of milliseconds since January 1, 1970 (Unix Epoch).
## %tpx% The exact x coordinate of the location that the teleport is set to
## %tpy% The exact y coordinate of the location that the teleport is set to
## %tpz% The exact z coordinate of the location that the teleport is set to
## %tpblockx% The rounded x coordinate of the location that the teleport is set to
## %tpblocky% The rounded y coordinate of the location that the teleport is set to
## %tpblockz% The rounded z coordinate of the location that the teleport is set to
## %tppitch% The exact pitch of the teleport location
## %tppitchround% The rounded pitch of the teleport location
## %tpyaw% The exact yaw of the teleport location
## %tpyawround% The rounded yaw of the teleport location
## %tpworld% The world name of the teleport location
@@ -0,0 +1,50 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ hiddenConfig.yml file of the AreaShop plugin created by NLThijs48. ║
# ║ Options in this file are available in config.yml, but are not shown by default there. ║
# ║ The options in these file are either very advanced, or not useful for the majority of users. ║
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
# │ TIMERS: Settings to define how often scheduled tasks run. │
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
## Setting the 'delay' setting to 0 or lower will prevent the taks from runnning.
## The 'delay' settings are specified using a number followed by one of the identifiers as defined in config.yml.
## The 'regionsPerTick' settings are to configure how fast something goes, lower value is less lag, but slower updates.
## There are 20 ticks in 1 second, so if you set 'regionPerTick' to 5, then 5*20=100 regions per second will be updated.
## Timings for saving files that need saving.
saving:
delay: '10 minutes'
regionsPerTick: 1
## Timings for rent expiration checking.
expiration:
delay: '59 seconds'
regionsPerTick: 5
## Timings for expiration warning to online players.
expireWarning:
delay: '5 minutes'
regionsPerTick: 5
## Timings for updating signs and region flags ('/as reload' or after '/as groupadd' or '/as groupdel').
update:
regionsPerTick: 5
## Time between checking if any regions need to be unrented because the player was not online for the specified time period.
inactive:
delay: '15 minutes'
regionsPerTick: 5
## Timings for the periodic updating of signs (for timeleft tags etc).
signs:
delay: '60 seconds'
regionsPerTick: 3
## Number of regions per tick to check when a player joins to see if his name changed for regions he owned (updates the regions when changed).
nameupdate:
regionsPerTick: 10
## Timings for adding regions to AreaShop ('/as stack').
adding:
regionsPerTick: 2
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
# │ OTHER: All other settings. │
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
## Allow or disallow extending a rental region when the player is above his limits enforced by the 'limitGroups' section below.
## false will ensure a player will eventually lose his region when he has no access anymore.
allowRegionExtendsWhenAboveLimits: false
-381
View File
@@ -1,381 +0,0 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: Czech, Version: V2.2.2, Percentage translated: 86% ║
# ║ 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) ║
# ║ 3: Change the 'language' setting in config.yml to '<servername>', do not include '.yml' ║
# ║ 4: Change the strings in the new file to your liking and save the file ║
# ║ 5: Use '/as reload' or reload/restart your server to see the changes ║
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
total-maximum: "Nemuzes pronajmout nebo koupit vice pozemku nez %0%."
general-notReady: "AreaShop neni plne nacten, pockej prosim."
general-noEconomy: "Plugin pro rizeni ekonomiky nenalezen, kontaktuj prosim A-Team."
cmd-notValid: "Prikaz neni definovan. Napis '/as help' pro napovedu."
cmd-onlyByPlayer: "Nelze spustit z konzole."
cmd-weOnlyByPlayer: "Pouziti vyberu s WorldEdit je jen pro hrace, specifikuj nazev pozemku (regionu)."
cmd-noSelection: "Zadny vyber pomoci WorldEdit."
cmd-noRegionsFound: "Neregistrovane pozemky v AreaShop byly nalezeny v Tvem vyberu."
cmd-noWERegionsFound: "Zadny pozemek (region) nesouhlasi s vyberem."
cmd-notRegistered: "Zadany pozemek neni registrovany: %0%."
cmd-noRegionsAtLocation: "V tve pozici neni zadny pozemek (region), specifikuj ho."
cmd-moreRegionsAtLocation: "Nalezeno vicero pozemku, urci ktery chces pouzit."
cmd-automaticRegionOnlyByPlayer: "Automaticke urcovani oblasti jen pro hrace, urci jej rucne."
help-header: "Napoveda, prikazy ktere muzes pouzivat."
help-alias: "Aliasy: /areashop, /as."
help-help: "&6/as help &7-&r Zobrazi tuto napovedu."
help-info: "&6/as info &7-&r Zjisti info aktualniho pozemku."
help-rent: "&6/as rent &7-&r Pronajme pozemek nebo prodlouzi pronajem."
help-buy: "&6/as buy &7-&r Koupe pozemku."
help-unrent: "&6/as unrent &7-&r Zrusi pronajem pozemku."
help-unrentOwn: "&6/as unrent &7-&r Zrusi pronajem Tveho pozemku."
help-sell: "&6/as sell &7-&r Proda pozemek."
help-sellOwn: "&6/as sell &7-&r Proda Tvuj pozemek."
help-reload: "&6/as reload &7-&r Reload vsech nastaveni a update pozemku."
help-setrestore: "&6/as setrestore &7-&r Nastaveni obnovy pozemku (on/off) a volba profilu."
help-setprice: "&6/as setprice &7-&r Zmena zakladni ceny pozemku."
help-setduration: "&6/as setduration &7-&r Zmena zakladni doby pronajmu pozemku."
help-teleport: "&6/as tp &7-&r Teleport k Tvemu pozemku."
help-teleportAll: "&6/as tp &7-&r Teleport k pozemkum."
help-setteleport: "&6/as settp &7-&r Nastaveni pozice pro teleport k pozemku."
help-setteleportAll: "&6/as settp &7-&r Nastaveni pozice pro teleport k pozemku."
help-find: "&6/as find &7-&r Najde dostupny pronajem / prodej pozemku."
help-groupadd: "&6/as groupadd &7-&r Prida pozemek do skupiny."
help-groupdel: "&6/as groupdel &7-&r Odstrani pozemek ze skupiny."
help-grouplist: "&6/as grouplist &7-&r Zobrazi vsechny registrovane skupiny."
help-groupinfo: "&6/as groupinfo &7-&r Zobrazi info o skupine."
help-schemevent: "&6/as schemevent &7-&r Triggeruje eventy schema regionu."
help-add: "&6/as add &7-&r Registruje (prida) pozemek k pronajmu / prodeji."
help-del: "&6/as del &7-&r Odstrani registrovany pozemek z AreaShop."
help-addsign: "&6/as addsign &7-&r Prida cedulku k existujicimu pozemku."
help-delsign: "&6/as delsign &7-&r Odstrani cedulku v pohledu."
help-me: "&6/as me &7-&r Kontrola vlastnenych regionu (+expiration)."
help-setowner: "&6/as setowner &7-&r Nastavi majitele pozemku."
help-resell: "&6/as resell &7-&r Vystavi nektery Tvuj pozemek k nabidce."
help-resellAll: "&6/as resell &7-&r Vystavi pozemek k nabidce."
help-stopResell: "&6/as stopresell &7-&r Vystavi Tvuj pozemek zpet do rezimu Prodano."
help-stopResellAll: "&6/as stopresell &7-&r Vysatvi pozemek zpet do rezimu Prodano."
help-addFriend: "&6/as addfriend &7-&r Prida hrace do Tveho pozemku."
help-addFriendAll: "&6/as addfriend &7-&r Prida hrace do pozemku."
help-delFriend: "&6/as delfriend &7-&r Odstrani hrace z Tveho pozemku."
help-delFriendAll: "&6/as delfriend &7-&r Odstrani hrace z pozemku."
help-linksigns: "&6/as linksigns &7-&r Pouziti hromadneho nastaveni cedulek."
help-stack: "&6/as stack &7-&r Vytvori vicero pozemku a prida je."
help-setlandlord: "&6/as setlandlord &7-&r Nastavi LandLord pozemek."
rent-help: "/as rent [pozemek], pokud neni uvedeno, bude pouzit pozemek kde stojis."
rent-noPermission: "Nemas opravneni k pronajmu pozemku."
rent-maximum: "Nemuzes mit vice nez %0% pozemek(ky) (mas %1% ve skupine '%2%')."
rent-maximumExtend: "Nemuzes prodlouzit pronajem dokud mas vice nez %0% pozemek(ku) (mas %1% ve skupine '%2%')."
rent-payError: "S platbou je neco spatne, zkus to pozdeji."
rent-extend: "Prodlouzit pronajem muzes pravym klikem na cedulku nebo prikazem /as rent."
rent-someoneElse: "Uz ses pronajmul/a tento pozemek."
rent-notRentable: "Tento pozemek neni dostupny k pronajmu."
rent-expireWarning: "Tvemu pronajmu pozemku %region% zbyva %timeleft%, prodluz pronajem k jeho zachovani."
buy-help: "/as buy [pozemek], pokud neni uvedeno, bude pouzit pozemek kde stojis."
buy-noPermission: "Nemas opravneni ke koupi pozemku."
buy-noPermissionResell: "Nemas opravneni ke koupi pozemku v rezimu Nabidky."
buy-noPermissionNoResell: "Nemas opravneni ke koupi pozemku kdyz neni v rezimu Nabidky."
buy-maximum: "Nemuzes vlastnit vice nez %0% pozemek(ky) (mas %1% ve skupine '%2%')."
buy-payError: "S platbou je neco spatne, zkus to pozdeji."
buy-yours: "Uz vlastnis tento pozemek."
buy-someoneElse: "Nekdo jiny uz koupil tento pozemek."
unrent-help: "/as unrent [pozemek], pokud neni uvedeno, bude pouzit pozemek kde stojis."
unrent-noPermission: "Nemas opravneni k ukonceni pronajmu pozemku."
unrent-noPermissionOther: "Nemas opravneni k ukonceni pronajmu cizich pozemku."
unrent-notRegistered: "U pozemku nelze ukoncit pronajem, neni totiz registrovany k pronajmu."
unrent-notRented: "U pozemku nelze ukoncit pronajem, neni totiz ani k pronajmuti."
sell-help: "/as sell [pozemek], pokud neni uvedeno, bude pouzit pozemek kde stojis."
sell-notRegistered: "Pozemek nelze prodat, protoze neni registrovany ke koupi."
sell-notBought: "Pozemek nelze prodat, protoze nikomu nepatri."
sell-noPermission: "Nemas opravneni k prodeji pozemku."
sell-noPermissionOther: "Nemas opravneni k prodeji cizich pozemku."
reload-reloading: "Reload na pohodu, kontrola vsech pronajmu a aktualizaci pozemku."
reload-updateStart: "&7Update pozemku %0% :: %1% sekund."
reload-updateComplete: "&7Update pozemku na pohodu."
reload-noPermission: "Nemas opravneni k reloadu."
reload-updateCommandChanged: "'/as updaterents' a '/as updatebuys' byly zruseny, '/as reload' provede vse potrebne..."
info-help: "/as info\n all\n pronajmute [skupina]\n kpronajmu [skupina]\n prodano [skupina]\n kprodeji [skupina]\n hrac <hrac>\n pozemek <pozemek>\n bezskupiny"
info-noPermission: "Nemas opravneni k ziskani informaci o pozemcich."
info-all-rents: "Pozemky registrovane k pronajmu: &7%0%."
info-all-noRents: "Nejsou pozemky registrovane k pronajmu."
info-all-buys: "Pozemky registrovane k prodeji: &7%0%."
info-all-noBuys: "Nejsou pozemky registrovane k prodeji."
info-nogroupRents: "Pronajmy bez skupiny: &7%0%."
info-nogroupBuys: "Prodeje bez skupiny: &7%0%."
info-nogroupNoRents: "Nejsou pronajmy bez skupiny."
info-nogroupNoBuys: "Nejsou prodeje bez skupiny."
info-rented: "Pronajate pozemky: &7%0%."
info-noRented: "Zadne pozemky."
info-unrented: "Pozemky bez pronajmu: &7%0%."
info-noUnrented: "Vsechny pozemky k pronajmu."
info-sold: "Prodane pozemky: &7%0%."
info-noSold: "Zadne pozemky."
info-forsale: "Pozemky k prodeji: &7%0%."
info-noForsale: "Vse prodane."
info-noFiltergroup: "Skupina '%0%' neexistuje, tudiz nelze pouzit k filtrovani."
info-playerHelp: "/as info player <jmeno>."
info-playerRents: "Pozemky pronajate od %0%: &7%1%"
info-playerNoRents: "%0% nema pronajmy."
info-playerBuys: "Pozemky koupene od %0%: &7%1%."
info-playerNoBuys: "%0% nema nic koupene."
info-regionHelp: "/as info region [nazev], pokud neni uvedeno, bude pouzit ten kde stojis."
info-regionHeaderRent: "&2Informace %region%:"
info-regionHeaderBuy: "&2Informace %region%:"
info-regionRented: "&2&l►&r Pronajate od %player% do: &7%until%."
info-regionBought: "&2&l►&r Koupene od %player%."
info-regionReselling: "&2&l►&r Koupene od %player%, aktualne k prodeji."
info-regionExtending: "&2&l►&r Cena prodlouzeni: &7%price% za %duration%."
info-regionCanBeRented: "&2&l►&r Cena pronajmu: &7%price% za %duration%."
info-regionCanBeBought: "&2&l►&r Cena ke koupi: &7%price%."
info-regionReselPrice: "&2&l►&r K prodeji za: &7%resellprice% (muzes koupit od %player%)."
info-regionFriends: "&2&l►&r Pridani hraci: &7%friends%."
info-regionMoneyBackBuy: "&2&l►&r Navrat z prodeje: &7%moneyback% (%moneybackpercent%% z plne ceny)."
info-regionMoneyBackRent: "&2&l►&r Navrat z pronajmu: &7%moneyback% (%moneybackpercent%% ze zbyvajici doby)."
info-regionMaxExtends: "&2&l►&r Maximalni pocet prodlouzeni: &7%maxextends%x."
info-regionNoExtending: "&2&l►&r Pronajem nelze prodlouzit."
info-regionExtendsLeft: "&2&l►&r Zbyva prodlouzeni: &7%extendsleft%x z %maxextends%."
info-regionMaxRentTime: "&2&l►&r Trvani pronajmu: &7%maxrenttime% z maxima."
info-regionNoTeleport: "&2&l►&r Misto pro teleport neni nastaveno: %0%."
info-regionTeleportHint: " &7(pouzij '/as settp' pro lepsi misto)"
info-regionTeleportAt: "&2&l►&r Teleport nastaven na: &7(%0%, %1%, %2%, %3%, roztec:%4%, vyboceni:%5%)."
info-regionSigns: "&2&l►&r Pripojene cedulky: &7%0%."
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
info-regionGroups: "&2&l►&r Pridane skupiny: &7%0%."
info-regionInactiveUnrent: "&2&l►&r Automaticke ukonceni pronajmu: &7%inactivetime% z neaktivity hrace."
info-regionInactiveSell: "&2&l►&r Automaticky prodej: &7%inactivetime% z neaktivity hrace."
info-regionRestrictedRegionRent: "&2&l►&r Musis byt uvnitr regionu k pronajmuti."
info-regionRestrictedWorldRent: "&2&l►&r Musis byt ve svete '%world%' k pronajmuti pozemku."
info-regionRestrictedRegionBuy: "&2&l►&r Musis byt uvnitr pozemku k zakoupeni."
info-regionRestrictedWorldBuy: "&2&l►&r Musis byt ve svete '%world%' k zakoupeni pozemku."
info-regionRestoringRent: "&2&l►&r Obnova pozemku ZAPNUTA &7(pozemek bude smazan a pronajem ukoncen)%0%."
info-regionRestoringBuy: "&2&l►&r Obnova pozemku ZAPNUTA &7(pozemek bude smazan a prodan)%0%."
info-regionRestoringProfile: " (profil: %0%)"
info-regionLandlord: "&2&l►&r LandLord: &7%landlord% (navrat penez)."
info-regionNotExisting: "Uvedeny region neni registrovany: %0%."
setrestore-help: "/as setrestore <pozemek> <true|false|general> [profil]."
setrestore-noPermission: "Nemas opravneni k nastaveni obnovy pozemku."
setrestore-notRegistered: "Uvedeny region neni registrovany: %0%."
setrestore-invalidSetting: "'%0%' nema platny stav, bud bude true, false nebo general."
setprice-noPermission: "Nemas opravneni ke zmene ceny pozemku."
setprice-help: "/as setprice <cena> [pozemek], pokud neni uvedeno, bude pouzit ten kde stojis."
setprice-notRegistered: "Uvedeny pozemek neni registrovany: %0%."
setprice-wrongPrice: "'%0%' neni platna cena."
setprice-successRent: "Cena pozemku %region% zmenena na %price% pro dobu %duration%."
setprice-successBuy: "Cena pozemku %region% zmenena na %price%."
setprice-successRemoved: "Cena pro %region% byla odstranena, bude nastavena zakladni cena na: %price%."
setprice-noLandlord: "Nemas opravneni ke zmene ceny, protoze neni v landlord pro %region%."
setduration-noPermission: "Nemas opravneni ke zmene doby pronajmu."
setduration-help: "/as setduration <pocet> <format> [pozemek], pokud neni uvedeno, bude pouzit ten kde stojis."
setduration-notRegistered: "%0% neni registrovany k pronajmu."
setduration-wrongAmount: "'%0%' neni platny pocet, pouzij platne CISLO."
setduration-wrongFormat: "'%0%' neni spravny format casu, radeji skukni dokumentaci."
setduration-noLandlord: "Nemas opravneni ke zmene delky trvani, protoze nejsi v landlord pro %region%."
setduration-successRemoved: "Trvani pro pozemek %region% bylo odstraneno, nyni bude nastaveno do zakladni doby: %duration%."
setup-noRegion: "Neni uveden pozemek v druhem radku."
setup-wrongRegion: "Uvedeny pozemek nexistuje."
setup-alreadyRentSign: "Uvedeny pozemek uz je pridany k pronajmu, pridej cedulku s [as] na prvnim radku nebo napis '/as addsign'."
setup-alreadyBuySign: "Uvedeny pozemek uz je pridany k prodeji, pridej cedulku s [as] na prvnim radku nebo napis '/as addsign'."
setup-noDuration: "Na tretim radku neni uvedeno jak dlouho se muze pozemek pronajimat"
setup-wrongDuration: "Uvedena doba pronajmu je chybne napsana, priklad: 1 day."
setup-noPrice: "Neni uvedena cena na ctvrtem radku."
setup-wrongPrice: "Uvedena cena je chybne napsana, musi byt pouze cisla."
setup-rentSuccess: "Nastaveni pronajmu pozemku %0% je v poradku."
setup-buySuccess: "Nastaveni prodej pozemku %0% je v poradku."
setup-noPermissionRent: "Nemas opravneni pro nastavovani pronajmu."
setup-noPermissionBuy: "Nemas opravneni pro nastavovani prodeje."
setup-couldNotDetect: "Nalezeny pozemky se stejnou prioritou nebo parent/child relaci, uved jednu z nich na druhy radek (pozemky: %0% a %1%)."
setup-blacklisted: "%0% je na cerne listine a nemuze byt pridan do AreaShop."
setup-noPermission: "Nemuzes pridat pozemek '%0%', nejsi jeho majitel/clen."
destroy-noPermissionRent: "Nemas opravneni pro zruseni pronajmu pozemku."
destroy-noPermissionBuy: "Nemas opravneni pro zruseni prodeje pozemku."
teleport-help: "/as tp <pozemek> [sign]."
teleport-noRentOrBuy: "Uvedeny pozemek neni registrovan: %0%."
teleport-noPermission: "Nemas opravneni pro teleport k Tvemu pozemku."
teleport-noPermissionOther: "Nemas opravneni pro teleport k cizim pozemkum."
teleport-noPermissionSign: "Nemas opravneni k teleportu na cedulku Tveho pozemku."
teleport-noPermissionOtherSign: "Nemas opravneni k teleportu na cedulku cizich pozemku."
teleport-noPermissionFriend: "Nemas opravneni k teleportu do pozemku."
teleport-noPermissionFriendSign: "Nemas opravneni k teleportu na cedulku."
teleport-blocked: "Nelze teleportovat, protoze pozice je mimo pozemek a je blokovana."
teleport-changedToSign: "Mas opravneni pouze pro teleport k cedulce, teleportuji."
teleport-changedToNoSign: "Zadna cedulka, zkusim teleport do pozemku."
setteleport-help: "/as settp [pozemek] [reset], pokud neni uvedeno, bude pouzit ten, kde stojis."
setteleport-noPermission: "Nemas opravneni pro nastaveni mista k teleportu."
setteleport-noPermissionOther: "Nemas opravneni pro nastaveni mista teleportu kde nejsi majitelem."
setteleport-noRentOrBuy: "Pozemek neni registrovany: %0%."
setteleport-notInside: "Misto musi byt uvnitr pozemku."
find-help: "/as find <buy|rent> [maxcena] [skupina]."
find-noPermission: "Nemas opravneni k hledani pozemku a naslednemu teleportu k nim."
find-wrongMaxPrice: "Zadana maximalni vyse ceny neni spravna: %0%."
find-wrongGroup: "Zadana skupina neexistuje: %0%."
find-noneFound: "Pozemek %0% dle Tvych maximalnich financnich moznostech nenalezen : %1%%2%."
find-noneFoundMax: "Pozemek %0% dle uvedene maximalni ceny nenalezen : %1%%2%."
find-onlyInGroup: ", hledani pouze ve skupine: %0%."
groupadd-help: "/as groupadd <skupina> [pozemek], pokud neni uvedeno, bude pouzit vyber z WorldEdit."
groupadd-noPermission: "Nemas opravneni k pridavani pozemku do skupin."
groupadd-noRegion: "Uvedeny pozemek neni registrovany: %0%."
groupadd-weSuccess: "Pridano do skupiny %0%: &7%1%."
groupadd-weFailed: "Uz je ve skupine %0%: &7%1%."
groupdel-help: "/as groupdel <group> [region], pokud neni uvedeno, bude pouzit vyber z WorldEdit."
groupdel-noPermission: "Nemas opravneni k mazani pozemku ze skupin."
groupdel-noRegion: "Uvedeny pozemek neni registrovany: %0%."
groupdel-weSuccess: "Odstranen ze skupiny %0%: &7%1%."
groupdel-weFailed: "Neni ve skupine %0% :: &7%1%."
grouplist-noPermission: "Nemas opravneni k zobrazeni registrovanych skupin."
grouplist-noGroups: "Aktualne zadne registrovane skupiny."
grouplist-success: "Nasledujici skupiny jsou registrovane: &7%0%."
groupinfo-help: "/as groupinfo <group>."
groupinfo-noPermission: "Nemas opravneni k zobrazeni informaci o skupinach."
groupinfo-noGroup: "Skupina '%0%' neni registrovana, napis /as grouplist k zobrazeni skupin."
groupinfo-members: "Nasledujici pozemky jsou cleny skupiny %0%: &7%1%."
groupinfo-noMembers: "Skupina %0% nema zadne cleny."
schemevent-help: "/as schemevent <pozemek> <created|deleted|rented|unrented|bought|sold>."
schemevent-noRegion: "Uvedeny pozemek neni registrovany: %0%."
schemevent-wrongEvent: "Uvedeny event '%0%' neexistuje, pouzij jeden z nasledujicich: &7%1%."
schemevent-noPermission: "Nemas opravneni k triggerovani eventu schemat."
add-help: "/as add <rent|buy> [pozemek] [svet]."
add-noPermission: "Nemas opravneni k pridavani pozemku do AreaShop."
add-success: "Pridano jako %0%: &7%1%."
add-failed: "Pozemek uz je registrovany: &7%0%."
add-blacklisted: "Na cerne listine: &7%0%."
add-specifyWorld: "Zadej nazev sveta pro pozemek pomoci konzole."
add-incorrectWorld: "Svet '%0%' nebyl nalezen, zkus to znovu (pozor na VELikoST pIsmeN)."
add-noRegion: "Pozemek '%0%' v tomto svete neexistuje."
add-noPermissionRegions: "Chybi prava k pridani: &7%0%."
add-noPermissionOwnerMember: "&7Bud nejsi majitelem/clenem pozemku, nebo nemas opravneni."
del-noRegion: "Uvedeny pozemek neni registrovany: %0%."
del-noPermission: "Nemas opravneni k mazani pozemku."
del-success: "Pozemek uspesne odstranen: &7%0%."
del-failed: "Chybi prava k mazani nebo neni registrovano: &7%0%."
addsign-help: "/as addsign [pozemek] [profil]."
addsign-noSign: "Nedivas se na cedulku."
addsign-noRegions: "Zadny pozemek okolo cedulky nebyl nalezen."
addsign-couldNotDetect: "Nalezeno vice pozemku okolo cedulky, uved pozemek jako extra argument (pozemky: %0% a %1%)."
addsign-couldNotDetectSign: "Nalezeno vice pozemku okolo cedulky, uved jmeno na druhy radek (pozemky: %0% a %1%)."
addsign-wrongProfile: "Uvedeny profil neexistuje, pouzij nasledujici (kontrola konfigu): &7%0%."
addsign-success: "Cedulka byla uspesne pridana pro pozemek: %region%."
addsign-successProfile: "Cedulka byla uspesne pridana pro pozemek %region% s profilem %0%."
addsign-noPermission: "Nemas opravneni pro pridani cedulek."
delsign-noSign: "Nedivas se na zadnou cedulku."
delsign-noPermission: "Nemas opravneni k odstraneni cedulek."
delsign-noRegion: "Tato cedulka nepatri k zadnemu pozemku AreaShop."
me-noPermission: "Nemas opravneni zjistovat jake mas pozemky."
me-notAPlayer: "Nehrajes, tak nic nevlastnis."
me-noRentRegions: "Nemas nic v pronajmu."
me-noBuyRegions: "Nemas zadny zakoupeny pozemek."
me-rentRegions: "Mas pronajate nasledujici pozemky:"
me-buyRegions: "Mas koupene nasledujici pozemky:"
me-rentLine: "&2&l►&r %region% do %until% &7(%timeleft% zbyva)."
me-buyLine: "&2&l►&r %region%."
me-noFriendRegions: "Zadne pratele jsi do pozemku nepridal."
me-friendRegions: "Do pozemku jsou prodani nasledujici pratele:"
me-friendLine: "&2&l►&r %region% &7(majitel: %player%)."
setowner-help: "/as setowner <hrac> [pozemek], pokud neni uvedeno, bude pouzit ten kde stojis."
setowner-noPermission: "Nemas opravneni k nastaveni majitele pozemku."
setowner-noPermissionRent: "Nemas opravneni k nastaveni majitele pozemku urceneho k pronajmu."
setowner-noPermissionBuy: "Nemas opravneni k nastaveni majitele pozemku urceneho k prodeji."
setowner-notRegistered: "Uvedeny region neni registrovany, majitel nemuze byt nastaven."
setowner-noPlayer: "Nelze zjistit UUID uvedeneho hrace: %0%."
setowner-succesRent: "Majitel pro pozemek %region% uspesne zmenen na %player%, pronajmuto do %until% (%timeleft% zbyva)."
setowner-succesRentExtend: "Majitelem je %player%, pronajem podlouzen o '%duration%', nyni je do %until% (%timeleft% zbyva)."
setowner-succesBuy: "Majitel pozemku %region% uspesne zmenen na %player%."
resell-help: "/as resell <cena> [pozemek], pokud neni uvedeno, bude pouzit ten kde stojis."
resell-wrongPrice: "'%0%' neni platna cena."
resell-notRegistered: "Uvedeny pozemek neni registrovany: %0%."
resell-noRegionFound: "Pozemek v Tve pozici nenalezen, zkus upresnit pozemek pomoci argumentu."
resell-notBought: "Nemuzes nabidnout pozemek %region%, protoze dosud nebyl koupeny."
resell-success: "%region% byl uspesne vystaven do rezimu Nabidky za cenu %resellprice%."
resell-noPermission: "Nemas opravneni k nastaveni pozemku do rezimu Nabidky."
resell-noPermissionOther: "Nemas opravneni k nastavovani reizmu Nabidek."
stopresell-help: "/as stopresell [pozemek], pokud neni uvedeno, bude pouzit ten kde stojis."
stopresell-notRegistered: "Uvedeny pozemek neni registrovany: %0%."
stopresell-noRegionFound: "Zadny pozemek v Tve pozici nenalezen, zkus upresnit pozemek pomoci argumentu."
stopresell-notResell: "Nemuzes zastavit Nabidku pozemku %region% protoze neni v rezimu Nabidky."
stopresell-success: "%region% byl uspesne vracen do rezimu Prodano."
stopresell-noPermission: "Nemas opravneni k nastaveni do rezimu Prodano."
stopresell-noPermissionOther: "Nemas opravneni k nastaveni rezimu Prodano."
addfriend-help: "/as addfriend <hrac> [pozemek], pokud neni uvedeno, bude pouzit ten kde stojis."
addfriend-noPermissionOther: "Nemas opravneni k pridavani pratel do pozemku."
addfriend-noPermission: "Nemas opravneni k pridavani pratel do pozemku."
addfriend-alreadyAdded: "%0% uz je pridan/a jako pritel do pozemku."
addfriend-self: "Pridani majitele pozemku jako pritele by bylo zbytecnym krokem :]"
addfriend-noOwner: "Nejsi majitelem pozemku, tudiz do nej nemuzes pridavat pratele."
delfriend-help: "/as delfriend <hrac> [pozemek], pokud neni uvedeno, bude pouzit ten kde stojis."
delfriend-noPermissionOther: "Nemas opravneni k odstranovani pratel z pozemku."
delfriend-noPermission: "Nemas opravneni k odstranovani pratel z pozemku."
delfriend-notAdded: "%0% neni pro tento pozemek pridan/a jako pritel."
delfriend-noOwner: "Nejsi majitelem pozemku, tudiz z nej nemuzes mazat pridane pratele."
linksigns-multipleRegions: "Nalezeno vicero pozemku: &7%0%."
linksigns-multipleRegionsAdvice: "Pokracuj ve vyberu dalsim kliknutim nebo napis '/as linksigns' k ukonceni."
linksigns-noRegions: "Zadny pozemek v Tvem pohledu, vytvor ho a pridej do AreaShop &7(maximalni vzdalenost 100 bloku)."
linksigns-regionFound: "Pozemek %region% byl nalezen, nyni koukni na cedulku a klikni levym k pripojeni."
linksigns-signFound: "Nalezena cedulka (%0%, %1%, %2%), nyni koukni na pozemek a klikni pravym k pripojeni"
linksigns-noSign: "Zadna cedulka v pohledu nenalezena, ujisti se, ze je ve vyhledu cedulka a zkus to znovu &7(maximalni vzdalenost 100 bloku)."
linksigns-alreadyRegistered: "Tato cedulka uz je registrovana pro pozemek %region%, klikni znovu pro vyber jine."
linksigns-first: "Aktivoval/a jsi mod SIGN LINKING (pripojovani cedulek k pozemku)."
linksigns-next: "&7Levym kliknutim zvol cedulku, pravym kliknutim zvol pozemek, nebo napis /as linksigns k ukonceni."
linksigns-noPermission: "Nemas opravneni na rezim SIGN LINKING."
linksigns-stopped: "Mod SIGN LINKING byl ukoncen."
stack-help: "/as stack <amount> <gap> <name> <rent|buy> [group].\n&7 <amount> Pocet pozemku k vytvoreni.\n <gap> Vzdalenost (v blocich) mezi pozemky.\n <name> Nazev pozemku (cisla budou za nazvem).\n <rent|buy> Volba mezi pronajmem/prodejem.\n [group] Skupina pro pridani novych pozemku.\n Pozemky budou vytvoreny tam, kam se budes divat."
stack-accepted: "Zahajeno vytvareni %0% %1% pozemku s rozestupy %2% bloku(y), nazvy zacinaji %3% a maji koncove cisla %4%"
stack-addToGroup: " Vytvorene pozemky byly pridany do skupiny '%0%'."
stack-noPermission: "Nemas opravneni k hromadne tvorbe pozemku."
stack-wrongAmount: "'%0%' neni platny pocet pozemku."
stack-wrongGap: "'%0%' neni spravne cislo pro pocet bloky mezi pozemky."
stack-noSelection: "Nemas opravneni k urceni prvniho pozemku pro hromadnou tvorbu."
stack-addStart: "&7Pridano %0% pozemku v case %1% sekund."
stack-addComplete: "&7Pridavani pozemku bylo USPESNE dokonceno."
stack-unclearDirection: "Prosim, koukej poradne na nekterou ze svetovych stran, zda se, ze ted koukas kamsi do podzemi >> %0%."
setlandlord-help: "/as setlandlord <hrac> [pozemek], pokud neni uvedeno, bude pouzit ten kde stojis."
setlandlord-noPermission: "Nemas opravneni k nastaveni landlord pro pozemek."
setlandlord-noRegion: "Uvedeny pozemek neni registrovany: %0%."
timeleft-years: "%0% rok(u)"
timeleft-months: "%0% mesicu"
timeleft-days: "%0% dnu"
timeleft-hours: "%0% hodin"
timeleft-minutes: "%0% minut"
timeleft-second: "%0% sekunda"
timeleft-seconds: "%0% sekund"
timeleft-ended: "Trvani"
greeting-forrent: "%region% je k pronajmu za %price% na %duration%."
greeting-rented: "%region% ma v pronajmu %player% do %until%."
greeting-forsale: "%region% k prodeji za %price%."
greeting-bought: "%region% koupeny od %player%."
greeting-resale: "%region% muze byt koupen za %resaleprice% od %player%."
-435
View File
@@ -1,435 +0,0 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: German, Version: V2.2.2, 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) ║
# ║ 3: Change the 'language' setting in config.yml to '<servername>', do not include '.yml' ║
# ║ 4: Change the strings in the new file to your liking and save the file ║
# ║ 5: Use '/as reload' or reload/restart your server to see the changes ║
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
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: "Du kannst diese Aktion nicht durchführen, da die Welt, in der sich die Region befindet, im Moment nicht verfügbar ist. (Welt '%world%')."
general-noRegion: "Du kannst diese Aktion nicht durchführen, da die WorldGuard Region im Moment nicht verfügbar ist. (Region '%region%')."
general-noEconomy: "AreaShop kann kein (korrekt) installiertes Economy-Plugin finden, bitte informiere den Serverinhaber darüber."
general-cancelled: "%0%"
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 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 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: "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."
help-help: "&6/as help &7-&r Zeigt diese Hilfeseite."
help-info: "&6/as info &7-&r Zeigt Informationen über die aktuellen Regionen."
help-rent: "&6/as rent &7-&r Miete eine Region oder verlängere die Mietzeit."
help-buy: "&6/as buy &7-&r Kaufe eine Region."
help-unrent: "&6/as unrent &7-&r Kündige den Mietvertrag einer Region."
help-unrentOwn: "&6/as unrent &7-&r Kündige den Mietvertrag deiner Region."
help-sell: "&6/as sell &7-&r Verkaufe eine Region."
help-sellOwn: "&6/as sell &7-&r Verkaufe deine Region."
help-reload: "&6/as reload &7-&r Lädt alle Dateien neu ein und updatet die Regionen."
help-setrestore: "&6/as setrestore &7-&r Setze Wiederherstellung an/aus und wähle Profil."
help-setprice: "&6/as setprice &7-&r Ändere den Preis einer Region."
help-setduration: "&6/as setduration &7-&r Ändere die Mietdauer einer Region."
help-teleport: "&6/as tp &7-&r Teleportiere zu deiner gekauften/gemieteten Region."
help-teleportAll: "&6/as tp &7-&r Teleportiere zu einer gekauften/gemieteten Region."
help-setteleport: "&6/as settp &7-&r Erstelle einen Teleport-Punkt für eine gekaufte/gemietete Region."
help-setteleportAll: "&6/as settp &7-&r Erstellt einen Teleportpunkt für eine Region."
help-find: "&6/as find &7-&r Finde eine Region, welche gekauft oder gemietet werden kann."
help-groupadd: "&6/as groupadd &7-&r Füge eine Region einer Gruppe hinzu."
help-groupdel: "&6/as groupdel &7-&r Entferne eine Region aus einer Gruppe."
help-grouplist: "&6/as grouplist &7-&r Zeige alle momentan existierenden Gruppen an."
help-groupinfo: "&6/as groupinfo &7-&r Zeige Informationen über eine Gruppe an."
help-schemevent: "&6/as schemevent &7-&r Starte ein Schematic-Event für eine Region."
help-add: "&6/as add &7-&r Definiere eine Region als zu verkaufen oder zu vermieten."
help-del: "&6/as del &7-&r Entferne eine Region aus AreaShop."
help-addsign: "&6/as addsign &7-&r Füge einer Region ein Schild hinzu."
help-delsign: "&6/as delsign &7-&r Lösche das Schild einer Region, welches du gerade ansiehst."
help-me: "&6/as me &7-&r Überprüfe, welche Regionen Du besitzt (+Verfallsdatum)."
help-setowner: "&6/as setowner &7-&r Lege den Besitzer der Region fest oder verlängere die Mietdauer."
help-resell: "&6/as resell &7-&r Aktiviere den Weiterverkaufs-Modus für eine Deiner Regionen."
help-resellAll: "&6/as resell &7-&r Aktiviere den Weiterverkaufs-Modus für eine Region."
help-stopResell: "&6/as stopresell &7-&r Stoppe den Weiterverkauf Deiner Region."
help-stopResellAll: "&6/as stopresell &7-&r Stoppe den Weiterverkauf einer Region."
help-addFriend: "&6/as addfriend &7-&r Füge einen Freund zu Deiner Region hinzu."
help-addFriendAll: "&6/as addfriend &7-&r Füge einen Spieler zu einer Region hinzu."
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 die Region %region% gemietet bis zum %until%."
rent-extended: "Du hast Deine Miete von %region% bis zum %until% verlängert."
rent-extendedToMax: "Du hast Deine Miete von %region% bis zum %until% verlängert. (Das ist die maximal zulässige Mietdauer von %maxrenttime%)."
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% und benötigst %price%)."
rent-lowMoneyRent: "Du hast nicht genug Geld um diese Region zu mieten. (Du hast %0% und benötigst %price%)."
rent-someoneElse: "Diese Region ist bereits vermietet."
rent-notRentable: "Diese Region ist nicht mietbar."
rent-maxExtends: "Du kannst diese Miete nicht weiter verlängern. (Zulässig sind %maxextends% Verlängerungen). Nachdem die Miete abgelaufen ist, kannst Du die Region erneut mieten."
rent-maxRentTime: "Du kannst diese Region nicht noch mehr im Voraus mieten. Die maximale Zeit beträgt %maxrenttime% und Du hast diese Region im Moment für %timeleft% gemietet."
rent-restrictedToWorld: "Du musst dich in der Welt '%world%' befinden, um diese Region mieten zu können (Du befindest Dich in der Welt '%0%')."
rent-restrictedToRegion: "Du musst innerhalb der Region %region% sein, um diese mieten zu können."
rent-expireWarning: "Deine Region %region% hat %timeleft% übrig. Gehe sicher, dass du es rechtzeitig verlängerst, wenn du sie behalten willst."
rent-alreadyAtFull: "Die Region %region% ist bereits auf oder über der maximalen Mietzeit, Du kannst diese noch nicht verlängern."
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: "Die Region %region% ist nicht zum Kaufen verfügbar."
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."
buy-succes: "Du hast %region% erfolgreich gekauft."
buy-successResale: "Du hast %region% erfolgreich von %0% gekauft."
buy-successSeller: "Deine Region %region% wurde an %player% für %0% verkauft."
buy-lowMoney: "Du hast nicht genug Geld um diese Region zu kaufen. (Du hast %0% und benötigst %price%)."
buy-lowMoneyResell: "Du hast nicht genug Geld um diese Region zu kaufen. (Du hast %0% und benötigst %resellprice%)."
buy-yours: "Du besitzt diese Region bereits."
buy-someoneElse: "Jemand anderes hat diese Region bereits gekauft."
buy-restrictedToWorld: "Du musst Dich in der Welt '%world%' befinden, um diese Region kaufen zu können. (Du befindest Dich in der Welt '%0%')."
buy-restrictedToRegion: "Du musst innerhalb der Region %region% sein, um diese kaufen zu können."
unrent-help: "/as unrent [Region], Wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest."
unrent-noPermission: "Du bist nicht berechtigt, den Mietvertrag zu kündigen."
unrent-noPermissionOther: "Du bist nicht berechtigt, den Mietvertrag einer anderen Region zu kündigen."
unrent-notRegistered: "Die Region kann nicht entmietet werden, weil sie nicht für Vermietungen registriert ist."
unrent-notRented: "Die Region kann nicht entmietet werden, weil sie nicht gemietet ist."
unrent-unrented: "Du hast die Region %region% nun nicht mehr gemietet."
unrent-other: "Die Region %region% ist nun nicht mehr an %player% vermietet."
unrent-expired: "Deine Miete von %region% ist abgelaufen."
sell-help: "/as sell [Region], Wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest."
sell-notRegistered: "Die Region kann nicht verkauft werden, da sie nicht für den Verkauf registriert ist."
sell-notBought: "Die Region kann nicht verkauft werden, da sie keinen Eigentümer hat."
sell-sold: "%region% wurde verkauft an %player%."
sell-soldYours: "Du hast die Region %region% verkauft."
sell-noPermission: "Du bist nicht berechtigt, diese Region zu verkaufen."
sell-noPermissionOther: "Du bist nicht berechtigt, eine Region zu verkaufen."
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\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."
info-all-buys: "Regionen zum Verkauf: &7%0%."
info-all-noBuys: "Es gibt momentan keine verkauften Regionen."
info-nogroupRents: "Miete Regionen ohne Gruppe: &7%0%."
info-nogroupBuys: "Kaufe Regionen ohne Gruppe: &7%0%."
info-nogroupNoRents: "Es gibt keine Miet-Regionen ohne eine Gruppe."
info-nogroupNoBuys: "Es gibt keine Kauf-Regionen ohne eine Gruppe."
info-rented: "Vermietete Regionen: &7%0%."
info-noRented: "Momentan sind keine Regionen vermietet."
info-unrented: "Nicht vermietete Regionen: &7%0%."
info-noUnrented: "Sämtliche Regionen sind vermietet."
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."
info-playerBuys: "Von %0% verkaufte Regionen: &7%1%."
info-playerNoBuys: "%0% hat bisher keine Region(en) gekauft."
info-regionHelp: "/as info region [Region], Wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest."
info-regionHeaderRent: "&2Informationen über %region%:"
info-regionHeaderBuy: "&2Informationen über %region%:"
info-regionRented: "&2&l►&r Gemietet von %player% bis: &7%until%."
info-regionBought: "&2&l►&r Gekauft von %player%."
info-regionReselling: "&2&l►&r Gekauft von %player%, derzeit Weiterverkauf."
info-regionExtending: "&2&l►&r Preis zum Verlängern: &7%price% für %duration%."
info-regionCanBeRented: "&2&l►&r Preis zum Mieten: &7%price% für %duration%."
info-regionCanBeBought: "&2&l►&r Kaufpreis: &7%price%."
info-regionReselPrice: "&2&l►&r Weiterverkaufspreis: &7%resellprice% (Du kannst es von %player% kaufen)."
info-regionFriends: "&2&l►&r Freunde hinzugefügt: &7%friends%."
info-regionMoneyBackBuy: "&2&l►&r Verkaufpreis: &7%moneyback% (%moneybackpercent%% des Kaufpreises)."
info-regionMoneyBackRent: "&2&l►&r Rückzahlung bei Mietkündigung: &7%moneyback% (%moneybackpercent%% der verbleibenden Zeit)."
info-regionMaxExtends: "&2&l►&r Maximale Anzahl an Mietverlängerungen: &7%maxextends% mal."
info-regionNoExtending: "&2&l►&r Miete kann nicht verlängert werden."
info-regionExtendsLeft: "&2&l►&r Verbleibende Mietverlängerungen: &7%extendsleft% von %maxextends% mal."
info-regionMaxRentTime: "&2&l►&r Miete im Voraus: &7Maximal %maxrenttime%."
info-regionNoTeleport: "&2&l►&r Teleport-Position nicht gesetzt%0%."
info-regionTeleportHint: " &7(Benutze '/as settp' für einen bessere Position)"
info-regionTeleportAt: "&2&l►&r Teleport-Punkt bei: &7(%0%, %1%, %2%, %3%, Neigung:%4%, Drehung:%5%)."
info-regionSigns: "&2&l►&r Verbundene Schilder: &7%0%."
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
info-regionGroups: "&2&l►&r Zugewiesene Gruppen: &7%0%."
info-regionInactiveUnrent: "&2&l►&r Automatische Mietkündigung nach: &7%inactivetime% Inaktivität des Spielers."
info-regionInactiveSell: "&2&l►&r Automatischer Verkauf nach: &7%inactivetime% Inaktivität des Spielers."
info-regionRestrictedRegionRent: "&2&l►&r Du musst dich in der Region befinden, um sie mieten zu können."
info-regionRestrictedWorldRent: "&2&l►&r Du musst in der Welt '%world%' sein, um diese Region mieten zu können."
info-regionRestrictedRegionBuy: "&2&l►&r Du musst sich in der Region befinden, um sie kaufen zu können."
info-regionRestrictedWorldBuy: "&2&l►&r Du musst in der Welt '%world%' sein, um diese Region kaufen zu können."
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-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]."
setrestore-noPermission: "Du bist nicht berechtigt, die Wiederherstellungs-Einstellungen zu verändern."
setrestore-notRegistered: "Die angegebene Region ist nicht registriert: %0%."
setrestore-invalidSetting: "'%0%' ist kein gültiger Status, kann true sein, false oder general."
setrestore-success: "Wiederherstellungs-Einstellungen von %region% erfolgreich zu '%0%' geändert."
setrestore-successProfile: "Wiederherstellungs-Einstellungen von %region% erfolgreich zu %0% geändert und das Profil zu '%1%' geändert."
setprice-noPermission: "Du bist nicht berechtigt, den Preis einer Region zu ändern."
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: "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."
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 %region% zu '%duration%' geändert."
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."
setup-alreadyRentSign: "Die angegebene Region ist bereits in AreaShop als eine Miet-Region eingefügt, du kannst Schilder zu der Region mit [as] in der ersten Zeile hinzufügen, oder '/as addsign' verwenden."
setup-alreadyBuySign: "Die angegebene Region ist bereits in AreaShop als eine Kauf-Region eingefügt, du kannst Schilder zu der Region mit [as] in der ersten Zeile hinzufügen, oder '/as addsign' verwenden."
setup-noDuration: "Du hast nicht angegeben, wie lange eine Region mietbar ist. Bitte trage dies in die dritte Zeile ein."
setup-wrongDuration: "Die angegebene Zeit liegt nicht in einem korrekten Format vor. Beispiel: 1 Tag."
setup-noPrice: "Du hast in der vierten Zeile noch keinen Preis angegeben."
setup-wrongPrice: "Du hast den Preis nicht korrekt angegeben, bitte nutze dafür ausschließlich Zahlen."
setup-rentSuccess: "Die Vermietung von %0% ist korrekt erfolgt."
setup-buySuccess: "Der Kauf von %0% ist korrekt erfolgt."
setup-noPermissionRent: "Du hast keine Berechtigungen um mietbare Regionen aufzusetzen."
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. "
destroy-successRent: "%region% erfolgreich als mietbare Region abgemeldet."
destroy-successBuy: "%region% erfolgreich als kaufbare Region abgemeldet."
teleport-help: "/as tp <Region> [Schild]."
teleport-noRentOrBuy: "Die angegebene Region ist nicht registriert: %0%."
teleport-noPermission: "Du hast keine Rechte um dich zu dieser Region zu teleportieren."
teleport-noPermissionOther: "Du bist nicht berechtigt, dich zu einer Region zu teleportieren, welche du nicht besitzt."
teleport-noPermissionSign: "Du hast keine Rechte um dich zu diesem Schild in deiner Region zu teleportieren."
teleport-noPermissionOtherSign: "Du fehlt die Berechtigung, dich zu Schildern von Regionen, die du nicht besitzt, zu teleportieren."
teleport-noPermissionFriend: "Du hast keine Berechtigungen zu Regionen zu teleporten, in denen du als Freund hinzugefügt worden bist."
teleport-noPermissionFriendSign: "Du hast keine Berechtigungen um zu dem Schild einer Region zu teleporten, in denen du als Freund hinzugefügt worden bist."
teleport-success: "Du wurdest zu %region% teleportiert."
teleport-successSign: "Du wurdest zum Schild von %region% teleportiert."
teleport-noSafe: "Keine sichere Position in %region% gefunden, kein Boden vorhanden oder maximale Anzahl an Versuchen erreicht (%0%/%1%)."
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."
setteleport-noPermissionOther: "Dir fehlt die Berechtigung die Teleportposition für eine Region, du du nicht besitzt, festzulegen."
setteleport-noRentOrBuy: "Die angegebene Region ist nicht registriert: %0%."
setteleport-success: "Teleport-Punkt von %region% erfolgreich gesetzt."
setteleport-notInside: "Der Teleportpunkt muss sich innerhalb einer Region befinden."
setteleport-reset: "Teleport-Punkt von %region% erfolgreich zurückgesetzt."
find-help: "/as find <buy|rent> [maximaler Preis] [Gruppe]."
find-noPermission: "Du hast keine Berechtigungen nach Regionen zu suchen und zu ihnen zu teleporten."
find-success: "%0% Region gefunden: %region%, bei Suche nach max. Preis in Höhe deines Guthabens: %1%%2%."
find-successMax: "%0% Region gefunden: %region%,, bei Suche nach max. Preis in Höhe von %1%%2%."
find-wrongMaxPrice: "Der angegebene Maximal-Preis ist kein korrekter Betrag: %0%."
find-wrongGroup: "Die angegebene Gruppe existiert nicht: %0%."
find-noneFound: "Keine %0% Region gefunden bei Suche nach max. Preis in Höhe deines Guthabens: %1%%2%."
find-noneFoundMax: "Keine %0% Region gefunden bei Suche nach max. Preis in Höhe von %1%%2%."
find-onlyInGroup: ", nur nach Regionen in der Gruppe %0% suchen."
groupadd-help: "/as groupadd <Gruppe> [Region], Wenn kein Regionsname angegeben wird, werden alle Regionen deiner WorldEdit-Markierung einbezogen."
groupadd-noPermission: "Du bist nicht berechtigt Regionen zu Gruppen hinzuzufügen."
groupadd-noRegion: "Die angegebene Region ist nicht eingetragen: %0%."
groupadd-success: "Region %region% wurde zur Gruppe '%0%' hinzugefügt. Diese Gruppe hat nun %1% Mitglied(er)."
groupadd-failed: "Region %region% ist bereits Mitglied der Gruppe '%1%';."
groupadd-weSuccess: "Zu Gruppe %0% hinzugefügt: &7%1%."
groupadd-weFailed: "Ist bereits in Gruppe %0%: &7%1%."
groupdel-help: "/as groupdel <Gruppe> [Region], Wenn kein Regionsname angegeben wird, werden alle Regionen deiner WorldEdit-Markierung einbezogen."
groupdel-noPermission: "Du bist nicht berechtigt, Regionen aus Gruppen zu entfernen."
groupdel-noRegion: "Die angegebene Region ist nicht eingetragen: %0%."
groupdel-success: "Region %region% ist aus Gruppe '%0%' entfernt worden. Diese Gruppe hat nun %1% Mitglied(er)."
groupdel-failed: "Region %region% gehört nicht zur Gruppe '%0%'."
groupdel-weSuccess: "Entfernt aus Gruppe %0%: &7%1%."
groupdel-weFailed: "Ist nicht länger in Gruppe %0%: &7%1%."
grouplist-noPermission: "Du bist nicht berechtigt, die eingetragenen Gruppen abzurufen."
grouplist-noGroups: "Momentan sind keine Gruppen vorhanden."
grouplist-success: "Folgende Gruppen sind vorhanden: &7%0%."
groupinfo-help: "/as groupinfo <Gruppe>."
groupinfo-noPermission: "Du bist nicht berechtigt, Informationen über eine Gruppe abzurufen."
groupinfo-noGroup: "Es ist keine Gruppe mit dem Namen '%0%' vorhanden, bitte benutze zum Anzeigen der verfügbaren Gruppen /as grouplist."
groupinfo-members: "Die folgenden Regionen gehören zur Gruppe %0%: &7%1%."
groupinfo-noMembers: "Gruppe %0% hat keine Mitglieder."
schemevent-help: "/as schemevent <Region> <created|deleted|rented|unrented|bought|sold>."
schemevent-noRegion: "Folgende angegebene Region ist nicht eingetragen: %0%."
schemevent-wrongEvent: "Das angegebene Event '%0%' existiert nicht, bitte benutze eines der folgenden: &7%1%."
schemevent-success: "'%0%'-Event wurde erfolgreich für Region %region% ausgelöst."
schemevent-noPermission: "Du bist nicht berechtigt, Schematic-Events auszuführen."
add-help: "/as add <rent|buy> [Region] [Welt]."
add-noPermission: "Du bist nicht berechtigt, eine Region in AreaShop hinzuzufügen."
add-success: "Hinzugefügt als %0%: &7%1%."
add-failed: "Bereits eingetragen: &7%0%."
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."
del-success: "Entfernte Region(en): &7%0%."
del-failed: "Keine Berechtigung zum Entfernen oder nicht in AreaShop eingetragen: &7%0%."
addsign-help: "/as addsign [Region] [Profil]."
addsign-noSign: "Du schaust gerade nicht auf ein Schild."
addsign-noRegion: "Region '%0%' ist in AreaShop nicht vorhanden. Bitte überprüfe, ob Du diese Region bereits zu AreaShop hinzugefügt hast."
addsign-noRegions: "Keine Region(en) um das Schild herum gefunden."
addsign-couldNotDetect: "Mehrere Regionen um das Schild herum gefunden, bitte gewünschte Region als Argument angeben (zwei der gefundenen Regionen: %0% und %1%)."
addsign-couldNotDetectSign: "Mehrere Regionen um das Schild herum gefunden, bitte gewünschte Region in die zweite Zeile eintragen (zwei der gefundenen Regionen: %0% und %1%)."
addsign-wrongProfile: "Das eingetragene Profil existiert nicht. Bitte benutze eines der folgenden (überprüfe config): &7%0%."
addsign-success: "Das Schild wurde hinzugefügt zu %region%."
addsign-successProfile: "Das Schild wurde zu %region% mit dem Profil %0% hinzugefügt."
addsign-alreadyRegistered: "Dieses Schild ist bereits für die Region %region% registriert."
addsign-noPermission: "Du bist nicht berechtigt, ein Schild hinzuzufügen."
delsign-noSign: "Du schaust gerade nicht auf ein Schild."
delsign-noPermission: "Du bist nicht berechtigt, ein Schild zu entfernen."
delsign-noRegion: "Dieses Schild gehört zu keiner in AreaShop eingetragenen Region."
delsign-success: "Das Schild wurde von der Region %region% entfernt."
me-noPermission: "Dir fehlt die Berechtigung einzusehen, welche Regionen du besitzt."
me-notAPlayer: "Du bist kein Spieler, darum können dir keine Regionen gehören."
me-noRentRegions: "Du hast aktuell keine Regionen angemietet."
me-noBuyRegions: "Du hast aktuell keine Regionen im Besitz."
me-rentRegions: "Du hast die folgenden Regionen angemietet:"
me-buyRegions: "Du bist Eigentümer der folgenden Regionen:"
me-rentLine: "&2&l►&r %region% bis %until% &7(noch %timeleft% verbleibend)."
me-buyLine: "&2&l►&r %region%."
me-noFriendRegions: "Du wurdest noch nicht als Freund zu einer Region hinzugefügt."
me-friendRegions: "Du bist in folgenden Regionen als Freund hinzugefügt:"
me-friendLine: "&2&l►&r %region% &7(Besitzer: %player%)."
setowner-help: "/as setowner <Spieler> [Region], wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest."
setowner-noPermission: "Dir fehlt die Berechtigung den Besitzer einer Region festzulegen."
setowner-noPermissionRent: "Dir fehlt die Berechtigung den Mieter einer Region festzulegen."
setowner-noPermissionBuy: "Dir fehlt die Berechtigung den Eigentümer einer Region festzulegen."
setowner-notRegistered: "Die angegebene Region ist nicht registriert, Besitzer kann nicht festgelegt werden."
setowner-noPlayer: "Die UUID des Spielers %0% konnte nicht gefunden werden."
setowner-succesRent: "Besitzer von %region% erfolgreich geändert zu %player%, gemietet bis %until% (%timeleft% verbleibend)."
setowner-succesRentExtend: "%player% ist bereits Besitzer, Miete verlängert um '%duration%', nun gemietet bist %until% (%timeleft% verbleibend)."
setowner-succesBuy: "Besitzer von %region% erfolgreich geändert zu %player%."
resell-help: "/as resell <Preis> [Region], wählt automatisch die Region, in der du dich befindest, wenn nicht angegeben."
resell-wrongPrice: "'%0%' ist keine gültige Preisangabe."
resell-notRegistered: "Die angegebene Region ist nicht registriert: %0%."
resell-noRegionFound: "Keine AreaShop-Region an deiner Stelle gefunden, gib die Region als Argument an."
resell-notBought: "Du kannst %region% nicht weiterverkaufen, weil sie noch nicht erworben wurde."
resell-success: "Weiterverkauf für %region% erfolgreich aktiviert. Preis: %resellprice%."
resell-noPermission: "Du hast keine Berechtigung, deine Region weiterzuverkaufen."
resell-noPermissionOther: "Du hast keine Berechtigung, den Weiterverkauf von Regionen zu aktivieren."
stopresell-help: "/as stopresell [Region], wählt automatisch die Region, in der du dich befindest, wenn nicht angegeben."
stopresell-notRegistered: "Die angegebene Region ist nicht registriert: %0%."
stopresell-noRegionFound: "Keine AreaShop-Region an deiner Stelle gefunden, gib die Region als Argument an."
stopresell-notResell: "Du kannst den Weiterverkauf von %region% nicht stoppen, weil sie bisher nicht weiterverkauft werden soll."
stopresell-success: "Weiterverkauf von %region% wurde erfolgreich gestoppt."
stopresell-noPermission: "Du hast keine Berechtigung, den Weiterverkauf deiner Region zu stoppen."
stopresell-noPermissionOther: "Du hast keine Berechtigung, den Weiterverkauf einer Region zu stoppen."
addfriend-help: "/as addfriend <Spieler> [Region], wählt automatisch die Region, in der du dich befindest, wenn nicht angegeben."
addfriend-noPermissionOther: "Du hast keine Berechtigung, Freunde zu deiner Region hinzuzufügen."
addfriend-noPermission: "Du hast keine Berechtigung, Spieler zu einer Region hinzuzufügen."
addfriend-successOther: "%0% wurde als Freund zur Region %region% hinzugefügt."
addfriend-success: "%0% wurde als Freund zu Deiner Region %1% hinzugefügt."
addfriend-alreadyAdded: "&0% wurde bereits als Freund zu dieser Region hinzugefügt."
addfriend-self: "Den Besitzer der Region als Freund hinzuzufügen wäre sinnlos."
addfriend-noOwner: "Du kannst keine Freunde zu einer Region ohne Besitzer hinzufügen."
addfriend-notVisited: "Du kannst %0% nicht hinzufügen, weil dieser Spieler noch nie auf dem Server war."
delfriend-help: "/as delfriend <Spieler> [Region], wählt automatisch die Region, in der du dich befindest, wenn nicht angegeben."
delfriend-noPermissionOther: "Du hast keine Berechtigung, Freunde von Regionen zu entfernen, die dir nicht gehören."
delfriend-noPermission: "Du hast keine Berechtigung, Freunde von deinen Regionen zu entfernen."
delfriend-successOther: "%0% wurde als Freund der Region %region% entfernt."
delfriend-success: "%0% wurde als Freund Deiner Region %1% entfernt."
delfriend-notAdded: "%0% ist nicht als Freund dieser Region eingetragen."
delfriend-noOwner: "Du kannst keine Freunde von einer Region ohne Besitzer entfernen."
linksigns-multipleRegions: "Mehrere Regionen gefunden: &7%0%."
linksigns-multipleRegionsAdvice: "Bitte klicke nochmal oder benutze '/as linksigns' um aufzuhören."
linksigns-noRegions: "Keine AreaShop Regionen in Cursorrichtung gefunden, bitte stell sicher, dass die Region in AreaShop registriert ist. &7(Maximale Reichweite 100 Blöcke)"
linksigns-regionFound: "Region %region% wurde gefunden, mach einen Linksklick auf ein Schild um die Region mit dem Schild zu verbinden."
linksigns-signFound: "Schild gefunden bei (%0%, %1%, %2%), mach einen Rechtsklick auf eine Region um das Schild zu verbinden."
linksigns-noSign: "Kein Schild in Cursorrichtung gefunden, bitte stell sicher, dass du eine direkte Sicht auf ein Schild hast und klicke erneut &7(Maximale Reichweite 100 Blöcke)."
linksigns-alreadyRegistered: "Dieses Schild ist bereits auf die Region %region% registriert, klicke erneut um ein anderes Schild zu wählen."
linksigns-first: "Du bist nun im Schilderverbindungsmodus."
linksigns-next: "&7Linksklicke um ein Schild zu wählen, Rechtsklicke um eine Region zu wählen. Benutze /as linksigns um aufzuhören."
linksigns-noPermission: "Du hast keine Berechtigungen um den Schilder-Massenverbindungsmodus zu benutzen."
linksigns-stopped: "Schilder-Verbindungsmodus verlassen."
stack-help: "/as stack <Menge> <Abstand> <Name> <rent|buy> [Gruppe].\n&7 <Menge> Nummer der Regionen, die erstellt werden.\n <Abstand> Block-Abstand zwischen den Regionen.\n <Name> Namen der Regionen (Nummer wird dahinter sein).\n <rent|buy> Macht die Regionen zu kauf- oder Mietregionen\n [Gruppe] Eine Gruppe, die zu den erstellten Regionen hinzugefügt wird.\n Die Regionen werden in deiner Blickrichtung erstellt."
stack-accepted: "Erstelle %0% %1% Regionen mit %2% Blöcken Abstand, Namen beginnend mit %3% und einer Zahl dahinter. %4%"
stack-addToGroup: "Gruppe '%0%' wird zu den erstellten Regionen hinzugefügt."
stack-noPermission: "Du hast keine Berechtigungen um Regionen massenweise in AreaShop zu erstellen und hinzuzufügen."
stack-wrongAmount: "'%0%' ist keine korrekte Anzahl von Regionen."
stack-wrongGap: "'%0%' ist keine korrekte Nummer von Blöcken für den Abstand, der zwischen den Regionen sein soll."
stack-noSelection: "Du hast keine Auswahl, die angibt, wo die erste Region erstellt werden soll."
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-noRegion: "Die angegebene Region ist nicht registriert: %0%."
setlandlord-success: "%landlord% wurde erfolgreich als Vermieter der Region %region% gesetzt."
timeleft-years: "%0% Jahre"
timeleft-months: "%0% Monate"
timeleft-days: "%0% Tage"
timeleft-hours: "%0% Stunden"
timeleft-minutes: "%0% Minuten"
timeleft-second: "%0% Sekunde"
timeleft-seconds: "%0% Sekunden"
timeleft-ended: "abgelaufen"
greeting-forrent: "%region% kann gemietet werden für %price% je %duration%."
greeting-rented: "%region% ist vermietet an %player% bis %until%."
greeting-forsale: "%region% kann gekauft werden für %price%."
greeting-bought: "%region% ist Eigentum von %player%."
greeting-resale: "%region% kann %player% für %resaleprice% abgekauft werden."
update-playerNotify: "&2Es ist ein Update von AreaShop V%0% auf %1% verfügbar, lade die neuste Version hier herunter: https://github.com/NLthijs48/AreaShop/releases."
+398 -218
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.2, Percentage translated: 100% (source), author: NLThijs48 ║
# ║ Language: English, Version: V2.3.0, 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) ║
@@ -8,11 +8,52 @@
# ║ 4: Change the strings in the new file to your liking and save the file ║
# ║ 5: Use '/as reload' or reload/restart your server to see the changes ║
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
action: "[blue][bold]<%0%>[/bold]"
button: "[bold]<%0%>[/bold]"
command:
- "[bold]%0%[/bold]"
- " hover: %lang:action|Use %1%|%"
- " command: %1%"
helpCommand:
- "[gold]%0% [gray]-[reset]"
- " hover: %lang:action|Use %0%|%"
- " command: %0%"
region: "%lang:tRegion|%region%|%"
tRegion:
- "[bold]%0%[/bold]"
- " hover: Region %0%"
- " hover: %lang:action|Region information|%"
- " command: /areashop info region %0%"
player: "%lang:tPlayer|%player%|%"
tPlayer:
- "[bold]%0%[/bold]"
- " hover: Player %0%"
- " hover: %lang:action|Regions of %0%|%"
- " command: /areashop info player %0%"
landlord:
- "[bold]%landlord%[/bold]"
- " hover: Landlord %landlord%"
- " hover: %lang:action|Regions of %landlord%|%"
- " command: /areashop info player %landlord%"
total-maximum: "You can't rent and buy more than %0% region(s) in total (you already have %1% in group '%2%')."
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 '%world%')."
general-noRegion: "You cannot do that, the WorldGuard region is currently unavailable (region '%region%')."
general-noWorld: "You cannot do that, the world of %lang:region% is currently unavailable (world '%world%')."
general-noRegion: "You cannot do that, the WorldGuard region is currently unavailable (region %lang:region%)."
general-noEconomy: "There is no Economy plugin installed or it is not setup correctly, notify the server owner about this."
general-cancelled: "%0%"
@@ -22,219 +63,314 @@ cmd-weOnlyByPlayer: "Using a WorldEdit selection is only possible as a player, s
cmd-noSelection: "You don't have a WorldEdit selection."
cmd-noRegionsFound: "No regions registered in AreaShop are found in your selection."
cmd-noWERegionsFound: "No WorldEdit regions intersecting your selection are found."
cmd-notRegistered: "The specified region is not registered: %0%."
cmd-notRegistered: "The specified region is not available in AreaShop: %0%."
cmd-noRegionsAtLocation: "No regions found at your location, specify the region as argument."
cmd-moreRegionsAtLocation: "More than one region has been found at your location, specify the region as argument."
cmd-automaticRegionOnlyByPlayer: "Automatically determining the region is only possible for players, specify the region as argument."
help-header: "Help page, commands that you can execute."
help-noPermission: "You do not have permission to view the help page."
help-alias: "Command aliases: /areashop, /as."
help-help: "&6/as help &7-&r Shows this help page."
help-info: "&6/as info &7-&r Get info about current regions."
help-rent: "&6/as rent &7-&r Rent a region or extend your current rent."
help-buy: "&6/as buy &7-&r Buy a region."
help-unrent: "&6/as unrent &7-&r Unrent a region."
help-unrentOwn: "&6/as unrent &7-&r Unrent your own region."
help-sell: "&6/as sell &7-&r Sell a region."
help-sellOwn: "&6/as sell &7-&r Sell your own region."
help-reload: "&6/as reload &7-&r Reload all files and update the regions."
help-setrestore: "&6/as setrestore &7-&r Set restoring on/off and choose profile."
help-setprice: "&6/as setprice &7-&r Change the price of a region."
help-setduration: "&6/as setduration &7-&r Change the duration of a rent region."
help-teleport: "&6/as tp &7-&r Teleport to your bought/rented regions."
help-teleportAll: "&6/as tp &7-&r Teleport to a rent/buy region."
help-setteleport: "&6/as settp &7-&r Set teleport position for bought/rented regions."
help-setteleportAll: "&6/as settp &7-&r Set teleport position for a region."
help-find: "&6/as find &7-&r Find an empty buy or rent."
help-groupadd: "&6/as groupadd &7-&r Add a region to a group."
help-groupdel: "&6/as groupdel &7-&r Delete a region from a group."
help-grouplist: "&6/as grouplist &7-&r Display all groups currently registered."
help-groupinfo: "&6/as groupinfo &7-&r Display information about a group."
help-schemevent: "&6/as schemevent &7-&r Trigger a schematic event for a region."
help-add: "&6/as add &7-&r Register a region as rent or buy."
help-del: "&6/as del &7-&r Delete a registered region from AreaShop."
help-addsign: "&6/as addsign &7-&r Add a sign to an existing region."
help-delsign: "&6/as delsign &7-&r Delete the sign you are looking at."
help-me: "&6/as me &7-&r Check which regions you have (+expiration)."
help-setowner: "&6/as setowner &7-&r Set region owner or extend the rent."
help-resell: "&6/as resell &7-&r Put one of your regions into resell mode."
help-resellAll: "&6/as resell &7-&r Put a region into resell mode."
help-stopResell: "&6/as stopresell &7-&r Put your region back into sold mode."
help-stopResellAll: "&6/as stopresell &7-&r Put a region back into sold mode."
help-addFriend: "&6/as addfriend &7-&r Add a friend to your region."
help-addFriendAll: "&6/as addfriend &7-&r Add a friend to a region."
help-delFriend: "&6/as delfriend &7-&r Delete a friend from your region."
help-delFriendAll: "&6/as delfriend &7-&r Delete a friend from a region."
help-linksigns: "&6/as linksigns &7-&r Use bulk sign linking mode."
help-stack: "&6/as stack &7-&r Create multiple regions and add them."
help-setlandlord: "&6/as setlandlord &7-&r Set the landlord of a region."
help-help: "%lang:helpCommand|/as help|% Shows this help page."
help-info: "%lang:helpCommand|/as info|% Get info about current regions."
help-rent: "%lang:helpCommand|/as rent|% Rent a region or extend your current rent."
help-buy: "%lang:helpCommand|/as buy|% Buy a region."
help-unrent: "%lang:helpCommand|/as unrent|% Unrent a region."
help-sell: "%lang:helpCommand|/as sell|% Sell a region."
help-reload: "%lang:helpCommand|/as reload|% Reload all files and update the regions."
help-setrestore: "%lang:helpCommand|/as setrestore|% Set restoring on/off and choose profile."
help-setprice: "%lang:helpCommand|/as setprice|% Change the price of a region."
help-setduration: "%lang:helpCommand|/as setduration|% Change the duration of a rent region."
help-teleport: "%lang:helpCommand|/as tp|% Teleport to a rent/buy region."
help-setteleport: "%lang:helpCommand|/as settp|% Set teleport position for a region."
help-find: "%lang:helpCommand|/as find|% Find an empty buy or rent."
help-groupadd: "%lang:helpCommand|/as groupadd|% Add a region to a group."
help-groupdel: "%lang:helpCommand|/as groupdel|% Delete a region from a group."
help-grouplist: "%lang:helpCommand|/as grouplist|% Display all groups currently registered."
help-groupinfo: "%lang:helpCommand|/as groupinfo|% Display information about a group."
help-schemevent: "%lang:helpCommand|/as schemevent|% Trigger a schematic event for a region."
help-add: "%lang:helpCommand|/as add|% Register a region as rent or buy."
help-del: "%lang:helpCommand|/as del|% Delete a registered region from AreaShop."
help-addsign: "%lang:helpCommand|/as addsign|% Add a sign to an existing region."
help-delsign: "%lang:helpCommand|/as delsign|% Delete the sign you are looking at."
help-me: "%lang:helpCommand|/as me|% Check which regions you have (+expiration)."
help-setowner: "%lang:helpCommand|/as setowner|% Set region owner or extend the rent."
help-resell: "%lang:helpCommand|/as resell|% Put a region into resell mode."
help-stopResell: "%lang:helpCommand|/as stopresell|% Put a region back into sold mode."
help-addFriend: "%lang:helpCommand|/as addfriend|% Add a friend to a region."
help-delFriend: "%lang:helpCommand|/as delfriend|% Delete a friend from a region."
help-linksigns: "%lang:helpCommand|/as linksigns|% Use bulk sign linking mode."
help-stack: "%lang:helpCommand|/as stack|% Create multiple regions and add them."
help-setlandlord: "%lang:helpCommand|/as setlandlord|% Set the landlord of a region."
rent-help: "/as rent [regionname], the region you stand in will be used if not specified."
rent-help: "/as rent [region], 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 %region% until %until%."
rent-extended: "You extended your rent of %region% until %until%."
rent-extendedToMax: "You extended your rent of %region% until %until% (which is the maximum rental time of %maxrenttime%)."
rent-extend: "You can extend your rent by rightclicking the sign again or using /as rent."
rent-rented: "You rented %lang:region% until %until%, you can extend your rent by rightclicking the sign again or using /as rent."
rent-extended: "You extended your rent of %lang:region% until %until%."
rent-extendedToMax: "You extended your rent of %lang:region% until %until% (which is the maximum rental time of %maxrenttime%)."
rent-lowMoneyExtend: "You don't have enough money to extend the rent (you have %0% and you need %price%)."
rent-lowMoneyRent: "You don't have enough money to rent this region (you have %0% and you need %price%)."
rent-someoneElse: "Someone else already rented this region."
rent-lowMoneyRent: "You don't have enough money to rent %lang:region% (you have %0% and you need %price%)."
rent-someoneElse: "Someone else already rented %lang:region%."
rent-notRentable: "That region is not available for renting."
rent-maxExtends: "You cannot extend this rent anymore (the maximum is %maxextends% times), however after the rent is over you can rent this region again."
rent-maxRentTime: "You cannot rent this region more time in advance, the maximum time is %maxrenttime% and you have currently rented it for %timeleft%."
rent-restrictedToWorld: "You need to be in the '%world%' world to rent this region (you are in '%0%')."
rent-restrictedToRegion: "You need to be inside %region% to rent it."
rent-expireWarning: "Your region %region% has %timeleft% left, be sure to extend it if you want to keep it."
rent-alreadyAtFull: "%region% is already at or above the maximum rental time, you cannot extend it yet."
rent-maxExtends: "You cannot extend this rent anymore (the maximum is %maxextends% times), however after the rent is over you can rent %lang:region% again."
rent-maxRentTime: "You cannot rent %lang:region% more time in advance, the maximum time is %maxrenttime% and you have currently rented it for %timeleft%."
rent-restrictedToWorld: "You need to be in the '%world%' world to rent %lang:region% (you are in '%0%')."
rent-restrictedToRegion: "You need to be inside %lang:region% to rent it."
rent-expireWarning: "Your region %lang:region% has %timeleft% left, be sure to extend it if you want to keep it."
rent-alreadyAtFull: "%lang:region% is already at or above the maximum rental time, you cannot extend it yet."
buy-help: "/as buy [regionname], the region you stand in will be used if not specified."
buy-help: "/as buy [region], 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: "Region %region% is not available for buying."
buy-notBuyable: "Region %lang:region% is not available for buying."
buy-maximum: "You can't buy more than %0% region(s) (you already have %1% in group '%2%')."
buy-payError: "Something went wrong with paying, try again later."
buy-succes: "You successfully bought %region%."
buy-successResale: "You successfully bought %region% from %0%."
buy-successSeller: "Your region %region% has been sold to %player% for %0%."
buy-lowMoney: "You don't have enough money to buy this region (you have %0% and you need %price%)."
buy-lowMoneyResell: "You don't have enugh money to buy this region (you have %0% and you need %resellprice%)."
buy-yours: "You already own this region."
buy-someoneElse: "Someone else already bought this region."
buy-restrictedToWorld: "You need to be in the '%world%' world to buy this region (you are in '%0%')."
buy-restrictedToRegion: "You need to be inside '%region%' to buy it."
buy-succes: "You successfully bought %lang:region%."
buy-successResale: "You successfully bought %lang:region% from %lang:tPlayer|%0%|%."
buy-successSeller: "Your region %lang:region% has been sold to %lang:player% for %0%."
buy-lowMoney: "You don't have enough money to buy %lang:region% (you have %0% and you need %price%)."
buy-lowMoneyResell: "You don't have enough money to buy %lang:region% (you have %0% and you need %resellprice%)."
buy-yours: "You already own %lang:region%."
buy-someoneElse: "Someone else already bought %lang:region%."
buy-restrictedToWorld: "You need to be in the '%world%' world to buy %lang:region% (you are in '%0%')."
buy-restrictedToRegion: "You need to be inside %lang:region% to buy it."
unrent-help: "/as unrent [regionname], the region you stand in will be used if not specified."
unrent-help: "/as unrent [region], the region you stand in will be used if not specified."
unrent-noPermission: "You don't have permission to unrent a region."
unrent-noPermissionOther: "You don't have permission to unrent another region."
unrent-notRegistered: "The region can't be unrented because it is not registered for renting."
unrent-notRented: "The region can't be unrented because it is not rented."
unrent-unrented: "You have unrented %region%."
unrent-other: "%region% has been unrented for %player%."
unrent-expired: "Your rent of %region% has expired."
unrent-unrented: "%lang:region% of %lang:player% has been unrented."
unrent-expired: "Your rent of %lang:region% has expired."
sell-help: "/as sell [regionname], the region you stand in will be used if not specified."
sell-help: "/as sell [region], the region you stand in will be used if not specified."
sell-notRegistered: "The region can't be sold because it is not registered for buying."
sell-notBought: "The region can't be sold because it is not someone's property."
sell-sold: "%region% has been sold for %player%."
sell-soldYours: "You have sold %region%."
sell-sold: "%lang:region% of %lang:player% has been sold."
sell-noPermission: "You don't have permission to sell a region."
sell-noPermissionOther: "You don't have permission to sell another region."
reload-reloading: "Reloaded all files, now checking rents and updating regions."
reload-updateStart: "&7Updating %0% regions at %1% per second."
reload-updateComplete: "&7Updating regions complete."
reload-updateStart: "[gray]Updating %0% regions at %1% per second."
reload-updateComplete: "[gray]Updating 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\n all\n rented [group]\n forrent [group]\n sold [group]\n forsale [group]\n player <player>\n region <region>\n nogroup"
info-help:
- "/as info[break]"
- " %lang:command|all|/as info all|%[break]"
- " %lang:command|rented|/as info rented|% [group] [page][break]"
- " %lang:command|forrent|/as info forrent|% [group] [page][break]"
- " %lang:command|sold|/as info sold|% [group] [page][break]"
- " %lang:command|forsale|/as info forsale|% [group] [page][break]"
- " %lang:command|reselling|/as info reselling|% [group] [page][break]"
- " %lang:command|nogroup|/as info nogroup [page]|%"
- " %lang:command|region|/as info region|% [region][break]"
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."
info-all-buys: "Regions registered for buying: &7%0%."
info-all-noBuys: "There are no regions registered for buying."
info-nogroupRents: "Rent regions without group: &7%0%."
info-nogroupBuys: "Buy regions without group: &7%0%."
info-nogroupNoRents: "There are no rent regions without a group."
info-nogroupNoBuys: "There are no buy regions without a group."
info-rented: "Rented regions: &7%0%."
info-noRented: "No regions are rented."
info-unrented: "Unrented regions: &7%0%."
info-noUnrented: "All regions are rented."
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-allHeader: "All regions%0%:"
info-rentedHeader: "Rented regions%0%:"
info-forrentHeader: "For rent regions%0%:"
info-forsaleHeader: "For sale regions%0%:"
info-soldHeader: "Sold regions%0%:"
info-resellingHeader: "Reselling regions%0%:"
info-nogroupHeader: "Regions without group%0%:"
info-limitedToGroup: " (limited to group %0%)"
info-nogroupNone: "There are no regions without a group."
info-noFiltergroup: "Group '%0%' does not exist and therefore cannot be used to limit the results."
info-noRegions: "No regions have been found."
info-wrongPage: "%0% is not a correct page number."
info-entryForrent: "[darkgreen][bold]►[reset] %lang:region%: For rent for %price% per %duration%."
info-entryRented: "[darkgreen][bold]►[reset] %lang:region%: Rented to %lang:player%."
info-entryForsale: "[darkgreen][bold]►[reset] %lang:region%: For sale for %price%."
info-entrySold: "[darkgreen][bold]►[reset] %lang:region%: Sold to %lang:player%."
info-entryReselling: "[darkgreen][bold]►[reset] %lang:region%: Sold to %lang:player% (reselling)."
info-pageStatus:
- "[gray]Page %0%/%1%"
info-pagePrevious:
- " [gray][bold]◄Previous[/bold] "
- " hover: %lang:action|Show previous page|%"
- " command: %0%"
info-pageNoPrevious:
- " [darkgray][bold]◄Previous[/bold] "
- " hover: This is already the first page"
info-pageNext:
- " [gray][bold]Next►[/bold]"
- " hover: %lang:action|Show next page|%"
- " command: %0%"
info-pageNoNext:
- " [darkgray][bold]Next►[/bold]"
- " hover: This is already the last page"
info-playerHelp: "/as info player <name>."
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-playerNoBuys: "%0% has not bought a region."
info-playerRents: "Regions rented by %lang:tPlayer|%0%|%: [gray]%1%"
info-playerNoRents: "%lang:tPlayer|%0%|% has not rented a region."
info-playerBuys: "Regions bought by %lang:tPlayer|%0%|%: [gray]%1%."
info-playerNoBuys: "%lang:tPlayer|%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%:"
info-regionHeaderBuy: "&2Information about %region%:"
info-regionHeaderRent: "[darkgreen]Information about %lang:region%:"
info-regionHeaderBuy: "[darkgreen]Information about %lang:region%:"
info-regionFooterRent: ""
info-regionFooterBuy: ""
info-regionRented: "&2&l►&r Rented by %player% until: &7%until%."
info-regionBought: "&2&l►&r Bought by %player%."
info-regionReselling: "&2&l►&r Bought by %player%, currently reselling."
info-regionExtending: "&2&l►&r Price to extend: &7%price% per %duration%."
info-regionCanBeRented: "&2&l►&r Price to rent: &7%price% per %duration%."
info-regionCanBeBought: "&2&l►&r Price to buy: &7%price%."
info-regionReselPrice: "&2&l►&r Resell price: &7%resellprice% (you can buy it from %player%)."
info-regionFriends: "&2&l►&r Added friends: &7%friends%."
info-regionMoneyBackBuy: "&2&l►&r Selling payback: &7%moneyback% (%moneybackpercent%% of the price)."
info-regionMoneyBackRent: "&2&l►&r Unrenting payback: &7%moneyback% (%moneybackpercent%% of the remaining time)."
info-regionMaxExtends: "&2&l►&r Maximum number of extensions: &7%maxextends% time(s)."
info-regionNoExtending: "&2&l►&r Rent cannot be extended."
info-regionExtendsLeft: "&2&l►&r Extensions left: &7%extendsleft% time(s) out of %maxextends%."
info-regionMaxRentTime: "&2&l►&r In advance renting: &7%maxrenttime% at maximum."
info-regionNoTeleport: "&2&l►&r Teleport location not set%0%."
info-regionTeleportHint: " &7(use '/as settp' for a better spot)"
info-regionTeleportAt: "&2&l►&r Teleport set at: &7(%0%, %1%, %2%, %3%, pitch:%4%, yaw:%5%)."
info-regionSigns: "&2&l►&r Connected signs: &7%0%."
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
info-regionGroups: "&2&l►&r Assigned groups: &7%0%."
info-regionInactiveUnrent: "&2&l►&r Auto unrent after: &7%inactivetime% of inactivity by the player."
info-regionInactiveSell: "&2&l►&r Auto sell after: &7%inactivetime% of inactivity by the player."
info-regionRestrictedRegionRent: "&2&l►&r You must be inside this region to rent it."
info-regionRestrictedWorldRent: "&2&l►&r You need to be inside world '%world%' to rent this region."
info-regionRestrictedRegionBuy: "&2&l►&r You must be inside this region to buy it."
info-regionRestrictedWorldBuy: "&2&l►&r You need to be inside world '%world%' to buy this region."
info-regionRestoringRent: "&2&l►&r Restoring is enabled &7(region will reset at unrent)%0%."
info-regionRestoringBuy: "&2&l►&r Restoring is enabled &7(region will reset at sell)%0%."
info-regionRented: "[darkgreen][bold]►[reset] Rented by %lang:player% until: [gray]%until%."
info-regionBought: "[darkgreen][bold]►[reset] Bought by %lang:player%."
info-regionReselling: "[darkgreen][bold]►[reset] Bought by %lang:player%, currently reselling."
info-regionExtending:
- "[darkgreen][bold]►[reset] "
- "[bold]Extend for[/bold]"
- " hover: Extend rent of %region%"
- " hover: with %duration% for %price%"
- " hover: %lang:action|Extend rent of %region%|%"
- " command: /areashop rent %region%"
- ": [gray]%price% per %duration%."
info-regionCanBeRented:
- "[darkgreen][bold]►[reset] "
- "[bold]Rent for[/bold]"
- " hover: Rent %region% for %price% per %duration%"
- " hover: %lang:action|Rent %region%|%"
- " command: /areashop rent %region%"
- ": [gray]%price% per %duration%."
info-regionCanBeBought:
- "[darkgreen][bold]►[reset] "
- "[bold]Buy for[/bold]"
- " hover: Buy %region% for %price%"
- " hover: %lang:action|Buy %region%|%"
- " command: /areashop buy %region%"
- ": [gray]%price%."
info-regionReselPrice: "[darkgreen][bold]►[reset] Resell price: [gray]%resellprice% (you can buy it from %lang:player%)."
info-regionFriends: "[darkgreen][bold]►[reset] Added friends: [gray]%0%."
info-friend: "%lang:tPlayer|%0%|%"
info-friendRemove:
- "%lang:info-friend|%0%|%"
- "[red]✕[gray]"
- " hover: Region %region%"
- " hover: %lang:action|Remove %0% as friend|%"
- " command: /areashop delfriend %0% %region%"
info-regionMoneyBackBuy:
- "[darkgreen][bold]►[reset] Selling payback: [gray]%moneyback% (%moneybackpercent%% of the price)."
info-regionMoneyBackBuyClick:
- "[darkgreen][bold]►[reset] "
- "[bold]Selling payback[/bold]"
- " hover: Sell %region% and get back %moneyback%"
- " hover: %lang:action|Sell %region%|%"
- " command: /areashop sell %region%"
- ": [gray]%moneyback% (%moneybackpercent%% of the price)."
info-regionMoneyBackRent:
- "[darkgreen][bold]►[reset] Unrenting payback: [gray]%moneyback% (%moneybackpercent%% of the remaining time)."
info-regionMoneyBackRentClick:
- "[darkgreen][bold]►[reset] "
- "[bold]Unrenting payback[/bold]"
- " hover: Unrent %region% and get back %moneyback%"
- " hover: %lang:action|Unrent %region%|%"
- " command: /areashop unrent %region%"
- ": [gray]%moneyback% (%moneybackpercent%% of the remaining time)."
info-regionMaxExtends: "[darkgreen][bold]►[reset] Maximum number of extensions: [gray]%maxextends% time(s)."
info-regionNoExtending: "[darkgreen][bold]►[reset] Rent cannot be extended."
info-regionExtendsLeft: "[darkgreen][bold]►[reset] Extensions left: [gray]%extendsleft% time(s) out of %maxextends%."
info-regionMaxRentTime: "[darkgreen][bold]►[reset] In advance renting: [gray]%maxrenttime% at maximum."
info-prefix: "[darkgreen][bold]►[reset] "
info-regionTeleport:
- "[bold]Go to the region[/bold]"
- " hover: %lang:action|Teleport to %region%|%"
- " command: /areashop tp %region%"
info-setRegionTeleport:
- "[bold]set teleport location[/bold]"
- " hover: %region%"
- " hover: %lang:action|Set teleport location|%"
- " command: /areashop settp %region%"
info-regionSigns: "[darkgreen][bold]►[reset] Connected signs: [gray]%0%."
info-regionSignLocation: "[gray](%0%, %1%, %2%, %3%)[reset]"
info-regionGroups: "[darkgreen][bold]►[reset] Assigned groups: [gray]%0%."
info-regionInactiveUnrent: "[darkgreen][bold]►[reset] Auto unrent after: [gray]%inactivetime% of inactivity by the player."
info-regionInactiveSell: "[darkgreen][bold]►[reset] Auto sell after: [gray]%inactivetime% of inactivity by the player."
info-regionRestrictedRegionRent: "[darkgreen][bold]►[reset] You must be inside %lang:region% to rent it."
info-regionRestrictedWorldRent: "[darkgreen][bold]►[reset] You need to be inside world '%world%' to rent %lang:region%."
info-regionRestrictedRegionBuy: "[darkgreen][bold]►[reset] You must be inside %lang:region% to buy it."
info-regionRestrictedWorldBuy: "[darkgreen][bold]►[reset] You need to be inside world '%world%' to buy %lang:region%."
info-regionRestoringRent: "[darkgreen][bold]►[reset] Restoring is enabled [gray](region will reset at unrent)%0%."
info-regionRestoringBuy: "[darkgreen][bold]►[reset] Restoring is enabled [gray](region will reset at sell)%0%."
info-regionRestoringProfile: " (profile: %0%)"
info-regionLandlord: "&2&l►&r Landlord: &7%landlord% (receives the money)."
info-regionLandlord: "[darkgreen][bold]►[reset] Landlord: [gray]%lang:landlord% (receives the money)."
info-regionNotExisting: "The specified region is not registered: %0%."
setrestore-help: "/as setrestore <region> <true|false|general> [profile]."
setrestore-noPermission: "You don't have permission to change the restore settings."
setrestore-notRegistered: "The specified region is not registered: %0%."
setrestore-invalidSetting: "'%0%' is not a valid state, should be true, false or general."
setrestore-success: "Successfully set the restore setting of %region% to '%0%'."
setrestore-successProfile: "Successfully set the restore setting of %region% to '%0%' and the profile to '%1%'."
setrestore-success: "Successfully set the restore setting of %lang:region% to '%0%'."
setrestore-successProfile: "Successfully set the restore setting of %lang:region% to '%0%' and the profile to '%1%'."
setprice-noPermission: "You don't have permission to change the price of a region."
setprice-help: "/as setprice <price> [region], the region you stand in will be used if not specified."
setprice-notRegistered: "The specified region is not registered: %0%."
setprice-wrongPrice: "'%0%' is not a valid price."
setprice-successRent: "Price of region %region% changed to %price% per %duration%."
setprice-successBuy: "Price of region %region% changed to %price%."
setprice-successRemoved: "Price of %region% has been removed, it will now use the price from a group or the default.yml file, new price: %price%."
setprice-noLandlord: "You don't have permission to change the price because you are not the landlord of %region%."
setprice-successRent: "Price of region %lang:region% changed to %price% per %duration%."
setprice-successBuy: "Price of region %lang:region% changed to %price%."
setprice-successRemoved: "Price of %lang:region% has been removed, it will now use the price from a group or the default.yml file, new price: %price%."
setprice-noLandlord: "You don't have permission to change the price because you are not the landlord of %lang:region%."
setduration-noPermission: "You don't have permission to change the duration of a rent."
setduration-help: "/as setduration <amount> <identifier> [region], the region you stand in will be used if not specified."
setduration-notRegistered: "%0% is not registered for renting."
setduration-wrongAmount: "'%0%' is not a valid amount, use a whole number."
setduration-wrongFormat: "'%0%' is not a proper timeformat, check the documentation on Bukkit."
setduration-success: "Duration of region %region% changed to '%duration%'."
setduration-noLandlord: "You don't have permission to change the duration because you are not the landlord of %region%."
setduration-successRemoved: "Duration of %region% has been removed, it will now use the duration from a group or the default.yml file, new duration: %duration%."
setduration-success: "Duration of region %lang:region% changed to '%duration%'."
setduration-noLandlord: "You don't have permission to change the duration because you are not the landlord of %lang:region%."
setduration-successRemoved: "Duration of %lang:region% has been removed, it will now use the duration from a group or the default.yml file, new duration: %duration%."
setup-noRegion: "You did not specify a region on the second line."
setup-wrongRegion: "The region you specified does not exist."
setup-alreadyRentSign: "The region you specified is already added to AreaShop as a rent region, add signs with [as] on the first line or '/as addsign'."
setup-alreadyBuySign: "The region you specified is already added to AreaShop as a buy region, add signs with [as] on the first line or '/as addsign'."
setup-noDuration: "You did not specify how long the region can be rented, do this on the third line."
setup-wrongDuration: "The time specified is not in the correct format, example: 1 day."
setup-noPrice: "You did not specify the price on the fourth line."
setup-wrongPrice: "You did not specify the price correctly, use numbers only."
setup-rentSuccess: "Renting of region %0% is setup correctly."
setup-buySuccess: "Buying of region %0% is setup correctly."
setup-rentSuccess: "Renting of region %lang:region% is setup correctly."
setup-buySuccess: "Buying of region %lang:region% is setup correctly."
setup-noPermissionRent: "You don't have permission for setting up rental regions."
setup-noPermissionBuy: "You don't have permission for setting up buy regions."
setup-couldNotDetect: "Found multiple regions with the same priority and/or parent/child relation, specify one on the second line (2 of the regions that were found: %0% and %1%)."
setup-couldNotDetect: "Found multiple regions with the same priority and/or parent/child relation, specify one on the second line (2 of the regions that were found: %lang:tRegion|%0%|% and %lang:tRegion|%1%|%)."
setup-blacklisted: "%0% is on the blacklist and cannot be added to AreaShop."
setup-noPermission: "You cannot add the region '%0%', you are not an owner/member or don't have the permission for it."
destroy-noPermissionRent: "You don't have permission for deregistering a rental region."
destroy-noPermissionBuy: "You don't have permission for deregistering a buy region."
destroy-successRent: "%region% successfully deregistered as rental region."
destroy-successBuy: "%region% successfully deregistered as buy region."
destroy-successRent: "%lang:region% successfully deregistered as rental region."
destroy-successBuy: "%lang:region% successfully deregistered as buy region."
teleport-help: "/as tp <region> [sign]."
teleport-noRentOrBuy: "The specified region is not registered: %0%."
@@ -244,9 +380,9 @@ teleport-noPermissionSign: "You don't have permission to teleport to the sign of
teleport-noPermissionOtherSign: "You don't have permission to teleport to signs of regions you do not own."
teleport-noPermissionFriend: "You don't have permission to teleport to regions you are added to as a friend."
teleport-noPermissionFriendSign: "You don't have permission to teleport to the sign of regions you are added to as a friend."
teleport-success: "You teleported to %region%."
teleport-successSign: "You teleported to the sign of %region%."
teleport-noSafe: "No safe position found in %region%, no spots in the region left or maximum tries exceeded (%0%/%1%)."
teleport-success: "You teleported to %lang:region%."
teleport-successSign: "You teleported to the sign of %lang:region%."
teleport-noSafe: "No safe position found in %lang:region%, no spots in the region left or maximum tries exceeded (%0%/%1%)."
teleport-blocked: "You can't teleport because the position is outside the region, and you are forced to teleport inside."
teleport-changedToSign: "You only have permission to teleport to the sign and not inside the region, teleporting to sign."
teleport-changedToNoSign: "No sign available to teleport to, trying to teleport inside the region instead."
@@ -255,14 +391,14 @@ setteleport-help: "/as settp [region] [reset], the region you stand in will be u
setteleport-noPermission: "You don't have permission to set the teleport location."
setteleport-noPermissionOther: "You don't have permission to set the teleport location for a region you do not own."
setteleport-noRentOrBuy: "The specified region is not registered: %0%."
setteleport-success: "Teleport location of %region% set."
setteleport-success: "Teleport location of %lang:region% set."
setteleport-notInside: "The location has to be inside the region."
setteleport-reset: "Teleport location of %region% has been reset."
setteleport-reset: "Teleport location of %lang:region% has been reset."
find-help: "/as find <buy|rent> [maxprice] [group]."
find-noPermission: "You don't have permission to search regions and teleport to them."
find-success: "Found a %0% region: %region%, while searching with a max price of your balance: %1%%2%."
find-successMax: "Found a %0% region: %region%, while searching with a max price of %1%%2%."
find-success: "Found a %0% region: %lang:region%, while searching with a max price of your balance: %1%%2%."
find-successMax: "Found a %0% region: %lang:region%, while searching with a max price of %1%%2%."
find-wrongMaxPrice: "The specified maximum price is not a correct number: %0%."
find-wrongGroup: "The specified group does not exist: %0%."
find-noneFound: "No %0% region found while searching with a max price of your balance: %1%%2%."
@@ -271,80 +407,79 @@ find-onlyInGroup: ", only searched for regions in group: %0%."
groupadd-help: "/as groupadd <group> [region], if no region specified all regions from your WorldEdit selection are used."
groupadd-noPermission: "You don't have permission to add regions to groups."
groupadd-noRegion: "The specified region is not registered: %0%."
groupadd-success: "Region %region% has been added to group '%0%', this group now has %1% member(s)."
groupadd-failed: "Region %region% is already a member of group '%0%'."
groupadd-weSuccess: "Added to group %0%: &7%1%."
groupadd-weFailed: "Were already in group %0%: &7%1%."
groupadd-success: "Region %lang:region% has been added to group '%0%', this group now has %1% member(s)."
groupadd-failed: "Region %lang:region% is already a member of group '%0%'."
groupadd-weSuccess: "Added to group %0%: [gray]%1%."
groupadd-weFailed: "Were already in group %0%: [gray]%1%."
groupdel-help: "/as groupdel <group> [region], if no region specified all regions from your WorldEdit selection are used."
groupdel-noPermission: "You don't have permission to remove regions from groups."
groupdel-noRegion: "The specified region is not registered: %0%."
groupdel-success: "Region %region% has been removed from group '%0%', this group now has %1% member(s)."
groupdel-failed: "Region %region% is not a member of group '%0%'."
groupdel-weSuccess: "Removed from group %0%: &7%1%."
groupdel-weFailed: "Were not in group %0% anyway: &7%1%."
groupdel-success: "Region %lang:region% has been removed from group '%0%', this group now has %1% member(s)."
groupdel-failed: "Region %lang:region% is not a member of group '%0%'."
groupdel-weSuccess: "Removed from group %0%: [gray]%1%."
groupdel-weFailed: "Were not in group %0% anyway: [gray]%1%."
grouplist-noPermission: "You don't have permission to display the registered groups."
grouplist-noGroups: "There are currently no groups registered."
grouplist-success: "The following groups are registered: &7%0%."
grouplist-success: "The following groups are registered: [gray]%0%."
groupinfo-help: "/as groupinfo <group>."
groupinfo-noPermission: "You don't have permission to display information about a group."
groupinfo-noGroup: "There is no group registered with the name '%0%', use /as grouplist to check groups."
groupinfo-members: "The following regions are member of group %0%: &7%1%."
groupinfo-members: "The following regions are member of group %0%: [gray]%1%."
groupinfo-noMembers: "Group %0% does not have any members."
schemevent-help: "/as schemevent <region> <created|deleted|rented|unrented|bought|sold>."
schemevent-noRegion: "The specified region is not registered: %0%."
schemevent-wrongEvent: "The specified event '%0%' does not exist, use one of the following: &7%1%."
schemevent-success: "Event '%0%' has successfully been triggered for region %region%."
schemevent-wrongEvent: "The specified event '%0%' does not exist, use one of the following: [gray]%1%."
schemevent-success: "Event '%0%' has successfully been triggered for region %lang:region%."
schemevent-noPermission: "You don't have permission to trigger schematic events."
add-help: "/as add <rent|buy> [region] [world]."
add-noPermission: "You don't have permission to add a region to AreaShop."
add-success: "Added as %0%: &7%1%."
add-failed: "Already registered: &7%0%."
add-blacklisted: "On the blacklist: &7%0%."
add-success: "Added as %0%: [gray]%1%."
add-failed: "Already registered: [gray]%0%."
add-blacklisted: "On the blacklist: [gray]%0%."
add-specifyWorld: "Specify the world of the region when using from console."
add-incorrectWorld: "World '%0%' not found, try again (case-sensitive)."
add-noRegion: "Region '%0%' does not exist in this world."
add-noPermissionRegions: "No permission to add: &7%0%."
add-noPermissionOwnerMember: "&7You either are not a member/owner of this region or have no permission to add your regions."
add-noRegion: "WorldGuard region '%0%' does not exist in this world."
add-noPermissionRegions: "No permission to add: [gray]%0%."
add-noPermissionOwnerMember: "[gray]You either are not a member/owner of these regions or have no permission to add your regions."
del-noRegion: "The specified region is not registered: %0%."
del-noPermission: "You don't have permission to remove regions."
del-success: "Removed regions: &7%0%."
del-failed: "No permission to remove or not registered: &7%0%."
del-success: "Removed regions: [gray]%0%."
del-failed: "No permission to remove or not registered: [gray]%0%."
addsign-help: "/as addsign [region] [profile]."
addsign-noSign: "You are not looking at a sign."
addsign-noRegion: "Region '%0%' is not known in AreaShop, check if you added it to AreaShop already."
addsign-noRegions: "No region found around the sign position."
addsign-couldNotDetect: "Found multiple regions around the sign, specify region as extra argument (2 of the regions that were found: %0% and %1%)."
addsign-couldNotDetectSign: "Found multiple regions around the sign, specify region on the second line (2 of the regions that were found: %0% and %1%)."
addsign-wrongProfile: "The specified profile does not exist, use one of the following (check config): &7%0%."
addsign-success: "The sign has been added to %region%."
addsign-successProfile: "The sign has been added to %region% with profile %0%."
addsign-alreadyRegistered: "That sign is already registered for region %region%."
addsign-couldNotDetect: "Found multiple regions around the sign, specify region as extra argument (2 of the regions that were found: %lang:tRegion|%0%|% and %lang:tRegion|%1%|%)."
addsign-couldNotDetectSign: "Found multiple regions around the sign, specify region on the second line (2 of the regions that were found: %lang:tRegion|%0%|% and %lang:tRegion|%1%|%)."
addsign-wrongProfile: "The specified profile does not exist, use one of the following (check config): [gray]%0%."
addsign-profile:
- "[bold]%0%[/bold]"
- " hover: Signprofile %0%"
- " hover: %lang:action|Use this profile|%"
- " command: /areashop linksigns %0%"
addsign-success: "The sign has been added to %lang:region%."
addsign-successProfile: "The sign has been added to %lang:region% with profile %0%."
addsign-alreadyRegistered: "That sign is already registered for region %lang:region%."
addsign-noPermission: "You don't have permission to add a sign."
delsign-noSign: "You are not looking at a sign."
delsign-noPermission: "You don't have permission to delete a sign."
delsign-noRegion: "That sign does not belong to an AreaShop region."
delsign-success: "The sign has been removed from region %region%."
delsign-success: "The sign has been removed from region %lang:region%."
me-noPermission: "You don't have permission to check which regions you have."
me-header: "Regions of %lang:tPlayer|%0%|%:"
me-notAPlayer: "You are not a player so you can't have any regions."
me-noRentRegions: "You have not rented any rent regions."
me-noBuyRegions: "You have not bought any buy regions."
me-rentRegions: "You have rented the following regions:"
me-buyRegions: "You have bought the following regions:"
me-rentLine: "&2&l►&r %region% until %until% &7(%timeleft% left)."
me-buyLine: "&2&l►&r %region%."
me-noFriendRegions: "You have not been added to any regions as friend."
me-friendRegions: "You are added as a friend to the following regions:"
me-friendLine: "&2&l►&r %region% &7(owner: %player%)."
me-rentLine: "[darkgreen][bold]►[reset] %lang:region% [gray](until %until%, %timeleft% left)."
me-buyLine: "[darkgreen][bold]►[reset] %lang:region%."
me-friendLine: "[darkgreen][bold]►[reset] %lang:region% [gray](added as friend, owner: %lang:player%)."
me-nothing: "%lang:tPlayer|%0%|% has not rented or bought regions and is not added as friend to one."
me-noPlayer: "%0% cannot be found, probably never joined the server."
setowner-help: "/as setowner <player> [region], the region you stand in will be used if not specified."
setowner-noPermission: "You don't have permission to set the owner of a region."
@@ -352,33 +487,31 @@ setowner-noPermissionRent: "You don't have permission to set the owner of rent r
setowner-noPermissionBuy: "You don't have permission to set the owner of buy regions."
setowner-notRegistered: "The specified region is not registered, owner cannot be set."
setowner-noPlayer: "Could not get the UUID of the specified player: %0%."
setowner-succesRent: "Owner of %region% successfully changed to %player%, rented until %until% (%timeleft% left)."
setowner-succesRentExtend: "Owner was already %player%, rent extended with '%duration%', now rented until %until% (%timeleft% left)."
setowner-succesBuy: "Owner of %region% successfully changed to %player%."
setowner-succesRent: "Owner of %lang:region% successfully changed to %lang:player%, rented until %until% (%timeleft% left)."
setowner-succesRentExtend: "Owner was already %lang:player%, rent extended with '%duration%', now rented until %until% (%timeleft% left)."
setowner-succesBuy: "Owner of %lang:region% successfully changed to %lang:player%."
resell-help: "/as resell <price> [region], the region you stand in will be used if not specified."
resell-wrongPrice: "'%0%' is not a valid price."
resell-notRegistered: "The specified region is not registered: %0%."
resell-noRegionFound: "No AreaShop region could be found at your location, try specifying the region as argument."
resell-notBought: "You can't resell %region% because it is not sold yet."
resell-success: "%region% is successfully put into reselling mode for %resellprice%."
resell-notBought: "You can't resell %lang:region% because it is not sold yet."
resell-success: "%lang:region% is successfully put into reselling mode for %resellprice%."
resell-noPermission: "You don't have permission to set your region in reselling mode."
resell-noPermissionOther: "You don't have permission to set regions in reselling mode."
stopresell-help: "/as stopresell [region], the region you stand in will be used if not specified."
stopresell-notRegistered: "The specified region is not registered: %0%."
stopresell-noRegionFound: "No AreaShop region could be found at your location, try specifying the region as argument."
stopresell-notResell: "You can't stop reselling %region% because it is not in resell mode."
stopresell-success: "%region% is successfully put back into sold mode."
stopresell-notResell: "You can't stop reselling %lang:region% because it is not in resell mode."
stopresell-success: "%lang:region% is successfully put back into sold mode."
stopresell-noPermission: "You don't have permission to set your region back to sold mode."
stopresell-noPermissionOther: "You don't have permission to set regions back to sold mode."
addfriend-help: "/as addfriend <player> [region], the region you stand in will be used if not specified."
addfriend-noPermissionOther: "You don't have permission to add friends to regions that are not yours."
addfriend-noPermission: "You don't have permission to add friends to your region."
addfriend-successOther: "%0% has been added as friend to region %region%."
addfriend-success: "%0% has been added as friend to your region %region%."
addfriend-alreadyAdded: "%0% is already added as friend for this region."
addfriend-successOther: "%lang:tPlayer|%0%|% has been added as friend to region %lang:region%."
addfriend-success: "%lang:tPlayer|%0%|% has been added as friend to your region %lang:region%."
addfriend-alreadyAdded: "%lang:tPlayer|%0%|% is already added as friend to %lang:region%."
addfriend-self: "Adding the owner of the region as friend would be pointless."
addfriend-noOwner: "You cannot add friends to a region without owner."
addfriend-notVisited: "You cannot add %0% because he did not visit the server yet."
@@ -386,38 +519,85 @@ addfriend-notVisited: "You cannot add %0% because he did not visit the server ye
delfriend-help: "/as delfriend <player> [region], the region you stand in will be used if not specified."
delfriend-noPermissionOther: "You don't have permission to delete friends from regions that are not yours."
delfriend-noPermission: "You don't have permission to delete friends from your region."
delfriend-successOther: "%0% has been deleted as friend from region %region%."
delfriend-success: "%0% has been deleted as friend from your region %region%."
delfriend-notAdded: "%0% is not added as friend for this region."
delfriend-successOther: "%lang:tPlayer|%0%|% has been deleted as friend from region %lang:region%."
delfriend-success: "%lang:tPlayer|%0%|% has been deleted as friend from your region %lang:region%."
delfriend-notAdded: "%lang:tPlayer|%0%|% is not added as friend to %lang:region."
delfriend-noOwner: "You cannot remove friends from a region without owner."
linksigns-multipleRegions: "Found multiple regions: &7%0%."
linksigns-multipleRegions: "Found multiple regions: [gray]%0%."
linksigns-multipleRegionsAdvice: "Click another time to try again or use '/as linksigns' to stop."
linksigns-noRegions: "No AreaShop regions found in the direction of your cursor, make sure the region is added to AreaShop &7(maximum range 100 blocks)."
linksigns-regionFound: "Region %region% has been found, now point to a sign and leftclick to link it."
linksigns-noRegions: "No AreaShop regions found in the direction of your cursor, make sure the region is added to AreaShop [gray](maximum range 100 blocks)."
linksigns-regionFound: "Region %lang:region% has been found, now point to a sign and leftclick to link it."
linksigns-signFound: "Found a sign at (%0%, %1%, %2%), now point towards a region and rightclick to link it"
linksigns-noSign: "No sign found in the direction of your cursor, make sure you have a direct sight to a sign and click again &7(maximum range 100 blocks)."
linksigns-alreadyRegistered: "That sign is already registered for region %region%, click again to select another sign."
linksigns-noSign: "No sign found in the direction of your cursor, make sure you have a direct sight to a sign and click again [gray](maximum range 100 blocks)."
linksigns-alreadyRegistered: "That sign is already registered for region %lang:region%, click again to select another sign."
linksigns-first: "You have entered sign linking mode."
linksigns-next: "&7Leftclick to select a sign, rightclick to select a region, use /as linksigns to stop."
linksigns-next: "[gray]Leftclick to select a sign, rightclick to select a region, use /as linksigns to stop."
linksigns-noPermission: "You don't have permission to enter bulk sign linking mode."
linksigns-stopped: "Exited sign linking mode."
stack-help: "/as stack <amount> <gap> <name> <rent|buy> [group].\n&7 <amount> Number of regions that will be created.\n <gap> Blocks distance between the regions.\n <name> Name of the regions (number will be behind it).\n <rent|buy> Make then rent or buy regions.\n [group] A group to add the created regions to.\n The regions will be created in the direction you are facing."
stack-help:
- "/as stack <amount> <gap> <name> <rent|buy> [group].[break]"
- " [gray]<amount> Number of regions that will be created.[break]"
- " [gray]<gap> Blocks distance between the regions.[break]"
- " [gray]<name> Name of the regions (number will be behind it).[break]"
- " [gray]<rent|buy> Make then rent or buy regions.[break]"
- " [gray][group] A group to add the created regions to.[break]"
- " [gray]The regions will be created in the direction you are facing."
stack-accepted: "Starting to create %0% %1% regions with %2% blocks in between, names start with %3% and have a number behind them.%4%"
stack-addToGroup: " Created regions will be added to the group '%0%'."
stack-noPermission: "You don't have permission to create and add regions to AreaShop in bulk."
stack-wrongAmount: "'%0%' is not a correct amount of regions."
stack-wrongGap: "'%0%' is not a correct number for the number of blocks gap between regions."
stack-noSelection: "You don't have a selection that indicates where the first region should be created."
stack-addStart: "&7Adding %0% regions at %1% per second."
stack-addComplete: "&7Adding regions complete."
stack-addStart: "[gray]Adding %0% regions at %1% per second."
stack-addComplete: "[gray]Adding regions complete."
stack-unclearDirection: "Please look clearly in the north, east, south or west direction, currently detected %0%."
setlandlord-help: "/as setlandlord <player> [region], the region you stand in will be used if not specified."
setlandlord-noPermission: "You don't have permission to set the landlord for a region."
setlandlord-noRegion: "The specified region is not registered: %0%."
setlandlord-success: "%landlord% has successfully been set as landlord of %region%."
setlandlord-success: "%lang:landlord% has successfully been set as landlord of %lang:region%."
message-help: "/as message <player> <message...>"
message-noPermission: "You do not have permission to send AreaShop messages."
message-notOnline: "%0% is not online."
confirm-rent:
- "%lang:prefix%Are you sure you want to rent %lang:tRegion|%0%|%?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Click to rent %0%|%"
- " hover: %lang:action|Rent %0%|%"
- " command: /areashop rent %0%"
confirm-extend:
- "%lang:prefix%Are you sure you want to extend %lang:tRegion|%0%|%?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Click to extend %0%|%"
- " hover: %lang:action|Extend %0%|%"
- " command: /areashop rent %0%"
confirm-unrent:
- "%lang:prefix%Are you sure you want to stop renting %lang:tRegion|%0%|%?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Click to stop renting %0%|%"
- " hover: %lang:action|Stop renting %0%|%"
- " command: /areashop unrent %0%"
confirm-buy:
- "%lang:prefix%Are you sure you want to buy %lang:tRegion|%0%|%?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Click to buy %0%|%"
- " hover: %lang:action|Buy %0%|%"
- " command: /areashop buy %0%"
confirm-sell:
- "%lang:prefix%Are you sure you want to sell %lang:tRegion|%0%|%?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Click to sell %0%|%"
- " hover: %lang:action|Sell %0%|%"
- " command: /areashop sell %0%"
timeleft-years: "%0% years"
timeleft-months: "%0% months"
@@ -434,4 +614,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 https://github.com/NLthijs48/AreaShop/releases."
update-playerNotify: "[darkgreen]Update from AreaShop V%0% to %1% available, get the latest version at https://github.com/NLthijs48/AreaShop/releases."
-355
View File
@@ -1,355 +0,0 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: Finnish, Version: V2.2.2, Percentage translated: 80% ║
# ║ 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) ║
# ║ 3: Change the 'language' setting in config.yml to '<servername>', do not include '.yml' ║
# ║ 4: Change the strings in the new file to your liking and save the file ║
# ║ 5: Use '/as reload' or reload/restart your server to see the changes ║
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
total-maximum: "Et voi vuokrata tai ostaa yhteensä enempää kuin %0% alueen(aluetta) (sinulla on jo %1% ryhmässä '%2%')"
cmd-notValid: "Tuo komento ei ole käytettävissä, käytä '/as help' saadaksesi lisätietoja."
cmd-onlyByPlayer: "Tämän komennon voi suorittaa vain pelaaja."
cmd-weOnlyByPlayer: "Käytetään WorldEditin valintaa ainoastaan pelaajan toimesta, lisäksi erittele alueen nimi,"
cmd-noSelection: "Sinulla ei ole WorldEditin valintaa."
cmd-noRegionsFound: "Rekisteröityjä alueita ei löytynyt AreaShopista sinun valinnoillasi."
cmd-noWERegionsFound: "WorldEditin risteäviä alueita sinun valinnallasi ei löytynyt."
cmd-notRegistered: "Määritetty alue ei ole rekisteröity: %0%."
cmd-noRegionsAtLocation: "Alueita ei löytynyt sinun sijainnissasi, erittele alueen nimi."
cmd-moreRegionsAtLocation: "Enemmän kuin yksi alue on löydetty sinun sijainnissasi, erittele alueen nimi jota haluat tarkastella."
cmd-automaticRegionOnlyByPlayer: "Alueen automaattinen määrittäminen on vain mahdollinen pelaajille, erittele alueen nimi."
help-header: "Apusivu, komennot joita sinä voit suorittaa"
help-alias: "Komennon aliakset: /areashop, /as."
help-help: "&6/as help &7-&r Näyttää sinulle apusivun."
help-info: "&6/as info &7-&r Saadaksesi lisätietoa alueesta."
help-rent: "&6/as rent &7-&r Vuokrataksesi regionin tai laajentaaksesi nykyistä aluetta."
help-buy: "&6/as buy &7-&r Ostaa alueen."
help-unrent: "&6/as unrent &7-&r Lopettaa alueen vuokraamisen."
help-unrentOwn: "&6/as unrent &7-&r Lopettaa alueesi vuokraamisen."
help-sell: "&6/as sell &7-&r Myy alueen."
help-sellOwn: "&6/as sell &7-&r Myy alueesi."
help-reload: "&6/as reload &7-&r Päivittää kaikki tiedostot ja päivittää alueet."
help-setrestore: "&6/as setrestore &7-&r Asetta palauttaminen ON/OFF ja valitse profiili."
help-setprice: "&6/as setprice &7-&r Vaihda alueen hintaa."
help-setduration: "&6/as setduration &7-&r Vaihda vuokrattavan alueen vuokra-aikaa."
help-teleport: "&6/as tp &7-&r Teleporttaa sinun omistamalle/vuokraamalle alueelle."
help-teleportAll: "&6/as tp &7-&r Teleporttaa vuokrattavalle/ostettavalle alueelle."
help-setteleport: "&6/as settp &7-&r Aseta teleporttaus-paikka ostetulle/vuokratulle alueelle."
help-setteleportAll: "&6/as settp &7-&r Aseta teleporttaus-paikka alueelle."
help-find: "&6/as find &7-&r Etsi tyhjä vuokrattava tai ostettava alue."
help-groupadd: "&6/as groupadd &7-&r Lisää alue ryhmään."
help-groupdel: "&6/as groupdel &7-&r Poista alue ryhmästä."
help-grouplist: "&6/as grouplist &7-&r Näyttääksesi kaikki rekisteröidyt ryhmät."
help-groupinfo: "&6/as groupinfo &7-&r Näyttääksesi ryhmän tiedot."
help-schemevent: "&6/as schemevent &7-&r Aloittaa kaavamaisen tapahtuman alueelle."
help-add: "&6/as add &7-&r Rekisteröi alue vuokrattavaksi tai ostettavaksi."
help-del: "&6/as del &7-&r Poistaa rekisteröidyn alueen AreaShopista."
help-addsign: "&6/as addsign &7-&r Lisää kyltin jo olemassa olevalle alueelle."
help-delsign: "&6/as delsign &7-&r Poistaa kyltin jota katsot."
help-me: "&6/as me &7-&r Tarkastaaksesi mitä alueita sinulla on (+vanhentuminen)"
help-setowner: "&6/as setowner &7-&r Asettaa alueen omistajan tai pidentää alueen vuokrausta."
help-resell: "&6/as resell &7-&r Laittaa yhden sinun alueistasi jälleenmyynti tilaan."
help-resellAll: "&6/as resell &7-&r Laittaa alueen jäälleenmyynti tilaan."
help-stopResell: "&6/as stopresell &7-&r Laittaa sinun alueen takaisin myyntitilaan."
help-stopResellAll: "&6/as stopresell &7-&r Laittaa alueen takaisin myyntitilaan."
help-addFriend: "&6/as addfriend &7-&r Lisää kaveri sinun alueellesi."
help-addFriendAll: "&6/as addfriend &7-&r Lisää kaveri alueelle."
help-delFriend: "&6/as delfriend &7-&r Poista kaveri sinun alueeltasi."
help-delFriendAll: "&6/as delfriend &7-&r Poista kaveri alueelta."
help-linksigns: "&6/as linksigns &7-&r Käytä irtokylttiä yhdistämiseen."
help-stack: "&6/as stack &7-&r Luo useita alueita ja lisää ne."
rent-help: "/as rent [alueennimi], alue jolla seisot valitaan jos et käytä alueen nimeä."
rent-noPermission: "Sinulla ei ole oikeuksia alueen vuokraamiseen."
rent-maximum: "Et voi vuokrata enempää kuin %0% alueen(aluetta) (sinulla on jo %1% ryhmässä '%2%')"
rent-payError: "Jokin meni pieleen maksamisessa, kokeile myöhemmin uudestaan."
rent-extend: "Voit laajentaa vuokra-aluettasi klikkaamalla oikealla hiiren napilla kylttiä uudestaan tai käyttämällä /as rent"
rent-someoneElse: "Joku muu on jo vuokraamassa tätä aluetta."
rent-notRentable: "Tuo alue ei ole saatavissa vuokraamiselle."
rent-expireWarning: "Sinun alueessa %region% on aikaa jäljellä %timeleft%, muista pidentää vuokra-aikaa jos haluat pitää sen."
buy-help: "/as buy [alueenNimi], alueen jonka päällä seisot, ostetaan jos se ei ole käytössä."
buy-noPermission: "Sinulla ei ole oikeuksia ostaa aluetta."
buy-maximum: "Sinä et voi ostaa enempää kuin %0% alueen(aluetta) (sinulla on jo %1% ryhmässä '%2%')"
buy-payError: "Jokun meni pieleen maksamisessa, kokeile myöhemmin uudestaan."
buy-yours: "Sinä omistat jo tuon alueen."
buy-someoneElse: "Joku muu on jo ostanut tämän alueen."
unrent-help: "/as unrent [AlueenNimi], alue missä seisot valitaan jos et erittele alueen nimeä."
unrent-noPermission: "Sinulla ei ole oikeuksia lopettaa alueen vuokrausta keskenkaiken."
unrent-noPermissionOther: "Sinulla ei ole oikeuksia lopettaa vuokrausta toisen alueelta."
unrent-notRegistered: "Tämän alueen vuokrausta ei voi lopettaa sillä pelaaja ei ole rekisteröitynyt vuokraamiseen."
unrent-notRented: "Alueen vuokrausta ei voi lopettaa sillä se ei ole edes vuokrattuna."
sell-help: "/as sell [alueenNimi], alue jolla seisot valitaan jos et erittele alueen nimeä."
sell-notRegistered: "Tätä aluetta ei voida myydä koska omistaja ei myy sitä."
sell-notBought: "Aluetta ei voi myydä koska se on jonkun toisen omaisuutta."
sell-noPermission: "Sinulla ei ole oikeuksia myydä aluetta."
sell-noPermissionOther: "Sinulla ei ole oikeuksia myydä jonkun toisen aluetta."
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-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."
info-all-buys: "Alueet jotka on tehty ostettaviksi: &7%0%."
info-all-noBuys: "Ostettavia alueita ei ole."
info-nogroupRents: "Vuokraa alueita ilman ryhmää: &7%0%."
info-nogroupBuys: "Osta alueita ilman ryhmää: &7%0%."
info-nogroupNoRents: "Ilman ryhmää, vuokrattavia alueita ei ole."
info-nogroupNoBuys: "Ilman ryhmää, ostettavia alueita ei ole."
info-rented: "Vuokratut alueet: &7%0%."
info-noRented: "Alueita ei ole vuokrattuna."
info-unrented: "Vuokraamattomat alueet: &7%0%."
info-noUnrented: "Kaikki alueet on vuokrattu."
info-sold: "Myydyt alueet: &7%0%."
info-noSold: "Myytyjä alueita ei ole."
info-forsale: "Alueet, jotka on myytävissä: &7%0%."
info-noForsale: "Kaikki alueet on myyty."
info-playerHelp: "/as info player <nimi>"
info-playerRents: "Alueet, jotka on vuokrannut pelaaja %0%: &7%1%."
info-playerNoRents: "%0% ei ole vuokrannut aluetta."
info-playerBuys: "Alueet, jotka on ostanut pelaaja %0%: &7%1%."
info-playerNoBuys: "%0% ei ole ostanut alueita."
info-regionHelp: "/as info region [nimi], alue jolla seisot valitaan jos et erittele nimeä."
info-regionHeaderRent: "&2Lisätiedot alueesta %region%."
info-regionHeaderBuy: "&2Lisätiedot alueesta %region%."
info-regionRented: "&2&l►&r Vuokrannut pelaaja %player%: &7%until% asti."
info-regionBought: "&2&l►&r Tämän alueen on ostanut %player%."
info-regionReselling: "&2&l►&r Tämän alueen on ostanut %player%, ja hän on jälleenmyymässä tätä."
info-regionExtending: "&2&l►&r Hinta vuokran pidentämiseen: &7%price% per %duration%."
info-regionCanBeRented: "&2&l►&r Hinta vuokraamiselle: &7%price% per %duration%."
info-regionCanBeBought: "&2&l►&r Hinta ostamiselle: &7%price%."
info-regionReselPrice: "&2&l►&r Jälleenmyynnin hinta: &7%resellprice% (voit ostaa sen pelaajalta %player%)"
info-regionFriends: "&2&l►&r Lisätty kaverit: &7%friends%."
info-regionMoneyBackBuy: "&2&l►&r Myydään takaisinmaksulla: &7%moneyback% (%moneybackpercent%% hinnasta)."
info-regionMoneyBackRent: "&2&l►&r Lopetetaan vuokraaminen takaisinmaksuun: &7%moneyback% (%moneybackpercent%% jäljellä olevasta ajasta)"
info-regionMaxExtends: "&2&l►&r Maksimi määrä pidennyksille: &7%maxextends% kerta(a)."
info-regionNoExtending: "&2&l►&r `Vuokraa ei voida pidentää."
info-regionExtendsLeft: "&2&l►&r Pidennyksiä jäljellä: &7%extendsleft% kerta(a) määrästä %maxextends%."
info-regionMaxRentTime: "&2&l►&r Etukäteen vuokrataan: &7%maxrenttime% maksimista."
info-regionNoTeleport: "&2&l►&r Teleporttaus paikkaa ei ole asetettu: %0%."
info-regionTeleportHint: "&7(käytä '/as settp' paremmalle paikalle)"
info-regionTeleportAt: "&2&l►&r Teleport asetettu: &7(%0%, %1%, %2%, %3%, pitch:%4%, yaw:%5%)."
info-regionSigns: "&2&l►&r Liitetyt kyltit: &7%0%."
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
info-regionGroups: "&2&l►&r Määritetyt ryhmät: &7%0%."
info-regionInactiveUnrent: "&2&l►&r Automaattinen vuokran purkaminen: &7%inactivetime% epäaktiivisuudesta pelaajalla."
info-regionInactiveSell: "&2&l►&r Automaattinen myynti jälkeen: &7%inactivetime% epäaktiivisuudesta pelaajalla."
info-regionRestrictedRegionRent: "&2&l►&r Sinun täytyy olla alueen sisässä vuokrataksesi sen."
info-regionRestrictedWorldRent: "&2&l►&r Sinun pitää olla oikeassa maailmassa '%world%' vuokrataksesi tämän alueen."
info-regionRestrictedRegionBuy: "&2&l►&r Sinun täytyy seistä alueen sisässä ostaaksesi sen."
info-regionRestrictedWorldBuy: "&2&l►&r Sinun täytyy olla maailmassa '%world%' ostaaksesi tuon alueen."
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-regionNotExisting: "Aluetta ei ole olemassa: %0%."
setrestore-help: "/as setrestore <alue> <true|false|general> [profiili]."
setrestore-noPermission: "Sinulla ei ole oikeuksia vaihtaa palautusasetuksia."
setrestore-notRegistered: "Aluetta ei ole olemassa: %0%."
setrestore-invalidSetting: "'%0%' ei ole kelvollinen tila, pitäisi olla true, false tai general."
setprice-noPermission: "Sinulla ei ole oikeuksia vaihtaa hintaa millä alue myydään tai vuokrataan."
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."
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ä."
setduration-notRegistered: "%0% aluetta ei ole tehty vuokraamiseen."
setduration-wrongAmount: "'%0%' ei ole pätevä määrä, käytä kokonaisia numeroita."
setduration-wrongFormat: "'%0%' ei ole asianmukainen aikamuoto, tarkista asiakirjat Bukkitista."
setup-noRegion: "Et määritellyt alueen nimeä toiselle riville."
setup-wrongRegion: "Alue, jonka määrittelit, ei ole olemassa."
setup-alreadyRentSign: "Alue, jonka määrittelit on jo lisätty AreaShoppiin vuokra-alueena, lisää kyltti käyttäen [as] ensimmäisellä rivillä tai '/as addsign'."
setup-alreadyBuySign: "Alue, jonka määrittelit on jo lisätty AreaShoppiin osto-alueena, lisää kyltti käyttäen [as] ensimmäisellä rivillä tai '/as addsign'."
setup-noDuration: "Et määrittänyt kuinka pitkäksi aikaa alueen voi vuokrata, laita tämä kolmannelle riville."
setup-wrongDuration: "Määritelty aika ei ole oikeassa muodossa, esimerkiksi: 1 day."
setup-noPrice: "Et määritellyt hintaa neljännelle riville."
setup-wrongPrice: "Et määrittänyt hintaa oikealla tavalla, käytä vain numeroita."
setup-rentSuccess: "Alueen %0% vuokraaminen on asetettu onnistuneesti."
setup-buySuccess: "Alueen %0% ostaminen on asetettu onnistuneesti."
setup-noPermissionRent: "Sinulla ei ole oikeuksia asettaa vuokrattavia alueita."
setup-noPermissionBuy: "Sinulla ei ole oikeuksia asettaa myytäviä alueita."
setup-couldNotDetect: "Löydetty moninkertaisia alueita samalla tärkeystasolla ja/tai parent/child suhteella, määritä yksi alue toiselle riville (2 aluettta jotka löydettiin: %0% ja %1%)"
setup-blacklisted: "%0% on mustalistattuna eikä sitä voi lisätä AreaShoppiin."
destroy-noPermissionRent: "Sinulla ei ole oikeuksia poistaa vuokrattavaa aluetta."
destroy-noPermissionBuy: "Sinulla ei ole oikeuksia poistaa ostettavaa aluetta."
teleport-help: "/as tp <alue> [kyltti]."
teleport-noRentOrBuy: "Määritettyä aluetta ei ole rekisteröity: %0%."
teleport-noPermission: "Sinulla ei ole oikeuksia teleportata omalle alueellesi."
teleport-noPermissionOther: "Sinulla ei ole oikeuksia teleportata alueelle joka ei ole sinun omistuksessasi."
teleport-noPermissionSign: "Sinulla ei ole oikeuksia teleportata sinun alueesi kyltille."
teleport-noPermissionOtherSign: "Sinulla ei ole oikeuksia teleportata toisen alueen kyltille, jota sinä et omista."
teleport-noPermissionFriend: "Sinulla ei ole oikeuksia teleportata alueille, joilla sinä olet vain kaverina."
teleport-noPermissionFriendSign: "Sinulla ei ole oikeuksia teleportata alueiden kylteille, joilla sinä olet vain kaverina."
teleport-blocked: "Et voi teleportata, koska paikka on alueen ulkopuolella ja sinä olet pakotettu teleporttamaan sen sisään."
setteleport-help: "/as settp [alue] [reset], alue jolla seisot valitaan, jos et määrittele alueen nimeä."
setteleport-noPermission: "Sinulla ei ole oikeuksia asettaa teleporttaus-paikkaa."
setteleport-noPermissionOther: "Sinulla ei ole oikeuksia asettaa teleporttaus-paikkaa alueelle, jota sinä et omista."
setteleport-noRentOrBuy: "Aluetta ei ole rekisteröity: %0%."
setteleport-notInside: "Teleporttaus-paikan pitää olla alueen sisällä."
find-help: "/as find <buy|rent> [maksimiHinta] [ryhmä]"
find-noPermission: "Sinulla ei ole oikeuksia etsiä alueita ja teleportata niihin."
find-wrongMaxPrice: "Määritetty maksimihinta ei ole oikea numero: %0%."
find-wrongGroup: "Määriteltyä ryhmää ei ole olemassa: %0%."
find-noneFound: "Ei %0% aluetta löydetty, kun etsittiin sinun saldosi hinnalla: %1%%2%."
find-noneFoundMax: "Ei %0% aluetta löydetty, kun etsittiin hinnalla: %1%%2%."
find-onlyInGroup: ", vain etsitty alueita ryhmällä: %0%."
groupadd-help: "/as groupadd <ryhmä> [alue], jos aluetta ei määritelty, kaikki alueet sinun WorldEdit valinnaltasi valitaan."
groupadd-noPermission: "Sinulla ei ole oikeuksia lisätä alueita ryhmille."
groupadd-noRegion: "Määritelty alue ei ole rekisteröity: %0%."
groupadd-weSuccess: "Lisätty ryhmään %0%: &7%1%."
groupadd-weFailed: "Oli jo ryhmässä %0%: &7%1%."
groupdel-help: "/as groupdel <ryhmä> [alue], jos aluetta ei määritelty, kaikki alueet WorldEdit valinnaltasi käytetään."
groupdel-noPermission: "Sinulla ei ole oikeuksia poistaa alueita ryhmiltä."
groupdel-noRegion: "Määritelty alue ei ole rekisteröity: %0%."
groupdel-weSuccess: "Poistettu ryhmä %0%: &7%1%."
groupdel-weFailed: "Eivät olleet ryhmässä %0% kuitenkin: &7%1%."
grouplist-noPermission: "Sinulla ei ole oikeuksia katsoa rekisteröityjä ryhmiä."
grouplist-noGroups: "Yhtään rekisteröityä ryhmää ei ole."
grouplist-success: "Seuraavat ryhmät ovat rekisteröityjä: &7%0%."
groupinfo-help: "/as groupinfo <ryhmä>"
groupinfo-noPermission: "Sinulla ei ole oikeuksia katsoa lisätietoja ryhmästä."
groupinfo-noGroup: "Ryhmää nimellä '%0%' ei ole olemassa, käytä /as grouplist nähdäksesi kaikki ryhmät."
groupinfo-members: "Seuraavat alueet ovat jäsenien omistamia ryhmästä %0%: &7%1%."
groupinfo-noMembers: "Ryhmässä %0% ei ole yhtään jäsentä."
schemevent-help: "/as schemevent <alue> <created|deleted|rented|unrented|bought|sold>."
schemevent-noRegion: "Määritelty alue ei ole rekisteröity: %0%."
schemevent-wrongEvent: "Määriteltyä tapahtumaa '%0%' ei ole olemassa, käytä yhtä seuraavista: &7%1%."
schemevent-noPermission: "Sinulla ei ole oikeuksia tehdä kaavamaisia tapahtumia."
add-help: "/as add <rent|buy> [alue] [maailma]."
add-noPermission: "Sinulla ei ole oikeuksia lisätä aluetta AreaShoppiin."
add-success: "Lisätty %0%: &7%1%."
add-failed: "On jo rekisteröitynä: &7%0%."
add-blacklisted: "Mustalistattu: &7%0%."
add-specifyWorld: "Määrittele maailma, jossa alue on kun käytät konsolia."
add-incorrectWorld: "Maailmaa '%0%' ei löydetty, kokeile uudestaan (KirjainKoko)"
add-noRegion: "Aluetta '%0%' ei ole olemassa tässä maailmassa."
del-noRegion: "Määritelty alue ei ole rekisteröity: %0%."
del-noPermission: "Sinulla ei ole oikeuksia poistaa alueita."
del-success: "Poistetut alueet: &7%0%."
del-failed: "Ei oikeuksia poistaa tai ei ole rekisteröitynä: &7%0%."
addsign-help: "/as addsign [alue] [profiili]"
addsign-noSign: "Et katso kylttiä."
addsign-noRegions: "Aluetta ei löytynyt kyltin olinpaikassa."
addsign-couldNotDetect: "Löydettiin moninkertaisia alueita kyltin ympäriltä, määrittele alue paremmin (2 aluetta jotka löydettiin: %0% ja %1%)"
addsign-couldNotDetectSign: "Löydettiin moninkertaisia alueita kyltin ympäriltä, määrittele alue toiselle riville (2 aluetta jotka löydettiin: %0% ja %1%)"
addsign-wrongProfile: "Määriteltyä profiilia ei ole olemassa, käytä jotain seuraavista (katso configit): &7%0%."
addsign-success: "Kyltti on lisätty alueelle %region%"
addsign-successProfile: "Kyltti on lisätty alueelle %region% profiililla %0%."
addsign-noPermission: "Sinulla ei ole oikeutta lisätä kylttiä."
delsign-noSign: "Et katso kylttiä."
delsign-noPermission: "Sinulla ei ole oikeuksia poistaa kylttiä."
delsign-noRegion: "Tuo kyltti ei ole AreaShopin-alueen kyltti."
me-noPermission: "Sinulla ei ole oikeuksia katsoa mitä alueita omistat."
me-notAPlayer: "Sinä et ole pelaaja, joten et voi omistaa yhtään aluetta."
me-noRentRegions: "Et ole vuokrannut yhtään vuokrattavaa aluetta."
me-noBuyRegions: "Et ole ostanut yhtään ostettavaa aluetta."
me-rentRegions: "Olet vuokrannut seuraavat alueet:"
me-buyRegions: "Olet ostanut seuraavat alueet:"
me-rentLine: "&2&l►&r %region% %until% asti &7(%timeleft% jäljellä)"
me-buyLine: "&2&l►&r %region%."
me-noFriendRegions: "Sinua ei ole lisätty kaveriksi yhdellekkään alueelle."
me-friendRegions: "Sinut on lisätty kaveriksi seuraaville alueille:"
me-friendLine: "&2&l►&r %region% &7(Omistaja: %player%)"
setowner-help: "/as setowner <pelaaja> [alue], alue millä seisot valitaan jos et erittele alueen nimeä."
setowner-noPermission: "Sinulla ei ole oikeuksia asettaa alueen omistajaa."
setowner-noPermissionRent: "Sinulla ei ole oikeuksia asettaa vuokrattujen alueiden omistajia."
setowner-noPermissionBuy: "Sinulla ei ole oikeuksia asettaa ostettujen alueiden omistajaa."
setowner-notRegistered: "Alueen nimi ei ole rekisteröity, omistajaa ei voitu asettaa."
setowner-noPlayer: "Pelaajan UUID:n saaminen epäonnistui pelaajalla: %0%."
setowner-succesRent: "Alueen %region% omistajaksi asetettu onnistuneesti %player%, vuokrattu %until% asti (%timeleft% jäljellä)"
setowner-succesRentExtend: "Omistajana oli jo pelaaja %player%, vuokraa pidennetty '%duration%', nyt vuokrattuna %until% asti (%timeleft% jäljellä)"
setowner-succesBuy: "Alueen %region% omistaja vaihdettu onnistuneesti pelaajalle %player%."
resell-help: "/as resell <hinta> [alue], alue jolla seisot valitaan, jos et määrittele alueen nimeä."
resell-wrongPrice: "'%0%' ei ole pätevä hinta."
resell-notRegistered: "Aluetta ei ole rekisteröity: %0%."
resell-noRegionFound: "AreaShopin aluetta ei löydetty sijainnistasi, kokeile määrittämällä alueen nimi komentoon."
resell-notBought: "Sinä et voi jälleenmyydä aluetta %region% koska se ei ole myytynä."
resell-success: "%region% on onnistuneesti laitettu jälleenmyynti-tilaan hinnalla %resellprice%."
resell-noPermission: "Sinulla ei ole oikeuksia asettaa aluettasi jälleenmyyntitilaan."
resell-noPermissionOther: "Sinulla ei ole oikeuksia asettaa alueita jälleenmyyntitilaan."
stopresell-help: "/as stopresell [alue], alue jolla seisot valitaan, jos et määritä alueen nimeä."
stopresell-notRegistered: "Alue ei ole rekisteröity: %0%."
stopresell-noRegionFound: "AreaShopin aluetta ei löytynyt sijainnistasi, kokeile määrittämällä alueen nimi komentoon."
stopresell-notResell: "Et voi lopettaa alueen %region% jälleenmyyntiä sillä se ei ole jälleenmyynti-tilassa."
stopresell-success: "%region% on onnistuneesti laitettu takaisin myynti-tilaan."
stopresell-noPermission: "Sinulla ei ole oikeuksia asettaa sinun aluettasi takaisin myyty-tilaan."
stopresell-noPermissionOther: "Sinulla ei ole oikeuksia asettaa alueita takaisin myyty-tilaan."
addfriend-help: "/as addfriend <pelaaja> [alue], alue jolla seisot valitaan jos alueen nimeä ei ole määritelty."
addfriend-noPermissionOther: "Sinulla ei ole oikeuksia lisätä kavereita alueille, jotka eivät ole sinun."
addfriend-noPermission: "Sinulla ei ole oikeuksia lisätä kavereita sinun alueellesi."
addfriend-alreadyAdded: "%0% on jo lisätty kaveriksi tällä alueella."
addfriend-self: "Lisäämällä omistajan alueen kaveriksi olisi järetöntä."
addfriend-noOwner: "Et voi lisätä kavereita alueelle ilman omistajaa."
delfriend-help: "/as delfriend <pelaaja> [alue], alue jolla seisot valitaan jos alueen nimeä ei ole määritelty."
delfriend-noPermissionOther: "Sinulla ei ole oikeuksia poistaa kavereita alueilta, jotka eivät ole sinun."
delfriend-noPermission: "Sinulla ei ole oikeutta poistaa kaveria sinun alueeltasi."
delfriend-notAdded: "%0% ei ole lisätty kavereihin tällä alueella."
delfriend-noOwner: "Et voi poistaa kavereita tältä alueelta ilman omistajaa."
linksigns-multipleRegions: "Löydetty moninkertaisia alueita: &7%0%."
linksigns-multipleRegionsAdvice: "Klikkaa uudemman kerran kokeillaksesi uudestaan tai käytä '/as linksigns' lopettaaksesi."
linksigns-noRegions: "AreaShopin alueita ei löydetty kursorisi suunnasta, olethan varma että alue on lisätty AreaShoppiin &7(maksimi etäisyys 100 palikkaa)"
linksigns-regionFound: "Alue %region% on löydetty, nyt osoita kylttiä ja vasen-klikkaa sitä linkataksesi sen."
linksigns-signFound: "Löydetty kyltti paikassa (%0%, %1%, %2%), nyt osoita suoraan alueelle ja oikea-klikkaa linkataksesi sen."
linksigns-noSign: "Kylttiä ei löydetty kursorisi suunnasta, olethjan varma että sinulla on suora näkyvyys kylttiin ja klikkaa uudestaan &7(maksimi etäisyys 100 palikkaa)"
linksigns-alreadyRegistered: "Tuo kyltti on jo rekisteröity alueelle %region%, klikkaa uudestaan valitaksesi toisen kyltin."
linksigns-first: "Olet nyt kylttien-linkkaus tilassa."
linksigns-next: "&7Vasen-klikkaa valitaksesi kyltin, oikea-klikkaa valitaksesi alueen, käytä /as linksigns lopettaaksesi."
linksigns-noPermission: "Sinulla ei ole oikeuksia siirtä kylttien-linkkaus tilaan."
linksigns-stopped: "Kylttien-linkkaus lopetettu."
stack-help: "/as stack <määrä> <gap> <nimi> <rent|buy> [ryhmä].\n&7 <määrä> Alueiden määrä, jotka luodaan.\n<gap> Palikoiden etäisyys alueiden välissä.\n<nimi> Alueiden nimet (numero tulee olemaan perässä)\n<rent|buy> Tee niistä vuokrattavia tai ostettavia.\n[ryhmä] Ryhmä, jolle alueet tehdään.\nAlueet luodaan siihen suuntaan johon katsot."
stack-accepted: "Aloitetaan luomaan %0% %1% aluetta %2% palikoita niiden välissä, nimet alkavat %3% ja niiden perässä on alueiden numero. %4%."
stack-addToGroup: "Luodut alueet lisätään ryhmälle '%0%'."
stack-noPermission: "Sinulla ei ole oikeuksia luoda ja lisätä alueita AreaShoppiin."
stack-wrongAmount: "'%0%' ei ole oikea määrä alueita."
stack-wrongGap: "'%0%' ei ole oikea numero numeroidessa palikoita alueiden väliseen väliin."
stack-noSelection: "Sinulla ei ole valintaa, joka osoittaa missä ensimmäinen alue pitäisi tehdä."
stack-addStart: "&7Lisätään %0% aluetta, %1% per sekunti."
stack-addComplete: "&7Alueiden lisäys valmis."
stack-unclearDirection: "Katso tarkasti pohjoiseen, itään, etelään tai länteen, tällä hetkellä havaittu %0%."
timeleft-years: "%0% vuotta"
timeleft-months: "%0% kuukautta"
timeleft-days: "%0% päivää"
timeleft-hours: "%0% tuntia"
timeleft-minutes: "%0% minuuttia"
timeleft-second: "%0% sekunti"
timeleft-seconds: "%0% sekuntia"
timeleft-ended: "Vanhentunut"
greeting-forrent: "Alueen %region% voi vuokrata hintaan %price% per %duration%."
greeting-rented: "Alueen %region% on vuokrannut pelaaja %player% %until% asti."
greeting-forsale: "Alueen %region% voi ostaa hintaan %price%."
greeting-bought: "Alueen %region% on ostanut pelaaja %player%."
greeting-resale: "Alueen %region% voi ostaa hintaan %resaleprice% pelaajalta %player%."
-360
View File
@@ -1,360 +0,0 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: French, Version: V2.2.2, 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) ║
# ║ 3: Change the 'language' setting in config.yml to '<servername>', do not include '.yml' ║
# ║ 4: Change the strings in the new file to your liking and save the file ║
# ║ 5: Use '/as reload' or reload/restart your server to see the changes ║
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
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-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."
cmd-noSelection: "Vous n'avez pas de séléction WorldEdit."
cmd-noRegionsFound: "Aucune région enregistrée dans AreaShop n'a été trouvée dans votre séléction."
cmd-noWERegionsFound: "Aucune région WorldEdit croisant votre séléction n'a été trouvée."
cmd-notRegistered: "La région spécifiée n'est pas enregistrée : %0%."
cmd-noRegionsAtLocation: "Aucune région trouvée à votre emplacement, spécifiez la région comme un argument."
cmd-moreRegionsAtLocation: "Plus d'une région ont été trouvées à votre emplacement, spécifiez la région comme un argument."
cmd-automaticRegionOnlyByPlayer: "Déterminer la région automatiquement est disponible uniquement pour les joueurs, spécifiez la région comme un argument."
help-header: "Page d'aide, commandes que vous pouvez exécuter."
help-alias: "Alias des commandes : /areashop, /as"
help-help: "&6/as help &7-&r Affiche la page d'aide."
help-info: "&6/as info &7-&r Obtenir les infos sur les régions actuelles."
help-rent: "&6/as rent &7-&r Louer une région, ou prolonger la location actuelle."
help-buy: "&6/as buy &7-&r Acheter une région."
help-unrent: "&6/as unrent &7-&r Dé-louer une région."
help-unrentOwn: "&6/as unrent &7-&r Dé-louer votre propre région."
help-sell: "&6/as sell &7-&r Vendre une région."
help-sellOwn: "&6/as sell &7-&r Vendre votre propre région."
help-reload: "&6/as reload &7-&r Recharge tous les fichiers et met à jour les régions."
help-setrestore: "&6/as setrestore &7-&r Activer ou désactiver la restauration et choisir le profil."
help-setprice: "&6/as setprice &7-&r Changer le prix d'une région."
help-setduration: "&6/as setduration &7-&r Changer le temps de location d'une région."
help-teleport: "&6/as tp &7-&r Téléportation vers votre région achetée / louée."
help-teleportAll: "&6/as tp &7-&r Téléportation vers une région louée / achetée."
help-setteleport: "&6/as settp &7-&r Définit la position de téléportation pour la région louée / achetée."
help-setteleportAll: "&6/as settp &7-&r Définit la position de téléportation pour une région."
help-find: "&6/as find &7-&r Trouve un achat ou une location vide."
help-groupadd: "&6/as groupadd &7-&r Ajoute une région à un groupe."
help-groupdel: "&6/as groupdel &7-&r Supprime une région d'un groupe."
help-grouplist: "&6/as grouplist &7-&r Affiche tous les groupes enregistrés."
help-groupinfo: "&6/as groupinfo &7-&r Affiche les informations d'un groupe."
help-schemevent: "&6/as schemevent &7-&r Déclenche un événement schématique d'une région."
help-add: "&6/as add &7-&r Enregistre une région comme louée ou achetée."
help-del: "&6/as del &7-&r Supprime une région enregistrée dans AreaShop."
help-addsign: "&6/as addsign &7-&r Ajoute une pancarte à une région existante."
help-delsign: "&6/as delsign &7-&r Supprime la pancarte que vous regardez."
help-me: "&6/as me &7-&r Voir les régions que vous possédez (et le temps restant)."
help-setowner: "&6/as setowner &7-&r Change le propriétaire d'une région ou allonge le temps de location."
help-resell: "&6/as resell &7-&r Mettre une de vos régions en vente."
help-resellAll: "&6/as resell &7-&r Mettre une région en vente."
help-stopResell: "&6/as stopresell &7-&r Ne plus revendre votre région."
help-stopResellAll: "&6/as stopresell &7-&r Récupérer une de vos régions."
help-addFriend: "&6/as addfriend &7-&r Ajouter un ami à votre région."
help-addFriendAll: "&6/as addfriend &7-&r Ajouter un ami à une région."
help-delFriend: "&6/as delfriend &7-&r Supprimer un ami de votre région."
help-delFriendAll: "&6/as delfriend &7-&r Supprimer un ami d'une région."
help-linksigns: "&6/as linksigns &7-&r Utilisez le mode de liaison de panneau."
help-stack: "&6/as stack &7-&r Créez plusieurs régions et ajoutez les."
rent-help: "/as rent [regionname], Si non spécifiée, cible la région dans laquelle vous vous trouvez."
rent-noPermission: "Vous n'avez pas la permission de louer une région."
rent-maximum: "Vous ne pouvez pas louer plus de %0% région(s) au total (vous possédez déjà %1% dans le groupe '%2%')."
rent-payError: "Une erreur durant le paiement s'est produite. Essayez de nouveau plus tard."
rent-extend: "Vous pouvez prolonger votre location avec un clic droit sur la pancarte, ou en utilisant /as rent."
rent-someoneElse: "Quelqu'un d'autre loue déjà cette région."
rent-notRentable: "Cette région n'est pas disponible à la location."
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."
buy-help: "/as buy [regionname], Si non spécifiée, cible la région dans laquelle vous vous trouvez."
buy-noPermission: "Vous n'avez pas la permission d'acheter une région."
buy-maximum: "Vous ne pouvez pas acheter plus de %0% région(s) au total (vous possédez déjà %1% dans le groupe '%2%')."
buy-payError: "Une erreur durant le paiement s'est produite. Essayez de nouveau plus tard."
buy-yours: "Vous avez déjà acheté cette région."
buy-someoneElse: "Quelqu'un a déjà acheté cette région."
unrent-help: "/as unrent [regionname], Si non spécifiée, cible la région dans laquelle vous vous trouvez."
unrent-noPermission: "Vous n'avez pas la permission de dé-louer une région."
unrent-noPermissionOther: "Vous n'avez pas la permission de dé-louer une autre région."
unrent-notRegistered: "La région ne peut pas ne plus être louée car elle n'est pas enregistrée comme une région que l'on peut louer."
unrent-notRented: "La région ne peut pas ne plus être louée car elle n'est pas enregistrée comme actuellement louée."
sell-help: "/as sell [regionname], Si non spécifiée, cible la région dans laquelle vous vous trouvez."
sell-notRegistered: "La région ne peut pas être vendue car son statut n'est pas \"à vendre\"."
sell-notBought: "La région ne peut pas être vendue car ce n'est pas la propriété de quelqu'un."
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-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-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."
info-all-buys: "Régions enregistrées en vente : &7%0%"
info-all-noBuys: "Il n'y a pas de régions enregistrées en achat."
info-nogroupRents: "Régions louables sans groupe : &7%0%."
info-nogroupBuys: "Régions achetables sans groupe : &7%0%."
info-nogroupNoRents: "Il n'y a pas de régions à louer car vous n'appartenez pas à un groupe."
info-nogroupNoBuys: "Il n'y a aucune région à acheter puisque vous ne faites pas partie d'un groupe."
info-rented: "Régions louées : &7%0%"
info-noRented: "Aucune région louée."
info-unrented: "Régions non louées : &7%0%"
info-noUnrented: "Toutes les régions sont louées."
info-sold: "Régions vendues : &7%0%"
info-noSold: "Aucune région n'est vendue."
info-forsale: "Régions en vente : &7%0%"
info-noForsale: "Toutes les régions sont vendues."
info-playerHelp: "/as info player <name>"
info-playerRents: "Régions louées par %0% : &7%1%"
info-playerNoRents: "%0% n'a de régions louées."
info-playerBuys: "Régions achetées par %0% : &7%1%"
info-playerNoBuys: "%0% n'a pas acheté de régions."
info-regionHelp: "/as info region [name], Si non spécifiée, cible la région dans laquelle vous vous trouvez."
info-regionHeaderRent: "&2Informations à propos de '%region%' :"
info-regionHeaderBuy: "&2Informations à propos de '%region%' :"
info-regionRented: "&2&l►&r Louée par %player% jusqu'à : &7%until%"
info-regionBought: "&2&l►&r Achetée par %player%"
info-regionReselling: "&2&l►&r Achetée par %player%, en cours de revente."
info-regionExtending: "&2&l►&r Prix pour allonger : &7%price% pour %duration%"
info-regionCanBeRented: "&2&l►&r Prix pour louer : &7%price% pour %duration%"
info-regionCanBeBought: "&2&l►&r Prix d'achat : &7%price%"
info-regionReselPrice: "&2&l►&r Prix de revente : &7%resellprice% (vous pouvez l'acheter à %player%)."
info-regionFriends: "&2&l►&r Ami(s) ajouté(s) : &7%friends%"
info-regionMoneyBackBuy: "&2&l►&r Prix de revente : &7%moneyback% (%moneybackpercent%% du prix)"
info-regionMoneyBackRent: "&2&l►&r Remboursement de location : &7%moneyback% (%moneybackpercent%% du temps restant)"
info-regionMaxExtends: "&2&l►&r Nombre maximum de région : &7%maxextends% fois."
info-regionNoExtending: "&2&l►&r La location ne peut être allongée."
info-regionExtendsLeft: "&2&l►&r Extensions restantes : &7%extendsleft% fois sur %maxextends%."
info-regionMaxRentTime: "&2&l►&r Location à l'avance : &7%maxrenttime% au maximum"
info-regionNoTeleport: "&2&l►&r Emplacement de téléportation non défini%0%."
info-regionTeleportHint: "&7(utilisez '/as settp' pour un meilleur emplacement)"
info-regionTeleportAt: "&2&l►&r Emplacement de téléportation défini à : &7(%0%, %1%, %2%, %3%, pitch:%4%, yaw:%5%)"
info-regionSigns: "&2&l►&r Pancartes connectées : &7%0%"
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
info-regionGroups: "&2&l►&r Assigné aux groupes : &7%0%"
info-regionInactiveUnrent: "&2&l►&r Fin de le location automatique après : &7%inactivetime% de temps d'inactivité du joueur"
info-regionInactiveSell: "&2&l►&r Revente automatique après : &7%inactivetime% de temps d'inactivité du joueur"
info-regionRestrictedRegionRent: "&2&l►&r Vous devez être à l'intérieur de la région pour la louer."
info-regionRestrictedWorldRent: "&2&l►&r Vous devez à l'intérieur du monde '%world%' pour louer cette région."
info-regionRestrictedRegionBuy: "&2&l►&r Vous devez être à l'intérieur de la région pour l'acheter."
info-regionRestrictedWorldBuy: "&2&l►&r Vous devez à l'intérieur du monde '%world%' pour acheter cette région."
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-regionNotExisting: "La région spécifiée n'est pas enregistrée : %0%."
setrestore-help: "/as setrestore <region> <true|false|general> [profile]"
setrestore-noPermission: "Vous n'avez pas la permission de restaurer les paramètres."
setrestore-notRegistered: "La région spécifiée n'est pas enregistrée : %0%."
setrestore-invalidSetting: "'%0%' est invalide. Doit être true, false ou general."
setprice-noPermission: "Vous n'avez pas la permission de changer le prix d'une région."
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: "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."
setduration-notRegistered: "%0% n'est pas enregistrée dans les régions à louer."
setduration-wrongAmount: "'%0%' n'est pas un montant valide, utilisez un nombre entier."
setduration-wrongFormat: "'%0%' n'est pas un format de temps valide, regardez la documentation de Bukkit."
setup-noRegion: "Vous n'avez pas spécifié de région à la seconde ligne."
setup-wrongRegion: "La région que vous avez spécifiée n'existe pas."
setup-alreadyRentSign: "La région que vous avez spécifiée a déjà été ajoutée à AreaShop en tant qu'une région louable, ajoutez un panneau avec [as] sur le première ligne ou tapez '/as addsign'."
setup-alreadyBuySign: "La région que vous avez spécifiée a déjà été ajoutée à AreaShop en tant qu'une région achetable, ajoutez un panneau avec [as] sur le première ligne ou tapez '/as addsign'."
setup-noDuration: "A la troisième ligne, vous n'avez pas spécifié la durée de location de la région."
setup-wrongDuration: "Le temps spécifié n'est pas au bon format. Exemple : 1 day."
setup-noPrice: "A la quatrième ligne, vous n'avez pas spécifié le prix."
setup-wrongPrice: "Le prix spécifié n'est pas correct, n'utilisez que des chiffres s'il vous plaît."
setup-rentSuccess: "La location de la région '%0%' est correctement configurée."
setup-buySuccess: "L'achat de la région '%0%' est correctement configuré."
setup-noPermissionRent: "Vous n'avez pas la permission de définir des région louables."
setup-noPermissionBuy: "Vous n'avez pas la permission de définir des régions achetables."
setup-couldNotDetect: "Multiples régions trouvées avec la même priorité et/ou étant de même nature : parent ou enfant. Spécifiez-en une sur la deuxième ligne. (2 des régions trouvées: %0% et %1%)."
setup-blacklisted: "%0% est sur la blacklist et ne peut pas être ajouté à AreaShop."
destroy-noPermissionRent: "Vous n'avez pas la permission de dés-enregistrer des régions louables. "
destroy-noPermissionBuy: "Vous n'avez pas la permission de dés-enregistrer des régions achetables."
teleport-help: "/as tp <region> [sign]"
teleport-noRentOrBuy: "La région spécifiée n'est pas enregistrée : %0%."
teleport-noPermission: "Vous n'avez pas la permission de vous téléporter à votre région."
teleport-noPermissionOther: "Vous n'avez pas la permission de vous téléporter à une région qui ne vous appartient pas."
teleport-noPermissionSign: "Vous n'avez pas la permission de vous téléporter à la pancarte de votre région."
teleport-noPermissionOtherSign: "Vous n'avez pas la permission de vous téléporter aux pancartes des régions que vous ne possédez pas."
teleport-noPermissionFriend: "Vous n'avez pas la permission de vous téléporter vers les régions sur lesquelles vous êtes ajoutés en tant qu'ami."
teleport-noPermissionFriendSign: "Vous n'avez pas la permission de vous téléporter vers le panneau des régions sur lesquelles vous êtes ajoutés en tant qu'ami."
teleport-blocked: "Vous ne pouvez pas vous téléporter car la position est en dehors de la région, et vous êtes obligés de vous téléporter à l'intérieur."
setteleport-help: "/as settp [region] [reset], Si non spécifiée, cible la région dans laquelle vous vous trouvez."
setteleport-noPermission: "Vous n'avez pas la permission de définir un point de téléportation."
setteleport-noPermissionOther: "Vous n'avez pas la permission de définir l'emplacement de téléportation d'une région que vous ne possédez pas."
setteleport-noRentOrBuy: "La région spécifiée n'est pas enregistrée : %0%."
setteleport-notInside: "Le lieu doit se trouver dans votre région."
find-help: "/as find <buy|rent> [prix maximum] [group]"
find-noPermission: "Vous n'avez pas la permission de rechercher des régions et de vous y téléporter."
find-wrongMaxPrice: "Le prix maximum n'est pas un nombre valide : %0%."
find-wrongGroup: "Le groupe spécifié n'existe pas : %0%."
find-noneFound: "Aucune région %0% trouvée ayant pour un prix maximum : %1%%2%."
find-noneFoundMax: "Aucune région %0% trouvée en cherchant à un prix maximum de %1%%2%."
find-onlyInGroup: ", recherche de régions uniquement dans le groupe: %0%."
groupadd-help: "/as groupadd <group> [region], Si non spécifiée, cible la région dans laquelle vous vous trouvez."
groupadd-noPermission: "Vous n'avez pas la permission d'ajouter des régions aux groupes."
groupadd-noRegion: "La région spécifiée n'est pas enregistrée : %0%."
groupadd-weSuccess: "Ajouté au groupe %0% : &7%1%."
groupadd-weFailed: "Nous étions déjà dans le groupe %0% : &7%1%."
groupdel-help: "/as groupdel <group> [region], Si non spécifiée, cible la région dans laquelle vous vous trouvez."
groupdel-noPermission: "Vous n'avez pas la permission de supprimer des régions depuis les groupes."
groupdel-noRegion: "La région spécifiée n'est pas enregistrée : %0%."
groupdel-weSuccess: "Supprimée du groupe %0% : &7%1%."
groupdel-weFailed: "Nous ne sommes de toute façon pas dans le groupe %0% : &7%1%."
grouplist-noPermission: "Vous n'avez pas l'autorisation d'afficher les groupes enregistrés."
grouplist-noGroups: "Il n'y a actuellement aucun groupe enregistré."
grouplist-success: "Les groupes suivants sont enregistrés : &7%0%."
groupinfo-help: "/as groupinfo <group>"
groupinfo-noPermission: "Vous n'avez pas la permission d'afficher des informations sur un groupe."
groupinfo-noGroup: "Il n'y a pas de groupe enregistré sous le nom '%0%', utilisez /as grouplist pour vérifier les groupes."
groupinfo-members: "Les régions suivantes sont membres du groupe %0% : &7%1%."
groupinfo-noMembers: "Le groupe %0% ne possède aucun membre."
schemevent-help: "/as schemevent <region> <created|deleted|rented|unrented|bought|sold>"
schemevent-noRegion: "La région spécifiée n'est pas enregistrée : %0%."
schemevent-wrongEvent: "L'évent spécifié '%0%' n'existe pas, utilisez un des suivants: &7%1%."
schemevent-noPermission: "Vous n'avez pas la permission de déclencher des événements schématiques."
add-help: "/as add <rent|buy> [region] [world]"
add-noPermission: "Vous n'avez pas la permission d'ajouter une région à AreaShop."
add-success: "Ajoutée comme %0% : &7%1%."
add-failed: "Déjà enregistrée : &7%0%."
add-blacklisted: "Sur la blacklist : &7%0%."
add-specifyWorld: "Spécifiez le monde de la région lors de l'utilisation de la console."
add-incorrectWorld: "Le monde '%0%' est introuvable, essayez de nouveau (attention à la casse)."
add-noRegion: "La région '%0%' n'existe pas dans ce monde."
del-noRegion: "La région spécifiée n'est pas enregistrée : %0%."
del-noPermission: "Vous n'avez pas la permission de supprimer des régions."
del-success: "Régions supprimées : &7%0%."
del-failed: "Pas de permission pour supprimer, ou pas enregistrée: &7%0%."
addsign-help: "/as addsign [region] [profile]"
addsign-noSign: "Vous ne regardez pas de panneau."
addsign-noRegions: "Aucune région trouvée autour du panneau."
addsign-couldNotDetect: "Plusieurs régions ont été trouvées à proximité du panneau. Spécifiez la région en argument supplémentaire (2 des régions trouvées: %0% et %1%)."
addsign-couldNotDetectSign: "Plusieurs régions ont été trouvées à proximité du panneau. Spécifiez la région à la deuxième ligne (2 des régions trouvées: %0% et %1%)."
addsign-wrongProfile: "Le profil spécifié n'existe pas. Utilisez un des suivants (vérifier la configuration): &7%0%."
addsign-success: "Le panneau a été ajouté à la région %region%."
addsign-successProfile: "Le panneau a été ajouté à la région %region% avec le profil %0%."
addsign-noPermission: "Vous n'avez pas la permission d'ajouter un panneau."
delsign-noSign: "Vous ne regardez pas un panneau."
delsign-noPermission: "Vous n'avez pas la permission de supprimer un panneau."
delsign-noRegion: "Ce signe n'appartient pas à une région AreaShop."
me-noPermission: "Vous n'avez pas la permission de voir quelle(s) région(s) vous possédez."
me-notAPlayer: "Vous n'êtes pas un joueur. Vous ne pouvez donc pas avoir de régions."
me-noRentRegions: "Vous ne louez aucune région."
me-noBuyRegions: "Vous n'avez acheté aucune région."
me-rentRegions: "Vous louez les régions suivantes :"
me-buyRegions: "Vous avez acheté les régions suivantes :"
me-rentLine: "&2&l►&r %region% jusqu'au %until% &7(%timeleft% restant)"
me-buyLine: "&2&l►&r %region%"
me-noFriendRegions: "Vous n'avez été ajouté à aucune région en tant qu'ami."
me-friendRegions: "Vous avez été ajouté en tant qu'ami aux régions suivantes : "
me-friendLine: "&2&l►&r %region% &7(propriétaire : %player%)"
setowner-help: "/as setowner <joueur> [region], la région dans laquelle vous vous trouvez sera utilisée si vous ne spécifiez pas de région."
setowner-noPermission: "Vous n'avez pas la permission de définir le propriétaire d'une région."
setowner-noPermissionRent: "Vous n'avez pas la permission de définir le propriétaire de régions à louer."
setowner-noPermissionBuy: "Vous n'avez pas la permission de définir le propriétaire de régions à acheter."
setowner-notRegistered: "La région n'est pas enregistrée, le propriétaire ne peut être défini."
setowner-noPlayer: "UUID du joueur introuvable : %0%."
setowner-succesRent: "Propriétaire de la région '%region%' modifié avec succès. Elle appartient maintenant à %player% et est louée jusqu'au %until% (%timeleft% restant)."
setowner-succesRentExtend: "Le propriétaire était déjà %player%, location prolongée de '%duration%', maintenant louée jusqu'au %until% (%timeleft% restant%)."
setowner-succesBuy: "Propriétaire de la région '%region%' changé avec succès. Elle appartient maintenant à %player%."
resell-help: "/as resell <prix> <région>, la région dans laquelle vous vous trouvez sera utilisée si vous ne spécifiez pas de région."
resell-wrongPrice: "'%0%' n'est pas un prix valide."
resell-notRegistered: "La région spécifiée n'est pas enregistrée : %0%."
resell-noRegionFound: "Aucune région AreaShop n'a pu être trouvée à votre emplacement, essayez de spécifier la région en argument."
resell-notBought: "Vous ne pouvez pas revendre la région '%region%', elle n'est pas encore achetée."
resell-success: "'%region%' a été mise en revente avec succès pour un prix de %resellprice%."
resell-noPermission: "Vous n'avez pas la permission de mettre votre région en revente."
resell-noPermissionOther: "Vous n'avez pas la permission de mettre des régions en revente."
stopresell-help: "/as stropresell [région], la région où vous vous trouvez sera utilisée si vous ne spécifiez pas de région."
stopresell-notRegistered: "La région spécifiée n'est pas enregistrée : %0%."
stopresell-noRegionFound: "Aucune région AreaShop n'a été trouvée à votre emplacement, essayez de la spécifier en argument."
stopresell-notResell: "Vous ne pouvez pas arrêter la revente de la région '%region%' car elle n'est pas en vente."
stopresell-success: "'%region%' n'est plus en revente."
stopresell-noPermission: "Vous n'avez pas la permission de retirer votre région de la vente."
stopresell-noPermissionOther: "Vous n'avez pas la permission de retirer les régions de la vente."
addfriend-help: "/as addfriend <joueur> [region], la région dans laquelle vous vous trouvez sera utilisée si vous ne spécifiez pas de région."
addfriend-noPermissionOther: "Vous n'avez pas la permission d'ajouter des gens en amis dans une région qui n'est pas la vôtre."
addfriend-noPermission: "Vous n'avez pas la permission d'ajouter en amis des gens à votre région."
addfriend-alreadyAdded: "%0% est déjà ami avec cette région."
addfriend-self: "Ajouter le propriétaire de la région en ami n'aurait aucune utilité."
addfriend-noOwner: "Vous ne pouvez pas ajouter d'amis à une région sans propriétaire."
delfriend-help: "/as delfriend <joueur> [région], la région dans laquelle vous vous trouvez sera utilisée si vous ne spécifiez pas de région."
delfriend-noPermissionOther: "Vous n'avez pas la permission de supprimer des amis à une région n'étant pas la vôtre."
delfriend-noPermission: "Vous n'avez pas la permission de supprimer des amis de votre région."
delfriend-notAdded: "%0% n'est pas dans les amis de cette région."
delfriend-noOwner: "Vous ne pouvez pas supprimer les amis d'une région sans propriétaire."
linksigns-multipleRegions: "Plusieurs régions trouvées : &7%0%."
linksigns-multipleRegionsAdvice: "Cliquez plus tard pour réessayer ou utilisez '/as linksigns' pour arrêter."
linksigns-noRegions: "Aucune région AreaShop trouvée dans la direction de votre curseur, soyez sûr que la région est bien ajoutée à AreaShop &7(portée maximale de 100 blocs)."
linksigns-regionFound: "La région %region% a été trouvée, maintenant montrer un panneau et faites un clic gauche sur celui-ci."
linksigns-signFound: "Un panneau a été trouvé à (%0%, %1%, %2%), maintenant montrez une région et faites un clic droit pour la lier."
linksigns-noSign: "Aucune panneau trouvé dans la direction de votre curseur, soyez sûr que vous regardez directement la panneau et re-cliquez &7(portée maximale de 100 blocs)."
linksigns-alreadyRegistered: "Ce panneau est déjà enregistré avec la région %region%, cliquez encore pour sélectionner un autre panneau."
linksigns-first: "Vous êtes entré dans le mode de liaison d'un panneau."
linksigns-next: "&7Faites un clic gauche pour sélectionner un panneau, un clic droit pour sélectionner une région et utilisez /as linksigns pour arrêter le mode."
linksigns-noPermission: "Vous n'avez pas la permission de rentrer dans le mode de liaison d'un panneau."
linksigns-stopped: "Vous êtes sorti du mode de liaison d'un panneau."
stack-accepted: "Commence à créer %0% %1% régions avec %2% blocs entre chacune, dont les noms commencent avec %3% et ont un chiffre derrière. %4%"
stack-addToGroup: "Les régions créées ont été ajoutées au groupe '%0%'."
stack-noPermission: "Vous n'avez pas la permission de créer et d'ajouter des régions à AreaShop en vrac."
stack-wrongAmount: "'%0%' n'est pas une quantité correcte de régions."
stack-wrongGap: "'%0%' n'est pas un nombre correct pour le nombre de blocs séparant deux régions."
stack-noSelection: "Vous n'avez pas de sélection qui indique où doit se trouver la première région créée."
stack-addStart: "&7Ajout de %0% régions, %1% par seconde."
stack-addComplete: "&7Ajout de régions terminé."
stack-unclearDirection: "Merci de regarder clairement le Nord, l'Est, le Sud ou l'Ouest, actuellement détectée %0%."
timeleft-years: "%0% années"
timeleft-months: "%0% mois"
timeleft-days: "%0% jours"
timeleft-hours: "%0% heures"
timeleft-minutes: "%0% minutes"
timeleft-second: "%0% seconde"
timeleft-seconds: "%0% secondes"
timeleft-ended: "Expiré"
greeting-forrent: "La région '%region%' peut être louée pour %price% pour une durée de %duration%."
greeting-rented: "La région '%region%' est louée par %player% jusqu'au %until%."
greeting-forsale: "La région '%region%' peut être achetée pour %price%."
greeting-bought: "La région '%region%' est la propriété de %player%."
greeting-resale: "La région '%region%' peut être achetée pour %resaleprice% à %player%."
+346 -219
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.2, Percentage translated: 100% ║
# ║ Language: Dutch, Version: V2.3.0, 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) ║
@@ -8,11 +8,47 @@
# ║ 4: Change the strings in the new file to your liking and save the file ║
# ║ 5: Use '/as reload' or reload/restart your server to see the changes ║
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
action: "[blue][bold]<%0%>[/bold]"
button: "[bold]<%0%>[/bold]"
command:
- "[bold]%0%[/bold]"
- " hover: %lang:action|Gebruik %1%|%"
- " command: %1%"
helpCommand:
- "[gold]%0% [gray]-[reset]"
- " hover: %lang:action|Gebruik %0%|%"
- " command: %0%"
region: "%lang:tRegion|%region%|%"
tRegion:
- "[bold]%0%[/bold]"
- " hover: Gebied %0%"
- " hover: %lang:action|Gebied informatie|%"
- " command: /areashop info region %0%"
player: "%lang:tPlayer|%player%|%"
tPlayer:
- "[bold]%0%[/bold]"
- " hover: Speler %0%"
- " hover: %lang:action|Gebieden van %0%|%"
- " command: /areashop info player %0%"
landlord:
- "[bold]%landlord%[/bold]"
- " hover: Landeigenaar %landlord%"
- " hover: %lang:action|Gebieden van %landlord%|%"
- " command: /areashop info player %landlord%"
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, het WorldGuard gebied is niet beschikbaar (gebied '%world%')."
general-noRegion: "Je kunt deze actie niet uitvoeren, de wereld van dit gebied is niet beschikbaar (wereld '%region%')."
general-noWorld: "Je kunt deze actie niet uitvoeren, de wereld van %lang:region% is niet beschikbaar (wereld '%0%')."
general-noRegion: "Je kunt deze actie niet uitvoeren, het WorldGuard gebied is niet beschikbaar (gebied %lang:region%)."
general-noEconomy: "Er is geen Economy plugin geïnstalleerd of deze is incorrect opgezet, stel de server eigenaar hiervan op de hoogte."
general-cancelled: "%0%"
@@ -22,217 +58,279 @@ cmd-weOnlyByPlayer: "Gebruikmaken van een WorldEdit selectie is alleen mogelijk
cmd-noSelection: "Je hebt geen WorldEdit selectie."
cmd-noRegionsFound: "Er zijn geen gebieden in je selectie gevonden die geregistreerd staan in AreaShop."
cmd-noWERegionsFound: "Er zijn geen WorldEdit gebieden gevonden die zich in je selectie bevinden."
cmd-notRegistered: "Het aangegeven gebied is niet geregistreerd: %0%."
cmd-notRegistered: "Het aangegeven gebied is niet geregistreerd in AreaShop: %0%."
cmd-noRegionsAtLocation: "Geen gebieden gevonden op je lokatie, geef het gebied mee als argument."
cmd-moreRegionsAtLocation: "Meerdere gebieden gevonden op je lokatie, geef het gebied mee als argument."
cmd-automaticRegionOnlyByPlayer: "Automatisch bepalen van het gebied is alleen mogelijk voor spelers, geef het gebied mee als argument."
help-header: "Help pagina, commando's die jij kunt uitvoeren."
help-noPermission: "Je hebt geen toestemming om de help pagina te bekijken."
help-alias: "Commando aliassen: /areashop, /as."
help-help: "&6/as help &7-&r Laat deze help pagina zien."
help-info: "&6/as info &7-&r Vraag informatie over gebieden op."
help-rent: "&6/as rent &7-&r Huur een gebied of verleng de huur."
help-buy: "&6/as buy &7-&r Koop een gebied."
help-unrent: "&6/as unrent &7-&r Stop de huur van een gebied."
help-unrentOwn: "&6/as unrent &7-&r Stop de huur van een eigen gebied."
help-sell: "&6/as sell &7-&r Verkoop een gebied."
help-sellOwn: "&6/as sell &7-&r Verkoop een eigen gebied."
help-reload: "&6/as reload &7-&r Herlaad bestanden en update gebieden."
help-setrestore: "&6/as setrestore &7-&r Schakel herstellen in/uit en kies het profiel."
help-setprice: "&6/as setprice &7-&r Verander de prijs van een gebied."
help-setduration: "&6/as setduration &7-&r Verander de huurtijd van een region."
help-teleport: "&6/as tp &7-&r Teleporteer naar je gekochte/gehuurde gebieden."
help-teleportAll: "&6/as tp &7-&r Teleporteer naar koop/huur gebieden."
help-setteleport: "&6/as settp &7-&r Stel de teleporteer locatie in van jouw gebieden."
help-setteleportAll: "&6/as settp &7-&r Stel een teleporteer gebied in."
help-find: "&6/as find &7-&r Zoek een leeg huur of koop gebied."
help-groupadd: "&6/as groupadd &7-&r Voeg een gebied toe aan een groep."
help-groupdel: "&6/as groupdel &7-&r Verwijder een gebied uit een groep."
help-grouplist: "&6/as grouplist &7-&r Laat een lijst met groepen zien."
help-groupinfo: "&6/as groupinfo &7-&r Laat informatie over een groep zien."
help-schemevent: "&6/as schemevent &7-&r Voer een schematic gebeurtenis uit."
help-add: "&6/as add &7-&r Registreer een huur of koop gebied."
help-del: "&6/as del &7-&r Verwijder een geregistreerd gebied."
help-addsign: "&6/as addsign &7-&r Voeg een bordje toe aan een bestaand gebied."
help-delsign: "&6/as delsign &7-&r Verwijder het bord waar je naar kijkt."
help-me: "&6/as me &7-&r Bekijk welke gebieden je hebt (+aflooptijd)."
help-setowner: "&6/as setowner &7-&r Stel gebied eigenaar in of verleng de huur."
help-resell: "&6/as resell &7-&r Zet een gebied in doorverkoop modus."
help-resellAll: "&6/as resell &7-&r Zet een gebied in doorverkoop modus."
help-stopResell: "&6/as stopresell &7-&r Stop het herverkopen van je gebied."
help-stopResellAll: "&6/as stopresell &7-&r Stop het herverkopen van een gebied."
help-addFriend: "&6/as addfriend &7-&r Voeg een vriend toe aan je gebied."
help-addFriendAll: "&6/as addfriend &7-&r Voeg een vriend toe aan een gebied."
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."
help-help: "%lang:helpCommand|/as help|% Laat deze help pagina zien."
help-info: "%lang:helpCommand|/as info|% Vraag informatie over gebieden op."
help-rent: "%lang:helpCommand|/as rent|% Huur een gebied of verleng de huur."
help-buy: "%lang:helpCommand|/as buy|% Koop een gebied."
help-unrent: "%lang:helpCommand|/as unrent|% Stop de huur van een gebied."
help-sell: "%lang:helpCommand|/as sell|% Verkoop een gebied."
help-reload: "%lang:helpCommand|/as reload|% Herlaad bestanden en update gebieden."
help-setrestore: "%lang:helpCommand|/as setrestore|% Schakel herstellen in/uit en kies het profiel."
help-setprice: "%lang:helpCommand|/as setprice|% Verander de prijs van een gebied."
help-setduration: "%lang:helpCommand|/as setduration|% Verander de huurtijd van een region."
help-teleport: "%lang:helpCommand|/as tp|% Teleporteer naar koop/huur gebieden."
help-setteleport: "%lang:helpCommand|/as settp|% Stel een teleporteer plek in."
help-find: "%lang:helpCommand|/as find|% Zoek een leeg huur of koop gebied."
help-groupadd: "%lang:helpCommand|/as groupadd|% Voeg een gebied toe aan een groep."
help-groupdel: "%lang:helpCommand|/as groupdel|% Verwijder een gebied uit een groep."
help-grouplist: "%lang:helpCommand|/as grouplist|% Laat een lijst met groepen zien."
help-groupinfo: "%lang:helpCommand|/as groupinfo|% Laat informatie over een groep zien."
help-schemevent: "%lang:helpCommand|/as schemevent|% Voer een schematic gebeurtenis uit."
help-add: "%lang:helpCommand|/as add|% Registreer een huur of koop gebied."
help-del: "%lang:helpCommand|/as del|% Verwijder een geregistreerd gebied."
help-addsign: "%lang:helpCommand|/as addsign|% Voeg een bordje toe aan een bestaand gebied."
help-delsign: "%lang:helpCommand|/as delsign|% Verwijder het bord waar je naar kijkt."
help-me: "%lang:helpCommand|/as me|% Bekijk welke gebieden je hebt (+aflooptijd)."
help-setowner: "%lang:helpCommand|/as setowner|% Stel gebied eigenaar in of verleng de huur."
help-resell: "%lang:helpCommand|/as resell|% Zet een gebied in doorverkoop modus."
help-stopResell: "%lang:helpCommand|/as stopresell|% Stop het herverkopen van een gebied."
help-addFriend: "%lang:helpCommand|/as addfriend|% Voeg een vriend toe aan een gebied."
help-delFriend: "%lang:helpCommand|/as delfriend|% Verwijder een vriend van een gebied."
help-linksigns: "%lang:helpCommand|/as linksigns|% Gebruik massa bord koppelen mode."
help-stack: "%lang:helpCommand|/as stack|% Creer meerdere gebieden en voeg ze toe."
help-setlandlord: "%lang:helpCommand|/as setlandlord|% Creer meerdere gebieden en voeg ze toe."
rent-help: "/as rent <gebiednaam>."
rent-help: "/as rent [region], het gebied waarin je staat zal worden gebruikt als je het niet aangeeft."
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 huurt %region% tot %until%."
rent-extended: "Je hebt je huur van %region% verlengt tot %until%."
rent-extendedToMax: "Je hebt je huur van %region% verlengt tot %until% (dit is de maximale huurtijd van %maxrenttime%)."
rent-extend: "Je kunt je huur verlengen door opnieuw op het bordje te klikken of gebruik te maken van /as rent."
rent-rented: "Je hebt je huur van %lang:region% verlengt tot %until%, je kunt je huur verlengen door het rechtsklikken van het bord of /as rent."
rent-extended: "Je hebt je huur van %lang:region% verlengt tot %until%."
rent-extendedToMax: "Je hebt je huur van %lang:region% verlengt tot %until% (dit is de maximale huurtijd van %maxrenttime%)."
rent-lowMoneyExtend: "Je hebt niet genoeg geld om het gebied te huren (je hebt %0% van de %price%)."
rent-lowMoneyRent: "Je hebt niet genoeg geld om het gebied te kopen (je hebt %0% van de %price%)."
rent-someoneElse: "Iemand anders heeft dit gebied al gehuurd."
rent-lowMoneyRent: "Je hebt niet genoeg geld om %lang:region% te kopen (je hebt %0% van de %price%)."
rent-someoneElse: "Iemand anders heeft %lang:region% al gehuurd."
rent-notRentable: "Dat gebied is niet beschikbaar om te huren."
rent-maxExtends: "Je kunt de huur niet meer verlengen (het maximum is %maxextends% 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 %maxrenttime% en je hebt het al voor %timeleft% gehuurt."
rent-restrictedToWorld: "Je moet in de wereld '%world%' zijn om dit gebied te kopen (je ben in '%0%')."
rent-restrictedToRegion: "Je moet in '%region%' staan om hem te huren."
rent-expireWarning: "Je gebied %region% heeft nog %timeleft% over, verleng het als je het wilt houden.."
rent-alreadyAtFull: "%region% is al verhuurd voor de maximale tijd, je kunt hem niet verlengen."
rent-maxExtends: "Je kunt de huur niet meer verlengen (het maximum is %maxextends% keer), je kunt echter wel %lang:region% opnieuw huren als het afgelopen is."
rent-maxRentTime: "Je kunt %lang:region% niet meer tijd van tevoren huren, de maximum tijd is %maxrenttime% en je hebt het al voor %timeleft% gehuurt."
rent-restrictedToWorld: "Je moet in de wereld '%world%' zijn om %lang:region% te kopen (je ben in '%0%')."
rent-restrictedToRegion: "Je moet in %lang:region% staan om hem te huren."
rent-expireWarning: "Je gebied %lang:region% heeft nog %timeleft% over, verleng het als je het wilt houden.."
rent-alreadyAtFull: "%lang:region% is al verhuurd voor de maximale tijd, je kunt hem niet verlengen."
buy-help: "/as buy <gebiednaam>."
buy-help: "/as buy [region], het gebied waarin je staat word gebruikt als je het niet aangeeft."
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: "Gebied %region% is niet beschikbaar om te kopen."
buy-notBuyable: "Gebied %lang:region% 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."
buy-succes: "Je hebt %region% succesvol gekocht."
buy-successResale: "Je hebt %region% succesvol gekocht van %0%."
buy-successSeller: "Je gebied %region% is verkocht aan %player% voor %0%."
buy-lowMoney: "Je hebt niet genoeg geld om het gebied te kopen (je hebt %0% van de %price%)."
buy-lowMoneyResell: "Je hebt niet genoeg geld om het gebied te kopen (je hebt %0% van de %resellprice%)."
buy-yours: "Je hebt dit gebied al gekocht."
buy-someoneElse: "Iemand anders heeft dit gebied al gekocht."
buy-restrictedToWorld: "Je moet in de wereld '%world%' zijn om dit gebied te kopen (je ben in '%0%')."
buy-restrictedToRegion: "Je moet in '%region%' staan om hem te kopen."
buy-succes: "Je hebt %lang:region% succesvol gekocht."
buy-successResale: "Je hebt %lang:region% succesvol gekocht van %lang:tPlayer|%0%|%."
buy-successSeller: "Je gebied %lang:region% is verkocht aan %lang:player% voor %0%."
buy-lowMoney: "Je hebt niet genoeg geld om %lang:region% te kopen (je hebt %0% van de %price%)."
buy-lowMoneyResell: "Je hebt niet genoeg geld om %lang:region% te kopen (je hebt %0% van de %resellprice%)."
buy-yours: "Je bent al in bezit van %lang:region%."
buy-someoneElse: "Iemand anders is al in bezit van %lang:region%."
buy-restrictedToWorld: "Je moet in de wereld '%world%' zijn om %lang:region% te kopen (je ben in '%0%')."
buy-restrictedToRegion: "Je moet in %lang:region% staan om hem te kopen."
unrent-help: "/as unrent <gebiednaam>, het gebied waarin je staat zal worden gebruikt als je deze niet aangeeft."
unrent-help: "/as unrent [region], het gebied waarin je staat zal worden gebruikt als je deze niet aangeeft."
unrent-noPermission: "Je hebt geen toestemming om te stoppen met huren."
unrent-noPermissionOther: "Je hebt geen toestemming om iemand anders huur te stoppen."
unrent-notRegistered: "De huur kan niet gestopt worden want het gebied is niet geregistreerd om te huren."
unrent-notRented: "De huur kan niet gestopt worden want het gebied is niet gehuurd."
unrent-unrented: "Je bent gestopt met huren van %region%."
unrent-other: "Huren van %region% is gestopt voor %player%."
unrent-expired: "Je huur van %region% is afgelopen."
unrent-unrented: "De huur van %lang:region% van %lang:player% is gestopt."
unrent-expired: "Je huur van %lang:region% is afgelopen."
sell-help: "/as sell <gebiednaam>, het gebied waarin je staat zal worden gebruikt als je deze niet aangeeft."
sell-help: "/as sell [region], het gebied waarin je staat zal worden gebruikt als je deze niet aangeeft."
sell-notRegistered: "Het gebied kan niet verkocht worden want het staat niet geregistreerd om te kopen."
sell-notBought: "Het gebied kan niet verkocht worden want het is niet gekocht."
sell-sold: "%region% is verkocht voor %player%."
sell-soldYours: "Je hebt %region% verkocht."
sell-sold: "%lang:region% is verkocht voor %lang:player%."
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-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-updateStart: "[gray]%0% gebieden aan het updaten met %1% per seconde."
reload-updateComplete: "[gray]Updaten 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\nall\nrented [groep]\nforrent [groep]\nsold [groep]\nforsale [groep]\nplayer <speler>\nregion <gebied>\nnogroup"
info-help:
- "/as info[break]"
- " %lang:command|all|/as info all|%[break]"
- " %lang:command|rented|/as info rented|% [group] [page][break]"
- " %lang:command|forrent|/as info forrent|% [group] [page][break]"
- " %lang:command|sold|/as info sold|% [group] [page][break]"
- " %lang:command|forsale|/as info forsale|% [group] [page][break]"
- " %lang:command|reselling|/as info reselling|% [group] [page][break]"
- " %lang:command|nogroup|/as info nogroup [page]|%"
- " %lang:command|region|/as info region|% [region][break]"
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."
info-all-buys: "Gebieden geregistreerd voor de verkoop: %0%."
info-all-noBuys: "Er zijn geen gebieden geregistreerd voor de verkoop."
info-nogroupRents: "Huur gebieden zonder groep: &7%0%."
info-nogroupBuys: "Koop gebieden zonder groep: &7%0%."
info-nogroupNoRents: "Er zijn geen huur gebieden zonder een groep."
info-nogroupNoBuys: "Er zijn geen koop gebieden zonder een groep."
info-rented: "Verhuurde gebieden: %0%."
info-noRented: "Er zijn geen verhuurde gebieden."
info-unrented: "Gebieden te huur: %0%."
info-noUnrented: "Alle gebieden zijn verhuurd."
info-sold: "Verkochte gebieden: %0%."
info-noSold: "Alle gebieden zijn verkocht."
info-forsale: "Gebieden te koop: %0%."
info-noForsale: "Alle gebieden zijn verkocht."
info-allHeader: "Alle gebieden%0%:"
info-rentedHeader: "Verhuurde gebieden%0%:"
info-forrentHeader: "Gebieden te huur%0%:"
info-forsaleHeader: "Gebieden te koop%0%:"
info-soldHeader: "Verkochte gebieden%0%:"
info-resellingHeader: "Gebieden aan het doorverkopen%0%:"
info-nogroupHeader: "Gebieden zonder groep%0%:"
info-limitedToGroup: "(beperkt tot groep %0%)"
info-nogroupNone: "Er zijn geen gebieden zonder groep."
info-noFiltergroup: "Groep '%0%' bestaat niet en kan daardoor niet gebruikt worden om de resultaten te limiteren."
info-noRegions: "Er zijn geen gebieden gevonden."
info-wrongPage: "%0% is geen correct pagina nummer."
info-entryForrent: "[darkgreen][bold]►[reset] %lang:region%: Te huur voor %price% per %duration%."
info-entryRented: "[darkgreen][bold]►[reset] %lang:region%: Verhuurd aan %lang:player%."
info-entryForsale: "[darkgreen][bold]►[reset] %lang:region%: Te koop voor %price%."
info-entrySold: "[darkgreen][bold]►[reset] %lang:region%: Verkocht aan %lang:player%."
info-entryReselling: "[darkgreen][bold]►[reset] %lang:region%: Verkocht aan %lang:player% (aan het doorverkopen)."
info-pageStatus: "[gray]Pagina %0%/%1%"
info-pagePrevious:
- " [gray][bold]◄Vorige[/bold] "
- " hover: %lang:action|Laat de vorige pagina zien|%"
- " command: %0%"
info-pageNoPrevious:
- " [darkgray][bold]◄Vorige[/bold] "
- " hover: Dit is al de eerste pagina"
info-pageNext:
- " [gray][bold]Volgende►[/bold]"
- " hover: %lang:action|Laat de volgende pagina zien|%"
- " command: %0%"
info-pageNoNext:
- " [darkgray][bold]Volgende►[/bold]"
- " hover: Dit is al de laatste pagina"
info-playerHelp: "/as info player <naam>."
info-playerRents: "Gebieden gehuurd door %0%: %1%."
info-playerNoRents: "%0% heeft geen gebied gehuurd."
info-playerBuys: "Gebieden gekocht door %0%: %1%."
info-playerNoBuys: "%0% heeft geen gebieden gekocht."
info-playerRents: "Gebieden gehuurd door %lang:tPlayer|%0%|%: [gray]%1%."
info-playerNoRents: "%lang:tPlayer|%0%|% heeft geen gebieden gehuurd."
info-playerBuys: "Gebieden gekocht door %lang:tPlayer|%0%|%: [gray]%1%."
info-playerNoBuys: "%lang:tPlayer|%0%|% heeft geen gebieden gekocht."
info-regionHelp: "/as info region <naam>."
info-regionHeaderRent: "&2Informatie over %region%:"
info-regionHeaderBuy: "&2Informatie over %region%:"
info-regionRented: "&2&l►&r Gehuurd door %player% tot: &7%until%."
info-regionBought: "&2&l►&r Gekocht door %player%."
info-regionReselling: "&2&l►&r Gekocht door %player%, aan het doorverkopen."
info-regionExtending: "&2&l►&r Verleng prijs: &7%price% per %duration%."
info-regionCanBeRented: "&2&l►&r Huurprijs: &7%price% per %duration%."
info-regionCanBeBought: "&2&l►&r Koopprijs: &7%price%."
info-regionReselPrice: "&2&l►&r Doorverkoop prijs: &7%resellprice% (je kunt het kopen van %player%)."
info-regionFriends: "&2&l►&r Toegevoegde vrienden: &7%friends%."
info-regionMoneyBackBuy: "&2&l►&r Verkoop terugbetaling: &7%moneyback% (%moneybackpercent%% van de prijs)."
info-regionMoneyBackRent: "&2&l►&r Huurstop geld terug: &7%moneyback% (%moneybackpercent%% van de overgebleven tijd)."
info-regionMaxExtends: "&2&l►&r Maximaal aantal keer verlengen: &7%maxextends% keer."
info-regionNoExtending: "&2&l►&r Huurgebied kan niet verlengt worden."
info-regionExtendsLeft: "&2&l►&r Keer verlengen over: &7%extendsleft%van de %maxextends%."
info-regionMaxRentTime: "&2&l►&r Van te voren huren: &7%maxrenttime% maximum."
info-regionNoTeleport: "&2&l►&r Teleporteer lokatie niet ingesteld%0%."
info-regionTeleportHint: " &7(gebruik '/as settp' voor een betere lokatie)"
info-regionTeleportAt: "&2&l►&r Teleporteer lokatie ingesteld op: &7(%0%, %1%, %2%, %3%, helling:%4%, draaiing:%5%)."
info-regionSigns: "&2&l►&r Verbonden borden: &7%0%."
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
info-regionGroups: "&2&l►&r Toegewezen groepen: &7%0%."
info-regionInactiveUnrent: "&2&l►&r Automatische huurstop na: &7%inactivetime% inactiviteit van de speler."
info-regionInactiveSell: "&2&l►&r Automatische verkoop na: &7%inactivetime% inactiviteit van de speler."
info-regionRestrictedRegionRent: "&2&l►&r Je moet in dit gebied staan om hem te huren."
info-regionRestrictedWorldRent: "&2&l►&r Je moet in de wereld '%world%' staan om dit gebied te huren."
info-regionRestrictedRegionBuy: "&2&l►&r Je moet in dit gebied staan om hem te kopen."
info-regionRestrictedWorldBuy: "&2&l►&r Je moet in de wereld '%world%' staan om dit gebied te kopen."
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-regionHeaderRent: "[darkgreen]Informatie over %lang:region%:"
info-regionHeaderBuy: "[darkgreen]Informatie over %lang:region%:"
info-regionFooterRent: ""
info-regionFooterBuy: ""
info-regionRented: "[darkgreen][bold]►[reset] Gehuurd door %lang:player% tot: [gray]%until%."
info-regionBought: "[darkgreen][bold]►[reset] Gekocht door %lang:player%."
info-regionReselling: "[darkgreen][bold]►[reset] Gekocht door %lang:player%, aan het doorverkopen."
info-regionExtending:
- "[darkgreen][bold]►[reset] "
- "[bold]Verleng voor[/bold]"
- " hover: Verleng huur van %region%"
- " hover: met %duration% voor %price%"
- " hover: %lang:action|Verleng de huur van %region%|%"
- " command: /areashop rent %region%"
- ": [gray]%price% per %duration%."
info-regionCanBeRented:
- "[darkgreen][bold]►[reset] "
- "[bold]Huur voor[/bold]"
- " hover: Huur %region% voor %price% per %duration%"
- " hover: %lang:action|Huur %region%|%"
- " command: /areashop rent %region%"
- ": [gray]%price% per %duration%."
info-regionCanBeBought:
- "[darkgreen][bold]►[reset] "
- "[bold]Koop voor[/bold]"
- " hover: Koop %region% voor %price%"
- " hover: %lang:action|Koop %region%|%"
- " command: /areashop buy %region%"
- ": [gray]%price%."
info-regionReselPrice: "[darkgreen][bold]►[reset] Doorverkoop prijs: [gray]%resellprice% (je kunt het kopen van %lang:player%)."
info-regionFriends: "[darkgreen][bold]►[reset] Toegevoegde vrienden: [gray]%0%."
info-friend: "%lang:tPlayer|%0%|%"
info-friendRemove:
- "%lang:info-friend|%0%|%"
- "[red]✕[gray]"
- " hover: Gebied %region%"
- " hover: %lang:action|Verwijder %0% as friend|%"
- " command: /areashop delfriend %0% %region%"
info-regionMoneyBackBuy: "[darkgreen][bold]►[reset] Verkoop terugbetaling: [gray]%moneyback% (%moneybackpercent%% van de prijs)."
info-regionMoneyBackBuyClick:
- "[darkgreen][bold]►[reset] "
- "[bold]Verkoop terugbetaling[/bold]"
- " hover: Verkoop %region% en krijg %moneyback% terug"
- " hover: %lang:action|Verkoop %region%|%"
- " command: /areashop sell %region%"
- ": [gray]%moneyback% (%moneybackpercent%% van de prijs)."
info-regionMoneyBackRent: "[darkgreen][bold]►[reset] Stop met huren terugbetaling: [gray]%moneyback% (%moneybackpercent%% van de overgebleven tijd)."
info-regionMoneyBackRentClick:
- "[darkgreen][bold]►[reset] "
- "[bold]Stop met huren terugbetaling[/bold]"
- " hover: Stop met huren van %region% en krijg %moneyback% terug"
- " hover: %lang:action|Stop met huren van %region%|%"
- " command: /areashop unrent %region%"
- ": [gray]%moneyback% (%moneybackpercent%% van de overgebleven tijd)."
info-regionMaxExtends: "[darkgreen][bold]►[reset] Maximaal keer verlengen: [gray]%maxextends% keer."
info-regionNoExtending: "[darkgreen][bold]►[reset] Huur kan niet verlengt worden."
info-regionExtendsLeft: "[darkgreen][bold]►[reset] Verlengingen over: [gray]%extendsleft% keer van de %maxextends%."
info-regionMaxRentTime: "[darkgreen][bold]►[reset] Huurtijd: [gray]maximaal %maxrenttime%."
info-prefix: "[darkgreen][bold]►[reset] "
info-regionTeleport:
- "[bold]Ga naar het gebied[/bold]"
- " hover: %lang:action|Ga naar %region%|%"
- " command: /areashop tp %region%"
info-setRegionTeleport:
- "[bold]stel teleporteer locatie in[/bold]"
- " hover: %region%"
- " hover: %lang:action|Stel teleporteer locatie in|%"
- " command: /areashop settp %region%"
info-regionSigns: "[darkgreen][bold]►[reset] Verbonden borden: [gray]%0%."
info-regionSignLocation: "[gray](%0%, %1%, %2%, %3%)[reset]"
info-regionGroups: "[darkgreen][bold]►[reset] Toegewezen groepen: [gray]%0%."
info-regionInactiveUnrent: "[darkgreen][bold]►[reset] Automatische huurstop na: [gray]Inactiviteit van %inactivetime% door de speler."
info-regionInactiveSell: "[darkgreen][bold]►[reset] Automatische verkoop na: [gray]Inactiviteit van %inactivetime% door de spler."
info-regionRestrictedRegionRent: "[darkgreen][bold]►[reset] Je moet in %lang:region% staan om deze te huren."
info-regionRestrictedWorldRent: "[darkgreen][bold]►[reset] je moet in de wereld '%world%' zijn om %lang:region% te huren."
info-regionRestrictedRegionBuy: "[darkgreen][bold]►[reset] Je moet in %lang:region% staan om deze te kopen."
info-regionRestrictedWorldBuy: "[darkgreen][bold]►[reset] Je moet in de wereld '%world%' staan om %lang:region% te kopen."
info-regionRestoringRent: "[darkgreen][bold]►[reset] Herstellen is ingeschakeld [gray](gebied zal resetten bij een huurstop)%0%."
info-regionRestoringBuy: "[darkgreen][bold]►[reset] Herstellen is ingeschakeld [gray](gebied zal resetten bij verkoop)%0%."
info-regionRestoringProfile: " (profiel: %0%)"
info-regionLandlord: "&2&l►&r Landeigenaar: &7%landlord% (ontvangt het geld)."
info-regionLandlord: "[darkgreen][bold]►[reset] Landeigenaar: [gray]%lang:landlord% (krijgt het geld)."
info-regionNotExisting: "Het aangegeven gebied is niet geregistreerd: %0%."
setrestore-help: "/as setrestore <gebied> <true|false|general> [profiel]."
setrestore-noPermission: "Je hebt geen toestemming om de herstel opties te veranderen."
setrestore-notRegistered: "Het aangegeven gebied is niet geregistreerd: %0%."
setrestore-invalidSetting: "'%0%' is geen geldige staat, gebruik true, false of general."
setrestore-success: "De herstel optie van %region% is succesvol gezet naar '%0%'."
setrestore-successProfile: "Herstel optie van %region% succesvol gezet naar '%0%' en het profiel naar '%1%'."
setrestore-success: "Herstel optie van %lang:region% succesvol gezet naar '%0%'."
setrestore-successProfile: "Herstel optie van %lang:region% succesvol gezet naar '%0%' en het profiel naar '%1%'."
setprice-noPermission: "Je hebt geen toestemming om de prijs van een gebied te veranderen."
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 %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%."
setprice-successRent: "Prijs van gebied %lang:region% is veranderd naar %price% per %duration%."
setprice-successBuy: "De prijs van het gebied %lang:region% is veranderd naar %price%."
setprice-successRemoved: "Prijs van %lang: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 %lang: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."
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: "Looptijd van gebeid %region% veranderd naar '%duration%'."
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%."
setduration-success: "Looptijd van gebeid %lang:region% veranderd naar '%duration%'."
setduration-noLandlord: "Je hebt geen toestemming om de tijdsduur te veranderen omdat je niet de landeigenaar bent van %lang:region%."
setduration-successRemoved: "Tijdsduur van %lang: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."
setup-alreadyRentSign: "Het aangegeven gebied is al toegevoegd als huur gebied aan AreaShop, voeg een bord toe met [as] op de eerste regel of met '/as addsign'."
setup-alreadyBuySign: "Het aangegeven gebied is al toegevoegd als koop gebied aan AreaShop, voeg een bord toe met [as] op de eerste regel of met '/as addsign'."
setup-noDuration: "Je hebt geen tijdsduur voor het huren aangegeven, zet dit op de derde regel."
setup-wrongDuration: "De aangegeven tijdsduur is niet in het correcte formaat, voorbeeld: 1 dag."
setup-noPrice: "Je hebt geen prijs aangegeven op de vierde regel."
setup-wrongPrice: "Je hebt de prijs niet goed aangegeven, gebruik alleen nummers."
setup-rentSuccess: "Huren van gebied %0% is goed opgezet."
setup-buySuccess: "Kopen van gebied %0% is goed opgezet."
setup-rentSuccess: "Huren van gebied %lang:region% is goed opgezet."
setup-buySuccess: "Kopen van gebied %lang:region% is goed opgezet."
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-couldNotDetect: "Meerdere gebieden gevonden op de lokatie van het bord, geef het gebied aan op de tweede regel (2 van de gevonden gebieden: %lang:tRegion|%0%|% en %lang:tRegion|%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."
destroy-successRent: "%region% succesvol verwijderd als huur gebied."
destroy-successBuy: "%region% succesvol verwijderd als koop gebied."
destroy-successRent: "%lang:region% succesvol verwijderd als huur gebied."
destroy-successBuy: "%lang:region% succesvol verwijderd als koop gebied."
teleport-help: "/as tp <gebied> <aantal> <soort>."
teleport-noRentOrBuy: "Het aangegeven gebied is niet geregistreerd: %0%."
@@ -242,9 +340,9 @@ teleport-noPermissionSign: "Je hebt geen toestemming om naar het bordje van je g
teleport-noPermissionOtherSign: "Je hebt geen toestemming om naar bordjes te teleporteren van gebieden die niet van jou zijn."
teleport-noPermissionFriend: "Je hebt geen toestemming om te teleporteren naar gebieden waar je als vriend bent toegevoegd."
teleport-noPermissionFriendSign: "Je hebt geen toestemming om te teleporteren naar het bord van gebieden waar je als vriend bent toegevoegd."
teleport-success: "Je bent geteleporteerd naar %region%."
teleport-successSign: "Je bent geteleporteerd naar het bordje van %region%."
teleport-noSafe: "Geen veilige plek gevonden in gebied %region%, geen blokken over in het gebied of het maximum aantal pogingen overschreden (%0%%1%)."
teleport-success: "Je bent geteleporteerd naar %lang:region%."
teleport-successSign: "Je bent geteleporteerd naar het bord van %lang:region%."
teleport-noSafe: "Geen veilige plek gevonden in gebied %lang:region%, geen blokken over in het gebied of het maximum aantal pogingen overschreden (%0%%1%)."
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."
@@ -253,14 +351,14 @@ setteleport-help: "/as settp [gebied] [reset], het gebied waar je in staat zal w
setteleport-noPermission: "Je hebt geen toestemming om de teleporteer lokatie in te stellen."
setteleport-noPermissionOther: "Je hebt geen toestemming om de teleporteer lokatie in te stellen voor een gebied dat niet van jou is."
setteleport-noRentOrBuy: "Het aangegeven gebied is niet geregistreerd: %0%."
setteleport-success: "Teleporteer lokatie van %region% ingestelt."
setteleport-success: "Teleporteer lokatie van %lang:region% ingestelt."
setteleport-notInside: "De lokatie moet zich binnen het gebied bevinden."
setteleport-reset: "Teleporteer lokatie van %region% is gereset."
setteleport-reset: "Teleporteer lokatie van %lang:region% is gereset."
find-help: "/as find <buy|rent> [maxprijs] [groep]."
find-noPermission: "Je hebt geen toestemming om te zoeken naar gebieden en naar deze te teleporteren."
find-success: "Een %0% gebied is gevonden: %region%, bij het zoeken met een maximale prijs gelijk aan je saldo: %1%%2%."
find-successMax: "Een %0% gebied is gevonden: %region%, bij het zoeken met een maximale prijs van %1%%2%."
find-success: "Een %0% gebied is gevonden: %lang:region%, bij het zoeken met een maximale prijs gelijk aan je saldo: %1%%2%."
find-successMax: "Een %0% gebied is gevonden: %lang:region%, bij het zoeken met een maximale prijs van %1%%2%."
find-wrongMaxPrice: "De aangegeven maximum prijs is geen correct nummer: %0%."
find-wrongGroup: "De aangegeven groep bestaat niet: %0%."
find-noneFound: "Geen %0% gebied gevonden bij het zoeken met een maximale prijs gelijk aan je saldo: %1%%2%."
@@ -269,80 +367,77 @@ find-onlyInGroup: ", alleen gebieden gezocht in de groep: %0%."
groupadd-help: "/as groupadd <groep> [gebied], als er geen gebied is aangegeven dan worden alle gebieden in je WorldEdit selectie gebruikt."
groupadd-noPermission: "Je hebt geen toestemming om gebieden toe te voegen aan groepen."
groupadd-noRegion: "Het aangegeven gebied is niet geregistreerd: %0%."
groupadd-success: "Gebied %region% is toegevoegd aan groep '%0%', deze group heeft nu %1% leden."
groupadd-failed: "Gebied %region% is al toegevoegd aan groep '%0%'."
groupadd-weSuccess: "Toegevoegd aan groep %0%: &7%1%."
groupadd-weFailed: "Waren al toegevoegd aan groep %0%: &7%1%."
groupadd-success: "Gebied %lang:region% is toegevoegd aan groep '%0%', deze group heeft nu %1% leden."
groupadd-failed: "Gebied %lang:region% is al toegevoegd aan groep '%0%'."
groupadd-weSuccess: "Toegevoegd aan groep %0%: [gray]%1%."
groupadd-weFailed: "Waren al toegevoegd aan groep %0%: [gray]%1%."
groupdel-help: "/as groupdel <groep> [gebied], als er geen gebied is aangegeven worden alle gebieden in je WorldEdit selectie gebruikt."
groupdel-noPermission: "Je hebt geen toestemming om gebieden van groepen te verwijderen."
groupdel-noRegion: "Het aangegeven gebied staat niet geregistreerd: %0%."
groupdel-success: "Gebied %region% is verwijderd van groep '%0%', deze groep heeft nu %1% leden."
groupdel-failed: "Gebied %region% is geen lid van groep '%0%'."
groupdel-weSuccess: "Verwijderd van groep %0%: &7%1%."
groupdel-weFailed: "Waren al niet in de groep %0%: &7%1%."
groupdel-success: "Gebied %lang:region% is verwijderd van groep '%0%', deze groep heeft nu %1% leden."
groupdel-failed: "Gebied %lang:region% is geen lid van groep '%0%'."
groupdel-weSuccess: "Verwijderd van groep %0%: [gray]%1%."
groupdel-weFailed: "Waren al niet in de groep %0%: [gray]%1%."
grouplist-noPermission: "Je hebt geen toestemming om de geregistreerde groepen te bekijken."
grouplist-noGroups: "Er zijn geen groepen aangemaakt."
grouplist-success: "De volgende groepen zijn geregistreerd: &7%0%."
grouplist-success: "De volgende groepen zijn geregistreerd: [gray]%0%."
groupinfo-help: "/as groupinfo <groep>."
groupinfo-noPermission: "Je hebt geen toestemming voor het bekijken van informatie over een groep."
groupinfo-noGroup: "Er is geen groep geregistreerd met de naam '%0%', gebruik /as grouplist om de lijst te bekijken."
groupinfo-members: "De volgende gebieden zijn leden van de groep %0%: &7%1%."
groupinfo-members: "De volgende gebieden zijn leden van de groep %0%: [gray]%1%."
groupinfo-noMembers: "Groep %0% heeft geen leden."
schemevent-help: "/as schemevent <gebied> <created|deleted|rented|unrented|bought|sold>."
schemevent-noRegion: "Het aangegeven gebied is niet geregistreerd: %0%."
schemevent-wrongEvent: "Het aangegeven event '%0%' bestaat niet, gebruik een van de volgende: &7%1%."
schemevent-success: "Event '%0%' succesvol getriggerd voor gebied %region%."
schemevent-wrongEvent: "Het aangegeven event '%0%' bestaat niet, gebruik een van de volgende: [gray]%1%."
schemevent-success: "Event '%0%' succesvol getriggerd voor gebied %lang:region%."
schemevent-noPermission: "Je hebt geen toestemming om events te triggeren."
add-help: "/as add <rent|buy> [gebied] [wereld]."
add-noPermission: "Je hebt geen toestemming om een gebied toe te voegen aan AreaShop."
add-success: "Toegevoegd als %0%: &7%1%."
add-failed: "Al geregistreerd: &7%0%."
add-blacklisted: "Op de blacklist: &7%0%."
add-success: "Toegevoegd als %0%: [gray]%1%."
add-failed: "Al geregistreerd: [gray]%0%."
add-blacklisted: "Op de blacklist: [gray]%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."
add-noRegion: "WorldGuard gebied '%0%' bestaat niet in deze wereld."
add-noPermissionRegions: "Geen toestemming om toe te voegen: [gray]%0%."
add-noPermissionOwnerMember: "[gray]Je bent geen member/owner van deze gebieden 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."
del-success: "Verwijderde gebieden: &7%0%."
del-failed: "Geen toestemming om te verwijderen of niet geregistreerd: &7%0%."
del-success: "Verwijderde gebieden: [gray]%0%."
del-failed: "Geen toestemming om te verwijderen of niet geregistreerd: [gray]%0%."
addsign-help: "/as addsign [gebied] [profiel]."
addsign-noSign: "Je kijkt niet naar een bord."
addsign-noRegion: "Gebied '%0%' is niet bekent in AreaShop, controleer of het al is toegevoegd aan AreaShop."
addsign-noRegions: "Geen gebied gevonden op de lokatie van het bord."
addsign-couldNotDetect: "Meerdere gebieden gevonden op de lokatie van het bord, geef het gebied mee als extra argument (2 van de gevonden gebieden: %0% en %1%)."
addsign-couldNotDetectSign: "Meerdere gebieden gevonden op de lokatie van het bord, geef het gebied aan op de tweede regel (2 van de gevonden gebieden: %0% en %1%)."
addsign-wrongProfile: "Het aangegeven profiel bestaat niet, gebruik een van de volgende (check de config): &7%0%."
addsign-success: "Het bord is toegevoegd aan %region%."
addsign-successProfile: "Het bord is toegevoegd aan %region% met profiel %0%."
addsign-alreadyRegistered: "Dat bord is al geregistreerd voor gebied %region%."
addsign-couldNotDetect: "Meerdere gebieden gevonden op de lokatie van het bord, geef het gebied mee als extra argument (2 van de gevonden gebieden: %lang:tRegion|%0%|% en %lang:tRegion|%1%|%)."
addsign-couldNotDetectSign: "Meerdere gebieden gevonden op de lokatie van het bord, geef het gebied aan op de tweede regel (2 van de gevonden gebieden: %lang:tRegion|%0%|% en %lang:tRegion|%1%|%)."
addsign-wrongProfile: "Het aangegeven profiel bestaat niet, gebruik een van de volgende (check de config): [gray]%0%."
addsign-profile:
- "[bold]%0%[/bold]"
- " hover: Bord profiel %0%"
- " hover: %lang:action|Gebruik dit profiel|%"
- " command: /areashop linksigns %0%"
addsign-success: "Het bord is toegevoegd aan %lang:region%."
addsign-successProfile: "Het bord is toegevoegd aan %lang:region% met profiel %0%."
addsign-alreadyRegistered: "Dat bord is al geregistreerd voor gebied %lang:region%."
addsign-noPermission: "Je hebt geen toestemming om een bord toe te voegen."
delsign-noSign: "Je kijkt niet naar een bord."
delsign-noPermission: "Je hebt geen toestemming om een bord te verwijderen."
delsign-noRegion: "Dat bord hoort niet bij een AreaShop gebied."
delsign-success: "Het bord is verwijderd van gebied %region%."
delsign-success: "Het bord is verwijderd van gebied %lang:region%."
me-noPermission: "Je hebt geen toestemming om te zien welke gebieden je hebt."
me-header: "Gebieden van %lang:tPlayer|%0%|%:"
me-notAPlayer: "Je bent geen speler dus je kunt geen gebieden hebben."
me-noRentRegions: "Je hebt geen huur gebieden gehuurt."
me-noBuyRegions: "Je hebt geen koop gebieden gekocht."
me-rentRegions: "Je hebt de volgende gebieden gehuurt:"
me-buyRegions: "Je hebt de volgende gebieden gekocht:"
me-rentLine: "&2&l►&r %region% tot %until% &7(%timeleft% over)."
me-buyLine: "&2&l►&r %region%."
me-noFriendRegions: "Je bent niet aan gebieden toegevoegd als vriend."
me-friendRegions: "Je bent toegevoegd als vriend bij de volgende gebieden:"
me-friendLine: "&2&l►&r %region% &7(eigenaar: %player%)."
me-rentLine: "[darkgreen][bold]►[reset] %lang:region% [gray](tot %until%, %timeleft% over)."
me-buyLine: "[darkgreen][bold]►[reset] %lang:region%."
me-friendLine: "[darkgreen][bold]►[reset] %lang:region% [gray](toegevoegd als vriend, eigenaar: %lang:player%)."
me-nothing: "%lang:tPlayer|%0%|% heeft geen gebieden gekocht of gehuurd en is niet als vriend toegevoegd bij gebieden."
me-noPlayer: "%0% kan niet gevonden worden, is waarschijnlijk nooit op de server geweest."
setowner-help: "/as setowner <speler> [gebied], het gebied waar je in staat zal worden gebruikt als je deze niet aangeeft."
setowner-noPermission: "Je hebt geen toestemming om de eigenaar van een gebied in te stellen."
@@ -350,33 +445,31 @@ setowner-noPermissionRent: "Je hebt geen toestemming om de eigenaar van huur geb
setowner-noPermissionBuy: "Je hebt geen toestemming om de eigenaar van koop gebieden in te stellen."
setowner-notRegistered: "Het aangegeven gebied is niet geregistreerd, eigenaar kan niet worden ingesteld."
setowner-noPlayer: "De UUID van de aangegeven speler kon niet worden gevonden: %0%."
setowner-succesRent: "Eigenaar van %region% succesvol veranderd naar %player%, gehuurt tot %until% (%timeleft% over)."
setowner-succesRentExtend: "Eigenaar was al %player%, huur verlengt met '%duration%', nu gehuurd tot %until% (%timeleft% over)."
setowner-succesBuy: "Eigenaar van %region% succesvol veranderd naar %player%."
setowner-succesRent: "Eigenaar van %lang:region% succesvol veranderd naar %lang:player%, gehuurt tot %until% (%timeleft% over)."
setowner-succesRentExtend: "Eigenaar was al %lang:player%, huur verlengt met '%duration%', nu gehuurd tot %until% (%timeleft% over)."
setowner-succesBuy: "Eigenaar van %lang:region% succesvol veranderd naar %lang:player%."
resell-help: "/as resell <prijs> [gebied], het gebied waarin je staat zal worden gebruikt als je deze niet aangeeft."
resell-wrongPrice: "'%0%' is geen geldige prijs."
resell-notRegistered: "Het aangegeven gebied is niet geregistreerd: %0%."
resell-noRegionFound: "Geen AreaShop gebied gevonden op je lokatie, geeft de naam van het gebied mee als argument."
resell-notBought: "Je kunt %region% niet doorverkopen want dit gebied is nog niet verkocht."
resell-success: "%region% is succesvol in doorverkoop mode gezet voor %resellprice%."
resell-notBought: "Je kunt %lang:region% niet doorverkopen want dit gebied is nog niet verkocht."
resell-success: "%lang:region% is succesvol in doorverkoop mode gezet voor %resellprice%."
resell-noPermission: "Je hebt geen toestemming om je gebied in doorverkoop mode te zetten."
resell-noPermissionOther: "Je hebt geen toestemming om gebieden in doorverkoop mode te zetten."
stopresell-help: "/as stopresell [gebied], het gebied waarin je staat zal worden gebruikt als je deze niet aangeeft."
stopresell-notRegistered: "Het aangegeven gebied is niet geregistreerd: %0%."
stopresell-noRegionFound: "Geen AreaShop gebied gevonden op je lokatie, geeft de naam van het gebied mee als argument."
stopresell-notResell: "Je kunt niet stoppen met doorverkopen van %region% want hij staat niet in doorverkoop mode."
stopresell-success: "%region% is succesvol terug gezet in verkocht mode."
stopresell-notResell: "Je kunt niet stoppen met doorverkopen van %lang:region% want hij staat niet in doorverkoop mode."
stopresell-success: "%lang:region% is succesvol terug gezet in verkocht mode."
stopresell-noPermission: "Je hebt geen toestemming om je gebied terug te zetten in verkocht mode."
stopresell-noPermissionOther: "Je hebt geen toestemming om een gebied terug te zetten in verkocht mode."
addfriend-help: "/as addfriend <speler> [gebied], het gebied waar je in staat zal worden gebruikt als je deze niet aangeeft."
addfriend-noPermissionOther: "Je hebt geen toestemming om vrienden toe te voegen aan gebieden die niet van jou zijn."
addfriend-noPermission: "Je hebt geen toestemming om vrienden toe te voegen aan je gebied."
addfriend-successOther: "%0% is toegevoegd als vriend bij gebied %region%."
addfriend-success: "%0% is toegevoegd als vriend bij je gebied %region%."
addfriend-alreadyAdded: "%0% is al toegevoegd als vriend voor dit gebied."
addfriend-successOther: "%lang:tPlayer|%0%|% is toegevoegd als vriend bij gebied %lang:region%."
addfriend-success: "%lang:tPlayer|%0%|% is toegevoegd als vriend bij je gebied %lang:region%."
addfriend-alreadyAdded: "%lang:tPlayer|%0%|% is al toegevoegd als vriend voor %lang:region%."
addfriend-self: "Het toevoegen van de eigenaar van het gebied als vriend zou nutteloos zijn."
addfriend-noOwner: "Je kunt geen vrienden toevoegen aan een gebied zonder eigenaar."
addfriend-notVisited: "Je kunt %0% niet toevoegen omdat hij de server nog niet heeft bezocht."
@@ -384,38 +477,74 @@ addfriend-notVisited: "Je kunt %0% niet toevoegen omdat hij de server nog niet h
delfriend-help: "/as delfriend <speler> [gebied], het gebied waar je in staat zal worden gebruikt als je deze niet aangeeft."
delfriend-noPermissionOther: "Je hebt geen toestemming om vrienden te verwijderen van gebieden die niet van jou zijn."
delfriend-noPermission: "Je hebt geen toestemming om vrienden te verwijderen van je gebied."
delfriend-successOther: "%0% is verwijderd als vriend van gebied %region%."
delfriend-success: "%0% is verwijderd als vriend van je gebied %region%."
delfriend-notAdded: "%0% is niet toegevoegd als vriend voor dit gebied."
delfriend-successOther: "%lang:tPlayer|%0%|% is verwijderd als vriend van %lang:region%."
delfriend-success: "%lang:tPlayer|%0%|% is verwijderd als vriend van je gebied %lang:region%."
delfriend-notAdded: "%lang:tPlayer|%0%|% is niet toegevoegd als vriend voor %lang:region%."
delfriend-noOwner: "Je kunt geen vrienden verwijderen van een gebied zonder eigenaar."
linksigns-multipleRegions: "Meerdere gebieden gevonden: &7%0%."
linksigns-multipleRegions: "Meerdere gebieden gevonden: [gray]%0%."
linksigns-multipleRegionsAdvice: "Klik nog een keer om het opnieuw te proberen of gebruik '/as linksigns' om te stoppen."
linksigns-noRegions: "Geen AreaShop gebieden gevonden in de richting van je cursor, controleer of het gebied is toegevoegd aan AreaShop &7(maximaal bereik 100 blokken)."
linksigns-regionFound: "Gebied %region% is gevonden, wijs nu naar een bord en linksklik om het te koppelen."
linksigns-noRegions: "Geen AreaShop gebieden gevonden in de richting van je cursor, controleer of het gebied is toegevoegd aan AreaShop [gray](maximaal bereik 100 blokken)."
linksigns-regionFound: "Gebied %lang:region% is gevonden, wijs nu naar een bord en linksklik om het te koppelen."
linksigns-signFound: "Bord gevonden op (%0%, %1%, %2%), wijs nu naar een gebied en rechtsklik om het te koppelen."
linksigns-noSign: "Geen bord gevonden in de richting van je cursor, controleer of je direct zicht hebt op een bord en klik opnieuw &7(maximaal bereik 100 blokken)."
linksigns-alreadyRegistered: "Dat bord is al gekoppelt aan gebied %region%, klik opnieuw om een ander bord te selecteren."
linksigns-noSign: "Geen bord gevonden in de richting van je cursor, controleer of je direct zicht hebt op een bord en klik opnieuw [gray](maximaal bereik 100 blokken)."
linksigns-alreadyRegistered: "Dat bord is al gekoppelt aan gebied %lang:region%, klik opnieuw om een ander bord te selecteren."
linksigns-first: "Je bent in bord-koppel modus gegaan."
linksigns-next: "&7Linksklik om een bord te selecteren, rechtsklik om een gebied te selecteren, gebruik '/as linksigns' om te stoppen."
linksigns-next: "[gray]Linksklik om een bord te selecteren, rechtsklik om een gebied te selecteren, gebruik '/as linksigns' om te stoppen."
linksigns-noPermission: "Je hebt geen toestemming om massa bord-koppel modus te gebruiken."
linksigns-stopped: "Je bent gestopt met bord-koppel modus."
stack-help: "/as stack <aantal> <gat> <naam> <rent|buy> [groep].\n&7 <aantal> Het aantal gebieden dat word aangemaakt.\n <gat> Blokken afstand tussen de gebieden.\n <naam> Naam van de gebieden (komt een nummer achter).\n <rent|buy> Maak ze huur of koop gebieden.\n [groep] Voeg de gebieden toe aan een groep.\n De gebieden zullen worden gemaakt in de richting waarnaar je kijkt."
stack-help:
- "/as stack <aantal> <afstand> <naam> <rent|buy> [groep].[break]"
- " [gray]<aantal> Het aantal gebieden dat word gemaakt.[break]"
- " [gray]<afstand> Blokken afstand tussen de gebieden.[break]"
- " [gray]<naam> Naam van de gebieden (komt een nummber achter).[break]"
- " [gray]<rent|buy> Maak ze huur of koop gebieden.[break]"
- " [gray][groep] Groep waaraan de gebieden worden toegevoegd.[break]"
- " [gray]De gebieden zullen worden gemaakt in de richting waarnaar je kijkt."
stack-accepted: "Begonnen met %0% %1% gebieden maken met %2% blokken ruimte ertussen, namen beginnen met %3% en hebben een nummer erachter.%4%"
stack-addToGroup: " Gemaakte gebieden zullen worden toegevoegd aan de groep '%0%'."
stack-noPermission: "Je hebt geen toestemming om in grote aantallen gebieden toe te voegen aan AreaShop."
stack-wrongAmount: "'%0%' is geen goed aantal gebieden."
stack-wrongGap: "'%0%' is geen correct getal voor het aantal blokken ruimte tussen gebieden."
stack-noSelection: "Je hebt geen selectie die aangeeft waar het eerste gebied word gemaakt."
stack-addStart: "&7%0% gebieden aan het toevoegen met %1% per seconde."
stack-addComplete: "&7Toevoegen van gebieden voltooid."
stack-addStart: "[gray]%0% gebieden aan het toevoegen met %1% per seconde."
stack-addComplete: "[gray]Toevoegen 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-noRegion: "Het aangegeven gebied is niet geregistreerd: %0%."
setlandlord-success: "%landlord% is succesvol ingesteld als landeigenaar voor %region%."
setlandlord-success: "%lang:landlord% is succesvol ingesteld als landeigenaar voor %lang:region%."
message-help: "/as message <speler> <bericht...>"
message-noPermission: "Je hebt geen toestemming om AreaShop berichten te sturen."
message-notOnline: "%0% is niet online."
confirm-rent:
- "%lang:prefix%Weet je zeker dat je %lang:tRegion|%0%|% wilt huren?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Klik om %0% te huren|%"
- " hover: %lang:action|Huur %0%|%"
- " command: /areashop rent %0%"
confirm-extend:
- "%lang:prefix%Weet je zeker dat je de huur van %lang:tRegion|%0%|% wilt verlengen?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Klik om %0% te verlengen|%"
- " hover: %lang:action|Verleng %0%|%"
- " command: /areashop rent %0%"
confirm-unrent:
- "%lang:prefix%Weet je zeker dat je de huur van %lang:tRegion|%0%|% wilt stoppen?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Stop de huur van %0%|%"
- " hover: %lang:action|Stop de huur van %0%|%"
- " command: /areashop unrent %0%"
confirm-buy:
- "%lang:prefix%Weet je zeker dat je %lang:tRegion|%0%|% wilt kopen?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Klik om %0% te kopen|%"
- " hover: %lang:action|Koop %0%|%"
- " command: /areashop buy %0%"
confirm-sell:
- "%lang:prefix%Weet je zeker dat je %lang:tRegion|%0%|% wilt verkopen?[break]"
- "[darkgreen][bold]►[reset] %lang:button|Klik om %0% te verkopen|%"
- " hover: %lang:action|Verkoop %0%|%"
- " command: /areashop sell %0%"
timeleft-years: "%0% jaren"
timeleft-months: "%0% maanden"
@@ -431,5 +560,3 @@ greeting-rented: "%region% is gehuurd door %player% tot %until%."
greeting-forsale: "%region% kan worden gekocht voor %price%."
greeting-bought: "%region% is gekocht door %player%."
greeting-resale: "%region% kan worden gekocht voor %resaleprice% van %player%."
update-playerNotify: "&2Update van AreaShop V%0% naar %1% beschikbaar, download de laatste versie op https://github.com/NLthijs48/AreaShop/releases."
-314
View File
@@ -1,314 +0,0 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
# ║ Language: Polish, Version: V2.2.2, Percentage translated: 70% ║
# ║ 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) ║
# ║ 3: Change the 'language' setting in config.yml to '<servername>', do not include '.yml' ║
# ║ 4: Change the strings in the new file to your liking and save the file ║
# ║ 5: Use '/as reload' or reload/restart your server to see the changes ║
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
total-maximum: "Nie mozesz kupic i wynajac wiecej niz %0% regionow na raz! (aktualnie masz %1% w grupie '%2%')."
cmd-notValid: "Blad komendy, wpisz '/as help'."
cmd-onlyByPlayer: "Ta komenda jest tylko dla gracza."
cmd-weOnlyByPlayer: "Zaznaczanie terenu jest mozliwe do zrobienia tylko w grze, dodaj nazwe regionu jako dodatkowy argument."
cmd-noSelection: "Nic nie zaznaczyles."
cmd-noRegionsFound: "W twoim zaznaczeniu nie ma zadnego regionu zarejestrowanego przez plugin."
cmd-noWERegionsFound: "W twoim zaznaczeniu nie ma regionow WorldEdita."
cmd-noRegionsAtLocation: "Tu gdzie stoisz nie ma zadnego regionu, wpisz nazwe regionu jako argument."
cmd-moreRegionsAtLocation: "Tu gdzie stoisz jest wiecej niz jeden region, wpisz jego nazwe jako argument."
cmd-automaticRegionOnlyByPlayer: "Automatyczne okreslanie regionu jest mozliwe tylko bedac w grze, wpisz nazwe regionu jako kolejny argument."
help-header: "Pomoc - Kupno, Wynajem"
help-alias: "Aliasy komend: /areashop, /as."
help-help: "&6/as help &7-&r Pokazuje ta strone."
help-info: "&6/as info &7-&r Informacje na temat regionow."
help-rent: "&6/as rent &7-&r Wynajmij region lub przedluz aktualny."
help-buy: "&6/as buy &7-&r Kup region."
help-unrent: "&6/as unrent &7-&r Przestan wynajmowac region."
help-unrentOwn: "&6/as unrent &7-&r Przestan wynajmowac Twoj region."
help-sell: "&6/as sell &7-&r Sprzedaj region."
help-sellOwn: "&6/as sell &7-&r Sprzedaj swoj region."
help-reload: "&6/as reload &7-&r Przeladuj."
help-setrestore: "&6/as setrestore &7-&r Wlacza/wylacza przywracanie terenu."
help-setprice: "&6/as setprice &7-&r Zmienia cene regionu."
help-setduration: "&6/as setduration &7-&r Zmienia czas wynajmu."
help-teleport: "&6/as tp &7-&r Teleport do Twoich regionow."
help-teleportAll: "&6/as tp &7-&r Teleport do regionow."
help-setteleport: "&6/as settp &7-&r Ustaw teleport do Twojego regionu."
help-setteleportAll: "&6/as settp &7-&r Ustawia teleport do regionu."
help-find: "&6/as find &7-&r Znajduje region mozliwy do kupienia lub wynajecia."
help-groupadd: "&6/as groupadd &7-&r Dodaje region do grupy."
help-groupdel: "&6/as groupdel &7-&r Usuwa region z grupy."
help-grouplist: "&6/as grouplist &7-&r Wyswietla zarejestrowane grupy."
help-groupinfo: "&6/as groupinfo &7-&r Wyswietla informacje o grupie."
help-schemevent: "&6/as schemevent &7-&r Trigger a schematic event for a region."
help-add: "&6/as add &7-&r Zarejestruj region do kupienia albo wynajecia."
help-del: "&6/as del &7-&r Usun zarejestrowany region."
help-addsign: "&6/as addsign &7-&r Dodaje tabliczke do zarejestrowanego regionu."
help-delsign: "&6/as delsign &7-&r Usuwa tabliczke na ktora patrzysz."
help-me: "&6/as me &7-&r Pokazuje regiony, ktore posiadasz (i czas wygasniecia)."
help-setowner: "&6/as setowner &7-&r Ustawia wlasciciela regionu lub przedluza okres wynajecia."
help-resell: "&6/as resell &7-&r u."
help-resellAll: "&6/as resell &7-&r Umiesc jeden ze swoich regionow w tryb odsprzedazy."
help-stopResell: "&6/as stopresell &7-&r Umieszcza region w tryb odsprzedazy."
help-stopResellAll: "&6/as stopresell &7-&r Usuwa region z trybu odsprzedazy i ustawia mu status sprzedanego."
help-addFriend: "&6/as addfriend &7-&r Dodaj gracza do swojego regionu."
help-addFriendAll: "&6/as addfriend &7-&r Dodaje gracza do regionu."
help-delFriend: "&6/as delfriend &7-&r Usun gracza ze swojego regionu."
help-delFriendAll: "&6/as delfriend &7-&r Usuwa gracza z regionu."
help-linksigns: "&6/as linksigns &7-&r Use bulk sign linking mode."
rent-help: "/as rent [nazwa_regionu], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
rent-noPermission: "Nie masz uprawnien, by wynajac region."
rent-maximum: "Nie mozesz wynajac wiecej niz %0% region(y/ow) (aktualnie wynajmujesz %1% w grupie '%2%')."
rent-payError: "Zos poszlo zle z platnascia, sprobuj pozniej."
rent-extend: "Mozesz przedluzyc okres wynajmu klikajac PPM na tabliczke albo wpisujac /as rent."
rent-someoneElse: "Ktos juz wynajal ten region."
rent-notRentable: "Ten region nie jest dostepny do wynajmu."
rent-expireWarning: "Czas wynajmu %region% konczy sie. Pozostalo %timeleft%. Przedluz wynajem jesli chcesz go zatrzymac."
buy-help: "/as buy [nazwa_regionu], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
buy-noPermission: "Nie masz uprawnien, zeby kupic ten region."
buy-maximum: "Nie mzoesz kupic wiecej niz %0% region(y/ow) (masz juz %1% w grupie '%2%')."
buy-payError: "Cos poszlo nie tak z platnosciami, sprobuj pozniej."
buy-yours: "Juz kupiles ten region."
buy-someoneElse: "Ktos juz kupil ten region."
unrent-help: "/as unrent [nazwa_regionu], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
unrent-noPermission: "Nie masz uprawnien, zeby zaprzestac wynajmu regionu."
unrent-noPermissionOther: "Nie masz uprawnien, zeby usunac komus region."
sell-help: "/as sell [nazwa_regionu], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
sell-notRegistered: "Region nie moze zostac sprzedany, poniewaz nie mozna go kupic."
sell-notBought: "Region nie moze zostac sprzedany, poniewaz nie jest niczyja wlasnoscia."
sell-noPermission: "Nie masz uprawnien, zeby sprzedac region."
sell-noPermissionOther: "Nie masz uprawnien, by sprzedac region, ktorego nie posiadasz."
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-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."
info-all-buys: "Regiony do kupienia: &7%0%."
info-all-noBuys: "Nie ma regionow do kupienia."
info-nogroupRents: "Regiony bez grupy do wynajecia: &7%0%."
info-nogroupBuys: "Regiony bez grupy do wynajecia: &7%0%."
info-nogroupNoRents: "Nie ma regionow bez grupy do wynajecia."
info-nogroupNoBuys: "Nie ma regionow bez grupy do kupienia."
info-rented: "Wynajmujesz: &7%0%."
info-noRented: "Nie wynajmujesz zadnych regionow."
info-unrented: "Niewynajete regiony: &7%0%."
info-noUnrented: "Wszystkie regiony sa wynajete."
info-sold: "Sprzedane regiony: &7%0%."
info-noSold: "Nie ma sprzedanych regionow."
info-forsale: "Regiony na sprzedaz: &7%0%."
info-noForsale: "Wszystkie regiony sa sprzedane."
info-playerHelp: "/as info player <nick>."
info-playerRents: "Regiony wynajmowane przez %0%: &7%1%"
info-playerNoRents: "%0% nie wynajmuje regionow."
info-playerBuys: "Regiony kupione przez %0%: &7%1%."
info-playerNoBuys: "%0% nie kupil zadnych regionow."
info-regionHelp: "/as info region [nazwa_regionu], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
info-regionHeaderRent: "&2Informacje o %region%:"
info-regionHeaderBuy: "&2Informacje o %region%:"
info-regionRented: "&2&l►&r Wynajete przez %player% do: &7%until%."
info-regionBought: "&2&l►&r Kupione przez %player%."
info-regionReselling: "&2&l►&r Kupione przez %player%, aktualnie mozliwe jest okupienie."
info-regionExtending: "&2&l►&r Cena za przedluzenie wynajmu: &7%price% z %duration%."
info-regionCanBeRented: "&2&l►&r Cena za wynajem: &7%price% za %duration%."
info-regionCanBeBought: "&2&l►&r Cena: &7%price%."
info-regionReselPrice: "&2&l►&r Cena odsprzedazy: &7%resellprice% (mozesz kupic od %player%)."
info-regionFriends: "&2&l►&r Dodani gracze: &7%friends%."
info-regionMoneyBackBuy: "&2&l►&r Zwrot pieniedzy za sprzedanie: &7%moneyback% (%moneybackpercent%% ceny kupna)."
info-regionMoneyBackRent: "&2&l►&r Zwrot pieniedzy za zakonczenie wynajmu: &7%moneyback% (%moneybackpercent%% pozostalego czasu)."
info-regionNoExtending: "&2&l►&r Wynajem nie moze zostac przedluzony."
info-regionMaxRentTime: "&2&l►&r Wynajem z gory: maksymalnie &7%maxrenttime%."
info-regionNoTeleport: "&2&l►&r Teleport do regionu nie zostal jeszcze ustawiony%0%."
info-regionTeleportHint: " &7(wpisz '/as settp' w najlepszym miejscu)"
info-regionTeleportAt: "&2&l►&r Teleport ustawiony w: &7(%0%, %1%, %2%, %3%, Wysokosc:%4%, Kierunek:%5%)."
info-regionSigns: "&2&l►&r Podlaczone tabliczki: &7%0%."
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
info-regionGroups: "&2&l►&r Przydzielone grupy: &7%0%."
info-regionInactiveUnrent: "&2&l►&r Automatyczne zaprzestanie wynajmu: &7%inactivetime% nieobecnosci gracza na serverze."
info-regionInactiveSell: "&2&l►&r Autosprzedaz po: &7%inactivetime% nieobecnosci gracza na serverze."
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%)"
setrestore-help: "/as setrestore <region> <true|false|general> [profile]."
setrestore-noPermission: "Nie masz uprawnien zeby zmieniac ustawienia odzyskiwania."
setrestore-invalidSetting: "'%0%' nie jest poprawnym ustawieniem, mozesz ustawic: true, false lub general."
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."
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."
setduration-wrongAmount: "'%0%' nie ejst poprawna iloscia, wpisz liczbe."
setduration-wrongFormat: "'%0%' nie jest wlasciwym formatem czasu, sprawdz dokumentacje na Bukkicie."
setup-noRegion: "Nie wpisales nazwy regionu w drugiej linii."
setup-wrongRegion: "Wpisany region nie istnieje."
setup-alreadyRentSign: "Region, ktorego uzyles jest juz zarestrowany w pluginie jako mozliwy do wynajecia, dodaj tabliczki z [as] w pierwszej linii lub wpisz /as addsign."
setup-alreadyBuySign: "Region, ktorego uzyles jest juz zarestrowany w pluginie jako mozliwy do kupienia, dodaj tabliczki z [as] w pierwszej linii lub wpisz /as addsign'."
setup-noDuration: "Nie wpisales na jak dlugo wynajmuje sie region! Zrob to w trzeciej linijce."
setup-wrongDuration: "Czas, ktory wpisales nie jest poprawnym formatem. Przyklad: 1 dzien (Ustawienia w configu)."
setup-noPrice: "Nie wpisales ceny w czwartej linijce."
setup-rentSuccess: "Wynajmowanie %0% ustawione poprawnie."
setup-buySuccess: "Kupowanie %0% ustawione poprawnie."
setup-couldNotDetect: "Znaleziono kilka regionow z takim samym pierwszenstwem lub relacja rodzice/dziecko wpisz nazwe z 2 linijce (Wykryte regiony: %0% i %1%)."
setup-blacklisted: "%0% jest na czarnej liscie i nie moze zostac dodany."
teleport-help: "/as tp <region> [tabliczka]."
teleport-noPermission: "Nie masz uprawnien, by przeniesc sie na swoj region."
teleport-noPermissionOther: "Nie masz uprawnien, by przeniesc sie na region, ktorego nie posiadasz."
teleport-noPermissionSign: "Nie masz uprawnien, by przeniesc sie do tabliczki z Twoim regionem."
teleport-noPermissionOtherSign: "Nie masz uprawnien, by przesniesc sie do tabliczki z regionem, ktorego nie posiadasz."
setteleport-help: "/as settp [nazwa_regionu] [reset], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
setteleport-noPermission: "Nie masz uprawnien, aby ustawic teleport."
setteleport-noPermissionOther: "Nie masz uprawnien, by ustawic teleport dla regionu, ktorego nie posiadasz."
setteleport-notInside: "Teleport musi byc wewnatrz regionu."
find-help: "/as find <buy|rent> [maksymalna cena] [grupa]."
find-noPermission: "Nie masz uprawnien do wyszukiwania regionow i teleportow do nich."
find-wrongMaxPrice: "Wpisana maksymalna cena nie jest poprawna liczba: %0%."
find-wrongGroup: "Grupa nie istnieje: %0%."
find-noneFound: "Nie znaleziono %0% regioow, podczas wyszukiwania z maksymalna cena dla Ciebie: %1%%2%."
find-noneFoundMax: "Nie znaleziono %0% regionow podczas wyszukiwania z maksymalna cena: %1%%2%."
find-onlyInGroup: ", znaleziono tylko dla grupy: %0%."
groupadd-help: "/as groupadd <group> [region], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
groupadd-noPermission: "Nie masz uprawnien, by dodawac regiony do grup."
groupadd-noRegion: "Region nie jest zarejestrowany: %0%."
groupadd-weSuccess: "Dodano do grupy %0%: &7%1%."
groupadd-weFailed: "Byl juz w grupie %0%: &7%1%."
groupdel-help: "/as groupdel <group> [region], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
groupdel-noPermission: "Nie masz uprawnien, by usunac region z grupy."
groupdel-noRegion: "Region nie jest zarejestrowany: %0%."
groupdel-weSuccess: "Usunieto z grupy %0%: &7%1%."
groupdel-weFailed: "Nie byl w grupie %0%, w kazdym razie: &7%1%."
grouplist-noPermission: "Nie masz uprawnien, zeby wyswietlac zarejestrowane grupy."
grouplist-noGroups: "Aktualnie nie ma zarejestrowanych grup."
grouplist-success: "Zarejestrowane grupy: &7%0%."
groupinfo-help: "/as groupinfo <grupa>."
groupinfo-noPermission: "Nie masz uprawnien, by wyswietlic informacje o grupie."
groupinfo-noGroup: "Nie ma grupy o nazwie '%0%', wpisz /as grouplist zeby sprawdzic grupy."
groupinfo-members: "Nastepujace regiony sa czlonkami grupy %0%: &7%1%."
groupinfo-noMembers: "Grupa %0% nie ma czlonkow."
schemevent-help: "/as schemevent <region> <created|deleted|rented|unrented|bought|sold>."
schemevent-noRegion: "Region nie jest zarejestrowany: %0%."
schemevent-wrongEvent: "Wydarzenie '%0%' nie istnieje, sprobuj uzyc tych: &7%1%."
schemevent-noPermission: "Nie masz uprawnien, by przypisywac wydarzenia."
add-help: "/as add <rent|buy> [region] [swiat]."
add-noPermission: "Nie masz uprawnien, by dodawac regiony."
add-success: "Dodano jako %0%: &7%1%."
add-failed: "Juz zarejestrowano: &7%0%."
add-blacklisted: "Na czarnej liscie: &7%0%."
add-specifyWorld: "Wpisz swiat, na ktorym znajduje sie region, gdy uzywasz konsoli."
add-incorrectWorld: "Swiat '%0%' nie zostal znaleziony, sprobuj ponownie (wielkosc liter)."
add-noRegion: "Region '%0%' nie istnieje na tym swiecie."
del-noPermission: "Nie masz uprawnien, by usuwac regiony."
del-success: "Usunieto region: &7%0%."
del-failed: "Nie masz uprawnien, lub regin nie jest zarejestrowany: &7%0%."
addsign-help: "/as addsign [region] [status(profil)]."
addsign-noSign: "Nie patrzysz na tabliczke."
addsign-noRegions: "Nie znaleziono regionu w poblizu tabliczki."
addsign-couldNotDetect: "W poblizu tabliczki znaleziono kilka regionow, wpisz nazwe regionu jako kolejny argument (Znalezione regiony: %0% i %1%)."
addsign-couldNotDetectSign: "W poblizu tabliczki znaleziono kilka regionow, wpisz nazwe regionu w drugiej linijce (Znalezione regiony: %0% i %1%)."
addsign-wrongProfile: "Status nie istnieje, wpisz ktorys z tych (sprawdz config - SignProfiles): &7%0%."
addsign-success: "Dodano tabliczke do %region%."
addsign-successProfile: "Dodano tabliczke do %region% ze statusem %0%."
addsign-noPermission: "Nie masz uprawnien, by dodac tabliczke."
delsign-noSign: "Nie patrzysz na tabliczke."
delsign-noPermission: "Nie masz permisji, by usunac tabliczke."
delsign-noRegion: "Ta tabliczka nie nalezy do regionu pluginu."
me-noPermission: "Nie masz uprawnien, by sprawdzic jakie regiony posiadasz."
me-notAPlayer: "Nie jestes graczem, wiec nie masz regionow."
me-noRentRegions: "Nie wynajmujesz zadnych regionow."
me-noBuyRegions: "Nie kupiles zadnych regionow."
me-rentRegions: "Wynajmujesz regiony:"
me-buyRegions: "Kupiles regiony:"
me-rentLine: "&2&l►&r %region% do %until% &7(pozostalo %timeleft%)."
me-buyLine: "&2&l►&r %region%."
me-friendLine: "&2&l►&r %region% &7(wlasciciel: %player%)."
setowner-help: "/as setowner <player> [region], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
setowner-noPermission: "Nie masz uprawnien, by ustawiac wlasciciela regionu."
setowner-noPermissionRent: "Nie masz uprawnien, by ustawiac wlasciciela regionow do wynajecia."
setowner-noPermissionBuy: "Nie masz uprawnien, by ustawiac wlasciciela regionow do kupienia."
setowner-notRegistered: "Podany region nie istnieje."
setowner-noPlayer: "Wystapil problem z uzyskaniem UUi gracza: %0%."
setowner-succesRent: "Wlasciciel %region% zostal zmieniony na %player%, wynajmowanie do %until% (pozostalo %timeleft%)."
setowner-succesRentExtend: "Wlascicielem jest juz %player%, wynajecie przedluzone o '%duration%', aktualnie wynajeto do %until% (pozostalo %timeleft%)."
setowner-succesBuy: "Wlasiciel %region% zostal zmieniony na %player%."
resell-help: "/as resell <price> [region], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
resell-wrongPrice: "'%0%' nie jest poprawna cena."
resell-noRegionFound: "Nie wykryto tutaj regionu, sprobuj wpisac nazwe jako dodatkowy argument."
resell-notBought: "Nie mozesz sprzedac %region%, poniewaz nie zostal jeszcze sprzedany."
resell-success: "%region% zostal ustawiony do odsprzedania za %resellprice%."
resell-noPermission: "Nie masz uprawnien, zeby odsprzedac Swoj region."
resell-noPermissionOther: "Nie masz uprawnien, by odsprzedawac cudze regiony."
stopresell-help: "/as stopresell [region], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
stopresell-noRegionFound: "Nie wykryto tutaj regionu, sprobuj wpisac nazwe jako dodatkowy argument."
stopresell-notResell: "Nie mozesz przestac odsprzedawac %region% poniewaz nie jest ustawiony jako do odsprzedania."
stopresell-success: "Przestales odsprzedawac %region%."
stopresell-noPermission: "Nie masz uprawnien, by przestac odsprzedawac region."
stopresell-noPermissionOther: "Nie masz uprawnien, by zmieniac cudze regiony na sprzedane."
addfriend-help: "/as addfriend <player> [region], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
addfriend-noPermissionOther: "Nie masz uprawnien, by dodac graczy do regionu, ktorego nie posiadasz."
addfriend-noPermission: "Nie masz uprawnien, by dodawac graczy dos wojego regionu."
addfriend-alreadyAdded: "%0% juz jest dodany do regionu."
addfriend-self: "Dodawanie wlasciciela do regionu jest bez sensu."
addfriend-noOwner: "Nie masz uprawnien, by dodawac graczy do regionu bez wlasciciela."
delfriend-help: "/as delfriend <player> [region], jesli nie wpiszesz nazwy uzyje regionu na ktorym stoisz."
delfriend-noPermissionOther: "Nie masz uprawnien, by usuwac graczy z nieswoich regionow."
delfriend-noPermission: "Nie masz uprawnien, by usunac gracza ze swojego regionu."
delfriend-notAdded: "%0% nie jest dodany do regionu."
delfriend-noOwner: "Nie mozesz usuwac graczy z regionu bez wlasciciela."
linksigns-multipleRegions: "Znaleziono kilka regionow: &7%0%."
linksigns-multipleRegionsAdvice: "Kliknij innym razem, by sprobowac ponownie lub uzyj '/as linksigns' by przestac."
linksigns-noRegions: "Tam gdzie patrzysz nie wykryto regionow, sprawdz czy region jest zarejestrowany &7(maksymalna odleglosc to 100 blokow)."
linksigns-regionFound: "Region %region% zostal znaleziony, teraz kliknij LPM na tabliczke."
linksigns-signFound: "Znaleziono tabliczke (%0%, %1%, %2%), teraz popatrz na region i kliknij PPM"
linksigns-noSign: "Tam, gdzie patrzysz nie znaleziono tabliczek, sprawdz czy patrzysz w dobrym kierunku &7(maksymalna odleglosc to 100 blokow)."
linksigns-alreadyRegistered: "Ta tabliczka jest juz zarejestrowana do regionu %region%, kliknij znowu zeby ustawic inna tabliczke."
linksigns-first: "Wszedles w trym podlaczania tabliczek."
linksigns-next: "&7Lewy przycisk, by zaznaczyc tabliczke, prawy przycisk, by zaznaczyc region, uzyj /as linksigns by wylaczyc tryb."
linksigns-noPermission: "Nie masz uprawnien, by wlaczyc tryb podlaczania tabliczek."
linksigns-stopped: "Wyszedles z trybu."
timeleft-years: "%0% lat"
timeleft-months: "%0% miesiecy"
timeleft-days: "%0% dni"
timeleft-hours: "%0% godzin"
timeleft-minutes: "%0% minut"
timeleft-second: "%0% sekunda"
timeleft-seconds: "%0% sekund"
timeleft-ended: "Uplynal"
greeting-forrent: "%region% moze zostac wynajety za %price% na %duration%."
greeting-rented: "%region% jest wynajmowany przez %player% do %until%."
greeting-forsale: "%region% moze zostac kupiony za %price%."
greeting-bought: "%region% nalezy do %player%."
greeting-resale: "%region% moze zostac odkupiony za %resaleprice% od %player%."
-322
View File
@@ -1,322 +0,0 @@
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
# ║ 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.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) ║
# ║ 3: Change the 'language' setting in config.yml to '<servername>', do not include '.yml' ║
# ║ 4: Change the strings in the new file to your liking and save the file ║
# ║ 5: Use '/as reload' or reload/restart your server to see the changes ║
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
total-maximum: "你不能租賃或者購買總量超過 %0% 的土地(你已經擁有 %1% 的土地在群組 '%2%')"
cmd-notValid: "這個指令是無效的, 請使用 '/as help' 查詢更多資訊"
cmd-onlyByPlayer: "這個指令只能由玩家執行"
cmd-weOnlyByPlayer: "使用WorldEdit小木斧選擇區域只能由玩家來執行, 並指定區域名稱作為額外的參數"
cmd-noSelection: "不存在使用WorldEdit小木斧選擇的區域"
cmd-noRegionsFound: "在你的選擇區域中並沒有土地被本插件所註冊或紀錄"
cmd-noWERegionsFound: "在你的選擇區域中並沒有與WorldEdit小木斧選擇的區域相交"
cmd-noRegionsAtLocation: "你的位置並未找到任何土地, 請指定區域名稱作為額外的參數"
cmd-moreRegionsAtLocation: "你的位置有超過一個以上的土地, 請指定區域名稱作為額外的參數"
cmd-automaticRegionOnlyByPlayer: "只可能由玩家來執行自動確認土地的行為,請指定區域名稱作為額外的參數"
help-header: "幫助頁面,你可以執行的指令"
help-alias: "指令簡寫: /areashop, /as"
help-help: "&6/as help &7-&r 顯示幫助頁面"
help-info: "&6/as info &7-&r 當前土地的資訊"
help-rent: "&6/as rent &7-&r 租土地或延展你的租期"
help-buy: "&6/as buy &7-&r 購買該土地"
help-unrent: "&6/as unrent &7-&r 取消該土地租賃"
help-unrentOwn: "&6/as unrent &7-&r 取消你的土地租賃"
help-sell: "&6/as sell &7-&r 出售該土地"
help-sellOwn: "&6/as sell &7-&r 出售你的土地"
help-setrestore: "&6/as setrestore &7-&r 設定恢復開/關,並選擇文件"
help-setprice: "&6/as setprice &7-&r 修改土地的價錢"
help-setduration: "&6/as setduration &7-&r 修改該出租土地的租期"
help-teleport: "&6/as tp &7-&r 傳送到你購買/租賃的土地"
help-teleportAll: "&6/as tp &7-&r 傳送到該購買/租賃的土地"
help-setteleport: "&6/as settp &7-&r 設定你購買/租賃土地的傳送位置"
help-setteleportAll: "&6/as settp &7-&r 設定該土地的傳送位置"
help-find: "&6/as find &7-&r 尋找未被購買/租賃的土地"
help-groupadd: "&6/as groupadd &7-&r 增加一個土地到群組"
help-groupdel: "&6/as groupdel &7-&r 從群組中移除一個土地"
help-grouplist: "&6/as grouplist &7-&r 顯示所有已註冊的群組"
help-groupinfo: "&6/as groupinfo &7-&r 顯示該群組資訊"
help-schemevent: "&6/as schemevent &7-&r 為該土地觸發schematic"
help-add: "&6/as add &7-&r 註冊一個用來出售或出租的土地"
help-del: "&6/as del &7-&r 刪除一個已註冊的土地"
help-addsign: "&6/as addsign &7-&r 新增告示牌到現存的土地"
help-delsign: "&6/as delsign &7-&r 刪除你準心對準的告示牌"
help-me: "&6/as me &7-&r 檢查你所擁有的土地(包括到期土地)"
help-setowner: "&6/as setowner &7-&r 設定土地擁有人或延展租期"
help-resell: "&6/as resell &7-&r 將你所擁有土地之一設定為再出售"
help-resellAll: "&6/as resell &7-&r 將該土地設定為再出售"
help-stopResell: "&6/as stopresell &7-&r 將你所擁有土地之一設定為已出售"
help-stopResellAll: "&6/as stopresell &7-&r 將土地設定為已出售"
help-addFriend: "&6/as addfriend &7-&r 新增朋友到你的土地"
help-addFriendAll: "&6/as addfriend &7-&r 新增朋友到該土地"
help-delFriend: "&6/as delfriend &7-&r 從你的土地移除朋友"
help-delFriendAll: "&6/as delfriend &7-&r 從該土地移除朋友"
rent-help: "/as rent [regionname],若你不指定土地名稱,則預設為你所站立的土地"
rent-noPermission: "你並沒有租賃土地的權限"
rent-maximum: "你不能租總量超過%0%的土地 (你已經擁有%1%的土地在群組 '%2%')"
rent-payError: "交易發生問題,請稍後再嘗試"
rent-rented: "你已成功租賃%0%直到 %1%"
rent-extended: "你已經延展你的租期%0%直到%1%"
rent-extend: "你可以右鍵點擊告示牌來延展你的租期或者使用 /as rent"
rent-lowMoneyExtend: "你沒有足夠的錢來延展你的租期(你擁有%0%而你還需要%1%)"
rent-lowMoneyRent: "你沒有足夠的錢租賃該土地(你擁有%0%而你還需要%1%)"
rent-someoneElse: "其他人已經租賃該土地"
rent-notRentable: "該土地不能租賃"
rent-maxExtends: "你已經無法再延展你的租期了(最大上限次數為%0%次), 然而在租期過後你可以再次租賃該土地"
rent-restrictedToWorld: "你必須要在 '%0%'世界才能租賃該土地(你目前正在 '%1%')"
rent-restrictedToRegion: "你必須要在 '%0%'才能租賃該土地"
rent-expireWarning: "你的土地 %region% 還剩下%timeleft% ,如果你還想保留該土地請延展租期"
buy-help: "/as buy [regionname],若你不指定土地名稱,則預設為你所站立的土地"
buy-noPermission: "你並沒有購買土地的權限"
buy-notBuyable: "該土地不能購買"
buy-maximum: "你不能購買超過 %0% 的土地(你已經擁有 %1% 的土地在群組 '%2%')"
buy-payError: "交易發生問題,請稍後再嘗試"
buy-succes: "你已成功購買 %0%"
buy-successResale: "你已成功自%1%購買 %0%"
buy-successSeller: "你的土地 %0% 已經出售給 %1% ,共 %2%"
buy-lowMoney: "你沒有足夠的錢購買該土地(你擁有 %0% 而你還需要 %1%)"
buy-yours: "你已經擁有該土地了"
buy-someoneElse: "其他人已經購買該土地"
buy-restrictedToWorld: "你必須要在 '%0%'世界才能購買該土地 (你目前正在 '%1%')"
buy-restrictedToRegion: "你必須要在 '%0%'才能購買該土地"
unrent-help: "/as unrent [regionname],若你不指定土地名稱,則預設為你所站立的土地"
unrent-noPermission: "你並沒有取消出租土地的權限"
unrent-noPermissionOther: "你並沒有取消出租其他土地的權限"
unrent-unrented: "你的土地已經被取消出租"
unrent-other: "玩家%0%土地已經被取消出租"
unrent-expired: "你所租賃的%0%已經過期"
sell-help: "/as sell [regionname],若你不指定土地名稱,則預設為你所站立的土地"
sell-sold: "該土地已被出售,玩家 %0%"
sell-soldYours: "你的土地已經被購買"
sell-noPermission: "你並沒有出售土地的權限"
sell-noPermissionOther: "你並沒有出售其他土地的權限"
info-noPermission: "你沒有權限查詢該土地資訊"
info-all-rents: "已註冊為出租土地:&7%0%"
info-all-noRents: "沒有任何註冊的出租土地"
info-all-buys: "已註冊為出售土地:&7%0%"
info-all-noBuys: "沒有任何註冊的出售土地"
info-rented: "租賃土地:&7%0%"
info-noRented: "沒有已租的土地"
info-unrented: "未出租的土地:&7%0%"
info-noUnrented: "所有土地已出租"
info-sold: "已出售土地:&7%0%"
info-noSold: "沒有已售的土地"
info-forsale: "出售的土地:&7%0%"
info-noForsale: "所有土地已售完"
info-playerHelp: "/as info player <name>"
info-playerRents: "土地已出租給%0%: &7%1%"
info-playerNoRents: "%0%並沒有租土地"
info-playerBuys: "土地已出售給 %0%: &7%1%"
info-playerNoBuys: "%0% 並沒有買土地"
info-regionHelp: "/as info region [name],若你不指定土地名稱,則預設為你所站立的土地"
info-regionHeaderRent: "&2資訊關於 %region%:"
info-regionHeaderBuy: "&2資訊關於 %region%:"
info-regionRented: "&2&l►&r 出租給 %player% until: &7%until%"
info-regionBought: "&2&l►&r 出售給 %player%"
info-regionExtending: "&2&l►&r 延展租期價格: &7%price% per %duration%"
info-regionCanBeRented: "&2&l►&r 租金: &7%price% per %duration%"
info-regionCanBeBought: "&2&l►&r 購買價格: &7%price%"
info-regionFriends: "&2&l►&r 增加朋友: &7%friends%"
info-regionMoneyBackBuy: "&2&l►&r 再售的回收價格: &7%moneyback% (%moneybackpercent%% 價格)"
info-regionMoneyBackRent: "&2&l►&r 取消租賃的回收價格: &7%moneyback% (%moneybackpercent%% 剩餘的出租時間)"
info-regionNoExtending: "&2&l►&r 租期無法延展"
info-regionMaxRentTime: "&2&l►&r 提前租賃: &7%maxrenttime% at 最大數目"
info-regionNoTeleport: "&2&l►&r 傳送地點未設定%0%"
info-regionTeleportHint: "&7(使用 '/as settp' 到一個更好的位置)"
info-regionTeleportAt: "&2&l►&r 傳送地點設定在: &7(%0%, %1%, %2%, %3%, pitch:%4%, yaw:%5%)"
info-regionSigns: "&2&l►&r 有連結的告示牌: &7%0%"
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
info-regionGroups: "&2&l►&r 登記群組: &7%0%"
info-regionInactiveUnrent: "&2&l►&r 玩家閒置而自動取消租賃的時間為: &7%inactivetime% of"
info-regionInactiveSell: "&2&l►&r 玩家閒置而自動出售的時間為: &7%inactivetime% of"
info-regionRestoringRent: "&2&l►&r 重製啟用 &7(土地將被重新設為未被租賃)%0%"
info-regionRestoringBuy: "&2&l►&r 重製啟用 &7(土地將被重新設為出售)%0%"
info-regionRestoringProfile: "(資料: %0%)"
setrestore-help: "/as setrestore <region> <true|false|general> [profile]"
setrestore-noPermission: "你沒有權限修改重製設定"
setrestore-invalidSetting: "'%0%' 不是有效的狀態, 必須為 true, false 或 general"
setrestore-success: "成功設定為重製設定,由 %0% 至 '%1%'"
setrestore-successProfile: "成功設定重製由 %0% 至 '%1%' 而資料至 '%2%'"
setprice-noPermission: "你沒有權限修改土地價格"
setprice-help: "/as setprice <price> [region], 若你不指定土地名稱,則預設為你所站立的土地"
setprice-wrongPrice: "'%0%' 不是有效的價格"
setduration-noPermission: "你沒有權限修改租期"
setduration-help: "/as setduration <amount> <identifier> [region], 若你不指定土地名稱,則預設為你所站立的土地"
setduration-wrongAmount: "'%0%' 不是有效的總數, 請使用完整的數目"
setduration-wrongFormat: "'%0%' 不是適當的時間格式, 請查詢官網"
setduration-success: "土地租期由 %0% 修改至 '%1%'"
setup-noRegion: "你並未特定土地名稱在第二行"
setup-wrongRegion: "你所指定的土地名稱並不存在"
setup-noDuration: "你並未指定該土地出租期間, 請打在告示牌第三行"
setup-wrongDuration: "你所指定的土地出租期間不是適當的時間格式, 例子: 1 day是一天"
setup-noPrice: "你第四行並未指定該土地的價格"
setup-rentSuccess: "出租土地 %0% 已正確設置"
setup-buySuccess: "出售土地 %0% 已正確設置"
setup-couldNotDetect: "已超過一個以上的區域, 為避免重複請在第二行指定一個土地 (2個區域被發現: %0% 及 %1%)"
teleport-help: "/as tp <region> [sign]"
teleport-noPermission: "你沒有權限傳送到你的土地"
teleport-noPermissionOther: "你沒有權限傳送到不屬於你的土地"
teleport-noPermissionSign: "你沒有權限傳送到你的土地上的告示牌"
teleport-noPermissionOtherSign: "你沒有權限傳送到不屬於你的土地上的告示牌"
teleport-success: "你傳送至 %0%"
teleport-successSign: "你傳送到告示牌 %0%"
teleport-noSafe: "土地 %0%沒有安全的傳送地點, 沒有找到其餘傳送點或已超過最大的嘗試次數 (%1%/%2%)"
setteleport-help: "/as settp [region] [reset], 若你不指定土地名稱,則預設為你所站立的土地"
setteleport-noPermission: "你沒有權限設置傳送地點"
setteleport-noPermissionOther: "你沒有權限設置不屬於你的土地的傳送地點"
setteleport-success: "傳送地點 %0% 已設置"
setteleport-notInside: "傳送地點必須在土地範圍內"
setteleport-reset: "傳送地點 %0% 已重新設置"
find-help: "/as find <buy|rent> [maxprice] [group]"
find-noPermission: "你沒有權限搜尋土地並傳送到該土地"
find-success: "已搜尋到 %0% 土地: %1%, 並且依你的帳戶金額與最高金額: %2%%3%"
find-successMax: "已搜尋到 %0% 土地: %1%, 並且依最高金額 %2%%3%"
find-wrongMaxPrice: "你特定的最高金額並非有效數目: %0%"
find-wrongGroup: "你特定的群組並未存在: %0%"
find-noneFound: "依你的帳戶金額與最高金額,沒有 %0% 土地符合你的搜尋條件: %1%%2%"
find-noneFoundMax: "依最高金額,沒有 %0% 土地符合你的搜尋條件, 最高金額%1%%2%"
find-onlyInGroup: ", 限搜尋該群組的土地: %0%"
groupadd-help: "/as groupadd <group> [region], 若你不指定土地名稱,則預設為小木斧所選擇的土地"
groupadd-noPermission: "你沒有權限設置土地到群組"
groupadd-noRegion: "該指定土地並未被註冊: %0%"
groupadd-success: "土地 %0% 已被加入群組 '%1%', 該群組目前擁有%2% 土地(s)"
groupadd-failed: "土地 %0% 已經是群組的土地 '%1%'"
groupadd-weSuccess: "加入群組 %0%: &7%1%"
groupadd-weFailed: "已經被加入群組 %0%: &7%1%"
groupdel-help: "/as groupdel <group> [region], 若你不指定土地名稱,則預設為小木斧所選擇的土地"
groupdel-noPermission: "你沒有權限設置土地移出群組"
groupdel-noRegion: "該指定土地並未被註冊: %0%"
groupdel-success: "土地 %0% 已被移出群組 '%1%', 該群組目前擁有 %2% 土地(s)"
groupdel-failed: "土地 %0% 不是群組的土地 '%1%'"
groupdel-weSuccess: "被移出群組 %0%: &7%1%"
groupdel-weFailed: "並不在群組 %0% anyway: &7%1%"
grouplist-noPermission: "你沒有權限查看註冊群組"
grouplist-noGroups: "目前並無任何註冊群組"
grouplist-success: "以下為註冊群組: &7%0%"
groupinfo-help: "/as groupinfo <group>"
groupinfo-noPermission: "你沒有權限查看群組資訊"
groupinfo-noGroup: "沒有註冊群組名稱為 '%0%', 使用 /as grouplist 查看群組列表"
groupinfo-members: "以下土地為該群組 %0%所有: &7%1%"
groupinfo-noMembers: "群組 %0% 沒有任何土地"
schemevent-help: "/as schemevent <region> <created|deleted|rented|unrented|bought|sold>"
schemevent-noRegion: "該指定土地並未被註冊: %0%"
schemevent-wrongEvent: "該特定事件 '%0%' 並不存在, 請使用其中之一: &7%1%"
schemevent-success: "事件 '%0%' 已成功在該土地觸發 %1%"
schemevent-noPermission: "你沒有權限觸發schematic"
add-help: "/as add <rent|buy> [region] [world]"
add-noPermission: "你沒有權限新增土地"
add-success: "新增為 %0%: &7%1%"
add-failed: "已經註冊: &7%0%"
add-specifyWorld: "當使用console操作時請指定該世界土地"
add-incorrectWorld: "世界 '%0%' 搜尋失敗, 請再嘗試一次(依照個案)"
add-noRegion: "土地 '%0%' 並不存在該世界"
del-noPermission: "你沒有權限移除土地"
del-success: "移除土地: &7%0%"
del-failed: "沒有權限移除土地或未被註冊: &7%0%"
addsign-help: "/as addsign [region] [profile]"
addsign-noSign: "你並沒有注視一個告示牌"
addsign-noRegion: "土地 '%0%' 並未被搜尋到"
addsign-noRegions: "該告示牌的位置並未有任何土地存在"
addsign-couldNotDetect: "超過一個以上的區域在告示牌的位置, 為避免重複請指定一個土地 (2個的區域被發現: %0% and %1%)"
addsign-couldNotDetectSign: "超過一個以上的區域在告示牌的位置, 為避免重複請在第二行指定一個土地 (2個的區域被發現: %0% and %1%)"
addsign-wrongProfile: "指定資料並不存在, 請使用以下之一 (查詢你的config檔案): &7%0%"
addsign-alreadyRegistered: "該告示牌已經被註冊在土地 %0%"
addsign-noPermission: "你沒有權限新增告示牌"
delsign-noSign: "你並沒有注視一個告示牌"
delsign-noPermission: "你沒有權限移除告示牌"
delsign-noRegion: "該告示牌並不屬於本插件的土地"
delsign-success: "該告示牌已經從土地 %0%被移除"
me-noPermission: "你沒有權限查詢你所擁有土地"
me-notAPlayer: "你並不能擁有土地,因為你並非玩家"
me-noRentRegions: "你並未租賃任何出租土地"
me-noBuyRegions: "你並未購買任何出售土地"
me-rentRegions: "你所租賃的土地:"
me-buyRegions: "你所購買的土地"
me-rentLine: "&2&l►&r %region% until %until% &7(%timeleft% 剩餘時間)"
me-buyLine: "&2&l►&r %region%"
me-friendLine: "&2&l►&r %region% &7(所有人: %player%)"
setowner-help: "/as setowner <player> [region], 若你不指定土地名稱,則預設為你所站立的土地"
setowner-noPermission: "你沒有權限設置土地擁有人"
setowner-noPermissionRent: "你沒有權限設置出租土地擁有人"
setowner-noPermissionBuy: "你沒有權限設置出售土地擁有人"
setowner-notRegistered: "你指定的土地未被註冊, 因此不能設置土地擁有人"
setowner-noPlayer: "無法取得指定玩家的UUID: %0%"
setowner-succesRent: "%region% s擁有人成功改為 %player%, 租期直到 %until% (%timeleft% 剩餘時間)"
setowner-succesRentExtend: "擁有人已為 %player%, 租期延長至 '%duration%', 現在租期到 %until% (%timeleft% 剩餘時間)"
setowner-succesBuy: "%region% s擁有人成功改為 %player%"
resell-help: "/as resell <price> [region], 若你不指定土地名稱,則預設為你所站立的土地"
resell-wrongPrice: "'%0%' 並不是有效價格數目"
resell-noRegionFound: "你的位置並不存在任何土地, 請特定該土地名稱"
resell-notBought: "你無法重新出售 %region% ,因為它並未被買走"
resell-success: "%region% i成功的重新出售,價格為 %resellprice%"
resell-noPermission: "你沒有權限設置你的土地重新出售"
resell-noPermissionOther: "你沒有權限設置土地重新出售"
stopresell-help: "/as stopresell [region], 若你不指定土地名稱,則預設為你所站立的土地"
stopresell-noRegionFound: "你的位置並不存在任何土地, 請特定該土地名稱"
stopresell-notResell: "你無法停止重新出售土地 %region% 因為它並未重新出售"
stopresell-success: "%region% 成功的設置為出售中"
stopresell-noPermission: "你沒有權限設置你的土地為出售"
stopresell-noPermissionOther: "你沒有權限設置土地為出售"
addfriend-help: "/as addfriend <player> [region], 若你不指定土地名稱,則預設為你所站立的土地"
addfriend-noPermissionOther: "你沒有權限新增朋友到不屬於你的土地上"
addfriend-noPermission: "你沒有權限新增朋友到屬於你的土地上"
addfriend-successOther: "%0% 已經成功被新增為 %1%土地的朋友名單"
addfriend-success: "%0% 已經成功被新增為你的土地 %1%的朋友名單"
addfriend-alreadyAdded: "%0% 已經被新增到你的土地的朋友名單了"
addfriend-self: "新增本土地擁有人到朋友名單是無意義"
addfriend-noOwner: "沒有擁有人,你不能新增朋友到朋友名單"
delfriend-help: "/as delfriend <player> [region], 若你不指定土地名稱,則預設為你所站立的土地"
delfriend-noPermissionOther: "你沒有權限在不屬於你的土地上移除其朋友"
delfriend-noPermission: "你沒有權限在屬於你的土地上移除朋友"
delfriend-successOther: "%0% 已經成功被移除,土地 %1%"
delfriend-success: "%0% 已經成功被移除出你的土地 %1%的朋友名單"
delfriend-notAdded: "%0% 從來沒被加入該土地朋友名單"
delfriend-noOwner: "沒有擁有人,你不能移除朋友"
timeleft-years: "%0% 年"
timeleft-months: "%0% 月"
timeleft-days: "%0% 天"
timeleft-hours: "%0% 小時"
timeleft-minutes: "%0% 分鐘"
timeleft-second: "%0% 秒"
timeleft-seconds: "%0% 秒"
timeleft-ended: "過期"
greeting-forrent: "%region% c可以被租賃,價格為 %price% p期間為 %duration%"
greeting-rented: "%region% i已經租給 %player% u直到 %until%"
greeting-forsale: "%region% c可以購買,價格為 %price%"
greeting-bought: "%region% i已經賣給 %player%"
greeting-resale: "%region% c可以購買,價格為 %resaleprice% f賣家為 %player%"
+6 -2
View File
@@ -1,6 +1,6 @@
name: AreaShop
main: nl.evolutioncoding.areashop.AreaShop
version: ${project.version}
main: me.wiefferink.areashop.AreaShop
version: "${project.version}${build.number}"
description: "Selling and renting WorldGuard regions to your players, highly configurable."
depend: [Vault, WorldGuard, WorldEdit]
softdepend: [Multiverse-Core]
@@ -56,6 +56,7 @@ permissions:
areashop.stack: true
areashop.setlandlord: true
areashop.linksigns: true
areashop.message: true
areashop.landlord.*:
description: Give access to all landlord features
children:
@@ -253,4 +254,7 @@ permissions:
default: op
areashop.setlandlord:
description: Allows you to set the landlord of a region, the landlord receives all revenue
default: op
areashop.message:
description: Allows you to send AreaShop messages to players
default: op
+24
View File
@@ -0,0 +1,24 @@
#### Current behavior
<!--- Tell what happens currently -->
#### New behavior
<!--- Tell what should happen (or what should be added) -->
#### Steps to reproduce (for bugs)
<!--- Exactly show how this bug can be triggered -->
1.
2.
3.
4.
#### Your environment
<!--- Indicate which versions you use (latest is NOT a version) -->
* Server platform (Bukkit, Spigot, etc.):
* Server version:
* AreaShop version:
* WorldEdit version:
* WorldGuard version:
* Vault version:
+1 -5
View File
@@ -6,12 +6,8 @@
<name>AreaShop Interface</name>
<version>AreaShopInterface</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<parent>
<groupId>nl.evolutioncoding</groupId>
<groupId>me.wiefferink</groupId>
<artifactId>areashop-parent</artifactId>
<version>parent</version>
</parent>
@@ -1,15 +1,15 @@
package nl.evolutioncoding.areashop.interfaces;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import org.bukkit.configuration.file.YamlConfiguration;
import java.util.logging.Logger;
public interface AreaShopInterface {
void debugI(String message);
YamlConfiguration getConfig();
WorldGuardPlugin getWorldGuard();
WorldEditPlugin getWorldEdit();
Logger getLogger();
}
package me.wiefferink.areashop.interfaces;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import org.bukkit.configuration.file.YamlConfiguration;
import java.util.logging.Logger;
public interface AreaShopInterface {
void debugI(String message);
YamlConfiguration getConfig();
WorldGuardPlugin getWorldGuard();
WorldEditPlugin getWorldEdit();
Logger getLogger();
}
@@ -1,14 +1,14 @@
package nl.evolutioncoding.areashop.interfaces;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import org.bukkit.World;
public interface GeneralRegionInterface {
ProtectedRegion getRegion();
String getName();
World getWorld();
String getWorldName();
int getWidth();
int getDepth();
int getHeight();
}
package me.wiefferink.areashop.interfaces;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import org.bukkit.World;
public interface GeneralRegionInterface {
ProtectedRegion getRegion();
String getName();
World getWorld();
String getWorldName();
int getWidth();
int getDepth();
int getHeight();
}
@@ -1,16 +1,16 @@
package nl.evolutioncoding.areashop.interfaces;
import java.io.File;
public abstract class WorldEditInterface {
protected AreaShopInterface pluginInterface;
public WorldEditInterface(AreaShopInterface pluginInterface) {
this.pluginInterface = pluginInterface;
}
// Different way to restore blocks per implementation, newer ones support entities as well
public abstract boolean restoreRegionBlocks(File file, GeneralRegionInterface regionInterface);
// Different way to save blocks per implementation, newer ones support entities as well
public abstract boolean saveRegionBlocks(File file, GeneralRegionInterface regionInterface);
package me.wiefferink.areashop.interfaces;
import java.io.File;
public abstract class WorldEditInterface {
protected AreaShopInterface pluginInterface;
public WorldEditInterface(AreaShopInterface pluginInterface) {
this.pluginInterface = pluginInterface;
}
// Different way to restore blocks per implementation, newer ones support entities as well
public abstract boolean restoreRegionBlocks(File file, GeneralRegionInterface regionInterface);
// Different way to save blocks per implementation, newer ones support entities as well
public abstract boolean saveRegionBlocks(File file, GeneralRegionInterface regionInterface);
}
@@ -1,53 +1,79 @@
package nl.evolutioncoding.areashop.interfaces;
import java.util.Set;
import java.util.UUID;
import org.bukkit.Location;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
public abstract class WorldGuardInterface {
protected AreaShopInterface pluginInterface;
public WorldGuardInterface(AreaShopInterface pluginInterface) {
this.pluginInterface = pluginInterface;
}
/**
* Parse an owner(s) string and set the players as owner of the WorldGuard region (set by UUID or name depending on implementation)
* @param region The WorldGuard region to set the owners of
* @param input The owner(s) string to parse and set
*/
public abstract void setOwners(ProtectedRegion region, String input);
/**
* Parse a member(s) string and set the players as member of the WorldGuard region (set by UUID or name depending on implementation)
* @param region The WorldGuard region to set the members of
* @param input The member(s) string to parse and set
*/
public abstract void setMembers(ProtectedRegion region, String input);
/**
* Get a set of ProtectedRegion's that are present on a certain location
* @param location The location to check
* @return A set containing all regions present at that location
*/
public abstract Set<ProtectedRegion> getApplicableRegionsSet(Location location);
/**
* Check if a player is a member of the WorldGuard region
* @param region The region to check
* @param player The player to check
* @return true if the player is a member of the region, otherwise false
*/
public abstract boolean containsMember(ProtectedRegion region, UUID player);
/**
* Check if a player is an owner of the WorldGuard region
* @param region The region to check
* @param player The player to check
* @return true if the player is an owner of the region, otherwise false
*/
public abstract boolean containsOwner(ProtectedRegion region, UUID player);
package me.wiefferink.areashop.interfaces;
import com.sk89q.worldguard.protection.flags.Flag;
import com.sk89q.worldguard.protection.flags.InvalidFlagFormat;
import com.sk89q.worldguard.protection.flags.RegionGroup;
import com.sk89q.worldguard.protection.flags.RegionGroupFlag;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import org.bukkit.Location;
import java.util.Set;
import java.util.UUID;
public abstract class WorldGuardInterface {
protected AreaShopInterface pluginInterface;
public WorldGuardInterface(AreaShopInterface pluginInterface) {
this.pluginInterface = pluginInterface;
}
/**
* Parse an owner(s) string and set the players as owner of the WorldGuard region (set by UUID or name depending on implementation)
* @param region The WorldGuard region to set the owners of
* @param input The owner(s) string to parse and set
*/
public abstract void setOwners(ProtectedRegion region, String input);
/**
* Parse a member(s) string and set the players as member of the WorldGuard region (set by UUID or name depending on implementation)
* @param region The WorldGuard region to set the members of
* @param input The member(s) string to parse and set
*/
public abstract void setMembers(ProtectedRegion region, String input);
/**
* Get a set of ProtectedRegion's that are present on a certain location
* @param location The location to check
* @return A set containing all regions present at that location
*/
public abstract Set<ProtectedRegion> getApplicableRegionsSet(Location location);
/**
* Check if a player is a member of the WorldGuard region
* @param region The region to check
* @param player The player to check
* @return true if the player is a member of the region, otherwise false
*/
public abstract boolean containsMember(ProtectedRegion region, UUID player);
/**
* Check if a player is an owner of the WorldGuard region
* @param region The region to check
* @param player The player to check
* @return true if the player is an owner of the region, otherwise false
*/
public abstract boolean containsOwner(ProtectedRegion region, UUID player);
/**
* Get a flag from the name of a flag
* @param flagName The name of the flag to get
* @return The specific flag type for the given name
*/
public abstract Flag<?> fuzzyMatchFlag(String flagName);
/**
* Convert string input to a region group flag value
* @param flag The flag to parse the input for
* @param input The input
* @return The RegionGroup denoted by the input
*/
public abstract <V> V parseFlagInput(Flag<V> flag, String input) throws InvalidFlagFormat;
/**
* Convert string input to a region group flag value
* @param flag The flag to parse the input for
* @param input The input
* @return The RegionGroup denoted by the input
*/
public abstract RegionGroup parseFlagGroupInput(RegionGroupFlag flag, String input) throws InvalidFlagFormat;
}
+5 -6
View File
@@ -14,15 +14,14 @@
[►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/>
[►Request a feature, report a bug or ask support](https://github.com/NLthijs48/AreaShop/issues/new)&nbsp;&nbsp;
[►Open issues](https://github.com/NLthijs48/AreaShop/issues)<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/>
[►Modules/classes overview](https://github.com/NLthijs48/AreaShop/wiki/Modules,-packages-and-classes-overview)
[►Javadocs](https://wiefferink.me/AreaShop/javadocs/)
[►Development builds](http://jenkins.wiefferink.me)<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/)&nbsp;&nbsp;
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff. Show more