mirror of
https://github.com/md5sha256/AreaShop.git
synced 2026-11-07 01:42:34 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
679ffe2145 | ||
|
|
e6c5653073 | ||
|
|
ea31dfdd65 | ||
|
|
9da31fed1f | ||
|
|
9baf0b7eec | ||
|
|
a14dc4e541 | ||
|
|
00d3256716 | ||
|
|
40338b66df | ||
|
|
715bbfd9e3 | ||
|
|
b679c49405 | ||
|
|
dd0930bcea | ||
|
|
5b961564e1 | ||
|
|
c12314fa98 | ||
|
|
e23ad74744 | ||
|
|
9957e02e65 | ||
|
|
07ea919aba | ||
|
|
2c1771cc52 | ||
|
|
83778ff803 | ||
|
|
0c79525144 | ||
|
|
e719930364 | ||
|
|
5568ee240b | ||
|
|
46abc8f83d | ||
|
|
cf3139f373 | ||
|
|
59627e1b97 | ||
|
|
a25b5a5752 | ||
|
|
aceb6945fd | ||
|
|
cbeffe9316 | ||
|
|
9ea97fdb5d | ||
|
|
ed1f73fdd7 | ||
|
|
09af826f88 | ||
|
|
1fd24d864d | ||
|
|
4125364a96 | ||
|
|
a6f5a2eb5e | ||
|
|
5eae75fef1 | ||
|
|
7982531e63 | ||
|
|
6ce15b27b7 | ||
|
|
b1809fb265 | ||
|
|
0344391588 |
No files matched your search
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>NLThijs48 - AreaShop</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,194 +0,0 @@
|
||||
##############################################
|
||||
# config.yml of the AreaShop plugin #
|
||||
# This plugin has been created by NLThijs48 #
|
||||
# Check the server minecraft.go-craft.com #
|
||||
# and then the Survival server for a demo #
|
||||
##############################################
|
||||
|
||||
########## GENERAL ##########
|
||||
## Chatprefix used for all messages in the chat. Also check the 'greeting' lines in the 'flagProfiles' section,
|
||||
## these also contain the prefix and you may want to change those to
|
||||
chatPrefix: '&2[AreaShop]&r '
|
||||
## The characters used for the prices of regions, will appear before the number, for the euro character use '%euro%'
|
||||
moneyCharacter: '$'
|
||||
## The characters used after a currency number, '%euro%' will become the euro character
|
||||
moneyCharacterAfter: ''
|
||||
## Enables / disables debug messages in the console, no need to change
|
||||
debug: false
|
||||
## The .yml language file that should be used, provided by this plugin: EN, NL
|
||||
language: EN
|
||||
## Enable Schematic saving and restoring in general
|
||||
enableSchematics: true
|
||||
## Maximum number of blocks to save to or restore from a .schemetic
|
||||
maximumBlocks: 1000000
|
||||
## Maximum number of locations the teleport function should check to find a safe spot
|
||||
maximumTries: 50000
|
||||
## Enable sending stats to http://mcstats.org/ (Metrics plugin)
|
||||
sendStats: 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
|
||||
## Version of the config, do not change!
|
||||
version: 2.0.0
|
||||
## The different tags you can write on the sign to trigger the plugin
|
||||
signTags:
|
||||
## Tag for adding a rent region
|
||||
rent: '[rent]'
|
||||
## Tag for adding a buy region
|
||||
buy: '[buy]'
|
||||
## Tag for adding a sign to an existing region
|
||||
add: '[as]'
|
||||
## 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' and ops have the unlimited group
|
||||
## If a player has multiple groups the highest numbers are used
|
||||
limitGroups:
|
||||
default:
|
||||
total: 1
|
||||
rents: 1
|
||||
buys: 1
|
||||
unlimited:
|
||||
total: -1
|
||||
rents: -1
|
||||
buys: -1
|
||||
## Below are profiles for the signs, you can assign profiles to regions
|
||||
## by setting 'general.signProfile' in default.yml, groups or individual regions
|
||||
signProfiles:
|
||||
default:
|
||||
## Below is the format for each sign state, the following tags can be used for signs and commands:
|
||||
## %region%, %player%, %uuid%, %price%, %duration%, %world%, %type%, %until%, %untilshort%
|
||||
## 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 clicking player and 'Console' ones from the console
|
||||
forrent:
|
||||
line1: '&2&l[For Rent]'
|
||||
line2: '%region%'
|
||||
line3: '%duration%'
|
||||
line4: '%price%'
|
||||
rightClickPlayer:
|
||||
- 'as rent %region%'
|
||||
leftClickPlayer:
|
||||
- 'as info region %region%'
|
||||
rented:
|
||||
line1: '&4&l[Rented]'
|
||||
line2: '%region%'
|
||||
line3: '%player%'
|
||||
line4: '%untilshort%'
|
||||
rightClickPlayer:
|
||||
- 'as rent %region%'
|
||||
leftClickPlayer:
|
||||
- 'as info region %region%'
|
||||
shiftRightClickPlayer:
|
||||
- 'as unrent %region%'
|
||||
forsale:
|
||||
line1: '&2&l[For Sale]'
|
||||
line2: '%region%'
|
||||
line3: '%price%'
|
||||
line4:
|
||||
rightClickPlayer:
|
||||
- 'as buy %region%'
|
||||
leftClickPlayer:
|
||||
- 'as info region %region%'
|
||||
sold:
|
||||
line1: '&4&l[Sold]'
|
||||
line2: '%region%'
|
||||
line3: '%player%'
|
||||
line4:
|
||||
rightClickPlayer:
|
||||
- 'as buy %region%'
|
||||
leftClickPlayer:
|
||||
- 'as info region %region%'
|
||||
shiftRightClickPlayer:
|
||||
- 'as sell %region%'
|
||||
## Option to run certain commands when one of these events happen
|
||||
## Commands at a 'before' section will execute before the region details are changed in the AreaShop system
|
||||
## and before any other actions occurred (changing signs, saving/loading schematics, etc.),
|
||||
## the 'after' commands will be run when all changes are done.
|
||||
## After 'before' or 'after' you can create a list of commands (see example at the created event)
|
||||
eventCommandProfiles:
|
||||
default:
|
||||
created:
|
||||
before:
|
||||
after:
|
||||
## - "say An AreaShop region has been created: %region%"
|
||||
deleted:
|
||||
before:
|
||||
after:
|
||||
rented:
|
||||
before:
|
||||
after:
|
||||
extended:
|
||||
before:
|
||||
after:
|
||||
unrented:
|
||||
before:
|
||||
after:
|
||||
bought:
|
||||
before:
|
||||
after:
|
||||
sold:
|
||||
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, %region% will be replaced by the region name (.schematic will be added automatically)
|
||||
## %type% represents the type of the region, could be 'rent' or 'buy'
|
||||
## If your regions are all the same size you could use just 1 file as the restore file, just enter a name without %region%
|
||||
## Be carefull with these options, it could crash your server or destroy (parts of) your world if used wrong!
|
||||
schematicProfiles:
|
||||
default:
|
||||
created:
|
||||
save: '%type%-%region%'
|
||||
restore: ''
|
||||
deleted:
|
||||
save: ''
|
||||
restore: '%type%-%region%'
|
||||
rented:
|
||||
save: ''
|
||||
restore: ''
|
||||
unrented:
|
||||
save: ''
|
||||
restore: '%type%-%region%'
|
||||
bought:
|
||||
save: ''
|
||||
restore: ''
|
||||
sold:
|
||||
save: ''
|
||||
restore: '%type%-%region%'
|
||||
## Flag profiles to specify what flags should be set on the WorldGuard regions
|
||||
## All region flags can be used + members, owners, priority and parent.
|
||||
flagProfiles:
|
||||
default:
|
||||
forrent:
|
||||
members: -%player%
|
||||
greeting: '&2[AreaShop]&f %region% can be rented for %price% per %duration%'
|
||||
rented:
|
||||
members: +%player%
|
||||
greeting: '&2[AreaShop]&f %region% is rented by %player% until %until%'
|
||||
forsale:
|
||||
members: -%player%
|
||||
greeting: '&2[AreaShop]&f %region% can be bought for %price%'
|
||||
sold:
|
||||
members: +%player%
|
||||
greeting: '&2[AreaShop]&f %region% is bought by %player%'
|
||||
|
||||
|
||||
########## RENTING ##########
|
||||
## How much seconds between checking if renting has expired (don't put this to low)
|
||||
checkDelay: 60
|
||||
## Timeformat to use on the signs, default is like '30-06 14:52', US format: 'MM-dd KK:mm a'
|
||||
## Search for 'java SimpleDateFormat' for more options and documentation
|
||||
timeFormatSign: 'dd-MM HH:mm'
|
||||
## Timeformat used in the chat, default is like '30 june 2014 14:52', US format: 'MMMMMMMMMMMMMMMMM dd yyyy KK:mm a'
|
||||
## Search for 'java SimpleDateFormat' for more options and documentation
|
||||
timeFormatChat: 'dd MMMMMMMMMMMMMMMMM yyyy HH:mm'
|
||||
## Time indicators, used for specifing rent duration on the signs
|
||||
## Be careful with deleting words, will break signs using those, adding is no problem
|
||||
minutes: [m, min, mins, minute, minutes, minuten, minuut]
|
||||
hours: [h, hour, hours, uur, uren]
|
||||
days: [d, day, days, dag, dagen]
|
||||
months: [M, month, months, maanden, maand]
|
||||
years: [y, year, years, jaar, jaren]
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
### All settings below are default settings and can be overridden
|
||||
### by group settings or region settings (copy a section to a region or group and change them there)
|
||||
|
||||
########## GENERAL ##########
|
||||
general:
|
||||
## Set this to true to enable saving/restoring for regions as specified in the profile below, which is specified in the config
|
||||
enableRestore: false
|
||||
## The schematic profile as specified in the config
|
||||
schematicProfile: 'default'
|
||||
## The event commands profile as specified in the config
|
||||
eventCommandProfile: 'default'
|
||||
## The profile for the format of the sign as specified in the config
|
||||
signProfile: 'default'
|
||||
## The profile for the WorldGuard flags as specified in the config
|
||||
flagProfile: 'default'
|
||||
## The y location within the region to start searching for safe teleport spots (x and z will be in the middle of the region)
|
||||
## Possible values: bottom, middle, top
|
||||
teleportLocationY: bottom
|
||||
## If true the teleportation algorithm only allows telportation to inside the region, otherwise it will expand algorithm
|
||||
## a cube from the starting point to check for safe spots (then it could end outside the region)
|
||||
## If you set a teleport location outside of the region with /as settp then setting this to true breaks that teleport (players cannot use it)
|
||||
teleportIntoRegion: true
|
||||
|
||||
########## RENTING ##########
|
||||
rent:
|
||||
## The default price of a renting region
|
||||
price: 1000
|
||||
## The default duration of a renting region
|
||||
duration: '1 day'
|
||||
## The percentage of the renting price you get back if you unrent the region (price of time left will be multiplied by this/100)
|
||||
moneyBack: 100
|
||||
## Maximum number of extends a player can do (-1 for infinite, 0 for no extending)
|
||||
maxExtends: -1
|
||||
|
||||
########## BUYING ##########
|
||||
buy:
|
||||
## The default price of a buying region
|
||||
price: 1000
|
||||
## The percentage of the buying price you get back if you sell the region
|
||||
moneyBack: 100
|
||||
@@ -1,265 +0,0 @@
|
||||
###################################################
|
||||
# French language file for the AreaShop plugin #
|
||||
# Latest update: V2.0.2 #
|
||||
###################################################
|
||||
# Copy this file and change the strings to your #
|
||||
# favor. Then change the 'language' setting in #
|
||||
# the config to the filename (excluding .yml) #
|
||||
###################################################
|
||||
|
||||
########## General strings
|
||||
total-maximum: "Vous ne pouvez pas acheter ou louer plus de %0% region(s) au total"
|
||||
|
||||
cmd-notValid: "Cette commande est incorrecte, utilisez '/as help' pour plus de détails"
|
||||
cmd-onlyByPlayer: "Cette commande ne peut être utilisé que par un joueur"
|
||||
cmd-weOnlyByPlayer: "Utiliser une séléction 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é dans AreaShop n'a été trouvé dans votre séléction"
|
||||
cmd-noWERegionsFound: "Aucun région WorldEdit croisant votre séléction n'a été trouvé"
|
||||
|
||||
########## Help command strings
|
||||
help-header: "Pade d'aide, Commande que vous pouvez éxé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 votree propre région"
|
||||
help-updaterents: "&6/as updaterents &7-&r Mettre à jours toutes les pancartes et les régions louées."
|
||||
help-updatebuys: "&6/as updatebuys &7-&r Mettre à jours toutes les pancartes et les régions achetées"
|
||||
help-reload: "&6/as reload &7-&r Recharge les configs et langages"
|
||||
help-setrestore: "&6/as setrestore &7-&r Mettre le profil pour réstaurer à on/off"
|
||||
help-setprice: "&6/as setprice &7-&r Fixerle prix d'une région louée."
|
||||
help-rentduration: "&6/as rentduration &7-&r Changer la durée d'une région louée"
|
||||
help-teleport: "&6/as tp &7-&r Téléportation vers votre région acheté / louée"
|
||||
help-teleportAll: "&6/as tp &7-&r Téléportation vers une région louée / acheté"
|
||||
help-setteleport: "&6/as settp &7-&r Définie la position de téléportation pour la région louée / acheté"
|
||||
help-setteleportAll: "&6/as settp &7-&r Défini 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 tout 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éclanche un évenement schématique d'une région"
|
||||
help-add: "&6/as add &7-&r Enregistre une région comme louée ou acheté"
|
||||
help-del: "&6/as del &7-&r Supprime une région enregistré 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"
|
||||
|
||||
############ Other command strings
|
||||
rent-help: "/as rent [regionname], Si non spécifié, 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)"
|
||||
rent-payError: "Une erreur durant le paiement s'est produite. Essayez de nouveau plus tard"
|
||||
rent-rented: "Vous avez loué de %0% jusqu'à %1%"
|
||||
rent-extended: "Vous avez prolongé la location de %0% jusqu'à %1%"
|
||||
rent-extend: "Vous pouvez prolonger votre location avec un clic droit sur la pancarte, ou en utilisant /as rent"
|
||||
rent-lowMoneyExtend: "Vous n'avez pas assez d'argent pour prolonger la location. (Vous possédez %0% et devez payer %1%)"
|
||||
rent-lowMoneyRent: "Vous n'avez pas assez d'argent pour louer cette région. (Vous possédez %0% et devez payer %1%)"
|
||||
rent-someoneElse: "Quelqu'un d'autre a déjà louer cette région"
|
||||
rent-notRentable: "cette région n'est pas disponible à la location"
|
||||
rent-maxExtends: "Vous ne pouvez plus prolonger cette location. (Le maximum est de %0% fois). Mais lorsque la location sera terminé, vous pourrez louer de nouveau cette région"
|
||||
|
||||
buy-help: "/as buy [regionname], Si non spécifié, cible la région dans laquelle vous vous trouvez"
|
||||
buy-noPermission: "Vous n'avez pas la permission d'acheter une région"
|
||||
buy-notBuyable: "cette région n'est pas disponible à l'achat"
|
||||
buy-maximum: "Vous ne pouvez pas acheter plus de %0% région(s)"
|
||||
buy-payError: "Une erreur durant le paiement s'est produite. Essayez de nouveau plus tard"
|
||||
buy-succes: "Vous avez bien acheté %0%"
|
||||
buy-lowMoney: "Vous n'avez pas assez d'argent pour acheter cette région. (Vous possédez %0% et devez payer %1%)"
|
||||
buy-yours: "Vous avez déjà acheter cette région"
|
||||
buy-someoneElse: "Quelqu'un a déjà acheté cette région"
|
||||
|
||||
unrent-help: "/as unrent [regionname], Si non spécifié, 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 être dé-louée car elle n'est pas enregistré à la location"
|
||||
unrent-notRented: "La région ne peut pas être dé-louée car elle n'est pas loué"
|
||||
unrent-unrented: "Votre région a été dé-louée."
|
||||
unrent-other: "La région du joueur %0% a été dé-louée"
|
||||
unrent-expired: "Votre location de %0% a expiré"
|
||||
|
||||
sell-help: "/as sell [regionname], Si non spécifié, cible la région dans laquelle vous vous trouvez"
|
||||
sell-notRegistered: "la région ne peut pas être vendue car elle n'est pas enregistré comme acheté"
|
||||
sell-notBought: "La région ne peut pas être vendue car elle n'est pas la propriété de quelqu'un"
|
||||
sell-sold: "Cette région a été vendu au joueur %0%"
|
||||
sell-soldYours: "Votre région a été vendue"
|
||||
sell-noPermission: "Vous n'avez pas la permission de vendre une région"
|
||||
sell-noPermissionOther: "Vous n'avez pas la permission de vendre une autre région"
|
||||
|
||||
rents-updated: "Tout les panneaux et régions en location ont été mis à jour"
|
||||
rents-notUpdated: "Tout les panneaux n'ont pas été mis à jour. Recharger peut corriger le problème"
|
||||
rents-noPermission: "Vous n'avez pas la permission de mettre à jour les panneaux et régions en location"
|
||||
|
||||
buys-updated: "Tout les panneaux et régions en vente ont été mis à jour"
|
||||
buys-notUpdated: "Tout les panneaux n'ont pas été mis à jour. Recharger peut corriger le problème"
|
||||
buys-noPermission: "Vous n'avez pas la permission de mettre à jour les panneaux et régions en vente"
|
||||
|
||||
reload-reloaded: "La configuration a bien été rechargée"
|
||||
reload-noPermission: "Vous n'avez pas la permission de recharger la configuration"
|
||||
|
||||
info-help: "/as info <all|rented|forrent|sold|forsale|player|region>"
|
||||
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-rented: "Régions louées: &7%0%"
|
||||
info-noRented: "Aucune régions 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égion en vente: &7%0%"
|
||||
info-noForsale: "Toutes les régions sont vendues"
|
||||
info-playerHelp: "/as info player <name>"
|
||||
info-playerRents: "Regions louées par %0%: &7%1%"
|
||||
info-playerNoRents: "%0% n'a de région louée"
|
||||
info-playerBuys: "Régions achetés par %0%: &7%1%"
|
||||
info-playerNoBuys: "%0% n'a pas acheté de région"
|
||||
info-regionHelp: "/as info region [name], Si non spécifié, cible la région dans laquelle vous vous trouvez"
|
||||
info-regionNoRenting: "%0% n'est pas enregistré pour la location"
|
||||
info-regionRenting: "&6Détails de location pour %0%:"
|
||||
info-regionRentedBy: "Louée par: &7%0% jusqu'au %1%"
|
||||
info-regionNotRented: "Actuellement non louée"
|
||||
info-regionBuying: "&6Détails d'achat pour %0%:"
|
||||
info-regionNoBuying: "%0% n'est pas enregistré à la vente"
|
||||
info-regionNotBought: "Actuellement non vendue"
|
||||
info-regionBoughtBy: "Acheté par: &7%0%"
|
||||
info-regionSign: "Panneau(x) de location(s): %0%"
|
||||
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
|
||||
info-regionNoSign: "Il n'y a pas de panneaux enregistré pour cette région"
|
||||
info-regionPriceDuration: "Prix: &7%0% pour chaque %1%"
|
||||
info-regionPrice: "Prix: &7%0%"
|
||||
info-regionRestore: "Réstauration activé: &7%0%"
|
||||
info-regionRestoreProfile: "profil de restauration: &7%0%"
|
||||
info-regionTPLocation: "lieu de téléportation: &7World=%0%, X=%1%, Y=%2%, Z=%3%, Pitch=%4%, Yaw=%5%"
|
||||
info-regionNoTP: "Aucun lieu de téléportation défini"
|
||||
info-regionNotExisting: "La région %0% n'est pas enregistrée"
|
||||
|
||||
setrestore-help: "/as setrestore <region> <true|false|general> [profile]"
|
||||
setrestore-noPermission: "Vous n'avez pas la permission de restaurer les paramètres"
|
||||
setrestore-notRegistered: "%0% n'est pas enregistré"
|
||||
setrestore-invalidSetting: "'%0%' est invalide. Doit être true, false ou general"
|
||||
setrestore-success: "Les paramètres ont bien été restauré de %0% à '%1%'"
|
||||
setrestore-successProfile: "Les paramètres ont bien été restauré de %0% à '%1%' et la profil à '%2%'"
|
||||
|
||||
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é, cible la région dans laquelle vous vous trouvez"
|
||||
setprice-notRegistered: "%0% n'est pas enregistré dans AreaShop"
|
||||
setprice-wrongPrice: "'%0%' n'est pas un rpix valide"
|
||||
setprice-successRent: "Prix de la région %0% changé de %1% à %2%"
|
||||
setprice-successBuy: "Pprix de la région %0% changé à %1%"
|
||||
|
||||
rentduration-noPermission: "Vous n'avez pas la permission de changer la durée d'une location"
|
||||
rentduration-help: "/as rentduration <amount> <identifier> [region], Si non spécifié, cible la région dans laquelle vous vous trouvez"
|
||||
rentduration-notRegistered: "%0% n'est pas enregistré comme location"
|
||||
rentduration-wrongAmount: "'%0%' n'est pas un montant valide, utilisez un nombre entier"
|
||||
rentduration-wrongFormat: "'%0%' n'est pas un format date correcte, regardez la documentation bukkit"
|
||||
rentduration-success: "Durée de la région %0% changé à '%1%'"
|
||||
|
||||
setup-noRegion: "Vous n'avez pas spécifié une région à la seconde ligne"
|
||||
setup-wrongRegion: "la région que vous avez spécifié n'existe pas"
|
||||
setup-alreadyRentSign: "La région que vous avez spécifiée possède déjà un panneau de location"
|
||||
setup-alreadyBuySign: "La région que vous avez spécifiée possède déjà un panneau de vente"
|
||||
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: "Vous n'avez pas indiqué un prix correcte, utilisez un nombre entier"
|
||||
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 mettre en place la location de régions"
|
||||
setup-noPermissionBuy: "Vous n'avez pas la permission de mettre en place l'achat de régions"
|
||||
setup-couldNotDetect: "Multiples régions trouvées avec la même priorité et/ou parent/enfant relation. Spécifiez en un sur la deuxième ligne. (2 des régions trouvées: %0% et %1%)"
|
||||
|
||||
destroy-noPermissionRent: "Vous n'avez pas la permission de détruire le panneau de location d'une région"
|
||||
destroy-noPermissionBuy: "Vous n'avez pas la permission de détruire le panneau de vente d'une région"
|
||||
destroy-successRent: "Location de %0% supprimé"
|
||||
destroy-successBuy: "Achat de %0% supprimé"
|
||||
|
||||
teleport-help: "/as tp <region> [sign]"
|
||||
teleport-noRentOrBuy: "La région '%0%' n'est pas enregistré comme location ou achat"
|
||||
teleport-noPermission: "Vous n'avez pas la permission de vous téléporter dans une région"
|
||||
teleport-noPermissionOther: "Vous n'avez pas la permission de vous téléporter à une région qui ne vous appartient pas"
|
||||
teleport-success: "Vous avez été téléporté à %0%"
|
||||
teleport-noSafe: "Aucune position sécurisé trouvé dans la région %0%. Pas de point restant, ou tentatives maximales dépassées. (%1%/%2%)"
|
||||
|
||||
setteleport-help: "/as settp [region] [reset], Si non spécifié, 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-noPermissionAll: "Vous n'avez pas la permission de définir un point de téléportation sur une région qui ne vous appartient pas"
|
||||
setteleport-noRentOrBuy: "La région '%0%' n'est pas enregistré comme location ou achat"
|
||||
setteleport-success: "Lieu de téléportation de %0% défini"
|
||||
setteleport-notInside: "Le lieu doit se trouver dans votre région"
|
||||
setteleport-reset: "le lieu de téléportation de %0% a été reset"
|
||||
|
||||
find-help: "/as find <buy|rent> [maxprice]"
|
||||
find-noPermission: "Vous n'avez pas la permission de vous téléporter à des panneaux. Vous ne pouvez donc pas utiliser find"
|
||||
find-success: "Trouvé %0% région: %1%, en recherchant avec le prix maximum de votre solde: %2%"
|
||||
find-successMax: "trouvé %0% région: %1%, en cherchant un prix maximum de %2%"
|
||||
find-wrongMaxPrice: "le prix maximum n'est pas un nombre valide: %0%"
|
||||
find-noneFound: "Aucune %0% région trouvée, en cherchant le prix maximum de votre solde: %1%"
|
||||
find-noneFoundMax: "Aucune %0% région trouvée en cherchant un prix maximum de %1%"
|
||||
|
||||
groupadd-help: "/as groupadd <group> [region], Si non spécifié, 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é: %0%"
|
||||
groupadd-success: "La région %0% a été ajouté au groupe '%1%'. ce groupe a maintenant %2% membre(s)"
|
||||
groupadd-failed: "La région %0% est déjà membre du groupe '%1%'"
|
||||
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é, 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é: %0%"
|
||||
groupdel-success: "La région %0% a été supprimé du groupe '%1%', ce groupe a maintenant %2% membre(s)"
|
||||
groupdel-failed: "La région %0% n'est pas membre du groupe '%1%'"
|
||||
groupdel-weSuccess: "Supprimé du groupe %0%: &7%1%"
|
||||
groupdel-weFailed: "Nous ne sommes pas dans le groupe %0% de toute façon: &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é: %0%"
|
||||
schemevent-wrongEvent: "L'évent spécifié '%0%' n'existe pas, utilisez un des suivants: &7%1%"
|
||||
schemevent-success: "L'évent '%0%' a été déclenché pour la région %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é comme %0%: &7%1%"
|
||||
add-failed: "Déjà enregistré: &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: "Le région '%0%' n'est pas enregistré à AreaShop"
|
||||
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é: &7%0%"
|
||||
|
||||
addsign-help: "/as addsign [region] [profile]"
|
||||
addsign-noSign: "Vous ne regardez pas de panneau"
|
||||
addsign-noRegion: "La région '%0%' n'a pas été trouvé"
|
||||
addsign-noRegions: "Aucune région trouvé autour du panneau"
|
||||
addsign-couldNotDetect: "Plusieurs régions ont été trouvées à promixité 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é à %0%"
|
||||
addsign-successProfile: "Le panneau a été ajouté à %0% avec le profil %1%"
|
||||
addsign-alreadyRegistered: "Ce panneau a déjà été enregistré pour la région %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"
|
||||
delsign-success: "Ce panneau a été supprimé de la région %0%"
|
||||
@@ -1,173 +0,0 @@
|
||||
###################################################
|
||||
# Dutch language file for the AreaShop plugin #
|
||||
# Latest update: V1.2.1 #
|
||||
###################################################
|
||||
# Copy this file and change the strings to your #
|
||||
# favor. Then change the 'language' setting in #
|
||||
# the config to the filename (excluding .yml) #
|
||||
###################################################
|
||||
|
||||
########## Command strings
|
||||
total-maximum: "Je kunt niet meer dan %0% gebied(en) in totaal huren en kopen"
|
||||
|
||||
cmd-onlyByPlayer: "Dit commando kan alleen door een speler uitgevoert worden"
|
||||
cmd-notValid: "Dat commando is niet geldig , gebruik '/as help' voor informatie"
|
||||
|
||||
rent-regionNotRentable: "Dat gebied is niet beschikbaar om te huren"
|
||||
rent-help: "/as rent <gebiednaam>"
|
||||
rent-noPermission: "Je hebt geen toestemming om een gebied te huren"
|
||||
rent-maximum: "Je kunt niet meer dan %0% gebied(en) huren"
|
||||
rent-payError: "Er is iets mis gegaan met betalen, probeer het later opnieuw"
|
||||
rent-rented: "Je hebt %0% tot %1% gehuurd"
|
||||
rent-extended: "Je hebt je huur van %0% verlengt tot %1%"
|
||||
rent-extend: "Je kunt je huur verlengen door opnieuw op het bordje te klikken of gebruik te maken van /as rent"
|
||||
rent-lowMoneyExtend: "Je hebt niet genoeg geld om de huur te verlengen (je hebt %0% van de %1%)"
|
||||
rent-lowMoneyRent: "Je hebt niet genoeg geld om het gebied te huren (je hebt %0% van de %1%)"
|
||||
rent-someoneElse: "Iemand anders heeft dit gebied al gehuurd"
|
||||
rent-notRentable: "Dat gebied is niet beschikbaar om te huren"
|
||||
|
||||
buy-help: "/as buy <gebiednaam>"
|
||||
buy-noPermission: "Je hebt geen toestemming om een gebied te kopen"
|
||||
buy-notBuyable: "Dat gebied is niet beschikbaar om te kopen"
|
||||
buy-maximum: "Je kunt niet meer dan %0% gebied(en) kopen"
|
||||
buy-payError: "Er is iets mis gegaan met betalen, probeer het later opnieuw"
|
||||
buy-succes: "Je hebt %0% succesvol gekocht"
|
||||
buy-lowMoney: "Je hebt niet genoeg geld om het gebied te kopen (je hebt %0% van de %1%)"
|
||||
buy-yours: "Je hebt dit gebied al gekocht"
|
||||
buy-someoneElse: "Iemand anders heeft dit gebied al gekocht"
|
||||
|
||||
unrent-help: "/as unrent <gebiednaam>"
|
||||
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: "De huur van je gebied is gestopt"
|
||||
unrent-other: "De huur voor het gebied is gestopt voor speler %0%"
|
||||
unrent-expired: "De huur van je gebied %0% is gestopt"
|
||||
|
||||
sell-help: "/as sell <gebiednaam>"
|
||||
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: "Het gebied is verkocht voor speler %0%"
|
||||
sell-soldYours: "Je gebied is verkocht"
|
||||
sell-noPermission: "Je hebt geen toestemming om een gebied te verkopen"
|
||||
sell-noPermissionOther: "Je hebt geen toestemming om een gebied van iemand anders te verkopen"
|
||||
|
||||
rents-updated: "Alle borden en gebieden voor de verhuur zijn geupdate"
|
||||
rents-notUpdated: "Niet alle borden zijn geupdate, een reload zou het op kunnen lossen"
|
||||
rents-noPermission: "Je hebt geen toestemming om alle verhuur borden en gebieden te updaten"
|
||||
|
||||
buys-updated: "Alle borden en gebieden voor de verkoop zijn geupdate"
|
||||
buys-notUpdated: "Niet alle borden zijn geupdate, een reload zou het op kunnen lossen"
|
||||
buys-noPermission: "Je hebt geen toestemming om alle verkoop borden en gebieden te updaten"
|
||||
|
||||
reload-reloaded: "De config is succesvol opnieuw ingeladen"
|
||||
reload-noPermission: "Je hebt geen toestemming om de config opnieuw in te laden"
|
||||
|
||||
info-help: "/as info <all|rented|forrent|sold|forsale|player|region>"
|
||||
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-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-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-regionHelp: "/as info region <naam>"
|
||||
info-regionNoRenting: "%0% is niet geregistreerd voor verhuur"
|
||||
info-regionRenting: "&6Huur informatie voor %0%"
|
||||
info-regionRentedBy: "Gehuurd door: %0% tot %1%"
|
||||
info-regionNotRented: "Nu niet verhuurd"
|
||||
info-regionBuying: "&6Verkoop informatie voor %0%"
|
||||
info-regionNoBuying: "%0% is niet geregistreerd voor verkoop"
|
||||
info-regionNotBought: "Nu niet verkocht"
|
||||
info-regionBoughtBy: "Gekocht door: %0%"
|
||||
info-regionSign: "Plek van het bordje: wereld=%0%, X=%1%, Y=%2%, Z=%3%"
|
||||
info-regionPriceDuration: "Prijs: %0% voor elke %1%"
|
||||
info-regionPrice: "Prijs: %0%"
|
||||
info-regionRestore: "Herstellen ingeschakeld: %0%"
|
||||
info-regionRestoreProfile: "Herstel profiel: %0%"
|
||||
|
||||
help-header: "Help pagina, commando's die jij kunt uitvoeren"
|
||||
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-updaterents: "&6/as updaterents &7-&r Update alle huur borden en gebieden"
|
||||
help-updatebuys: "&6/as updatebuys &7-&r Update alle koop borden en gebieden"
|
||||
help-reload: "&6/as reload &7-&r Herlaad de config en de taalbestanden"
|
||||
help-rentrestore: "&6/as rentrestore &7-&r Laat dit huur gebied herstellen of niet"
|
||||
help-buyrestore: "&6/as buyrestore &7-&r Laat dit koop gebied herstellen of niet"
|
||||
help-rentprice: "&6/as rentprice &7-&r Verander de prijs van een huur gebied"
|
||||
help-buyprice: "&6/as buyprice &7-&r Verander de prijs van een koop gebied"
|
||||
help-rentduration: "&6/as rentduration &7-&r Verander de looptijd van een huur gebied"
|
||||
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"
|
||||
|
||||
rentrestore-help: "/as rentrestore <gebied> <true|false|general> [profiel]"
|
||||
rentrestore-noPermission: "Je hebt geen toestemming om herstel instellingen te veranderen bij een huur gebied"
|
||||
rentrestore-notRegistered: "%0% is niet geregistreerd als een huur gebied"
|
||||
rentrestore-invalidSetting: "'%0%' is geen goede optie, gebruik true, false of general"
|
||||
rentrestore-success: "Succesvol de herstel optie gezet van %0% naar '%1%'"
|
||||
rentrestore-successProfile: "Succesvol de herstel optie gezet van %0% naar '%1%' en het profiel naar '%2%'"
|
||||
|
||||
buyrestore-help: "/as buyrestore <gebied> <true|false|general> [profiel]"
|
||||
buyrestore-noPermission: "Je hebt geen toestemming om herstel instellingen te veranderen bij geen koop gebied"
|
||||
buyrestore-notRegistered: "%0% is niet geregistreerd als een koop gebied"
|
||||
buyrestore-invalidSetting: "'%0%' is geen goede optie, gebruik true, false of general"
|
||||
buyrestore-success: "Succesvol de herstel optie gezet van %0% naar '%1%'"
|
||||
buyrestore-successProfile: "Succesvol de herstel optie gezet van %0% naar '%1%' en het profiel naar '%2%'"
|
||||
|
||||
rentprice-noPermission: "Je hebt geen toestemming om de prijs van een huur gebied te veranderen"
|
||||
rentprice-help: "/as rentprice <gebied> <prijs>"
|
||||
rentprice-notRegistered: "%0% is niet geregistreerd als een huur gebied"
|
||||
rentprice-wrongPrice: "'%0%' is geen goede prijs"
|
||||
rentprice-success: "Prijs van gebied %0% is veranderd naar %1% per %2%"
|
||||
|
||||
buyprice-noPermission: "Je hebt geen toestemming om de prijs van een koop gebied te veranderen"
|
||||
buyprice-help: "/as buyprice <gebied> <prijs>"
|
||||
buyprice-notRegistered: "%0% is niet geregistreerd als koop gebied"
|
||||
buyprice-wrongPrice: "'%0%' is geen goede prijs"
|
||||
buyprice-success: "Prijs van gebied %0% is veranderd naar %1%"
|
||||
|
||||
rentduration-noPermission: "Je hebt geen toestemming om de looptijd van een huur gebied te veranderen"
|
||||
rentduration-help: "/as rentduration <gebied> <aantal> <soort>"
|
||||
rentduration-notRegistered: "%0% is niet geregistreerd als een huur gebied"
|
||||
rentduration-wrongPrice: "'%0%' is geen goede prijs, gebruik een geheel getal"
|
||||
rentduration-wrongFormat: "'%0%' is geen goed tijdformaat, bekijk de documentatie op Bukkit"
|
||||
rentduration-success: "Looptijd van gebeid %0% veranderd naar '%1%'"
|
||||
|
||||
setup-noRegion: "Je hebt geen gebied aangegeven op de tweede regel"
|
||||
setup-wrongRegion: "Het aangegeven gebied bestaat niet"
|
||||
setup-alreadyRentSign: "Het aangegeven gebied heeft al een bord voor huren"
|
||||
setup-alreadyBuySign: "Het aangegeven gebied heeft al een bord voor kopen"
|
||||
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 een nummer"
|
||||
setup-rentSuccess: "Huren van gebied %0% is goed opgezet"
|
||||
setup-buySuccess: "Kopen van gebied %0% 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%)"
|
||||
|
||||
teleport-help: "/as tp <gebied> <aantal> <soort>"
|
||||
teleport-noRentOrBuy: "Gebied '%0%' is niet geregistreerd als koop of huur gebied"
|
||||
teleport-noPermission: "Je hebt geen toestemming om te teleporteren naar een gebied"
|
||||
teleport-noPermissionOther: "Je hebt geen toestemming om te teleporteren naar een gebied dat niet van jou is"
|
||||
teleport-success: "Je bent naar %0% geteleporteerd"
|
||||
teleport-noSafe: "Geen veilige plek gevonden in gebied %0%, verander het gebied of stel de teleporteer positie in"
|
||||
@@ -1,21 +0,0 @@
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
public class RentCheck extends BukkitRunnable {
|
||||
AreaShop plugin;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param plugin The AreaShop plugin
|
||||
*/
|
||||
public RentCheck(AreaShop plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
plugin.getFileManager().checkRents();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class RentdurationCommand extends CommandAreaShop {
|
||||
|
||||
public RentdurationCommand(AreaShop plugin) {
|
||||
super(plugin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandStart() {
|
||||
return "areashop rentduration";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelp(CommandSender target) {
|
||||
if(target.hasPermission("areashop.rentduration")) {
|
||||
return plugin.getLanguageManager().getLang("help-rentduration");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.rentduration")) {
|
||||
plugin.message(sender, "rentduration-noPermission");
|
||||
return;
|
||||
}
|
||||
if(args.length < 3 || args[1] == null || args[2] == null) {
|
||||
plugin.message(sender, "rentduration-help");
|
||||
return;
|
||||
}
|
||||
RentRegion rent = null;
|
||||
if(args.length <= 3) {
|
||||
if(sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().getApplicalbeASRegions(((Player)sender).getLocation());
|
||||
if(regions.size() != 1) {
|
||||
plugin.message(sender, "rentduration-help");
|
||||
return;
|
||||
} else {
|
||||
if(regions.get(0).isRentRegion()) {
|
||||
rent = (RentRegion)regions.get(0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
plugin.message(sender, "rentduration-help");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
rent = plugin.getFileManager().getRent(args[3]);
|
||||
}
|
||||
if(rent == null) {
|
||||
plugin.message(sender, "rentduration-notRegistered", args[3]);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Integer.parseInt(args[1]);
|
||||
} catch(NumberFormatException e) {
|
||||
plugin.message(sender, "rentduration-wrongAmount", args[1]);
|
||||
return;
|
||||
}
|
||||
if(!plugin.checkTimeFormat(args[1] + " " + args[2])) {
|
||||
plugin.message(sender, "rentduration-wrongFormat", args[1]+" "+args[2]);
|
||||
return;
|
||||
}
|
||||
rent.setDuration(args[1]+" "+args[2]);
|
||||
rent.updateRegionFlags();
|
||||
rent.updateSigns();
|
||||
rent.save();
|
||||
plugin.message(sender, "rentduration-success", rent.getName(), rent.getDurationString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompleteList(int toComplete, String[] start) {
|
||||
List<String> result = new ArrayList<String>();
|
||||
if(toComplete == 2) {
|
||||
result = plugin.getFileManager().getRentNames();
|
||||
} else if(toComplete == 4) {
|
||||
result.addAll(plugin.config().getStringList("minutes"));
|
||||
result.addAll(plugin.config().getStringList("hours"));
|
||||
result.addAll(plugin.config().getStringList("days"));
|
||||
result.addAll(plugin.config().getStringList("months"));
|
||||
result.addAll(plugin.config().getStringList("years"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,252 +0,0 @@
|
||||
package nl.evolutioncoding.AreaShop.regions;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.milkbowl.vault.economy.EconomyResponse;
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.Exceptions.RegionCreateException;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class BuyRegion extends GeneralRegion {
|
||||
|
||||
public BuyRegion(AreaShop plugin, YamlConfiguration config) throws RegionCreateException {
|
||||
super(plugin, config);
|
||||
}
|
||||
|
||||
public BuyRegion(AreaShop plugin, String name, World world) {
|
||||
super(plugin, name, world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegionType getType() {
|
||||
return RegionType.BUY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegionState getState() {
|
||||
if(isSold()) {
|
||||
return RegionState.SOLD;
|
||||
} else {
|
||||
return RegionState.FORSALE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the UUID of the owner of this region
|
||||
* @return The UUID of the owner of this region
|
||||
*/
|
||||
public UUID getBuyer() {
|
||||
String buyer = getStringSetting("buy.buyer");
|
||||
if(buyer != null) {
|
||||
try {
|
||||
return UUID.fromString(buyer);
|
||||
} catch(IllegalArgumentException e) {}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player is the buyer of this region
|
||||
* @param player Player to check
|
||||
* @return true if this player owns this region, otherwise false
|
||||
*/
|
||||
public boolean isBuyer(Player player) {
|
||||
UUID buyer = getBuyer();
|
||||
if(buyer == null || player == null) {
|
||||
return false;
|
||||
} else {
|
||||
return buyer.equals(player.getUniqueId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the buyer of this region
|
||||
* @param buyer The UUID of the player that should be set as buyer
|
||||
*/
|
||||
public void setBuyer(UUID buyer) {
|
||||
if(buyer == null) {
|
||||
setSetting("buy.buyer", null);
|
||||
setSetting("buy.buyerName", null);
|
||||
} else {
|
||||
setSetting("buy.buyer", buyer.toString());
|
||||
setSetting("buy.buyerName", plugin.toName(buyer));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name of the player that owns this region
|
||||
* @return The name of the player that owns this region
|
||||
*/
|
||||
public String getPlayerName() {
|
||||
return plugin.toName(getBuyer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the region is sold
|
||||
* @return true if the region is sold, otherwise false
|
||||
*/
|
||||
public boolean isSold() {
|
||||
return getBuyer() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the price of the region
|
||||
* @return The price of the region
|
||||
*/
|
||||
public double getPrice() {
|
||||
return getDoubleSetting("buy.price");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the formatted string of the price (includes prefix and suffix)
|
||||
* @return The formatted string of the price
|
||||
*/
|
||||
public String getFormattedPrice() {
|
||||
return plugin.formatCurrency(getPrice());
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the price of the region
|
||||
* @param price
|
||||
*/
|
||||
public void setPrice(double price) {
|
||||
setSetting("buy.price", price);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> getSpecificReplacements() {
|
||||
// Fill the replacements map with things specific to a BuyRegion
|
||||
HashMap<String, Object> result = new HashMap<String, Object>();
|
||||
result.put(AreaShop.tagPrice, getFormattedPrice());
|
||||
result.put(AreaShop.tagPlayerName, getPlayerName());
|
||||
result.put(AreaShop.tagPlayerUUID, getBuyer());
|
||||
// TODO: Add more?
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Buy a region
|
||||
* @param player The player that wants to buy the region
|
||||
* @return true if it succeeded and false if not
|
||||
*/
|
||||
public boolean buy(Player player) {
|
||||
/* Check if the player has permission */
|
||||
if(player.hasPermission("areashop.buy")) {
|
||||
if(!isSold()) {
|
||||
// Check if the player can still buy
|
||||
int maximumBuys = getMaxBuyRegions(player);
|
||||
AreaShop.debug("maximumBuys=" + maximumBuys);
|
||||
if(getCurrentBuyRegions(player) >= maximumBuys) {
|
||||
plugin.message(player, "buy-maximum", maximumBuys);
|
||||
return false;
|
||||
}
|
||||
int maximumTotal = getMaxTotalRegions(player);
|
||||
if(getCurrentTotalRegions(player) >= maximumTotal) {
|
||||
plugin.message(player, "total-maximum", maximumTotal);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Check if the player has enough money */
|
||||
if(plugin.getEconomy().has(player, getWorldName(), getPrice())) {
|
||||
|
||||
/* Substract the money from the players balance */
|
||||
EconomyResponse r = plugin.getEconomy().withdrawPlayer(player, getPrice());
|
||||
if(!r.transactionSuccess()) {
|
||||
plugin.message(player, "buy-payError");
|
||||
return false;
|
||||
}
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.BOUGHT, true);
|
||||
|
||||
/* Set the owner */
|
||||
setBuyer(player.getUniqueId());
|
||||
|
||||
/* Update everything */
|
||||
handleSchematicEvent(RegionEvent.BOUGHT);
|
||||
updateSigns();
|
||||
updateRegionFlags(RegionState.SOLD);
|
||||
|
||||
/* Send message to the player */
|
||||
plugin.message(player, "buy-succes", getName());
|
||||
AreaShop.debug(player.getName() + " has bought region " + getName() + " for " + getFormattedPrice());
|
||||
|
||||
this.save();
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.BOUGHT, false);
|
||||
return true;
|
||||
} else {
|
||||
/* Player has not enough money */
|
||||
plugin.message(player, "buy-lowMoney", plugin.formatCurrency(plugin.getEconomy().getBalance(player, getWorldName())), getFormattedPrice());
|
||||
}
|
||||
} else {
|
||||
if(player.getUniqueId().equals(getBuyer())) {
|
||||
plugin.message(player, "buy-yours");
|
||||
} else {
|
||||
plugin.message(player, "buy-someoneElse");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
plugin.message(player, "buy-noPermission");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sell a buyed region, get part of the money back
|
||||
* @param regionName
|
||||
*/
|
||||
public void sell(boolean giveMoneyBack) {
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.SOLD, true);
|
||||
|
||||
/* Give part of the buying price back */
|
||||
double percentage = getDoubleSetting("buy.moneyBack") / 100.0;
|
||||
double moneyBack = getPrice() * percentage;
|
||||
if(moneyBack > 0 && giveMoneyBack) {
|
||||
/* Give back the money */
|
||||
OfflinePlayer player = Bukkit.getOfflinePlayer(getBuyer());
|
||||
if(player != null) {
|
||||
EconomyResponse r = null;
|
||||
boolean error = false;
|
||||
try {
|
||||
r = plugin.getEconomy().depositPlayer(Bukkit.getOfflinePlayer(getBuyer()), moneyBack);
|
||||
} catch(Exception e) {
|
||||
error = true;
|
||||
}
|
||||
if(error || r == null || !r.transactionSuccess()) {
|
||||
plugin.getLogger().info("Something went wrong with paying back money to " + getPlayerName() + " while selling region " + getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Debug message */
|
||||
AreaShop.debug(getPlayerName() + " has sold " + getName() + ", got " + plugin.formatCurrency(moneyBack) + " money back");
|
||||
|
||||
/* Update everything */
|
||||
handleSchematicEvent(RegionEvent.SOLD);
|
||||
updateRegionFlags(RegionState.FORSALE);
|
||||
|
||||
/* Remove the player */
|
||||
setBuyer(null);
|
||||
|
||||
updateSigns();
|
||||
|
||||
this.save();
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.SOLD, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#AreaShop
|
||||
|
||||
Check the documentation and download the plugin at http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/
|
||||
Check the documentation at http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/
|
||||
|
||||
Note: The code on this repository will not show live progress on the plugin, but will only be updated when an update is released on Bukkit.
|
||||
|
||||
Latest update: http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/files/13-area-shop-v2-0-1/
|
||||
Note: From now on I will try to update this repository every time I make a change to the code.
|
||||
+331
@@ -0,0 +1,331 @@
|
||||
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ config.yml file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
|
||||
# ║ This file contains options to change the working of the plugin, the profiles defined here can be used in default.yml ║
|
||||
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
|
||||
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ GENERAL: Options that influence the global state of the plugin │
|
||||
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
## Chatprefix used for all messages in the chat. Also check the 'greeting' lines in the 'flagProfiles' section,
|
||||
## these also contain the prefix and you may want to change those to
|
||||
chatPrefix: '&2[AreaShop]&r '
|
||||
## The characters used for the prices of regions, will appear before the number, for the euro character use '%euro%'
|
||||
moneyCharacter: '$'
|
||||
## The characters used after a currency number, '%euro%' will become the euro character
|
||||
moneyCharacterAfter: ''
|
||||
## How many numbers behind the dot should be shown (2 will make numbers like '8.55', '9.01')
|
||||
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
|
||||
## The .yml language file that should be used, provided by this plugin: EN, NL, FR, DE, PL
|
||||
language: EN
|
||||
## Enable Schematic saving and restoring in general
|
||||
enableSchematics: true
|
||||
## The tags you need to write on the sign to trigger the plugin
|
||||
signTags:
|
||||
## Tag for adding a rent region
|
||||
rent: '[rent]'
|
||||
## Tag for adding a buy region
|
||||
buy: '[buy]'
|
||||
## Tag for adding a sign to an existing region
|
||||
add: '[as]'
|
||||
## Enable sending stats to http://mcstats.org/ (Metrics plugin)
|
||||
sendStats: true
|
||||
## If enabled it will check for updates when loading the plugin, it will never download files, it will only notify about it
|
||||
## A message will be printed in the console when an update is available and OPs will be notified when joining the server
|
||||
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
|
||||
## Enables / disables debug messages in the console, could be useful to figure out where errors come from
|
||||
debug: false
|
||||
## Version of the config, do not change!
|
||||
version: 2.1.2
|
||||
|
||||
|
||||
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ RENTING: Options that apply to all rent regions │
|
||||
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
## Timeformat to use on the signs, default is like '30-06 14:52', US format: 'MM-dd KK:mm a'
|
||||
## Search for 'java SimpleDateFormat' for more options and documentation
|
||||
timeFormatSign: 'dd-MM HH:mm'
|
||||
## Timeformat used in the chat, default is like '30 june 2014 14:52', US format: 'MMMMMMMMMMMMMMMMM dd yyyy KK:mm a'
|
||||
## Search for 'java SimpleDateFormat' for more options and documentation
|
||||
timeFormatChat: 'dd MMMMMMMMMMMMMMMMM yyyy HH:mm'
|
||||
## Time indicators, used for specifing rent duration on the signs
|
||||
## Be careful with deleting words, will break signs using those, adding is no problem
|
||||
minutes: [m, min, mins, minute, minutes, minuten, minuut]
|
||||
hours: [h, hour, hours, uur, uren]
|
||||
days: [d, day, days, dag, dagen]
|
||||
months: [M, month, months, maanden, maand]
|
||||
years: [y, year, years, jaar, jaren]
|
||||
|
||||
|
||||
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ PERMISSION GROUPS: Assigned by giving players certain permissions │
|
||||
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
## 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' and ops have the unlimited group
|
||||
## 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 .
|
||||
## This can be used to get different limits for other worlds or area's.
|
||||
## Give players permissions globally and not per world! That would break limits when then try renting/buying from within another world
|
||||
limitGroups:
|
||||
default:
|
||||
total: 1
|
||||
rents: 1
|
||||
buys: 1
|
||||
|
||||
|
||||
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ PROFILES: Assigned in general (default.yml), for a group (groups.yml) or individually (<region>.yml) │
|
||||
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
## Below is a list of tags that can be used with all the profiles below.
|
||||
## If a tag has no value (for example when you use %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), will not get replaced if no renter/buyer
|
||||
## %uuid% The uuid of the player that rents/buys the region, will not get replaced if no renter/buyer
|
||||
## %friends% The names of friends added to this region separated by ', '
|
||||
## %friendsuuid% The UUID's of friends added to this region separated by ', '
|
||||
## %price% The price of the region formatted with the configured characters before and after the number
|
||||
## %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
|
||||
## %moneyback% The amount of money the player will get back when unrenting/selling the region (formatted with currency characters)
|
||||
## %moneybackpercent% The percentage of the price the player will get back when unrenting (only the number between 0-100)
|
||||
## %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 readble)
|
||||
## %inactivetime% The maximum time a player may be inactive before unrent/sell (human readble)
|
||||
|
||||
## Below are profiles for the signs, you can assign profiles to regions
|
||||
## by setting 'general.signProfile' in default.yml, groups or individual regions
|
||||
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 clicking player and 'Console' ones from the console
|
||||
forrent:
|
||||
line1: '&2&l[For Rent]'
|
||||
line2: '%region%'
|
||||
line3: '%duration%'
|
||||
line4: '%price%'
|
||||
rightClickPlayer:
|
||||
- 'areashop rent %region%'
|
||||
leftClickPlayer:
|
||||
- 'areashop info region %region%'
|
||||
rented:
|
||||
line1: '&4&l[Rented]'
|
||||
line2: '%region%'
|
||||
line3: '%player%'
|
||||
line4: '%untilshort%'
|
||||
rightClickPlayer:
|
||||
- 'areashop rent %region%'
|
||||
leftClickPlayer:
|
||||
- 'areashop info region %region%'
|
||||
shiftRightClickPlayer:
|
||||
- 'areashop unrent %region%'
|
||||
forsale:
|
||||
line1: '&2&l[For Sale]'
|
||||
line2: '%region%'
|
||||
line3: '%price%'
|
||||
line4:
|
||||
rightClickPlayer:
|
||||
- 'areashop buy %region%'
|
||||
leftClickPlayer:
|
||||
- 'areashop info region %region%'
|
||||
resell:
|
||||
line1: '&9&l[Resale]'
|
||||
line2: '%region%'
|
||||
line3: '%resellprice%'
|
||||
line4: '&8%player%'
|
||||
rightClickPlayer:
|
||||
- 'areashop buy %region%'
|
||||
leftClickPlayer:
|
||||
- 'areashop info region %region%'
|
||||
shiftRightClickPlayer:
|
||||
- 'areashop stopresell %region%'
|
||||
sold:
|
||||
line1: '&4&l[Sold]'
|
||||
line2: '%region%'
|
||||
line3: '%player%'
|
||||
line4:
|
||||
rightClickPlayer:
|
||||
- 'areashop buy %region%'
|
||||
leftClickPlayer:
|
||||
- 'areashop info region %region%'
|
||||
shiftRightClickPlayer:
|
||||
- 'areashop sell %region%'
|
||||
## Option to run certain commands when one of these events happen
|
||||
## Commands at a 'before' section will execute before the region details are changed in the AreaShop system
|
||||
## and before any other actions occurred (changing signs, saving/loading schematics, etc.),
|
||||
## the 'after' commands will be run when all changes are done.
|
||||
## After 'before' or 'after' you can create a list of commands (see example at the created event)
|
||||
eventCommandProfiles:
|
||||
default:
|
||||
created:
|
||||
before:
|
||||
after:
|
||||
## - "say An AreaShop region has been created: %region%"
|
||||
deleted:
|
||||
before:
|
||||
after:
|
||||
rented:
|
||||
before:
|
||||
after:
|
||||
extended:
|
||||
before:
|
||||
after:
|
||||
unrented:
|
||||
before:
|
||||
after:
|
||||
bought:
|
||||
before:
|
||||
after:
|
||||
sold:
|
||||
before:
|
||||
after:
|
||||
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
|
||||
## Be carefull with these options, it could crash your server or destroy (parts of) your world if used wrong!
|
||||
## The limit 'maximumBlocks' applies to restoring/saving schematics, be sure your regions are below the limit
|
||||
schematicProfiles:
|
||||
default:
|
||||
created:
|
||||
save: '%type%-%region%'
|
||||
restore: ''
|
||||
deleted:
|
||||
save: ''
|
||||
restore: '%type%-%region%'
|
||||
rented:
|
||||
save: ''
|
||||
restore: ''
|
||||
unrented:
|
||||
save: ''
|
||||
restore: '%type%-%region%'
|
||||
bought:
|
||||
save: ''
|
||||
restore: ''
|
||||
sold:
|
||||
save: ''
|
||||
restore: '%type%-%region%'
|
||||
resell:
|
||||
save: ''
|
||||
restore: ''
|
||||
## Flag profiles to specify what flags should be set on the WorldGuard regions
|
||||
## 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:cool-guy'
|
||||
## 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 owners can enter the region:
|
||||
## entry: 'allow g:owners'
|
||||
## Use '' for a flag to reset it.
|
||||
flagProfiles:
|
||||
default:
|
||||
forrent:
|
||||
members: ''
|
||||
greeting: '%lang:prefix%%lang:greeting-forrent%'
|
||||
rented:
|
||||
members: '%uuid%, %friendsuuid%'
|
||||
greeting: '%lang:prefix%%lang:greeting-rented%'
|
||||
forsale:
|
||||
members: ''
|
||||
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%'
|
||||
## Profiles that specify when players should get messages about rent that almost run out
|
||||
## The numbers that start sections in the profile specify how time before it actually runs out it should be executed
|
||||
## 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
|
||||
expirationWarningProfiles:
|
||||
default:
|
||||
"1 day":
|
||||
warnPlayer: true
|
||||
commands:
|
||||
## - "say %region% is about to expire for %player%: %timeleft% left"
|
||||
"1 hour":
|
||||
warnPlayer: true
|
||||
commands:
|
||||
"5 minutes":
|
||||
warnPlayer: true
|
||||
commands:
|
||||
|
||||
|
||||
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ LIMITS AND TIMINGS: Options for limits and the frequencies for certain functions (be very carefull with these!) │
|
||||
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
## 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.
|
||||
|
||||
## Maximum number of blocks to save to or restore from a .schemetic
|
||||
maximumBlocks: 1000000
|
||||
## Maximum number of locations the teleport function should check to find a safe spot
|
||||
maximumTries: 50000
|
||||
## Timings for saving files that need saving
|
||||
saving:
|
||||
## Time between saving files that need to be saved (not all files will be saved by default)
|
||||
delay: 10
|
||||
## How many regions per tick will be saved
|
||||
regionsPerTick: 1
|
||||
## Timings for rent expiration checking
|
||||
expiration:
|
||||
## Time between checking if rent regions have been expired (seconds)
|
||||
delay: 59
|
||||
## Number of rent regions to check per tick (there are 20 ticks in a second)
|
||||
regionsPerTick: 5
|
||||
## Timings for expiration warning to online players
|
||||
expireWarning:
|
||||
## The time between checking if expiration warning need to be sent
|
||||
delay: 5
|
||||
## Number of regions to update per tick (there are 20 ticks in a second)
|
||||
regionsPerTick: 1
|
||||
## Timings for updating signs and region flags (/as updaterents or /as updatebuys)
|
||||
update:
|
||||
## Number of regions to update per tick (there are 20 ticks in a second)
|
||||
regionsPerTick: 2
|
||||
## Time between checking if any regions need to be unrented because the player was not online for the specified time period (minutes)
|
||||
## -1 means never, 1440 is one day, 43200 is one month, 525600 is one year
|
||||
inactive:
|
||||
## Time between checking if a regions needs to be unrented/sold because of inactivity by the player (minutes)
|
||||
delay: 15
|
||||
## Number of rent regions to check per tick (there are 20 ticks in a second)
|
||||
regionsPerTick: 5
|
||||
## Timings for the periodic updating of signs (for timeleft tags etc)
|
||||
signs:
|
||||
## Time between updates of all signs (seconds)
|
||||
delay: 60
|
||||
## Number of regions to update signs for per tick (there are 20 ticks in a second)
|
||||
regionsPerTick: 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ default.yml file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
|
||||
# ║ All settings below are default settings and can be overridden by group settings or individual region settings ║
|
||||
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
|
||||
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ GENERAL: Options for all regions │
|
||||
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
general:
|
||||
## Set this to true to enable saving/restoring for regions as specified in the profile below, which is specified in the config
|
||||
enableRestore: false
|
||||
## The schematic profile as specified in the config
|
||||
schematicProfile: 'default'
|
||||
## The event commands profile as specified in the config
|
||||
eventCommandProfile: 'default'
|
||||
## The profile for the format of the sign as specified in the config
|
||||
signProfile: 'default'
|
||||
## The profile for the WorldGuard flags as specified in the config
|
||||
flagProfile: 'default'
|
||||
## The y location within the region to start searching for safe teleport spots (x and z will be in the middle of the region)
|
||||
## Possible values: bottom, middle, top
|
||||
teleportLocationY: bottom
|
||||
## If true the teleportation algorithm only allows telportation to inside the region, otherwise it will expand algorithm
|
||||
## a cube from the starting point to check for safe spots (then it could end outside the region)
|
||||
## If you set a teleport location outside of the region with /as settp then setting this to true breaks that teleport (players cannot use it)
|
||||
teleportIntoRegion: true
|
||||
## Same as above, but then for when you teleport to the sign of a region instead of the region itself
|
||||
teleportToSignIntoRegion: false
|
||||
## Restricts the /as buy and /as rent commands to the world of the region
|
||||
## Usefull if you have diffrent economies for different worlds
|
||||
restrictedToWorld: false
|
||||
## Restricts the /as buy and /as rent commands to the region itself (player needs to be inside)
|
||||
restrictedToRegion: false
|
||||
|
||||
|
||||
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ RENT: Options for rent regions │
|
||||
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
rent:
|
||||
## The default price of a renting region
|
||||
price: 1000
|
||||
## The default duration of a renting region, you can find all time indicators in config.yml below the RENTING header
|
||||
duration: '1 day'
|
||||
## The percentage of the renting price you get back if you unrent the region (price of time left will be multiplied by this/100)
|
||||
moneyBack: 100
|
||||
## Maximum number of extends a player can do (-1 for infinite, 0 for no extending)
|
||||
maxExtends: -1
|
||||
## The Maximum time they can have the region rented in advance (minutes, -1 for infinite)
|
||||
## If you set this lower then the rent duration then players will not be able to rent the region
|
||||
## (because it always exceeds the maxRentTime in that case)
|
||||
maxRentTime: -1
|
||||
## Automatically unrent the region after the specified number of minutes between the last login time of the renter and the current time
|
||||
## -1 means never, 1440 is one day, 43200 is one month, 525600 is one year
|
||||
inactiveTimeUntilUnrent: -1
|
||||
## If a region of a player has less then this time left when he joins the server he will get a warning
|
||||
## You can find all time indicators in config.yml below the RENTING header, change to '' to disable
|
||||
warningOnLoginTime: '1 day'
|
||||
## The profile for the expiration warnings as specified in the config
|
||||
expirationWarningProfile: 'default'
|
||||
|
||||
|
||||
# ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ BUY: Options for buy regions │
|
||||
# └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
buy:
|
||||
## The default price of a buying region
|
||||
price: 1000
|
||||
## The percentage of the buying price you get back if you sell the region
|
||||
moneyBack: 100
|
||||
## Automatically sell the region after the specified number of minutes between the last login time of the buyer and the current time
|
||||
## -1 mean never, 1440 is one day, 43200 is one month, 525600 is one year
|
||||
inactiveTimeUntilSell: -1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+349
@@ -0,0 +1,349 @@
|
||||
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
|
||||
# ║ Language: German, Version: V2.1.2, Percentage translated: 100%, author(s): Androkai, Baummann ║
|
||||
# ║ 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%')"
|
||||
cmd-notValid: "Der Befehl ist ungültig, nutze '/as help' für weitere Informationen"
|
||||
cmd-onlyByPlayer: "Dieser Befehl kann nur von einem Spieler ausgeführt werden"
|
||||
cmd-weOnlyByPlayer: "Eine WorldEdit-Selektion kann nur von einem Spieler gewählt werden, gib die Region als extra Argument an"
|
||||
cmd-noSelection: "Du hast mit WorldEdit Nichts markiert"
|
||||
cmd-noRegionsFound: "In deiner Selektion wurden keine mit AreaShop registrierten Regionen gefunden"
|
||||
cmd-noWERegionsFound: "Es wurden keine WorldEdit-Regionen gefunden, die sich mit deiner Selektion überschneiden"
|
||||
cmd-notRegistered: "%0% ist nicht in AreaShop eingetragen"
|
||||
cmd-noRegionsAtLocation: "Keine Regionen an deiner Stelle gefunden, gib die Region als Argument an"
|
||||
cmd-moreRegionsAtLocation: "Mehr als eine Region wurde an deiner Position gefunden, gib die Region als Argument an"
|
||||
cmd-automaticRegionOnlyByPlayer: "Automatische Auswahl einer Region ist nur für Spieler möglich, gibt die Region als Argument an"
|
||||
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-updaterents: "&6/as updaterents &7-&r Aktualisiere alle Mietschilder und -regionen"
|
||||
help-updatebuys: "&6/as updatebuys &7-&r Aktualisiere alle Verkaufsschilder und Regionen"
|
||||
help-reload: "&6/as reload &7-&r Lädt die Konfigurations- und Sprachdateien neu."
|
||||
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"
|
||||
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-payError: "Die Bezahlung hat nicht funktioniert. Bitte versuche es später noch einmal"
|
||||
rent-rented: "Du hast %0% von %1% gemietet"
|
||||
rent-extended: "Du hast die Miete verlängert von %0% bis %1%"
|
||||
rent-extend: "Du kannst die Miete verlängern, indem du mit rechts noch einmal auf das Schild klickst oder den Befehl /as rent nutzt"
|
||||
rent-lowMoneyExtend: "Du hast nicht genug Geld, um die Miete zu verlängern (Du hast %0%, benötigst aber %1%)"
|
||||
rent-lowMoneyRent: "Du hast nicht genug Geld, um diese Region zu mieten (Du hast %0%, benötigst aber %1%)"
|
||||
rent-someoneElse: "Diese Region ist bereits vermietet"
|
||||
rent-notRentable: "Diese Region ist nicht mietbar"
|
||||
rent-maxExtends: "Du kannst die Miete nicht verlängern (Die Miete ist maximal %0% mal verlängerbar), du kannst die Region allerdings neu mieten, sobald sie wieder zu vermieten ist"
|
||||
rent-maxRentTime: "Du kannst die Mietdauer dieser Region nicht erneut verlängern. Die maximale Zeit beträgt %0% Minuten und du hast sie bereits für %1% Minuten gemietet"
|
||||
rent-restrictedToWorld: "Du musst dich in der '%0%' Welt befinden, um diese Region mieten zu können (Du bist in '%1%')"
|
||||
rent-restrictedToRegion: "Du musst innerhalb von '%0%' sein, um es zu mieten"
|
||||
rent-expireWarning: "Deine Region %region% hat %timeleft% übrig. Gehe sicher, dass du es rechtzeitig verlängerst, wenn du sie behalten willst"
|
||||
buy-help: "/as buy [Region], Wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest"
|
||||
buy-noPermission: "Du bist nicht berechtigt, eine Region zu kaufen"
|
||||
buy-notBuyable: "Diese Region steht nicht zum Verkauf bereit"
|
||||
buy-maximum: "Du kannst nicht mehr als %0% Region(en) erwerben (Du hast bereits %1% in Gruppe '%2%')"
|
||||
buy-payError: "Die Bezahlung hat nicht funktioniert. Bitte versuche es später noch einmal"
|
||||
buy-succes: "Du hast %0% erfolgreich gekauft"
|
||||
buy-successResale: "Du hast %0% erfolgreich von %1% gekauft"
|
||||
buy-successSeller: "Deine Region %0% wurde an %1% für %2% verkauft"
|
||||
buy-lowMoney: "Du hast nicht genug Geld, um diese Region zu kaufen. (Du hast %0% benötigst aber %1%)"
|
||||
buy-yours: "Du besitzt diese Region bereits"
|
||||
buy-someoneElse: "Jemand anderes hat diese Region bereits gekauft"
|
||||
buy-restrictedToWorld: "Du musst in der Welt '%0%' sein, um diese Region kaufen zu können (Du befindest dich in '%1%')"
|
||||
buy-restrictedToRegion: "Du musst innerhalb von '%0%' sein, um es zu kaufen."
|
||||
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: "Ein Mietvertrag kann hier nicht gekündigt werden, da diese Region gar nicht mietbar ist"
|
||||
unrent-notRented: "Ein Mietvertrag kann hier nicht gekündigt werden, da diese Region noch gar nicht vermietet ist"
|
||||
unrent-unrented: "Der Mietvertrag wurde gekündigt"
|
||||
unrent-other: "Der Mietvertrag dieser Region wurde von %0% gekündigt"
|
||||
unrent-expired: "Dein Mietvertrag von %0% ist abgelaufen"
|
||||
sell-help: "/as sell [Region], Wenn kein Regionsname angegeben wird, wird die Region genutzt, in der du dich gerade befindest"
|
||||
sell-notRegistered: "Diese Region kann nicht verkauft werden, da sie momentan nicht zum Verkauf zur Verfügung steht"
|
||||
sell-notBought: "Diese Region kann nicht verkauft werden, da sie bisher niemandem gehört"
|
||||
sell-sold: "Diese Region wurde verkauft an %0%"
|
||||
sell-soldYours: "Region erfolgreich verkauft"
|
||||
sell-noPermission: "Du bist nicht berechtigt, diese Region zu verkaufen"
|
||||
sell-noPermissionOther: "Du bist nicht berechtigt, eine Region zu verkaufen"
|
||||
rents-updated: "Alle Verkaufs- und Mietschilder aktualisiert"
|
||||
rents-noPermission: "Du bist nicht berechtigt, alle Verkaufs- und Mietschilder zu aktualisieren"
|
||||
rents-notUpdated: "Es sind nicht alle Schilder aktualisiert worden, Wiederholen kann das Problem beheben"
|
||||
buys-updated: "Alle Schilder der kaufbaren Regionen aktualisiert"
|
||||
buys-noPermission: "Du bist nicht berechtigt, alle Verkaufsschilder und Regionen zu aktualisieren"
|
||||
buys-notUpdated: "Es sind nicht alle Schilder aktualisiert worden, Wiederholen kann das Problem beheben"
|
||||
reload-reloaded: "Konfiguration erfolgreich neu geladen"
|
||||
reload-noPermission: "Du bist nicht berechtigt, die Konfiguration neu zu laden"
|
||||
info-help: "/as info <all|rented|forrent|sold|forsale|player|region>"
|
||||
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: "Verkaufte Regionen: &7%0%"
|
||||
info-all-noBuys: "Es gibt momentan keine verkauften Regionen"
|
||||
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-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-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-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 Um diese Region zu mieten, musst du dich in ihr befinden."
|
||||
info-regionRestrictedWorldRent: "&2&l►&r Um diese Region zu mieten, musst du dich in der Welt '%world%' befinden."
|
||||
info-regionRestrictedRegionBuy: "&2&l►&r Um diese Region zu kaufen, musst du dich in ihr befinden."
|
||||
info-regionRestrictedWorldBuy: "&2&l►&r Um diese Region zu kaufen, musst du dich in der Welt '%world%' befinden."
|
||||
info-regionRestoringRent: "&2&l►&r Die Wiederherstellung ist aktiviert. &7(Region wird bei Mietkündigung zurückgesetzt)%0%"
|
||||
info-regionRestoringBuy: "&2&l►&r Die Wiederherstellung ist aktiviert. &7(Region wird beim Verkauf zurückgesetzt)%0%"
|
||||
info-regionRestoringProfile: " (Profil: %0%)"
|
||||
info-regionNoSign: "Für diese Region gibt es bisher kein Schild"
|
||||
info-regionPriceDuration: "Preis: &7%0% pro %1%"
|
||||
info-regionPrice: "Preis: &7%0%"
|
||||
info-regionRestore: "Wiederherstellung aktiviert: &7%0%"
|
||||
info-regionRestoreProfile: "Wiederherstellungs-Profil: &7%0%"
|
||||
info-regionTPLocation: "Teleport-Adresse: &7Welt=%0%, X=%1%, Y=%2%, Z=%3%, Pitch=%4%, Yaw=%5%"
|
||||
info-regionNoTP: "Keine Teleport-Adressen vorhanden"
|
||||
info-regionNotExisting: "Region %0% ist nicht eingetragen"
|
||||
setrestore-help: "/as setrestore <Region> <true|false|general> [Profil]"
|
||||
setrestore-noPermission: "Du bist nicht berechtigt, die Wiederherstellungs-Einstellungen zu verändern"
|
||||
setrestore-notRegistered: "%0% ist nicht eingetragen"
|
||||
setrestore-invalidSetting: "'%0%' ist kein gültiger Status, kann true sein, false oder general"
|
||||
setrestore-success: "Wiederherstellungs-Einstellungen erfolgreich von %0% zu '%1%' geändert."
|
||||
setrestore-successProfile: "Wiederherstellungs-Einstellung erfolgreich von %0% zu '%1%' und das Profil zu '%2%' 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: "%0% ist nicht in AreaShop eingetragen"
|
||||
setprice-wrongPrice: "'%0%' ist kein gültiger Preis"
|
||||
setprice-successRent: "Preis der Region %0% geändert auf %1% von %2%"
|
||||
setprice-successBuy: "Preis der Region %0% geändert auf %1%"
|
||||
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% wird nicht vermietet"
|
||||
setduration-wrongAmount: "'%0%' ist keine gültige Anzahl, gib eine ganze Zahl an"
|
||||
setduration-wrongFormat: "'%0%' ist kein gültiges Zeitformat, schau in der Doku auf Bukkit nach"
|
||||
setduration-success: "Dauer von Region %0% geändert zu '%1%'"
|
||||
setup-noRegion: "Du hast in der zweiten Zeile keine Region angegeben"
|
||||
setup-wrongRegion: "Die angegebene Region existiert nicht"
|
||||
setup-alreadyRentSign: "Die angegebene Region hat bereits ein Miet-Schild"
|
||||
setup-alreadyBuySign: "Die angegebene Region hat bereits ein Kauf-Schild"
|
||||
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 bist nicht berechtigt, Regionen zu vermieten"
|
||||
setup-noPermissionBuy: "Du bist nicht berechtigt, Regionen zu kaufen"
|
||||
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%)"
|
||||
destroy-noPermissionRent: "Du bist nicht berechtigt, ein Mietschild zu zerstören"
|
||||
destroy-noPermissionBuy: "Du bist nicht berechtigt ein Verkaufsschild zu zerstören"
|
||||
destroy-successRent: "Miet-Status von %0% erfolgreich entfernt"
|
||||
destroy-successBuy: "Verkauf-Status von %0% erfolgreich entfernt"
|
||||
teleport-help: "/as tp <Region> [Schild]"
|
||||
teleport-noRentOrBuy: "Region '%0%' steht momentan nicht zum Verkauf oder zur Vermietung zur Verfügung"
|
||||
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 %0% teleportiert"
|
||||
teleport-successSign: "Du wurdest zu %0% teleportiert"
|
||||
teleport-noSafe: "Keine sichere Position in %0% gefunden, kein Boden vorhanden oder maximale Anzahl an Versuchen erreicht (%1%/%2%)"
|
||||
teleport-blocked: "Du kannst dich nicht teleportieren, weil sich die Position außerhalb der Region befindet und erzwungen wird, dass du dich nur zu welchen innerhalb teleportieren kannst"
|
||||
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: "Region '%0%' steht momentan nicht zum Verkauf oder zur Vermietung zur Verfügung"
|
||||
setteleport-success: "Teleport-Punkt von %0% erfolgreich gesetzt"
|
||||
setteleport-notInside: "Der Teleportpunkt muss sich innerhalb einer Region befinden"
|
||||
setteleport-reset: "Teleport-Punkt von %0% 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: %1%, bei Suche nach max. Preis in Höhe deines Guthabens: %2%%3%"
|
||||
find-successMax: "%0% Region gefunden: %1%, bei Suche nach max. Preis in Höhe von %2%%3%"
|
||||
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 %0% wurde zu Gruppe '%1%' hinzugefügt, diese Gruppe hat nun %2% Mitglied(er)"
|
||||
groupadd-failed: "Region %0% 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 %0% ist aus Gruppe '%1%' entfernt worden. Diese Gruppe hat nun %2% Mitglied(er)"
|
||||
groupdel-failed: "Region %0% gehört nicht zur Gruppe '%1%'"
|
||||
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 %1% 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-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"
|
||||
del-noRegion: "Region '%0%' ist nicht in AreaShop eingetragen"
|
||||
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%' nicht gefunden"
|
||||
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: "Schild zu %0% erfolgreich hinzugefügt"
|
||||
addsign-successProfile: "Schild erfolgreich zu %0% mit Profil %1% hinzugefügt"
|
||||
addsign-alreadyRegistered: "Dieses Schild gehört zur Region %0%"
|
||||
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: "Schild von Region %0% erfolgreich 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: "%0% ist nicht für AreaShop registriert worden"
|
||||
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: "%0% ist nicht in AreaShop eingetragen"
|
||||
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 zu Region %1% 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"
|
||||
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 %1% 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"
|
||||
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"
|
||||
@@ -1,14 +1,14 @@
|
||||
###################################################
|
||||
# English language file for the AreaShop plugin #
|
||||
# Latest update: V2.0.2 #
|
||||
###################################################
|
||||
# Copy this file and change the strings to your #
|
||||
# favor. Then change the 'language' setting in #
|
||||
# the config to the filename (excluding .yml) #
|
||||
###################################################
|
||||
|
||||
########## General strings
|
||||
total-maximum: "You can't rent and buy more than %0% region(s) in total"
|
||||
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
|
||||
# ║ Language: English, Version: V2.1.2, Percentage translated: 100% (source), author(s): 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) ║
|
||||
# ║ 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: "You can't rent and buy more than %0% region(s) in total (you already have %1% in group '%2%')"
|
||||
|
||||
cmd-notValid: "That command is not valid, use '/as help' for info"
|
||||
cmd-onlyByPlayer: "This command can only be run by a player"
|
||||
@@ -16,8 +16,11 @@ 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: "%0% is not registered in AreaShop"
|
||||
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 command strings
|
||||
help-header: "Help page, commands that you can execute"
|
||||
help-alias: "Command aliases: /areashop, /as"
|
||||
help-help: "&6/as help &7-&r Shows this help page"
|
||||
@@ -31,9 +34,9 @@ help-sellOwn: "&6/as sell &7-&r Sell your own region"
|
||||
help-updaterents: "&6/as updaterents &7-&r Update all rent signs and regions"
|
||||
help-updatebuys: "&6/as updatebuys &7-&r Update all buy signs and regions"
|
||||
help-reload: "&6/as reload &7-&r Reload the config and languages"
|
||||
help-setrestore: "&6/as setrestore &7-&r Set the profile for restoring and on/off "
|
||||
help-setprice: "&6/as setprice &7-&r Change the price of a rent region"
|
||||
help-rentduration: "&6/as rentduration &7-&r Change the duration of a rent region"
|
||||
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"
|
||||
@@ -48,11 +51,20 @@ 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"
|
||||
|
||||
############ Other command strings
|
||||
rent-help: "/as rent [regionname], the region you stand in will be used if not specified"
|
||||
rent-noPermission: "You don't have permission to rent a region"
|
||||
rent-maximum: "You can't rent more than %0% region(s)"
|
||||
rent-maximum: "You can't rent more than %0% region(s) (you already have %1% in group '%2%')"
|
||||
rent-payError: "Something went wrong with paying, try again later"
|
||||
rent-rented: "You rented %0% until %1%"
|
||||
rent-extended: "You extended your rent of %0% until %1%"
|
||||
@@ -62,16 +74,24 @@ rent-lowMoneyRent: "You don't have enough money to rent this region (you have %0
|
||||
rent-someoneElse: "Someone else already rented this region"
|
||||
rent-notRentable: "That region is not available for renting"
|
||||
rent-maxExtends: "You cannot extend this rent anymore (the maximum is %0% 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 %0% minutes and you have currently rented it for %1% minutes"
|
||||
rent-restrictedToWorld: "You need to be in the '%0%' world to rent this region (you are in '%1%')"
|
||||
rent-restrictedToRegion: "You need to be inside '%0%' to rent it"
|
||||
rent-expireWarning: "Your region %region% has %timeleft% left, be sure to extend it if you want to keep it"
|
||||
|
||||
buy-help: "/as buy [regionname], the region you stand in will be used if not specified"
|
||||
buy-noPermission: "You don't have permission to buy a region"
|
||||
buy-notBuyable: "That region is not available for buying"
|
||||
buy-maximum: "You can't buy more than %0% region(s)"
|
||||
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 succesfully bought %0%"
|
||||
buy-succes: "You successfully bought %0%"
|
||||
buy-successResale: "You successfully bought %0% from %1%"
|
||||
buy-successSeller: "Your region %0% has been sold to %1% for %2%"
|
||||
buy-lowMoney: "You don't have enough money to buy this region (you have %0% and you need %1%)"
|
||||
buy-yours: "You already own this region"
|
||||
buy-someoneElse: "Someone else already bought this region"
|
||||
buy-restrictedToWorld: "You need to be in the '%0%' world to buy this region (you are in '%1%')"
|
||||
buy-restrictedToRegion: "You need to be inside '%0%' to buy it"
|
||||
|
||||
unrent-help: "/as unrent [regionname], the region you stand in will be used if not specified"
|
||||
unrent-noPermission: "You don't have permission to unrent a region"
|
||||
@@ -91,17 +111,18 @@ sell-noPermission: "You don't have permission to sell a region"
|
||||
sell-noPermissionOther: "You don't have permission to sell another region"
|
||||
|
||||
rents-updated: "All signs and regions for renting have been updated"
|
||||
rents-notUpdated: "Not all signs have been updated, maybe reload fixes it"
|
||||
rents-noPermission: "You don't have permission to update all rent signs and regions"
|
||||
rents-notUpdated: "Not all signs have been updated, maybe reload fixes it"
|
||||
|
||||
buys-updated: "All signs and regions for selling have been updated"
|
||||
buys-notUpdated: "Not all signs have been updated, maybe reload fixes it"
|
||||
buys-noPermission: "You don't have permission to update all buy signs and regions"
|
||||
buys-notUpdated: "Not all signs have been updated, maybe reload fixes it"
|
||||
|
||||
reload-reloaded: "The config has been reloaded successfully"
|
||||
reload-noPermission: "You don't have permission to reload the config"
|
||||
|
||||
info-help: "/as info <all|rented|forrent|sold|forsale|player|region>"
|
||||
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%"
|
||||
@@ -120,16 +141,38 @@ 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-regionHelp: "/as info region [name], the region you stand in will be used if not specified"
|
||||
info-regionNoRenting: "%0% is not registered for renting"
|
||||
info-regionRenting: "&6Renting details for %0%:"
|
||||
info-regionRentedBy: "Rented by: &7%0% until %1%"
|
||||
info-regionNotRented: "Currently not rented"
|
||||
info-regionBuying: "&6Buying details for %0%:"
|
||||
info-regionNoBuying: "%0% is not registered for buying"
|
||||
info-regionNotBought: "Currently not sold"
|
||||
info-regionBoughtBy: "Bought by: &7%0%"
|
||||
info-regionSign: "Sign location(s): %0%"
|
||||
info-regionHeaderRent: "&2Information about %region%:"
|
||||
info-regionHeaderBuy: "&2Information about %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-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-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 extends: &7%maxextends% time(s)"
|
||||
info-regionNoExtending: "&2&l►&r Rent cannot be extended"
|
||||
info-regionExtendsLeft: "&2&l►&r Extending 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 To rent this region you need to be inside it"
|
||||
info-regionRestrictedWorldRent: "&2&l►&r To rent this region you need to be inside world '%world%'"
|
||||
info-regionRestrictedRegionBuy: "&2&l►&r To buy this region you need to be inside it"
|
||||
info-regionRestrictedWorldBuy: "&2&l►&r To buy this region you need to be inside world '%world%'"
|
||||
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-regionRestoringProfile: " (profile: %0%)"
|
||||
|
||||
info-regionNoSign: "There is no sign registered for this region"
|
||||
info-regionPriceDuration: "Price: &7%0% for each %1%"
|
||||
info-regionPrice: "Price: &7%0%"
|
||||
@@ -143,8 +186,8 @@ setrestore-help: "/as setrestore <region> <true|false|general> [profile]"
|
||||
setrestore-noPermission: "You don't have permission to change the restore settings"
|
||||
setrestore-notRegistered: "%0% is not registered"
|
||||
setrestore-invalidSetting: "'%0%' is not a valid state, should be true, false or general"
|
||||
setrestore-success: "Succesfully set the restore setting of %0% to '%1%'"
|
||||
setrestore-successProfile: "Succesfully set the restore setting of %0% to '%1%' and the profile to '%2%'"
|
||||
setrestore-success: "Successfully set the restore setting of %0% to '%1%'"
|
||||
setrestore-successProfile: "Successfully set the restore setting of %0% to '%1%' and the profile to '%2%'"
|
||||
|
||||
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"
|
||||
@@ -153,12 +196,12 @@ setprice-wrongPrice: "'%0%' is not a valid price"
|
||||
setprice-successRent: "Price of region %0% changed to %1% per %2%"
|
||||
setprice-successBuy: "Price of region %0% changed to %1%"
|
||||
|
||||
rentduration-noPermission: "You don't have permission to change the duration of a rent"
|
||||
rentduration-help: "/as rentduration <amount> <identifier> [region], the region you stand in will be used if not specified"
|
||||
rentduration-notRegistered: "%0% is not registered as a rent"
|
||||
rentduration-wrongAmount: "'%0%' is not a valid amount, use a whole number"
|
||||
rentduration-wrongFormat: "'%0%' is not a proper timeformat, check the documentation on Bukkit"
|
||||
rentduration-success: "Duration of region %0% changed to '%1%'"
|
||||
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 as a rent"
|
||||
setduration-wrongAmount: "'%0%' is not a valid amount, use a whole number"
|
||||
setduration-wrongFormat: "'%0%' is not a proper timeformat, check the documentation on Bukkit"
|
||||
setduration-success: "Duration of region %0% changed to '%1%'"
|
||||
|
||||
setup-noRegion: "You did not specify a region on the second line"
|
||||
setup-wrongRegion: "The region you specified does not exist"
|
||||
@@ -181,26 +224,34 @@ destroy-successBuy: "Buying of %0% successfully removed"
|
||||
|
||||
teleport-help: "/as tp <region> [sign]"
|
||||
teleport-noRentOrBuy: "Region '%0%' is not registered as rent or buy"
|
||||
teleport-noPermission: "You don't have permission to teleport to a region"
|
||||
teleport-noPermissionOther: "You don't have permission to teleport to region you do not own"
|
||||
teleport-noPermission: "You don't have permission to teleport to your region"
|
||||
teleport-noPermissionOther: "You don't have permission to teleport to regions you do not own"
|
||||
teleport-noPermissionSign: "You don't have permission to teleport to the sign of your region"
|
||||
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 as friend"
|
||||
teleport-noPermissionFriendSign: "You don't have permission to teleport to the sign of region you are added as friend"
|
||||
teleport-success: "You teleported to %0%"
|
||||
teleport-successSign: "You teleported to the sign of %0%"
|
||||
teleport-noSafe: "No safe position found in region %0%, no spots in region left or maximum tries exceeded (%1%/%2%)"
|
||||
teleport-blocked: "You can't teleport because the position is outside the region and you are forced to teleport inside"
|
||||
|
||||
setteleport-help: "/as settp [region] [reset], the region you stand in will be used if not specified"
|
||||
setteleport-noPermission: "You don't have permission to set the teleport location"
|
||||
setteleport-noPermissionAll: "You don't have permission to set the teleport location for a region you do not own"
|
||||
setteleport-noPermissionOther: "You don't have permission to set the teleport location for a region you do not own"
|
||||
setteleport-noRentOrBuy: "Region '%0%' is not registered as rent or buy"
|
||||
setteleport-success: "Teleport location of %0% set"
|
||||
setteleport-notInside: "The location has to be inside the region"
|
||||
setteleport-reset: "Teleport location of %0% has been reset"
|
||||
|
||||
find-help: "/as find <buy|rent> [maxprice]"
|
||||
find-noPermission: "You don't have permission to teleport to signs, so you can't use find"
|
||||
find-success: "Found a %0% region: %1%, while searching with a max price of your balance: %2%"
|
||||
find-successMax: "Found a %0% region: %1%, while searching with a max price of %2%"
|
||||
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: %1%, while searching with a max price of your balance: %2%%3%"
|
||||
find-successMax: "Found a %0% region: %1%, while searching with a max price of %2%%3%"
|
||||
find-wrongMaxPrice: "The specified maximum price is not a correct number: %0%"
|
||||
find-noneFound: "No %0% region found while searching with a max price of your balance: %1%"
|
||||
find-noneFoundMax: "No %0% region found while searching with a max price of %1%"
|
||||
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%"
|
||||
find-noneFoundMax: "No %0% region found while searching with a max price of %1%%2%"
|
||||
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"
|
||||
@@ -231,7 +282,7 @@ 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 succesfully been triggered for region %1%"
|
||||
schemevent-success: "Event '%0%' has successfully been triggered for region %1%"
|
||||
schemevent-noPermission: "You don't have permission to trigger schematic events"
|
||||
|
||||
add-help: "/as add <rent|buy> [region] [world]"
|
||||
@@ -264,12 +315,75 @@ delsign-noPermission: "You don't have permission to delete a sign"
|
||||
delsign-noRegion: "That sign does not belong to an AreaShop region"
|
||||
delsign-success: "The sign has been removed from region %0%"
|
||||
|
||||
me-noPermission: "You don't have permission to check which regions you have"
|
||||
me-notAPlayer: "You are not a player so you can't have any regions"
|
||||
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 regions as friend"
|
||||
me-friendRegions: "You are added as friend to the following regions:"
|
||||
me-friendLine: "&2&l►&r %region% &7(owner: %player%)"
|
||||
|
||||
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"
|
||||
setowner-noPermissionRent: "You don't have permission to set the owner of rent regions"
|
||||
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%"
|
||||
|
||||
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: "%0% is not registered in AreaShop"
|
||||
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-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: "%0% is not registered in AreaShop"
|
||||
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-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 %1%"
|
||||
addfriend-success: "%0% has been added as friend to your region %1%"
|
||||
addfriend-alreadyAdded: "%0% is already added as friend for this region"
|
||||
addfriend-self: "Adding the owner of the region as friend would be pointless"
|
||||
addfriend-noOwner: "You cannot add friends to a region without owner"
|
||||
|
||||
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 %1%"
|
||||
delfriend-success: "%0% has been deleted as friend from your region %1%"
|
||||
delfriend-notAdded: "%0% is not added as friend for this region"
|
||||
delfriend-noOwner: "You cannot remove friends from a region without owner"
|
||||
|
||||
timeleft-years: "%0% years"
|
||||
timeleft-months: "%0% months"
|
||||
timeleft-days: "%0% days"
|
||||
timeleft-hours: "%0% hours"
|
||||
timeleft-minutes: "%0% minutes"
|
||||
timeleft-second: "%0% second"
|
||||
timeleft-seconds: "%0% seconds"
|
||||
timeleft-ended: "Expired"
|
||||
|
||||
greeting-forrent: "%region% can be rented for %price% per %duration%"
|
||||
greeting-rented: "%region% is rented by %player% until %until%"
|
||||
greeting-forsale: "%region% can be bought for %price%"
|
||||
greeting-bought: "%region% is bought by %player%"
|
||||
greeting-resale: "%region% can be bought for %resaleprice% from %player%"
|
||||
|
||||
|
||||
update-playerNotify: "&2Update from AreaShop V%0% to %1% available, get the latest version at http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/"
|
||||
+349
@@ -0,0 +1,349 @@
|
||||
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
|
||||
# ║ Language: French (Français), Version: V2.1.2, Percentage translated: 100%, author(s): BlaZingHope, Yaelknown, Dydy69 ║
|
||||
# ║ 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%')."
|
||||
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: "'%0%' n'est pas enregistrée dans AreaShop."
|
||||
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-updaterents: "&6/as updaterents &7-&r Mettre à jour toutes les pancartes et les régions louées."
|
||||
help-updatebuys: "&6/as updatebuys &7-&r Mettre à jour toutes les pancartes et les régions achetées."
|
||||
help-reload: "&6/as reload &7-&r Recharge les configurations et langages."
|
||||
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."
|
||||
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-rented: "Vous avez loué de %0% jusqu'à %1%."
|
||||
rent-extended: "Vous avez prolongé la location de %0% jusqu'à %1%."
|
||||
rent-extend: "Vous pouvez prolonger votre location avec un clic droit sur la pancarte, ou en utilisant /as rent."
|
||||
rent-lowMoneyExtend: "Vous n'avez pas assez d'argent pour prolonger la location (vous possédez %0% et devez payer %1%)."
|
||||
rent-lowMoneyRent: "Vous n'avez pas assez d'argent pour louer cette région (vous possédez %0% et devez payer %1%)."
|
||||
rent-someoneElse: "Quelqu'un d'autre loue déjà cette région."
|
||||
rent-notRentable: "Cette région n'est pas disponible à la location."
|
||||
rent-maxExtends: "Vous ne pouvez plus prolonger cette location (le maximum est de %0% fois). Mais lorsque la location sera terminée, vous pourrez de nouveau louer cette région."
|
||||
rent-maxRentTime: "Vous ne pouvez pas louer plus longtemps à l'avance, le maximum est de %0% minutes et vous avez déjà loué pour %1% minutes."
|
||||
rent-restrictedToWorld: "Vous devez être dans le monde '%0%' pour louer cette région (vous êtes dans '%1%')."
|
||||
rent-restrictedToRegion: "Vous devez être dans la région '%0%' pour la louer."
|
||||
rent-expireWarning: "Votre région '%region%' n'a plus que %timeleft% de temps de location, soyez sûr d'allonger ce temps de location si vous voulez la conserver."
|
||||
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-notBuyable: "Cette région n'est pas disponible à l'achat."
|
||||
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-succes: "Vous venez d'acheter la région '%0%'."
|
||||
buy-successResale: "Vous venez d'acheter '%0%' à %1%."
|
||||
buy-successSeller: "Votre région '%0%' a été vendue pour %1% à %2%."
|
||||
buy-lowMoney: "Vous n'avez pas assez d'argent pour acheter cette région (vous possédez %0% et devez payer %1%)."
|
||||
buy-yours: "Vous avez déjà acheté cette région."
|
||||
buy-someoneElse: "Quelqu'un a déjà acheté cette région."
|
||||
buy-restrictedToWorld: "Vous devez être dans le monde '%0%' pour acheter cette région (vous êtes dans '%1%')."
|
||||
buy-restrictedToRegion: "Vous devez être dans '%0%' pour l'acheter."
|
||||
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 être dé-louée car elle n'est pas enregistrée en tant que location."
|
||||
unrent-notRented: "La région ne peut pas être dé-louée car elle n'est pas louée."
|
||||
unrent-unrented: "Votre région a été dé-louée."
|
||||
unrent-other: "La région du joueur %0% a été dé-louée."
|
||||
unrent-expired: "Votre location de '%0%' a expiré."
|
||||
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 elle n'est pas enregistrée comme achetée."
|
||||
sell-notBought: "La région ne peut pas être vendue car elle n'est pas la propriété de quelqu'un."
|
||||
sell-sold: "Cette région a été vendue au joueur %0%."
|
||||
sell-soldYours: "Votre région a été vendue."
|
||||
sell-noPermission: "Vous n'avez pas la permission de vendre une région."
|
||||
sell-noPermissionOther: "Vous n'avez pas la permission de vendre une autre région."
|
||||
rents-updated: "Tout les panneaux et régions en location ont été mis à jour."
|
||||
rents-noPermission: "Vous n'avez pas la permission de mettre à jour les panneaux et régions en location."
|
||||
rents-notUpdated: "Tout les panneaux n'ont pas été mis à jour. Recharger le serveur peut corriger le problème."
|
||||
buys-updated: "Tous les panneaux et régions en vente ont été mis à jour."
|
||||
buys-noPermission: "Vous n'avez pas la permission de mettre à jour les panneaux et régions en vente."
|
||||
buys-notUpdated: "Tous les panneaux n'ont pas été mis à jour. Recharger le serveur peut corriger le problème."
|
||||
reload-reloaded: "La configuration a bien été rechargée."
|
||||
reload-noPermission: "Vous n'avez pas la permission de recharger la configuration."
|
||||
info-help: "/as info <all|rented|forrent|sold|forsale|player|region>"
|
||||
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-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-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-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 Allongement maximum : &7%maxextends% fois"
|
||||
info-regionNoExtending: "&2&l►&r La location ne peut être allongée."
|
||||
info-regionExtendsLeft: "&2&l►&r Allongements restants : &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 Pour louer cette région, vous devez être à l'intérieur."
|
||||
info-regionRestrictedWorldRent: "&2&l►&r Pour louer cette région, vous devez être dans le monde '%world%'."
|
||||
info-regionRestrictedRegionBuy: "&2&l►&r Pour acheter cette région, vous devez être à l'intérieur de cellle-ci."
|
||||
info-regionRestrictedWorldBuy: "&2&l►&r Pour acheter cette région, vous devez être dans le monde '%world%'."
|
||||
info-regionRestoringRent: "&2&l►&r La restauration est activée &7(la région sera remise à zéro a la fin de la location)%0%"
|
||||
info-regionRestoringBuy: "&2&l►&r La restauration est activée &7(la région sera remise à zéro a la fin de la location)%0%"
|
||||
info-regionRestoringProfile: "(Profil : %0%)"
|
||||
info-regionNoSign: "Il n'y a pas de panneau enregistré pour cette région."
|
||||
info-regionPriceDuration: "Prix : &7%0% pour chaque %1%"
|
||||
info-regionPrice: "Prix : &7%0%"
|
||||
info-regionRestore: "Restauration activée : &7%0%"
|
||||
info-regionRestoreProfile: "Profil de restauration : &7%0%"
|
||||
info-regionTPLocation: "Lieu de téléportation : &7World=%0%, X=%1%, Y=%2%, Z=%3%, Pitch=%4%, Yaw=%5%"
|
||||
info-regionNoTP: "Aucun lieu de téléportation défini."
|
||||
info-regionNotExisting: "La région '%0%' n'est pas enregistrée."
|
||||
setrestore-help: "/as setrestore <region> <true|false|general> [profile]"
|
||||
setrestore-noPermission: "Vous n'avez pas la permission de restaurer les paramètres."
|
||||
setrestore-notRegistered: "'%0%' n'est pas enregistré."
|
||||
setrestore-invalidSetting: "'%0%' est invalide. Doit être true, false ou general."
|
||||
setrestore-success: "Paramètre de restauration défini de %0% à %1% avec succès."
|
||||
setrestore-successProfile: "Paramètre de restauration défini de %0% à %1% et le profil à '%2%' avec succès."
|
||||
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: "%0% n'est pas enregistrée dans AreaShop."
|
||||
setprice-wrongPrice: "'%0%' n'est pas un prix valide."
|
||||
setprice-successRent: "Prix de la région '%0%' changé de %1% à %2%."
|
||||
setprice-successBuy: "Prix de la région '%0%' changé à %1%."
|
||||
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 comme à 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."
|
||||
setduration-success: "Temps de location de la région '%0%' changé à '%1%'."
|
||||
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 possède déjà un panneau de location."
|
||||
setup-alreadyBuySign: "La région que vous avez spécifiée possède déjà un panneau de vente."
|
||||
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: "Vous n'avez pas indiqué un prix correct, utilisez un nombre entier."
|
||||
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 mettre en place la location de régions."
|
||||
setup-noPermissionBuy: "Vous n'avez pas la permission de mettre en place l'achat de régions."
|
||||
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%)."
|
||||
destroy-noPermissionRent: "Vous n'avez pas la permission de détruire le panneau de location d'une région."
|
||||
destroy-noPermissionBuy: "Vous n'avez pas la permission de détruire le panneau de vente d'une région."
|
||||
destroy-successRent: "Location de '%0%' supprimée."
|
||||
destroy-successBuy: "Achat de '%0%' supprimé."
|
||||
teleport-help: "/as tp <region> [sign]"
|
||||
teleport-noRentOrBuy: "La région '%0%' n'est pas enregistrée comme location ou achat."
|
||||
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 aux régions où vous êtes ajouté en ami."
|
||||
teleport-noPermissionFriendSign: "Vous n'avez pas la permission de vous téléporter à la pancarte d'une région où vous êtes ajouté en ami."
|
||||
teleport-success: "Vous avez été téléporté à '%0%'."
|
||||
teleport-successSign: "Vous vous téléportez à la pancarte de '%0%'."
|
||||
teleport-noSafe: "Aucune position sécurisée trouvée dans la région '%0%'. Pas de point restant, ou tentatives maximales dépassées (%1%/%2%)."
|
||||
teleport-blocked: "Vous ne pouvez pas vous téléporter car la position est en dehors de la région et vous êtes obligé 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 '%0%' n'est pas enregistrée comme location ou achat."
|
||||
setteleport-success: "Lieu de téléportation de '%0%' défini."
|
||||
setteleport-notInside: "Le lieu doit se trouver dans votre région."
|
||||
setteleport-reset: "Le lieu de téléportation de '%0%' a été réinitialisé."
|
||||
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-success: "Trouvé une région %0% : %1%, en recherchant avec un prix maximum de: %2%%3%."
|
||||
find-successMax: "Trouvé une région %0% : %1%, en recherchant avec un prix maximum de: %2%%3%."
|
||||
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-success: "La région '%0%' a été ajoutée au groupe '%1%'. Ce groupe a maintenant %2% membre(s)."
|
||||
groupadd-failed: "La région '%0%' est déjà membre du groupe '%1%'."
|
||||
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-success: "La région '%0%' a été supprimée du groupe '%1%', ce groupe a maintenant %2% membre(s)."
|
||||
groupdel-failed: "La région '%0%' n'est pas membre du groupe '%1%'."
|
||||
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-success: "L’événement '%0%' a été activé dans la région '%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-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: "Le région '%0%' n'est pas enregistrée à AreaShop."
|
||||
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-noRegion: "La région '%0%' n'a pas été trouvée."
|
||||
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é à %0%."
|
||||
addsign-successProfile: "Le panneau a été ajouté à %0% avec le profil %1%."
|
||||
addsign-alreadyRegistered: "Ce panneau a déjà été enregistré pour la région '%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."
|
||||
delsign-success: "Ce panneau a été supprimé de la région '%0%'."
|
||||
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 pas été ajouté en ami sur une région."
|
||||
me-friendRegions: "Vous avez été ajouté en ami dans les 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: "'%0%' n'est pas enregistrée dans AreaShop."
|
||||
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: "'%0%' n'est pas enregistrée dans AreaShop."
|
||||
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-successOther: "%0% a été ajouté en ami a la région '%1%'."
|
||||
addfriend-success: "%0% a été ajouté ajouté en ami à votre région '%1%'."
|
||||
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-successOther: "%0% a été supprimé de la liste d'amis de la région '%1%'."
|
||||
delfriend-success: "%0% a été supprimé des amis de votre région '%1%'."
|
||||
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."
|
||||
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%."
|
||||
+349
@@ -0,0 +1,349 @@
|
||||
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
|
||||
# ║ Language: Dutch (Nederlands), Version: V2.1.2, Percentage translated: 100%, author(s): 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) ║
|
||||
# ║ 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: "Je kunt niet meer dan %0% gebied(en) kopen en huren in totaal (je hebt er al %1% in groep '%2%')"
|
||||
cmd-notValid: "Dat commando is niet geldig , gebruik '/as help' voor informatie"
|
||||
cmd-onlyByPlayer: "Dit commando kan alleen door een speler uitgevoert worden"
|
||||
cmd-weOnlyByPlayer: "Gebruikmaken van een WorldEdit selectie is alleen mogelijk als speler, geef de naam van het gebied mee als extra argument"
|
||||
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: "%0% is niet geregistreerd in AreaShop"
|
||||
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-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-updaterents: "&6/as updaterents &7-&r Update alle huur borden en gebieden"
|
||||
help-updatebuys: "&6/as updatebuys &7-&r Update alle koop borden en gebieden"
|
||||
help-reload: "&6/as reload &7-&r Herlaad de config en de taalbestanden"
|
||||
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"
|
||||
rent-help: "/as rent <gebiednaam>"
|
||||
rent-noPermission: "Je hebt geen toestemming om een gebied te huren"
|
||||
rent-maximum: "Je kunt niet meer dan %0% gebied(en) huren (je hebt er al %1% in groep '%2%')"
|
||||
rent-payError: "Er is iets mis gegaan met betalen, probeer het later opnieuw"
|
||||
rent-rented: "Je hebt %0% tot %1% gehuurd"
|
||||
rent-extended: "Je hebt je huur van %0% verlengt tot %1%"
|
||||
rent-extend: "Je kunt je huur verlengen door opnieuw op het bordje te klikken of gebruik te maken van /as rent"
|
||||
rent-lowMoneyExtend: "Je hebt niet genoeg geld om de huur te verlengen (je hebt %0% van de %1%)"
|
||||
rent-lowMoneyRent: "Je hebt niet genoeg geld om het gebied te huren (je hebt %0% van de %1%)"
|
||||
rent-someoneElse: "Iemand anders heeft dit gebied al gehuurd"
|
||||
rent-notRentable: "Dat gebied is niet beschikbaar om te huren"
|
||||
rent-maxExtends: "Je kunt de huur niet meer verlengen (het maximum is %0% keer), je kunt echter wel het gebied opnieuw huren als het afgelopen is"
|
||||
rent-maxRentTime: "Je kunt dit huur gebied niet meer tijd van tevoren huren, de maximum tijd is %0% minuten en je hebt het al voor %1% minuten gehuurt"
|
||||
rent-restrictedToWorld: "Je moet in de '%0%' wereld zijn om dit gebied te huren (je bent in '%1%')"
|
||||
rent-restrictedToRegion: "Je moet in '%0%' staan om hem te huren"
|
||||
rent-expireWarning: "Je gebied %region% heeft nog %timeleft% over, verleng het als je het wilt houden."
|
||||
buy-help: "/as buy <gebiednaam>"
|
||||
buy-noPermission: "Je hebt geen toestemming om een gebied te kopen"
|
||||
buy-notBuyable: "Dat gebied is niet beschikbaar om te kopen"
|
||||
buy-maximum: "Je kunt niet meer dan %0% gebied(en) kopen (je hebt er al %1% in de groep '%2%')"
|
||||
buy-payError: "Er is iets mis gegaan met betalen, probeer het later opnieuw"
|
||||
buy-succes: "Je hebt %0% succesvol gekocht"
|
||||
buy-successResale: "Je hebt %0% succesvol gekocht van %1%"
|
||||
buy-successSeller: "Je gebied %0% is verkocht aan %1% voor %2%"
|
||||
buy-lowMoney: "Je hebt niet genoeg geld om het gebied te kopen (je hebt %0% van de %1%)"
|
||||
buy-yours: "Je hebt dit gebied al gekocht"
|
||||
buy-someoneElse: "Iemand anders heeft dit gebied al gekocht"
|
||||
buy-restrictedToWorld: "Je moet in de wereld '%0%' zijn om dit gebied te kopen (je ben in '%1%')"
|
||||
buy-restrictedToRegion: "Je moet in '%0%' staan om hem te kopen"
|
||||
unrent-help: "/as unrent <gebiednaam>, 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: "De huur van je gebied is gestopt"
|
||||
unrent-other: "De huur voor het gebied is gestopt voor speler %0%"
|
||||
unrent-expired: "De huur van je gebied %0% is gestopt"
|
||||
sell-help: "/as sell <gebiednaam>, 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: "Het gebied is verkocht voor speler %0%"
|
||||
sell-soldYours: "Je gebied is verkocht"
|
||||
sell-noPermission: "Je hebt geen toestemming om een gebied te verkopen"
|
||||
sell-noPermissionOther: "Je hebt geen toestemming om een gebied van iemand anders te verkopen"
|
||||
rents-updated: "Alle borden en gebieden voor de verhuur zijn geupdate"
|
||||
rents-noPermission: "Je hebt geen toestemming om alle verhuur borden en gebieden te updaten"
|
||||
rents-notUpdated: "Niet alle borden zijn geupdate, een reload zou het op kunnen lossen"
|
||||
buys-updated: "Alle borden en gebieden voor de verkoop zijn geupdate"
|
||||
buys-noPermission: "Je hebt geen toestemming om alle verkoop borden en gebieden te updaten"
|
||||
buys-notUpdated: "Niet alle borden zijn geupdate, een reload zou het op kunnen lossen"
|
||||
reload-reloaded: "De config is succesvol opnieuw ingeladen"
|
||||
reload-noPermission: "Je hebt geen toestemming om de config opnieuw in te laden"
|
||||
info-help: "/as info <all|rented|forrent|sold|forsale|player|region>"
|
||||
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-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-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-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-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-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 Verlengen over: &7%extendsleft% keer 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 Om dit gebied te huren moet je erin staan"
|
||||
info-regionRestrictedWorldRent: "&2&l►&r Om dit gebied te huren moet je in de wereld '%world%' zijn"
|
||||
info-regionRestrictedRegionBuy: "&2&l►&r Om dit gebied te kopen moet je erin staan"
|
||||
info-regionRestrictedWorldBuy: "&2&l►&r Om dit gebied te kopen moet je in de wereld '%world%' zijn"
|
||||
info-regionRestoringRent: "&2&l►&r Herstel is ingeschakeld &7(gebied zal resetten bij een huurstop)%0%"
|
||||
info-regionRestoringBuy: "&2&l►&r Herstel is ingeschakeld &7(gebied zal resetten bij een verkoop)%0%"
|
||||
info-regionRestoringProfile: " (profiel: %0%)"
|
||||
info-regionNoSign: "Er is geen bordje geregistreerd voor dit gebied"
|
||||
info-regionPriceDuration: "Prijs: %0% voor elke %1%"
|
||||
info-regionPrice: "Prijs: %0%"
|
||||
info-regionRestore: "Herstellen ingeschakeld: %0%"
|
||||
info-regionRestoreProfile: "Herstel profiel: %0%"
|
||||
info-regionTPLocation: "Teleporteer locatie: &7Wereld=%0%, X=%1%, Y=%2%, Z=%3%, Helling=%4%, Draaiing=%5%"
|
||||
info-regionNoTP: "Geen teleporteer locatie ingesteld"
|
||||
info-regionNotExisting: "Gebeid %0% staat niet geregistreerd"
|
||||
setrestore-help: "/as setrestore <gebied> <true|false|general> [profiel]"
|
||||
setrestore-noPermission: "Je hebt geen toestemming om de herstel opties te veranderen"
|
||||
setrestore-notRegistered: "%0% is niet geregistreerd"
|
||||
setrestore-invalidSetting: "'%0%' is geen geldige staat, gebruik true, false of general"
|
||||
setrestore-success: "De herstel optie van %0% is succesvol gezet naar '%1%'"
|
||||
setrestore-successProfile: "Herstel instelling van %0% is succesvol gezet op '%1%' en het profiel naar '%2%'"
|
||||
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: "%0% is niet geregistreerd in AreaShop"
|
||||
setprice-wrongPrice: "'%0%' is geen geldige prijs"
|
||||
setprice-successRent: "Prijs van gebied %0% is veranderd naar %1% per %2%"
|
||||
setprice-successBuy: "De prijs van het gebied %0% is veranderd naar %1%"
|
||||
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 als een huur gebied"
|
||||
setduration-wrongAmount: "'%0%' is geen geldig aantal, gebruik een geheel nummer"
|
||||
setduration-wrongFormat: "'%0%' is geen goed tijdsformaat, bekijk de documentatie op Bukkit"
|
||||
setduration-success: "Duur van het gebied %0% veranderd naar '%1%'"
|
||||
setup-noRegion: "Je hebt geen gebied aangegeven op de tweede regel"
|
||||
setup-wrongRegion: "Het aangegeven gebied bestaat niet"
|
||||
setup-alreadyRentSign: "Het aangegeven gebied heeft al een bord voor huren"
|
||||
setup-alreadyBuySign: "Het aangegeven gebied heeft al een bord voor kopen"
|
||||
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 een nummer"
|
||||
setup-rentSuccess: "Huren van gebied %0% is goed opgezet"
|
||||
setup-buySuccess: "Kopen van gebied %0% 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%)"
|
||||
destroy-noPermissionRent: "Je hebt geen toestemming om een bordje van dit huur gebied kapot te maken"
|
||||
destroy-noPermissionBuy: "Je hebt geen toestemming om een bordje van dit koop gebied kapot te maken"
|
||||
destroy-successRent: "Het huren van %0% is succesvol verwijderd"
|
||||
destroy-successBuy: "Het kopen van %0% is succesvol verwijderd"
|
||||
teleport-help: "/as tp <gebied> <aantal> <soort>"
|
||||
teleport-noRentOrBuy: "Gebied '%0%' is niet geregistreerd als koop of huur gebied"
|
||||
teleport-noPermission: "Je hebt geen toestemming om naar je gebied te teleporteren"
|
||||
teleport-noPermissionOther: "Je hebt geen toestemming om te teleporteren naar een gebied dat niet van jou is"
|
||||
teleport-noPermissionSign: "Je hebt geen toestemming om naar het bordje van je gebied te teleporteren"
|
||||
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 naar %0% geteleporteerd"
|
||||
teleport-successSign: "Je bent geteleporteerd naar het bordje van %0%"
|
||||
teleport-noSafe: "Geen veilige plek gevonden in gebied %0%, verander het gebied of stel de teleporteer positie in"
|
||||
teleport-blocked: "Je kunt niet teleporteren omdat de positie buiten het gebied ligt en je geforceerd word erbinnen te teleporteren"
|
||||
setteleport-help: "/as settp [gebied] [reset], het gebied waar je in staat zal worden gebruikt als je deze niet aangeeft"
|
||||
setteleport-noPermission: "Je hebt geen toestemming om de teleporteer lokatie in te stellen"
|
||||
setteleport-noPermissionOther: "Je hebt geen toestemming om de teleporteer lokatie in te stellen voor een gebied dat niet van jou is"
|
||||
setteleport-noRentOrBuy: "Gebied '%0%' is niet geregistreerd als koop of huur gebied"
|
||||
setteleport-success: "Teleporteer lokatie van %0% ingestelt"
|
||||
setteleport-notInside: "De lokatie moet zich binnen het gebied bevinden"
|
||||
setteleport-reset: "Teleporteer lokatie van %0% 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: %1%, bij het zoeken met een maximale prijs gelijk aan je saldo: %2%%3%"
|
||||
find-successMax: "Een %0% gebied is gevonden: %1%, bij het zoeken met een maximale prijs van %2%%3%"
|
||||
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%"
|
||||
find-noneFoundMax: "Geen %0% gebied gevonden bij het zoeken met een maximale prijs van %1%%2%"
|
||||
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 %0% is toegevoegd aan groep '%1%', deze group heeft nu %2% leden"
|
||||
groupadd-failed: "Gebied %0% is al toegevoegd aan groep '%1%'"
|
||||
groupadd-weSuccess: "Toegevoegd aan groep %0%: &7%1%"
|
||||
groupadd-weFailed: "Waren al toegevoegd aan groep %0%: &7%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 %0% is verwijderd van groep '%1%', deze groep heeft nu %2% leden"
|
||||
groupdel-failed: "Gebied %0% is geen lid van groep '%1%'"
|
||||
groupdel-weSuccess: "Verwijderd van groep %0%: &7%1%"
|
||||
groupdel-weFailed: "Waren al niet in de groep %0%: &7%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%"
|
||||
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-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 %1%"
|
||||
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-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"
|
||||
del-noRegion: "Gebied '%0%' is niet geregistreerd in AreaShop"
|
||||
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%"
|
||||
addsign-help: "/as addsign [gebied] [profiel]"
|
||||
addsign-noSign: "Je kijkt niet naar een bord"
|
||||
addsign-noRegion: "Gebied '%0%' kan niet gevonden worden"
|
||||
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 %0%"
|
||||
addsign-successProfile: "Het bord is toegevoegd aan %0% met profiel %1%"
|
||||
addsign-alreadyRegistered: "Dat bord is al geregistreerd voor gebied %0%"
|
||||
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 %0%"
|
||||
me-noPermission: "Je hebt geen toestemming om te zien welke gebieden je hebt"
|
||||
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 aan de volgende gebieden:"
|
||||
me-friendLine: "&2&l►&r %region% &7(eigenaar: %player%)"
|
||||
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"
|
||||
setowner-noPermissionRent: "Je hebt geen toestemming om de eigenaar van huur gebieden in te stellen"
|
||||
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%"
|
||||
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: "%0% is niet geregistreerd in AreaShop"
|
||||
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-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: "%0% is niet geregistreerd in AreaShop"
|
||||
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-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 %1%"
|
||||
addfriend-success: "%0% is toegevoegd als vriend bij je gebied %1%"
|
||||
addfriend-alreadyAdded: "%0% is al toegevoegd als vriend voor dit gebied"
|
||||
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"
|
||||
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 %1%"
|
||||
delfriend-success: "%0% is verwijderd als vriend van je gebied %1%"
|
||||
delfriend-notAdded: "%0% is niet toegevoegd als vriend voor dit gebied"
|
||||
delfriend-noOwner: "Je kunt geen vrienden verwijderen van een gebied zonder eigenaar"
|
||||
timeleft-years: "%0% jaren"
|
||||
timeleft-months: "%0% maanden"
|
||||
timeleft-days: "%0% dagen"
|
||||
timeleft-hours: "%0% uren"
|
||||
timeleft-minutes: "%0% minuten"
|
||||
timeleft-second: "%0% seconde"
|
||||
timeleft-seconds: "%0% seconden"
|
||||
timeleft-ended: "Verlopen"
|
||||
greeting-forrent: "%region% kan worden gehuurd voor %price% per %duration%"
|
||||
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%"
|
||||
+233
@@ -0,0 +1,233 @@
|
||||
# ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ Language file of the AreaShop plugin created by NLThijs48, Github can be found at https://github.com/NLthijs48/AreaShop ║
|
||||
# ║ Language: Polish (Polski), Version: V2.1.2, Percentage translated: 65%, author(s): Rexlu ║
|
||||
# ║ 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 ║
|
||||
# ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
|
||||
cmd-notValid: "Komenda jest niepoprawna, wpisz /as help aby uzyskac liste komend"
|
||||
cmd-onlyByPlayer: "Ta komenda moze byc uzywana tylko przez gracza"
|
||||
cmd-weOnlyByPlayer: "Uzywanie zaznaczenia WorldEdit jest mozliwe tylko podczas bycia graczem, sprecyzuj nazwe miejsca jako dodatkowy argument"
|
||||
cmd-noSelection: "Nie zaznaczyles terenu pluginem WorldEdit"
|
||||
cmd-noRegionsFound: "Nie znaleziono miejsc AreShop w zaznaczeniu"
|
||||
cmd-noRegionsAtLocation: "Brak regionow w twojej lokalizacji, uzyj nazwy regionu jako argumentu."
|
||||
cmd-moreRegionsAtLocation: "Wiecej niz jeden region znaleziono w twojej lokalizacji, uzyj nazwy regionu jako argumentu."
|
||||
help-header: "Strona pomocy, komendy ktore moga zostac uzzte"
|
||||
help-alias: "Aby wyswietlic ta strone: /areashop, /as"
|
||||
help-help: "&6/as help &7-&r Pokazuje stone pomocy"
|
||||
help-info: "&6/as info &7-&r Pokazuje informacje odnosnie miejsc"
|
||||
help-rent: "&6/as rent &7-&r Wynajmuje dane miejsce lub przedluza wynajem"
|
||||
help-buy: "&6/as buy &7-&r BKupuje miejsce"
|
||||
help-unrent: "&6/as unrent &7-&r Anuluje wynajem"
|
||||
help-unrentOwn: "&6/as unrent &7-&r Anuluje wynajem"
|
||||
help-sell: "&6/as sell &7-&r Sprzedaje miejsce"
|
||||
help-sellOwn: "&6/as sell &7-&r Sprzedaje miejsce"
|
||||
help-updaterents: "&6/as updaterents &7-&r Aktualizuje wszystkie miejsca wynajmu oraz tabliczki"
|
||||
help-updatebuys: "&6/as updatebuys &7-&r Aktualizuje wszystkie miejsca do kupienia oraz tabliczki"
|
||||
help-reload: "&6/as reload &7-&r Laduje ponownie ustawienia oraz pliki jezykowe"
|
||||
help-setrestore: "&6/as setrestore &7-&r Wlacz/wylacz przywracanie oraz wybierz profil"
|
||||
help-setprice: "&6/as setprice &7-&r Zmiana ceny regionu"
|
||||
help-setduration: "&6/as setduration &7-&r Zmiana czasu wynajmu"
|
||||
help-teleport: "&6/as tp &7-&r Teleportuje do kupionych/wynajetych miejsc"
|
||||
help-teleportAll: "&6/as tp &7-&r Teleportuje do wynajmowanego/kupionego miejsca"
|
||||
help-setteleport: "&6/as settp &7-&r Ustawia koordynaty teleportacji dla kupionego/wynajetego miejsca"
|
||||
help-setteleportAll: "&6/as settp &7-&r Ustawia koordynaty teleportacji dla danego miejsca"
|
||||
help-find: "&6/as find &7-&r Znajdz niezakupione i wolne regiony"
|
||||
help-groupadd: "&6/as groupadd &7-&r Dodaje miejsce do grupy"
|
||||
help-groupdel: "&6/as groupdel &7-&r Usuwa miejsce z grupy"
|
||||
help-grouplist: "&6/as grouplist &7-&r Wyswietla wszystkie grupy"
|
||||
help-groupinfo: "&6/as groupinfo &7-&r Wyswietla informacje o grupie"
|
||||
help-schemevent: "&6/as schemevent &7-&r Ustawianie schematu dla regionu"
|
||||
help-add: "&6/as add &7-&r Dodaje region do wynajmu lub zakupu"
|
||||
help-del: "&6/as del &7-&r Usuwa dane miejsce z AreaShop"
|
||||
help-addsign: "&6/as addsign &7-&r Dodaje tabliczke do istniejacego miejsca"
|
||||
help-delsign: "&6/as delsign &7-&r Usuwa tabliczke na ktora patrzysz"
|
||||
help-me: "&6/as me &7-&r Sprawdza ktore miejsca sa twoja wlasnoscia (+czas wygasniecia)"
|
||||
help-setowner: "&6/as setowner &7-&r Ustawia wlasciciela lub wydluza czas wynajmu"
|
||||
rent-noPermission: "Nie masz uprawnien aby wynajac to miejsce"
|
||||
rent-maximum: "Nie mozesz wynajac wiecej niz %0%"
|
||||
rent-payError: "Cos poszlo nie tak, sprobuj ponownie pozniej"
|
||||
rent-rented: "Wynajales %0% do %1%"
|
||||
rent-extended: "Przedluzyles wynajem %0% do %1%"
|
||||
rent-extend: "Mozesz przedluzyc czas wynajmu poprzez klikniecie PPM na tabliczke badz wpisanie /as rent"
|
||||
rent-lowMoneyExtend: "Nie masz wystarczajaco pieniedzy aby przedluzyc czas wynajmu"
|
||||
rent-lowMoneyRent: "Nie masz wystarczajaco pieniedzy aby wynajac"
|
||||
rent-someoneElse: "Ktos wynajmuje juz to miejsce"
|
||||
rent-notRentable: "Tego miejsca nie mozna wynajac"
|
||||
rent-maxExtends: "Nie mozesz wydluzyc czasu wynajmu (maksymalnie %0% razy), po skonczeniu czasu wynajmu, mozesz ponownie wynajac to miejsce"
|
||||
buy-noPermission: "Nie posiadasz uprawnien aby kupic to miejsce"
|
||||
buy-notBuyable: "Tego miejsca nie mozna kupic"
|
||||
buy-maximum: "Nie mozesz zakupic wiecej niz %0%"
|
||||
buy-payError: "Cos poszlo nie tak, sprobuj ponownie pozniej"
|
||||
buy-lowMoney: "Nie masz wystarczajaco pieniedzy aby kupic to miejsce"
|
||||
buy-yours: "Jestes wlascicielem tego miejsca"
|
||||
buy-someoneElse: "Ktos juz kupil to miejsce"
|
||||
unrent-noPermission: "Nie masz uprawnien aby anulowac wynajem"
|
||||
unrent-noPermissionOther: "Nie masz uprawnien aby anulowac wynajem innemu graczowi"
|
||||
unrent-notRegistered: "Nie mozna anulowac wynajmu dla tego miejsca, poniewaz nie blyo ustawione pod wynajem"
|
||||
unrent-notRented: "Nie mozna anulowac wynajmu tego miejsca, poniewaz nie jest wynajete"
|
||||
unrent-unrented: "Anulowales wynajem"
|
||||
unrent-other: "Anulowano wynajem graczowi %0%"
|
||||
unrent-expired: "Twoj czas wynajmu %0% dobiegl konca"
|
||||
sell-notRegistered: "To miejsce nie moze zostac sprzedane, poniewaz nie mozna bylo ustawione do kupna"
|
||||
sell-notBought: "To miejsce nie moze byc sprzedane, poniewaz nie jest kogos wlasnoscia"
|
||||
sell-sold: "To miejsce zostalo sprzedane graczowi %0%"
|
||||
sell-soldYours: "Sprzedales miejsce"
|
||||
sell-noPermission: "Nie masz uprawnien aby sprzedac to miejsce"
|
||||
sell-noPermissionOther: "Nie masz uprawnien aby sprzedawac miejsce nalezace do kogos"
|
||||
rents-updated: "Wszystkie znaki i regiony do wynajecia zostaly zaaktualizowane"
|
||||
rents-noPermission: "Nie masz uprawnien aby zaaktualizowac miejsca i tabliczki"
|
||||
rents-notUpdated: "Nie wszystkie tabliczki zostaly zaaktualizwane, sprobuj komendy /as reload"
|
||||
buys-updated: "Wszystkie znaki i regiony na sprzedaz zostaly zaaktualizowane"
|
||||
buys-noPermission: "Nie masz uprawnien aby zaaktualizowac miejsca i tabliczki"
|
||||
buys-notUpdated: "Nie wszystkie tabliczki zostaly zaaktualizwane, sprobuj komendy /as reload"
|
||||
reload-reloaded: "Ustawienia zostaly przeladowane pomyslnie"
|
||||
reload-noPermission: "Nie masz do tego uprawnien"
|
||||
info-help: "/as info <all|rented|forrent|sold|forsale|player|region>"
|
||||
info-all-rents: "Miejsca do wynajmu: &7%0%"
|
||||
info-all-noRents: "Nie ma miejsc, ktore mozna wynajac"
|
||||
info-all-buys: "Miejsca do kupienia: &7%0%"
|
||||
info-all-noBuys: "Nie ma miejsc ktore mozna kupic"
|
||||
info-rented: "Wynajete miejsca: &7%0%"
|
||||
info-noRented: "Wszystkie miejsca sa wolne"
|
||||
info-unrented: "Anulowane wynajmy: &7%0%"
|
||||
info-noUnrented: "Wszystkie miejsca sa wynajmowane"
|
||||
info-sold: "Sprzedane miejsca: &7%0%"
|
||||
info-noSold: "Nie ma miejsc na sprzedaz"
|
||||
info-forsale: "Miejsca na sprzedaz: &7%0%"
|
||||
info-noForsale: "Wszystkie miejsca sa wyprzedane"
|
||||
info-playerHelp: "/as info player <nick>"
|
||||
info-playerRents: "Miejsca wynajmowane przez %0%: &7%1%"
|
||||
info-playerNoRents: "%0% nie wynajmuje zadnych miejsc"
|
||||
info-playerBuys: "Miejsca kupione przez %0%: %1%"
|
||||
info-playerNoBuys: "%0% nie kupil jeszcze zadnego miejsca"
|
||||
info-regionSignLocation: "&7(%0%, %1%, %2%, %3%)&r"
|
||||
info-regionNoSign: "Tabliczka dla tego miejsca nie istnieje."
|
||||
info-regionPriceDuration: "Cena: &7%0% za kazdy %1%"
|
||||
info-regionPrice: "Cena: &7%0%"
|
||||
info-regionRestore: "Restoring enabled: &7%0%"
|
||||
info-regionRestoreProfile: "Restoring profile: &7%0%"
|
||||
info-regionTPLocation: "Lokacja teleportu: &7World=%0%, X=%1%, Y=%2%, Z=%3%, Pitch=%4%, Yaw=%5%"
|
||||
info-regionNoTP: "Nie ustawiono lokacji teleportu"
|
||||
setrestore-help: "/as setrestore <miejsce> <true|false|general> [profil]"
|
||||
setrestore-invalidSetting: "'%0%' nie jest wlasciwa wartoscia, powinno byc true, false lub general"
|
||||
setprice-noPermission: "Nie masz uprawnien aby zmienic cene tego miejsca"
|
||||
setprice-help: "/as setprice <price> [region], cena zostanie nadana miejscu na ktorym stoisz jezeli nie sprecyzujesz miejsca"
|
||||
setprice-notRegistered: "%0% nie istnieje w AreaShop"
|
||||
setprice-wrongPrice: "'%0%' nie jest prawidlowa cena"
|
||||
setprice-successRent: "Cena za %0% zmieniona na %1% za %2%"
|
||||
setprice-successBuy: "Cena za %0% zmieniona na %1%"
|
||||
setup-noRegion: "Nie sprecyzowales miejsca w drugiej linijce"
|
||||
setup-wrongRegion: "Sprecyzowane miejsce nie istnieje"
|
||||
setup-alreadyRentSign: "Sprecyzowane miejsce aktualnie ma juz tabliczke"
|
||||
setup-alreadyBuySign: "Sprecyzowane miejsce aktualnie ma juz tabliczke"
|
||||
setup-noDuration: "Nie sprecyzowales jak dlugi ma byc czas wynajmu, zrob to w 3 linijce"
|
||||
setup-wrongDuration: "Sprecyzowany czas nie jest poprawny, przyklad: 1 day"
|
||||
setup-noPrice: "Nie sprecyzowales ceny, zrob to w 4 linijce"
|
||||
setup-wrongPrice: "Sprecyzowana cena jest niepoprawna, uzyj liczby"
|
||||
setup-rentSuccess: "Wynajem miejsca %0% zostal ustawiony poprawnie"
|
||||
setup-buySuccess: "Kupno miejsca %0% zostalo ustawione poprawnie"
|
||||
setup-noPermissionRent: "Nie masz uprawnien aby ustawic miejsce do wynajmu"
|
||||
setup-noPermissionBuy: "Nie masz uprawnien aby ustawic miejsc do kupna"
|
||||
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%)"
|
||||
destroy-noPermissionRent: "Nie masz uprawnien aby niszczyc tabliczki wynajmu miejsca"
|
||||
destroy-noPermissionBuy: "Nie masz uprawnien aby niszczyc tabliczki kupna miejsca"
|
||||
destroy-successRent: "Usunieto wynajem dla miejsca: %0%"
|
||||
destroy-successBuy: "Usunieto status kupionego dla: %0%"
|
||||
teleport-help: "/as tp <miejsce> [tabliczka]"
|
||||
teleport-noRentOrBuy: "Miejsce '%0%' nie jest ustawione pod wynajem lub kupno"
|
||||
teleport-noPermission: "Nie masz uprawnien aby teleportowac sie do twojego miejsca/regionu"
|
||||
teleport-noPermissionOther: "Nie masz uprawnien aby teleportowac sie do miejsc, ktore nie sa twoja wlasnoscia"
|
||||
teleport-noPermissionSign: "Nie masz uprawnien aby teleportowac sie do tabliczki twojej posiadlosci"
|
||||
teleport-noPermissionOtherSign: "Nie masz uprawnien aby teleportowac sie do tabliczek miejsc, ktore nie sa twoja wlasnoscia"
|
||||
teleport-success: "Teleportowales sie do %0%"
|
||||
teleport-successSign: "Teleportowales sie do tabliczki miejsca %0%"
|
||||
setteleport-help: "/as settp [miejsce] [reset], zostanie uzyty region na ktorym stoisz jezeli nie sprecyzujesz"
|
||||
setteleport-noPermission: "Nie masz uprawnien aby ustawic koordynaty do teleportacji"
|
||||
setteleport-noPermissionOther: "Nie masz uprawnien aby ustawic koordynaty teleportacji dla miejsca, ktore nie jest twoja wlasnoscia"
|
||||
setteleport-noRentOrBuy: "Miejsce '%0%' nie jest ustawione pod wynajem lub zakup"
|
||||
setteleport-success: "Ustawiono koordynaty teleportacji dla %0%"
|
||||
setteleport-notInside: "Koordynaty teleportu musza byc na terenie twojego miejsca/regionu"
|
||||
setteleport-reset: "Koordynaty teleportacji dla %0% zostaly zresetowane"
|
||||
find-help: "/as find <buy|rent> [maxcena] [grupa]"
|
||||
find-wrongMaxPrice: "Sprecyzowana maksymalna cena nie jest liczba: %0%"
|
||||
find-wrongGroup: "Sprecyzowana grupa nie istnieje: %0%"
|
||||
groupadd-help: "/as groupadd <grupa> [miejsce], jezeli nie sprecyzujesz, wszystkie miejsca z twojego zaznaczenia WorldEdit zostana uzyte"
|
||||
groupadd-noPermission: "Nie masz uprawnien aby dodawac miejsca/regiony do grup"
|
||||
groupadd-noRegion: "Sprecyzowany region/miejsce nie istnieje: %0%"
|
||||
groupadd-success: "Miejsce %0% zostalo dodane do grupy '%1%', ta grupa ma %2% czlonkow"
|
||||
groupadd-failed: "Miejsce %0% nalezy do grupy '%1%'"
|
||||
groupadd-weSuccess: "Dodano do grupy %0%: &7%1%"
|
||||
groupadd-weFailed: "Jestesmy juz w grupie %0%: &7%1%"
|
||||
groupdel-help: "/as groupdel <grupa> [miejsce], jezeli nie sprecyzowano miejsca/regionu, to wszystkie regiony z zaznaczenia WorldEdit beda uzyte"
|
||||
groupdel-noPermission: "Nie masz uprawnien aby usuwac miejsca/regiony z grup"
|
||||
groupdel-noRegion: "Sprecyzowany region/miejsce nie istnieje: %0%"
|
||||
groupdel-success: "Miejsce %0% zostalo usuniete z grupy '%1%', ta grupa ma teraz %2% czlonkow"
|
||||
groupdel-failed: "Miejsce %0% nie nalezy do grupy '%1%'"
|
||||
groupdel-weSuccess: "Usunieto z grupy %0%: &7%1%"
|
||||
groupdel-weFailed: "Nie jestesmy w grupie %0% swoja droga: &7%1%"
|
||||
grouplist-noPermission: "Nie masz uprawnien aby wyswietlic grupy"
|
||||
grouplist-noGroups: "Aktualnie nie ma zadnych grup"
|
||||
grouplist-success: "Istnieja nastepujace grupy: &7%0%"
|
||||
groupinfo-help: "/as groupinfo <grupa>"
|
||||
groupinfo-noPermission: "Nie masz uprawnien aby wyswietlic informacje o grupie"
|
||||
groupinfo-noGroup: "Nie ma grupy o nazwie '%0%', wpisz /as grouplist aby sprawdzic istniejace grupy"
|
||||
groupinfo-members: "Nastepujace miejsca/regiony naleza do grupy %0%: &7%1%"
|
||||
groupinfo-noMembers: "W grupie %0% nie ma zadnych czlonkow"
|
||||
schemevent-help: "/as schemevent <miejsce> <created|deleted|rented|unrented|bought|sold>"
|
||||
schemevent-noRegion: "Taki region/miejsce nie istnieje %0%"
|
||||
schemevent-wrongEvent: "Sprecyzowana zaszłość/event '%0%' nie istnieje, uzyj jednej z nastepujacych: &7%1%"
|
||||
add-help: "/as add <rent|buy> [miejsce] [swiat]"
|
||||
add-noPermission: "Nie masz uprawnien aby dodac miejsce/region do AreaShop"
|
||||
add-success: "Dodano jako %0%: &7%1%"
|
||||
add-failed: "Aktualnie istnieje: &7%0%"
|
||||
add-specifyWorld: "Musisz sprecyzowac swiat w ktorym istnieje dany region/miejsce kiedy uzywasz konsoli"
|
||||
add-incorrectWorld: "Swiat '%0%' nie zostal znaleziony, sprobuj ponownie (zwroc uwage na wielkosc liter)"
|
||||
add-noRegion: "Miejsce '%0%' nie istnieje w tym swiecie"
|
||||
del-noRegion: "Miejsce '%0%' nie istnieje w AreaShop"
|
||||
del-noPermission: "Nie masz uprawnien aby usuwac miejsca/regiony"
|
||||
del-success: "Usuniete miejsca/regiony: &7%0%"
|
||||
del-failed: "Brak uprawnien aby usunac lub nie istnieja: &7%0%"
|
||||
addsign-help: "/as addsign [miejsce] [profil]"
|
||||
addsign-noSign: "Nie patrzysz sie na tabliczke"
|
||||
addsign-noRegion: "Miejsce '%0%' nie moze zostac znalezione"
|
||||
addsign-noRegions: "Nie znaleziono miejsca/regionu w poblizu tabliczki"
|
||||
addsign-couldNotDetect: "Znaleziono wiele miejsc/regionow wokol tabliczki, sprecyzuj miejsce jako dodatkowy argument (2 miejsca zostaly znalezione: %0% and %1%)"
|
||||
addsign-couldNotDetectSign: "Znaleziono wiele miejsc/regionow wokol tabliczki, sprecyzuj miejsce w drugiej linijce (2 miejsca zostaly znalezione: %0% and %1%)"
|
||||
addsign-wrongProfile: "Sprecyzowany profil nie istnieje, uzyj jednego z nastepujacych (sprawdz ustawienia): &7%0%"
|
||||
addsign-success: "Tabliczka zostala dodana do %0%"
|
||||
addsign-successProfile: "Tabliczka zostala dodana do %0% z profilem %1%"
|
||||
addsign-alreadyRegistered: "Ta tabliczka aktualnie istnieje dla miejsca %0%"
|
||||
addsign-noPermission: "Nie masz uprawnien aby dodac tabliczke"
|
||||
delsign-noSign: "Nie patrzysz sie na tabliczke"
|
||||
delsign-noPermission: "Nie masz uprawnien aby usunac tabliczke"
|
||||
delsign-noRegion: "Ta tabliczka nie nalezy do AreaShop"
|
||||
delsign-success: "Tabliczka zostala usunieta z %0%"
|
||||
me-noPermission: "Nie masz uprawnien aby sprawdzic jakie miejsca naleza do ciebie"
|
||||
me-notAPlayer: "Nie jestes graczem, wiec nie mozesz miec zadnych miejsc"
|
||||
me-noRentRegions: "Nie wynajales zadnych miejsc"
|
||||
me-noBuyRegions: "Nie kupiles zadnych miejsc"
|
||||
me-rentRegions: "Wynajmujesz nastepujace miejsca:"
|
||||
me-buyRegions: "Kupiles nastepujace miejsca:"
|
||||
setowner-help: "/as setowner <gracz> [miejsce], jezeli nie sprecyzujesz zostanie uzyty region/miejsce na ktorym stoisz"
|
||||
setowner-noPermission: "Nie masz uprawnien aby nadawac wlasciciela dla danego miejsca/regionu"
|
||||
setowner-noPermissionRent: "Nie masz uprawnien aby nadawac wlasciciela dla danego miejsca/regionu"
|
||||
setowner-noPermissionBuy: "Nie masz uprawnien aby nadawac wlasciciela dla danego miejsca/regionu"
|
||||
setowner-notRegistered: "Sprecyzowane miejsce nie istnieje, wlasciciel nie moze zostac ustawiony"
|
||||
setowner-noPlayer: "Nie mozna pozyskac UUID sprecyzowanego gracza: %0%"
|
||||
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: "Wygaslo/przedawniony"
|
||||
greeting-forrent: "%region% moze zostac wynajety za %price% za %duration%"
|
||||
greeting-rented: "%region% jest wynajety graczowi %player% do %until%"
|
||||
greeting-forsale: "%region% moze zostac kupiony za %price%"
|
||||
greeting-bought: "%region% zostal zakupiony przez gracza %player%"
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
name: AreaShop
|
||||
main: nl.evolutioncoding.AreaShop.AreaShop
|
||||
version: 2.0.2
|
||||
main: nl.evolutioncoding.areashop.AreaShop
|
||||
version: 2.1.3
|
||||
depend: [Vault, WorldGuard, WorldEdit]
|
||||
softdepend: [Multiverse-Core]
|
||||
author: NLThijs48
|
||||
website: http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/
|
||||
commands:
|
||||
AreaShop:
|
||||
description: For all commands use /as help
|
||||
usage: /AreaShop or /AS
|
||||
usage: AreaShop has not started correctly, check the console and correct any errors
|
||||
permission: areashop.help
|
||||
permission-message: You don't have <permission>
|
||||
aliases: [as]
|
||||
@@ -28,10 +30,12 @@ permissions:
|
||||
areashop.reload: true
|
||||
areashop.setrestore: true
|
||||
areashop.setprice: true
|
||||
areashop.rentduration: true
|
||||
areashop.setduration: true
|
||||
areashop.teleport: true
|
||||
areashop.teleportall: true
|
||||
areashop.setteleportall: true
|
||||
areashop.teleportsign: true
|
||||
areashop.teleportsignall: true
|
||||
areashop.tabcomplete: true
|
||||
areashop.setteleportoutsideregion: true
|
||||
areashop.find: true
|
||||
@@ -39,10 +43,17 @@ permissions:
|
||||
areashop.groupdel: true
|
||||
areashop.grouplist: true
|
||||
areashop.groupinfo: true
|
||||
areashop.limits.unlimited: true
|
||||
areashop.limitbypass: true
|
||||
areashop.schematicevents: true
|
||||
areashop.addsign: true
|
||||
areashop.delsign: true
|
||||
areashop.renttimebypass: true
|
||||
areashop.me: true
|
||||
areashop.resellall: true
|
||||
areashop.stopresellall: true
|
||||
areashop.addfriendall: true
|
||||
areashop.delfriendall: true
|
||||
areashop.nofityupdate: true
|
||||
areashop.help:
|
||||
description: Allows you to see the help pages
|
||||
default: true
|
||||
@@ -94,7 +105,7 @@ permissions:
|
||||
areashop.setprice:
|
||||
description: Allows you to change the price
|
||||
default: op
|
||||
areashop.rentduration:
|
||||
areashop.setduration:
|
||||
description: Allows you to change the duration of a rent
|
||||
default: op
|
||||
areashop.teleport:
|
||||
@@ -102,9 +113,18 @@ permissions:
|
||||
default: true
|
||||
areashop.teleportall:
|
||||
description: Teleport to all regions
|
||||
default: true
|
||||
default: op
|
||||
areashop.teleportsign:
|
||||
description: Teleport to signs of regions
|
||||
description: Teleport to signs of regions you own
|
||||
default: true
|
||||
areashop.teleportsignall:
|
||||
description: Teleport to signs of all regions
|
||||
default: op
|
||||
areashop.teleportfriend:
|
||||
description: Teleport to regions where you are added as friend
|
||||
default: true
|
||||
areashop.teleportfriendsign:
|
||||
description: Teleport to the sign of regions where you are added as friend
|
||||
default: true
|
||||
areashop.setteleport:
|
||||
description: Set the teleport spot for your region
|
||||
@@ -139,8 +159,8 @@ permissions:
|
||||
areashop.limits.default:
|
||||
description: Assign limits as set in the 'default' group in the 'limitGroups' section of the config
|
||||
default: not op
|
||||
areashop.limits.unlimited:
|
||||
description: Assign limits as set in the 'unlimited' group in the 'limitGroups' section of the config
|
||||
areashop.limitbypass:
|
||||
description: Bypass the limits for renting/buying regions (how many you can have at the same time)
|
||||
default: op
|
||||
areashop.schematicevents:
|
||||
description: Allows you to trigger schematic events for regions
|
||||
@@ -150,4 +170,43 @@ permissions:
|
||||
default: op
|
||||
areashop.delsign:
|
||||
description: Allows you to delete signs from existing regions
|
||||
default: op
|
||||
areashop.renttimebypass:
|
||||
description: Bypass the maximum rent time you can have in advance
|
||||
default: op
|
||||
areashop.me:
|
||||
description: Allows you to get information about your regions
|
||||
default: true
|
||||
areashop.setownerrent:
|
||||
description: Allows you to set the owner of rent regions
|
||||
default: op
|
||||
areashop.setownerbuy:
|
||||
description: Allows you to set the owner of buy regions
|
||||
default: op
|
||||
areashop.resell:
|
||||
description: Allows you to set your region to sell mode for selling to other players
|
||||
default: true
|
||||
areashop.resellall:
|
||||
description: Allows you to set any region into selling mode
|
||||
default: op
|
||||
areashop.stopresell:
|
||||
description: Allows you to set your region into normal mode if it is in sell mode
|
||||
default: true
|
||||
areashop.stopresellall:
|
||||
description: Allows you to set any region into normal mode if it is in sell mode
|
||||
default: op
|
||||
areashop.addfriend:
|
||||
description: Allows you to add friends to your regions
|
||||
default: true
|
||||
areashop.addfriendall:
|
||||
description: Allows you to add friends to all regions
|
||||
default: op
|
||||
areashop.delfriend:
|
||||
description: Allows you to delete friends from your regions
|
||||
default: true
|
||||
areashop.delfriendall:
|
||||
description: Allows you to delete friends from all regions
|
||||
default: op
|
||||
areashop.nofityupdate:
|
||||
description: Will notify this player when an update is available
|
||||
default: op
|
||||
+192
-78
@@ -1,21 +1,25 @@
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import nl.evolutioncoding.areashop.Updater.UpdateResult;
|
||||
import nl.evolutioncoding.areashop.Updater.UpdateType;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.Configuration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||
@@ -34,9 +38,10 @@ public final class AreaShop extends JavaPlugin {
|
||||
private FileManager fileManager = null;
|
||||
private LanguageManager languageManager = null;
|
||||
private CommandManager commandManager = null;
|
||||
private boolean configOk = false;
|
||||
private boolean debug = false;
|
||||
private String chatprefix = null;
|
||||
private Updater updater = null;
|
||||
private boolean updateAvailable = false;
|
||||
|
||||
/* Folders and file names */
|
||||
public static final String languageFolder = "lang";
|
||||
@@ -45,6 +50,7 @@ public final class AreaShop extends JavaPlugin {
|
||||
public static final String regionsFolder = "regions";
|
||||
public static final String groupsFile = "groups.yml";
|
||||
public static final String defaultFile = "default.yml";
|
||||
public static final String configFile = "config.yml";
|
||||
public static final String versionFile = "versions";
|
||||
|
||||
/* Euro tag for in the config */
|
||||
@@ -64,6 +70,20 @@ public final class AreaShop extends JavaPlugin {
|
||||
public static final String tagDuration = "%duration%";
|
||||
public static final String tagRentedUntil = "%until%";
|
||||
public static final String tagRentedUntilShort = "%untilshort%";
|
||||
public static final String tagWidth = "%width%"; // x-axis
|
||||
public static final String tagHeight = "%height%"; // y-axis
|
||||
public static final String tagDepth = "%depth%"; // z-axis
|
||||
public static final String tagTimeLeft = "%timeleft%";
|
||||
public static final String tagClicker = "%clicker%";
|
||||
public static final String tagResellPrice = "%resellprice%";
|
||||
public static final String tagFriends = "%friends%";
|
||||
public static final String tagFriendsUUID = "%friendsuuid%";
|
||||
public static final String tagMoneyBackPercentage = "%moneybackpercent%";
|
||||
public static final String tagMoneyBackAmount = "%moneyback%";
|
||||
public static final String tagMaxExtends = "%maxextends%";
|
||||
public static final String tagExtendsLeft = "%extendsleft%";
|
||||
public static final String tagMaxRentTime = "%maxrenttime%";
|
||||
public static final String tagMaxInactiveTime = "%inactivetime%";
|
||||
|
||||
public static AreaShop getInstance() {
|
||||
return AreaShop.instance;
|
||||
@@ -72,27 +92,28 @@ public final class AreaShop extends JavaPlugin {
|
||||
/**
|
||||
* Called on start or reload of the server
|
||||
*/
|
||||
public void onEnable(){
|
||||
public void onEnable() {
|
||||
AreaShop.instance = this;
|
||||
boolean error = false;
|
||||
|
||||
/* Check the config, loads default if errors */
|
||||
debug = this.getConfig().getBoolean("debug");
|
||||
configOk = true;
|
||||
|
||||
/* Check if WorldGuard is present */
|
||||
Plugin plugin = getServer().getPluginManager().getPlugin("WorldGuard");
|
||||
if (plugin == null || !(plugin instanceof WorldGuardPlugin)) {
|
||||
this.getLogger().info("Error: WorldGuard plugin is not present or has not loaded correctly");
|
||||
this.getLogger().severe("WorldGuard plugin is not present or has not loaded correctly");
|
||||
error = true;
|
||||
} else {
|
||||
worldGuard = (WorldGuardPlugin)plugin;
|
||||
}
|
||||
|
||||
if(getWorldGuard() != null && getWorldGuard().getDescription().getVersion().startsWith("5.")) {
|
||||
getLogger().severe("This version of AreaShop is not meant for WorldGuard 5.x, use the correct version matching your WorldGuard version");
|
||||
error = true;
|
||||
}
|
||||
|
||||
/* Check if WorldEdit is present */
|
||||
plugin = getServer().getPluginManager().getPlugin("WorldEdit");
|
||||
if (plugin == null || !(plugin instanceof WorldEditPlugin)) {
|
||||
this.getLogger().info("Error: WorldEdit plugin is not present or has not loaded correctly");
|
||||
this.getLogger().severe("WorldEdit plugin is not present or has not loaded correctly");
|
||||
error = true;
|
||||
} else {
|
||||
worldEdit = (WorldEditPlugin)plugin;
|
||||
@@ -101,48 +122,60 @@ public final class AreaShop extends JavaPlugin {
|
||||
/* Check if Vault is present */
|
||||
RegisteredServiceProvider<Economy> economyProvider = getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class);
|
||||
if (economyProvider == null) {
|
||||
this.getLogger().info("Error: Vault plugin is not present or has not loaded correctly");
|
||||
this.getLogger().severe("Vault plugin is not present or has not loaded correctly");
|
||||
error = true;
|
||||
} else {
|
||||
economy = economyProvider.getProvider();
|
||||
}
|
||||
}
|
||||
|
||||
/* Load all data from files and check versions */
|
||||
fileManager = new FileManager(this);
|
||||
error = error & !fileManager.loadFiles();
|
||||
|
||||
// Set the debug and chatprefix variables
|
||||
debug = this.getConfig().getBoolean("debug");
|
||||
chatprefix = this.getConfig().getString("chatPrefix");
|
||||
|
||||
/* Create a LanguageMananager */
|
||||
languageManager = new LanguageManager(this);
|
||||
|
||||
/* Save the chatPrefix */
|
||||
chatprefix = this.config().getString("chatPrefix");
|
||||
|
||||
/* Load all data from files and check versions */
|
||||
fileManager = new FileManager(this);
|
||||
error = error & !fileManager.loadFiles();
|
||||
fileManager.checkRents();
|
||||
|
||||
/* Save a copy of the default config.yml if one is not present */
|
||||
this.saveDefaultConfig();
|
||||
|
||||
if(error) {
|
||||
this.getLogger().info("The plugin has not started, fix the errors listed above");
|
||||
this.getLogger().severe("The plugin has not started, fix the errors listed above");
|
||||
} else {
|
||||
// Register the event listeners
|
||||
this.getServer().getPluginManager().registerEvents(new SignChangeListener(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new SignBreakListener(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new SignClickListener(this), this);
|
||||
this.getServer().getPluginManager().registerEvents(new PlayerLoginListener(this), this);
|
||||
|
||||
// Start thread for checking renting
|
||||
int checkDelay = Integer.parseInt(this.config().getString("checkDelay"))*20;
|
||||
new RentCheck(this).runTaskTimer(this, checkDelay, checkDelay);
|
||||
|
||||
// Bind commands for this plugin
|
||||
setupTasks();
|
||||
|
||||
// Startup the CommandManager (registers itself for the command)
|
||||
commandManager = new CommandManager(this);
|
||||
|
||||
// Enable Metrics if config allows it
|
||||
if(this.config().getBoolean("sendStats")) {
|
||||
if(this.getConfig().getBoolean("sendStats")) {
|
||||
this.startMetrics();
|
||||
}
|
||||
|
||||
// Register dynamic permission (things declared in config)
|
||||
registerDynamicPermissions();
|
||||
|
||||
// Dont initialize the updatechecker if disabled in the config
|
||||
if(this.getConfig().getBoolean("checkForUpdates")) {
|
||||
try {
|
||||
updater = new Updater(this, 76518, null, UpdateType.NO_DOWNLOAD, false);
|
||||
AreaShop.debug("Result=" + updater.getResult().toString() + ", Latest=" + updater.getLatestName() + ", Type=" + updater.getLatestType());
|
||||
updateAvailable = updater.getResult() == UpdateResult.UPDATE_AVAILABLE;
|
||||
if(updateAvailable) {
|
||||
this.getLogger().info("Update from AreaShop V" + this.getDescription().getVersion() + " to " + updater.getLatestName() + " available, get the latest version at http://dev.bukkit.org/bukkit-plugins/regionbuyandrent/");
|
||||
}
|
||||
} catch(Exception e) {
|
||||
AreaShop.debug("Something went wrong with the Updater:");
|
||||
AreaShop.debug(e.getMessage());
|
||||
updateAvailable = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,14 +183,19 @@ public final class AreaShop extends JavaPlugin {
|
||||
* Called on shutdown or reload of the server
|
||||
*/
|
||||
public void onDisable() {
|
||||
fileManager.saveRequiredFilesAtOnce();
|
||||
Bukkit.getServer().getScheduler().cancelTasks(this);
|
||||
|
||||
/* set variables to null to prevent memory leaks */
|
||||
worldGuard = null;
|
||||
worldEdit = null;
|
||||
economy = null;
|
||||
fileManager = null;
|
||||
languageManager = null;
|
||||
configOk = false;
|
||||
commandManager = null;
|
||||
chatprefix = null;
|
||||
debug = false;
|
||||
updater = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -198,23 +236,47 @@ public final class AreaShop extends JavaPlugin {
|
||||
*/
|
||||
public Economy getEconomy() {
|
||||
return economy;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the FileManager
|
||||
* Get the current chatPrefix
|
||||
* @return
|
||||
*/
|
||||
public String getChatPrefix() {
|
||||
return chatprefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the FileManager (loads/save regions and can be used to get regions)
|
||||
* @return The fileManager
|
||||
*/
|
||||
public FileManager getFileManager() {
|
||||
return fileManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the updater (check the update result)
|
||||
* @return The updater
|
||||
*/
|
||||
public Updater getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an update for AreaShop is available
|
||||
* @return true if an update is available, otherwise false
|
||||
*/
|
||||
public boolean updateAvailable() {
|
||||
return updateAvailable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register dynamic permissions controlled by config settings
|
||||
*/
|
||||
public void registerDynamicPermissions() {
|
||||
// Register limit groups of amount of regions a player can have
|
||||
for(String group : config().getConfigurationSection("limitGroups").getKeys(false)) {
|
||||
if(!"unlimited".equals(group) && !"default".equals(group)) {
|
||||
for(String group : getConfig().getConfigurationSection("limitGroups").getKeys(false)) {
|
||||
if(!"default".equals(group)) {
|
||||
Permission perm = new Permission("areashop.limits." + group);
|
||||
Bukkit.getPluginManager().addPermission(perm);
|
||||
}
|
||||
@@ -222,6 +284,68 @@ public final class AreaShop extends JavaPlugin {
|
||||
Bukkit.getPluginManager().recalculatePermissionDefaults(Bukkit.getPluginManager().getPermission("playerwarps.limits"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all required tasks
|
||||
*/
|
||||
public void setupTasks() {
|
||||
// Rent expiration timer
|
||||
int expirationCheck = this.getConfig().getInt("expiration.delay")*20;
|
||||
final AreaShop finalPlugin = this;
|
||||
if(expirationCheck > 0) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalPlugin.getFileManager().checkRents();
|
||||
AreaShop.debug("Checking rent expirations...");
|
||||
}
|
||||
}.runTaskTimer(this, expirationCheck, expirationCheck);
|
||||
}
|
||||
// Inactive unrenting/selling timer
|
||||
int inactiveCheck = this.getConfig().getInt("inactive.delay")*60*20;
|
||||
if(inactiveCheck > 0) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalPlugin.getFileManager().checkForInactiveRegions();
|
||||
AreaShop.debug("Checking for regions with players that are inactive too long...");
|
||||
}
|
||||
}.runTaskTimer(this, inactiveCheck, inactiveCheck);
|
||||
}
|
||||
// Periodic updating of signs for timeleft tags
|
||||
int periodicUpdate = this.getConfig().getInt("signs.delay")*20;
|
||||
if(periodicUpdate > 0) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalPlugin.getFileManager().performPeriodicSignUpdate();
|
||||
AreaShop.debug("Performing periodic sign update...");
|
||||
}
|
||||
}.runTaskTimer(this, periodicUpdate, periodicUpdate);
|
||||
}
|
||||
// Saving regions and group settings
|
||||
int saveFiles = this.getConfig().getInt("saving.delay")*20*60;
|
||||
if(saveFiles > 0) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalPlugin.getFileManager().saveRequiredFiles();
|
||||
AreaShop.debug("Saving required files...");
|
||||
}
|
||||
}.runTaskTimer(this, saveFiles, saveFiles);
|
||||
}
|
||||
// Sending warnings about rent regions to online players
|
||||
int expireWarning = this.getConfig().getInt("expireWarning.delay")*20*60;
|
||||
if(expireWarning > 0) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalPlugin.getFileManager().sendRentExpireWarnings();
|
||||
AreaShop.debug("Sending rent expire warnings...");
|
||||
}
|
||||
}.runTaskTimer(this, expireWarning, expireWarning);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to send a message to a CommandSender, using chatprefix if it is a player
|
||||
* @param target The CommandSender you wan't to send the message to (e.g. a player)
|
||||
@@ -231,10 +355,8 @@ public final class AreaShop extends JavaPlugin {
|
||||
*/
|
||||
public void configurableMessage(Object target, String key, boolean prefix, Object... params) {
|
||||
String langString = this.fixColors(languageManager.getLang(key, params));
|
||||
if(langString == null) {
|
||||
this.getLogger().info("Something is wrong with the language file, could not find key: " + key);
|
||||
} else if(langString.equals("")) {
|
||||
// Do nothing, message is disabled
|
||||
if(langString == null || langString.equals("")) {
|
||||
// Do nothing, message is not available or disabled
|
||||
} else {
|
||||
if(target instanceof Player) {
|
||||
if(prefix) {
|
||||
@@ -243,13 +365,13 @@ public final class AreaShop extends JavaPlugin {
|
||||
((Player)target).sendMessage(langString);
|
||||
}
|
||||
} else if(target instanceof CommandSender) {
|
||||
if(!config().getBoolean("useColorsInConsole")) {
|
||||
if(!getConfig().getBoolean("useColorsInConsole")) {
|
||||
langString = ChatColor.stripColor(langString);
|
||||
}
|
||||
((CommandSender)target).sendMessage(langString);
|
||||
}
|
||||
else if(target instanceof Logger) {
|
||||
if(!config().getBoolean("useColorsInConsole")) {
|
||||
if(!getConfig().getBoolean("useColorsInConsole")) {
|
||||
langString = ChatColor.stripColor(langString);
|
||||
}
|
||||
((Logger)target).info(langString);
|
||||
@@ -274,16 +396,10 @@ public final class AreaShop extends JavaPlugin {
|
||||
public String fixColors(String input) {
|
||||
String result = null;
|
||||
if(input != null) {
|
||||
result = input.replaceAll("(&([a-f0-9]))", "\u00A7$2");
|
||||
result = result.replaceAll("&k", ChatColor.MAGIC.toString());
|
||||
result = result.replaceAll("&l", ChatColor.BOLD.toString());
|
||||
result = result.replaceAll("&m", ChatColor.STRIKETHROUGH.toString());
|
||||
result = result.replaceAll("&n", ChatColor.UNDERLINE.toString());
|
||||
result = result.replaceAll("&o", ChatColor.ITALIC.toString());
|
||||
result = result.replaceAll("&r", ChatColor.RESET.toString());
|
||||
result = ChatColor.translateAlternateColorCodes('&', input);
|
||||
result = result.replaceAll("€", "\u20AC");
|
||||
}
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -291,17 +407,20 @@ public final class AreaShop extends JavaPlugin {
|
||||
* @return Currency character format string
|
||||
* @param amount Amount of money to format
|
||||
*/
|
||||
public String formatCurrency(String amount) {
|
||||
String before = this.config().getString("moneyCharacter");
|
||||
before = before.replace(currencyEuro, "\u20ac");
|
||||
String after = this.config().getString("moneyCharacterAfter");
|
||||
after = after.replace(currencyEuro, "\u20ac");
|
||||
return before + amount + after;
|
||||
}
|
||||
public String formatCurrency(double amount) {
|
||||
return this.formatCurrency("" + amount);
|
||||
}
|
||||
|
||||
String before = this.getConfig().getString("moneyCharacter");
|
||||
before = before.replace(currencyEuro, "\u20ac");
|
||||
String after = this.getConfig().getString("moneyCharacterAfter");
|
||||
after = after.replace(currencyEuro, "\u20ac");
|
||||
BigDecimal bigDecimal = new BigDecimal(amount);
|
||||
bigDecimal = bigDecimal.setScale(getConfig().getInt("fractionalNumbers"), RoundingMode.HALF_UP);
|
||||
amount = bigDecimal.doubleValue();
|
||||
if(getConfig().getBoolean("hideEmptyFractionalPart") && (amount%1.0) == 0.0) {
|
||||
return before + ((int)amount) + after;
|
||||
} else {
|
||||
return before + bigDecimal.toString() + after;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function for quitting the plugin, NOT USED ATM
|
||||
@@ -315,12 +434,9 @@ public final class AreaShop extends JavaPlugin {
|
||||
/**
|
||||
* Return the config configured by the user or the default
|
||||
*/
|
||||
public Configuration config() {
|
||||
if(configOk) {
|
||||
return this.getConfig();
|
||||
} else {
|
||||
return this.getConfig().getDefaults();
|
||||
}
|
||||
@Override
|
||||
public YamlConfiguration getConfig() {
|
||||
return fileManager.getConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -330,7 +446,7 @@ public final class AreaShop extends JavaPlugin {
|
||||
try {
|
||||
Metrics metrics = new Metrics(this);
|
||||
metrics.start();
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
AreaShop.debug("Could not start Metrics");
|
||||
}
|
||||
}
|
||||
@@ -349,11 +465,11 @@ public final class AreaShop extends JavaPlugin {
|
||||
/* Check if the suffix is one of these values */
|
||||
String suffix = time.substring(time.indexOf(' ')+1, time.length());
|
||||
ArrayList<String> identifiers = new ArrayList<String>();
|
||||
identifiers.addAll(this.config().getStringList("minutes"));
|
||||
identifiers.addAll(this.config().getStringList("hours"));
|
||||
identifiers.addAll(this.config().getStringList("days"));
|
||||
identifiers.addAll(this.config().getStringList("months"));
|
||||
identifiers.addAll(this.config().getStringList("years"));
|
||||
identifiers.addAll(this.getConfig().getStringList("minutes"));
|
||||
identifiers.addAll(this.getConfig().getStringList("hours"));
|
||||
identifiers.addAll(this.getConfig().getStringList("days"));
|
||||
identifiers.addAll(this.getConfig().getStringList("months"));
|
||||
identifiers.addAll(this.getConfig().getStringList("years"));
|
||||
if(!identifiers.contains(suffix)) {
|
||||
return false;
|
||||
}
|
||||
@@ -374,16 +490,14 @@ public final class AreaShop extends JavaPlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload the config of the plugin
|
||||
* Reload all files of the plugin
|
||||
*/
|
||||
public void reload() {
|
||||
this.saveDefaultConfig();
|
||||
this.reloadConfig();
|
||||
configOk = true;
|
||||
chatprefix = this.config().getString("chatPrefix");
|
||||
fileManager.saveRequiredFilesAtOnce();
|
||||
chatprefix = this.getConfig().getString("chatPrefix");
|
||||
debug = this.getConfig().getBoolean("debug");
|
||||
languageManager = new LanguageManager(this);
|
||||
fileManager.loadFiles();
|
||||
languageManager = new LanguageManager(this);
|
||||
fileManager.checkRents();
|
||||
}
|
||||
|
||||
+42
-30
@@ -1,35 +1,41 @@
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.commands.AddCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.AddsignCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.BuyCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.CommandAreaShop;
|
||||
import nl.evolutioncoding.AreaShop.commands.DelCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.DelsignCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.FindCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.GroupaddCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.GroupdelCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.GroupinfoCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.GrouplistCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.HelpCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.InfoCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.ReloadCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.RentCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.RentdurationCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.SchematiceventCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.SellCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.SetpriceCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.SetrestoreCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.SetteleportCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.TeleportCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.UnrentCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.UpdatebuysCommand;
|
||||
import nl.evolutioncoding.AreaShop.commands.UpdaterentsCommand;
|
||||
import nl.evolutioncoding.areashop.commands.AddCommand;
|
||||
import nl.evolutioncoding.areashop.commands.AddfriendCommand;
|
||||
import nl.evolutioncoding.areashop.commands.AddsignCommand;
|
||||
import nl.evolutioncoding.areashop.commands.BuyCommand;
|
||||
import nl.evolutioncoding.areashop.commands.CommandAreaShop;
|
||||
import nl.evolutioncoding.areashop.commands.DelCommand;
|
||||
import nl.evolutioncoding.areashop.commands.DelfriendCommand;
|
||||
import nl.evolutioncoding.areashop.commands.DelsignCommand;
|
||||
import nl.evolutioncoding.areashop.commands.FindCommand;
|
||||
import nl.evolutioncoding.areashop.commands.GroupaddCommand;
|
||||
import nl.evolutioncoding.areashop.commands.GroupdelCommand;
|
||||
import nl.evolutioncoding.areashop.commands.GroupinfoCommand;
|
||||
import nl.evolutioncoding.areashop.commands.GrouplistCommand;
|
||||
import nl.evolutioncoding.areashop.commands.HelpCommand;
|
||||
import nl.evolutioncoding.areashop.commands.InfoCommand;
|
||||
import nl.evolutioncoding.areashop.commands.MeCommand;
|
||||
import nl.evolutioncoding.areashop.commands.ReloadCommand;
|
||||
import nl.evolutioncoding.areashop.commands.RentCommand;
|
||||
import nl.evolutioncoding.areashop.commands.ResellCommand;
|
||||
import nl.evolutioncoding.areashop.commands.SchematiceventCommand;
|
||||
import nl.evolutioncoding.areashop.commands.SellCommand;
|
||||
import nl.evolutioncoding.areashop.commands.SetdurationCommand;
|
||||
import nl.evolutioncoding.areashop.commands.SetownerCommand;
|
||||
import nl.evolutioncoding.areashop.commands.SetpriceCommand;
|
||||
import nl.evolutioncoding.areashop.commands.SetrestoreCommand;
|
||||
import nl.evolutioncoding.areashop.commands.SetteleportCommand;
|
||||
import nl.evolutioncoding.areashop.commands.StopresellCommand;
|
||||
import nl.evolutioncoding.areashop.commands.TeleportCommand;
|
||||
import nl.evolutioncoding.areashop.commands.UnrentCommand;
|
||||
import nl.evolutioncoding.areashop.commands.UpdatebuysCommand;
|
||||
import nl.evolutioncoding.areashop.commands.UpdaterentsCommand;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -54,15 +60,21 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
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 UpdaterentsCommand(plugin));
|
||||
commands.add(new UpdatebuysCommand(plugin));
|
||||
commands.add(new SetrestoreCommand(plugin));
|
||||
commands.add(new SetpriceCommand(plugin));
|
||||
commands.add(new RentdurationCommand(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));
|
||||
@@ -94,8 +106,8 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
public void showHelp(CommandSender target) {
|
||||
/* Add all messages to a list */
|
||||
ArrayList<String> messages = new ArrayList<String>();
|
||||
messages.add(plugin.config().getString("chatPrefix") + plugin.getLanguageManager().getLang("help-header"));
|
||||
messages.add(plugin.config().getString("chatPrefix") + plugin.getLanguageManager().getLang("help-alias"));
|
||||
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) {
|
||||
@@ -105,7 +117,7 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
|
||||
/* Send the messages to the target */
|
||||
for(String message : messages) {
|
||||
if(!plugin.config().getBoolean("useColorsInConsole") && !(target instanceof Player)) {
|
||||
if(!plugin.getConfig().getBoolean("useColorsInConsole") && !(target instanceof Player)) {
|
||||
target.sendMessage(ChatColor.stripColor(plugin.fixColors(message)));
|
||||
} else {
|
||||
target.sendMessage(plugin.fixColors(message));
|
||||
+515
-131
@@ -1,36 +1,41 @@
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.Exceptions.RegionCreateException;
|
||||
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.RegionGroup;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
import nl.evolutioncoding.areashop.exceptions.RegionCreateException;
|
||||
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.RegionGroup;
|
||||
import nl.evolutioncoding.areashop.regions.RentRegion;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.io.Files;
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
|
||||
@@ -48,10 +53,14 @@ public class FileManager {
|
||||
private HashMap<String, GeneralRegion> regions = null;
|
||||
private String regionsPath = null;
|
||||
private HashMap<String, RegionGroup> groups = null;
|
||||
private String configPath = null;
|
||||
private YamlConfiguration config = null;
|
||||
private String groupsPath = null;
|
||||
private YamlConfiguration groupsConfig = null;
|
||||
private String defaultPath = null;
|
||||
private YamlConfiguration defaultConfig = null;
|
||||
private boolean saveGroupsRequired = false;
|
||||
private Set<String> worldRegionsRequireSaving;
|
||||
|
||||
private HashMap<String,Integer> versions = null;
|
||||
private String versionPath = null;
|
||||
@@ -65,11 +74,13 @@ public class FileManager {
|
||||
this.plugin = plugin;
|
||||
regions = new HashMap<String, GeneralRegion>();
|
||||
regionsPath = plugin.getDataFolder() + File.separator + AreaShop.regionsFolder;
|
||||
configPath = plugin.getDataFolder() + File.separator + "config.yml";
|
||||
groups = new HashMap<String, RegionGroup>();
|
||||
groupsPath = plugin.getDataFolder() + File.separator + AreaShop.groupsFile;
|
||||
defaultPath = plugin.getDataFolder() + File.separator + AreaShop.defaultFile;
|
||||
versionPath = plugin.getDataFolder().getPath() + File.separator + AreaShop.versionFile;
|
||||
schemFolder = plugin.getDataFolder() + File.separator + AreaShop.schematicFolder;
|
||||
worldRegionsRequireSaving = new HashSet<String>();
|
||||
File schemFile = new File(schemFolder);
|
||||
if(!schemFile.exists()) {
|
||||
schemFile.mkdirs();
|
||||
@@ -109,6 +120,10 @@ public class FileManager {
|
||||
return defaultConfig;
|
||||
}
|
||||
|
||||
public YamlConfiguration getConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
public GeneralRegion getRegion(String name) {
|
||||
return regions.get(name.toLowerCase());
|
||||
}
|
||||
@@ -194,9 +209,9 @@ public class FileManager {
|
||||
public void addRent(RentRegion rent) {
|
||||
if(rent == null) {
|
||||
AreaShop.debug("Tried adding a null rent!");
|
||||
return;
|
||||
}
|
||||
regions.put(rent.getName().toLowerCase(), rent);
|
||||
rent.save();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,9 +222,9 @@ public class FileManager {
|
||||
public void addBuy(BuyRegion buy) {
|
||||
if(buy == null) {
|
||||
AreaShop.debug("Tried adding a null buy!");
|
||||
return;
|
||||
}
|
||||
regions.put(buy.getName().toLowerCase(), buy);
|
||||
buy.save();
|
||||
}
|
||||
|
||||
public void addGroup(RegionGroup group) {
|
||||
@@ -221,7 +236,6 @@ public class FileManager {
|
||||
groupsConfig.set(lowGroup + ".name", group.getName());
|
||||
groupsConfig.set(lowGroup + ".priority", 0);
|
||||
}
|
||||
saveGroups();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,6 +245,7 @@ public class FileManager {
|
||||
public boolean removeRent(RentRegion rent, boolean giveMoneyBack) {
|
||||
boolean result = false;
|
||||
if(rent != null) {
|
||||
rent.setDeleted();
|
||||
if(rent.isRented()) {
|
||||
rent.unRent(giveMoneyBack);
|
||||
}
|
||||
@@ -238,30 +253,32 @@ public class FileManager {
|
||||
rent.handleSchematicEvent(RegionEvent.DELETED);
|
||||
rent.runEventCommands(RegionEvent.DELETED, true);
|
||||
|
||||
/* Delete the sign and the variable */
|
||||
/* Delete the signs and the variable */
|
||||
if(rent.getWorld() != null) {
|
||||
for(Location sign : rent.getSignLocations()) {
|
||||
sign.getBlock().setType(Material.AIR);
|
||||
AreaShop.debug("Removed sign at: " + sign.toString());
|
||||
}
|
||||
}
|
||||
RegionGroup[] groups = getGroups().toArray(new RegionGroup[getGroups().size()]);
|
||||
for(RegionGroup group : groups) {
|
||||
group.removeMember(rent);
|
||||
}
|
||||
saveGroupsIsRequired();
|
||||
rent.resetRegionFlags();
|
||||
regions.remove(rent.getLowerCaseName());
|
||||
File file = new File(plugin.getDataFolder() + File.separator + AreaShop.regionsFolder + File.separator + rent.getLowerCaseName() + ".yml");
|
||||
boolean deleted = true;
|
||||
try {
|
||||
deleted = file.delete();
|
||||
} catch(Exception e) {
|
||||
deleted = false;
|
||||
if(file.exists()) {
|
||||
try {
|
||||
deleted = file.delete();
|
||||
} catch(Exception e) {
|
||||
deleted = false;
|
||||
}
|
||||
if(!deleted) {
|
||||
plugin.getLogger().warning("File could not be deleted: " + file.toString());
|
||||
}
|
||||
}
|
||||
if(!deleted) {
|
||||
plugin.getLogger().warning("File could not be deleted: " + file.toString());
|
||||
}
|
||||
|
||||
|
||||
result = true;
|
||||
|
||||
// Run commands
|
||||
@@ -291,6 +308,7 @@ public class FileManager {
|
||||
public boolean removeBuy(BuyRegion buy, boolean giveMoneyBack) {
|
||||
boolean result = false;
|
||||
if(buy != null) {
|
||||
buy.setDeleted();
|
||||
if(buy.isSold()) {
|
||||
buy.sell(giveMoneyBack);
|
||||
}
|
||||
@@ -303,7 +321,7 @@ public class FileManager {
|
||||
for(Location sign : buy.getSignLocations()) {
|
||||
sign.getBlock().setType(Material.AIR);
|
||||
}
|
||||
}
|
||||
}
|
||||
regions.remove(buy.getLowerCaseName());
|
||||
buy.resetRegionFlags();
|
||||
|
||||
@@ -311,17 +329,20 @@ public class FileManager {
|
||||
for(RegionGroup group : getGroups()) {
|
||||
group.removeMember(buy);
|
||||
}
|
||||
saveGroupsIsRequired();
|
||||
|
||||
// Deleting the file
|
||||
File file = new File(plugin.getDataFolder() + File.separator + AreaShop.regionsFolder + File.separator + buy.getLowerCaseName() + ".yml");
|
||||
boolean deleted = true;
|
||||
try {
|
||||
deleted = file.delete();
|
||||
} catch(Exception e) {
|
||||
deleted = false;
|
||||
}
|
||||
if(!deleted) {
|
||||
plugin.getLogger().warning("File could not be deleted: " + file.toString());
|
||||
if(file.exists()) {
|
||||
try {
|
||||
deleted = file.delete();
|
||||
} catch(Exception e) {
|
||||
deleted = false;
|
||||
}
|
||||
if(!deleted) {
|
||||
plugin.getLogger().warning("File could not be deleted: " + file.toString());
|
||||
}
|
||||
}
|
||||
|
||||
result = true;
|
||||
@@ -339,52 +360,161 @@ public class FileManager {
|
||||
public void removeGroup(RegionGroup group) {
|
||||
groups.remove(group.getLowerCaseName());
|
||||
groupsConfig.set(group.getLowerCaseName(), null);
|
||||
saveGroups();
|
||||
saveGroupsIsRequired();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all signs that need periodic updating
|
||||
*/
|
||||
public void performPeriodicSignUpdate() {
|
||||
final List<RentRegion> regions = new ArrayList<RentRegion>(getRents());
|
||||
new BukkitRunnable() {
|
||||
private int current = 0;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for(int i=0; i<plugin.getConfig().getInt("signs.regionsPerTick"); i++) {
|
||||
if(current < regions.size()) {
|
||||
if(regions.get(current).needsPeriodicUpdating()) {
|
||||
regions.get(current).updateSigns();
|
||||
}
|
||||
current++;
|
||||
}
|
||||
}
|
||||
if(current >= regions.size()) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(plugin, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send out rent expire warnings
|
||||
*/
|
||||
public void sendRentExpireWarnings() {
|
||||
final List<RentRegion> regions = new ArrayList<RentRegion>(getRents());
|
||||
new BukkitRunnable() {
|
||||
private int current = 0;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for(int i=0; i<plugin.getConfig().getInt("expireWarning.regionsPerTick"); i++) {
|
||||
if(current < regions.size()) {
|
||||
regions.get(current).sendExpirationWarnings();
|
||||
current++;
|
||||
}
|
||||
}
|
||||
if(current >= regions.size()) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(plugin, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all rent signs
|
||||
* @return true if all signs are updated, otherwise false
|
||||
* @param confirmationReceiver who needs to get the confirmation message, null if nobody
|
||||
*/
|
||||
public boolean updateRentSigns() {
|
||||
boolean result = true;
|
||||
for(RentRegion rent : getRents()) {
|
||||
result = result & rent.updateSigns();
|
||||
}
|
||||
return result;
|
||||
public void updateRentSignsAndFlags(final CommandSender confirmationReceiver) {
|
||||
final List<RentRegion> regions = new ArrayList<RentRegion>(getRents());
|
||||
new BukkitRunnable() {
|
||||
private int current = 0;
|
||||
private boolean result = true;
|
||||
@Override
|
||||
public void run() {
|
||||
for(int i=0; i<plugin.getConfig().getInt("update.regionsPerTick"); i++) {
|
||||
if(current < regions.size()) {
|
||||
result = regions.get(current).updateSigns() && result;
|
||||
regions.get(current).updateRegionFlags();
|
||||
current++;
|
||||
}
|
||||
}
|
||||
if(current >= regions.size()) {
|
||||
if(confirmationReceiver != null) {
|
||||
if(result) {
|
||||
plugin.message(confirmationReceiver, "rents-updated");
|
||||
} else {
|
||||
plugin.message(confirmationReceiver, "rents-notUpdated");
|
||||
}
|
||||
}
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(plugin, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all buy signs
|
||||
* @return true if all signs are updated, otherwise false
|
||||
* @param confirmationReceiver who needs to get the confirmation message, null if nobody
|
||||
*/
|
||||
public boolean updateBuySigns() {
|
||||
boolean result = true;
|
||||
for(BuyRegion buy : getBuys()) {
|
||||
result = result & buy.updateSigns();
|
||||
}
|
||||
return result;
|
||||
public void updateBuySignsAndFlags(final CommandSender confirmationReceiver) {
|
||||
final List<BuyRegion> regions = new ArrayList<BuyRegion>(getBuys());
|
||||
new BukkitRunnable() {
|
||||
private int current = 0;
|
||||
private boolean result = true;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for(int i=0; i<plugin.getConfig().getInt("update.regionsPerTick"); i++) {
|
||||
if(current < regions.size()) {
|
||||
regions.get(current).updateSigns();
|
||||
regions.get(current).updateRegionFlags();
|
||||
current++;
|
||||
}
|
||||
}
|
||||
if(current >= regions.size()) {
|
||||
if(confirmationReceiver != null) {
|
||||
if(result) {
|
||||
plugin.message(confirmationReceiver, "buys-updated");
|
||||
} else {
|
||||
plugin.message(confirmationReceiver, "buys-notUpdated");
|
||||
}
|
||||
}
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(plugin, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all regions registered for renting
|
||||
* Update regions in a task to minimize lag
|
||||
* @param regions Regions to update
|
||||
*/
|
||||
public void updateRentRegions() {
|
||||
for(RentRegion rent : getRents()) {
|
||||
rent.updateRegionFlags();
|
||||
}
|
||||
public void updateRegions(final List<GeneralRegion> regions) {
|
||||
new BukkitRunnable() {
|
||||
private int current = 0;
|
||||
@Override
|
||||
public void run() {
|
||||
for(int i=0; i<plugin.getConfig().getInt("update.regionsPerTick"); i++) {
|
||||
if(current < regions.size()) {
|
||||
regions.get(current).updateSigns();
|
||||
regions.get(current).updateRegionFlags();
|
||||
current++;
|
||||
}
|
||||
}
|
||||
if(current >= regions.size()) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(plugin, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all regions registered for buying
|
||||
* Save the group file to disk
|
||||
*/
|
||||
public void updateBuyRegions() {
|
||||
for(BuyRegion buy : getBuys()) {
|
||||
buy.updateRegionFlags();
|
||||
}
|
||||
public void saveGroupsIsRequired() {
|
||||
AreaShop.debug("saveGroupsRequired() set");
|
||||
saveGroupsRequired = true;
|
||||
}
|
||||
public boolean isSaveGroupsRequired() {
|
||||
return saveGroupsRequired;
|
||||
}
|
||||
|
||||
public void saveGroups() {
|
||||
public void saveGroupsNow() {
|
||||
AreaShop.debug("saveGroupsNow() done");
|
||||
saveGroupsRequired = false;
|
||||
try {
|
||||
groupsConfig.save(groupsPath);
|
||||
} catch (IOException e) {
|
||||
@@ -392,45 +522,133 @@ public class FileManager {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Save all region related files
|
||||
* Save all region related files spread over time (low load)
|
||||
*/
|
||||
public void saveAll() {
|
||||
// Safe regions
|
||||
for(GeneralRegion region : getRegions()) {
|
||||
region.save();
|
||||
public void saveRequiredFiles() {
|
||||
if(isSaveGroupsRequired()) {
|
||||
saveGroupsNow();
|
||||
}
|
||||
this.saveWorldGuardRegions();
|
||||
|
||||
// Safe groups and default config
|
||||
this.saveGroups();
|
||||
try {
|
||||
defaultConfig.save(defaultPath);
|
||||
} catch (IOException e) {
|
||||
plugin.getLogger().warning("Default file could not be saved: " + defaultPath);
|
||||
}
|
||||
|
||||
final List<GeneralRegion> regions = new ArrayList<GeneralRegion>(getRegions());
|
||||
new BukkitRunnable() {
|
||||
private int current = 0;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for(int i=0; i<plugin.getConfig().getInt("saving.regionsPerTick"); i++) {
|
||||
if(current < regions.size()) {
|
||||
if(regions.get(current).isSaveRequired()) {
|
||||
regions.get(current).saveNow();
|
||||
}
|
||||
current++;
|
||||
}
|
||||
}
|
||||
if(current >= regions.size()) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(plugin, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save all region related files directly (only for cases like onDisable())
|
||||
*/
|
||||
public void saveRequiredFilesAtOnce() {
|
||||
if(isSaveGroupsRequired()) {
|
||||
saveGroupsNow();
|
||||
}
|
||||
for(GeneralRegion region : getRegions()) {
|
||||
if(region.isSaveRequired()) {
|
||||
region.saveNow();
|
||||
}
|
||||
}
|
||||
this.saveWorldGuardRegions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that a/multiple WorldGuard regions need to be saved
|
||||
* @param worldName The world where the regions that should be saved is in
|
||||
*/
|
||||
public void saveIsRequiredForRegionWorld(String worldName) {
|
||||
worldRegionsRequireSaving.add(worldName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save all worldGuard regions that need saving
|
||||
*/
|
||||
public void saveWorldGuardRegions() {
|
||||
for(String world : worldRegionsRequireSaving) {
|
||||
World bukkitWorld = Bukkit.getWorld(world);
|
||||
if(bukkitWorld != null) {
|
||||
RegionManager manager = plugin.getWorldGuard().getRegionManager(bukkitWorld);
|
||||
if(manager != null) {
|
||||
try {
|
||||
//String version = plugin.getWorldGuard().getDescription().getVersion();
|
||||
//AreaShop.debug("WorldGuard version: " + version);
|
||||
manager.saveChanges();
|
||||
} catch(Exception e) {
|
||||
plugin.getLogger().warning("WorldGuard regions in world " + world + " could not be saved");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the folder the region files are located in
|
||||
* @return The folder where the <region>.yml files are in
|
||||
*/
|
||||
public String getRegionFolder() {
|
||||
return regionsPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unrent region that have no time left
|
||||
* Unrent regions that have no time left, regions to check per tick is in the config
|
||||
*/
|
||||
public void checkRents() {
|
||||
/* Check if regions and signs are still present */
|
||||
long now = Calendar.getInstance().getTimeInMillis();
|
||||
for(RentRegion rent : getRents()) {
|
||||
if(rent.isRented() && now > rent.getRentedUntil()) {
|
||||
/* Send message to the player if online */
|
||||
Player player = Bukkit.getPlayer(rent.getRenter());
|
||||
if(player != null) {
|
||||
plugin.message(player, "unrent-expired", rent.getName());
|
||||
final List<RentRegion> regions = new ArrayList<RentRegion>(getRents());
|
||||
new BukkitRunnable() {
|
||||
private int current = 0;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for(int i=0; i<plugin.getConfig().getInt("expiration.regionsPerTick"); i++) {
|
||||
if(current < regions.size()) {
|
||||
regions.get(current).checkExpiration();
|
||||
current++;
|
||||
}
|
||||
}
|
||||
if(current >= regions.size()) {
|
||||
this.cancel();
|
||||
}
|
||||
rent.unRent(false);
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(plugin, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check all regions and unrent/sell them if the player is inactive for too long
|
||||
*/
|
||||
public void checkForInactiveRegions() {
|
||||
final List<GeneralRegion> regions = new ArrayList<GeneralRegion>(getRegions());
|
||||
new BukkitRunnable() {
|
||||
private int current = 0;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for(int i=0; i<plugin.getConfig().getInt("inactive.regionsPerTick"); i++) {
|
||||
if(current < regions.size()) {
|
||||
regions.get(current).checkInactive();
|
||||
current++;
|
||||
}
|
||||
}
|
||||
if(current >= regions.size()) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(plugin, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +665,7 @@ public class FileManager {
|
||||
versions = (HashMap<String,Integer>)input.readObject();
|
||||
input.close();
|
||||
} catch (IOException | ClassNotFoundException | ClassCastException e) {
|
||||
plugin.getLogger().info("Error: Something went wrong reading file: " + versionPath);
|
||||
plugin.getLogger().warning("Something went wrong reading file: " + versionPath);
|
||||
versions = null;
|
||||
}
|
||||
}
|
||||
@@ -470,7 +688,7 @@ public class FileManager {
|
||||
output.writeObject(versions);
|
||||
output.close();
|
||||
} catch (IOException e) {
|
||||
plugin.getLogger().info("File could not be saved: " + versionPath);
|
||||
plugin.getLogger().warning("File could not be saved: " + versionPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -481,16 +699,190 @@ public class FileManager {
|
||||
public boolean loadFiles() {
|
||||
boolean result = false;
|
||||
|
||||
// Load config.yml + add defaults from .jar
|
||||
result = result & loadConfigFile();
|
||||
// Load default.yml + add defaults from .jar
|
||||
result = result & loadDefaultFile();
|
||||
// Convert old formats to the latest
|
||||
convertFiles();
|
||||
// Load region files (regions folder)
|
||||
result = result & loadRegionFiles();
|
||||
// Load groups.yml
|
||||
result = result & loadGroupsFile();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the default.yml file
|
||||
* @return true if it has been loaded successfully, otherwise false
|
||||
*/
|
||||
public boolean loadDefaultFile() {
|
||||
File defaultFile = new File(defaultPath);
|
||||
// Safe the file from the jar to disk if it does not exist
|
||||
if(!defaultFile.exists()) {
|
||||
InputStream input = null;
|
||||
OutputStream output = null;
|
||||
try {
|
||||
input = plugin.getResource(AreaShop.defaultFile);
|
||||
output = new FileOutputStream(defaultFile);
|
||||
|
||||
int read = 0;
|
||||
byte[] bytes = new byte[1024];
|
||||
while ((read = input.read(bytes)) != -1) {
|
||||
output.write(bytes, 0, read);
|
||||
}
|
||||
input.close();
|
||||
output.close();
|
||||
plugin.getLogger().info("File with default region settings has been saved, should only happen on first startup");
|
||||
} catch(IOException e) {
|
||||
try {
|
||||
input.close();
|
||||
output.close();
|
||||
} catch (IOException e1) {} catch (NullPointerException e2) {}
|
||||
|
||||
plugin.getLogger().warning("Something went wrong saving the default region settings: " + defaultFile.getPath());
|
||||
}
|
||||
}
|
||||
// Load default.yml from the plugin folder
|
||||
InputStreamReader reader = null;
|
||||
try {
|
||||
reader = new InputStreamReader(new FileInputStream(defaultFile), Charsets.UTF_8);
|
||||
} catch (FileNotFoundException e) {}
|
||||
if(reader != null) {
|
||||
defaultConfig = YamlConfiguration.loadConfiguration(reader);
|
||||
}
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException e) {}
|
||||
if(defaultConfig == null) {
|
||||
defaultConfig = new YamlConfiguration();
|
||||
}
|
||||
|
||||
// Load regions
|
||||
// Addding the defaults from the normal file that is inside the jar is disabled, not nice when removing lines for things you don't want
|
||||
InputStream inputStream = plugin.getResource(AreaShop.defaultFile);
|
||||
if(inputStream != null) {
|
||||
reader = new InputStreamReader(inputStream, Charsets.UTF_8);
|
||||
}
|
||||
if(reader != null) {
|
||||
defaultConfig.addDefaults(YamlConfiguration.loadConfiguration(reader));
|
||||
}
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException e) {}
|
||||
return defaultConfig != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the default.yml file
|
||||
* @return true if it has been loaded successfully, otherwise false
|
||||
*/
|
||||
public boolean loadConfigFile() {
|
||||
File configFile = new File(configPath);
|
||||
// Safe the file from the jar to disk if it does not exist
|
||||
if(!configFile.exists()) {
|
||||
InputStream input = null;
|
||||
OutputStream output = null;
|
||||
try {
|
||||
input = plugin.getResource(AreaShop.configFile);
|
||||
output = new FileOutputStream(configFile);
|
||||
|
||||
int read = 0;
|
||||
byte[] bytes = new byte[1024];
|
||||
while ((read = input.read(bytes)) != -1) {
|
||||
output.write(bytes, 0, read);
|
||||
}
|
||||
input.close();
|
||||
output.close();
|
||||
plugin.getLogger().info("Default config file has been saved, should only happen on first startup");
|
||||
} catch(IOException e) {
|
||||
try {
|
||||
input.close();
|
||||
output.close();
|
||||
} catch (IOException e1) {} catch (NullPointerException e2) {}
|
||||
|
||||
plugin.getLogger().warning("Something went wrong saving the config file: " + configFile.getPath());
|
||||
}
|
||||
}
|
||||
// Load config.yml from the plugin folder
|
||||
InputStreamReader reader = null;
|
||||
try {
|
||||
reader = new InputStreamReader(new FileInputStream(configFile), Charsets.UTF_8);
|
||||
} catch (FileNotFoundException e) {}
|
||||
if(reader != null) {
|
||||
config = YamlConfiguration.loadConfiguration(reader);
|
||||
}
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException e) {}
|
||||
if(config == null) {
|
||||
config = new YamlConfiguration();
|
||||
}
|
||||
// Add the values from the config.yml file inside of the .jar as defaults
|
||||
InputStream inputStream = plugin.getResource(AreaShop.configFile);
|
||||
if(inputStream != null) {
|
||||
reader = new InputStreamReader(inputStream, Charsets.UTF_8);
|
||||
}
|
||||
if(reader != null) {
|
||||
config.addDefaults(YamlConfiguration.loadConfiguration(reader));
|
||||
}
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException e) {}
|
||||
return config != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the groups.yml file from disk
|
||||
* @return
|
||||
*/
|
||||
public boolean loadGroupsFile() {
|
||||
File groupFile = new File(groupsPath);
|
||||
InputStreamReader reader = null;
|
||||
if(groupFile.exists() && groupFile.isFile()) {
|
||||
try {
|
||||
reader = new InputStreamReader(new FileInputStream(groupFile), Charsets.UTF_8);
|
||||
} catch (FileNotFoundException e) {}
|
||||
if(reader != null) {
|
||||
groupsConfig = YamlConfiguration.loadConfiguration(reader);
|
||||
}
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException e) {}
|
||||
|
||||
}
|
||||
if(groupsConfig == null) {
|
||||
groupsConfig = new YamlConfiguration();
|
||||
}
|
||||
for(String groupName : groupsConfig.getKeys(false)) {
|
||||
RegionGroup group = new RegionGroup(plugin, groupName);
|
||||
groups.put(groupName, group);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all region files
|
||||
* @return true
|
||||
*/
|
||||
public boolean loadRegionFiles() {
|
||||
File file = new File(regionsPath);
|
||||
if(!file.exists()) {
|
||||
file.mkdirs();
|
||||
} else if(file.isDirectory()) {
|
||||
for(File region : file.listFiles()) {
|
||||
if(region.isFile()) {
|
||||
YamlConfiguration config = YamlConfiguration.loadConfiguration(region);
|
||||
InputStreamReader reader = null;
|
||||
YamlConfiguration config = null;
|
||||
try {
|
||||
reader = new InputStreamReader(new FileInputStream(region), Charsets.UTF_8);
|
||||
} catch (FileNotFoundException e) {}
|
||||
if(reader != null) {
|
||||
config = YamlConfiguration.loadConfiguration(reader);
|
||||
}
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException e) {}
|
||||
if(RegionType.RENT.getValue().equals(config.getString("general.type"))) {
|
||||
try {
|
||||
RentRegion rent = new RentRegion(plugin, config);
|
||||
@@ -518,47 +910,8 @@ public class FileManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Load groups
|
||||
File groupFile = new File(groupsPath);
|
||||
if(groupFile.exists() && groupFile.isFile()) {
|
||||
groupsConfig = YamlConfiguration.loadConfiguration(groupFile);
|
||||
} else {
|
||||
groupsConfig = new YamlConfiguration();
|
||||
}
|
||||
for(String groupName : groupsConfig.getKeys(false)) {
|
||||
RegionGroup group = new RegionGroup(plugin, groupName);
|
||||
groups.put(groupName, group);
|
||||
}
|
||||
|
||||
// Load default settings
|
||||
File defaultFile = new File(defaultPath);
|
||||
if(!defaultFile.exists()) {
|
||||
InputStream input = null;
|
||||
OutputStream output = null;
|
||||
try {
|
||||
input = plugin.getResource(AreaShop.defaultFile);
|
||||
output = new FileOutputStream(defaultFile);
|
||||
|
||||
int read = 0;
|
||||
byte[] bytes = new byte[1024];
|
||||
while ((read = input.read(bytes)) != -1) {
|
||||
output.write(bytes, 0, read);
|
||||
}
|
||||
input.close();
|
||||
output.close();
|
||||
plugin.getLogger().info("File with default region settings has been saved, should only happen the first time");
|
||||
} catch(IOException e) {
|
||||
try {
|
||||
input.close();
|
||||
output.close();
|
||||
} catch (IOException e1) {} catch (NullPointerException e2) {}
|
||||
|
||||
plugin.getLogger().warning("Something went wrong saving the default region settings: " + defaultFile.getPath());
|
||||
}
|
||||
}
|
||||
defaultConfig = YamlConfiguration.loadConfiguration(defaultFile);
|
||||
return result;
|
||||
// Warnings will be printed in console, no other things can go wrong
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -577,8 +930,10 @@ public class FileManager {
|
||||
|
||||
plugin.getLogger().info("Conversion to a new version of the file format starts, could take some time");
|
||||
|
||||
boolean rentFileFound = false;
|
||||
// Convert old rent files
|
||||
if(rentFile.exists()) {
|
||||
rentFileFound = true;
|
||||
if(!oldFolderFile.exists()) {
|
||||
oldFolderFile.mkdirs();
|
||||
}
|
||||
@@ -605,7 +960,7 @@ public class FileManager {
|
||||
try {
|
||||
Files.move(new File(rentPath), new File(oldFolderPath + "rents"));
|
||||
} catch (Exception e) {
|
||||
plugin.getLogger().info(" Could not create a backup of '" + rentPath + "', check the file permissions (conversion to next version continues)");
|
||||
plugin.getLogger().warning(" Could not create a backup of '" + rentPath + "', check the file permissions (conversion to next version continues)");
|
||||
}
|
||||
// Check if conversion is needed
|
||||
if(versions.get("rents") < 1) {
|
||||
@@ -679,6 +1034,7 @@ public class FileManager {
|
||||
}
|
||||
if(rent.get("playeruuid") != null) {
|
||||
config.set("rent.renter", rent.get("playeruuid"));
|
||||
config.set("rent.renterName", plugin.toName(rent.get("playeruuid")));
|
||||
config.set("rent.rentedUntil", Long.parseLong(rent.get("rented")));
|
||||
}
|
||||
try {
|
||||
@@ -695,8 +1051,10 @@ public class FileManager {
|
||||
versions.put(AreaShop.versionFiles, AreaShop.versionFilesCurrent);
|
||||
saveVersions();
|
||||
}
|
||||
boolean buyFileFound = false;
|
||||
|
||||
if(buyFile.exists()) {
|
||||
buyFileFound = true;
|
||||
if(!oldFolderFile.exists()) {
|
||||
oldFolderFile.mkdirs();
|
||||
}
|
||||
@@ -711,7 +1069,7 @@ public class FileManager {
|
||||
buys = (HashMap<String,HashMap<String,String>>)input.readObject();
|
||||
input.close();
|
||||
} catch (IOException | ClassNotFoundException | ClassCastException e) {
|
||||
plugin.getLogger().warning(" Error: Something went wrong reading file: " + buyPath);
|
||||
plugin.getLogger().warning(" Something went wrong reading file: " + buyPath);
|
||||
}
|
||||
// Delete the file if it is totally wrong
|
||||
if(buys == null) {
|
||||
@@ -723,7 +1081,7 @@ public class FileManager {
|
||||
try {
|
||||
Files.move(new File(buyPath), new File(oldFolderPath + "buys"));
|
||||
} catch (Exception e) {
|
||||
plugin.getLogger().info(" Could not create a backup of '" + buyPath + "', check the file permissions (conversion to next version continues)");
|
||||
plugin.getLogger().warning(" Could not create a backup of '" + buyPath + "', check the file permissions (conversion to next version continues)");
|
||||
}
|
||||
// Check if conversion is needed
|
||||
if(versions.get("buys") < 1) {
|
||||
@@ -797,6 +1155,7 @@ public class FileManager {
|
||||
}
|
||||
if(buy.get("playeruuid") != null) {
|
||||
config.set("buy.buyer", buy.get("playeruuid"));
|
||||
config.set("buy.buyerName", plugin.toName(buy.get("playeruuid")));
|
||||
}
|
||||
try {
|
||||
config.save(new File(regionsPath + File.separator + buy.get("name").toLowerCase() + ".yml"));
|
||||
@@ -812,6 +1171,11 @@ public class FileManager {
|
||||
versions.put(AreaShop.versionFiles, AreaShop.versionFilesCurrent);
|
||||
saveVersions();
|
||||
}
|
||||
if(!buyFileFound && !rentFileFound) {
|
||||
versions.put(AreaShop.versionFiles, AreaShop.versionFilesCurrent);
|
||||
saveVersions();
|
||||
return;
|
||||
}
|
||||
|
||||
// Separate try-catch blocks to try them all individually (don't stop after 1 has failed)
|
||||
try {
|
||||
@@ -933,15 +1297,35 @@ public class FileManager {
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<GeneralRegion> getApplicalbeASRegions(Location location) {
|
||||
// Methods to get the most important AreaShop regions at a certain location
|
||||
public List<RentRegion> getApplicableRentRegions(Location location) {
|
||||
List<RentRegion> result = new ArrayList<RentRegion>();
|
||||
for(GeneralRegion region : getApplicableASRegions(location, RegionType.RENT)) {
|
||||
result.add((RentRegion)region);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public List<BuyRegion> getApplicableBuyRegions(Location location) {
|
||||
List<BuyRegion> result = new ArrayList<BuyRegion>();
|
||||
for(GeneralRegion region : getApplicableASRegions(location, RegionType.BUY)) {
|
||||
result.add((BuyRegion)region);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public List<GeneralRegion> getAllApplicableRegions(Location location) {
|
||||
return getApplicableASRegions(location, null);
|
||||
}
|
||||
public List<GeneralRegion> getApplicableASRegions(Location location, RegionType type) {
|
||||
List<GeneralRegion> result = new ArrayList<GeneralRegion>();
|
||||
// If the secondLine does not contain a name try to find the region by location
|
||||
ApplicableRegionSet regions = plugin.getWorldGuard().getRegionManager(location.getWorld()).getApplicableRegions(location);
|
||||
if(regions != null) {
|
||||
List<GeneralRegion> candidates = new ArrayList<GeneralRegion>();
|
||||
for(ProtectedRegion pr : regions) {
|
||||
GeneralRegion region = getRegion(pr.getId());
|
||||
if(region != null) {
|
||||
if(region != null && (
|
||||
(type == RegionType.RENT && region.isRentRegion())
|
||||
|| (type == RegionType.BUY && region.isBuyRegion())
|
||||
|| type == null)) {
|
||||
candidates.add(region);
|
||||
}
|
||||
}
|
||||
@@ -963,7 +1347,7 @@ public class FileManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return new ArrayList<GeneralRegion>(result);
|
||||
}
|
||||
|
||||
}
|
||||
+15
-7
@@ -1,4 +1,4 @@
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -12,13 +12,15 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import nl.evolutioncoding.areashop.regions.GeneralRegion;
|
||||
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
|
||||
public class LanguageManager {
|
||||
private AreaShop plugin = null;
|
||||
private String languages[] = {"EN", "NL", "FR"};
|
||||
private String languages[] = {"EN", "NL", "FR", "DE", "PL"};
|
||||
private HashMap<String, String> currentLanguage, defaultLanguage;
|
||||
|
||||
/**
|
||||
@@ -72,7 +74,7 @@ public class LanguageManager {
|
||||
output.close();
|
||||
} catch (IOException e1) {} catch (NullPointerException e2) {}
|
||||
|
||||
plugin.getLogger().info("Something went wrong saving a default language file: " + langFile.getPath());
|
||||
plugin.getLogger().warning("Something went wrong saving a default language file: " + langFile.getPath());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +90,7 @@ public class LanguageManager {
|
||||
|
||||
/* Save the current language file to the HashMap */
|
||||
currentLanguage = new HashMap<String, String>();
|
||||
File file = new File(plugin.getDataFolder() + File.separator + AreaShop.languageFolder + File.separator + plugin.config().getString("language") + ".yml");
|
||||
File file = new File(plugin.getDataFolder() + File.separator + AreaShop.languageFolder + File.separator + plugin.getConfig().getString("language") + ".yml");
|
||||
InputStreamReader reader = null;
|
||||
try {
|
||||
reader = new InputStreamReader(new FileInputStream(file), Charsets.UTF_8);
|
||||
@@ -140,12 +142,18 @@ public class LanguageManager {
|
||||
}
|
||||
|
||||
if(result == null) {
|
||||
plugin.getLogger().info("Wrong key for getting translation: " + key);
|
||||
plugin.getLogger().info("Wrong key for getting translation: " + key + ", please contact the author about this");
|
||||
} else {
|
||||
/* Replace all tags, e.g. %0% */
|
||||
/* Replace all tags like %0% and if given a GeneralRegion apply all replacements */
|
||||
int number=0;
|
||||
for (int i=0; i<params.length; i++) {
|
||||
if(params[i] != null) {
|
||||
result = result.replace("%" + i + "%", params[i].toString());
|
||||
if(params[i] instanceof GeneralRegion) {
|
||||
result = ((GeneralRegion)params[i]).applyAllReplacements(result);
|
||||
} else {
|
||||
result = result.replace("%" + number + "%", params[i].toString());
|
||||
number++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -25,7 +25,7 @@
|
||||
* authors and contributors and should not be interpreted as representing official policies,
|
||||
* either expressed or implied, of anybody else.
|
||||
*/
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
@@ -332,6 +332,7 @@ public class Metrics {
|
||||
boolean onlineMode = Bukkit.getServer().getOnlineMode(); // TRUE if online mode is enabled
|
||||
String pluginVersion = description.getVersion();
|
||||
String serverVersion = Bukkit.getVersion();
|
||||
// TODO change to different method
|
||||
int playersOnline = Bukkit.getServer().getOnlinePlayers().length;
|
||||
|
||||
// END server software specific section -- all code below does not use any code outside of this class / Java
|
||||
@@ -0,0 +1,100 @@
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
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.PlayerLoginEvent;
|
||||
import org.bukkit.event.player.PlayerLoginEvent.Result;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
* Checks for placement of signs for this plugin
|
||||
* @author NLThijs48
|
||||
*/
|
||||
public final class PlayerLoginListener implements Listener {
|
||||
AreaShop plugin;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param plugin The AreaShop plugin
|
||||
*/
|
||||
public PlayerLoginListener(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 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 = region.durationStringToLong(warningSetting);
|
||||
if(region.getTimeLeft() < warningTime) {
|
||||
// Send the warning message later to let it appear after general MOTD messages
|
||||
final RentRegion finalRegion = region;
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
AreaShop.getInstance().message(player, "rent-expireWarning", finalRegion);
|
||||
}
|
||||
}.runTaskLater(plugin, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Notify admins for plugin updates
|
||||
if(plugin.updateAvailable() && player.hasPermission("areashop.notifyupdate")) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
AreaShop.getInstance().message(player, "update-playerNotify", AreaShop.getInstance().getDescription().getVersion(), AreaShop.getInstance().getUpdater().getLatestName());
|
||||
}
|
||||
}.runTaskLater(plugin, 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+12
-6
@@ -1,8 +1,8 @@
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
import nl.evolutioncoding.areashop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.areashop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.areashop.regions.RentRegion;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@@ -35,6 +35,9 @@ public final class SignBreakListener implements Listener {
|
||||
*/
|
||||
@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) {
|
||||
@@ -69,9 +72,12 @@ public final class SignBreakListener implements Listener {
|
||||
* Called when the physics of a block change
|
||||
* @param event The event
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
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());
|
||||
@@ -82,7 +88,7 @@ public final class SignBreakListener implements Listener {
|
||||
return;
|
||||
}
|
||||
region.removeSign(block.getLocation());
|
||||
plugin.getLogger().info("A sign of region " + region.getName() + " has been removed by indirectly breaking it (block below/behind is destroyed)");
|
||||
plugin.getLogger().warning("A sign of region " + region.getName() + " has been removed by indirectly breaking it (block below/behind is destroyed)");
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
-10
@@ -1,11 +1,11 @@
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion.RegionEvent;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
import nl.evolutioncoding.areashop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.areashop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.areashop.regions.RentRegion;
|
||||
import nl.evolutioncoding.areashop.regions.GeneralRegion.RegionEvent;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@@ -39,12 +39,15 @@ public final class SignChangeListener implements Listener {
|
||||
* Called when a sign is changed
|
||||
* @param event The event
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onSignChange(SignChangeEvent event) {
|
||||
if(event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
Player player = event.getPlayer();
|
||||
|
||||
// Check if the sign is meant for this plugin
|
||||
if(event.getLine(0).contains(plugin.config().getString("signTags.rent"))) {
|
||||
if(event.getLine(0).contains(plugin.getConfig().getString("signTags.rent"))) {
|
||||
if(!player.hasPermission("areashop.createrent")) {
|
||||
plugin.message(player, "setup-noPermissionRent");
|
||||
return;
|
||||
@@ -141,8 +144,9 @@ public final class SignChangeListener implements Listener {
|
||||
plugin.message(player, "setup-rentSuccess", rent.getName());
|
||||
// Run commands
|
||||
rent.runEventCommands(RegionEvent.CREATED, false);
|
||||
rent.saveRequired();
|
||||
}
|
||||
} else if (event.getLine(0).contains(plugin.config().getString("signTags.buy"))) {
|
||||
} else if (event.getLine(0).contains(plugin.getConfig().getString("signTags.buy"))) {
|
||||
// Check for permission
|
||||
if(!player.hasPermission("areashop.createbuy")) {
|
||||
plugin.message(player, "setup-noPermissionBuy");
|
||||
@@ -232,8 +236,9 @@ public final class SignChangeListener implements Listener {
|
||||
|
||||
// Run commands
|
||||
buy.runEventCommands(RegionEvent.CREATED, false);
|
||||
buy.saveRequired();
|
||||
}
|
||||
} else if(event.getLine(0).contains(plugin.config().getString("signTags.add"))) {
|
||||
} else if(event.getLine(0).contains(plugin.getConfig().getString("signTags.add"))) {
|
||||
// Check for permission
|
||||
if(!player.hasPermission("areashop.addsign")) {
|
||||
plugin.message(player, "addsign-noPermission");
|
||||
@@ -272,7 +277,7 @@ public final class SignChangeListener implements Listener {
|
||||
region.addSign(event.getBlock().getLocation(), event.getBlock().getType(), sign.getFacing(), thirdLine);
|
||||
plugin.message(player, "addsign-successProfile", region.getName(), thirdLine);
|
||||
}
|
||||
region.save();
|
||||
region.saveRequired();
|
||||
|
||||
// Update the sign later because this event will do it first
|
||||
final GeneralRegion regionUpdate = region;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion.ClickType;
|
||||
import nl.evolutioncoding.areashop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.areashop.regions.GeneralRegion.ClickType;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@@ -0,0 +1,745 @@
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Enumeration;
|
||||
import java.util.logging.Level;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.JSONValue;
|
||||
|
||||
/**
|
||||
* Check for updates on BukkitDev for a given plugin, and download the updates if needed.
|
||||
* <p/>
|
||||
* <b>VERY, VERY IMPORTANT</b>: Because there are no standards for adding auto-update toggles in your plugin's config, this system provides NO CHECK WITH YOUR CONFIG to make sure the user has allowed auto-updating.
|
||||
* <br>
|
||||
* It is a <b>BUKKIT POLICY</b> that you include a boolean value in your config that prevents the auto-updater from running <b>AT ALL</b>.
|
||||
* <br>
|
||||
* If you fail to include this option in your config, your plugin will be <b>REJECTED</b> when you attempt to submit it to dev.bukkit.org.
|
||||
* <p/>
|
||||
* An example of a good configuration option would be something similar to 'auto-update: true' - if this value is set to false you may NOT run the auto-updater.
|
||||
* <br>
|
||||
* If you are unsure about these rules, please read the plugin submission guidelines: http://goo.gl/8iU5l
|
||||
*
|
||||
* @author Gravity
|
||||
* @version 2.3
|
||||
*/
|
||||
|
||||
public class Updater {
|
||||
|
||||
/* Constants */
|
||||
|
||||
// Remote file's title
|
||||
private static final String TITLE_VALUE = "name";
|
||||
// Remote file's download link
|
||||
private static final String LINK_VALUE = "downloadUrl";
|
||||
// Remote file's release type
|
||||
private static final String TYPE_VALUE = "releaseType";
|
||||
// Remote file's build version
|
||||
private static final String VERSION_VALUE = "gameVersion";
|
||||
// Path to GET
|
||||
private static final String QUERY = "/servermods/files?projectIds=";
|
||||
// Slugs will be appended to this to get to the project's RSS feed
|
||||
private static final String HOST = "https://api.curseforge.com";
|
||||
// User-agent when querying Curse
|
||||
private static final String USER_AGENT = "Updater (by Gravity)";
|
||||
// Used for locating version numbers in file names
|
||||
private static final String DELIMETER = "^V|[\\s_-]V";
|
||||
// If the version number contains one of these, don't update.
|
||||
private static final String[] NO_UPDATE_TAG = { "-DEV", "-PRE", "-SNAPSHOT" };
|
||||
// Used for downloading files
|
||||
private static final int BYTE_SIZE = 1024;
|
||||
// Config key for api key
|
||||
private static final String API_KEY_CONFIG_KEY = "api-key";
|
||||
// Config key for disabling Updater
|
||||
private static final String DISABLE_CONFIG_KEY = "disable";
|
||||
// Default api key value in config
|
||||
private static final String API_KEY_DEFAULT = "PUT_API_KEY_HERE";
|
||||
// Default disable value in config
|
||||
private static final boolean DISABLE_DEFAULT = false;
|
||||
|
||||
/* User-provided variables */
|
||||
|
||||
// Plugin running Updater
|
||||
private final Plugin plugin;
|
||||
// Type of update check to run
|
||||
private final UpdateType type;
|
||||
// Whether to announce file downloads
|
||||
private final boolean announce;
|
||||
// The plugin file (jar)
|
||||
private final File file;
|
||||
// The folder that downloads will be placed in
|
||||
private final File updateFolder;
|
||||
// The provided callback (if any)
|
||||
private final UpdateCallback callback;
|
||||
// Project's Curse ID
|
||||
private int id = -1;
|
||||
// BukkitDev ServerMods API key
|
||||
private String apiKey = null;
|
||||
|
||||
/* Collected from Curse API */
|
||||
|
||||
private String versionName;
|
||||
private String versionLink;
|
||||
private String versionType;
|
||||
private String versionGameVersion;
|
||||
|
||||
/* Update process variables */
|
||||
|
||||
// Connection to RSS
|
||||
private URL url;
|
||||
// Updater thread
|
||||
private Thread thread;
|
||||
// Used for determining the outcome of the update process
|
||||
private Updater.UpdateResult result = Updater.UpdateResult.SUCCESS;
|
||||
|
||||
/**
|
||||
* Gives the developer the result of the update process. Can be obtained by called {@link #getResult()}
|
||||
*/
|
||||
public enum UpdateResult {
|
||||
/**
|
||||
* The updater found an update, and has readied it to be loaded the next time the server restarts/reloads.
|
||||
*/
|
||||
SUCCESS,
|
||||
/**
|
||||
* The updater did not find an update, and nothing was downloaded.
|
||||
*/
|
||||
NO_UPDATE,
|
||||
/**
|
||||
* The server administrator has disabled the updating system.
|
||||
*/
|
||||
DISABLED,
|
||||
/**
|
||||
* The updater found an update, but was unable to download it.
|
||||
*/
|
||||
FAIL_DOWNLOAD,
|
||||
/**
|
||||
* For some reason, the updater was unable to contact dev.bukkit.org to download the file.
|
||||
*/
|
||||
FAIL_DBO,
|
||||
/**
|
||||
* When running the version check, the file on DBO did not contain a recognizable version.
|
||||
*/
|
||||
FAIL_NOVERSION,
|
||||
/**
|
||||
* The id provided by the plugin running the updater was invalid and doesn't exist on DBO.
|
||||
*/
|
||||
FAIL_BADID,
|
||||
/**
|
||||
* The server administrator has improperly configured their API key in the configuration.
|
||||
*/
|
||||
FAIL_APIKEY,
|
||||
/**
|
||||
* The updater found an update, but because of the UpdateType being set to NO_DOWNLOAD, it wasn't downloaded.
|
||||
*/
|
||||
UPDATE_AVAILABLE
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the developer to specify the type of update that will be run.
|
||||
*/
|
||||
public enum UpdateType {
|
||||
/**
|
||||
* Run a version check, and then if the file is out of date, download the newest version.
|
||||
*/
|
||||
DEFAULT,
|
||||
/**
|
||||
* Don't run a version check, just find the latest update and download it.
|
||||
*/
|
||||
NO_VERSION_CHECK,
|
||||
/**
|
||||
* Get information about the version and the download size, but don't actually download anything.
|
||||
*/
|
||||
NO_DOWNLOAD
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the various release types of a file on BukkitDev.
|
||||
*/
|
||||
public enum ReleaseType {
|
||||
/**
|
||||
* An "alpha" file.
|
||||
*/
|
||||
ALPHA,
|
||||
/**
|
||||
* A "beta" file.
|
||||
*/
|
||||
BETA,
|
||||
/**
|
||||
* A "release" file.
|
||||
*/
|
||||
RELEASE
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the updater.
|
||||
*
|
||||
* @param plugin The plugin that is checking for an update.
|
||||
* @param id The dev.bukkit.org id of the project.
|
||||
* @param file The file that the plugin is running from, get this by doing this.getFile() from within your main class.
|
||||
* @param type Specify the type of update this will be. See {@link UpdateType}
|
||||
* @param announce True if the program should announce the progress of new updates in console.
|
||||
*/
|
||||
public Updater(Plugin plugin, int id, File file, UpdateType type, boolean announce) {
|
||||
this(plugin, id, file, type, null, announce);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the updater with the provided callback.
|
||||
*
|
||||
* @param plugin The plugin that is checking for an update.
|
||||
* @param id The dev.bukkit.org id of the project.
|
||||
* @param file The file that the plugin is running from, get this by doing this.getFile() from within your main class.
|
||||
* @param type Specify the type of update this will be. See {@link UpdateType}
|
||||
* @param callback The callback instance to notify when the Updater has finished
|
||||
*/
|
||||
public Updater(Plugin plugin, int id, File file, UpdateType type, UpdateCallback callback) {
|
||||
this(plugin, id, file, type, callback, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the updater with the provided callback.
|
||||
*
|
||||
* @param plugin The plugin that is checking for an update.
|
||||
* @param id The dev.bukkit.org id of the project.
|
||||
* @param file The file that the plugin is running from, get this by doing this.getFile() from within your main class.
|
||||
* @param type Specify the type of update this will be. See {@link UpdateType}
|
||||
* @param callback The callback instance to notify when the Updater has finished
|
||||
* @param announce True if the program should announce the progress of new updates in console.
|
||||
*/
|
||||
public Updater(Plugin plugin, int id, File file, UpdateType type, UpdateCallback callback, boolean announce) {
|
||||
this.plugin = plugin;
|
||||
this.type = type;
|
||||
this.announce = announce;
|
||||
this.file = file;
|
||||
this.id = id;
|
||||
this.updateFolder = this.plugin.getServer().getUpdateFolderFile();
|
||||
this.callback = callback;
|
||||
|
||||
final File pluginFile = this.plugin.getDataFolder().getParentFile();
|
||||
final File updaterFile = new File(pluginFile, "Updater");
|
||||
final File updaterConfigFile = new File(updaterFile, "config.yml");
|
||||
|
||||
YamlConfiguration config = new YamlConfiguration();
|
||||
config.options().header("This configuration file affects all plugins using the Updater system (version 2+ - http://forums.bukkit.org/threads/96681/ )" + '\n'
|
||||
+ "If you wish to use your API key, read http://wiki.bukkit.org/ServerMods_API and place it below." + '\n'
|
||||
+ "Some updating systems will not adhere to the disabled value, but these may be turned off in their plugin's configuration.");
|
||||
config.addDefault(API_KEY_CONFIG_KEY, API_KEY_DEFAULT);
|
||||
config.addDefault(DISABLE_CONFIG_KEY, DISABLE_DEFAULT);
|
||||
|
||||
if (!updaterFile.exists()) {
|
||||
this.fileIOOrError(updaterFile, updaterFile.mkdir(), true);
|
||||
}
|
||||
|
||||
boolean createFile = !updaterConfigFile.exists();
|
||||
try {
|
||||
if (createFile) {
|
||||
this.fileIOOrError(updaterConfigFile, updaterConfigFile.createNewFile(), true);
|
||||
config.options().copyDefaults(true);
|
||||
config.save(updaterConfigFile);
|
||||
} else {
|
||||
config.load(updaterConfigFile);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
final String message;
|
||||
if (createFile) {
|
||||
message = "The updater could not create configuration at " + updaterFile.getAbsolutePath();
|
||||
} else {
|
||||
message = "The updater could not load configuration at " + updaterFile.getAbsolutePath();
|
||||
}
|
||||
this.plugin.getLogger().log(Level.SEVERE, message, e);
|
||||
}
|
||||
|
||||
if (config.getBoolean(DISABLE_CONFIG_KEY)) {
|
||||
this.result = UpdateResult.DISABLED;
|
||||
return;
|
||||
}
|
||||
|
||||
String key = config.getString(API_KEY_CONFIG_KEY);
|
||||
if (API_KEY_DEFAULT.equalsIgnoreCase(key) || "".equals(key)) {
|
||||
key = null;
|
||||
}
|
||||
|
||||
this.apiKey = key;
|
||||
|
||||
try {
|
||||
this.url = new URL(Updater.HOST + Updater.QUERY + this.id);
|
||||
} catch (final MalformedURLException e) {
|
||||
this.plugin.getLogger().log(Level.SEVERE, "The project ID provided for updating, " + this.id + " is invalid.", e);
|
||||
this.result = UpdateResult.FAIL_BADID;
|
||||
}
|
||||
|
||||
if (this.result != UpdateResult.FAIL_BADID) {
|
||||
this.thread = new Thread(new UpdateRunnable());
|
||||
this.thread.start();
|
||||
} else {
|
||||
runUpdater();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the result of the update process.
|
||||
*
|
||||
* @return result of the update process.
|
||||
* @see UpdateResult
|
||||
*/
|
||||
public Updater.UpdateResult getResult() {
|
||||
this.waitForThread();
|
||||
return this.result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the latest version's release type.
|
||||
*
|
||||
* @return latest version's release type.
|
||||
* @see ReleaseType
|
||||
*/
|
||||
public ReleaseType getLatestType() {
|
||||
this.waitForThread();
|
||||
if (this.versionType != null) {
|
||||
for (ReleaseType type : ReleaseType.values()) {
|
||||
if (this.versionType.equalsIgnoreCase(type.name())) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the latest version's game version (such as "CB 1.2.5-R1.0").
|
||||
*
|
||||
* @return latest version's game version.
|
||||
*/
|
||||
public String getLatestGameVersion() {
|
||||
this.waitForThread();
|
||||
return this.versionGameVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the latest version's name (such as "Project v1.0").
|
||||
*
|
||||
* @return latest version's name.
|
||||
*/
|
||||
public String getLatestName() {
|
||||
this.waitForThread();
|
||||
return this.versionName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the latest version's direct file link.
|
||||
*
|
||||
* @return latest version's file link.
|
||||
*/
|
||||
public String getLatestFileLink() {
|
||||
this.waitForThread();
|
||||
return this.versionLink;
|
||||
}
|
||||
|
||||
/**
|
||||
* As the result of Updater output depends on the thread's completion, it is necessary to wait for the thread to finish
|
||||
* before allowing anyone to check the result.
|
||||
*/
|
||||
private void waitForThread() {
|
||||
if ((this.thread != null) && this.thread.isAlive()) {
|
||||
try {
|
||||
this.thread.join();
|
||||
} catch (final InterruptedException e) {
|
||||
this.plugin.getLogger().log(Level.SEVERE, null, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save an update from dev.bukkit.org into the server's update folder.
|
||||
*
|
||||
* @param file the name of the file to save it as.
|
||||
*/
|
||||
private void saveFile(String file) {
|
||||
final File folder = this.updateFolder;
|
||||
|
||||
deleteOldFiles();
|
||||
if (!folder.exists()) {
|
||||
this.fileIOOrError(folder, folder.mkdir(), true);
|
||||
}
|
||||
downloadFile();
|
||||
|
||||
// Check to see if it's a zip file, if it is, unzip it.
|
||||
final File dFile = new File(folder.getAbsolutePath(), file);
|
||||
if (dFile.getName().endsWith(".zip")) {
|
||||
// Unzip
|
||||
this.unzip(dFile.getAbsolutePath());
|
||||
}
|
||||
if (this.announce) {
|
||||
this.plugin.getLogger().info("Finished updating.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Download a file and save it to the specified folder.
|
||||
*/
|
||||
private void downloadFile() {
|
||||
BufferedInputStream in = null;
|
||||
FileOutputStream fout = null;
|
||||
try {
|
||||
URL fileUrl = new URL(this.versionLink);
|
||||
final int fileLength = fileUrl.openConnection().getContentLength();
|
||||
in = new BufferedInputStream(fileUrl.openStream());
|
||||
fout = new FileOutputStream(new File(this.updateFolder, file.getName()));
|
||||
|
||||
final byte[] data = new byte[Updater.BYTE_SIZE];
|
||||
int count;
|
||||
if (this.announce) {
|
||||
this.plugin.getLogger().info("About to download a new update: " + this.versionName);
|
||||
}
|
||||
long downloaded = 0;
|
||||
while ((count = in.read(data, 0, Updater.BYTE_SIZE)) != -1) {
|
||||
downloaded += count;
|
||||
fout.write(data, 0, count);
|
||||
final int percent = (int) ((downloaded * 100) / fileLength);
|
||||
if (this.announce && ((percent % 10) == 0)) {
|
||||
this.plugin.getLogger().info("Downloading update: " + percent + "% of " + fileLength + " bytes.");
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
this.plugin.getLogger().log(Level.WARNING, "The auto-updater tried to download a new update, but was unsuccessful.", ex);
|
||||
this.result = Updater.UpdateResult.FAIL_DOWNLOAD;
|
||||
} finally {
|
||||
try {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
} catch (final IOException ex) {
|
||||
this.plugin.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
try {
|
||||
if (fout != null) {
|
||||
fout.close();
|
||||
}
|
||||
} catch (final IOException ex) {
|
||||
this.plugin.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove possibly leftover files from the update folder.
|
||||
*/
|
||||
private void deleteOldFiles() {
|
||||
//Just a quick check to make sure we didn't leave any files from last time...
|
||||
File[] list = listFilesOrError(this.updateFolder);
|
||||
for (final File xFile : list) {
|
||||
if (xFile.getName().endsWith(".zip")) {
|
||||
this.fileIOOrError(xFile, xFile.mkdir(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Part of Zip-File-Extractor, modified by Gravity for use with Updater.
|
||||
*
|
||||
* @param file the location of the file to extract.
|
||||
*/
|
||||
private void unzip(String file) {
|
||||
final File fSourceZip = new File(file);
|
||||
try {
|
||||
final String zipPath = file.substring(0, file.length() - 4);
|
||||
ZipFile zipFile = new ZipFile(fSourceZip);
|
||||
Enumeration<? extends ZipEntry> e = zipFile.entries();
|
||||
while (e.hasMoreElements()) {
|
||||
ZipEntry entry = e.nextElement();
|
||||
File destinationFilePath = new File(zipPath, entry.getName());
|
||||
this.fileIOOrError(destinationFilePath.getParentFile(), destinationFilePath.getParentFile().mkdirs(), true);
|
||||
if (!entry.isDirectory()) {
|
||||
final BufferedInputStream bis = new BufferedInputStream(zipFile.getInputStream(entry));
|
||||
int b;
|
||||
final byte[] buffer = new byte[Updater.BYTE_SIZE];
|
||||
final FileOutputStream fos = new FileOutputStream(destinationFilePath);
|
||||
final BufferedOutputStream bos = new BufferedOutputStream(fos, Updater.BYTE_SIZE);
|
||||
while ((b = bis.read(buffer, 0, Updater.BYTE_SIZE)) != -1) {
|
||||
bos.write(buffer, 0, b);
|
||||
}
|
||||
bos.flush();
|
||||
bos.close();
|
||||
bis.close();
|
||||
final String name = destinationFilePath.getName();
|
||||
if (name.endsWith(".jar") && this.pluginExists(name)) {
|
||||
File output = new File(this.updateFolder, name);
|
||||
this.fileIOOrError(output, destinationFilePath.renameTo(output), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
zipFile.close();
|
||||
|
||||
// Move any plugin data folders that were included to the right place, Bukkit won't do this for us.
|
||||
moveNewZipFiles(zipPath);
|
||||
|
||||
} catch (final IOException e) {
|
||||
this.plugin.getLogger().log(Level.SEVERE, "The auto-updater tried to unzip a new update file, but was unsuccessful.", e);
|
||||
this.result = Updater.UpdateResult.FAIL_DOWNLOAD;
|
||||
} finally {
|
||||
this.fileIOOrError(fSourceZip, fSourceZip.delete(), false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find any new files extracted from an update into the plugin's data directory.
|
||||
* @param zipPath path of extracted files.
|
||||
*/
|
||||
private void moveNewZipFiles(String zipPath) {
|
||||
File[] list = listFilesOrError(new File(zipPath));
|
||||
for (final File dFile : list) {
|
||||
if (dFile.isDirectory() && this.pluginExists(dFile.getName())) {
|
||||
// Current dir
|
||||
final File oFile = new File(this.plugin.getDataFolder().getParent(), dFile.getName());
|
||||
// List of existing files in the new dir
|
||||
final File[] dList = listFilesOrError(dFile);
|
||||
// List of existing files in the current dir
|
||||
final File[] oList = listFilesOrError(oFile);
|
||||
for (File cFile : dList) {
|
||||
// Loop through all the files in the new dir
|
||||
boolean found = false;
|
||||
for (final File xFile : oList) {
|
||||
// Loop through all the contents in the current dir to see if it exists
|
||||
if (xFile.getName().equals(cFile.getName())) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
// Move the new file into the current dir
|
||||
File output = new File(oFile, cFile.getName());
|
||||
this.fileIOOrError(output, cFile.renameTo(output), true);
|
||||
} else {
|
||||
// This file already exists, so we don't need it anymore.
|
||||
this.fileIOOrError(cFile, cFile.delete(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.fileIOOrError(dFile, dFile.delete(), false);
|
||||
}
|
||||
File zip = new File(zipPath);
|
||||
this.fileIOOrError(zip, zip.delete(), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the name of a jar is one of the plugins currently installed, used for extracting the correct files out of a zip.
|
||||
*
|
||||
* @param name a name to check for inside the plugins folder.
|
||||
* @return true if a file inside the plugins folder is named this.
|
||||
*/
|
||||
private boolean pluginExists(String name) {
|
||||
File[] plugins = listFilesOrError(new File("plugins"));
|
||||
for (final File file : plugins) {
|
||||
if (file.getName().equals(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if the program should continue by evaluating whether the plugin is already updated, or shouldn't be updated.
|
||||
*
|
||||
* @return true if the version was located and is not the same as the remote's newest.
|
||||
*/
|
||||
private boolean versionCheck() {
|
||||
final String title = this.versionName;
|
||||
if (this.type != UpdateType.NO_VERSION_CHECK) {
|
||||
final String localVersion = this.plugin.getDescription().getVersion();
|
||||
if (title.split(DELIMETER).length == 2) {
|
||||
// Get the newest file's version number
|
||||
final String remoteVersion = title.split(DELIMETER)[1].split(" ")[0];
|
||||
|
||||
if (this.hasTag(localVersion) || !this.shouldUpdate(localVersion, remoteVersion)) {
|
||||
// We already have the latest version, or this build is tagged for no-update
|
||||
this.result = Updater.UpdateResult.NO_UPDATE;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// The file's name did not contain the string 'vVersion'
|
||||
final String authorInfo = this.plugin.getDescription().getAuthors().isEmpty() ? "" : " (" + this.plugin.getDescription().getAuthors().get(0) + ")";
|
||||
this.plugin.getLogger().warning("The author of this plugin" + authorInfo + " has misconfigured their Auto Update system");
|
||||
this.plugin.getLogger().warning("File versions should follow the format 'PluginName vVERSION'");
|
||||
this.plugin.getLogger().warning("Please notify the author of this error.");
|
||||
this.result = Updater.UpdateResult.FAIL_NOVERSION;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* <b>If you wish to run mathematical versioning checks, edit this method.</b>
|
||||
* <p>
|
||||
* With default behavior, Updater will NOT verify that a remote version available on BukkitDev
|
||||
* which is not this version is indeed an "update".
|
||||
* If a version is present on BukkitDev that is not the version that is currently running,
|
||||
* Updater will assume that it is a newer version.
|
||||
* This is because there is no standard versioning scheme, and creating a calculation that can
|
||||
* determine whether a new update is actually an update is sometimes extremely complicated.
|
||||
* </p>
|
||||
* <p>
|
||||
* Updater will call this method from {@link #versionCheck()} before deciding whether
|
||||
* the remote version is actually an update.
|
||||
* If you have a specific versioning scheme with which a mathematical determination can
|
||||
* be reliably made to decide whether one version is higher than another, you may
|
||||
* revise this method, using the local and remote version parameters, to execute the
|
||||
* appropriate check.
|
||||
* </p>
|
||||
* <p>
|
||||
* Returning a value of <b>false</b> will tell the update process that this is NOT a new version.
|
||||
* Without revision, this method will always consider a remote version at all different from
|
||||
* that of the local version a new update.
|
||||
* </p>
|
||||
* @param localVersion the current version
|
||||
* @param remoteVersion the remote version
|
||||
* @return true if Updater should consider the remote version an update, false if not.
|
||||
*/
|
||||
public boolean shouldUpdate(String localVersion, String remoteVersion) {
|
||||
return !localVersion.equalsIgnoreCase(remoteVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate whether the version number is marked showing that it should not be updated by this program.
|
||||
*
|
||||
* @param version a version number to check for tags in.
|
||||
* @return true if updating should be disabled.
|
||||
*/
|
||||
private boolean hasTag(String version) {
|
||||
for (final String string : Updater.NO_UPDATE_TAG) {
|
||||
if (version.contains(string)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a connection to the BukkitDev API and request the newest file's details.
|
||||
*
|
||||
* @return true if successful.
|
||||
*/
|
||||
private boolean read() {
|
||||
try {
|
||||
final URLConnection conn = this.url.openConnection();
|
||||
conn.setConnectTimeout(5000);
|
||||
|
||||
if (this.apiKey != null) {
|
||||
conn.addRequestProperty("X-API-Key", this.apiKey);
|
||||
}
|
||||
conn.addRequestProperty("User-Agent", Updater.USER_AGENT);
|
||||
|
||||
conn.setDoOutput(true);
|
||||
|
||||
final BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
||||
final String response = reader.readLine();
|
||||
|
||||
final JSONArray array = (JSONArray) JSONValue.parse(response);
|
||||
|
||||
if (array.isEmpty()) {
|
||||
this.plugin.getLogger().warning("The updater could not find any files for the project id " + this.id);
|
||||
this.result = UpdateResult.FAIL_BADID;
|
||||
return false;
|
||||
}
|
||||
|
||||
JSONObject latestUpdate = (JSONObject) array.get(array.size() - 1);
|
||||
this.versionName = (String) latestUpdate.get(Updater.TITLE_VALUE);
|
||||
this.versionLink = (String) latestUpdate.get(Updater.LINK_VALUE);
|
||||
this.versionType = (String) latestUpdate.get(Updater.TYPE_VALUE);
|
||||
this.versionGameVersion = (String) latestUpdate.get(Updater.VERSION_VALUE);
|
||||
|
||||
return true;
|
||||
} catch (final IOException e) {
|
||||
if (e.getMessage().contains("HTTP response code: 403")) {
|
||||
this.plugin.getLogger().severe("dev.bukkit.org rejected the API key provided in plugins/Updater/config.yml");
|
||||
this.plugin.getLogger().severe("Please double-check your configuration to ensure it is correct.");
|
||||
this.result = UpdateResult.FAIL_APIKEY;
|
||||
} else {
|
||||
this.plugin.getLogger().severe("The updater could not contact dev.bukkit.org for updating.");
|
||||
this.plugin.getLogger().severe("If you have not recently modified your configuration and this is the first time you are seeing this message, the site may be experiencing temporary downtime.");
|
||||
this.result = UpdateResult.FAIL_DBO;
|
||||
}
|
||||
this.plugin.getLogger().log(Level.SEVERE, null, e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a file operation and log any errors if it fails.
|
||||
* @param file file operation is performed on.
|
||||
* @param result result of file operation.
|
||||
* @param create true if a file is being created, false if deleted.
|
||||
*/
|
||||
private void fileIOOrError(File file, boolean result, boolean create) {
|
||||
if (!result) {
|
||||
this.plugin.getLogger().severe("The updater could not " + (create ? "create" : "delete") + " file at: " + file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
private File[] listFilesOrError(File folder) {
|
||||
File[] contents = folder.listFiles();
|
||||
if (contents == null) {
|
||||
this.plugin.getLogger().severe("The updater could not access files at: " + this.updateFolder.getAbsolutePath());
|
||||
return new File[0];
|
||||
} else {
|
||||
return contents;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on main thread when the Updater has finished working, regardless
|
||||
* of result.
|
||||
*/
|
||||
public interface UpdateCallback {
|
||||
/**
|
||||
* Called when the updater has finished working.
|
||||
* @param updater The updater instance
|
||||
*/
|
||||
void onFinish(Updater updater);
|
||||
}
|
||||
|
||||
private class UpdateRunnable implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
runUpdater();
|
||||
}
|
||||
}
|
||||
|
||||
private void runUpdater() {
|
||||
if (this.url != null && (this.read() && this.versionCheck())) {
|
||||
// Obtain the results of the project's file feed
|
||||
if ((this.versionLink != null) && (this.type != UpdateType.NO_DOWNLOAD)) {
|
||||
String name = this.file.getName();
|
||||
// If it's a zip file, it shouldn't be downloaded as the plugin's name
|
||||
if (this.versionLink.endsWith(".zip")) {
|
||||
name = this.versionLink.substring(this.versionLink.lastIndexOf("/") + 1);
|
||||
}
|
||||
this.saveFile(name);
|
||||
} else {
|
||||
this.result = UpdateResult.UPDATE_AVAILABLE;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.callback != null) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
runCallback();
|
||||
}
|
||||
}.runTask(this.plugin);
|
||||
}
|
||||
}
|
||||
|
||||
private void runCallback() {
|
||||
this.callback.onFinish(this);
|
||||
}
|
||||
}
|
||||
+8
-8
@@ -1,4 +1,4 @@
|
||||
package nl.evolutioncoding.AreaShop;
|
||||
package nl.evolutioncoding.areashop;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -66,18 +66,18 @@ public class Utils {
|
||||
String result = "";
|
||||
boolean first = true;
|
||||
for(Object object : input) {
|
||||
if(first) {
|
||||
first = false;
|
||||
result += object.toString();
|
||||
} else {
|
||||
result += ", " + object.toString();
|
||||
if(object != null) {
|
||||
if(first) {
|
||||
first = false;
|
||||
result += object.toString();
|
||||
} else {
|
||||
result += ", " + object.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
+16
-9
@@ -1,14 +1,14 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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.GeneralRegion.RegionEvent;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
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 nl.evolutioncoding.areashop.regions.GeneralRegion.RegionEvent;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
@@ -40,6 +40,11 @@ public class AddCommand extends CommandAreaShop {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.createrent") && !sender.hasPermission("areashop.createbuy")) {
|
||||
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;
|
||||
@@ -56,7 +61,7 @@ public class AddCommand extends CommandAreaShop {
|
||||
plugin.message(sender, "cmd-weOnlyByPlayer");
|
||||
return;
|
||||
}
|
||||
Player player = (Player)sender;
|
||||
Player player = (Player)sender;
|
||||
Selection selection = plugin.getWorldEdit().getSelection(player);
|
||||
if(selection == null) {
|
||||
plugin.message(player, "cmd-noSelection");
|
||||
@@ -117,6 +122,7 @@ public class AddCommand extends CommandAreaShop {
|
||||
rent.updateRegionFlags();
|
||||
// Run commands
|
||||
rent.runEventCommands(RegionEvent.CREATED, false);
|
||||
rent.saveRequired();
|
||||
} else {
|
||||
BuyRegion buy = new BuyRegion(plugin, region.getId(), world);
|
||||
// Run commands
|
||||
@@ -128,8 +134,9 @@ public class AddCommand extends CommandAreaShop {
|
||||
buy.updateRegionFlags();
|
||||
// Run commands
|
||||
buy.runEventCommands(RegionEvent.CREATED, false);
|
||||
buy.saveRequired();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(namesSuccess.size() != 0) {
|
||||
plugin.message(sender, "add-success", args[1], Utils.createCommaSeparatedList(namesSuccess));
|
||||
@@ -0,0 +1,142 @@
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
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, Command command, 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 = null;
|
||||
if(args.length <= 2) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().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");
|
||||
return;
|
||||
}
|
||||
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
|
||||
if(region.getFriends().contains(friend.getUniqueId())) {
|
||||
plugin.message(sender, "addfriend-alreadyAdded", friend.getName());
|
||||
return;
|
||||
}
|
||||
if(region.isOwner(friend.getUniqueId())) {
|
||||
plugin.message(sender, "addfriend-self", friend.getName());
|
||||
return;
|
||||
}
|
||||
region.addFriend(friend.getUniqueId());
|
||||
region.saveRequired();
|
||||
region.updateRegionFlags();
|
||||
region.updateSigns();
|
||||
plugin.message(sender, "addfriend-successOther", friend.getName(), region.getName());
|
||||
} else {
|
||||
if(sender.hasPermission("areashop.addfriend") && sender instanceof Player) {
|
||||
if(region.isOwner((Player)sender)) {
|
||||
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
|
||||
if(region.getFriends().contains(friend.getUniqueId())) {
|
||||
plugin.message(sender, "addfriend-alreadyAdded", friend.getName());
|
||||
return;
|
||||
}
|
||||
if(region.isOwner(friend.getUniqueId())) {
|
||||
plugin.message(sender, "addfriend-self", friend.getName());
|
||||
return;
|
||||
}
|
||||
region.addFriend(friend.getUniqueId());
|
||||
region.saveRequired();
|
||||
region.updateRegionFlags();
|
||||
region.updateSigns();
|
||||
plugin.message(sender, "addfriend-success", friend.getName(), region.getName());
|
||||
} else {
|
||||
plugin.message(sender, "addfriend-noPermissionOther");
|
||||
}
|
||||
} else {
|
||||
plugin.message(sender, "addfriend-noPermission");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompleteList(int toComplete, String[] start) {
|
||||
ArrayList<String> result = new ArrayList<String>();
|
||||
if(toComplete == 2) {
|
||||
for(Player player : Bukkit.getOnlinePlayers()) {
|
||||
result.add(player.getName());
|
||||
}
|
||||
} else if(toComplete == 3) {
|
||||
result.addAll(plugin.getFileManager().getRegionNames());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+13
-12
@@ -1,12 +1,12 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.Utils;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
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;
|
||||
@@ -39,15 +39,16 @@ public class AddsignCommand extends CommandAreaShop {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, 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;
|
||||
if(!player.hasPermission("areashop.addsign")) {
|
||||
plugin.message(sender, "addsign-noPermission");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the sign
|
||||
Block block = null;
|
||||
BlockIterator blockIterator = new BlockIterator(player, 100);
|
||||
@@ -86,7 +87,7 @@ public class AddsignCommand extends CommandAreaShop {
|
||||
String profile = null;
|
||||
if(args.length > 2) {
|
||||
profile = args[2];
|
||||
Set<String> profiles = plugin.config().getConfigurationSection("signProfiles").getKeys(false);
|
||||
Set<String> profiles = plugin.getConfig().getConfigurationSection("signProfiles").getKeys(false);
|
||||
if(!profiles.contains(profile)) {
|
||||
plugin.message(sender, "addsign-wrongProfile", Utils.createCommaSeparatedList(profiles));
|
||||
return;
|
||||
@@ -105,7 +106,7 @@ public class AddsignCommand extends CommandAreaShop {
|
||||
plugin.message(sender, "addsign-successProfile", region.getName(), profile);
|
||||
}
|
||||
region.updateSigns();
|
||||
region.save();
|
||||
region.saveRequired();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -114,7 +115,7 @@ public class AddsignCommand extends CommandAreaShop {
|
||||
if(toComplete == 2) {
|
||||
result.addAll(plugin.getFileManager().getRegionNames());
|
||||
} else if(toComplete == 3) {
|
||||
result.addAll(plugin.config().getStringList("signProfiles"));
|
||||
result.addAll(plugin.getConfig().getStringList("signProfiles"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
+15
-12
@@ -1,11 +1,10 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.BuyRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -32,6 +31,10 @@ public class BuyCommand extends CommandAreaShop {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.buy")) {
|
||||
plugin.message(sender, "buy-noPermission");
|
||||
return;
|
||||
}
|
||||
if (!(sender instanceof Player)) {
|
||||
plugin.message(sender, "cmd-onlyByPlayer");
|
||||
return;
|
||||
@@ -46,15 +49,15 @@ public class BuyCommand extends CommandAreaShop {
|
||||
}
|
||||
} else {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().getApplicalbeASRegions(player.getLocation());
|
||||
if(regions.size() != 1) {
|
||||
plugin.message(sender, "buy-help");
|
||||
List<BuyRegion> regions = plugin.getFileManager().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 {
|
||||
if(!regions.get(0).isBuyRegion()) {
|
||||
plugin.message(sender, "buy-notBuyable");
|
||||
} else {
|
||||
((BuyRegion)regions.get(0)).buy(player);
|
||||
}
|
||||
regions.get(0).buy(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
+6
-6
@@ -1,13 +1,13 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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 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.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -0,0 +1,132 @@
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
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, Command command, 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 = null;
|
||||
if(args.length <= 2) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().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");
|
||||
return;
|
||||
}
|
||||
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
|
||||
if(!region.getFriends().contains(friend.getUniqueId())) {
|
||||
plugin.message(sender, "delfriend-notAdded", friend.getName());
|
||||
return;
|
||||
}
|
||||
region.deleteFriend(friend.getUniqueId());
|
||||
region.saveRequired();
|
||||
region.updateRegionFlags();
|
||||
region.updateSigns();
|
||||
plugin.message(sender, "delfriend-successOther", friend.getName(), region.getName());
|
||||
} 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());
|
||||
return;
|
||||
}
|
||||
region.deleteFriend(friend.getUniqueId());
|
||||
region.saveRequired();
|
||||
region.updateRegionFlags();
|
||||
region.updateSigns();
|
||||
plugin.message(sender, "delfriend-success", friend.getName(), region.getName());
|
||||
} else {
|
||||
plugin.message(sender, "delfriend-noPermissionOther");
|
||||
}
|
||||
} else {
|
||||
plugin.message(sender, "delfriend-noPermission");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompleteList(int toComplete, String[] start) {
|
||||
ArrayList<String> result = new ArrayList<String>();
|
||||
if(toComplete == 2) {
|
||||
for(Player player : Bukkit.getOnlinePlayers()) {
|
||||
result.add(player.getName());
|
||||
}
|
||||
} else if(toComplete == 3) {
|
||||
result.addAll(plugin.getFileManager().getRegionNames());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+9
-8
@@ -1,10 +1,10 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.GeneralRegion;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@@ -34,15 +34,16 @@ public class DelsignCommand extends CommandAreaShop {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, 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;
|
||||
if(!player.hasPermission("areashop.delsign")) {
|
||||
plugin.message(sender, "delsign-noPermission");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the sign
|
||||
Block block = null;
|
||||
BlockIterator blockIterator = new BlockIterator(player, 100);
|
||||
@@ -64,7 +65,7 @@ public class DelsignCommand extends CommandAreaShop {
|
||||
plugin.message(sender, "delsign-success", region.getName());
|
||||
region.removeSign(block.getLocation());
|
||||
region.updateSigns();
|
||||
region.save();
|
||||
region.saveRequired();
|
||||
}
|
||||
|
||||
@Override
|
||||
+56
-24
@@ -1,13 +1,14 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.areashop.regions.RegionGroup;
|
||||
import nl.evolutioncoding.areashop.regions.RentRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -50,7 +51,9 @@ public class FindCommand extends CommandAreaShop {
|
||||
double balance = plugin.getEconomy().getBalance(player);
|
||||
double maxPrice = 0;
|
||||
boolean maxPriceSet = false;
|
||||
if(args.length == 3) {
|
||||
RegionGroup group = null;
|
||||
// Parse optional price argument
|
||||
if(args.length >= 3) {
|
||||
try {
|
||||
maxPrice = Double.parseDouble(args[2]);
|
||||
maxPriceSet = true;
|
||||
@@ -58,54 +61,83 @@ public class FindCommand extends CommandAreaShop {
|
||||
plugin.message(sender, "find-wrongMaxPrice", args[2]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Parse optional group argument
|
||||
if(args.length >= 4) {
|
||||
group = plugin.getFileManager().getGroup(args[3]);
|
||||
if(group == null) {
|
||||
plugin.message(sender, "find-wrongGroup", args[3]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(args[1].equalsIgnoreCase("buy")) {
|
||||
List<BuyRegion> regions = plugin.getFileManager().getBuys();
|
||||
for(BuyRegion region : regions) {
|
||||
if(!region.isSold() && ((region.getPrice() <= balance && !maxPriceSet) || (region.getPrice() <= maxPrice && maxPriceSet))) {
|
||||
if(!region.isSold()
|
||||
&& ((region.getPrice() <= balance && !maxPriceSet) || (region.getPrice() <= maxPrice && maxPriceSet))
|
||||
&& (group == null || group.isMember(region))) {
|
||||
BigDecimal bigDecimal = new BigDecimal(balance);
|
||||
bigDecimal = bigDecimal.setScale(2, RoundingMode.HALF_UP);
|
||||
balance = bigDecimal.doubleValue();
|
||||
if(maxPriceSet) {
|
||||
plugin.message(player, "find-successMax", "buy", region.getName(), maxPrice);
|
||||
} else {
|
||||
plugin.message(player, "find-success", "buy", region.getName(), balance);
|
||||
String onlyInGroup = "";
|
||||
if(group != null) {
|
||||
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
|
||||
}
|
||||
region.teleportPlayer(player, true);
|
||||
if(maxPriceSet) {
|
||||
plugin.message(player, "find-successMax", "buy", region.getName(), maxPrice, onlyInGroup);
|
||||
} else {
|
||||
plugin.message(player, "find-success", "buy", region.getName(), balance, onlyInGroup);
|
||||
}
|
||||
region.teleportPlayer(player, true, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
BigDecimal bigDecimal = new BigDecimal(balance);
|
||||
bigDecimal = bigDecimal.setScale(2, RoundingMode.HALF_UP);
|
||||
balance = bigDecimal.doubleValue();
|
||||
if(maxPriceSet) {
|
||||
plugin.message(player, "find-noneFound", "buy", maxPrice);
|
||||
} else {
|
||||
plugin.message(player, "find-noneFoundMax", "buy", balance);
|
||||
String onlyInGroup = "";
|
||||
if(group != null) {
|
||||
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
|
||||
}
|
||||
if(maxPriceSet) {
|
||||
plugin.message(player, "find-noneFound", "buy", maxPrice, onlyInGroup);
|
||||
} else {
|
||||
plugin.message(player, "find-noneFoundMax", "buy", balance, onlyInGroup);
|
||||
}
|
||||
|
||||
} else {
|
||||
List<RentRegion> regions = plugin.getFileManager().getRents();
|
||||
for(RentRegion region : regions) {
|
||||
if(!region.isRented() && ((region.getPrice() <= balance && !maxPriceSet) || (region.getPrice() <= maxPrice && maxPriceSet))) {
|
||||
if(!region.isRented()
|
||||
&& ((region.getPrice() <= balance && !maxPriceSet) || (region.getPrice() <= maxPrice && maxPriceSet))
|
||||
&& (group == null || group.isMember(region))) {
|
||||
BigDecimal bigDecimal = new BigDecimal(balance);
|
||||
bigDecimal = bigDecimal.setScale(2, RoundingMode.HALF_UP);
|
||||
balance = bigDecimal.doubleValue();
|
||||
if(maxPriceSet) {
|
||||
plugin.message(player, "find-successMax", "rent", region.getName(), maxPrice);
|
||||
} else {
|
||||
plugin.message(player, "find-success", "rent", region.getName(), balance);
|
||||
String onlyInGroup = "";
|
||||
if(group != null) {
|
||||
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
|
||||
}
|
||||
region.teleportPlayer(player, true);
|
||||
if(maxPriceSet) {
|
||||
plugin.message(player, "find-successMax", "rent", region.getName(), maxPrice, onlyInGroup);
|
||||
} else {
|
||||
plugin.message(player, "find-success", "rent", region.getName(), balance, onlyInGroup);
|
||||
}
|
||||
region.teleportPlayer(player, true, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
BigDecimal bigDecimal = new BigDecimal(balance);
|
||||
bigDecimal = bigDecimal.setScale(2, RoundingMode.HALF_UP);
|
||||
balance = bigDecimal.doubleValue();
|
||||
String onlyInGroup = "";
|
||||
if(group != null) {
|
||||
onlyInGroup = plugin.getLanguageManager().getLang("find-onlyInGroup", args[3]);
|
||||
}
|
||||
if(maxPriceSet) {
|
||||
plugin.message(player, "find-noneFound", "rent", maxPrice);
|
||||
plugin.message(player, "find-noneFound", "rent", maxPrice, onlyInGroup);
|
||||
} else {
|
||||
plugin.message(player, "find-noneFoundMax", "rent", balance);
|
||||
plugin.message(player, "find-noneFoundMax", "rent", balance, onlyInGroup);
|
||||
}
|
||||
}
|
||||
|
||||
+14
-5
@@ -1,12 +1,12 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.Utils;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.RegionGroup;
|
||||
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.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -47,6 +47,7 @@ public class GroupaddCommand extends CommandAreaShop {
|
||||
if(group == null) {
|
||||
group = new RegionGroup(plugin, args[1]);
|
||||
plugin.getFileManager().addGroup(group);
|
||||
group.saveRequired();
|
||||
}
|
||||
if(args.length == 2) {
|
||||
if(!(sender instanceof Player)) {
|
||||
@@ -66,19 +67,24 @@ public class GroupaddCommand extends CommandAreaShop {
|
||||
}
|
||||
ArrayList<String> namesSuccess = new ArrayList<String>();
|
||||
ArrayList<String> namesFailed = new ArrayList<String>();
|
||||
ArrayList<GeneralRegion> toUpdate = new ArrayList<GeneralRegion>();
|
||||
for(GeneralRegion region : regions) {
|
||||
if(group.addMember(region)) {
|
||||
namesSuccess.add(region.getName());
|
||||
toUpdate.add(region);
|
||||
} else {
|
||||
namesFailed.add(region.getName());
|
||||
}
|
||||
}
|
||||
// Update all regions, this does it in a task, updating them without lag
|
||||
plugin.getFileManager().updateRegions(toUpdate);
|
||||
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));
|
||||
}
|
||||
group.saveRequired();
|
||||
} else {
|
||||
GeneralRegion region = plugin.getFileManager().getRegion(args[2]);
|
||||
if(region == null) {
|
||||
@@ -86,10 +92,13 @@ public class GroupaddCommand extends CommandAreaShop {
|
||||
return;
|
||||
}
|
||||
if(group.addMember(region)) {
|
||||
region.updateRegionFlags();
|
||||
region.updateSigns();
|
||||
plugin.message(sender, "groupadd-success", region.getName(), group.getName(), group.getMembers().size());
|
||||
} else {
|
||||
plugin.message(sender, "groupadd-failed", region.getName(), group.getName());
|
||||
}
|
||||
group.saveRequired();
|
||||
}
|
||||
}
|
||||
|
||||
+15
-6
@@ -1,12 +1,12 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.Utils;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.RegionGroup;
|
||||
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.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -47,6 +47,7 @@ public class GroupdelCommand extends CommandAreaShop {
|
||||
if(group == null) {
|
||||
group = new RegionGroup(plugin, args[1]);
|
||||
plugin.getFileManager().addGroup(group);
|
||||
group.saveRequired();
|
||||
}
|
||||
if(args.length == 2) {
|
||||
if(!(sender instanceof Player)) {
|
||||
@@ -66,19 +67,24 @@ public class GroupdelCommand extends CommandAreaShop {
|
||||
}
|
||||
ArrayList<String> namesSuccess = new ArrayList<String>();
|
||||
ArrayList<String> namesFailed = new ArrayList<String>();
|
||||
ArrayList<GeneralRegion> toUpdate = new ArrayList<GeneralRegion>();
|
||||
for(GeneralRegion region : regions) {
|
||||
if(group.removeMember(region)) {
|
||||
if(group.addMember(region)) {
|
||||
namesSuccess.add(region.getName());
|
||||
toUpdate.add(region);
|
||||
} else {
|
||||
namesFailed.add(region.getName());
|
||||
}
|
||||
}
|
||||
// Update all regions, this does it in a task, updating them without lag
|
||||
plugin.getFileManager().updateRegions(toUpdate);
|
||||
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));
|
||||
}
|
||||
group.saveRequired();
|
||||
} else {
|
||||
GeneralRegion region = plugin.getFileManager().getRegion(args[2]);
|
||||
if(region == null) {
|
||||
@@ -86,10 +92,13 @@ public class GroupdelCommand extends CommandAreaShop {
|
||||
return;
|
||||
}
|
||||
if(group.removeMember(region)) {
|
||||
region.updateRegionFlags();
|
||||
region.updateSigns();
|
||||
plugin.message(sender, "groupdel-success", region.getName(), group.getName(), group.getMembers().size());
|
||||
} else {
|
||||
plugin.message(sender, "groupdel-failed", region.getName(), group.getName());
|
||||
}
|
||||
group.saveRequired();
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.Utils;
|
||||
import nl.evolutioncoding.AreaShop.regions.RegionGroup;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.Utils;
|
||||
import nl.evolutioncoding.areashop.regions.RegionGroup;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.Utils;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.Utils;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
+118
-55
@@ -1,17 +1,16 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
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 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.Location;
|
||||
@@ -40,6 +39,10 @@ public class InfoCommand extends CommandAreaShop {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.info")) {
|
||||
plugin.message(sender, "info-noPermission");
|
||||
return;
|
||||
}
|
||||
if(args.length > 1 && args[1] != null) {
|
||||
/* List of all regions */
|
||||
if(args[1].equalsIgnoreCase("all")) {
|
||||
@@ -208,11 +211,14 @@ public class InfoCommand extends CommandAreaShop {
|
||||
rent = plugin.getFileManager().getRent(args[2]);
|
||||
buy = plugin.getFileManager().getBuy(args[2]);
|
||||
} else {
|
||||
if(sender instanceof Player) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().getApplicalbeASRegions(((Player)sender).getLocation());
|
||||
if(regions.size() != 1) {
|
||||
plugin.message(sender, "info-regionHelp");
|
||||
List<GeneralRegion> regions = plugin.getFileManager().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()) {
|
||||
@@ -220,76 +226,133 @@ public class InfoCommand extends CommandAreaShop {
|
||||
} else if(regions.get(0).isBuyRegion()) {
|
||||
buy = (BuyRegion)regions.get(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
plugin.message(sender, "info-regionHelp");
|
||||
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-regionRenting", rent.getName());
|
||||
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.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<String>();
|
||||
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.message(sender, "info-regionNoSign");
|
||||
} else {
|
||||
plugin.message(sender, "info-regionSign", Utils.createCommaSeparatedList(signLocations));
|
||||
if(!signLocations.isEmpty()) {
|
||||
plugin.messageNoPrefix(sender, "info-regionSigns", Utils.createCommaSeparatedList(signLocations));
|
||||
}
|
||||
plugin.message(sender, "info-regionPriceDuration", rent.getFormattedPrice(), rent.getDurationString());
|
||||
if(!rent.isRented()) {
|
||||
plugin.message(sender, "info-regionNotRented");
|
||||
} else {
|
||||
SimpleDateFormat dateFull = new SimpleDateFormat(plugin.config().getString("timeFormatChat"));
|
||||
plugin.message(sender, "info-regionRentedBy", rent.getPlayerName(), dateFull.format(rent.getRentedUntil()));
|
||||
if(sender.hasPermission("areashop.groupinfo") && !rent.getGroupNames().isEmpty()) {
|
||||
plugin.messageNoPrefix(sender, "info-regionGroups", Utils.createCommaSeparatedList(rent.getGroupNames()));
|
||||
}
|
||||
if(sender.hasPermission("areashop.rentrestore")) {
|
||||
plugin.message(sender, "info-regionRestore", rent.isRestoreEnabled());
|
||||
plugin.message(sender, "info-regionRestoreProfile", rent.getRestoreProfile());
|
||||
}
|
||||
if(sender.hasPermission("areashop.teleport")) {
|
||||
if(rent.getTeleportLocation() == null) {
|
||||
plugin.message(sender, "info-regionNoTP");
|
||||
if(rent.isRestoreEnabled()) {
|
||||
if(sender.hasPermission("areashop.setrestore")) {
|
||||
plugin.messageNoPrefix(sender, "info-regionRestoringRent", rent, plugin.getLanguageManager().getLang("info-regionRestoringProfile", rent.getRestoreProfile()));
|
||||
} else {
|
||||
plugin.message(sender, "info-regionTPLocation", rent.getTeleportLocation().getWorld().getName(), rent.getTeleportLocation().getBlockX(), rent.getTeleportLocation().getBlockY(), rent.getTeleportLocation().getBlockZ(), rent.getTeleportLocation().getPitch(), rent.getTeleportLocation().getYaw());
|
||||
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()) {
|
||||
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.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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(buy != null) {
|
||||
plugin.message(sender, "info-regionBuying", buy.getName());
|
||||
List<String> signLocations = new ArrayList<String>();
|
||||
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.message(sender, "info-regionNoSign");
|
||||
} else {
|
||||
plugin.message(sender, "info-regionSign", Utils.createCommaSeparatedList(signLocations));
|
||||
if(!signLocations.isEmpty()) {
|
||||
plugin.messageNoPrefix(sender, "info-regionSigns", Utils.createCommaSeparatedList(signLocations));
|
||||
}
|
||||
plugin.message(sender, "info-regionPrice", buy.getFormattedPrice());
|
||||
if(!buy.isSold()) {
|
||||
plugin.message(sender, "info-regionNotBought");
|
||||
} else {
|
||||
plugin.message(sender, "info-regionBoughtBy", buy.getPlayerName());
|
||||
if(sender.hasPermission("areashop.groupinfo") && !buy.getGroupNames().isEmpty()) {
|
||||
plugin.messageNoPrefix(sender, "info-regionGroups", Utils.createCommaSeparatedList(buy.getGroupNames()));
|
||||
}
|
||||
if(sender.hasPermission("areashop.buyrestore")) {
|
||||
plugin.message(sender, "info-regionRestore", buy.isRestoreEnabled());
|
||||
plugin.message(sender, "info-regionRestoreProfile", buy.getRestoreProfile());
|
||||
}
|
||||
if(sender.hasPermission("areashop.teleport")) {
|
||||
if(buy.getTeleportLocation() == null) {
|
||||
plugin.message(sender, "info-regionNoTP");
|
||||
if(buy.isRestoreEnabled()) {
|
||||
if(sender.hasPermission("areashop.setrestore")) {
|
||||
plugin.messageNoPrefix(sender, "info-regionRestoringBuy", buy, plugin.getLanguageManager().getLang("info-regionRestoringProfile", buy.getRestoreProfile()));
|
||||
} else {
|
||||
plugin.message(sender, "info-regionTPLocation", buy.getTeleportLocation().getWorld().toString(), buy.getTeleportLocation().getBlockX(), buy.getTeleportLocation().getBlockY(), buy.getTeleportLocation().getBlockZ(), buy.getTeleportLocation().getPitch(), buy.getTeleportLocation().getYaw());
|
||||
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");
|
||||
@@ -0,0 +1,126 @@
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
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.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
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, Command command, 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<RentRegion>();
|
||||
for(RentRegion region : plugin.getFileManager().getRents()) {
|
||||
if(region.isOwner(player)) {
|
||||
rentRegions.add(region);
|
||||
}
|
||||
}
|
||||
Set<BuyRegion> buyRegions = new HashSet<BuyRegion>();
|
||||
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<GeneralRegion>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompleteList(int toComplete, String[] start) {
|
||||
List<String> result = new ArrayList<String>();
|
||||
// Nothing to complete
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
+16
-14
@@ -1,11 +1,10 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.RentRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -32,6 +31,10 @@ public class RentCommand extends CommandAreaShop {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.rent")) {
|
||||
plugin.message(sender, "rent-noPermission");
|
||||
return;
|
||||
}
|
||||
if (!(sender instanceof Player)) {
|
||||
plugin.message(sender, "cmd-onlyByPlayer");
|
||||
return;
|
||||
@@ -46,17 +49,16 @@ public class RentCommand extends CommandAreaShop {
|
||||
}
|
||||
} else {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().getApplicalbeASRegions(player.getLocation());
|
||||
if(regions.size() != 1) {
|
||||
plugin.message(sender, "rent-help");
|
||||
List<RentRegion> regions = plugin.getFileManager().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 {
|
||||
if(!regions.get(0).isRentRegion()) {
|
||||
plugin.message(sender, "rent-notRentable");
|
||||
} else {
|
||||
((RentRegion)regions.get(0)).rent(player);
|
||||
}
|
||||
plugin.saveConfig();
|
||||
}
|
||||
regions.get(0).rent(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.BuyRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
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, Command command, 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 = 0.0;
|
||||
try {
|
||||
price = Double.parseDouble(args[1]);
|
||||
} catch(NumberFormatException e) {
|
||||
plugin.message(sender, "resell-wrongPrice", args[1]);
|
||||
return;
|
||||
}
|
||||
BuyRegion buy = null;
|
||||
if(args.length <= 2) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<BuyRegion> regions = plugin.getFileManager().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.saveRequired();
|
||||
plugin.message(sender, "resell-success", buy);
|
||||
buy.updateSigns();
|
||||
buy.updateRegionFlags();
|
||||
} else if(sender.hasPermission("areashop.resell") && sender instanceof Player) {
|
||||
if(buy.isOwner((Player)sender)) {
|
||||
buy.enableReselling(price);
|
||||
buy.saveRequired();
|
||||
plugin.message(sender, "resell-success", buy);
|
||||
buy.updateSigns();
|
||||
buy.updateRegionFlags();
|
||||
} else {
|
||||
plugin.message(sender, "resell-noPermissionOther");
|
||||
}
|
||||
} else {
|
||||
plugin.message(sender, "resell-noPermission");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompleteList(int toComplete, String[] start) {
|
||||
ArrayList<String> result = new ArrayList<String>();
|
||||
if(toComplete == 3) {
|
||||
for(BuyRegion region : plugin.getFileManager().getBuys()) {
|
||||
if(region.isSold() && !region.isInResellingMode()) {
|
||||
result.add(region.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-5
@@ -1,13 +1,13 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.Utils;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion.RegionEvent;
|
||||
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.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
+19
-15
@@ -1,11 +1,10 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.BuyRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -27,30 +26,35 @@ public class SellCommand extends CommandAreaShop {
|
||||
if(target.hasPermission("areashop.sell")) {
|
||||
return plugin.getLanguageManager().getLang("help-sell");
|
||||
} else if(target.hasPermission("areashop.sellown")) {
|
||||
plugin.getLanguageManager().getLang("help-sellOwn");
|
||||
return plugin.getLanguageManager().getLang("help-sellOwn");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.sell") && !sender.hasPermission("areashop.sellown")) {
|
||||
plugin.message(sender, "sell-noPermission");
|
||||
return;
|
||||
}
|
||||
BuyRegion buy = null;
|
||||
if(args.length <= 1) {
|
||||
if(sender instanceof Player) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().getApplicalbeASRegions(((Player)sender).getLocation());
|
||||
if(regions.size() != 1) {
|
||||
plugin.message(sender, "sell-help");
|
||||
List<BuyRegion> regions = plugin.getFileManager().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 {
|
||||
if(regions.get(0).isBuyRegion()) {
|
||||
buy = (BuyRegion)regions.get(0);
|
||||
}
|
||||
}
|
||||
buy = regions.get(0);
|
||||
}
|
||||
} else {
|
||||
plugin.message(sender, "sell-help");
|
||||
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
buy = plugin.getFileManager().getBuy(args[1]);
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.RentRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
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, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.setduration")) {
|
||||
plugin.message(sender, "setduration-noPermission");
|
||||
return;
|
||||
}
|
||||
if(args.length < 3 || args[1] == null || args[2] == null) {
|
||||
plugin.message(sender, "setduration-help");
|
||||
return;
|
||||
}
|
||||
RentRegion rent = null;
|
||||
if(args.length <= 3) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<RentRegion> regions = plugin.getFileManager().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[3]);
|
||||
}
|
||||
if(rent == null) {
|
||||
plugin.message(sender, "setduration-notRegistered", args[3]);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Integer.parseInt(args[1]);
|
||||
} catch(NumberFormatException e) {
|
||||
plugin.message(sender, "setduration-wrongAmount", args[1]);
|
||||
return;
|
||||
}
|
||||
if(!plugin.checkTimeFormat(args[1] + " " + args[2])) {
|
||||
plugin.message(sender, "setduration-wrongFormat", args[1]+" "+args[2]);
|
||||
return;
|
||||
}
|
||||
rent.setDuration(args[1]+" "+args[2]);
|
||||
rent.updateRegionFlags();
|
||||
rent.updateSigns();
|
||||
rent.saveRequired();
|
||||
plugin.message(sender, "setduration-success", rent.getName(), rent.getDurationString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompleteList(int toComplete, String[] start) {
|
||||
List<String> result = new ArrayList<String>();
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
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.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
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, Command command, 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 = plugin.getFileManager().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");
|
||||
return;
|
||||
}
|
||||
if(region.isBuyRegion() && !sender.hasPermission("areashop.setownerbuy")) {
|
||||
plugin.message(sender, "setowner-noPermissionBuy");
|
||||
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]);
|
||||
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);
|
||||
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);
|
||||
plugin.message(sender, "setowner-succesRent", region);
|
||||
}
|
||||
rent.updateRegionFlags();
|
||||
rent.updateSigns();
|
||||
}
|
||||
if(region.isBuyRegion()) {
|
||||
BuyRegion buy = (BuyRegion)region;
|
||||
buy.setBuyer(uuid);
|
||||
plugin.message(sender, "setowner-succesBuy", region);
|
||||
buy.updateRegionFlags();
|
||||
buy.updateSigns();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompleteList(int toComplete, String[] start) {
|
||||
ArrayList<String> result = new ArrayList<String>();
|
||||
if(toComplete == 2) {
|
||||
for(Player player : Bukkit.getOnlinePlayers()) {
|
||||
result.add(player.getName());
|
||||
}
|
||||
} else if(toComplete == 3) {
|
||||
result.addAll(plugin.getFileManager().getRegionNames());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+16
-13
@@ -1,12 +1,12 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
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.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -43,19 +43,22 @@ public class SetpriceCommand extends CommandAreaShop {
|
||||
}
|
||||
GeneralRegion region = null;
|
||||
if(args.length < 3) {
|
||||
if(sender instanceof Player) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().getApplicalbeASRegions(((Player)sender).getLocation());
|
||||
if(regions.size() != 1) {
|
||||
plugin.message(sender, "setprice-help");
|
||||
List<GeneralRegion> regions = plugin.getFileManager().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, "setprice-help");
|
||||
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
region = plugin.getFileManager().getRegion(args[2]);
|
||||
}
|
||||
@@ -79,7 +82,7 @@ public class SetpriceCommand extends CommandAreaShop {
|
||||
}
|
||||
region.updateSigns();
|
||||
region.updateRegionFlags();
|
||||
region.save();
|
||||
region.saveRequired();
|
||||
}
|
||||
|
||||
@Override
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.GeneralRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -57,7 +57,7 @@ public class SetrestoreCommand extends CommandAreaShop {
|
||||
} else {
|
||||
plugin.message(sender, "setrestore-success", region.getName(), value);
|
||||
}
|
||||
region.save();
|
||||
region.saveRequired();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,7 +70,7 @@ public class SetrestoreCommand extends CommandAreaShop {
|
||||
result.add("false");
|
||||
result.add("general");
|
||||
} else if(toComplete == 4) {
|
||||
result.addAll(plugin.config().getConfigurationSection("schematicProfiles").getKeys(false));
|
||||
result.addAll(plugin.getConfig().getConfigurationSection("schematicProfiles").getKeys(false));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
+28
-16
@@ -1,12 +1,12 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.BuyRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
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.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -37,24 +37,36 @@ public class SetteleportCommand extends CommandAreaShop {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, 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;
|
||||
Player player = (Player)sender;
|
||||
GeneralRegion region = null;
|
||||
if(args.length <= 1) {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().getApplicalbeASRegions(((Player)sender).getLocation());
|
||||
if(regions.size() != 1) {
|
||||
plugin.message(sender, "setteleport-help");
|
||||
return;
|
||||
if(args.length < 2) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().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 = regions.get(0);
|
||||
}
|
||||
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
region = plugin.getFileManager().getRegion(args[1]);
|
||||
}
|
||||
}
|
||||
|
||||
boolean owner = false;
|
||||
|
||||
@@ -81,7 +93,7 @@ public class SetteleportCommand extends CommandAreaShop {
|
||||
plugin.message(player, "setteleport-reset", region.getName());
|
||||
return;
|
||||
}
|
||||
if(!wgRegion.contains(player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()) && !player.hasPermission(" areashop.setteleportoutsideregion")) {
|
||||
if(!wgRegion.contains(player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()) && !player.hasPermission("areashop.setteleportoutsideregion")) {
|
||||
plugin.message(player, "setteleport-notInside", region.getName());
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.BuyRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
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, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.stopresell") && !sender.hasPermission("areashop.stopresellall")) {
|
||||
plugin.message(sender, "stopresell-noPermissionOther");
|
||||
return;
|
||||
}
|
||||
|
||||
BuyRegion buy = null;
|
||||
if(args.length <= 1) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<BuyRegion> regions = plugin.getFileManager().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.saveRequired();
|
||||
plugin.message(sender, "stopresell-success", buy);
|
||||
buy.updateSigns();
|
||||
buy.updateRegionFlags();
|
||||
} else if(sender.hasPermission("areashop.stopresell") && sender instanceof Player) {
|
||||
if(buy.isOwner((Player)sender)) {
|
||||
buy.disableReselling();
|
||||
buy.saveRequired();
|
||||
plugin.message(sender, "stopresell-success", buy);
|
||||
buy.updateSigns();
|
||||
buy.updateRegionFlags();
|
||||
} else {
|
||||
plugin.message(sender, "stopresell-noPermissionOther");
|
||||
}
|
||||
} else {
|
||||
plugin.message(sender, "stopresell-noPermission");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompleteList(int toComplete, String[] start) {
|
||||
ArrayList<String> result = new ArrayList<String>();
|
||||
if(toComplete == 2) {
|
||||
for(BuyRegion region : plugin.getFileManager().getBuys()) {
|
||||
if(region.isSold() && region.isInResellingMode()) {
|
||||
result.add(region.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+7
-3
@@ -1,10 +1,10 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.GeneralRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -33,6 +33,10 @@ public class TeleportCommand extends CommandAreaShop {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.teleport") && !sender.hasPermission("areashop.teleportall") && !sender.hasPermission("areashop.teleportsign") && !sender.hasPermission("areashop.teleportsignall")) {
|
||||
plugin.message(sender, "teleport-noPermission");
|
||||
return;
|
||||
}
|
||||
if (!(sender instanceof Player)) {
|
||||
plugin.message(sender, "cmd-onlyByPlayer");
|
||||
return;
|
||||
+17
-13
@@ -1,11 +1,10 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.regions.GeneralRegion;
|
||||
import nl.evolutioncoding.AreaShop.regions.RentRegion;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.regions.RentRegion;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -34,21 +33,26 @@ public class UnrentCommand extends CommandAreaShop {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, String[] args) {
|
||||
if(!sender.hasPermission("areashop.unrent") && !sender.hasPermission("areashop.unrentown")) {
|
||||
plugin.message(sender, "unrent-noPermission");
|
||||
return;
|
||||
}
|
||||
RentRegion rent = null;
|
||||
if(args.length <= 1) {
|
||||
if(sender instanceof Player) {
|
||||
if (sender instanceof Player) {
|
||||
// get the region by location
|
||||
List<GeneralRegion> regions = plugin.getFileManager().getApplicalbeASRegions(((Player)sender).getLocation());
|
||||
if(regions.size() != 1) {
|
||||
plugin.message(sender, "unrent-help");
|
||||
List<RentRegion> regions = plugin.getFileManager().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 {
|
||||
if(regions.get(0).isRentRegion()) {
|
||||
rent = (RentRegion)regions.get(0);
|
||||
}
|
||||
}
|
||||
rent = regions.get(0);
|
||||
}
|
||||
} else {
|
||||
plugin.message(sender, "unrent-help");
|
||||
plugin.message(sender, "cmd-automaticRegionOnlyByPlayer");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
+3
-10
@@ -1,9 +1,9 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -33,13 +33,7 @@ public class UpdatebuysCommand extends CommandAreaShop {
|
||||
plugin.message(sender, "buys-noPermission");
|
||||
return;
|
||||
}
|
||||
boolean result = plugin.getFileManager().updateBuySigns();
|
||||
plugin.getFileManager().updateBuyRegions();
|
||||
if(result) {
|
||||
plugin.message(sender, "buys-updated");
|
||||
} else {
|
||||
plugin.message(sender, "buys-notUpdated");
|
||||
}
|
||||
plugin.getFileManager().updateBuySignsAndFlags(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -47,5 +41,4 @@ public class UpdatebuysCommand extends CommandAreaShop {
|
||||
ArrayList<String> result = new ArrayList<String>();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
+3
-9
@@ -1,9 +1,9 @@
|
||||
package nl.evolutioncoding.AreaShop.commands;
|
||||
package nl.evolutioncoding.areashop.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -33,13 +33,7 @@ public class UpdaterentsCommand extends CommandAreaShop {
|
||||
plugin.message(sender, "rents-noPermission");
|
||||
return;
|
||||
}
|
||||
boolean result = plugin.getFileManager().updateRentSigns();
|
||||
plugin.getFileManager().updateRentRegions();
|
||||
if(result) {
|
||||
plugin.message(sender, "rents-updated");
|
||||
} else {
|
||||
plugin.message(sender, "rents-notUpdated");
|
||||
}
|
||||
plugin.getFileManager().updateRentSignsAndFlags(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package nl.evolutioncoding.AreaShop.Exceptions;
|
||||
package nl.evolutioncoding.areashop.exceptions;
|
||||
|
||||
public class RegionCreateException extends Exception {
|
||||
|
||||
@@ -0,0 +1,443 @@
|
||||
package nl.evolutioncoding.areashop.regions;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.milkbowl.vault.economy.EconomyResponse;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.exceptions.RegionCreateException;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class BuyRegion extends GeneralRegion {
|
||||
|
||||
public BuyRegion(AreaShop plugin, YamlConfiguration config) throws RegionCreateException {
|
||||
super(plugin, config);
|
||||
}
|
||||
|
||||
public BuyRegion(AreaShop plugin, String name, World world) {
|
||||
super(plugin, name, world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegionType getType() {
|
||||
return RegionType.BUY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegionState getState() {
|
||||
if(isSold() && isInResellingMode()) {
|
||||
return RegionState.RESELL;
|
||||
} else if(isSold() && !isInResellingMode()) {
|
||||
return RegionState.SOLD;
|
||||
} else {
|
||||
return RegionState.FORSALE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the UUID of the owner of this region
|
||||
* @return The UUID of the owner of this region
|
||||
*/
|
||||
public UUID getBuyer() {
|
||||
String buyer = getStringSetting("buy.buyer");
|
||||
if(buyer != null) {
|
||||
try {
|
||||
return UUID.fromString(buyer);
|
||||
} catch(IllegalArgumentException e) {}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player is the buyer of this region
|
||||
* @param player Player to check
|
||||
* @return true if this player owns this region, otherwise false
|
||||
*/
|
||||
public boolean isBuyer(Player player) {
|
||||
if(player == null) {
|
||||
return false;
|
||||
} else {
|
||||
return isBuyer(player.getUniqueId());
|
||||
}
|
||||
}
|
||||
public boolean isBuyer(UUID player) {
|
||||
UUID buyer = getBuyer();
|
||||
if(buyer == null || player == null) {
|
||||
return false;
|
||||
} else {
|
||||
return buyer.equals(player);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the buyer of this region
|
||||
* @param buyer The UUID of the player that should be set as buyer
|
||||
*/
|
||||
public void setBuyer(UUID buyer) {
|
||||
if(buyer == null) {
|
||||
setSetting("buy.buyer", null);
|
||||
setSetting("buy.buyerName", null);
|
||||
} else {
|
||||
setSetting("buy.buyer", buyer.toString());
|
||||
setSetting("buy.buyerName", plugin.toName(buyer));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name of the player that owns this region
|
||||
* @return The name of the player that owns this region
|
||||
*/
|
||||
public String getPlayerName() {
|
||||
return plugin.toName(getBuyer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the region is sold
|
||||
* @return true if the region is sold, otherwise false
|
||||
*/
|
||||
public boolean isSold() {
|
||||
return getBuyer() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the region is being resold
|
||||
* @return true if the region is available for reselling, otherwise false
|
||||
*/
|
||||
public boolean isInResellingMode() {
|
||||
return config.getBoolean("buy.resellMode");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the price of the region
|
||||
* @return The price of the region
|
||||
*/
|
||||
public double getPrice() {
|
||||
return getDoubleSetting("buy.price");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the resell price of this region
|
||||
* @return The resell price if isInResellingMode(), otherwise 0.0
|
||||
*/
|
||||
public double getResellPrice() {
|
||||
return config.getDouble("buy.resellPrice");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the formatted string of the price (includes prefix and suffix)
|
||||
* @return The formatted string of the price
|
||||
*/
|
||||
public String getFormattedPrice() {
|
||||
return plugin.formatCurrency(getPrice());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the formatted string of the resellprice (includes prefix and suffix)
|
||||
* @return The formatted string of the resellprice
|
||||
*/
|
||||
public String getFormattedResellPrice() {
|
||||
return plugin.formatCurrency(getResellPrice());
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the price of the region
|
||||
* @param price
|
||||
*/
|
||||
public void setPrice(double price) {
|
||||
setSetting("buy.price", price);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the region into resell mode with the given price
|
||||
* @param price The price this region should be put up for sale
|
||||
*/
|
||||
public void enableReselling(double price) {
|
||||
config.set("buy.resellMode", true);
|
||||
config.set("buy.resellPrice", price);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop this region from being in resell mode
|
||||
*/
|
||||
public void disableReselling() {
|
||||
config.set("buy.resellMode", null);
|
||||
config.set("buy.resellPrice", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the moneyBack percentage
|
||||
* @return The % of money the player will get back when selling
|
||||
*/
|
||||
public double getMoneyBackPercentage() {
|
||||
return getDoubleSetting("buy.moneyBack");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the amount of money that should be paid to the player when selling the region
|
||||
* @return The amount of money the player should get back
|
||||
*/
|
||||
public double getMoneyBackAmount() {
|
||||
return getPrice() * (getMoneyBackPercentage() / 100.0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the formatted string of the amount of the moneyBack amount
|
||||
* @return String with currency symbols and proper fractional part
|
||||
*/
|
||||
public String getFormattedMoneyBackAmount() {
|
||||
return plugin.formatCurrency(getMoneyBackAmount());
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> getSpecificReplacements() {
|
||||
// Fill the replacements map with things specific to a BuyRegion
|
||||
HashMap<String, Object> result = new HashMap<String, Object>();
|
||||
result.put(AreaShop.tagPrice, getFormattedPrice());
|
||||
result.put(AreaShop.tagPlayerName, getPlayerName());
|
||||
result.put(AreaShop.tagPlayerUUID, getBuyer());
|
||||
result.put(AreaShop.tagResellPrice, getFormattedResellPrice());
|
||||
result.put(AreaShop.tagMoneyBackAmount, getFormattedMoneyBackAmount());
|
||||
double moneyBackPercent = getMoneyBackPercentage();
|
||||
if((moneyBackPercent%1.0) == 0.0) {
|
||||
result.put(AreaShop.tagMoneyBackPercentage, (int)moneyBackPercent);
|
||||
} else {
|
||||
result.put(AreaShop.tagMoneyBackPercentage, moneyBackPercent);
|
||||
}
|
||||
result.put(AreaShop.tagMaxInactiveTime, this.getFormattedInactiveTimeUntilSell());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minutes until automatic unrent when player is offline
|
||||
* @return The number of minutes until the region is unrented while player is offline
|
||||
*/
|
||||
public long getInactiveTimeUntilSell() {
|
||||
return getLongSetting("buy.inactiveTimeUntilSell");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a human readable string indicating how long the player can be offline until automatic unrent
|
||||
* @return String indicating the inactive time until unrent
|
||||
*/
|
||||
public String getFormattedInactiveTimeUntilSell() {
|
||||
return this.millisToHumanFormat(getInactiveTimeUntilSell()*60*1000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Buy a region
|
||||
* @param player The player that wants to buy the region
|
||||
* @return true if it succeeded and false if not
|
||||
*/
|
||||
public boolean buy(Player player) {
|
||||
/* Check if the player has permission */
|
||||
if(player.hasPermission("areashop.buy")) {
|
||||
if(!isSold() || (isInResellingMode() && !isBuyer(player))) {
|
||||
boolean isResell = isInResellingMode();
|
||||
// Check if the players needs to be in the world or region for buying
|
||||
if(restrictedToRegion() && (!player.getWorld().getName().equals(getWorldName())
|
||||
|| !getRegion().contains(player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()))) {
|
||||
plugin.message(player, "buy-restrictedToRegion", getName());
|
||||
return false;
|
||||
}
|
||||
if(restrictedToWorld() && !player.getWorld().getName().equals(getWorldName())) {
|
||||
plugin.message(player, "buy-restrictedToWorld", getWorldName(), player.getWorld().getName());
|
||||
return false;
|
||||
}
|
||||
// Check region limits
|
||||
LimitResult limitResult = this.limitsAllowBuying(player);
|
||||
AreaShop.debug("LimitResult: " + limitResult.toString());
|
||||
if(!limitResult.actionAllowed()) {
|
||||
if(limitResult.getLimitingFactor() == LimitType.TOTAL) {
|
||||
plugin.message(player, "total-maximum", limitResult.getMaximum(), limitResult.getCurrent(), limitResult.getLimitingGroup());
|
||||
return false;
|
||||
}
|
||||
if(limitResult.getLimitingFactor() == LimitType.BUYS) {
|
||||
plugin.message(player, "buy-maximum", limitResult.getMaximum(), limitResult.getCurrent(), limitResult.getLimitingGroup());
|
||||
return false;
|
||||
}
|
||||
// Should not be reached, but is safe like this
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Check if the player has enough money */
|
||||
if(plugin.getEconomy().has(player, getWorldName(), getPrice())) {
|
||||
UUID oldOwner = getBuyer();
|
||||
if(isResell && oldOwner != null) {
|
||||
clearFriends();
|
||||
double resellPrice = getResellPrice();
|
||||
/* Transfer the money to the previous owner */
|
||||
EconomyResponse r = plugin.getEconomy().withdrawPlayer(player, getWorldName(), getResellPrice());
|
||||
if(!r.transactionSuccess()) {
|
||||
plugin.message(player, "buy-payError");
|
||||
return false;
|
||||
}
|
||||
OfflinePlayer oldOwnerPlayer = Bukkit.getOfflinePlayer(oldOwner);
|
||||
if(oldOwnerPlayer != null) {
|
||||
r = plugin.getEconomy().depositPlayer(oldOwnerPlayer, getWorldName(), getResellPrice());
|
||||
if(!r.transactionSuccess()) {
|
||||
plugin.getLogger().warning("Something went wrong with paying '" + oldOwnerPlayer.getName() + "' for his resell of region " + getName());
|
||||
}
|
||||
}
|
||||
// Resell is done, disable that now
|
||||
disableReselling();
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.RESELL, true);
|
||||
// Set the owner
|
||||
setBuyer(player.getUniqueId());
|
||||
|
||||
// Update everything
|
||||
handleSchematicEvent(RegionEvent.RESELL);
|
||||
updateSigns();
|
||||
updateRegionFlags();
|
||||
|
||||
// Send message to the player
|
||||
plugin.message(player, "buy-successResale", getName(), oldOwnerPlayer.getName());
|
||||
Player seller = Bukkit.getPlayer(oldOwner);
|
||||
if(seller != null) {
|
||||
plugin.message(player, "buy-successSeller", getName(), getPlayerName(), resellPrice);
|
||||
}
|
||||
AreaShop.debug(player.getName() + " has bought region " + getName() + " for " + getFormattedPrice() + " from " + oldOwnerPlayer.getName());
|
||||
|
||||
this.saveRequired();
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.RESELL, false);
|
||||
} else {
|
||||
// Substract the money from the players balance
|
||||
EconomyResponse r = plugin.getEconomy().withdrawPlayer(player, getWorldName(), getPrice());
|
||||
if(!r.transactionSuccess()) {
|
||||
plugin.message(player, "buy-payError");
|
||||
return false;
|
||||
}
|
||||
AreaShop.debug(player.getName() + " has bought region " + getName() + " for " + getFormattedPrice());
|
||||
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.BOUGHT, true);
|
||||
// Set the owner
|
||||
setBuyer(player.getUniqueId());
|
||||
|
||||
// Update everything
|
||||
handleSchematicEvent(RegionEvent.BOUGHT);
|
||||
updateSigns();
|
||||
updateRegionFlags();
|
||||
|
||||
// Send message to the player
|
||||
plugin.message(player, "buy-succes", getName());
|
||||
this.saveRequired();
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.BOUGHT, false);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
/* Player has not enough money */
|
||||
plugin.message(player, "buy-lowMoney", plugin.formatCurrency(plugin.getEconomy().getBalance(player, getWorldName())), getFormattedPrice());
|
||||
}
|
||||
} else {
|
||||
if(isBuyer(player)) {
|
||||
plugin.message(player, "buy-yours");
|
||||
} else {
|
||||
plugin.message(player, "buy-someoneElse");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
plugin.message(player, "buy-noPermission");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sell a buyed region, get part of the money back
|
||||
* @param regionName
|
||||
*/
|
||||
public void sell(boolean giveMoneyBack) {
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.SOLD, true);
|
||||
|
||||
disableReselling();
|
||||
/* Give part of the buying price back */
|
||||
double moneyBack = getMoneyBackAmount();
|
||||
if(moneyBack > 0 && giveMoneyBack) {
|
||||
/* Give back the money */
|
||||
OfflinePlayer player = Bukkit.getOfflinePlayer(getBuyer());
|
||||
if(player != null) {
|
||||
EconomyResponse response = null;
|
||||
boolean error = false;
|
||||
try {
|
||||
response = plugin.getEconomy().depositPlayer(Bukkit.getOfflinePlayer(getBuyer()), getWorldName(), moneyBack);
|
||||
} catch(Exception e) {
|
||||
error = true;
|
||||
}
|
||||
if(error || response == null || !response.transactionSuccess()) {
|
||||
plugin.getLogger().warning("Something went wrong with paying back money to " + getPlayerName() + " while selling region " + getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Debug message */
|
||||
AreaShop.debug(getPlayerName() + " has sold " + getName() + ", got " + plugin.formatCurrency(moneyBack) + " money back");
|
||||
|
||||
/* Update everything */
|
||||
handleSchematicEvent(RegionEvent.SOLD);
|
||||
updateRegionFlags(RegionState.FORSALE);
|
||||
|
||||
/* Remove friends and the owner */
|
||||
clearFriends();
|
||||
setBuyer(null);
|
||||
|
||||
updateSigns();
|
||||
|
||||
this.saveRequired();
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.SOLD, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkInactive() {
|
||||
if(isDeleted() || !isSold()) {
|
||||
return false;
|
||||
}
|
||||
OfflinePlayer player = Bukkit.getOfflinePlayer(getBuyer());
|
||||
long inactiveSetting = getInactiveTimeUntilSell();
|
||||
if(inactiveSetting <= 0 || player.isOp()) {
|
||||
return false;
|
||||
}
|
||||
//AreaShop.debug("inactivetimemillis: " + inactiveSetting * 60 * 1000);
|
||||
if(Calendar.getInstance().getTimeInMillis() > (player.getLastPlayed() + inactiveSetting * 60 * 1000)) {
|
||||
plugin.getLogger().info("Region " + getName() + " sold because of inactivity for player " + getPlayerName());
|
||||
this.sell(true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+972
-303
File diff suppressed because it is too large.
Load diff
+16
-13
@@ -1,9 +1,9 @@
|
||||
package nl.evolutioncoding.AreaShop.regions;
|
||||
package nl.evolutioncoding.areashop.regions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
@@ -23,6 +23,7 @@ public class RegionGroup {
|
||||
setSetting("name", name);
|
||||
// Delete duplicates
|
||||
List<String> members = getMembers();
|
||||
int previousCount = members.size();
|
||||
List<String> newMembers = new ArrayList<String>();
|
||||
while(!members.isEmpty()) {
|
||||
String member = members.remove(0);
|
||||
@@ -34,9 +35,10 @@ public class RegionGroup {
|
||||
members.remove(member);
|
||||
}
|
||||
}
|
||||
if(newMembers.size() != members.size()) {
|
||||
if(newMembers.size() != previousCount) {
|
||||
setSetting("regions", newMembers);
|
||||
save();
|
||||
AreaShop.debug("group save required because of changed member size");
|
||||
saveRequired();
|
||||
}
|
||||
if(getMembers().size() == 0) {
|
||||
plugin.getFileManager().removeGroup(this);
|
||||
@@ -55,9 +57,6 @@ public class RegionGroup {
|
||||
} else {
|
||||
members.add(region.getName());
|
||||
setSetting("regions", members);
|
||||
save();
|
||||
region.updateSigns();
|
||||
region.updateRegionFlags();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -76,9 +75,6 @@ public class RegionGroup {
|
||||
} else {
|
||||
setSetting("regions", members);
|
||||
}
|
||||
save();
|
||||
region.updateSigns();
|
||||
region.updateRegionFlags();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -143,9 +139,16 @@ public class RegionGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the group to disk (currently saves all groups because they are all in 1 file)
|
||||
* Indicates this file needs to be saved, will actually get saved later by a task
|
||||
*/
|
||||
public void save() {
|
||||
plugin.getFileManager().saveGroups();
|
||||
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();
|
||||
}
|
||||
}
|
||||
+248
-45
@@ -1,4 +1,4 @@
|
||||
package nl.evolutioncoding.AreaShop.regions;
|
||||
package nl.evolutioncoding.areashop.regions;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -8,16 +8,19 @@ import java.util.HashMap;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.milkbowl.vault.economy.EconomyResponse;
|
||||
import nl.evolutioncoding.AreaShop.AreaShop;
|
||||
import nl.evolutioncoding.AreaShop.Exceptions.RegionCreateException;
|
||||
import nl.evolutioncoding.areashop.AreaShop;
|
||||
import nl.evolutioncoding.areashop.exceptions.RegionCreateException;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class RentRegion extends GeneralRegion {
|
||||
private long warningsDoneUntil = Calendar.getInstance().getTimeInMillis();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param plugin The areashop plugin
|
||||
@@ -72,11 +75,18 @@ public class RentRegion extends GeneralRegion {
|
||||
* @return true if this player rents this region, otherwise false
|
||||
*/
|
||||
public boolean isRenter(Player player) {
|
||||
if(player == null) {
|
||||
return false;
|
||||
} else {
|
||||
return isRenter(player.getUniqueId());
|
||||
}
|
||||
}
|
||||
public boolean isRenter(UUID player) {
|
||||
UUID renter = getRenter();
|
||||
if(player == null || renter == null) {
|
||||
return false;
|
||||
} else {
|
||||
return renter.equals(player.getUniqueId());
|
||||
return renter.equals(player);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,13 +140,24 @@ public class RentRegion extends GeneralRegion {
|
||||
result.put(AreaShop.tagDuration, getDurationString());
|
||||
result.put(AreaShop.tagPlayerName, getPlayerName());
|
||||
result.put(AreaShop.tagPlayerUUID, getRenter());
|
||||
SimpleDateFormat date = new SimpleDateFormat(plugin.config().getString("timeFormatChat"));
|
||||
SimpleDateFormat date = new SimpleDateFormat(plugin.getConfig().getString("timeFormatChat"));
|
||||
String dateString = date.format(new Date(getRentedUntil()));
|
||||
result.put(AreaShop.tagRentedUntil, dateString);
|
||||
date = new SimpleDateFormat(plugin.config().getString("timeFormatSign"));
|
||||
date = new SimpleDateFormat(plugin.getConfig().getString("timeFormatSign"));
|
||||
dateString = date.format(new Date(getRentedUntil()));
|
||||
result.put(AreaShop.tagRentedUntilShort, dateString);
|
||||
|
||||
result.put(AreaShop.tagTimeLeft, getTimeLeftString());
|
||||
result.put(AreaShop.tagMoneyBackAmount, getFormattedMoneyBackAmount());
|
||||
double moneyBackPercent = getMoneyBackPercentage();
|
||||
if((moneyBackPercent%1.0) == 0.0) {
|
||||
result.put(AreaShop.tagMoneyBackPercentage, (int)moneyBackPercent);
|
||||
} else {
|
||||
result.put(AreaShop.tagMoneyBackPercentage, moneyBackPercent);
|
||||
}
|
||||
result.put(AreaShop.tagMaxExtends, this.getMaxExtends());
|
||||
result.put(AreaShop.tagExtendsLeft, getMaxExtends() - getTimesExtended());
|
||||
result.put(AreaShop.tagMaxRentTime, this.millisToHumanFormat(getMaxRentTime()*60*1000));
|
||||
result.put(AreaShop.tagMaxInactiveTime, this.getFormattedInactiveTimeUntilUnrent());
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -196,20 +217,33 @@ public class RentRegion extends GeneralRegion {
|
||||
* Get the duration of 1 rent period
|
||||
* @return The duration in milliseconds of 1 rent period
|
||||
*/
|
||||
public long getDuration() {
|
||||
/* Get the time until the region will be rented */
|
||||
String duration = getDurationString();
|
||||
public long getDuration() {
|
||||
return durationStringToLong(getDurationString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode to tranlate a duration string to a millisecond value
|
||||
* @param duration The duration string
|
||||
* @return The duration in milliseconds translated from the durationstring, or if it is invalid then 0
|
||||
*/
|
||||
public long durationStringToLong(String duration) {
|
||||
if(duration == null) {
|
||||
return 0;
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(0);
|
||||
|
||||
ArrayList<String> minutes = new ArrayList<String>(plugin.config().getStringList("minutes"));
|
||||
ArrayList<String> hours = new ArrayList<String>(plugin.config().getStringList("hours"));
|
||||
ArrayList<String> days = new ArrayList<String>(plugin.config().getStringList("days"));
|
||||
ArrayList<String> months = new ArrayList<String>(plugin.config().getStringList("months"));
|
||||
ArrayList<String> years = new ArrayList<String>(plugin.config().getStringList("years"));
|
||||
ArrayList<String> minutes = new ArrayList<String>(plugin.getConfig().getStringList("minutes"));
|
||||
ArrayList<String> hours = new ArrayList<String>(plugin.getConfig().getStringList("hours"));
|
||||
ArrayList<String> days = new ArrayList<String>(plugin.getConfig().getStringList("days"));
|
||||
ArrayList<String> months = new ArrayList<String>(plugin.getConfig().getStringList("months"));
|
||||
ArrayList<String> years = new ArrayList<String>(plugin.getConfig().getStringList("years"));
|
||||
|
||||
String durationString = duration.substring(duration.indexOf(' ')+1, duration.length());
|
||||
int durationInt = Integer.parseInt(duration.substring(0, duration.indexOf(' ')));
|
||||
int durationInt = 0;
|
||||
try {
|
||||
durationInt = Integer.parseInt(duration.substring(0, duration.indexOf(' ')));
|
||||
} catch(NumberFormatException exception) {}
|
||||
|
||||
if(minutes.contains(durationString)) {
|
||||
calendar.add(Calendar.MINUTE, durationInt);
|
||||
@@ -234,6 +268,42 @@ public class RentRegion extends GeneralRegion {
|
||||
return getStringSetting("rent.duration");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the time that is left on the region
|
||||
* @return The time left on the region
|
||||
*/
|
||||
public long getTimeLeft() {
|
||||
if(isRented()) {
|
||||
return this.getRentedUntil() - Calendar.getInstance().getTimeInMillis();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a formatted string indicating the rent time that is left
|
||||
* @return Time left on the rent, for example '29 days', '3 months', '1 second'
|
||||
*/
|
||||
public String getTimeLeftString() {
|
||||
return millisToHumanFormat(getTimeLeft());
|
||||
}
|
||||
|
||||
/**
|
||||
* Minutes until automatic unrent when player is offline
|
||||
* @return The number of minutes until the region is unrented while player is offline
|
||||
*/
|
||||
public long getInactiveTimeUntilUnrent() {
|
||||
return getLongSetting("rent.inactiveTimeUntilUnrent");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a human readable string indicating how long the player can be offline until automatic unrent
|
||||
* @return String indicating the inactive time until unrent
|
||||
*/
|
||||
public String getFormattedInactiveTimeUntilUnrent() {
|
||||
return this.millisToHumanFormat(getInactiveTimeUntilUnrent()*60*1000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the price of the region
|
||||
* @param price
|
||||
@@ -250,6 +320,98 @@ public class RentRegion extends GeneralRegion {
|
||||
setSetting("rent.duration", duration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the moneyBack percentage
|
||||
* @return The % of money the player will get back when unrenting
|
||||
*/
|
||||
public double getMoneyBackPercentage() {
|
||||
return getDoubleSetting("rent.moneyBack");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the amount of money that should be paid to the player when unrenting the region
|
||||
* @return The amount of money the player should get back
|
||||
*/
|
||||
public double getMoneyBackAmount() {
|
||||
Long currentTime = Calendar.getInstance().getTimeInMillis();
|
||||
Double timeLeft = (double) ((getRentedUntil() - currentTime));
|
||||
double percentage = (getMoneyBackPercentage()) / 100.0;
|
||||
Double timePeriod = (double) (getDuration());
|
||||
double periods = timeLeft / timePeriod;
|
||||
double moneyBack = periods * getPrice() * percentage;
|
||||
return moneyBack;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the formatted string of the amount of the moneyBack amount
|
||||
* @return String with currency symbols and proper fractional part
|
||||
*/
|
||||
public String getFormattedMoneyBackAmount() {
|
||||
return plugin.formatCurrency(getMoneyBackAmount());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the maximum time the player can rent the region in advance (minutes)
|
||||
* @return The maximum rent time in minutes
|
||||
*/
|
||||
public long getMaxRentTime() {
|
||||
return this.getLongSetting("rent.maxRentTime");
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the rent should expire
|
||||
* @return true if the rent has expired and has been unrented, false otherwise
|
||||
*/
|
||||
public boolean checkExpiration() {
|
||||
long now = Calendar.getInstance().getTimeInMillis();
|
||||
if(!isDeleted() && isRented() && now > getRentedUntil()) {
|
||||
/* Send message to the player if online */
|
||||
Player player = Bukkit.getPlayer(getRenter());
|
||||
if(player != null) {
|
||||
plugin.message(player, "unrent-expired", getName());
|
||||
}
|
||||
unRent(false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public void sendExpirationWarnings() {
|
||||
// send from warningsDoneUntil to current+delay
|
||||
if(isDeleted() || !isRented()) {
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
for(String timeBefore : section.getKeys(false)) {
|
||||
long timeBeforeParsed = this.durationStringToLong(timeBefore);
|
||||
if(timeBeforeParsed <= 0) {
|
||||
return;
|
||||
}
|
||||
long checkTime = getRentedUntil() - timeBeforeParsed;
|
||||
|
||||
if(checkTime > warningsDoneUntil && checkTime <= sendUntil) {
|
||||
if(plugin.getConfig().getBoolean(configPath + "." + timeBefore + ".warnPlayer")) {
|
||||
plugin.message(player, "rent-expireWarning", this);
|
||||
}
|
||||
this.runCommands(Bukkit.getConsoleSender(), plugin.getConfig().getStringList(configPath + "." + timeBefore + ".commands"));
|
||||
}
|
||||
}
|
||||
warningsDoneUntil = sendUntil;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rent a region
|
||||
* @param player The player that wants to rent the region
|
||||
@@ -264,17 +426,31 @@ public class RentRegion extends GeneralRegion {
|
||||
extend = true;
|
||||
}
|
||||
// Check if the region is available for renting or if the player wants to extend the rent
|
||||
if(!isRented() || extend) {
|
||||
if(!isRented() || extend) {
|
||||
// Check if the players needs to be in the world or region for buying
|
||||
if(restrictedToRegion() && (!player.getWorld().getName().equals(getWorldName())
|
||||
|| !getRegion().contains(player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()))) {
|
||||
plugin.message(player, "rent-restrictedToRegion", getName());
|
||||
return false;
|
||||
}
|
||||
if(restrictedToWorld() && !player.getWorld().getName().equals(getWorldName())) {
|
||||
plugin.message(player, "rent-restrictedToWorld", getWorldName(), player.getWorld().getName());
|
||||
return false;
|
||||
}
|
||||
// Check region limits if this is not extending
|
||||
if(!extend) {
|
||||
// Check if the player can still rent more regions
|
||||
int maximumRents = getMaxRentRegions(player);
|
||||
if(getCurrentRentRegions(player) >= maximumRents) {
|
||||
plugin.message(player, "rent-maximum", maximumRents);
|
||||
return false;
|
||||
}
|
||||
int maximumTotal = getMaxTotalRegions(player);
|
||||
if(getCurrentTotalRegions(player) >= maximumTotal) {
|
||||
plugin.message(player, "total-maximum", maximumTotal);
|
||||
LimitResult limitResult = this.limitsAllowRenting(player);
|
||||
AreaShop.debug("LimitResult: " + limitResult.toString());
|
||||
if(!limitResult.actionAllowed()) {
|
||||
if(limitResult.getLimitingFactor() == LimitType.TOTAL) {
|
||||
plugin.message(player, "total-maximum", limitResult.getMaximum(), limitResult.getCurrent(), limitResult.getLimitingGroup());
|
||||
return false;
|
||||
}
|
||||
if(limitResult.getLimitingFactor() == LimitType.RENTS) {
|
||||
plugin.message(player, "rent-maximum", limitResult.getMaximum(), limitResult.getCurrent(), limitResult.getLimitingGroup());
|
||||
return false;
|
||||
}
|
||||
// Should not be reached, but is safe like this
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -286,14 +462,29 @@ public class RentRegion extends GeneralRegion {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if there is enough time left before hitting maxRentTime
|
||||
long timeNow = Calendar.getInstance().getTimeInMillis();
|
||||
long timeRented = 0;
|
||||
long maxRentTime = getMaxRentTime();
|
||||
if(isRented()) {
|
||||
timeRented = getRentedUntil() - timeNow;
|
||||
}
|
||||
if((timeRented + getDuration()) > (maxRentTime*60*1000)
|
||||
&& !player.hasPermission("areashop.renttimebypass")
|
||||
&& maxRentTime != -1) {
|
||||
int timeRentedMinutes = (int)(timeRented/1000.0/60.0 +1);
|
||||
plugin.message(player, "rent-maxRentTime", maxRentTime, timeRentedMinutes);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(plugin.getEconomy().has(player, getWorldName(), getPrice())) {
|
||||
/* Substract the money from the players balance */
|
||||
EconomyResponse r = plugin.getEconomy().withdrawPlayer(player, getPrice());
|
||||
EconomyResponse r = plugin.getEconomy().withdrawPlayer(player, getWorldName(), getPrice());
|
||||
if(!r.transactionSuccess()) {
|
||||
plugin.message(player, "rent-payError");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(!extend) {
|
||||
// Run commands
|
||||
runEventCommands(RegionEvent.RENTED, true);
|
||||
@@ -308,8 +499,8 @@ public class RentRegion extends GeneralRegion {
|
||||
calendar.setTimeInMillis(getRentedUntil());
|
||||
}
|
||||
calendar.setTimeInMillis(calendar.getTimeInMillis() + getDuration());
|
||||
|
||||
SimpleDateFormat dateFull = new SimpleDateFormat(plugin.config().getString("timeFormatChat"));
|
||||
SimpleDateFormat dateFull = new SimpleDateFormat(plugin.getConfig().getString("timeFormatChat"));
|
||||
AreaShop.debug(player.getName() + " has rented region " + getName() + " for " + getFormattedPrice() + " until " + dateFull.format(calendar.getTime()));
|
||||
|
||||
/* Add values to the rent and send it to FileManager */
|
||||
setRentedUntil(calendar.getTimeInMillis());
|
||||
@@ -334,9 +525,8 @@ public class RentRegion extends GeneralRegion {
|
||||
plugin.message(player, "rent-rented", getName(), dateFull.format(calendar.getTime()));
|
||||
plugin.message(player, "rent-extend");
|
||||
}
|
||||
AreaShop.debug(player.getName() + " has rented region " + getName() + " for " + getFormattedPrice() + " until " + dateFull.format(calendar.getTime()));
|
||||
|
||||
this.save();
|
||||
|
||||
this.saveRequired();
|
||||
if(!extend) {
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.RENTED, false);
|
||||
@@ -369,14 +559,7 @@ public class RentRegion extends GeneralRegion {
|
||||
public void unRent(boolean giveMoneyBack) {
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.UNRENTED, true);
|
||||
/* Get the time until the region will be rented */
|
||||
Long currentTime = Calendar.getInstance().getTimeInMillis();
|
||||
Double timeLeft = (double) ((getRentedUntil() - currentTime));
|
||||
double percentage = (getDoubleSetting("rent.moneyBack")) / 100.0;
|
||||
|
||||
Double timePeriod = (double) (getDuration());
|
||||
double periods = timeLeft / timePeriod;
|
||||
double moneyBack = periods * getPrice() * percentage;
|
||||
double moneyBack = getMoneyBackAmount();
|
||||
if(moneyBack > 0 && giveMoneyBack) {
|
||||
/* Give back the money */
|
||||
OfflinePlayer player = Bukkit.getOfflinePlayer(getRenter());
|
||||
@@ -384,12 +567,12 @@ public class RentRegion extends GeneralRegion {
|
||||
EconomyResponse r = null;
|
||||
boolean error = false;
|
||||
try {
|
||||
r = plugin.getEconomy().depositPlayer(Bukkit.getOfflinePlayer(getRenter()), moneyBack);
|
||||
r = plugin.getEconomy().depositPlayer(Bukkit.getOfflinePlayer(getRenter()), getWorldName(), moneyBack);
|
||||
} catch(Exception e) {
|
||||
error = true;
|
||||
}
|
||||
if(error || r == null || !r.transactionSuccess()) {
|
||||
plugin.getLogger().info("Something went wrong with paying back to " + getPlayerName() + " money while unrenting region " + getName());
|
||||
plugin.getLogger().warning("Something went wrong with paying back to " + getPlayerName() + " money while unrenting region " + getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -401,17 +584,37 @@ public class RentRegion extends GeneralRegion {
|
||||
handleSchematicEvent(RegionEvent.UNRENTED);
|
||||
updateRegionFlags(RegionState.FORRENT);
|
||||
|
||||
/* Remove the player and renteduntil values */
|
||||
/* Remove friends, the owner and renteduntil values */
|
||||
clearFriends();
|
||||
setRenter(null);
|
||||
setRentedUntil(null);
|
||||
setTimesExtended(-1);
|
||||
|
||||
updateSigns();
|
||||
|
||||
this.save();
|
||||
this.saveRequired();
|
||||
// Run commands
|
||||
this.runEventCommands(RegionEvent.UNRENTED, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkInactive() {
|
||||
if(isDeleted() || !isRented()) {
|
||||
return false;
|
||||
}
|
||||
OfflinePlayer player = Bukkit.getOfflinePlayer(getRenter());
|
||||
long inactiveSetting = getInactiveTimeUntilUnrent();
|
||||
if(inactiveSetting <= 0 || player.isOp()) {
|
||||
return false;
|
||||
}
|
||||
//AreaShop.debug("inactivetimemillis: " + inactiveSetting * 60 * 1000);
|
||||
if(Calendar.getInstance().getTimeInMillis() > (player.getLastPlayed() + inactiveSetting * 60 * 1000)) {
|
||||
plugin.getLogger().info("Region " + getName() + " unrented because of inactivity for player " + getPlayerName());
|
||||
this.unRent(true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user