From 9f893e68e98252fae5999760ee67e0bac3810fda Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 26 Feb 2012 04:15:14 +0000 Subject: Add Minimum Balance, to allow people to manage overdrafts. --- Essentials/src/com/earth2me/essentials/ISettings.java | 2 ++ Essentials/src/com/earth2me/essentials/IUser.java | 2 ++ Essentials/src/com/earth2me/essentials/Settings.java | 16 ++++++++++++++++ Essentials/src/com/earth2me/essentials/Trade.java | 6 ++---- Essentials/src/com/earth2me/essentials/User.java | 13 +++++++++++-- Essentials/src/com/earth2me/essentials/api/Economy.java | 4 ++++ .../src/com/earth2me/essentials/commands/Commandeco.java | 4 ++++ Essentials/src/com/earth2me/essentials/user/User.java | 11 +++++++++++ Essentials/src/config.yml | 6 +++++- 9 files changed, 57 insertions(+), 7 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index e567673b6..cded5bde5 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -115,6 +115,8 @@ public interface ISettings extends IConf boolean warnOnSmite(); double getMaxMoney(); + + double getMinMoney(); boolean isEcoLogEnabled(); diff --git a/Essentials/src/com/earth2me/essentials/IUser.java b/Essentials/src/com/earth2me/essentials/IUser.java index bff556ab4..df5401886 100644 --- a/Essentials/src/com/earth2me/essentials/IUser.java +++ b/Essentials/src/com/earth2me/essentials/IUser.java @@ -32,6 +32,8 @@ public interface IUser extends Player void takeMoney(double value); void giveMoney(double value); + + boolean canAfford(double value); String getGroup(); diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 40fb47f6c..39179b957 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -539,6 +539,22 @@ public class Settings implements ISettings } return max; } + + private final static double MINMONEY = -10000000000000.0; + + @Override + public double getMinMoney() + { + double min = config.getDouble("min-money", MINMONEY); + if (min > 0) { + min = -min; + } + if (min < MINMONEY) + { + min = MINMONEY; + } + return min; + } @Override public boolean isEcoLogEnabled() diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java index 933b54b3f..5ed80d35b 100644 --- a/Essentials/src/com/earth2me/essentials/Trade.java +++ b/Essentials/src/com/earth2me/essentials/Trade.java @@ -143,8 +143,7 @@ public class Trade { if (getMoney() != null) { - final double mon = user.getMoney(); - if (mon < getMoney() && getMoney() > 0 && !user.isAuthorized("essentials.eco.loan")) + if (!user.canAfford(getMoney()) && getMoney() > 0) { throw new ChargeException(_("notEnoughMoney")); } @@ -163,9 +162,8 @@ public class Trade && !user.isAuthorized("essentials.nocommandcost.all") && !user.isAuthorized("essentials.nocommandcost." + command)) { - final double mon = user.getMoney(); final double cost = ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command); - if (mon < cost && cost > 0 && !user.isAuthorized("essentials.eco.loan")) + if (!user.canAfford(cost) && cost > 0) { throw new ChargeException(_("notEnoughMoney")); } diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 7225e1dba..a799653a8 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -153,9 +153,18 @@ public class User extends UserData implements Comparable, IReplyTo, IUser } public boolean canAfford(final double cost) + { + return canAfford(cost, true); + } + + public boolean canAfford(final double cost, final boolean permcheck) { final double mon = getMoney(); - return mon >= cost || isAuthorized("essentials.eco.loan"); + if (!permcheck || isAuthorized("essentials.eco.loan")) + { + return (mon + cost) > ess.getSettings().getMinMoney(); + } + return cost <= mon; } public void dispose() @@ -384,7 +393,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser public void updateMoneyCache(final double value) { if (ess.getPaymentMethod().hasMethod() && super.getMoney() != value) - { + { super.setMoney(value); } } diff --git a/Essentials/src/com/earth2me/essentials/api/Economy.java b/Essentials/src/com/earth2me/essentials/api/Economy.java index 1d45c8df9..a1d421c38 100644 --- a/Essentials/src/com/earth2me/essentials/api/Economy.java +++ b/Essentials/src/com/earth2me/essentials/api/Economy.java @@ -115,6 +115,10 @@ public final class Economy { throw new UserDoesNotExistException(name); } + if (balance < ess.getSettings().getMinMoney()) + { + throw new NoLoanPermittedException(); + } if (balance < 0.0 && !user.isAuthorized("essentials.eco.loan")) { throw new NoLoanPermittedException(); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java index 8f432ca6e..d2efc1845 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import java.util.Locale; import org.bukkit.Server; @@ -45,6 +46,9 @@ public class Commandeco extends EssentialsCommand break; case TAKE: + if (!player.canAfford(amount, false)) { + throw new Exception(_("notEnoughMoney")); + } player.takeMoney(amount); break; diff --git a/Essentials/src/com/earth2me/essentials/user/User.java b/Essentials/src/com/earth2me/essentials/user/User.java index 0e544ae06..5249c8718 100644 --- a/Essentials/src/com/earth2me/essentials/user/User.java +++ b/Essentials/src/com/earth2me/essentials/user/User.java @@ -196,4 +196,15 @@ public class User extends UserBase implements IUser unlock(); } } + + @Override + public boolean canAfford(final double cost) + { + final double mon = getMoney(); + if (isAuthorized("essentials.eco.loan")) + { + return (mon + cost) > ess.getSettings().getMinMoney(); + } + return cost <= mon; + } } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 00585f35f..97b73e4c5 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -281,10 +281,10 @@ spawn-if-no-home: true update-bed-at-daytime: true # Allow players to have multiple homes. +# Players need essentials.sethome.multiple before they can have more than 1 home, default to 'default' below. # Define different amounts of multiple homes for different permissions, e.g. essentials.sethome.multiple.vip # People with essentials.sethome.multiple.unlimited are not limited by these numbers. sethome-multiple: - # essentials.sethome.multiple default: 3 # essentials.sethome.multiple.vip vip: 5 @@ -321,6 +321,10 @@ currency-symbol: '$' # The amount is always limited to 10 trillions because of the limitations of a java double max-money: 10000000000000 +# Set the minimum amount of money a player can have +# Setting this to 0, will disable overdrafts/loans compeltely. Users need 'essentials.eco.loan' perm to go below 0. +min-money: -10000000000000 + # Enable this to log all interactions with trade/buy/sell signs and sell command economy-log-enabled: false -- cgit v1.2.3 From e277acf80eab14b75c999881b009616a949f52a5 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 26 Feb 2012 04:27:13 +0000 Subject: Display users new balance on /eco give/take. --- Essentials/src/com/earth2me/essentials/User.java | 4 ++-- Essentials/src/com/earth2me/essentials/commands/Commandeco.java | 9 +++++++-- Essentials/src/messages.properties | 4 ++-- Essentials/src/messages_da.properties | 4 ++-- Essentials/src/messages_de.properties | 4 ++-- Essentials/src/messages_en.properties | 4 ++-- Essentials/src/messages_es.properties | 4 ++-- Essentials/src/messages_fr.properties | 4 ++-- Essentials/src/messages_nl.properties | 4 ++-- 9 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index a799653a8..501577878 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -109,7 +109,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser sendMessage(_("addedToAccount", Util.formatCurrency(value, ess))); if (initiator != null) { - initiator.sendMessage(_("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName())); + initiator.sendMessage(_("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName(), Util.formatCurrency(getMoney(), ess))); } } @@ -148,7 +148,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser sendMessage(_("takenFromAccount", Util.formatCurrency(value, ess))); if (initiator != null) { - initiator.sendMessage(_("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName())); + initiator.sendMessage(_("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName(), Util.formatCurrency(getMoney(), ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java index d2efc1845..b9694ee49 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java @@ -46,8 +46,9 @@ public class Commandeco extends EssentialsCommand break; case TAKE: - if (!player.canAfford(amount, false)) { - throw new Exception(_("notEnoughMoney")); + if (!player.canAfford(amount, false)) + { + throw new Exception(_("notEnoughMoney")); } player.takeMoney(amount); break; @@ -68,6 +69,10 @@ public class Commandeco extends EssentialsCommand break; case TAKE: + if (!player.canAfford(amount, false)) + { + throw new Exception(_("notEnoughMoney")); + } player.takeMoney(amount, sender); break; diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 8489b6262..118c61ca4 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} has been added to your account. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=broke: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} alertPlaced=placed: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival takenFromAccount=\u00a7c{0} has been taken from your account. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... teleportationCommencing=\u00a77Teleportation commencing... diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 82145afc1..a2719ddd1 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -4,7 +4,7 @@ # by: Dysp, dysperen@gmail.com action=* {0} {1} addedToAccount=\u00a7a{0} er blevet tilf\u00f8jet til din konto. -addedToOthersAccount=\u00a7a{0} er blevet tilf\u00f8jet til {1} konto. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=\u00f8delagde: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3} alertPlaced=placerede: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Farvel grusomme verden... suicideSuccess= \u00a77{0} tog sit eget liv survival=survival takenFromAccount=\u00a7c{0} er blevet taget fra din konto. -takenFromOthersAccount=\u00a7c{0} er blevet taget fra {1}''s konto. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Anmodning om teleport er sendt til alle spillere. teleportAll=\u00a77Teleporterer alle spillere... teleportationCommencing=\u00a77Teleport begynder... diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 2572f7cf2..b5ca8a800 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt. -addedToOthersAccount=\u00a7a{0} wurden zu {1}s Konto hinzugef\u00fcgt. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=zerst\u00f6rt: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3} alertPlaced=platziert: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Lebewohl grausame Welt... suicideSuccess= \u00a77{0} hat sich das Leben genommen. survival=survival takenFromAccount=\u00a7c{0} wurden aus deiner Geldb\u00f6rse genommen. -takenFromOthersAccount=\u00a7c{0} wurde von {1} wurde Rechnung getragen. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Teleportierungsanfrage zu allen Spielern gesendet... teleportAll=\u00a77Teleportiere alle Spieler... teleportAtoB=\u00a77{0}\u00a77 teleportiert dich zu {1}\u00a77. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index a2acdf9a2..dac209927 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} has been added to your account. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=broke: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} alertPlaced=placed: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival takenFromAccount=\u00a7c{0} has been taken from your account. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... teleportationCommencing=\u00a77Teleportation commencing... diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 38d62f6c4..0c1ca7452 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} ha sido agregado a tu cuenta. -addedToOthersAccount=\u00a7a{0} ha sido agregado a la cuenta de {1}. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=roto: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} en: {3} alertPlaced=situado: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Adios mundo cruel... suicideSuccess= \u00a77{0} se quito su propia vida survival=survival takenFromAccount=\u00a7c{0} ha sido sacado de tu cuenta. -takenFromOthersAccount=\u00a7c{0} ha sido sacado de la cuenta de {1}. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Peticion de teletransporte enviada a todos los jugadores... teleportAll=\u00a77Teletransportando a todos los jugadores... teleportationCommencing=\u00a77Comenzando teletransporte... diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 290c1b668..bd93cb8e8 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -4,7 +4,7 @@ # by: L\u00e9a Gris action=* {0} {1} addedToAccount=\u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 \u00e0 votre compte. -addedToOthersAccount=\u00a7a{0} a \u00e9t\u00e9 ajout\u00e9 \u00e0 {1} compte. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=a cass\u00e9 : alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3} alertPlaced=a plac\u00e9 : @@ -318,7 +318,7 @@ suicideMessage=\u00a77Au revoir monde cruel... suicideSuccess=\u00a77{0} s''est suicid\u00e9. survival=survie takenFromAccount=\u00a7c{0} ont \u00e9t\u00e9 retir\u00e9 de votre compte. -takenFromOthersAccount=\u00a7c{0} a \u00e9t\u00e9 r\u00e9tir\u00e9 du compte de {1}. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Demande de t\u00e9l\u00e9portation envoy\u00e9e \u00e0 tous les joueurs... teleportAll=\u00a77T\u00e9l\u00e9poration de tous les joueurs. teleportationCommencing=\u00a77D\u00e9but de la t\u00e9l\u00e9portation... diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 8997bfec6..f2c9f9b2f 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -4,7 +4,7 @@ # by: Geertje123 action=* {0} {1} addedToAccount=\u00a7a{0} is gestort op je account. -addedToOthersAccount=\u00a7a{0} is overgemaakt naar {1}''s rekening +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=gebroken: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3} alertPlaced=geplaatst: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Vaarwel vreedzame wereld... suicideSuccess= \u00a77{0} pleegde zelfmoord survival=survival takenFromAccount=\u00a7c{0} is van je bank rekening afgehaald. -takenFromOthersAccount=\u00a7c{0} is overgenomen uit {1} account. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Bezig met teleporteren van alle spelers... teleportationCommencing=\u00a77Aan het beginnen met teleporteren... -- cgit v1.2.3 From 862f3aad599bb04a570411c774cfa23a5a2f1bb1 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 26 Feb 2012 05:01:40 +0000 Subject: Adjustments to negative eco give/take. --- Essentials/src/com/earth2me/essentials/User.java | 3 ++- Essentials/src/com/earth2me/essentials/user/User.java | 2 +- Essentials/src/messages.properties | 4 ++-- Essentials/src/messages_da.properties | 4 ++-- Essentials/src/messages_de.properties | 4 ++-- Essentials/src/messages_en.properties | 4 ++-- Essentials/src/messages_es.properties | 4 ++-- Essentials/src/messages_fr.properties | 4 ++-- Essentials/src/messages_nl.properties | 4 ++-- 9 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 501577878..bd712bf87 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -160,9 +160,10 @@ public class User extends UserData implements Comparable, IReplyTo, IUser public boolean canAfford(final double cost, final boolean permcheck) { final double mon = getMoney(); + ess.getLogger().log(Level.INFO, "min cash is " + ess.getSettings().getMinMoney()); if (!permcheck || isAuthorized("essentials.eco.loan")) { - return (mon + cost) > ess.getSettings().getMinMoney(); + return (mon - cost) > ess.getSettings().getMinMoney(); } return cost <= mon; } diff --git a/Essentials/src/com/earth2me/essentials/user/User.java b/Essentials/src/com/earth2me/essentials/user/User.java index 5249c8718..d77790938 100644 --- a/Essentials/src/com/earth2me/essentials/user/User.java +++ b/Essentials/src/com/earth2me/essentials/user/User.java @@ -203,7 +203,7 @@ public class User extends UserBase implements IUser final double mon = getMoney(); if (isAuthorized("essentials.eco.loan")) { - return (mon + cost) > ess.getSettings().getMinMoney(); + return (mon - cost) > ess.getSettings().getMinMoney(); } return cost <= mon; } diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 118c61ca4..f7958319d 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} has been added to your account. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} +addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} alertBroke=broke: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} alertPlaced=placed: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival takenFromAccount=\u00a7c{0} has been taken from your account. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} +takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... teleportationCommencing=\u00a77Teleportation commencing... diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index a2719ddd1..0d8260947 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -4,7 +4,7 @@ # by: Dysp, dysperen@gmail.com action=* {0} {1} addedToAccount=\u00a7a{0} er blevet tilf\u00f8jet til din konto. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} +addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} alertBroke=\u00f8delagde: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3} alertPlaced=placerede: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Farvel grusomme verden... suicideSuccess= \u00a77{0} tog sit eget liv survival=survival takenFromAccount=\u00a7c{0} er blevet taget fra din konto. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} +takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Anmodning om teleport er sendt til alle spillere. teleportAll=\u00a77Teleporterer alle spillere... teleportationCommencing=\u00a77Teleport begynder... diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index b5ca8a800..815972f03 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} +addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} alertBroke=zerst\u00f6rt: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3} alertPlaced=platziert: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Lebewohl grausame Welt... suicideSuccess= \u00a77{0} hat sich das Leben genommen. survival=survival takenFromAccount=\u00a7c{0} wurden aus deiner Geldb\u00f6rse genommen. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} +takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleportierungsanfrage zu allen Spielern gesendet... teleportAll=\u00a77Teleportiere alle Spieler... teleportAtoB=\u00a77{0}\u00a77 teleportiert dich zu {1}\u00a77. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index dac209927..dfc7600dc 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} has been added to your account. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} +addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} alertBroke=broke: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} alertPlaced=placed: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival takenFromAccount=\u00a7c{0} has been taken from your account. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} +takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... teleportationCommencing=\u00a77Teleportation commencing... diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 0c1ca7452..909ec7434 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} ha sido agregado a tu cuenta. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} +addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} alertBroke=roto: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} en: {3} alertPlaced=situado: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Adios mundo cruel... suicideSuccess= \u00a77{0} se quito su propia vida survival=survival takenFromAccount=\u00a7c{0} ha sido sacado de tu cuenta. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} +takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Peticion de teletransporte enviada a todos los jugadores... teleportAll=\u00a77Teletransportando a todos los jugadores... teleportationCommencing=\u00a77Comenzando teletransporte... diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index bd93cb8e8..a74be475b 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -4,7 +4,7 @@ # by: L\u00e9a Gris action=* {0} {1} addedToAccount=\u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 \u00e0 votre compte. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} +addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} alertBroke=a cass\u00e9 : alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3} alertPlaced=a plac\u00e9 : @@ -318,7 +318,7 @@ suicideMessage=\u00a77Au revoir monde cruel... suicideSuccess=\u00a77{0} s''est suicid\u00e9. survival=survie takenFromAccount=\u00a7c{0} ont \u00e9t\u00e9 retir\u00e9 de votre compte. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} +takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Demande de t\u00e9l\u00e9portation envoy\u00e9e \u00e0 tous les joueurs... teleportAll=\u00a77T\u00e9l\u00e9poration de tous les joueurs. teleportationCommencing=\u00a77D\u00e9but de la t\u00e9l\u00e9portation... diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index f2c9f9b2f..51bbe2bed 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -4,7 +4,7 @@ # by: Geertje123 action=* {0} {1} addedToAccount=\u00a7a{0} is gestort op je account. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} +addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} alertBroke=gebroken: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3} alertPlaced=geplaatst: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Vaarwel vreedzame wereld... suicideSuccess= \u00a77{0} pleegde zelfmoord survival=survival takenFromAccount=\u00a7c{0} is van je bank rekening afgehaald. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} +takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Bezig met teleporteren van alle spelers... teleportationCommencing=\u00a77Aan het beginnen met teleporteren... -- cgit v1.2.3 From 6ab57b9abefd0e0f9676127fda741da1507b2629 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 26 Feb 2012 05:06:03 +0000 Subject: Cleanup. --- Essentials/src/com/earth2me/essentials/Settings.java | 14 ++++++-------- Essentials/src/com/earth2me/essentials/User.java | 2 -- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 39179b957..b6b1f4994 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -5,9 +5,7 @@ import com.earth2me.essentials.commands.IEssentialsCommand; import com.earth2me.essentials.signs.EssentialsSign; import com.earth2me.essentials.signs.Signs; import com.earth2me.essentials.textreader.IText; -import com.earth2me.essentials.textreader.KeywordReplacer; import com.earth2me.essentials.textreader.SimpleTextInput; -import com.earth2me.essentials.textreader.SimpleTextPager; import java.io.File; import java.text.MessageFormat; import java.util.*; @@ -218,10 +216,10 @@ public class Settings implements ISettings if (config.isConfigurationSection("kits")) { final ConfigurationSection kits = getKits(); - if (kits.isConfigurationSection(name)) + if (kits.isConfigurationSection(name)) { return kits.getConfigurationSection(name).getValues(true); - } + } } return null; } @@ -539,15 +537,15 @@ public class Settings implements ISettings } return max; } - private final static double MINMONEY = -10000000000000.0; - + @Override public double getMinMoney() { double min = config.getDouble("min-money", MINMONEY); - if (min > 0) { - min = -min; + if (min > 0) + { + min = -min; } if (min < MINMONEY) { diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index bd712bf87..86a3bcbfe 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -7,7 +7,6 @@ import java.util.Calendar; import java.util.GregorianCalendar; import java.util.logging.Level; import java.util.logging.Logger; -import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -160,7 +159,6 @@ public class User extends UserData implements Comparable, IReplyTo, IUser public boolean canAfford(final double cost, final boolean permcheck) { final double mon = getMoney(); - ess.getLogger().log(Level.INFO, "min cash is " + ess.getSettings().getMinMoney()); if (!permcheck || isAuthorized("essentials.eco.loan")) { return (mon - cost) > ess.getSettings().getMinMoney(); -- cgit v1.2.3 From 332f19177e961a60c984e674e499c78a87f4fb49 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 26 Feb 2012 05:10:04 +0000 Subject: Allow people to hit exactly 'min money'. --- Essentials/src/com/earth2me/essentials/User.java | 2 +- Essentials/src/com/earth2me/essentials/user/User.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 86a3bcbfe..0be375c88 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -161,7 +161,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser final double mon = getMoney(); if (!permcheck || isAuthorized("essentials.eco.loan")) { - return (mon - cost) > ess.getSettings().getMinMoney(); + return (mon - cost) >= ess.getSettings().getMinMoney(); } return cost <= mon; } diff --git a/Essentials/src/com/earth2me/essentials/user/User.java b/Essentials/src/com/earth2me/essentials/user/User.java index d77790938..0e77dd6a9 100644 --- a/Essentials/src/com/earth2me/essentials/user/User.java +++ b/Essentials/src/com/earth2me/essentials/user/User.java @@ -203,7 +203,7 @@ public class User extends UserBase implements IUser final double mon = getMoney(); if (isAuthorized("essentials.eco.loan")) { - return (mon - cost) > ess.getSettings().getMinMoney(); + return (mon - cost) >= ess.getSettings().getMinMoney(); } return cost <= mon; } -- cgit v1.2.3 From ac3e65a82947431b1504d79444d4b0219e20f366 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 27 Feb 2012 03:24:58 +0000 Subject: Change jail listener to catch respawn at Highest --- Essentials/src/com/earth2me/essentials/Jails.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Jails.java b/Essentials/src/com/earth2me/essentials/Jails.java index 0011905ec..7217992ad 100644 --- a/Essentials/src/com/earth2me/essentials/Jails.java +++ b/Essentials/src/com/earth2me/essentials/Jails.java @@ -193,7 +193,7 @@ public class Jails extends AsyncStorageObjectHolder Date: Mon, 27 Feb 2012 03:40:18 +0000 Subject: Prevent EssSpawn trying to handle spawning of jailed players. --- .../com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java index 083fd66a5..c7a17845a 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java @@ -35,6 +35,11 @@ public class EssentialsSpawnPlayerListener implements Listener { final User user = ess.getUser(event.getPlayer()); + if (user.isJailed() && user.getJail() != null && !user.getJail().isEmpty()) + { + return; + } + if (ess.getSettings().getRespawnAtHome()) { Location home; -- cgit v1.2.3 From 1c2221f52fdb523aa5d4aaef74d8b105c38badc3 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 27 Feb 2012 15:31:43 +0000 Subject: Adding option to log all eco api transactions. --- Essentials/src/com/earth2me/essentials/ISettings.java | 2 ++ Essentials/src/com/earth2me/essentials/Settings.java | 6 ++++++ Essentials/src/com/earth2me/essentials/Trade.java | 3 ++- Essentials/src/com/earth2me/essentials/User.java | 3 ++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index cded5bde5..6186736b4 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -119,6 +119,8 @@ public interface ISettings extends IConf double getMinMoney(); boolean isEcoLogEnabled(); + + boolean isEcoLogUpdateEnabled(); boolean removeGodOnDisconnect(); diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index b6b1f4994..732b5485c 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -559,6 +559,12 @@ public class Settings implements ISettings { return config.getBoolean("economy-log-enabled", false); } + + @Override + public boolean isEcoLogUpdateEnabled() + { + return config.getBoolean("economy-log-update-enabled", false); + } @Override public boolean removeGodOnDisconnect() diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java index 5ed80d35b..3594c3137 100644 --- a/Essentials/src/com/earth2me/essentials/Trade.java +++ b/Essentials/src/com/earth2me/essentials/Trade.java @@ -198,7 +198,8 @@ public class Trade public static void log(String type, String subtype, String event, String sender, Trade charge, String receiver, Trade pay, Location loc, IEssentials ess) { - if (!ess.getSettings().isEcoLogEnabled()) + if ((loc == null && !ess.getSettings().isEcoLogUpdateEnabled()) + || (loc != null && !ess.getSettings().isEcoLogEnabled())) { return; } diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 0be375c88..ba34548fe 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -385,8 +385,9 @@ public class User extends UserData implements Comparable, IReplyTo, IUser catch (Throwable ex) { } - } + } super.setMoney(value); + Trade.log("Update", "Set", "API", getName(), new Trade(value, ess), null, null, null, ess); } public void updateMoneyCache(final double value) -- cgit v1.2.3 From 0670ece7f3602602794b9636da073c21b7076377 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 25 Feb 2012 17:57:26 +0000 Subject: Updating Bukkit: CB #1858, B #1334 --- .../src/com/earth2me/essentials/Essentials.java | 2 +- .../src/com/earth2me/essentials/OfflinePlayer.java | 17 ++++++++++++----- .../earth2me/essentials/craftbukkit/FakeWorld.java | 6 ++++++ lib/bukkit.jar | Bin 4614591 -> 4620068 bytes lib/craftbukkit.jar | Bin 10786423 -> 10793996 bytes 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index a75e12aad..ff082efa7 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -66,7 +66,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 1938; + public static final int BUKKIT_VERSION = 1958; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java index 440d3fad3..ba5f97c71 100644 --- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java +++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java @@ -172,11 +172,6 @@ public class OfflinePlayer implements Player return false; } - public boolean isPlayer() - { - return false; - } - @Override public int getRemainingAir() { @@ -901,4 +896,16 @@ public class OfflinePlayer implements Player { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public T launchProjectile(Class arg0) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public EntityType getType() + { + return EntityType.PLAYER; + } } diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java index 0ea06e72b..f39c6e451 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java @@ -584,4 +584,10 @@ public class FakeWorld implements World { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public LivingEntity spawnCreature(Location arg0, EntityType arg1) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/lib/bukkit.jar b/lib/bukkit.jar index e343a9723..aa22b004e 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index d51826640..24d7801c3 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From ba346bd797ee101fba94b028861683f215d661d0 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 28 Feb 2012 10:46:10 +0000 Subject: Make 'manload' reload the config correctly. --- EssentialsGroupManager/src/Changelog.txt | 3 ++- .../src/org/anjocaido/groupmanager/GroupManager.java | 18 +++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 1159607ed..9d7187690 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -145,4 +145,5 @@ v 1.9: - Update for Bukkit R5 compatability. - Removed BukkitPermsOverride as this is now the default with bukkit handling child nodes. - Prevent adding inheritances and info nodes to globalgroups. These are permissions collections, not player groups. - - Prevent promoting players to, and demoting to GlobalGroups. \ No newline at end of file + - Prevent promoting players to, and demoting to GlobalGroups. + - Make 'manload' reload the config correctly. \ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index b0d46ca1a..00c71a41e 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -121,15 +121,15 @@ public class GroupManager extends JavaPlugin { ch = new GMLoggerHandler(); GroupManager.logger.addHandler(ch); logger.setLevel(Level.ALL); - if (worldsHolder == null) { - // Create the backup folder, if it doesn't exist. - prepareFileFields(); - // Load the config.yml - prepareConfig(); - // Load the global groups - globalGroups = new GlobalGroups(this); - worldsHolder = new WorldsHolder(this); - } + + // Create the backup folder, if it doesn't exist. + prepareFileFields(); + // Load the config.yml + prepareConfig(); + // Load the global groups + globalGroups = new GlobalGroups(this); + worldsHolder = new WorldsHolder(this); + PluginDescriptionFile pdfFile = this.getDescription(); if (worldsHolder == null) { -- cgit v1.2.3 From e5081db7e40b41e2755d2483400d1afd100f7db5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 1 Mar 2012 12:27:59 +1100 Subject: Remove old, unwanted manifest.mf files --- EssentialsGeoIP/manifest.mf | 3 --- EssentialsProtect/MANIFEST.MF | 1 - EssentialsUpdate/manifest.mf | 3 --- EssentialsXMPP/manifest.mf | 3 --- 4 files changed, 10 deletions(-) delete mode 100644 EssentialsGeoIP/manifest.mf delete mode 100644 EssentialsProtect/MANIFEST.MF delete mode 100644 EssentialsUpdate/manifest.mf delete mode 100644 EssentialsXMPP/manifest.mf diff --git a/EssentialsGeoIP/manifest.mf b/EssentialsGeoIP/manifest.mf deleted file mode 100644 index 328e8e5bc..000000000 --- a/EssentialsGeoIP/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/EssentialsProtect/MANIFEST.MF b/EssentialsProtect/MANIFEST.MF deleted file mode 100644 index 9d885be53..000000000 --- a/EssentialsProtect/MANIFEST.MF +++ /dev/null @@ -1 +0,0 @@ -Manifest-Version: 1.0 diff --git a/EssentialsUpdate/manifest.mf b/EssentialsUpdate/manifest.mf deleted file mode 100644 index 328e8e5bc..000000000 --- a/EssentialsUpdate/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/EssentialsXMPP/manifest.mf b/EssentialsXMPP/manifest.mf deleted file mode 100644 index 328e8e5bc..000000000 --- a/EssentialsXMPP/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - -- cgit v1.2.3 From e1818f7e62b56f0e4970923518cd953db9edbe11 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 1 Mar 2012 14:40:57 +1100 Subject: Separate config sections evenly --- Essentials/src/config.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 97b73e4c5..81d911c82 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -18,8 +18,6 @@ # - CraftBukkit and Permissions have been updated: CraftBukkit and Essentials almost always line up, but sometimes other plugins fall behind CraftBukkit's multiple daily updates # - You have saved the document as UTF-8, NOT the default, ANSI - - ############################################################ # +------------------------------------------------------+ # # | Essentials (Global) | # @@ -372,8 +370,6 @@ chat: # If your using group formats make sure to remove the '#' to allow the setting to be read. - - ############################################################ # +------------------------------------------------------+ # # | EssentialsProtect | # @@ -529,7 +525,6 @@ protect: # Should we tell people they are not allowed to build warn-on-build-disallow: true - # Disable weather options weather: storm: false -- cgit v1.2.3 From b44d738867544386b905e23bd32c4066863de5d4 Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 1 Mar 2012 15:56:17 +0100 Subject: CB# 1988 B# 1360 --- lib/bukkit.jar | Bin 4620068 -> 4686754 bytes lib/craftbukkit.jar | Bin 10793996 -> 10919232 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/bukkit.jar b/lib/bukkit.jar index aa22b004e..28e143709 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index 24d7801c3..ce2ecfeb8 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From 02c1cb05c7d5f4f8d472d714b24c57b9a0de4f5e Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 1 Mar 2012 16:15:37 +0100 Subject: Updated to R6 --- .../src/com/earth2me/essentials/OfflinePlayer.java | 121 ++++++++++++++++++++- .../essentials/commands/Commandkillall.java | 8 +- .../essentials/craftbukkit/FakeInventory.java | 35 ++++++ .../earth2me/essentials/craftbukkit/FakeWorld.java | 37 +++++++ .../essentials/craftbukkit/ShowInventory.java | 46 -------- .../earth2me/essentials/signs/SignDisposal.java | 4 +- .../com/earth2me/essentials/signs/SignFree.java | 7 +- .../earth2me/essentials/textreader/HelpInput.java | 6 +- .../test/com/earth2me/essentials/FakeServer.java | 28 +++++ .../earth2me/essentials/update/VersionInfo.java | 2 +- .../update/states/InstallationFinishedEvent.java | 7 ++ 11 files changed, 242 insertions(+), 59 deletions(-) delete mode 100644 Essentials/src/com/earth2me/essentials/craftbukkit/ShowInventory.java diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java index ba5f97c71..a1c46c3ea 100644 --- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java +++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java @@ -1,18 +1,22 @@ package com.earth2me.essentials; -import com.earth2me.essentials.craftbukkit.OfflineBedLocation; import static com.earth2me.essentials.I18n._; import java.net.InetSocketAddress; import java.util.*; import lombok.Delegate; import org.bukkit.*; import org.bukkit.block.Block; +import org.bukkit.conversations.Conversation; import org.bukkit.entity.*; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryView; +import org.bukkit.inventory.InventoryView.Property; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; import org.bukkit.map.MapView; +import org.bukkit.metadata.MetadataValue; import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionAttachment; import org.bukkit.permissions.PermissionAttachmentInfo; @@ -908,4 +912,119 @@ public class OfflinePlayer implements Player { return EntityType.PLAYER; } + + @Override + public void playEffect(Location lctn, Effect effect, T t) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean setWindowProperty(Property prprt, int i) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InventoryView getOpenInventory() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InventoryView openInventory(Inventory invntr) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InventoryView openWorkbench(Location lctn, boolean bln) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InventoryView openEnchanting(Location lctn, boolean bln) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void openInventory(InventoryView iv) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void closeInventory() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ItemStack getItemOnCursor() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setItemOnCursor(ItemStack is) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMetadata(String string, MetadataValue mv) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public List getMetadata(String string) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean hasMetadata(String string) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeMetadata(String string, Plugin plugin) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + + @Override + public boolean isConversing() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void acceptConversationInput(String string) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean beginConversation(Conversation c) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void abandonConversation(Conversation c) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void sendMessage(String[] strings) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java index b9679e8b9..c0b47d20f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java @@ -125,7 +125,7 @@ public class Commandkillall extends EssentialsCommand { if (entity instanceof Animals || entity instanceof NPC || entity instanceof Snowman || entity instanceof WaterMob) { - EntityDeathEvent event = new EntityDeathEvent(entity, Collections.EMPTY_LIST); + EntityDeathEvent event = new EntityDeathEvent((LivingEntity)entity, Collections.EMPTY_LIST); ess.getServer().getPluginManager().callEvent(event); entity.remove(); numKills++; @@ -135,7 +135,7 @@ public class Commandkillall extends EssentialsCommand { if (entity instanceof Monster || entity instanceof ComplexLivingEntity || entity instanceof Flying || entity instanceof Slime) { - EntityDeathEvent event = new EntityDeathEvent(entity, Collections.EMPTY_LIST); + EntityDeathEvent event = new EntityDeathEvent((LivingEntity)entity, Collections.EMPTY_LIST); ess.getServer().getPluginManager().callEvent(event); entity.remove(); numKills++; @@ -143,14 +143,14 @@ public class Commandkillall extends EssentialsCommand } else if (all) { - EntityDeathEvent event = new EntityDeathEvent(entity, Collections.EMPTY_LIST); + EntityDeathEvent event = new EntityDeathEvent((LivingEntity)entity, Collections.EMPTY_LIST); ess.getServer().getPluginManager().callEvent(event); entity.remove(); numKills++; } else if (entityClass != null && entityClass.isAssignableFrom(entity.getClass())) { - EntityDeathEvent event = new EntityDeathEvent(entity, Collections.EMPTY_LIST); + EntityDeathEvent event = new EntityDeathEvent((LivingEntity)entity, Collections.EMPTY_LIST); ess.getServer().getPluginManager().callEvent(event); entity.remove(); numKills++; diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java index 992791710..01e7bd5b2 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java @@ -1,8 +1,13 @@ package com.earth2me.essentials.craftbukkit; import java.util.HashMap; +import java.util.List; +import java.util.ListIterator; import org.bukkit.Material; +import org.bukkit.entity.HumanEntity; +import org.bukkit.event.inventory.InventoryType; import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; @@ -187,4 +192,34 @@ public class FakeInventory implements Inventory items[i] = null; } } + + @Override + public List getViewers() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getTitle() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InventoryType getType() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InventoryHolder getHolder() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ListIterator iterator() + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java index f39c6e451..91e5d5239 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java @@ -12,6 +12,7 @@ import org.bukkit.entity.*; import org.bukkit.generator.BlockPopulator; import org.bukkit.generator.ChunkGenerator; import org.bukkit.inventory.ItemStack; +import org.bukkit.metadata.MetadataValue; import org.bukkit.plugin.Plugin; import org.bukkit.util.Vector; @@ -590,4 +591,40 @@ public class FakeWorld implements World { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public void playEffect(Location lctn, Effect effect, T t) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void playEffect(Location lctn, Effect effect, T t, int i) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMetadata(String string, MetadataValue mv) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public List getMetadata(String string) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean hasMetadata(String string) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeMetadata(String string, Plugin plugin) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/ShowInventory.java b/Essentials/src/com/earth2me/essentials/craftbukkit/ShowInventory.java deleted file mode 100644 index fb2050ce4..000000000 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/ShowInventory.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.earth2me.essentials.craftbukkit; - -import java.util.logging.Level; -import java.util.logging.Logger; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.IInventory; -import net.minecraft.server.PlayerInventory; -import org.bukkit.craftbukkit.entity.CraftPlayer; -import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; - - -public class ShowInventory -{ - public static void showEmptyInventory(final Player player) - { - try - { - final EntityPlayer entityPlayer = ((CraftPlayer)player).getHandle(); - final CraftInventoryPlayer inv = new CraftInventoryPlayer(new PlayerInventory(((CraftPlayer)player).getHandle())); - inv.clear(); - entityPlayer.a((IInventory)inv.getInventory()); - } - catch (Throwable ex) - { - Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex); - } - } - - public static void showFilledInventory(final Player player, final ItemStack stack) - { - try - { - final EntityPlayer entityPlayer = ((CraftPlayer)player).getHandle(); - final CraftInventoryPlayer inv = new CraftInventoryPlayer(new PlayerInventory(((CraftPlayer)player).getHandle())); - inv.clear(); - InventoryWorkaround.addItem(inv, true, stack); - entityPlayer.a((IInventory)inv.getInventory()); - } - catch (Throwable ex) - { - Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex); - } - } -} diff --git a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java index f747ac07c..77e6164e5 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java @@ -2,7 +2,7 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; -import com.earth2me.essentials.craftbukkit.ShowInventory; +import org.bukkit.event.inventory.InventoryType; public class SignDisposal extends EssentialsSign @@ -15,7 +15,7 @@ public class SignDisposal extends EssentialsSign @Override protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) { - ShowInventory.showEmptyInventory(player.getBase()); + player.getBase().openInventory(ess.getServer().createInventory(player, InventoryType.CHEST)); return true; } } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java index 7af7dffd7..a69b4155f 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java @@ -4,8 +4,9 @@ import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; -import com.earth2me.essentials.craftbukkit.ShowInventory; import org.bukkit.Material; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; @@ -33,7 +34,9 @@ public class SignFree extends EssentialsSign } item.setAmount(item.getType().getMaxStackSize() * 9 * 4); - ShowInventory.showFilledInventory(player.getBase(), item); + Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST); + i.addItem(item); + player.openInventory(i); Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess); return true; } diff --git a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java index 85c00c1b6..efe66d585 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java @@ -30,9 +30,9 @@ public class HelpInput implements IText try { final PluginDescriptionFile desc = p.getDescription(); - final HashMap> cmds = (HashMap>)desc.getCommands(); + final Map> cmds = desc.getCommands(); pluginName = p.getDescription().getName().toLowerCase(Locale.ENGLISH); - for (Map.Entry> k : cmds.entrySet()) + for (Map.Entry> k : cmds.entrySet()) { try { @@ -57,7 +57,7 @@ public class HelpInput implements IText { if (ess.getSettings().showNonEssCommandsInHelp()) { - final HashMap value = k.getValue(); + final Map value = k.getValue(); Object permissions = null; if (value.containsKey(PERMISSION)) { diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java index a7335a957..58fdfc5fe 100644 --- a/Essentials/test/com/earth2me/essentials/FakeServer.java +++ b/Essentials/test/com/earth2me/essentials/FakeServer.java @@ -13,7 +13,11 @@ import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.command.PluginCommand; import org.bukkit.entity.Player; +import org.bukkit.event.inventory.InventoryType; import org.bukkit.generator.ChunkGenerator; +import org.bukkit.help.HelpMap; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.Recipe; import org.bukkit.map.MapView; @@ -677,4 +681,28 @@ public class FakeServer implements Server { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public HelpMap getHelpMap() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Inventory createInventory(InventoryHolder ih, InventoryType it) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Inventory createInventory(InventoryHolder ih, int i) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Inventory createInventory(InventoryHolder ih, int i, String string) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java b/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java index b9cddc38c..c06aa2e64 100644 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java +++ b/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java @@ -16,7 +16,7 @@ public class VersionInfo public VersionInfo(final Configuration updateConfig, final String path) { - changelog = updateConfig.getList(path + ".changelog", Collections.emptyList()); + changelog = updateConfig.getStringList(path + ".changelog"); minBukkit = updateConfig.getInt(path + ".min-bukkit", 0); maxBukkit = updateConfig.getInt(path + ".max-bukkit", 0); modules = new HashMap(); diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java index 02b35c3d6..82d9ee627 100644 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java +++ b/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java @@ -1,6 +1,7 @@ package com.earth2me.essentials.update.states; import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; public class InstallationFinishedEvent extends Event @@ -9,4 +10,10 @@ public class InstallationFinishedEvent extends Event { super(); } + + @Override + public HandlerList getHandlers() + { + throw new UnsupportedOperationException("Not supported yet."); + } } -- cgit v1.2.3 From e43a62f99251570e02c00be1445f1e992cd51a60 Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 1 Mar 2012 16:17:40 +0100 Subject: Requires #1988 because of the new Inventory stuff --- Essentials/src/com/earth2me/essentials/Essentials.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index ff082efa7..f480d9e8f 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -66,7 +66,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 1958; + public static final int BUKKIT_VERSION = 1988; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); -- cgit v1.2.3 From 696b930fb24a7739f2e7b13d20b924ffb5f10ca9 Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 1 Mar 2012 17:33:09 +0100 Subject: EntityType instead of CreatureType --- Essentials/src/com/earth2me/essentials/Mob.java | 56 +++++++++++----------- .../essentials/commands/Commandspawner.java | 3 +- .../essentials/commands/Commandspawnmob.java | 24 +++++----- 3 files changed, 42 insertions(+), 41 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java index 049f7b8a3..7be698950 100644 --- a/Essentials/src/com/earth2me/essentials/Mob.java +++ b/Essentials/src/com/earth2me/essentials/Mob.java @@ -9,40 +9,40 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.Location; import org.bukkit.Server; -import org.bukkit.entity.CreatureType; +import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; public enum Mob { - CHICKEN("Chicken", Enemies.FRIENDLY, CreatureType.CHICKEN), - COW("Cow", Enemies.FRIENDLY, CreatureType.COW), - CREEPER("Creeper", Enemies.ENEMY, CreatureType.CREEPER), - GHAST("Ghast", Enemies.ENEMY, CreatureType.GHAST), - GIANT("Giant", Enemies.ENEMY, CreatureType.GIANT), - PIG("Pig", Enemies.FRIENDLY, CreatureType.PIG), - PIGZOMB("PigZombie", Enemies.NEUTRAL, CreatureType.PIG_ZOMBIE), - SHEEP("Sheep", Enemies.FRIENDLY, "", CreatureType.SHEEP), - SKELETON("Skeleton", Enemies.ENEMY, CreatureType.SKELETON), - SLIME("Slime", Enemies.ENEMY, CreatureType.SLIME), - SPIDER("Spider", Enemies.ENEMY, CreatureType.SPIDER), - SQUID("Squid", Enemies.FRIENDLY, CreatureType.SQUID), - ZOMBIE("Zombie", Enemies.ENEMY, CreatureType.ZOMBIE), - WOLF("Wolf", Enemies.NEUTRAL, CreatureType.WOLF), - CAVESPIDER("CaveSpider", Enemies.ENEMY, CreatureType.CAVE_SPIDER), - ENDERMAN("Enderman", Enemies.ENEMY, "", CreatureType.ENDERMAN), - SILVERFISH("Silverfish", Enemies.ENEMY, "", CreatureType.SILVERFISH), - ENDERDRAGON("EnderDragon", Enemies.ENEMY, CreatureType.ENDER_DRAGON), - VILLAGER("Villager", Enemies.FRIENDLY, CreatureType.VILLAGER), - BLAZE("Blaze", Enemies.ENEMY, CreatureType.BLAZE), - MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, CreatureType.MUSHROOM_COW), - MAGMACUBE("MagmaCube", Enemies.ENEMY, CreatureType.MAGMA_CUBE), - SNOWMAN("Snowman", Enemies.FRIENDLY, "", CreatureType.SNOWMAN); + CHICKEN("Chicken", Enemies.FRIENDLY, EntityType.CHICKEN), + COW("Cow", Enemies.FRIENDLY, EntityType.COW), + CREEPER("Creeper", Enemies.ENEMY, EntityType.CREEPER), + GHAST("Ghast", Enemies.ENEMY, EntityType.GHAST), + GIANT("Giant", Enemies.ENEMY, EntityType.GIANT), + PIG("Pig", Enemies.FRIENDLY, EntityType.PIG), + PIGZOMB("PigZombie", Enemies.NEUTRAL, EntityType.PIG_ZOMBIE), + SHEEP("Sheep", Enemies.FRIENDLY, "", EntityType.SHEEP), + SKELETON("Skeleton", Enemies.ENEMY, EntityType.SKELETON), + SLIME("Slime", Enemies.ENEMY, EntityType.SLIME), + SPIDER("Spider", Enemies.ENEMY, EntityType.SPIDER), + SQUID("Squid", Enemies.FRIENDLY, EntityType.SQUID), + ZOMBIE("Zombie", Enemies.ENEMY, EntityType.ZOMBIE), + WOLF("Wolf", Enemies.NEUTRAL, EntityType.WOLF), + CAVESPIDER("CaveSpider", Enemies.ENEMY, EntityType.CAVE_SPIDER), + ENDERMAN("Enderman", Enemies.ENEMY, "", EntityType.ENDERMAN), + SILVERFISH("Silverfish", Enemies.ENEMY, "", EntityType.SILVERFISH), + ENDERDRAGON("EnderDragon", Enemies.ENEMY, EntityType.ENDER_DRAGON), + VILLAGER("Villager", Enemies.FRIENDLY, EntityType.VILLAGER), + BLAZE("Blaze", Enemies.ENEMY, EntityType.BLAZE), + MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, EntityType.MUSHROOM_COW), + MAGMACUBE("MagmaCube", Enemies.ENEMY, EntityType.MAGMA_CUBE), + SNOWMAN("Snowman", Enemies.FRIENDLY, "", EntityType.SNOWMAN); public static final Logger logger = Logger.getLogger("Minecraft"); - private Mob(String n, Enemies en, String s, CreatureType type) + private Mob(String n, Enemies en, String s, EntityType type) { this.suffix = s; this.name = n; @@ -50,7 +50,7 @@ public enum Mob this.bukkitType = type; } - private Mob(String n, Enemies en, CreatureType type) + private Mob(String n, Enemies en, EntityType type) { this.name = n; this.type = en; @@ -59,7 +59,7 @@ public enum Mob public String suffix = "s"; final public String name; final public Enemies type; - final private CreatureType bukkitType; + final private EntityType bukkitType; private static final Map hashMap = new HashMap(); static @@ -99,7 +99,7 @@ public enum Mob final protected String type; } - public CreatureType getType() + public EntityType getType() { return bukkitType; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java index d52315241..1cd65a743 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java @@ -10,6 +10,7 @@ import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Server; import org.bukkit.block.CreatureSpawner; +import org.bukkit.entity.EntityType; public class Commandspawner extends EssentialsCommand @@ -54,7 +55,7 @@ public class Commandspawner extends EssentialsCommand } final Trade charge = new Trade("spawner-" + mob.name.toLowerCase(Locale.ENGLISH), ess); charge.isAffordableFor(user); - ((CreatureSpawner)target.getBlock().getState()).setCreatureType(mob.getType()); + ((CreatureSpawner)target.getBlock().getState()).setSpawnedType(mob.getType()); charge.charge(user); user.sendMessage(_("setSpawner", mob.name)); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 948c82871..4971c7922 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -197,9 +197,9 @@ public class Commandspawnmob extends EssentialsCommand } } - private void changeMobData(final CreatureType type, final Entity spawned, final String data, final User user) throws Exception + private void changeMobData(final EntityType type, final Entity spawned, final String data, final User user) throws Exception { - if (type == CreatureType.SLIME || type == CreatureType.MAGMA_CUBE) + if (type == EntityType.SLIME || type == EntityType.MAGMA_CUBE) { try { @@ -210,18 +210,18 @@ public class Commandspawnmob extends EssentialsCommand throw new Exception(_("slimeMalformedSize"), e); } } - if ((type == CreatureType.SHEEP - || type == CreatureType.COW - || type == CreatureType.MUSHROOM_COW - || type == CreatureType.CHICKEN - || type == CreatureType.PIG - || type == CreatureType.WOLF) + if ((type == EntityType.SHEEP + || type == EntityType.COW + || type == EntityType.MUSHROOM_COW + || type == EntityType.CHICKEN + || type == EntityType.PIG + || type == EntityType.WOLF) && data.equalsIgnoreCase("baby")) { ((Animals)spawned).setAge(-24000); return; } - if (type == CreatureType.SHEEP) + if (type == EntityType.SHEEP) { if (data.toLowerCase(Locale.ENGLISH).contains("baby")) { @@ -246,7 +246,7 @@ public class Commandspawnmob extends EssentialsCommand throw new Exception(_("sheepMalformedColor"), e); } } - if (type == CreatureType.WOLF + if (type == EntityType.WOLF && data.toLowerCase(Locale.ENGLISH).startsWith("tamed")) { final Wolf wolf = ((Wolf)spawned); @@ -258,7 +258,7 @@ public class Commandspawnmob extends EssentialsCommand ((Animals)spawned).setAge(-24000); } } - if (type == CreatureType.WOLF + if (type == EntityType.WOLF && data.toLowerCase(Locale.ENGLISH).startsWith("angry")) { ((Wolf)spawned).setAngry(true); @@ -267,7 +267,7 @@ public class Commandspawnmob extends EssentialsCommand ((Animals)spawned).setAge(-24000); } } - if (type == CreatureType.CREEPER && data.equalsIgnoreCase("powered")) + if (type == EntityType.CREEPER && data.equalsIgnoreCase("powered")) { ((Creeper)spawned).setPowered(true); } -- cgit v1.2.3 From b0552019f53df8d76f051ceca26120ae1e524abf Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 1 Mar 2012 21:47:01 +0000 Subject: Fix version matching. --- Essentials/src/com/earth2me/essentials/Essentials.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index f480d9e8f..24ac0ad6e 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -129,10 +129,10 @@ public class Essentials extends JavaPlugin implements IEssentials LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName())); } } - final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-R[0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion()); + final Matcher versionMatch = Pattern.compile("git-Bukkit-(?:(?:[0-9]+)\\.)+[0-9]+-R[0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion()); if (versionMatch.matches()) { - final int versionNumber = Integer.parseInt(versionMatch.group(4)); + final int versionNumber = Integer.parseInt(versionMatch.group(1)); if (versionNumber < BUKKIT_VERSION) { LOGGER.log(Level.SEVERE, _("notRecommendedBukkit")); -- cgit v1.2.3 From 2e788802fe8856344235c1056bb5f6d66fecf23e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 1 Mar 2012 22:04:50 +0000 Subject: Fix kit timers resetting on server restart. --- Essentials/src/com/earth2me/essentials/UserData.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index ea3201f28..cda2fa511 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -817,16 +817,12 @@ public abstract class UserData extends PlayerExtension implements IConf private Map _getKitTimestamps() { - final Object map = config.getProperty("timestamps.kits"); - - if (map instanceof Map) - { - return (Map)map; - } - else + + if (config.isConfigurationSection("timestamps.kits")) { - return new HashMap(); + return config.getConfigurationSection("timestamps.kits").getValues(false); } + return new HashMap(); } public Long getKitTimestamp(final String name) -- cgit v1.2.3 From c36ca65e09b8612731c7466b5c5f2b93e946e8ff Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 1 Mar 2012 23:09:48 +0100 Subject: Bukkit broke this sign :( --- .../src/com/earth2me/essentials/signs/SignDisposal.java | 6 ++++-- Essentials/src/com/earth2me/essentials/signs/SignFree.java | 13 +++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java index 77e6164e5..aa6376fa0 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java @@ -2,7 +2,6 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; -import org.bukkit.event.inventory.InventoryType; public class SignDisposal extends EssentialsSign @@ -15,7 +14,10 @@ public class SignDisposal extends EssentialsSign @Override protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) { - player.getBase().openInventory(ess.getServer().createInventory(player, InventoryType.CHEST)); + player.sendMessage("Bukkit broke this sign :("); + //TODO: wait for a fix in bukkit + //Problem: Items can be duplicated + //player.getBase().openInventory(ess.getServer().createInventory(player, 36)); return true; } } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java index a69b4155f..7ab771833 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java @@ -4,6 +4,7 @@ import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; +import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import org.bukkit.Material; import org.bukkit.event.inventory.InventoryType; import org.bukkit.inventory.Inventory; @@ -33,10 +34,14 @@ public class SignFree extends EssentialsSign throw new SignException(_("cantSpawnItem", "Air")); } - item.setAmount(item.getType().getMaxStackSize() * 9 * 4); - Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST); - i.addItem(item); - player.openInventory(i); + item.setAmount(item.getType().getMaxStackSize()); + InventoryWorkaround.addItem(player.getInventory(), true, item); + player.sendMessage("Item added to your inventory."); + //TODO: wait for a fix in bukkit + //Problem: Items can be duplicated + //Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST); + //i.addItem(item); + //player.openInventory(i); Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess); return true; } -- cgit v1.2.3 From 6df3b9008a50922987c5100b17b400f9458d4a65 Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 1 Mar 2012 23:23:23 +0100 Subject: update inventory --- Essentials/src/com/earth2me/essentials/signs/SignFree.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java index 7ab771833..f5f32c38c 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java @@ -37,6 +37,7 @@ public class SignFree extends EssentialsSign item.setAmount(item.getType().getMaxStackSize()); InventoryWorkaround.addItem(player.getInventory(), true, item); player.sendMessage("Item added to your inventory."); + player.updateInventory(); //TODO: wait for a fix in bukkit //Problem: Items can be duplicated //Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST); -- cgit v1.2.3 From b3d3928db8b9d5cf28436980834b82d36658b6c1 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 1 Mar 2012 22:36:51 +0000 Subject: Kit sign cleanup --- Essentials/src/com/earth2me/essentials/signs/SignKit.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignKit.java b/Essentials/src/com/earth2me/essentials/signs/SignKit.java index 32a169592..102bd01b9 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignKit.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignKit.java @@ -17,7 +17,7 @@ public class SignKit extends EssentialsSign protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException { validateTrade(sign, 3, ess); - + final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH); if (kitName.isEmpty()) @@ -56,10 +56,9 @@ public class SignKit extends EssentialsSign charge.isAffordableFor(player); try { - final Object kit = ess.getSettings().getKit(kitName); - final Map els = (Map)kit; - final List items = Kit.getItems(player, els); - Kit.expandItems(ess, player, items); + final Map kit = ess.getSettings().getKit(kitName); + final List items = Kit.getItems(player, kit); + Kit.expandItems(ess, player, items); charge.charge(player); } catch (Exception ex) -- cgit v1.2.3 From f75779aa7a08034682041931a124ef0c5e6f6564 Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 1 Mar 2012 23:57:34 +0100 Subject: CB#2004 B#1368 --- lib/bukkit.jar | Bin 4686754 -> 4689493 bytes lib/craftbukkit.jar | Bin 10919232 -> 11036845 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/bukkit.jar b/lib/bukkit.jar index 28e143709..33a03e364 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index ce2ecfeb8..45958c144 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From 64d866a77dd42a3e26edf2aac83412003fe7df32 Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 2 Mar 2012 00:06:57 +0100 Subject: New Entities and Items for 1.2 --- Essentials/src/com/earth2me/essentials/Mob.java | 4 +++- .../com/earth2me/essentials/commands/Commandspawnmob.java | 12 ++++++++++++ Essentials/src/items.csv | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java index 7be698950..656ed6bc1 100644 --- a/Essentials/src/com/earth2me/essentials/Mob.java +++ b/Essentials/src/com/earth2me/essentials/Mob.java @@ -38,7 +38,9 @@ public enum Mob BLAZE("Blaze", Enemies.ENEMY, EntityType.BLAZE), MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, EntityType.MUSHROOM_COW), MAGMACUBE("MagmaCube", Enemies.ENEMY, EntityType.MAGMA_CUBE), - SNOWMAN("Snowman", Enemies.FRIENDLY, "", EntityType.SNOWMAN); + SNOWMAN("Snowman", Enemies.FRIENDLY, "", EntityType.SNOWMAN), + OCELOT("Ocelot", Enemies.NEUTRAL, EntityType.OCELOT), + IRONGOLEM("IronGolem", Enemies.NEUTRAL, EntityType.IRON_GOLEM); public static final Logger logger = Logger.getLogger("Minecraft"); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 4971c7922..c793c9ab3 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -271,5 +271,17 @@ public class Commandspawnmob extends EssentialsCommand { ((Creeper)spawned).setPowered(true); } + if (type == EntityType.OCELOT && data.equalsIgnoreCase("siamese")) + { + ((Ocelot)spawned).setCatType(Ocelot.Type.SIAMESE_CAT); + } + if (type == EntityType.OCELOT && data.equalsIgnoreCase("red")) + { + ((Ocelot)spawned).setCatType(Ocelot.Type.RED_CAT); + } + if (type == EntityType.OCELOT && data.equalsIgnoreCase("black")) + { + ((Ocelot)spawned).setCatType(Ocelot.Type.BLACK_CAT); + } } } diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv index 98c25c327..2c8a65a1e 100644 --- a/Essentials/src/items.csv +++ b/Essentials/src/items.csv @@ -1461,6 +1461,9 @@ dragonegg,122,0 degg,122,0 bossegg,122,0 begg,122,0 +redstonelamp,123,0 +redlamp,123,0 +rslamp,123,0 ironshovel,256,0 ironspade,256,0 ishovel,256,0 @@ -2453,6 +2456,10 @@ wolfegg,383,95 mooshroomegg,383,96 mushroomcowegg,383,96 villageregg,383,120 +bottleofenchanting,384,0 +enchantingbottle,384,0 +expbottle,384,0 +xpbottle,384,0 goldmusicrecord,2256,0 goldmusicdisk,2256,0 goldmusiccd,2256,0 -- cgit v1.2.3 From 49eb451a764f3d3cc57f673a4351788f56be5e5c Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 2 Mar 2012 00:09:50 +0100 Subject: New eggs --- Essentials/src/items.csv | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv index 2c8a65a1e..acec277cc 100644 --- a/Essentials/src/items.csv +++ b/Essentials/src/items.csv @@ -2455,6 +2455,9 @@ squidegg,383,94 wolfegg,383,95 mooshroomegg,383,96 mushroomcowegg,383,96 +snowgolemegg,383,97 +ocelotegg,383,98 +irongolemegg,383,99 villageregg,383,120 bottleofenchanting,384,0 enchantingbottle,384,0 -- cgit v1.2.3 From b9aecbe1d4aac5046c871bcb4439ea3ad11eee5c Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 2 Mar 2012 00:12:22 +0100 Subject: Min version CB# 2004 --- Essentials/src/com/earth2me/essentials/Essentials.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 24ac0ad6e..53a31bb35 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -66,7 +66,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 1988; + public static final int BUKKIT_VERSION = 2004; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); @@ -129,7 +129,7 @@ public class Essentials extends JavaPlugin implements IEssentials LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName())); } } - final Matcher versionMatch = Pattern.compile("git-Bukkit-(?:(?:[0-9]+)\\.)+[0-9]+-R[0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion()); + final Matcher versionMatch = Pattern.compile("git-Bukkit-(?:(?:[0-9]+)\\.)+[0-9]+-R[\\.0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion()); if (versionMatch.matches()) { final int versionNumber = Integer.parseInt(versionMatch.group(1)); -- cgit v1.2.3 From 7564ebf79e3207c651bdbae5d0616260cbffc5c1 Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 2 Mar 2012 00:18:31 +0100 Subject: Fix world heights --- Essentials/src/com/earth2me/essentials/Util.java | 4 ++-- Essentials/src/com/earth2me/essentials/commands/Commandnuke.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 3e3a7efd0..238ff0c00 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -293,7 +293,7 @@ public class Util while (isBlockUnsafe(world, x, y, z)) { y += 1; - if (y >= 127) + if (y >= world.getHighestBlockYAt(x, z)) { x += 1; break; @@ -304,8 +304,8 @@ public class Util y -= 1; if (y <= 1) { - y = 127; x += 1; + y = world.getHighestBlockYAt(x, z); if (x - 32 > loc.getBlockX()) { throw new Exception(_("holeInFloor")); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java index ac92110cd..19695233e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java @@ -51,7 +51,7 @@ public class Commandnuke extends EssentialsCommand { for (int z = -10; z <= 10; z += 5) { - final Location tntloc = new Location(world, loc.getBlockX() + x, 127, loc.getBlockZ() + z); + final Location tntloc = new Location(world, loc.getBlockX() + x, world.getMaxHeight(), loc.getBlockZ() + z); final TNTPrimed tnt = world.spawn(tntloc, TNTPrimed.class); } } -- cgit v1.2.3 From f1aed4b52172232d765b4379cf15c134700e960f Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 2 Mar 2012 00:40:50 +0100 Subject: Better cats --- .../essentials/commands/Commandspawnmob.java | 47 +++++++++++++--------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index c793c9ab3..341a702ff 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -197,8 +197,9 @@ public class Commandspawnmob extends EssentialsCommand } } - private void changeMobData(final EntityType type, final Entity spawned, final String data, final User user) throws Exception + private void changeMobData(final EntityType type, final Entity spawned, String data, final User user) throws Exception { + data = data.toLowerCase(Locale.ENGLISH); if (type == EntityType.SLIME || type == EntityType.MAGMA_CUBE) { try @@ -216,14 +217,14 @@ public class Commandspawnmob extends EssentialsCommand || type == EntityType.CHICKEN || type == EntityType.PIG || type == EntityType.WOLF) - && data.equalsIgnoreCase("baby")) + && data.equals("baby")) { ((Animals)spawned).setAge(-24000); return; } if (type == EntityType.SHEEP) { - if (data.toLowerCase(Locale.ENGLISH).contains("baby")) + if (data.contains("baby")) { ((Sheep)spawned).setAge(-24000); } @@ -231,7 +232,7 @@ public class Commandspawnmob extends EssentialsCommand try { - if (color.equalsIgnoreCase("random")) + if (color.equals("RANDOM")) { Random rand = new Random(); ((Sheep)spawned).setColor(DyeColor.values()[rand.nextInt(DyeColor.values().length)]); @@ -247,41 +248,49 @@ public class Commandspawnmob extends EssentialsCommand } } if (type == EntityType.WOLF - && data.toLowerCase(Locale.ENGLISH).startsWith("tamed")) + && data.startsWith("tamed")) { final Wolf wolf = ((Wolf)spawned); wolf.setTamed(true); wolf.setOwner(user); wolf.setSitting(true); - if (data.equalsIgnoreCase("tamedbaby")) + if (data.equals("tamedbaby")) { ((Animals)spawned).setAge(-24000); } } if (type == EntityType.WOLF - && data.toLowerCase(Locale.ENGLISH).startsWith("angry")) + && data.startsWith("angry")) { ((Wolf)spawned).setAngry(true); - if (data.equalsIgnoreCase("angrybaby")) + if (data.equals("angrybaby")) { ((Animals)spawned).setAge(-24000); } } - if (type == EntityType.CREEPER && data.equalsIgnoreCase("powered")) + if (type == EntityType.CREEPER && data.equals("powered")) { ((Creeper)spawned).setPowered(true); } - if (type == EntityType.OCELOT && data.equalsIgnoreCase("siamese")) + if (type == EntityType.OCELOT) { - ((Ocelot)spawned).setCatType(Ocelot.Type.SIAMESE_CAT); - } - if (type == EntityType.OCELOT && data.equalsIgnoreCase("red")) - { - ((Ocelot)spawned).setCatType(Ocelot.Type.RED_CAT); - } - if (type == EntityType.OCELOT && data.equalsIgnoreCase("black")) - { - ((Ocelot)spawned).setCatType(Ocelot.Type.BLACK_CAT); + final Ocelot cat = ((Ocelot)spawned); + if (data.contains("siamese")) { + cat.setCatType(Ocelot.Type.SIAMESE_CAT); + } + if (data.contains("red")) { + cat.setCatType(Ocelot.Type.RED_CAT); + } + if (data.contains("black")) { + cat.setCatType(Ocelot.Type.BLACK_CAT); + } + if (data.contains("tamed")) { + cat.setTamed(true); + cat.setOwner(user); + } + if (data.contains("baby")) { + cat.setAge(-24000); + } } } } -- cgit v1.2.3 From 21a248e94d6ee28410838877b956cb94cc37a965 Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 2 Mar 2012 01:30:52 +0100 Subject: Will be removed until the next release XD --- .../essentials/commands/Commandkittycannon.java | 44 ++++++++++++++++++++++ Essentials/src/plugin.yml | 3 ++ 2 files changed, 47 insertions(+) create mode 100644 Essentials/src/com/earth2me/essentials/commands/Commandkittycannon.java diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkittycannon.java b/Essentials/src/com/earth2me/essentials/commands/Commandkittycannon.java new file mode 100644 index 000000000..3d9846923 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkittycannon.java @@ -0,0 +1,44 @@ +package com.earth2me.essentials.commands; + +import com.earth2me.essentials.Mob; +import com.earth2me.essentials.User; +import java.util.Random; +import org.bukkit.Location; +import org.bukkit.Server; +import org.bukkit.entity.Ocelot; + + +public class Commandkittycannon extends EssentialsCommand +{ + private static Random random = new Random(); + + public Commandkittycannon() + { + super("kittycannon"); + } + + @Override + protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception + { + final Mob cat = Mob.OCELOT; + final Ocelot ocelot = (Ocelot)cat.spawn(user, server, user.getEyeLocation()); + if (ocelot == null) + { + return; + } + final int i = random.nextInt(Ocelot.Type.values().length); + ocelot.setCatType(Ocelot.Type.values()[i]); + ocelot.setTamed(true); + ocelot.setVelocity(user.getEyeLocation().getDirection().multiply(2)); + ess.scheduleSyncDelayedTask(new Runnable() + { + @Override + public void run() + { + final Location loc = ocelot.getLocation(); + ocelot.remove(); + loc.getWorld().createExplosion(loc, 1f); + } + }, 20); + } +} diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 9165febb2..e63f8b758 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -186,6 +186,9 @@ commands: description: Kill all mobs in a world. usage: / [mobType] [radius] aliases: [ekillall,butcher,ebutcher] + kittycannon: + description: Throw an exploding kitten at your opponent + usage: / list: description: List all online players. usage: / -- cgit v1.2.3 From dce149511e63406b778e34934059d7888ec50c2c Mon Sep 17 00:00:00 2001 From: Iaccidentally Date: Thu, 1 Mar 2012 23:10:32 -0500 Subject: update messages.properties for the new bukkit download link (ci.bukkit,org no longer works) --- Essentials/src/messages.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index f7958319d..ad3ff11ac 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -294,7 +294,7 @@ requestDenied=\u00a77Teleport request denied. requestDeniedFrom=\u00a77{0} denied your teleport request. requestSent=\u00a77Request sent to {0}\u00a77. requestTimedOut=\u00a7cTeleport request has timed out -requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://ci.bukkit.org. +requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} second=second seconds=seconds -- cgit v1.2.3 From 622ca4bf8a10337892e56cbc0958a6a2c2e464ec Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 16:29:06 +0000 Subject: Don't think we need animation event anymore. --- .../src/com/earth2me/essentials/EssentialsPlayerListener.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 9b964364b..ee247f465 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -277,13 +277,6 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.NORMAL) - public void onPlayerAnimation(final PlayerAnimationEvent event) - { - final User user = ess.getUser(event.getPlayer()); - user.updateActivity(true); - } - @EventHandler(priority = EventPriority.MONITOR) public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event) { -- cgit v1.2.3 From 7737d19c5a79938adb8f87e8280c01e20fa8680a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 16:33:20 +0000 Subject: Shouldn't really be canceling events at priority monitor, oops. --- Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index ee247f465..0779c01ab 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -317,9 +317,11 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.NORMAL) public void onPlayerInteract(final PlayerInteractEvent event) { + final User user = ess.getUser(event.getPlayer()); + user.updateActivity(true); switch (event.getAction()) { case RIGHT_CLICK_BLOCK: @@ -334,7 +336,6 @@ public class EssentialsPlayerListener implements Listener break; case LEFT_CLICK_AIR: case LEFT_CLICK_BLOCK: - final User user = ess.getUser(event.getPlayer()); if (user.hasPowerTools() && user.arePowerToolsEnabled()) { if (usePowertools(user)) -- cgit v1.2.3 From 25ebe68389a74ae5b5faa9780e76afff75a5a963 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 16:54:12 +0000 Subject: Entity event cleanup --- .../essentials/EssentialsEntityListener.java | 89 ++++++++++------------ 1 file changed, 42 insertions(+), 47 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index e4879186d..45d78ebeb 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -24,48 +24,47 @@ public class EssentialsEntityListener implements Listener } @EventHandler(priority = EventPriority.LOWEST) - public void onEntityDamage(EntityDamageEvent event) + public void onEntityDamage(final EntityDamageByEntityEvent event) { - if (event instanceof EntityDamageByEntityEvent) + final Entity eAttack = event.getDamager(); + final Entity eDefend = event.getEntity(); + if (eDefend instanceof Player && eAttack instanceof Player) { - EntityDamageByEntityEvent edEvent = (EntityDamageByEntityEvent)event; - Entity eAttack = edEvent.getDamager(); - Entity eDefend = edEvent.getEntity(); - if (eDefend instanceof Player && eAttack instanceof Player) + final User defender = ess.getUser(eDefend); + final User attacker = ess.getUser(eAttack); + attacker.updateActivity(true); + final List commandList = attacker.getPowertool(attacker.getItemInHand()); + if (commandList != null && !commandList.isEmpty()) { - User defender = ess.getUser(eDefend); - User attacker = ess.getUser(eAttack); - attacker.updateActivity(true); - ItemStack is = attacker.getItemInHand(); - List commandList = attacker.getPowertool(is); - if (commandList != null && !commandList.isEmpty()) + for (String command : commandList) { - for (String command : commandList) + if (command != null && !command.isEmpty()) { - - if (command != null && !command.isEmpty()) - { - attacker.getServer().dispatchCommand(attacker, command.replaceAll("\\{player\\}", defender.getName())); - event.setCancelled(true); - return; - } + attacker.getServer().dispatchCommand(attacker, command.replaceAll("\\{player\\}", defender.getName())); + event.setCancelled(true); + return; } } } - if (eDefend instanceof Animals && eAttack instanceof Player) + } + else if (eDefend instanceof Animals && eAttack instanceof Player) + { + final User player = ess.getUser(eAttack); + final ItemStack hand = player.getItemInHand(); + if (hand != null && hand.getType() == Material.MILK_BUCKET) { - User player = ess.getUser(eAttack); - ItemStack hand = player.getItemInHand(); - if (hand != null && hand.getType() == Material.MILK_BUCKET) - { - ((Animals)eDefend).setAge(-24000); - hand.setType(Material.BUCKET); - player.setItemInHand(hand); - player.updateInventory(); - event.setCancelled(true); - } + ((Animals)eDefend).setAge(-24000); + hand.setType(Material.BUCKET); + player.setItemInHand(hand); + player.updateInventory(); + event.setCancelled(true); } } + } + + @EventHandler(priority = EventPriority.LOWEST) + public void onEntityDamage(final EntityDamageEvent event) + { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) { final Player player = (Player)event.getEntity(); @@ -76,7 +75,7 @@ public class EssentialsEntityListener implements Listener } @EventHandler(priority = EventPriority.LOWEST) - public void onEntityCombust(EntityCombustEvent event) + public void onEntityCombust(final EntityCombustEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) { @@ -85,26 +84,22 @@ public class EssentialsEntityListener implements Listener } @EventHandler(priority = EventPriority.LOWEST) - public void onEntityDeath(final EntityDeathEvent event) + public void onPlayerDeathEvent(final PlayerDeathEvent event) { - if (event instanceof PlayerDeathEvent) + final User user = ess.getUser(event.getEntity()); + if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back")) { - final PlayerDeathEvent pdevent = (PlayerDeathEvent)event; - final User user = ess.getUser(pdevent.getEntity()); - if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back")) - { - user.setLastLocation(); - user.sendMessage(_("backAfterDeath")); - } - if (!ess.getSettings().areDeathMessagesEnabled()) - { - pdevent.setDeathMessage(""); - } + user.setLastLocation(); + user.sendMessage(_("backAfterDeath")); + } + if (!ess.getSettings().areDeathMessagesEnabled()) + { + event.setDeathMessage(""); } } @EventHandler(priority = EventPriority.LOWEST) - public void onFoodLevelChange(FoodLevelChangeEvent event) + public void onFoodLevelChange(final FoodLevelChangeEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) { @@ -113,7 +108,7 @@ public class EssentialsEntityListener implements Listener } @EventHandler(priority = EventPriority.LOWEST) - public void onEntityRegainHealth(EntityRegainHealthEvent event) + public void onEntityRegainHealth(final EntityRegainHealthEvent event) { if (event.getRegainReason() == RegainReason.SATIATED && event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isAfk() && ess.getSettings().getFreezeAfkPlayers()) -- cgit v1.2.3 From 1bbbfe1c96cf62fad3fe9f9eab5b56d28935e4e4 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 17:03:34 +0000 Subject: Make the antioch message optional. --- .../src/com/earth2me/essentials/commands/Commandantioch.java | 7 +++++-- Essentials/src/plugin.yml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java index 54277d466..968d0012c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java @@ -17,8 +17,11 @@ public class Commandantioch extends EssentialsCommand @Override public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - ess.broadcastMessage(user, "...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,"); - ess.broadcastMessage(user, "who being naughty in My sight, shall snuff it."); + if (args.length > 0) + { + ess.broadcastMessage(user, "...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,"); + ess.broadcastMessage(user, "who being naughty in My sight, shall snuff it."); + } final Location loc = Util.getTarget(user); loc.getWorld().spawn(loc, TNTPrimed.class); diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index e63f8b758..b6d90ae20 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -13,7 +13,7 @@ commands: aliases: [eafk] antioch: description: 'A little surprise for operators.' - usage: / + usage: / [message] aliases: [eantioch] back: description: Teleports you to your location prior to tp/spawn/warp. -- cgit v1.2.3 From 7a0f4da86099a2cdcf450312affa8f6385f7a413 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 17:05:55 +0000 Subject: Extra command aliases --- Essentials/src/plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index b6d90ae20..be2c64b5c 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -14,7 +14,7 @@ commands: antioch: description: 'A little surprise for operators.' usage: / [message] - aliases: [eantioch] + aliases: [eantioch,grenade,tnt,egrenade,etnt] back: description: Teleports you to your location prior to tp/spawn/warp. usage: / -- cgit v1.2.3 From de7ab13c03f3b6086511566aa4c67376abaaed66 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 19:05:30 +0000 Subject: Only update displayname on world change, not every teleport. --- .../essentials/EssentialsPlayerListener.java | 15 +++++------ Essentials/src/com/earth2me/essentials/User.java | 29 +++++++++++----------- .../src/com/earth2me/essentials/UserData.java | 19 ++++++++++---- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 0779c01ab..1b9464da4 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -233,18 +233,13 @@ public class EssentialsPlayerListener implements Listener return; } - final User user = ess.getUser(event.getPlayer()); //There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports. if ((event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND) && ess.getSettings().registerBackInListener()) { + final User user = ess.getUser(event.getPlayer()); user.setLastLocation(); } - if (ess.getSettings().changeDisplayName()) - { - user.setDisplayNick(); - } - updateCompass(user); } @EventHandler(priority = EventPriority.HIGH) @@ -307,9 +302,15 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.MONITOR) public void onPlayerChangedWorld(final PlayerChangedWorldEvent event) { + final User user = ess.getUser(event.getPlayer()); + if (ess.getSettings().changeDisplayName()) + { + user.setDisplayNick(); + } + updateCompass(user); + if (ess.getSettings().getNoGodWorlds().contains(event.getPlayer().getLocation().getWorld().getName())) { - User user = ess.getUser(event.getPlayer()); if (user.isGodModeEnabledRaw()) { user.sendMessage(_("noGodWorldWarning")); diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index ba34548fe..125962da9 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -249,7 +249,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return teleportRequestHere; } - public String getNick(boolean addprefixsuffix) + public String getNick(final boolean addprefixsuffix) { final StringBuilder nickname = new StringBuilder(); final String nick = getNickname(); @@ -261,28 +261,28 @@ public class User extends UserData implements Comparable, IReplyTo, IUser { nickname.append(ess.getSettings().getNicknamePrefix()).append(nick); } - if (isOp()) + + if (addprefixsuffix && ess.getSettings().addPrefixSuffix()) { - try - { - nickname.insert(0, ess.getSettings().getOperatorColor().toString()); - nickname.append("§f"); - } - catch (Exception e) + if (isOp()) { + try + { + nickname.insert(0, ess.getSettings().getOperatorColor().toString()); + } + catch (Exception e) + { + } } - } - if (addprefixsuffix && ess.getSettings().addPrefixSuffix()) - { if (!ess.getSettings().disablePrefix()) { - final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName()); + final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§'); nickname.insert(0, prefix); } if (!ess.getSettings().disableSuffix()) { - final String suffix = ess.getPermissionsHandler().getSuffix(base).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName()); + final String suffix = ess.getPermissionsHandler().getSuffix(base).replace('&', '§'); nickname.append(suffix); if (suffix.length() < 2 || !suffix.substring(suffix.length() - 2, suffix.length() - 1).equals("§")) { @@ -330,6 +330,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return super.getDisplayName() == null ? super.getName() : super.getDisplayName(); } + @Override public Teleport getTeleport() { return teleport; @@ -385,7 +386,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser catch (Throwable ex) { } - } + } super.setMoney(value); Trade.log("Update", "Set", "API", getName(), new Trade(value, ess), null, null, null, ess); } diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index cda2fa511..1fdc98254 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -44,7 +44,7 @@ public abstract class UserData extends PlayerExtension implements IConf savedInventory = _getSavedInventory(); teleportEnabled = getTeleportEnabled(); ignoredPlayers = getIgnoredPlayers(); - godmode = getGodModeEnabled(); + godmode = _getGodModeEnabled(); muted = getMuted(); muteTimeout = _getMuteTimeout(); jailed = getJailed(); @@ -58,6 +58,7 @@ public abstract class UserData extends PlayerExtension implements IConf isNPC = _isNPC(); arePowerToolsEnabled = _arePowerToolsEnabled(); kitTimestamps = _getKitTimestamps(); + nickname = _getNickname(); } private double money; @@ -189,13 +190,21 @@ public abstract class UserData extends PlayerExtension implements IConf return false; } - public String getNickname() + private String nickname; + + public String _getNickname() { return config.getString("nickname"); } + + public String getNickname() + { + return nickname; + } public void setNickname(String nick) { + nickname = nick; config.setProperty("nickname", nick); config.save(); } @@ -515,7 +524,7 @@ public abstract class UserData extends PlayerExtension implements IConf } private boolean godmode; - private boolean getGodModeEnabled() + private boolean _getGodModeEnabled() { return config.getBoolean("godmode", false); } @@ -817,12 +826,12 @@ public abstract class UserData extends PlayerExtension implements IConf private Map _getKitTimestamps() { - + if (config.isConfigurationSection("timestamps.kits")) { return config.getConfigurationSection("timestamps.kits").getValues(false); } - return new HashMap(); + return new HashMap(); } public Long getKitTimestamp(final String name) -- cgit v1.2.3 From b6bbe237ea7c99eab0af8d07826ba84d4d766112 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Mar 2012 05:09:03 +0000 Subject: I think switches are better. --- .../src/com/earth2me/essentials/EssentialsPlayerListener.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 1b9464da4..76668b615 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -182,10 +182,15 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.HIGH) public void onPlayerLogin(final PlayerLoginEvent event) { - if (event.getResult() != Result.ALLOWED && event.getResult() != Result.KICK_FULL && event.getResult() != Result.KICK_BANNED) - { - return; + switch (event.getResult()) { + case ALLOWED: + case KICK_FULL: + case KICK_BANNED: + break; + default: + return; } + User user = ess.getUser(event.getPlayer()); user.setNPC(false); -- cgit v1.2.3 From 301b609e9357a21931653baffe9c3bed1f06dd8f Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Mar 2012 05:27:02 +0000 Subject: *make it look like i'm doing something* --- .../com/earth2me/essentials/EssentialsBlockListener.java | 2 +- .../com/earth2me/essentials/EssentialsPlayerListener.java | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java index 648bfcef5..f2e2e8a77 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java @@ -32,7 +32,7 @@ public class EssentialsBlockListener implements Listener { return; } - boolean unlimitedForUser = user.hasUnlimited(is); + final boolean unlimitedForUser = user.hasUnlimited(is); if (unlimitedForUser && user.getGameMode() == GameMode.SURVIVAL) { ess.scheduleSyncDelayedTask( diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 76668b615..7ab1847f1 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -182,15 +182,16 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.HIGH) public void onPlayerLogin(final PlayerLoginEvent event) { - switch (event.getResult()) { + switch (event.getResult()) + { case ALLOWED: case KICK_FULL: - case KICK_BANNED: + case KICK_BANNED: break; default: - return; + return; } - + User user = ess.getUser(event.getPlayer()); user.setNPC(false); @@ -199,7 +200,7 @@ public class EssentialsPlayerListener implements Listener user.checkMuteTimeout(currentTime); user.checkJailTimeout(currentTime); - if (banExpired == false && (user.isBanned() || event.getResult() == Result.KICK_BANNED)) + if (!banExpired && (user.isBanned() || event.getResult() == Result.KICK_BANNED)) { final String banReason = user.getBanReason(); event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : _("defaultBanReason")); @@ -291,7 +292,7 @@ public class EssentialsPlayerListener implements Listener { for (Player player : ess.getServer().getOnlinePlayers()) { - User spyer = ess.getUser(player); + final User spyer = ess.getUser(player); if (spyer.isSocialSpyEnabled() && !user.equals(spyer)) { player.sendMessage(user.getDisplayName() + " : " + event.getMessage()); @@ -400,7 +401,7 @@ public class EssentialsPlayerListener implements Listener } @EventHandler(priority = EventPriority.LOW) - public void onPlayerPickupItem(PlayerPickupItemEvent event) + public void onPlayerPickupItem(final PlayerPickupItemEvent event) { if (event.isCancelled() || !ess.getSettings().getDisableItemPickupWhileAfk()) { -- cgit v1.2.3 From c0fa03ede259bedb8946bc559a0e64e54c9b464e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Mar 2012 07:03:54 +0000 Subject: Force all kits to lowercase. --- Essentials/src/com/earth2me/essentials/Kit.java | 8 +++-- .../src/com/earth2me/essentials/Settings.java | 41 +++++++++++++++------- 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index 88816368c..138a12979 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -60,11 +60,15 @@ public class Kit } } - public static List getItems(final User user, final Map els) throws Exception + public static List getItems(final User user, final Map kit) throws Exception { + if (kit == null) { + throw new Exception(_("kitError2")); + } + try { - return (List)els.get("items"); + return (List)kit.get("items"); } catch (Exception e) { diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 732b5485c..e3992e52c 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -13,6 +13,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.ChatColor; import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.MemoryConfiguration; import org.bukkit.event.EventPriority; import org.bukkit.inventory.ItemStack; @@ -208,18 +209,22 @@ public class Settings implements ISettings { return config.getDouble("heal-cooldown", 0); } + private ConfigurationSection kits; - @Override - public Map getKit(String name) + public ConfigurationSection _getKits() { - name = name.replace('.', '_').replace('/', '_'); if (config.isConfigurationSection("kits")) { - final ConfigurationSection kits = getKits(); - if (kits.isConfigurationSection(name)) + final ConfigurationSection section = config.getConfigurationSection("kits"); + final ConfigurationSection newSection = new MemoryConfiguration(); + for (String kitItem : section.getKeys(false)) { - return kits.getConfigurationSection(name).getValues(true); + if (section.isConfigurationSection(kitItem)) + { + newSection.set(kitItem.toLowerCase(Locale.ENGLISH), section.getConfigurationSection(kitItem)); + } } + return newSection; } return null; } @@ -227,9 +232,20 @@ public class Settings implements ISettings @Override public ConfigurationSection getKits() { + return kits; + } + + @Override + public Map getKit(String name) + { + name = name.replace('.', '_').replace('/', '_'); if (config.isConfigurationSection("kits")) { - return config.getConfigurationSection("kits"); + final ConfigurationSection kits = getKits(); + if (kits.isConfigurationSection(name)) + { + return kits.getConfigurationSection(name).getValues(true); + } } return null; } @@ -358,8 +374,9 @@ public class Settings implements ISettings { config.load(); noGodWorlds = new HashSet(config.getStringList("no-god-in-worlds")); - enabledSigns = getEnabledSigns(); - itemSpawnBl = getItemSpawnBlacklist(); + enabledSigns = _getEnabledSigns(); + itemSpawnBl = _getItemSpawnBlacklist(); + kits = _getKits(); chatFormats.clear(); } private List itemSpawnBl = new ArrayList(); @@ -370,7 +387,7 @@ public class Settings implements ISettings return itemSpawnBl; } - private List getItemSpawnBlacklist() + private List _getItemSpawnBlacklist() { final List epItemSpwn = new ArrayList(); if (ess.getItemDb() == null) @@ -405,7 +422,7 @@ public class Settings implements ISettings return enabledSigns; } - private List getEnabledSigns() + private List _getEnabledSigns() { List newSigns = new ArrayList(); @@ -559,7 +576,7 @@ public class Settings implements ISettings { return config.getBoolean("economy-log-enabled", false); } - + @Override public boolean isEcoLogUpdateEnabled() { -- cgit v1.2.3 From 6da6e4d2e889b7bbeb15e4adf68a9fdc8b0b330f Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Sat, 3 Mar 2012 18:07:43 +1100 Subject: Cleanup Signed-off-by: Chris Ward --- .../src/com/earth2me/essentials/commands/Commandessentials.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java index 14bbf5e02..0f390f4e0 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java @@ -35,6 +35,10 @@ public class Commandessentials extends EssentialsCommand { run_nya(server, sender, commandLabel, args); } + else if (args[0].equalsIgnoreCase("moo")) + { + run_moo(server, sender, commandLabel, args); + } else { run_reload(server, sender, commandLabel, args); } @@ -159,4 +163,9 @@ public class Commandessentials extends EssentialsCommand } noteBlocks.clear(); } + + private void run_moo(final Server server, final CommandSender sender, final String command, final String args[]) + { + sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | ||", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } ); + } } -- cgit v1.2.3 From 33605517ffa89bc5f84d841101e6a29f091a72d5 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Mar 2012 07:09:41 +0000 Subject: Capital case for formatting. --- Essentials/src/com/earth2me/essentials/Kit.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index 138a12979..47e5e6ac2 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -1,6 +1,7 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; +import static com.earth2me.essentials.I18n.capitalCase; import com.earth2me.essentials.commands.NoChargeException; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import java.util.*; @@ -22,7 +23,7 @@ public class Kit { if (user.isAuthorized("essentials.kit." + kiteItem.toLowerCase(Locale.ENGLISH))) { - list.append(" ").append(kiteItem); + list.append(" ").append(capitalCase(kiteItem)); } } return list.toString().trim(); -- cgit v1.2.3 From 35576ab64ab05acee039d3e28b5bc0ef2d110bd7 Mon Sep 17 00:00:00 2001 From: Iaccidentally Date: Sat, 3 Mar 2012 03:04:54 -0500 Subject: add little babbys --- Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 341a702ff..c64d75d2b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -216,6 +216,8 @@ public class Commandspawnmob extends EssentialsCommand || type == EntityType.MUSHROOM_COW || type == EntityType.CHICKEN || type == EntityType.PIG + || type == EntityType.VILLAGER + || type == EntityType.OCELOT || type == EntityType.WOLF) && data.equals("baby")) { -- cgit v1.2.3 From 74a57553f68114948614eb6e77abe201ee0bcd36 Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Sat, 3 Mar 2012 19:21:27 +1100 Subject: Cleanup Signed-off-by: Chris Ward --- .../src/com/earth2me/essentials/commands/Commandessentials.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java index 0f390f4e0..56432a91f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java @@ -9,6 +9,7 @@ import org.bukkit.Material; import org.bukkit.Server; import org.bukkit.block.Block; import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; @@ -166,6 +167,9 @@ public class Commandessentials extends EssentialsCommand private void run_moo(final Server server, final CommandSender sender, final String command, final String args[]) { - sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | ||", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } ); + if(sender instanceof ConsoleCommandSender) + sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | ||", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } ); + else + sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | | |", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } ); } } -- cgit v1.2.3 From 8aa7b1f301764d747c5da2109601ec0e93570982 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Mar 2012 13:48:58 +0000 Subject: Update CB #2032 B #1377 Min CB #2015 --- .../src/com/earth2me/essentials/Essentials.java | 2 +- lib/bukkit.jar | Bin 4689493 -> 4691009 bytes lib/craftbukkit.jar | Bin 11036845 -> 11039568 bytes 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 53a31bb35..e8b67107f 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -66,7 +66,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 2004; + public static final int BUKKIT_VERSION = 2015; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/lib/bukkit.jar b/lib/bukkit.jar index 33a03e364..b53ae8d18 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index 45958c144..c5bdd9c3c 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From e6181928e828802f41621d5f877bd3fa3a462431 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sat, 3 Mar 2012 17:01:53 +0100 Subject: Cleanup of /spawnmob --- .../essentials/commands/Commandspawnmob.java | 56 ++++++++-------------- 1 file changed, 19 insertions(+), 37 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index c64d75d2b..5c118eaaa 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -219,21 +219,16 @@ public class Commandspawnmob extends EssentialsCommand || type == EntityType.VILLAGER || type == EntityType.OCELOT || type == EntityType.WOLF) - && data.equals("baby")) + && data.contains("baby")) { - ((Animals)spawned).setAge(-24000); + ((Animals)spawned).setBaby(); return; } if (type == EntityType.SHEEP) { - if (data.contains("baby")) - { - ((Sheep)spawned).setAge(-24000); - } final String color = data.toUpperCase(Locale.ENGLISH).replace("BABY", ""); try { - if (color.equals("RANDOM")) { Random rand = new Random(); @@ -249,49 +244,36 @@ public class Commandspawnmob extends EssentialsCommand throw new Exception(_("sheepMalformedColor"), e); } } - if (type == EntityType.WOLF - && data.startsWith("tamed")) + if ((type == EntityType.WOLF + || type == EntityType.OCELOT) + && data.contains("tamed")) { - final Wolf wolf = ((Wolf)spawned); - wolf.setTamed(true); - wolf.setOwner(user); - wolf.setSitting(true); - if (data.equals("tamedbaby")) - { - ((Animals)spawned).setAge(-24000); - } + final Tameable tameable = ((Tameable)spawned); + tameable.setTamed(true); + tameable.setOwner(user.getBase()); } if (type == EntityType.WOLF - && data.startsWith("angry")) + && data.contains("angry")) { ((Wolf)spawned).setAngry(true); - if (data.equals("angrybaby")) - { - ((Animals)spawned).setAge(-24000); - } } - if (type == EntityType.CREEPER && data.equals("powered")) + if (type == EntityType.CREEPER && data.contains("powered")) { ((Creeper)spawned).setPowered(true); } if (type == EntityType.OCELOT) { - final Ocelot cat = ((Ocelot)spawned); - if (data.contains("siamese")) { - cat.setCatType(Ocelot.Type.SIAMESE_CAT); - } - if (data.contains("red")) { - cat.setCatType(Ocelot.Type.RED_CAT); - } - if (data.contains("black")) { - cat.setCatType(Ocelot.Type.BLACK_CAT); + if (data.contains("siamese")) + { + ((Ocelot)spawned).setCatType(Ocelot.Type.SIAMESE_CAT); } - if (data.contains("tamed")) { - cat.setTamed(true); - cat.setOwner(user); + if (data.contains("red")) + { + ((Ocelot)spawned).setCatType(Ocelot.Type.RED_CAT); } - if (data.contains("baby")) { - cat.setAge(-24000); + if (data.contains("black")) + { + ((Ocelot)spawned).setCatType(Ocelot.Type.BLACK_CAT); } } } -- cgit v1.2.3 From d9a8453995329a5984cf33a9ec6134dc7ad080cd Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 4 Mar 2012 15:43:00 +1100 Subject: Fix op colours, which KHobbits broke! --- Essentials/src/com/earth2me/essentials/User.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 125962da9..f89f1a5ad 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -262,19 +262,19 @@ public class User extends UserData implements Comparable, IReplyTo, IUser nickname.append(ess.getSettings().getNicknamePrefix()).append(nick); } - if (addprefixsuffix && ess.getSettings().addPrefixSuffix()) + if (isOp()) { - if (isOp()) + try { - try - { - nickname.insert(0, ess.getSettings().getOperatorColor().toString()); - } - catch (Exception e) - { - } + nickname.insert(0, ess.getSettings().getOperatorColor().toString()); + nickname.append("§f"); } - + catch (Exception e) + { + } + } + if (addprefixsuffix && ess.getSettings().addPrefixSuffix()) + { if (!ess.getSettings().disablePrefix()) { final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§'); -- cgit v1.2.3 From 53cfab229b8983a020d835e35b42c839fda08be3 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 08:18:25 +0000 Subject: Half-revert double backflip. 10 points. (op prefix changes that md-5 broke, thinking I broke op prefixes) --- Essentials/src/com/earth2me/essentials/User.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index f89f1a5ad..092b61880 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -262,12 +262,15 @@ public class User extends UserData implements Comparable, IReplyTo, IUser nickname.append(ess.getSettings().getNicknamePrefix()).append(nick); } - if (isOp()) + if (addprefixsuffix && isOp()) { try { - nickname.insert(0, ess.getSettings().getOperatorColor().toString()); - nickname.append("§f"); + final String opPrefix = ess.getSettings().getOperatorColor().toString(); + if (opPrefix.length() > 0) { + nickname.insert(0, opPrefix); + nickname.append("§f"); + } } catch (Exception e) { -- cgit v1.2.3 From c3fa56322bc9c81c00bbed7e8de8341a89c54d08 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 09:20:03 +0000 Subject: Adding option to modify all users balances (including offline) /eco reset ** --- .../earth2me/essentials/commands/Commandeco.java | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java index b9694ee49..dd6d6ad0d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java @@ -34,7 +34,31 @@ public class Commandeco extends EssentialsCommand throw new NotEnoughArgumentsException(ex); } - if (args[1].contentEquals("*")) + if (args[1].contentEquals("**")) + { + for (String sUser : ess.getUserMap().getAllUniqueUsers()) + { + final User player = ess.getUser(sUser); + switch (cmd) + { + case GIVE: + player.giveMoney(amount); + break; + + case TAKE: + if (player.canAfford(amount, false)) + { + player.takeMoney(amount); + } + break; + + case RESET: + player.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount); + break; + } + } + } + else if (args[1].contentEquals("*")) { for (Player onlinePlayer : server.getOnlinePlayers()) { -- cgit v1.2.3 From 6da705c86fb04f0baaae0a7bfe69288325433297 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 10:11:58 +0000 Subject: Allow more currency customization. Added currency key to messages. --- Essentials/src/com/earth2me/essentials/User.java | 12 ++-- Essentials/src/com/earth2me/essentials/Util.java | 16 ++++- .../src/com/earth2me/essentials/api/Economy.java | 2 +- .../essentials/commands/Commandbalance.java | 4 +- .../essentials/commands/Commandbalancetop.java | 4 +- .../earth2me/essentials/commands/Commandsell.java | 4 +- .../earth2me/essentials/commands/Commandwhois.java | 2 +- .../earth2me/essentials/commands/Commandworth.java | 16 ++--- .../earth2me/essentials/signs/EssentialsSign.java | 2 +- .../com/earth2me/essentials/signs/SignTrade.java | 8 +-- Essentials/src/messages.properties | 75 +++++++++++----------- Essentials/src/messages_da.properties | 75 +++++++++++----------- Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 75 +++++++++++----------- Essentials/src/messages_es.properties | 75 +++++++++++----------- Essentials/src/messages_fr.properties | 75 +++++++++++----------- Essentials/src/messages_nl.properties | 75 +++++++++++----------- 17 files changed, 269 insertions(+), 252 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 092b61880..b02a70a03 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -105,10 +105,10 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return; } setMoney(getMoney() + value); - sendMessage(_("addedToAccount", Util.formatCurrency(value, ess))); + sendMessage(_("addedToAccount", Util.displayCurrency(value, ess))); if (initiator != null) { - initiator.sendMessage(_("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName(), Util.formatCurrency(getMoney(), ess))); + initiator.sendMessage(_("addedToOthersAccount", Util.displayCurrency(value, ess), this.getDisplayName(), Util.displayCurrency(getMoney(), ess))); } } @@ -122,8 +122,8 @@ public class User extends UserData implements Comparable, IReplyTo, IUser { setMoney(getMoney() - value); reciever.setMoney(reciever.getMoney() + value); - sendMessage(_("moneySentTo", Util.formatCurrency(value, ess), reciever.getDisplayName())); - reciever.sendMessage(_("moneyRecievedFrom", Util.formatCurrency(value, ess), getDisplayName())); + sendMessage(_("moneySentTo", Util.displayCurrency(value, ess), reciever.getDisplayName())); + reciever.sendMessage(_("moneyRecievedFrom", Util.displayCurrency(value, ess), getDisplayName())); } else { @@ -144,10 +144,10 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return; } setMoney(getMoney() - value); - sendMessage(_("takenFromAccount", Util.formatCurrency(value, ess))); + sendMessage(_("takenFromAccount", Util.displayCurrency(value, ess))); if (initiator != null) { - initiator.sendMessage(_("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName(), Util.formatCurrency(getMoney(), ess))); + initiator.sendMessage(_("takenFromOthersAccount", Util.displayCurrency(value, ess), this.getDisplayName(), Util.displayCurrency(getMoney(), ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 238ff0c00..fbb8deb08 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -422,11 +422,11 @@ public class Util } return is; } - private static DecimalFormat df = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US)); + private static DecimalFormat dFormat = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US)); - public static String formatCurrency(final double value, final IEssentials ess) + public static String formatAsCurrency(final double value) { - String str = ess.getSettings().getCurrencySymbol() + df.format(value); + String str = dFormat.format(value); if (str.endsWith(".00")) { str = str.substring(0, str.length() - 3); @@ -434,6 +434,16 @@ public class Util return str; } + public static String displayCurrency(final double value, final IEssentials ess) + { + return _("currency", ess.getSettings().getCurrencySymbol(), formatAsCurrency(value)); + } + + public static String shortCurrency(final double value, final IEssentials ess) + { + return ess.getSettings().getCurrencySymbol() + formatAsCurrency(value); + } + public static double roundDouble(final double d) { return Math.round(d * 100.0) / 100.0; diff --git a/Essentials/src/com/earth2me/essentials/api/Economy.java b/Essentials/src/com/earth2me/essentials/api/Economy.java index a1d421c38..6ed1829b3 100644 --- a/Essentials/src/com/earth2me/essentials/api/Economy.java +++ b/Essentials/src/com/earth2me/essentials/api/Economy.java @@ -249,7 +249,7 @@ public final class Economy { throw new RuntimeException(noCallBeforeLoad); } - return Util.formatCurrency(amount, ess); + return Util.displayCurrency(amount, ess); } /** diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java index 58f164ad6..15c3c9088 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java @@ -21,7 +21,7 @@ public class Commandbalance extends EssentialsCommand { throw new NotEnoughArgumentsException(); } - sender.sendMessage(_("balance", Util.formatCurrency(getPlayer(server, args, 0, true).getMoney(), ess))); + sender.sendMessage(_("balance", Util.displayCurrency(getPlayer(server, args, 0, true).getMoney(), ess))); } @Override @@ -32,6 +32,6 @@ public class Commandbalance extends EssentialsCommand || user.isAuthorized("essentials.balance.other")) ? user : getPlayer(server, args, 0, true)).getMoney(); - user.sendMessage(_("balance", Util.formatCurrency(bal, ess))); + user.sendMessage(_("balance", Util.displayCurrency(bal, ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java index fffb69ea4..6c5e96b9f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java @@ -130,11 +130,11 @@ public class Commandbalancetop extends EssentialsCommand } }); - cache.getLines().add(_("serverTotal", Util.formatCurrency(totalMoney, ess))); + cache.getLines().add(_("serverTotal", Util.displayCurrency(totalMoney, ess))); int pos = 1; for (Map.Entry entry : sortedEntries) { - cache.getLines().add(pos + ". " + entry.getKey() + ", " + Util.formatCurrency(entry.getValue(), ess)); + cache.getLines().add(pos + ". " + entry.getKey() + ", " + Util.displayCurrency(entry.getValue(), ess)); pos++; } cacheage = System.currentTimeMillis(); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java index d59c09b1e..5958a5c0f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java @@ -160,8 +160,8 @@ public class Commandsell extends EssentialsCommand user.updateInventory(); Trade.log("Command", "Sell", "Item", user.getName(), new Trade(ris, ess), user.getName(), new Trade(worth * amount, ess), user.getLocation(), ess); user.giveMoney(worth * amount); - user.sendMessage(_("itemSold", Util.formatCurrency(worth * amount, ess), amount, is.getType().toString().toLowerCase(Locale.ENGLISH), Util.formatCurrency(worth, ess))); - logger.log(Level.INFO, _("itemSoldConsole", user.getDisplayName(), is.getType().toString().toLowerCase(Locale.ENGLISH), Util.formatCurrency(worth * amount, ess), amount, Util.formatCurrency(worth, ess))); + user.sendMessage(_("itemSold", Util.displayCurrency(worth * amount, ess), amount, is.getType().toString().toLowerCase(Locale.ENGLISH), Util.displayCurrency(worth, ess))); + logger.log(Level.INFO, _("itemSoldConsole", user.getDisplayName(), is.getType().toString().toLowerCase(Locale.ENGLISH), Util.displayCurrency(worth * amount, ess), amount, Util.displayCurrency(worth, ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java index 7e211455e..d068aac9a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java @@ -60,7 +60,7 @@ public class Commandwhois extends EssentialsCommand sender.sendMessage(_("whoisLocation", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ())); if (!ess.getSettings().isEcoDisabled()) { - sender.sendMessage(_("whoisMoney", Util.formatCurrency(user.getMoney(), ess))); + sender.sendMessage(_("whoisMoney", Util.displayCurrency(user.getMoney(), ess))); } sender.sendMessage(user.isAfk() ? _("whoisStatusAway") diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandworth.java b/Essentials/src/com/earth2me/essentials/commands/Commandworth.java index 586b31873..c8573ba25 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandworth.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandworth.java @@ -51,14 +51,14 @@ public class Commandworth extends EssentialsCommand ? _("worthMeta", iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), iStack.getDurability(), - Util.formatCurrency(worth * amount, ess), + Util.displayCurrency(worth * amount, ess), amount, - Util.formatCurrency(worth, ess)) + Util.displayCurrency(worth, ess)) : _("worth", iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), - Util.formatCurrency(worth * amount, ess), + Util.displayCurrency(worth * amount, ess), amount, - Util.formatCurrency(worth, ess))); + Util.displayCurrency(worth, ess))); } @Override @@ -95,14 +95,14 @@ public class Commandworth extends EssentialsCommand ? _("worthMeta", iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), iStack.getDurability(), - Util.formatCurrency(worth * amount, ess), + Util.displayCurrency(worth * amount, ess), amount, - Util.formatCurrency(worth, ess)) + Util.displayCurrency(worth, ess)) : _("worth", iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), - Util.formatCurrency(worth * amount, ess), + Util.displayCurrency(worth * amount, ess), amount, - Util.formatCurrency(worth, ess))); + Util.displayCurrency(worth, ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java index b0df73a42..21e70516e 100644 --- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java +++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java @@ -266,7 +266,7 @@ public class EssentialsSign final Double money = trade.getMoney(); if (money != null) { - sign.setLine(index, Util.formatCurrency(money, ess)); + sign.setLine(index, Util.shortCurrency(money, ess)); } } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java index 6b47ebc76..6ea4f5e80 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java @@ -135,11 +135,11 @@ public class SignTrade extends EssentialsSign final Double money = getMoney(split[0]); if (money != null) { - if (Util.formatCurrency(money, ess).length() * 2 > 15) + if (Util.shortCurrency(money, ess).length() * 2 > 15) { throw new SignException("Line can be too long!"); } - sign.setLine(index, Util.formatCurrency(money, ess) + ":0"); + sign.setLine(index, Util.shortCurrency(money, ess) + ":0"); return; } } @@ -155,7 +155,7 @@ public class SignTrade extends EssentialsSign { throw new SignException(_("moreThanZero")); } - sign.setLine(index, Util.formatCurrency(money, ess) + ":" + Util.formatCurrency(amount, ess).substring(1)); + sign.setLine(index, Util.shortCurrency(money, ess) + ":" + Util.shortCurrency(amount, ess).substring(1)); return; } } @@ -313,7 +313,7 @@ public class SignTrade extends EssentialsSign final Double amount = getDouble(split[1]); if (money != null && amount != null) { - final String newline = Util.formatCurrency(money, ess) + ":" + Util.formatCurrency(amount + value, ess).substring(1); + final String newline = Util.shortCurrency(money, ess) + ":" + Util.shortCurrency(amount + value, ess).substring(1); if (newline.length() > 15) { throw new SignException("This sign is full: Line too long!"); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index ad3ff11ac..d10ec0908 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -11,9 +11,9 @@ alertPlaced=placed: alertUsed=used: autoAfkKickReason=You have been kicked for idling more than {0} minutes. backAfterDeath=\u00a77Use the /back command to return to your death point. +backUsageMsg=\u00a77Returning to previous location. backupFinished=Backup finished backupStarted=Backup started -backUsageMsg=\u00a77Returning to previous location. balance=\u00a77Balance: {0} balanceTop=\u00a77Top balances ({0}) banExempt=\u00a7cYou can not ban that player. @@ -49,6 +49,7 @@ couldNotFindTemplate=Could not find template {0} creatingConfigFromTemplate=Creating config from template: {0} creatingEmptyConfig=Creating empty config: {0} creative=creative +currency={0}{1} day=day days=days defaultBanReason=The Ban Hammer has spoken! @@ -64,14 +65,14 @@ depth=\u00a77You are at sea level. depthAboveSea=\u00a77You are {0} block(s) above sea level. depthBelowSea=\u00a77You are {0} block(s) below sea level. destinationNotSet=Destination not set +disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}. disabled=disabled disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}. dontMoveMessage=\u00a77Teleportation will commence in {0}. Don''t move. downloadingGeoIp=Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB) duplicatedUserdata=Duplicated userdata: {0} and {1} -enabled=enabled enableUnlimited=\u00a77Giving unlimited amount of {0} to {1}. +enabled=enabled enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. enchantmentNotFound = \u00a7cEnchantment not found enchantmentPerm = \u00a7cYou do not have the permission for {0} @@ -99,9 +100,9 @@ gcentities= entities gcfree=Free memory: {0} MB gcmax=Maximum memory: {0} MB gctotal=Allocated memory: {0} MB -geoipJoinFormat=Player {0} comes from {1} geoIpUrlEmpty=GeoIP download url is empty. geoIpUrlInvalid=GeoIP download url is invalid. +geoipJoinFormat=Player {0} comes from {1} godDisabledFor=disabled for {0} godEnabledFor=enabled for {0} godMode=\u00a77God mode {0}. @@ -112,9 +113,9 @@ helpConsole=To view help from the console, type ?. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: holeInFloor=Hole in floor -homes=Homes: {0} homeSet=\u00a77Home set. homeSetToBed=\u00a77Your home is now set to this bed. +homes=Homes: {0} hour=hour hours=hours ignorePlayer=You ignore player {0} from now on. @@ -124,28 +125,28 @@ infoChapterPages=Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=File info.txt does not exist. Creating one for you. infoPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: infoUnknownChapter=Unknown chapter. +invBigger=The other users inventory is bigger than yours. +invRestored=Your inventory has been restored. +invSee=You see the inventory of {0}. +invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. invalidWorld=\u00a7cInvalid world. -invBigger=The other users inventory is bigger than yours. inventoryCleared=\u00a77Inventory Cleared. inventoryClearedOthers=\u00a77Inventory of \u00a7c{0}\u00a77 cleared. -invRestored=Your inventory has been restored. -invSee=You see the inventory of {0}. -invSeeHelp=Use /invsee to restore your inventory. is=is itemCannotBeSold=That item cannot be sold to the server. itemMustBeStacked=Item must be traded in stacks. A quantity of 2s would be two stacks, etc. itemNotEnough1=\u00a7cYou do not have enough of that item to sell. itemNotEnough2=\u00a77If you meant to sell all of your items of that type, use /sell itemname itemNotEnough3=\u00a77/sell itemname -1 will sell all but one item, etc. -itemsCsvNotLoaded=Could not load items.csv. itemSellAir=You really tried to sell Air? Put an item in your hand. itemSold=\u00a77Sold for \u00a7c{0} \u00a77({1} {2} at {3} each) itemSoldConsole={0} sold {1} for \u00a77{2} \u00a77({3} items at {4} each) itemSpawn=\u00a77Giving {0} of {1} +itemsCsvNotLoaded=Could not load items.csv. jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0} jailMessage=\u00a7cYou do the crime, you do the time. jailNotExist=That jail does not exist. @@ -162,8 +163,8 @@ kitError=\u00a7cThere are no valid kits. kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration? kitGive=\u00a77Giving kit {0}. kitInvFull=\u00a7cYour inventory was full, placing kit on the floor -kits=\u00a77Kits: {0} kitTimed=\u00a7cYou can''t use that kit again for another {0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77You have just been smited lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cTo mark your mail as read, type /mail clear mailCleared=\u00a77Mail Cleared! mailSent=\u00a77Mail sent! +markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear markedAsAway=\u00a77You are now marked as away. markedAsNotAway=\u00a77You are no longer marked as away. -markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear maxHomes=You cannot set more than {0} homes. mayNotJail=\u00a7cYou may not jail that person me=me @@ -185,10 +186,10 @@ minute=minute minutes=minutes missingItems=You do not have {0}x {1}. missingPrefixSuffix=Missing a prefix or suffix for {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Error while changing mob spawner. mobSpawnLimit=Mob quantity limited to server limit mobSpawnTarget=Target block must be a mob spawner. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} has been received from {1} moneySentTo=\u00a7a{0} has been sent to {1} moneyTaken={0} taken from your bank account. @@ -196,10 +197,10 @@ month=month months=months moreThanZero=Quantities must be greater than 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cYou may not mute that player. mutedPlayer=Player {0} muted. mutedPlayerFor=Player {0} muted for {1}. mutedUserSpeaks={0} tried to speak, but is muted. -muteExempt=\u00a7cYou may not mute that player. nearbyPlayers=Players nearby: {0} needTpohere=You need access to /tpohere to teleport other players. negativeBalanceError=User is not allowed to have a negative balance. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit noKits=\u00a77There are no kits available yet noMail=You do not have any mail noMotd=\u00a7cThere is no message of the day. -none=none noNewMail=\u00a77You have no new mail. noPendingRequest=You do not have a pending request. noPerm=\u00a7cYou do not have the \u00a7f{0}\u00a7c permission. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. noPlacePermission=\u00a7cYou do not have permission to place a block near that sign. noPowerTools=You have no power tools assigned. noRules=\u00a7cThere are no rules specified yet. +noWarpsDefined=No warps defined +none=none notAllowedToQuestion=\u00a7cYou are not authorized to use question. notAllowedToShout=\u00a7cYou are not authorized to shout. notEnoughExperience=You do not have enough experience. notEnoughMoney=You do not have sufficient funds. -nothingInHand = \u00a7cYou have nothing in your hand. notRecommendedBukkit= * ! * Bukkit version is not the recommended build for Essentials. notSupportedYet=Not supported yet. +nothingInHand = \u00a7cYou have nothing in your hand. now=now -noWarpsDefined=No warps defined nuke=May death rain upon them numberRequired=A number goes there, silly. onlyDayNight=/time only supports day/night. onlyPlayers=Only in-game players can use {0}. onlySunStorm=/weather only supports sun/storm. orderBalances=Ordering balances of {0} users, please wait ... +pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. +pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. +pTimePlayers=These players have their own time: +pTimeReset=Player time has been reset for: \u00a7e{0} +pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} +pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} parseError=Error parsing {0} on line {1} pendingTeleportCancelled=\u00a7cPending teleportation request cancelled. permissionsError=Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled. @@ -271,14 +280,6 @@ powerToolRemoveAll=All commands removed from {0}. powerToolsDisabled=All of your power tools have been disabled. powerToolsEnabled=All of your power tools have been enabled. protectionOwner=\u00a76[EssentialsProtect] Protection owner: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. -pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. -pTimePlayers=These players have their own time: -pTimeReset=Player time has been reset for: \u00a7e{0} -pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} -pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Question]\u00a7f {0} readNextPage=Type /{0} {1} to read the next page reloadAllPlugins=\u00a77Reloaded all plugins. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74You are not allowed to create sign here. similarWarpExist=A warp with a similar name already exists. slimeMalformedSize=Malformed size. soloMob=That mob likes to be alone -spawned=spawned spawnSet=\u00a77Spawn location set for group {0}. +spawned=spawned suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} has been taken from your account. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... -teleportationCommencing=\u00a77Teleportation commencing... -teleportationDisabled=\u00a77Teleportation disabled. -teleportationEnabled=\u00a77Teleportation enabled. teleportAtoB=\u00a77{0}\u00a77 teleported you to {1}\u00a77. teleportDisabled={0} has teleportation disabled. teleportHereRequest=\u00a7c{0}\u00a7c has requested that you teleport to them. -teleporting=\u00a77Teleporting... -teleportingPortal=\u00a77Teleporting via portal. teleportNewPlayerError=Failed to teleport new player teleportRequest=\u00a7c{0}\u00a7c has requested to teleport to you. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Teleporting to top. -tempbanExempt=\u00a77You may not tempban that player +teleportationCommencing=\u00a77Teleportation commencing... +teleportationDisabled=\u00a77Teleportation disabled. +teleportationEnabled=\u00a77Teleportation enabled. +teleporting=\u00a77Teleporting... +teleportingPortal=\u00a77Teleporting via portal. tempBanned=Temporarily banned from server for {0} +tempbanExempt=\u00a77You may not tempban that player thunder= You {0} thunder in your world thunderDuration=You {0} thunder in your world for {1} seconds. timeBeforeHeal=Time before next heal: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}. unlimitedItems=Unlimited items: unmutedPlayer=Player {0} unmuted. upgradingFilesError=Error while upgrading the files -userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} -userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp userDoesNotExist=The user {0} does not exist. userIsAway={0} is now AFK userIsNotAway={0} is no longer AFK userJailed=\u00a77You have been jailed userUsedPortal={0} used an existing exit portal. +userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} +userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp usingTempFolderForTesting=Using temp folder for testing: versionMismatch=Version mismatch! Please update {0} to the same version. versionMismatchAll=Version mismatch! Please update all Essentials jars to the same version. voiceSilenced=\u00a77Your voice has been silenced warpDeleteError=Problem deleting the warp file. -warpingTo=\u00a77Warping to {0}. warpListPermission=\u00a7cYou do not have Permission to list warps. warpNotExist=That warp does not exist. -warps=Warps: {0} -warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. warpSet=\u00a77Warp {0} set. warpUsePermission=\u00a7cYou do not have Permission to use that warp. +warpingTo=\u00a77Warping to {0}. +warps=Warps: {0} +warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. weatherStorm=\u00a77You set the weather to storm in {0} weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds weatherSun=\u00a77You set the weather to sun in {0} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 0d8260947..9bb84edba 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -11,9 +11,9 @@ alertPlaced=placerede: alertUsed=brugte: autoAfkKickReason=Du er blevet kicked for at idle mere end {0} minutter. backAfterDeath=\u00a77Brug /back kommandoen for at teleportere til dit d\u00f8dspunkt. +backUsageMsg=\u00a77Teleporterer til tidligere placering. backupFinished=Backup sluttet backupStarted=Backup startet -backUsageMsg=\u00a77Teleporterer til tidligere placering. balance=\u00a77Saldo: {0} balanceTop=\u00a77Top saldoer ({0}) banExempt=\u00a7cDu kan ikke banne den p\u00e5g\u00e6ldende spiller. @@ -49,6 +49,7 @@ couldNotFindTemplate=Kunne ikke finde skabelon {0} creatingConfigFromTemplate=Opretter config fra skabelon: {0} creatingEmptyConfig=Opretter tom config: {0} creative=creative +currency={0}{1} day=dag days=dage defaultBanReason=Banhammeren har talt! @@ -64,14 +65,14 @@ depth=\u00a77Du er ved havoverfladen. depthAboveSea=\u00a77Du er {0} blok(ke) over havets overflade. depthBelowSea=\u00a77Du er {0} blok(ke) under havets overflade. destinationNotSet=Destination ikke sat +disableUnlimited=\u00a77Deaktiverede ubergr\u00e6nset placering af {0} for {1}. disabled=deaktiveret disabledToSpawnMob=Skabelse af denne mob er deaktiveret i configfilen. -disableUnlimited=\u00a77Deaktiverede ubergr\u00e6nset placering af {0} for {1}. dontMoveMessage=\u00a77Teleportering vil begynde om {0}. Bev\u00e6g dig ikke. downloadingGeoIp=Downloader GeoIP database... det her kan tage et stykke tid (land: 0.6 MB, by: 27MB) duplicatedUserdata=Duplikerede userdata: {0} og {1} -enabled=aktiveret enableUnlimited=\u00a77Giver ubegr\u00e6nset m\u00e6ngde af {0} til {1}. +enabled=aktiveret enchantmentApplied = \u00a77Enchantment {0} er blevet tilf\u00c3\u00b8jet til tingen i din h\u00c3\u00a5nd. enchantmentNotFound = \u00a7cEnchantment ikke fundet. enchantmentPerm = \u00a7cDu har ikke tilladelse til at {0} @@ -99,9 +100,9 @@ gcentities= entities gcfree=Free memory: {0} MB gcmax=Maximum memory: {0} MB gctotal=Allocated memory: {0} MB -geoipJoinFormat=Spilleren {0} kommer fra {1} geoIpUrlEmpty=GeoIP download url er tom. geoIpUrlInvalid=GeoIP download url er ugyldig. +geoipJoinFormat=Spilleren {0} kommer fra {1} godDisabledFor=deaktiveret for {0} godEnabledFor=aktiveret for {0} godMode=\u00a77Gud mode {0}. @@ -112,9 +113,9 @@ helpConsole=For at se hj\u00e6lp fra konsolen, skriv ?. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f: holeInFloor=Hul i gulv -homes=Hjem: {0} homeSet=\u00a77Hjem sat. homeSetToBed=\u00a77Dit hjem er nu sat til denne seng. +homes=Hjem: {0} hour=time hours=timer ignorePlayer=Du ignorerer spiller {0} fra nu af. @@ -124,28 +125,28 @@ infoChapterPages=Kapitel {0}, side \u00a7c{1}\u00a7f af \u00a7c{2}\u00a7f: infoFileDoesNotExist=Fil info.txt eksisterer ikke. Fixer liiige en for dig. infoPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f: infoUnknownChapter=Ukendt kapitel. +invBigger=Den anden brugers inventory er st\u00f8rre end din. +invRestored=Din inventory er blevet genoprettet. +invSee=Du ser {0}''s inventory. +invSeeHelp=Brug /invsee for at genoprette din inventory. invalidCharge=\u00a7cUgyldig opladning (korrekt oversat?). invalidMob=Ugyldig mob type. invalidServer=Ugyldig server! invalidSignLine=Linje {0} p\u00e5 skilt er ugyldig. invalidWorld=\u00a7cUgyldig verden. -invBigger=Den anden brugers inventory er st\u00f8rre end din. inventoryCleared=\u00a77Inventory ryddet. inventoryClearedOthers=\u00a7c{0}\u00a77''s inventory ryddet. -invRestored=Din inventory er blevet genoprettet. -invSee=Du ser {0}''s inventory. -invSeeHelp=Brug /invsee for at genoprette din inventory. is=er itemCannotBeSold=Denne ting kan ikke s\u00e6lges til serveren. itemMustBeStacked=Tingen skal handles i stakke. En m\u00e6ngde af 2s ville v\u00e6re to stakke, osv. itemNotEnough1=\u00a7cDu har ikke nok af denne ting til at kunne s\u00e6lge. itemNotEnough2=\u00a77Hvis du mente, at du ville s\u00c3\u00a6lge alle ting af den type, brug da /sell tingens-navn itemNotEnough3=\u00a77/sell ting-navn -1 vil s\u00e6lge alle enheder, undtagen \u00c3\u00a9n, osv. -itemsCsvNotLoaded=Kunne ikke loade items.csv. itemSellAir=Fors\u00f8gte du virkelig at s\u00e6lge luft? Kom en ting i h\u00e5nden, hattemand. itemSold=\u00a77Solgte til \u00a7c{0} \u00a77({1} {2} ting for {3} pr. stk.) itemSoldConsole={0} solgte {1} til \u00a77{2} \u00a77({3} ting for {4} pr. stk.) itemSpawn=\u00a77Giver {0} af {1} +itemsCsvNotLoaded=Kunne ikke loade items.csv. jailAlreadyIncarcerated=\u00a7cSpilleren er allerede i f\u00c3\u00a6ngsel: {0} jailMessage=\u00a7cDu bryder reglerne, du tager straffen. jailNotExist=Det f\u00e6ngsel eksisterer ikke. @@ -162,8 +163,8 @@ kitError=\u00a7cDer er ikke nogen gyldige kits. kitErrorHelp=\u00a7cM\u00e5ske mangler en ting en m\u00e6ngde i konfigurationen? Eller m\u00c3\u00a5ske er der nisser p\u00c3\u00a5 spil? kitGive=\u00a77Giver kit til {0} (oversat korrekt?). kitInvFull=\u00a7cDin inventory er fuld, placerer kit p\u00e5 gulvet. -kits=\u00a77Kits: {0} kitTimed=\u00a7cDu kan ikke benytte dette kit igen i {0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77Du er blevet ramt af Guds vrede (din admin) lightningUse=\u00a77Kaster lyn efter {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cFor at markere din flaskepost som l\u00e6st, skriv /mail clear mailCleared=\u00a77Flaskepot ryddet! mailSent=\u00a77Flaskepot sendt! +markMailAsRead=\u00a7cFor at markere din flaskepost som l\u00e6st, skriv /mail clear markedAsAway=\u00a77Du er nu markeret som v\u00c3\u00a6rende ikke tilstede. markedAsNotAway=\u00a77Du er ikke l\u00e6ngere markeret som v\u00c3\u00a6rende ikke tilstede. -markMailAsRead=\u00a7cFor at markere din flaskepost som l\u00e6st, skriv /mail clear maxHomes=Du kan ikke have mere end {0} hjem. mayNotJail=\u00a7cDu kan ikke smide denne person i f\u00c3\u00a6ngsel. me=mig @@ -185,10 +186,10 @@ minute=minut minutes=minutter missingItems=Du har ikke {0}x {1}. missingPrefixSuffix=Mangler et pr\u00e6fiks eller suffiks for {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Fejl ved \u00e6ndring af mob spawner. mobSpawnLimit=Mob m\u00e6ngde begr\u00e6nset til serverens fastsatte gr\u00e6nse. mobSpawnTarget=M\u00e5l blok skal v\u00e6re en mob spawner. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} er modtaget fra {1} moneySentTo=\u00a7a{0} er sendt til {1} moneyTaken={0} blev taget fra din bankkonto. @@ -196,10 +197,10 @@ month=m\u00e5nede months=m\u00e5neder moreThanZero=M\u00e6ngder skal v\u00e6re st\u00f8rre end 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cDu kan ikke mute denne spiller. mutedPlayer=Spiller {0} muted. mutedPlayerFor=Spiller {0} muted i {1}. mutedUserSpeaks={0} pr\u00f8vede at snakke, men er muted. -muteExempt=\u00a7cDu kan ikke mute denne spiller. nearbyPlayers=Spillere i n\u00c3\u00a6rheden: {0} needTpohere=Du skal have adgang til /tpohere for at teleportere andre spillere. negativeBalanceError=Brugeren har ikke tilladelse til at have en negativ saldo. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cDu har brug for \u00a7c{0}\u00a7c permission for at bruge noKits=\u00a77Der er ikke nogen kits tilg\u00e6ngelige endnu noMail=Du har ikke noget flaskepost. noMotd=\u00a7cDer er ingen Message of the day. -none=ingen noNewMail=\u00a77Du har ingen ny flaskepost. noPendingRequest=Du har ikke en ventende anmodning. noPerm=\u00a7cDu har ikke \u00a7f{0}\u00a7c permission. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cDu har ikke tilladelse til at spawne denne mob. noPlacePermission=\u00a7cDu har ikke tiladelse til at placere en block n\u00c3\u00a6r det skilt. noPowerTools= Du har ingen power tools tilf\u00c3\u00b8jet. noRules=\u00a7cDer er ingen regler endnu. ANARKI! +noWarpsDefined=Ingen warps er defineret +none=ingen notAllowedToQuestion=\u00a7cDu har ikke tilladelse til at bruge sp\u00f8rgsm\u00e5l. notAllowedToShout=\u00a7cDu har ikke tilladelse til at r\u00e5be. notEnoughExperience=You do not have enough experience. notEnoughMoney=Du har ikke tilstr\u00e6kkeligt med penge. -nothingInHand = \u00a7cDu har intet i din h\u00c3\u00a5nd. notRecommendedBukkit=* ! * Bukkit version er ikke den anbefalede build til Essentials. notSupportedYet=Ikke underst\u00f8ttet endnu. +nothingInHand = \u00a7cDu har intet i din h\u00c3\u00a5nd. now=nu -noWarpsDefined=Ingen warps er defineret nuke=May death rain upon them numberRequired=Et nummer skal v\u00e6re, din tardo. onlyDayNight=/time underst\u00f8tter kun day/night. onlyPlayers=Kun in-game spillere kan bruge {0}. onlySunStorm=/weather underst\u00c3\u00b8tter kun sun/storm. orderBalances=Tjekker saldoer af {0} spillere, vent venligst... +pTimeCurrent=\u00a7e{0}''s\u00a7f Tiden er {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f Tiden er fastsat til {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f Tiden er normal og matcher serveren. +pTimeOthersPermission=\u00a7cDu har ikke tilladelse til at \u00c3\u00a6ndre andre spilleres tid. +pTimePlayers=Disse spillere har deres egen tid: +pTimeReset=Spiler-tid er blevet nulstillet for: \u00a7e{0} (oversat korrekt?) +pTimeSet=Spiller-tid er blevet sat til \u00a73{0}\u00a7f for: \u00a7e{1} (oversat korrekt?) +pTimeSetFixed=Spiller-tid er fastsat til \u00a73{0}\u00a7f for: \u00a7e{1} parseError=Fejl ved parsing af {0} p\u00e5 linje {1} pendingTeleportCancelled=\u00a7cAnmodning om teleport er blevet afvist. permissionsError=Mangler Permissions/GroupManager; chat pr\u00e6fikser/suffikser vil v\u00e6re deaktiveret. @@ -271,14 +280,6 @@ powerToolRemoveAll=Alle kommandoer fjernet fra {0}. powerToolsDisabled= Alle dine power tools er blevet deaktiveret. powerToolsEnabled= Alle dine power tools er blevet aktiveret. protectionOwner=\u00a76[EssentialsProtect] Protection owner: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f Tiden er {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f Tiden er fastsat til {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f Tiden er normal og matcher serveren. -pTimeOthersPermission=\u00a7cDu har ikke tilladelse til at \u00c3\u00a6ndre andre spilleres tid. -pTimePlayers=Disse spillere har deres egen tid: -pTimeReset=Spiler-tid er blevet nulstillet for: \u00a7e{0} (oversat korrekt?) -pTimeSet=Spiller-tid er blevet sat til \u00a73{0}\u00a7f for: \u00a7e{1} (oversat korrekt?) -pTimeSetFixed=Spiller-tid er fastsat til \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Sp\u00f8rgsm\u00e5l]\u00a7f {0} readNextPage=Skriv /{0} {1} for at l\u00c3\u00a6se n\u00c3\u00a6ste side. reloadAllPlugins=\u00a77Reload alle plugins. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74Du har ikke tilladelse til at lave et skilt he similarWarpExist=En warp med dette navn eksisterer allerede. slimeMalformedSize=Forkert st\u00f8rrelse. (Korrekt oversat?) soloMob=Denne mob kan godt lide at v\u00e6re alene. Den hygger sig. -spawned=spawnet spawnSet=\u00a77Spawnplacering fastsat for gruppe: {0}. +spawned=spawnet suicideMessage=\u00a77Farvel grusomme verden... suicideSuccess= \u00a77{0} tog sit eget liv survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} er blevet taget fra din konto. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Anmodning om teleport er sendt til alle spillere. teleportAll=\u00a77Teleporterer alle spillere... -teleportationCommencing=\u00a77Teleport begynder... -teleportationDisabled=\u00a77Teleport deaktiveret. -teleportationEnabled=\u00a77Teleport aktiveret. teleportAtoB=\u00a77{0}\u00a77 teleporterede dig til {1}\u00a77. teleportDisabled={0} har ikke teleportation aktiveret. teleportHereRequest=\u00a7c{0}\u00a7c har anmodet om, at du teleporterer dig til ham/hende. -teleporting=\u00a77Teleporterer... -teleportingPortal=\u00a77Teleporterede via portal. teleportNewPlayerError=Fejlede ved teleportering af ny spiller teleportRequest=\u00a7c{0}\u00a7c har anmodet om at teleportere til dig. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Teleporterer til toppen. -tempbanExempt=\u00a77Du m\u00c3\u00a5 ikke tempbanne denne spiller! Slemme, slemme du! +teleportationCommencing=\u00a77Teleport begynder... +teleportationDisabled=\u00a77Teleport deaktiveret. +teleportationEnabled=\u00a77Teleport aktiveret. +teleporting=\u00a77Teleporterer... +teleportingPortal=\u00a77Teleporterede via portal. tempBanned=Midlertidigt bannet fra serveren for {0} +tempbanExempt=\u00a77Du m\u00c3\u00a5 ikke tempbanne denne spiller! Slemme, slemme du! thunder= Du har nu {0} torden i din verden thunderDuration=Du har nu {0} torden i din verden i {1} sekunder. timeBeforeHeal=Tid f\u00c3\u00b8r du kan heale igen: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cIngen tilladelse til ubegr\u00e6nset ting {0}. unlimitedItems=Ubegr\u00c3\u00a6nsede ting: unmutedPlayer=Spilleren {0} unmuted. upgradingFilesError=Fejl under opgradering af filerne. -userdataMoveBackError=Kunne ikke flytte userdata/{0}.tmp til userdata/{1} -userdataMoveError=Kunne ikke flytte userdata/{0} til userdata/{1}.tmp userDoesNotExist=Brugeren {0} eksisterer ikke. userIsAway={0} er nu AFK. Skub ham i havet eller bur ham inde! userIsNotAway={0} er ikke l\u00e6ngere AFK. userJailed=\u00a77Du er blevet f\u00e6ngslet. userUsedPortal={0} brugte en eksisterende udgangsportal. +userdataMoveBackError=Kunne ikke flytte userdata/{0}.tmp til userdata/{1} +userdataMoveError=Kunne ikke flytte userdata/{0} til userdata/{1}.tmp usingTempFolderForTesting=Bruger temp-mappe til testing: versionMismatch=Versioner matcher ikke! Opdater venligst {0} til den nyeste version. versionMismatchAll=Versioner matcher ikke! Opdater venligst alle Essentials jar-filer til samme version. voiceSilenced=\u00a77Din stemme er blevet gjort stille. warpDeleteError=Ah, shit; kunne sgu ikke fjerne warp-filen. Jeg giver en \u00c3\u00b8l i lufthavnen. -warpingTo=\u00a77Warper til {0}. warpListPermission=\u00a7cDu har ikke tilladelse til at vise listen over warps. warpNotExist=Den warp eksisterer ikke. -warps=Warps: {0} -warpsCount=\u00a77Der er {0} warps. Viser side {1} af {2}. warpSet=\u00a77Warp {0} sat. warpUsePermission=\u00a7cDu har ikke tilladelse til at benytte den warp. +warpingTo=\u00a77Warper til {0}. +warps=Warps: {0} +warpsCount=\u00a77Der er {0} warps. Viser side {1} af {2}. weatherStorm=\u00a77Du har sat vejret til ''storm'' i {0} weatherStormFor=\u00a77Du har sat vejret til ''storm'' i {0} i {1} sekunder weatherSun=\u00a77Du har sat vejret til ''sol'' i {0} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 815972f03..944d5c7ef 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -49,6 +49,7 @@ couldNotFindTemplate=Vorlage {0} konnte nicht gefunden werden. creatingConfigFromTemplate=Erstelle Konfiguration aus Vorlage: {0} creatingEmptyConfig=Erstelle leere Konfiguration: {0} creative=creative +currency={0}{1} day=Tag days=Tage defaultBanReason=Der Bann-Hammer hat gesprochen! diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index dfc7600dc..c38abd727 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -11,9 +11,9 @@ alertPlaced=placed: alertUsed=used: autoAfkKickReason=You have been kicked for idling more than {0} minutes. backAfterDeath=\u00a77Use the /back command to return to your death point. +backUsageMsg=\u00a77Returning to previous location. backupFinished=Backup finished backupStarted=Backup started -backUsageMsg=\u00a77Returning to previous location. balance=\u00a77Balance: {0} balanceTop=\u00a77Top balances ({0}) banExempt=\u00a7cYou can not ban that player. @@ -49,6 +49,7 @@ couldNotFindTemplate=Could not find template {0} creatingConfigFromTemplate=Creating config from template: {0} creatingEmptyConfig=Creating empty config: {0} creative=creative +currency={0}{1} day=day days=days defaultBanReason=The Ban Hammer has spoken! @@ -64,14 +65,14 @@ depth=\u00a77You are at sea level. depthAboveSea=\u00a77You are {0} block(s) above sea level. depthBelowSea=\u00a77You are {0} block(s) below sea level. destinationNotSet=Destination not set +disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}. disabled=disabled disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}. dontMoveMessage=\u00a77Teleportation will commence in {0}. Don''t move. downloadingGeoIp=Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB) duplicatedUserdata=Duplicated userdata: {0} and {1} -enabled=enabled enableUnlimited=\u00a77Giving unlimited amount of {0} to {1}. +enabled=enabled enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. enchantmentNotFound = \u00a7cEnchantment not found enchantmentPerm = \u00a7cYou do not have the permission for {0} @@ -99,9 +100,9 @@ gcentities= entities gcfree=Free memory: {0} MB gcmax=Maximum memory: {0} MB gctotal=Allocated memory: {0} MB -geoipJoinFormat=Player {0} comes from {1} geoIpUrlEmpty=GeoIP download url is empty. geoIpUrlInvalid=GeoIP download url is invalid. +geoipJoinFormat=Player {0} comes from {1} godDisabledFor=disabled for {0} godEnabledFor=enabled for {0} godMode=\u00a77God mode {0}. @@ -112,9 +113,9 @@ helpConsole=To view help from the console, type ?. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: holeInFloor=Hole in floor -homes=Homes: {0} homeSet=\u00a77Home set. homeSetToBed=\u00a77Your home is now set to this bed. +homes=Homes: {0} hour=hour hours=hours ignorePlayer=You ignore player {0} from now on. @@ -124,28 +125,28 @@ infoChapterPages=Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=File info.txt does not exist. Creating one for you. infoPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: infoUnknownChapter=Unknown chapter. +invBigger=The other users inventory is bigger than yours. +invRestored=Your inventory has been restored. +invSee=You see the inventory of {0}. +invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. invalidWorld=\u00a7cInvalid world. -invBigger=The other users inventory is bigger than yours. inventoryCleared=\u00a77Inventory Cleared. inventoryClearedOthers=\u00a77Inventory of \u00a7c{0}\u00a77 cleared. -invRestored=Your inventory has been restored. -invSee=You see the inventory of {0}. -invSeeHelp=Use /invsee to restore your inventory. is=is itemCannotBeSold=That item cannot be sold to the server. itemMustBeStacked=Item must be traded in stacks. A quantity of 2s would be two stacks, etc. itemNotEnough1=\u00a7cYou do not have enough of that item to sell. itemNotEnough2=\u00a77If you meant to sell all of your items of that type, use /sell itemname itemNotEnough3=\u00a77/sell itemname -1 will sell all but one item, etc. -itemsCsvNotLoaded=Could not load items.csv. itemSellAir=You really tried to sell Air? Put an item in your hand. itemSold=\u00a77Sold for \u00a7c{0} \u00a77({1} {2} at {3} each) itemSoldConsole={0} sold {1} for \u00a77{2} \u00a77({3} items at {4} each) itemSpawn=\u00a77Giving {0} of {1} +itemsCsvNotLoaded=Could not load items.csv. jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0} jailMessage=\u00a7cYou do the crime, you do the time. jailNotExist=That jail does not exist. @@ -162,8 +163,8 @@ kitError=\u00a7cThere are no valid kits. kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration? kitGive=\u00a77Giving kit {0}. kitInvFull=\u00a7cYour inventory was full, placing kit on the floor -kits=\u00a77Kits: {0} kitTimed=\u00a7cYou can''t use that kit again for another {0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77You have just been smited lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cTo mark your mail as read, type /mail clear mailCleared=\u00a77Mail Cleared! mailSent=\u00a77Mail sent! +markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear markedAsAway=\u00a77You are now marked as away. markedAsNotAway=\u00a77You are no longer marked as away. -markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear maxHomes=You cannot set more than {0} homes. mayNotJail=\u00a7cYou may not jail that person me=me @@ -185,10 +186,10 @@ minute=minute minutes=minutes missingItems=You do not have {0}x {1}. missingPrefixSuffix=Missing a prefix or suffix for {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Error while changing mob spawner. mobSpawnLimit=Mob quantity limited to server limit mobSpawnTarget=Target block must be a mob spawner. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} has been received from {1} moneySentTo=\u00a7a{0} has been sent to {1} moneyTaken={0} taken from your bank account. @@ -196,10 +197,10 @@ month=month months=months moreThanZero=Quantities must be greater than 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cYou may not mute that player. mutedPlayer=Player {0} muted. mutedPlayerFor=Player {0} muted for {1}. mutedUserSpeaks={0} tried to speak, but is muted. -muteExempt=\u00a7cYou may not mute that player. nearbyPlayers=Players nearby: {0} needTpohere=You need access to /tpohere to teleport other players. negativeBalanceError=User is not allowed to have a negative balance. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit noKits=\u00a77There are no kits available yet noMail=You do not have any mail noMotd=\u00a7cThere is no message of the day. -none=none noNewMail=\u00a77You have no new mail. noPendingRequest=You do not have a pending request. noPerm=\u00a7cYou do not have the \u00a7f{0}\u00a7c permission. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. noPlacePermission=\u00a7cYou do not have permission to place a block near that sign. noPowerTools=You have no power tools assigned. noRules=\u00a7cThere are no rules specified yet. +noWarpsDefined=No warps defined +none=none notAllowedToQuestion=\u00a7cYou are not authorized to use question. notAllowedToShout=\u00a7cYou are not authorized to shout. notEnoughExperience=You do not have enough experience. notEnoughMoney=You do not have sufficient funds. -nothingInHand = \u00a7cYou have nothing in your hand. notRecommendedBukkit=* ! * Bukkit version is not the recommended build for Essentials. notSupportedYet=Not supported yet. +nothingInHand = \u00a7cYou have nothing in your hand. now=now -noWarpsDefined=No warps defined nuke=May death rain upon them numberRequired=A number goes there, silly. onlyDayNight=/time only supports day/night. onlyPlayers=Only in-game players can use {0}. onlySunStorm=/weather only supports sun/storm. orderBalances=Ordering balances of {0} users, please wait ... +pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. +pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. +pTimePlayers=These players have their own time: +pTimeReset=Player time has been reset for: \u00a7e{0} +pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} +pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} parseError=Error parsing {0} on line {1} pendingTeleportCancelled=\u00a7cPending teleportation request cancelled. permissionsError=Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled. @@ -271,14 +280,6 @@ powerToolRemoveAll=All commands removed from {0}. powerToolsDisabled=All of your power tools have been enabled. powerToolsEnabled=All of your power tools have been enabled. protectionOwner=\u00a76[EssentialsProtect] Protection owner: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. -pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. -pTimePlayers=These players have their own time: -pTimeReset=Player time has been reset for: \u00a7e{0} -pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} -pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Question]\u00a7f {0} readNextPage=Type /{0} {1} to read the next page reloadAllPlugins=\u00a77Reloaded all plugins. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74You are not allowed to create sign here. similarWarpExist=A warp with a similar name already exists. slimeMalformedSize=Malformed size. soloMob=That mob likes to be alone -spawned=spawned spawnSet=\u00a77Spawn location set for group {0}. +spawned=spawned suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} has been taken from your account. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... -teleportationCommencing=\u00a77Teleportation commencing... -teleportationDisabled=\u00a77Teleportation disabled. -teleportationEnabled=\u00a77Teleportation enabled. teleportAtoB=\u00a77{0}\u00a77 teleported you to {1}\u00a77. teleportDisabled={0} has teleportation disabled. teleportHereRequest=\u00a7c{0}\u00a7c has requested that you teleport to them. -teleporting=\u00a77Teleporting... -teleportingPortal=\u00a77Teleporting via portal. teleportNewPlayerError=Failed to teleport new player teleportRequest=\u00a7c{0}\u00a7c has requested to teleport to you. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Teleporting to top. -tempbanExempt=\u00a77You may not tempban that player +teleportationCommencing=\u00a77Teleportation commencing... +teleportationDisabled=\u00a77Teleportation disabled. +teleportationEnabled=\u00a77Teleportation enabled. +teleporting=\u00a77Teleporting... +teleportingPortal=\u00a77Teleporting via portal. tempBanned=Temporarily banned from server for {0} +tempbanExempt=\u00a77You may not tempban that player thunder= You {0} thunder in your world thunderDuration=You {0} thunder in your world for {1} seconds. timeBeforeHeal=Time before next heal: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}. unlimitedItems=Unlimited items: unmutedPlayer=Player {0} unmuted. upgradingFilesError=Error while upgrading the files -userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} -userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp userDoesNotExist=The user {0} does not exist. userIsAway={0} is now AFK userIsNotAway={0} is no longer AFK userJailed=\u00a77You have been jailed userUsedPortal={0} used an existing exit portal. +userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} +userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp usingTempFolderForTesting=Using temp folder for testing: versionMismatch=Version mismatch! Please update {0} to the same version. versionMismatchAll=Version mismatch! Please update all Essentials jars to the same version. voiceSilenced=\u00a77Your voice has been silenced warpDeleteError=Problem deleting the warp file. -warpingTo=\u00a77Warping to {0}. warpListPermission=\u00a7cYou do not have Permission to list that warps. warpNotExist=That warp does not exist. -warps=Warps: {0} -warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. warpSet=\u00a77Warp {0} set. warpUsePermission=\u00a7cYou do not have Permission to use that warp. +warpingTo=\u00a77Warping to {0}. +warps=Warps: {0} +warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. weatherStorm=\u00a77You set the weather to storm in {0} weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds weatherSun=\u00a77You set the weather to sun in {0} diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 909ec7434..07a788eb5 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -11,9 +11,9 @@ alertPlaced=situado: alertUsed=usado: autoAfkKickReason=Has sido echado por ausentarte mas de {0} minutos. backAfterDeath=\u00a77Usa el comando /back para volver al punto en el que moriste. +backUsageMsg=\u00a77Volviendo a la localizacion anterior. backupFinished=Copia de seguridad completada backupStarted=Comenzando copia de seguridad -backUsageMsg=\u00a77Volviendo a la localizacion anterior. balance=\u00a77Cantidad: {0} balanceTop=\u00a77Top cantidades ({0}) banExempt=\u00a7cNo puedes banear a ese jugador @@ -49,6 +49,7 @@ couldNotFindTemplate=No se puede encontrar el template {0} creatingConfigFromTemplate=Creando configuracion desde el template: {0} creatingEmptyConfig=Creando configuracion vacia: {0} creative=creative +currency={0}{1} day=dia days=dias defaultBanReason=Baneado por incumplir las normas! @@ -64,14 +65,14 @@ depth=\u00a77Estas al nivel del mar. depthAboveSea=\u00a77Estas {0} bloque(s) por encima del mar. depthBelowSea=\u00a77Estas {0} bloque(s) por debajo del mar. destinationNotSet=Destino no establecido. +disableUnlimited=\u00a77Desactivando colocacion ilimitada de {0} para {1}. disabled=desactivado disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77Desactivando colocacion ilimitada de {0} para {1}. dontMoveMessage=\u00a77Teletransporte comenzara en {0}. No te muevas. downloadingGeoIp=Descargando base de datos de GeoIP ... puede llevar un tiempo (pais: 0.6 MB, ciudad: 20MB) duplicatedUserdata=Datos de usuario duplicados: {0} y {1} -enabled=activado enableUnlimited=\u00a77Dando cantidad ilimitada de {0} a {1}. +enabled=activado enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. enchantmentNotFound = \u00a7cEnchantment not found enchantmentPerm = \u00a7cYou do not have the permission for {0} @@ -99,9 +100,9 @@ gcentities= entidades gcfree=Memoria libre: {0} MB gcmax=Memoria maxima: {0} MB gctotal=Memoria localizada: {0} MB -geoipJoinFormat=El jugador {0} viene de {1} geoIpUrlEmpty=Link para descargar GeoIP esta vacio. geoIpUrlInvalid=Link para descargar GeoIP es invalido. +geoipJoinFormat=El jugador {0} viene de {1} godDisabledFor=Desactivado para {0} godEnabledFor=Activado para {0} godMode=\u00a77Modo Dios {0}. @@ -112,9 +113,9 @@ helpConsole=Para obtener ayuda de la consola, escribe ?. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f: holeInFloor=Agujero en el suelo -homes=Hogares: {0} homeSet=\u00a77Hogar establecido. homeSetToBed=\u00a77Tu hogar esta ahora establecido a esta cama. +homes=Hogares: {0} hour=hora hours=horas ignorePlayer=A partir de ahora ignoras al jugador {0}. @@ -124,28 +125,28 @@ infoChapterPages=Seccion {0}, pagina \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=El archivo info.txt no existe. Creando uno para ti. infoPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f: infoUnknownChapter=Seccion desconocida. +invBigger=El inventario del otro usuario es mas grande que el tuyo +invRestored=Tu inventario ha sido recuperado. +invSee=Estas viendo el inventario de {0}. +invSeeHelp=Usa /invsee para recuperar tu inventario. invalidCharge=\u00a7cCargo invalido. invalidMob=Mob invalido. invalidServer=Servidor invalido! invalidSignLine=Linea {0} en el signo es invalida. invalidWorld=\u00a7cMundo invalido. -invBigger=El inventario del otro usuario es mas grande que el tuyo inventoryCleared=\u00a77Inventario limpiado. inventoryClearedOthers=\u00a77Inventario de \u00a7c{0}\u00a77 limpiado. -invRestored=Tu inventario ha sido recuperado. -invSee=Estas viendo el inventario de {0}. -invSeeHelp=Usa /invsee para recuperar tu inventario. is=es itemCannotBeSold=Ese objeto no puede ser vendido al servidor. itemMustBeStacked=El objeto tiene que ser intercambiado en pilas. Una cantidad de 2s seria de dos pilas, etc. itemNotEnough1=\u00a7cNo tienes suficientes ejemplares de ese objeto para venderlo. itemNotEnough2=\u00a77Si pensabas en vender todos tus objetos de ese tipo, usa /sell nombredeobjeto itemNotEnough3=\u00a77/sell nombredeobjeto -1 vendera todos excepto un objeto, etc. -itemsCsvNotLoaded=Error al leer items.csv. itemSellAir=Realmente has intentado vender Aire? Pon un objeto en tu mano! itemSold=\u00a77Vendido para \u00a7c {0} \u00a77 ({1} {2} a {3} cada uno) itemSoldConsole={0} Vendido {1} para\u00a77 {2} \u00a77({3} objetos a {4} cada uno) itemSpawn=\u00a77Dando {0} de {1} +itemsCsvNotLoaded=Error al leer items.csv. jailAlreadyIncarcerated=\u00a7cLa persona ya esta en la carcel: {0} jailMessage=\u00a7cPor hacer el mal, tiempo en la carcel estaras. jailNotExist=Esa carcel no existe. @@ -162,8 +163,8 @@ kitError=\u00a7cNo hay ningun kit valido. kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration? kitGive=\u00a77Dando kit a {0}. kitInvFull=\u00a7cTu inventario esta lleno, su kit se pondra en el suelo -kits=\u00a77Kits: {0} kitTimed=\u00a7c No puedes usar ese kit de nuevo para otro{0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77Acabas de ser golpeado lightningUse=\u00a77Golpeando a {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cPara marcar tu email como leido, escribe /mail clear mailCleared=\u00a77Email limpiado! mailSent=\u00a77Email enviado!! +markMailAsRead=\u00a7cPara marcar tu email como leido, escribe /mail clear markedAsAway=\u00a77Has sido puesto como AFK. markedAsNotAway=\u00a77Ya no estas AFK. -markMailAsRead=\u00a7cPara marcar tu email como leido, escribe /mail clear maxHomes=No puedes establecer mas de {0} hogares. mayNotJail=\u00a7cNo puedes encarcelar a esa persona me=yo @@ -185,10 +186,10 @@ minute=minuto minutes=minutos missingItems=No tienes {0}x de {1}. missingPrefixSuffix=Falta un prefijo o un sufijo para {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Error al cambiar la localizacion para el nacimiento de los mobs. mobSpawnLimit=Cantidad de Mobs limitados al limite del server mobSpawnTarget=El block seleccionado sera el lugar donde van a nacer los mobs. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} ha sido recivido de {1} moneySentTo=\u00a7a{0} ha sido enviado a {1} moneyTaken={0} han sido sacados de tu cuenta bancaria. @@ -196,10 +197,10 @@ month=mes months=meses moreThanZero=Las cantidades han de ser mayores que 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cNo puedes silenciar a ese jugador. mutedPlayer=Player {0} silenciado. mutedPlayerFor=Player {0} silenciado durante {1}. mutedUserSpeaks={0} intento hablar, pero esta silenciado. -muteExempt=\u00a7cNo puedes silenciar a ese jugador. nearbyPlayers=Players nearby: {0} needTpohere=Necesitas acceso a /tpohere para teletransportar a otros jugadores. negativeBalanceError=El usuario no tiene permitido tener un saldo negativo. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cNecesitas los \u00a7c{0}\u00a7c permisos para usar ese ki noKits=\u00a77No hay kits disponibles todavia noMail=No tienes ningun email recivido noMotd=\u00a7cNo hay ningun mensaje del dia. -none=ninguno noNewMail=\u00a77No tienes ningun correo nuevo. noPendingRequest=No tienes ninguna peticion pendiente. noPerm=\u00a7cNo tienes el permiso de \u00a7f{0}\u00a7c. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. noPlacePermission=\u00a7cNo tienes permiso para situar ese bloque en ese lugar. noPowerTools=You have no power tools assigned. noRules=\u00a7cNo hay reglas especificadas todavia. +noWarpsDefined=No hay teletransportes definidos aun +none=ninguno notAllowedToQuestion=\u00a7cYou estas autorizado para usar las preguntas. notAllowedToShout=\u00a7cNo estas autorizado para gritar. notEnoughExperience=You do not have enough experience. notEnoughMoney=No tienes el dinero suficiente. -nothingInHand = \u00a7cYou have nothing in your hand. notRecommendedBukkit=* ! * La version de bukkit no es la recomendada para esta version de Essentials. notSupportedYet=No esta soportado aun. +nothingInHand = \u00a7cYou have nothing in your hand. now=ahora -noWarpsDefined=No hay teletransportes definidos aun nuke=May death rain upon them numberRequired=Un numero es necesario, amigo. onlyDayNight=/time solo soporta day/night. (dia/noche) onlyPlayers=Solo los jugadores conectados pueden usar {0}. onlySunStorm=/weather solo soporta sun/storm. (sol/tormenta) orderBalances=Ordering balances of {0} users, please wait ... +pTimeCurrent=\u00a7e{0}''s\u00a7f la hora es {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f la hora ha sido cambiada a {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f el tiempo es normal y coincide con el servidor. +pTimeOthersPermission=\u00a7cNo estas autorizado para especificar'' la hora de otros usuarios. +pTimePlayers=Estos usuarios tienen su propia hora: +pTimeReset=La hora del usuario ha sido reiniciada a las: \u00a7e{0} +pTimeSet=La hora del jugador ha sido cambiada para las: \u00a73{0}\u00a7f for: \u00a7e{1} +pTimeSetFixed=La hora del jugador ha sido arreglada para las: \u00a73{0}\u00a7f for: \u00a7e{1} parseError=error analizando {0} en la linea {1} pendingTeleportCancelled=\u00a7cPeticion de teletransporte pendiente cancelado. permissionsError=Falta el plugin Permissions/GroupManager; Los prefijos/sufijos de chat seran desactivados. @@ -271,14 +280,6 @@ powerToolRemoveAll=Todos los comandos borrados desde {0}. powerToolsDisabled=All of your power tools have been disabled. powerToolsEnabled=All of your power tools have been enabled. protectionOwner=\u00a76[EssentialsProtect] Dueño de la proteccion: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f la hora es {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f la hora ha sido cambiada a {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f el tiempo es normal y coincide con el servidor. -pTimeOthersPermission=\u00a7cNo estas autorizado para especificar'' la hora de otros usuarios. -pTimePlayers=Estos usuarios tienen su propia hora: -pTimeReset=La hora del usuario ha sido reiniciada a las: \u00a7e{0} -pTimeSet=La hora del jugador ha sido cambiada para las: \u00a73{0}\u00a7f for: \u00a7e{1} -pTimeSetFixed=La hora del jugador ha sido arreglada para las: \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Pregunta]\u00a7f {0} readNextPage=Type /{0} {1} to read the next page reloadAllPlugins=\u00a77Todos los plugins recargados. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74No puedes poner carteles en ese sitio. similarWarpExist=Ya existe un teletransporte con ese nombre. slimeMalformedSize=Medidas malformadas. soloMob=A este mob le gusta estar solo -spawned=nacido spawnSet=\u00a77El lugar de nacimiento ha sido puesto para el grupo {0}. +spawned=nacido suicideMessage=\u00a77Adios mundo cruel... suicideSuccess= \u00a77{0} se quito su propia vida survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} ha sido sacado de tu cuenta. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Peticion de teletransporte enviada a todos los jugadores... teleportAll=\u00a77Teletransportando a todos los jugadores... -teleportationCommencing=\u00a77Comenzando teletransporte... -teleportationDisabled=\u00a77Teletransporte desactivado. -teleportationEnabled=\u00a77Teletransporte activado. teleportAtoB=\u00a77{0}\u00a77 te teletransporto a {1}\u00a77. teleportDisabled={0} tiene desactivado los teletransportes. teleportHereRequest=\u00a7c{0}\u00a7c ha pedido que te teletransportes con el. -teleporting=\u00a77Teletransportando... -teleportingPortal=\u00a77Teletransportando via portal. teleportNewPlayerError=Error al teletransportar al nuevo jugador teleportRequest=\u00a7c{0}\u00a7c te ha pedido teletransportarse contigo. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Teletransportandote a la cima. -tempbanExempt=\u00a77No puedes banear temporalmente a ese jugador +teleportationCommencing=\u00a77Comenzando teletransporte... +teleportationDisabled=\u00a77Teletransporte desactivado. +teleportationEnabled=\u00a77Teletransporte activado. +teleporting=\u00a77Teletransportando... +teleportingPortal=\u00a77Teletransportando via portal. tempBanned=Baneado temporalmente del servidor por {0} +tempbanExempt=\u00a77No puedes banear temporalmente a ese jugador thunder= Tu has {0} los truenos en tu mundo. thunderDuration=Tu has {0} los truenos en tu mundo durante {1} seconds. timeBeforeHeal=Tiempo antes de la siguiente curacion: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cNo tienes permiso para objetos ilimitados {0}. unlimitedItems=Objetos ilimitados. unmutedPlayer=Jugador {0} desmuteado. upgradingFilesError=Error mientras se actualizaban los archivos -userdataMoveBackError=Error al mover userdata/{0}.tmp a userdata/{1} -userdataMoveError=Error al mover userdata/{0} a userdata/{1}.tmp userDoesNotExist=El usuario {0} no existe userIsAway={0} esta ahora ausente! userIsNotAway={0} ya no esta ausente! userJailed=\u00a77Has sido encarcelado! userUsedPortal={0} uso un portal de salida existente. +userdataMoveBackError=Error al mover userdata/{0}.tmp a userdata/{1} +userdataMoveError=Error al mover userdata/{0} a userdata/{1}.tmp usingTempFolderForTesting=Usando carpeta temporal para pruebas: versionMismatch=La version no coincide! Por favor actualiza {0} a la misma version. versionMismatchAll=La version no coincide! Por favor actualiza todos los jars de Essentials a la misma version. voiceSilenced=\u00a77Tu voz ha sido silenciada warpDeleteError=Problema al borrar el archivo de teletransporte. -warpingTo=\u00a77Teletransportandote a {0}. warpListPermission=\u00a7cNo tienes permiso para listar esos teletransportes. warpNotExist=Ese teletransporte no existe. -warps=Warps: {0} -warpsCount=\u00a77Hay {0} teletransportes. Mostrando pagina {1} de {2}. warpSet=\u00a77Teletransporte {0} establecido. warpUsePermission=\u00a7cNo tienes permisos para usar ese teletransporte. +warpingTo=\u00a77Teletransportandote a {0}. +warps=Warps: {0} +warpsCount=\u00a77Hay {0} teletransportes. Mostrando pagina {1} de {2}. weatherStorm=\u00a77Has establecido el tiempo a tormenta en este mundo. weatherStormFor=\u00a77Has establecido el tiempo a tormenta en este {1} durante {0} segundos. weatherSun=\u00a77Has establecido el tiempo a sol en este mundo. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index a74be475b..8afe6cb0c 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -11,9 +11,9 @@ alertPlaced=a plac\u00e9 : alertUsed=a utilis\u00e9 : autoAfkKickReason=Vous avez \u00e9t\u00e9 \u00e9ject\u00e9 pour inactivit\u00e9e sup\u00e9rieure \u00e0 {0} minutes. backAfterDeath=\u00a77Utilisez la commande /back pour retourner \u00e0 l''endroit ou vous \u00eates mort. +backUsageMsg=\u00a77Retour \u00e0 votre emplacement pr\u00e9c\u00c3\u00a8dent. backupFinished=Sauvegarde termin\u00e9 backupStarted=D\u00e9but de la sauvegarde... -backUsageMsg=\u00a77Retour \u00e0 votre emplacement pr\u00e9c\u00c3\u00a8dent. balance=\u00a77Solde : {0} balanceTop=\u00a77Meilleurs soldes au ({0}) banExempt=\u00a77Vous ne pouvez pas bannir ce joueur. @@ -49,6 +49,7 @@ couldNotFindTemplate=Le mod\u00c3\u00a8le {0} est introuvable creatingConfigFromTemplate=Cr\u00e9ation de la configuration \u00e0 partir du mod\u00c3\u00a8le : {0} creatingEmptyConfig=Cr\u00e9ation d''une configuration vierge : {0} creative=cr\u00e9atif +currency={0}{1} day=jour days=jours defaultBanReason=Le marteau du bannissement a frapp\u00e9 ! @@ -64,14 +65,14 @@ depth=\u00a77Vous \u00eates au niveau de la mer. depthAboveSea=\u00a77Vous \u00eates \u00e0 {0} bloc(s) au-dessus du niveau de la mer. depthBelowSea=\u00a77Vous \u00eates \u00e0 {0} bloc(s) en-dessous du niveau de la mer. destinationNotSet=Destination non d\u00e9finie +disableUnlimited=\u00a77D\u00e9sactivation du placement illimit\u00e9 de {0} pour {1}. disabled=d\u00e9sactiv\u00e9 disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77D\u00e9sactivation du placement illimit\u00e9 de {0} pour {1}. dontMoveMessage=\u00a77La t\u00e9l\u00e9portation commence dans {0}. Ne bougez pas. downloadingGeoIp=T\u00e9l\u00e9chargement de la base de donn\u00e9es GeoIP ... Cela peut prendre un moment (Pays : 0.6 Mo, villes : 20Mo) duplicatedUserdata=Donn\u00e9e utilisateur dupliqu\u00e9e : {0} et {1} -enabled=activ\u00e9 enableUnlimited=\u00a77Quantit\u00e9 illimit\u00e9e de {0} \u00e0 {1}. +enabled=activ\u00e9 enchantmentApplied = \u00a77L''enchantement {0} a \u00e9t\u00e9 appliqu\u00e9 \u00e0 l''objet dans votre main. enchantmentNotFound = \u00a7cEnchantement non-trouv\u00e9 enchantmentPerm = \u00a7cVous n''avez pas les droits pour {0}. @@ -99,9 +100,9 @@ gcentities=entit\u00e9s gcfree=M\u00e9moire libre : {0} Mo gcmax=M\u00e9moire maximale : {0} Mo gctotal=M\u00e9moire utilis\u00e9e : {0} Mo -geoipJoinFormat=Joueur {0} vient de {1} geoIpUrlEmpty=L''URL de t\u00e9l\u00e9chargement de GeoIP est vide. geoIpUrlInvalid=L''URL de t\u00e9l\u00e9chargement de GeoIP est invalide. +geoipJoinFormat=Joueur {0} vient de {1} godDisabledFor=d\u00e9sactiv\u00e9 pour {0} godEnabledFor=activ\u00e9 pour {0} godMode=\u00a77Mode Dieu {0}. @@ -112,9 +113,9 @@ helpConsole=Pour voir l''aide tapez ? helpOp=\u00a7c[Aide Admin]\u00a7f \u00a77{0} : \u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f sur \u00a7c{1}\u00a7f. holeInFloor=Trou dans le Sol. -homes=R\u00e9sidences : {0} homeSet=\u00a77R\u00e9sidence d\u00e9finie. homeSetToBed=\u00a77Votre r\u00e9sidence est d\u00e9sormais li\u00e9e \u00e0 ce lit. +homes=R\u00e9sidences : {0} hour=heure hours=heures ignorePlayer=Vous ignorez d\u00e9sormais {0}. @@ -124,28 +125,28 @@ infoChapterPages=Chapitre {0}, page \u00a7c{1}\u00a7f sur \u00a7c{2}\u00a7f: infoFileDoesNotExist=Le fichier info.txt n'existe pas. Le fichier est en cours de cr\u00e9ation pour vous. infoPages=Page \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f. infoUnknownChapter=Chapitre inconnu. +invBigger=Les inventaires des autres joueurs sont plus gros que le v\u00f4tre. +invRestored=Votre inventaire vous a \u00e9t\u00e9 rendu. +invSee=Vous voyez l''inventaire de {0}. +invSeeHelp=Utilisez /invsee pour revenir \u00e0 votre inventaire. invalidCharge=\u00a7cCharge invalide. invalidMob=Mauvias type de cr\u00e9ature. invalidServer=Serveur non valide. invalidSignLine=La ligne {0} du panneau est invalide. invalidWorld=\u00a7cMonde invalide. -invBigger=Les inventaires des autres joueurs sont plus gros que le v\u00f4tre. inventoryCleared=\u00a77Inventaire nettoy\u00e9. inventoryClearedOthers=\u00a77L''inventaire de \u00a7c{0}\u00a77 a \u00e9t\u00e9 nettoy\u00e9. -invRestored=Votre inventaire vous a \u00e9t\u00e9 rendu. -invSee=Vous voyez l''inventaire de {0}. -invSeeHelp=Utilisez /invsee pour revenir \u00e0 votre inventaire. is=est itemCannotBeSold=Cet objet ne peut \u00eatre vendu au serveur. itemMustBeStacked=Cet objet doit \u00eatre vendu par 64. Une quantit\u00e9 de 2 serait deux fois 64. itemNotEnough1=\u00a7cVous n'avez pas assez de cet objet pour le vendre. itemNotEnough2=\u00a77Si vous voulez vendre l'int\u00e9gralit\u00e9 de vos objets de ce type l\u00e0, utilisez /sell nomObjet itemNotEnough3=\u00a77/sell nomObjet -1 vendra tout sauf un objet, etc. -itemsCsvNotLoaded=N'a pas pu charger items.csv. itemSellAir=Vouliez-vous vraiment vendre de l'air ? Mettez un objet dans votre main. itemSold=\u00a77Vendu pour \u00a7c{0} \u00a77({1} {2} \u00e0 {3} chacun) itemSoldConsole={0} vendu {1} pour \u00a77{2} \u00a77({3} objet(s) \u00e0 {4} chacun) itemSpawn=\u00a77Donne {0} de {1} +itemsCsvNotLoaded=N'a pas pu charger items.csv. jailAlreadyIncarcerated=\u00a7cJoueur d\u00e9j\u00e0 emprisonn\u00e9 : {0} jailMessage=\u00a7cVous avez commis un crime, vous en payez le prix. jailNotExist=Cette prison n'existe pas. @@ -162,8 +163,8 @@ kitError=\u00a7cIl n'y a pas de kits valides. kitErrorHelp=\u00a7cPeut-\u00eatre qu'un objet manque d'une quantit\u00e9 dans la configuration ? kitGive=\u00a77Donner le kit {0}. kitInvFull=\u00a7cVotre inventaire \u00e9tait plein, le kit est parre-terre. -kits=\u00a77Kits :{0} kitTimed=\u00a7cVous ne pouvez pas utiliser ce kit pendant encore {0}. +kits=\u00a77Kits :{0} lightningSmited=\u00a77Vous venez d'\u00eatre foudroy\u00e9. lightningUse=\u00a77{0} a \u00e9t\u00e9 foudroy\u00e9. listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Locale : <{0}> {1} mailClear=\u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear mailCleared=\u00a77Courrier supprim\u00e9 ! mailSent=\u00a77Courrier envoy\u00e9 ! +markMailAsRead=\u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear markedAsAway=\u00a77Vous \u00eates d\u00e9sormais AFK. markedAsNotAway=\u00a77Vous n'\u00eates d\u00e9sormais plus AFK. -markMailAsRead=\u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear maxHomes=Vous ne pouvez pas cr\u00e9er plus de {0} r\u00e9sidences. mayNotJail=\u00a7cVous ne pouvez pas emprisonner cette personne. me=moi @@ -185,10 +186,10 @@ minute=minute minutes=minutes missingItems=Vous n''avez pas {0} x {1}. missingPrefixSuffix=Pr\u00e9fixe ou Suffixe manquant pour {0} -mobsAvailable=\u00a77cr\u00e9atures : {0} mobSpawnError=Erreur lors du changement du g\u00e9n\u00e9rateur de cr\u00e9atures. mobSpawnLimit=Quantit\u00e9 de cr\u00e9atures limit\u00e9 \u00e0 au maximum du serveur. mobSpawnTarget=Le bloc cible doit \u00eatre un g\u00e9n\u00e9rateur de cr\u00e9atures. +mobsAvailable=\u00a77cr\u00e9atures : {0} moneyRecievedFrom=\u00a7a{0} a \u00e9t\u00e9 re\u00e7u de {1} moneySentTo=\u00a7a{0} a \u00e9t\u00e9 envoy\u00e9 \u00e0 {1} moneyTaken={0} pr\u00e9lev\u00e9(s) de votre compte. @@ -196,10 +197,10 @@ month=mois months=mois moreThanZero=Les quantit\u00e9s doivent \u00eatre sup\u00e9rieures \u00e0 z\u00e9ro. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cVous ne pouvez pas r\u00e9duire ce joueur au silence. mutedPlayer=Le joueur {0} est d\u00e9sormais muet. mutedPlayerFor={0} a \u00e9t\u00e9 muet pour {1}. mutedUserSpeaks={0} a essay\u00e9 de parler mais est muet. -muteExempt=\u00a7cVous ne pouvez pas r\u00e9duire ce joueur au silence. nearbyPlayers=Joueurs dans les environs : {0} needTpohere=Vous avez besoin de l'acc\u00c3\u00a8s \u00e0 /tpohere pour t\u00e9l\u00e9porter d'autres joueurs. negativeBalanceError=L'utilisateur n'est pas autoris\u00e9 \u00e0 avoir un solde n\u00e9gatif. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cVous avez besoin de la permission \u00a7c{0}\u00a7c pour noKits=\u00a77Il n'y a pas encore de kits disponibles. noMail=Vous n'avez pas de courrier noMotd=\u00a7cIl n'y a pas de message su jour. -none=aucun noNewMail=\u00a77Vous n'avez pas de courrier. noPendingRequest=Vous n'avez pas de requ\u00eate non lue. noPerm=\u00a7cVous n''avez pas la permission \u00a7f{0}\u00a7c. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cVous n'avez pas la permission d'invoquer cette cr\u00e9a noPlacePermission=\u00a7cVous n'avez pas la permission de placer un bloc pr\u00c3\u00a8 de cette pancarte. noPowerTools=Vous n'avez pas d'outil macro associ\u00e9. noRules=\u00a7cIl n'y a pas encore de r\u00e8gles d\u00e9finies. +noWarpsDefined=Aucun point de t\u00e9l\u00e9portation d\u00e9fini. +none=aucun notAllowedToQuestion=\u00a7cVous n'\u00eates pas autoris\u00e9 \u00e0 poser des questions. notAllowedToShout=\u00a7cVous n'\u00eates pas autoris\u00e9 \u00e0 crier. notEnoughExperience=Vous n'avez pas assez d'exp\u00e9rience. notEnoughMoney=Vous n'avez pas les fonds n\u00e9cessaires. -nothingInHand = \u00a7cVous n'avez rien en main. notRecommendedBukkit=* ! * La version de Bukkit n'est pas celle qui est recommand\u00e9 pour cette version de Essentials. notSupportedYet=Pas encore pris en charge. +nothingInHand = \u00a7cVous n'avez rien en main. now=maintenant -noWarpsDefined=Aucun point de t\u00e9l\u00e9portation d\u00e9fini. nuke=Que la mort s'abatte sur eux ! numberRequired=Il faut fournir un nombre ici. onlyDayNight=/time ne supporte que (jour) day/night (nuit). onlyPlayers=Seulement les joueurs en jeu peuvent utiliser {0}. onlySunStorm=/weather ne supporte que (soleil) sun/storm (temp\u00eate). orderBalances=Classement des balance de {0} utilisateurs, patientez ... +pTimeCurrent=Pour \u00a7e{0}\u00a7f l''heure est {1}. +pTimeCurrentFixed=L''heure de \u00a7e{0}\u00a7f est fix\u00e9e \u00e0 {1}. +pTimeNormal=\u00a7fPour \u00a7e{0}\u00a7f l'heure est normale et correspond au server. +pTimeOthersPermission=\u00a7cVous n'etes pas autoris\u00e9 \u00e0 changer l'heure des autres joueurs. +pTimePlayers=Ces joueurs ont leur propre horraire : +pTimeReset=l''heure a \u00e9t\u00e9 r\u00e9initialis\u00e9e \u00e0 : \u00a7e{0} +pTimeSet=l''heure du joueur a \u00e9t\u00e9 r\u00e9egl\u00e9ee \u00e0 \u00a73{0}\u00a7f pour : \u00a7e{1} +pTimeSetFixed=l''heure du joueur a \u00e9t\u00e9 fix\u00e9e \u00e0 : \u00a7e{1} parseError=Erreur de conversion {0} \u00e0 la ligne {1} pendingTeleportCancelled=\u00a7cRequete de t\u00e9l\u00e9portation annul\u00e9e. permissionsError=Permissions/GroupManager manquant, les pr\u00e9fixes et suffixes ne seront pas affich\u00e9s. @@ -271,14 +280,6 @@ powerToolRemoveAll=Toutes les commandes retir\u00e9es de {0}. powerToolsDisabled=Toutes vos commandes assign\u00e9es ont \u00e9t\u00e9 retir\u00e9es. powerToolsEnabled=Toutes vos commandes assign\u00e9es ont \u00e9t\u00e9 activ\u00e9es. protectionOwner=\u00a76[EssentialsProtect] Propri\u00e9taire de la protection : {0} -pTimeCurrent=Pour \u00a7e{0}\u00a7f l''heure est {1}. -pTimeCurrentFixed=L''heure de \u00a7e{0}\u00a7f est fix\u00e9e \u00e0 {1}. -pTimeNormal=\u00a7fPour \u00a7e{0}\u00a7f l'heure est normale et correspond au server. -pTimeOthersPermission=\u00a7cVous n'etes pas autoris\u00e9 \u00e0 changer l'heure des autres joueurs. -pTimePlayers=Ces joueurs ont leur propre horraire : -pTimeReset=l''heure a \u00e9t\u00e9 r\u00e9initialis\u00e9e \u00e0 : \u00a7e{0} -pTimeSet=l''heure du joueur a \u00e9t\u00e9 r\u00e9egl\u00e9ee \u00e0 \u00a73{0}\u00a7f pour : \u00a7e{1} -pTimeSetFixed=l''heure du joueur a \u00e9t\u00e9 fix\u00e9e \u00e0 : \u00a7e{1} questionFormat=\u00a77[Question]\u00a7f {0} readNextPage=Utilisez /{0} {1} pour lire la page suivante. reloadAllPlugins=\u00a77Toutes les extensions ont \u00e9t\u00e9 recharg\u00e9es. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74Vous n'avez pas l'autorisation de cr\u00e9er u similarWarpExist=Un point de t\u00e9l\u00e9portation avec un nom similaire existe d\u00e9j\u00e0. slimeMalformedSize=Taille mal form\u00e9e. soloMob=Ce cr\u00e9ature aime \u00eatre seul. -spawned=invoqu\u00e9(s) spawnSet=\u00a77Le point de d\u00e9part a \u00e9t\u00e9 d\u00e9fini pour le groupe {0}. +spawned=invoqu\u00e9(s) suicideMessage=\u00a77Au revoir monde cruel... suicideSuccess=\u00a77{0} s''est suicid\u00e9. survival=survie @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} ont \u00e9t\u00e9 retir\u00e9 de votre compte. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Demande de t\u00e9l\u00e9portation envoy\u00e9e \u00e0 tous les joueurs... teleportAll=\u00a77T\u00e9l\u00e9poration de tous les joueurs. -teleportationCommencing=\u00a77D\u00e9but de la t\u00e9l\u00e9portation... -teleportationDisabled=\u00a77T\u00e9l\u00e9poration d\u00e9sactiv\u00e9. -teleportationEnabled=\u00a77T\u00e9l\u00e9portation activ\u00e9e. teleportAtoB=\u00a77{0}\u00a77 vous a t\u00e9l\u00e9port\u00e9 \u00e0 {1}\u00a77. teleportDisabled={0} a la t\u00e9l\u00e9portation d\u00e9sactiv\u00e9. teleportHereRequest=\u00a7c{0}\u00a7c Vous a demand\u00e9 de vous t\u00e9l\u00e9porter \u00e0 lui/elle. -teleporting=\u00a77T\u00e9l\u00e9poration en cours... -teleportingPortal=\u00a77T\u00e9l\u00e9portation via portail. teleportNewPlayerError=\u00c9chec de la t\u00e9l\u00e9portation du nouveau joueur. teleportRequest=\u00a7c{0}\u00a7c vous demande s''il peut se t\u00e9l\u00e9porter vers vous. teleportRequestTimeoutInfo=\u00a77Cette demande de t\u00e9l\u00e9portation expirera dans {0} secondes. teleportTop=\u00a77T\u00e9l\u00e9portation vers le haut. -tempbanExempt=\u00a77Vous ne pouvez pas bannir temporairement ce joueur. +teleportationCommencing=\u00a77D\u00e9but de la t\u00e9l\u00e9portation... +teleportationDisabled=\u00a77T\u00e9l\u00e9poration d\u00e9sactiv\u00e9. +teleportationEnabled=\u00a77T\u00e9l\u00e9portation activ\u00e9e. +teleporting=\u00a77T\u00e9l\u00e9poration en cours... +teleportingPortal=\u00a77T\u00e9l\u00e9portation via portail. tempBanned=Banni temporairement du serveur pour {0} +tempbanExempt=\u00a77Vous ne pouvez pas bannir temporairement ce joueur. thunder=Vous avez {0} la foudre dans votre monde. thunderDuration=Vous avez {0} la foudre dans le serveur pendant {1} secondes. timeBeforeHeal=Temps avant le prochain soin : {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cPas de permission pour l''objet illimit\u00e9 {0} unlimitedItems=Objets illimit\u00e9s: unmutedPlayer=Le joueur {0} n''est plus muet. upgradingFilesError=Erreur durant la mise \u00e0 jour des fichiers. -userdataMoveBackError=Echec du d\u00e9placement de userdata/{0}.tmp vers userdata/{1} -userdataMoveError=Echec du d\u00e9placement de userdata/{0} vers userdata/{1}.tmp userDoesNotExist=L''utilisateur {0} n''existe pas. userIsAway={0} s'est mis en AFK userIsNotAway={0} n'est plus AFK userJailed=\u00a77Vous avez \u00e9t\u00e9 emprisonn\u00e9. userUsedPortal={0} a utilis\u00e9 un portail existant. +userdataMoveBackError=Echec du d\u00e9placement de userdata/{0}.tmp vers userdata/{1} +userdataMoveError=Echec du d\u00e9placement de userdata/{0} vers userdata/{1}.tmp usingTempFolderForTesting=Utilise un fichier temporaire pour un test. versionMismatch=Versions diff\u00e9rentes ! Mettez s''il vous plait {0} \u00e0 la m\u00eame version. versionMismatchAll=Mauvaise version ! S'il vous plait mettez des jars Essentials de version identique. voiceSilenced=\u00a77Vous avez \u00e9t\u00e9 r\u00e9duit au silence. warpDeleteError=Probl\u00c3\u00a8me concernant la suppression du fichier warp. -warpingTo=\u00a77T\u00e9l\u00e9portation vers {0}. warpListPermission=\u00a7cVous n'avez pas la permission d'afficher la liste des points de t\u00e9l\u00e9portation. warpNotExist=Ce point de t\u00e9l\u00e9portation n'existe pas. -warps=point de t\u00e9l\u00e9portations : {0} -warpsCount=\u00a77Il y a {0} points de t\u00e9l\u00e9portations. Page {1} sur {2}. warpSet=\u00a77Le point de t\u00e9l\u00e9portation {0} a \u00e9t\u00e9 cr\u00e9\u00e9. warpUsePermission=\u00a7cVous n'avez pas la permission d'utiliser ce point de t\u00e9l\u00e9portation. +warpingTo=\u00a77T\u00e9l\u00e9portation vers {0}. +warps=point de t\u00e9l\u00e9portations : {0} +warpsCount=\u00a77Il y a {0} points de t\u00e9l\u00e9portations. Page {1} sur {2}. weatherStorm=\u00a77Vous avez programm\u00e9 l''orage dans {0} weatherStormFor=\u00a77Vous avez programm\u00e9 l''orage dans {0} pour {1} secondes. weatherSun=\u00a77Vous avez programm\u00e9 le beau temps dans {0} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 51bbe2bed..da88603d6 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -11,9 +11,9 @@ alertPlaced=geplaatst: alertUsed=gebruikt: autoAfkKickReason=You have been kicked for idling more than {0} minutes. backAfterDeath=\u00a77Gebruik het /back command om terug te keren naar je sterfplaats. +backUsageMsg=\u00a77Naar de vorige locatie aan het gaan. backupFinished=Backup voltooid backupStarted=Backup gestart -backUsageMsg=\u00a77Naar de vorige locatie aan het gaan. balance=\u00a77Saldo: {0} balanceTop=\u00a77 Top saldi ({0}) banExempt=\u00a77Je kunt deze speler niet verbannen. @@ -49,6 +49,7 @@ couldNotFindTemplate=Het sjabloon kon niet worden gevonden {0} creatingConfigFromTemplate=Bezig met aanmaken van een config vanaf sjabloon: {0} creatingEmptyConfig=Bezig met een lege config aanmaken: {0} creative=creative +currency={0}{1} day=dag days=dagen defaultBanReason=De Ban Hamer heeft gesproken! @@ -64,14 +65,14 @@ depth=\u00a77Je zit op zeeniveau. depthAboveSea=\u00a77Je zit {0} blok(ken) boven zeeniveau. depthBelowSea=\u00a77Je zit {0} blok(ken) onder zeeniveau. destinationNotSet=Bestemming niet ingesteld +disableUnlimited=\u00a77Oneindig plaatsen van {0} uitgeschakeld voor {1}. disabled=uitgeschakeld disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77Oneindig plaatsen van {0} uitgeschakeld voor {1}. dontMoveMessage=\u00a77Beginnen met teleporteren in {0}. Niet bewegen. downloadingGeoIp=Bezig met downloaden van GeoIP database ... Dit kan een tijdje duren (country: 0.6 MB, city: 20MB) duplicatedUserdata=Dubbele userdata: {0} en {1}. -enabled=ingeschakeld enableUnlimited=\u00a77Oneindig aantal {0} aan {1} gegeven. +enabled=ingeschakeld enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. enchantmentNotFound = \u00a7cEnchantment not found enchantmentPerm = \u00a7cYou do not have the permission for {0} @@ -99,9 +100,9 @@ gcentities= entities gcfree=Vrij geheugen: {0} MB gcmax=Maximaal geheugen: {0} MB gctotal=Gealloceerd geheugen: {0} MB -geoipJoinFormat=Speler {0} komt uit {1} geoIpUrlEmpty=GeoIP download url is leeg. geoIpUrlInvalid=GeoIP download url is ongeldig. +geoipJoinFormat=Speler {0} komt uit {1} godDisabledFor=uitgeschakeld voor {0} godEnabledFor=ingeschakeld voor {0} godMode=\u00a77God mode {0}. @@ -112,9 +113,9 @@ helpConsole=type ? om de consolehelp weer te geven. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f: holeInFloor=Gat in de vloer -homes=Homes: {0} homeSet=\u00a77Home ingesteld. homeSetToBed=\u00a77Je home is is nu verplaatst naar dit bed. +homes=Homes: {0} hour=uur hours=uren ignorePlayer=Je negeert {0} vanaf nu. @@ -124,28 +125,28 @@ infoChapterPages=Hoofdstuk {0}, Pagina \u00a7c{1}\u00a7f van de \u00a7c{2}\u00a7 infoFileDoesNotExist=Bestand info.txt bestaat niet. Bezig met aanmaken. infoPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f: infoUnknownChapter=Onbekend hoofdstuk. +invBigger=De inventory van de andere speler is groter dan die van jou. +invRestored=Je inventory is hersteld. +invSee=Je kijkt naar de inventory van {0}. +invSeeHelp=Type /invsee om je inventory te herstellen. invalidCharge=\u00a7cOngeldig te laden. invalidMob=Ongeldig mob type. invalidServer=Ongeldige server! invalidSignLine=Regel {0} op het bordje is ongeldig. invalidWorld=\u00a7cOngeldige wereld. -invBigger=De inventory van de andere speler is groter dan die van jou. inventoryCleared=\u00a77inventory leeggemaakt. inventoryClearedOthers=\u00a77inventory van \u00a7c{0}\u00a77 leeggemaakt. -invRestored=Je inventory is hersteld. -invSee=Je kijkt naar de inventory van {0}. -invSeeHelp=Type /invsee om je inventory te herstellen. is=is itemCannotBeSold=Dat voorwerp kan niet aan de server worden verkocht. itemMustBeStacked=Voorwerp moet geruild worden als stapel. Een hoeveelheid van 2 moet dus geruild worden als twee stapels, etc. itemNotEnough1=\u00a7cJe hebt niet genoeg van dat voorwerp om te verkopen. itemNotEnough2=\u00a77Type /sell itemname Als je alles daarvan wilt verkopen itemNotEnough3=\u00a77/sell itemname -1 zorgt ervoor dat ze allemaal behalve 1 worden verkocht, etc. -itemsCsvNotLoaded=De item kunnen niet geladen worden.csv. itemSellAir=Je wilde serieus lucht verkopen? Plaats een voorwerp in je hand. itemSold=\u00a77Verkocht voor \u00a7c{0} \u00a77({1} {2} voorwerpen voor {3} per stuk) itemSoldConsole={0} verkocht {1} voor \u00a77{2} \u00a77({3} voorwerpen voor {4} per stuk) itemSpawn=\u00a77Geeft {0} {1} +itemsCsvNotLoaded=De item kunnen niet geladen worden.csv. jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0} jailMessage=\u00a7cYou do the crime, you do the time. jailNotExist=Die gevangenis bestaat niet. @@ -162,8 +163,8 @@ kitError=\u00a7cEr zijn geen geldige kits. kitErrorHelp=\u00a7cMisschien mist er een hoeveelheid van het item in de configuratie? kitGive=\u00a77Kit {0} wordt gegeven. kitInvFull=\u00a7cJe inventory was vol, de kit wordt op de grond geplaatst -kits=\u00a77Kits: {0} kitTimed=\u00a7cJe kan die kit pas weer gebruiken over {0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77Je bent zojuist verbrand lightningUse=\u00a77Brand {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cType /mail clear, om ej berichten als gelezen te markeren. mailCleared=\u00a77Bericht geklaard! mailSent=\u00a77Bericht verzonden! +markMailAsRead=\u00a7cType /mail clear, om je berichten als gelezen te markeren markedAsAway=\u00a77Je staat nu als afwezig gemeld. markedAsNotAway=\u00a77Je staat niet meer als afwezig gemeld. -markMailAsRead=\u00a7cType /mail clear, om je berichten als gelezen te markeren maxHomes=You cannot set more than {0} homes. mayNotJail=\u00a7cJe mag die speler niet in de gevangenis zetten. me=me @@ -185,10 +186,10 @@ minute=minuut minutes=minuten missingItems=Je hebt geen {0}x {1}. missingPrefixSuffix=Er mist een prefix of suffix voor {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Fout bij het veranderen van de mob spawner. mobSpawnLimit=Grootte van de mob hang af van het server limiet mobSpawnTarget=Target blok moet een mob spawner zijn. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} is ontvangen van {1} moneySentTo=\u00a7a{0} is verzonden naar {1} moneyTaken={0} van je bankrekening afgehaald. @@ -196,10 +197,10 @@ month=maand months=maanden moreThanZero=Het aantal moet groter zijn dan 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cJe kan deze speler niet muten. mutedPlayer=Speler {0} gemute. mutedPlayerFor=Speler {0} is gemute voor {1}. mutedUserSpeaks={0} probeerde te praten, maar is gemute. -muteExempt=\u00a7cJe kan deze speler niet muten. nearbyPlayers=Players nearby: {0} needTpohere=Je moet toegang krijgen tot /tpohere om naar andere spelers te teleporteren. negativeBalanceError=Speler is niet toegestaan om een negatief saldo te hebben. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cJe hebt de \u00a7c{0}\u00a7c toestemming nodig om die kit noKits=\u00a77Er zijn nog geen kits beschikbaar noMail=Je hebt geen berichten noMotd=\u00a7cEr is geen bericht van de dag. -none=geen noNewMail=\u00a77Je hebt geen nieuwe berichten. noPendingRequest=Je hebt geen aanvragen. noPerm=\u00a7cJe hebt de \u00a7f{0}\u00a7c toestemming niet. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. noPlacePermission=\u00a7cJe hebt geen toestemming om een blok naast die sign te plaatsen. noPowerTools=You have no power tools assigned. noRules=\u00a7cEr zijn nog geen regels gegeven. +noWarpsDefined=Geen warps gedefinieerd +none=geen notAllowedToQuestion=\u00a7cJe bent niet bevoegd om de vraag functie te gebruiken. notAllowedToShout=\u00a7cJe bent niet bevoegd om de roep functie te gebruiken. notEnoughExperience=You do not have enough experience. notEnoughMoney=Je hebt niet voldoende middelen. -nothingInHand = \u00a7cYou have nothing in your hand. notRecommendedBukkit=* ! * De Bukkit versie is niet de aangeraden build voor Essentials. notSupportedYet=Nog niet ondersteund. +nothingInHand = \u00a7cYou have nothing in your hand. now=nu -noWarpsDefined=Geen warps gedefinieerd nuke=May death rain upon them numberRequired=Er moet daar een nummer, grapjas. onlyDayNight=/time ondersteund alleen day/night. onlyPlayers=Alleen in-game spelers kunnen {0} gebruiken. onlySunStorm=/weather only supports sun/storm. orderBalances=Ordering balances of {0} users, please wait ... +pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. +pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. +pTimePlayers=These players have their own time: +pTimeReset=Player time has been reset for: \u00a7e{0} +pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} +pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} parseError=Fout bij ontleding {0} op regel {1} pendingTeleportCancelled=\u00a7cAangevraagde teleportatie afgelast. permissionsError=Permissions/GroupManager ontbreekt; chat prefixes/suffixes worden uitgeschakeld. @@ -271,14 +280,6 @@ powerToolRemoveAll=All commands removed from {0}. powerToolsDisabled=All of your power tools have been disabled. powerToolsEnabled=All of your power tools have been enabled. protectionOwner=\u00a76[EssentialsProtect] Beschermingeigenaar: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. -pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. -pTimePlayers=These players have their own time: -pTimeReset=Player time has been reset for: \u00a7e{0} -pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} -pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Vraag]\u00a7f {0} readNextPage=Type /{0} {1} to read the next page reloadAllPlugins=\u00a77Alle plugins zijn herladen. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74You are not allowed to create sign here. similarWarpExist=Er bestaat al een warp met dezelfde naam. slimeMalformedSize=Misvoormde grootte. soloMob=Die mob is liever in zijn eentje -spawned=gespawned spawnSet=\u00a77Spawn locatie voor de groep {0} ingesteld. +spawned=gespawned suicideMessage=\u00a77Vaarwel vreedzame wereld... suicideSuccess= \u00a77{0} pleegde zelfmoord survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} is van je bank rekening afgehaald. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Bezig met teleporteren van alle spelers... -teleportationCommencing=\u00a77Aan het beginnen met teleporteren... -teleportationDisabled=\u00a77Teleportatie uitgeschakeld. -teleportationEnabled=\u00a77Teleportatie ingeschakeld. teleportAtoB=\u00a77{0}\u00a77 is naar {1}\u00a77 geteleporteerd. teleportDisabled={0} heeft teleporteren uit gezet. teleportHereRequest=\u00a7c{0}\u00a7c Heeft gevraagd of hij/zij naar jou mag teleporteren. -teleporting=\u00a77Bezig met teleporteren... -teleportingPortal=\u00a77Bezig met teleporteren via de portal. teleportNewPlayerError=Fout bij het teleporteren van nieuwe speler. teleportRequest=\u00a7c{0}\u00a7c vraagt of hij jou kan teleporteren. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Bezig met teleporteren naar de top. -tempbanExempt=\u00a77Je mag deze speler niet een tempban geven +teleportationCommencing=\u00a77Aan het beginnen met teleporteren... +teleportationDisabled=\u00a77Teleportatie uitgeschakeld. +teleportationEnabled=\u00a77Teleportatie ingeschakeld. +teleporting=\u00a77Bezig met teleporteren... +teleportingPortal=\u00a77Bezig met teleporteren via de portal. tempBanned=Tijdelijk geband voor {0} +tempbanExempt=\u00a77Je mag deze speler niet een tempban geven thunder= Je {0} onweert de wereld thunderDuration=Je {0} onweert de wereld voor {1} seconde. timeBeforeHeal=Afkoeltijd tot de volgende heal: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cOnbevoegd om oneindig {0} te hebben. unlimitedItems=Oneindige voorwerpen: unmutedPlayer=Speler {0} mag weer spreken. upgradingFilesError=Fout tijdens het upgraden van de bestanden -userdataMoveBackError=Fout bij het verplaasten van userdata/{0}.tmp naar userdata/{1} -userdataMoveError=Fout bij het verplaasten van userdata/{0} naar userdata/{1}.tmp userDoesNotExist=Speler {0} bestaat niet. userIsAway={0} is nu AFK userIsNotAway={0} is niet meer AFK userJailed=\u00a77Je bent in de gevangenis gezet. userUsedPortal={0} gebruikte een bestaande uitgangs portal. +userdataMoveBackError=Fout bij het verplaasten van userdata/{0}.tmp naar userdata/{1} +userdataMoveError=Fout bij het verplaasten van userdata/{0} naar userdata/{1}.tmp usingTempFolderForTesting=Tijdelijke map om te testen: versionMismatch=Verkeerde versie! Update {0} naar dezelfde versie. versionMismatchAll=Verkeerde versie! Update alle Essentials jars naar dezelfde versie. voiceSilenced=\u00a77Je kan niet meer praten warpDeleteError=Fout bij het verwijderen van het warp bestand. -warpingTo=\u00a77Aan het warpen naar {0}. warpListPermission=\u00a7cJe hebt geen toegang om die warp te maken. warpNotExist=Die warp bestaat niet. -warps=Warps: {0} -warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. warpSet=\u00a77Warp {0} ingesteld. warpUsePermission=\u00a7cOnbevoegd om die warp te gebruiken. +warpingTo=\u00a77Aan het warpen naar {0}. +warps=Warps: {0} +warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. weatherStorm=\u00a77Je hebt het weer naar storm gezet in de {0} weatherStormFor=\u00a77Je hebt het weer in de {0} naar storm gezet voor {1} seconde weatherSun=\u00a77Je hebt het weer naar zon gezet in de {0} -- cgit v1.2.3 From 1ce2c60bf4e3a4a38ae8c58cd76849656f37f895 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 16:01:49 +0000 Subject: Updating Craftbukkit #2034 Bukkit #1378 --- lib/bukkit.jar | Bin 4691009 -> 4690989 bytes lib/craftbukkit.jar | Bin 11039568 -> 11039537 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/bukkit.jar b/lib/bukkit.jar index b53ae8d18..0b13c3119 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index c5bdd9c3c..8b32a634a 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From e55aa3cea7f8c12dd843a62f955c83a7b3153ce4 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 16:17:16 +0000 Subject: Extra command alias. --- Essentials/src/plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index be2c64b5c..714abde4b 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -58,7 +58,7 @@ commands: clearinventory: description: Clear all items in your inventory. usage: / - aliases: [ci,eci,clearinvent,eclearinvent,eclearinventory] + aliases: [ci,eci,clearinvent,clean,eclean,eclearinvent,eclearinventory] compass: description: Describes your current bearing. usage: / -- cgit v1.2.3 From 6a9027da6d7cd2c2c0c35f0163dc0207720708e6 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 20:06:50 +0000 Subject: Adding starter/newbie kit to EssentialsSpawn Optimization to EssentialsSpawn join event. --- .../src/com/earth2me/essentials/IEssentials.java | 1 + .../src/com/earth2me/essentials/ISettings.java | 6 +++-- Essentials/src/com/earth2me/essentials/Kit.java | 5 ++-- .../src/com/earth2me/essentials/Settings.java | 6 +++++ .../earth2me/essentials/commands/Commandkit.java | 4 +-- Essentials/src/config.yml | 5 ++++ .../spawn/EssentialsSpawnPlayerListener.java | 31 +++++++++++++++++----- 7 files changed, 45 insertions(+), 13 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/IEssentials.java b/Essentials/src/com/earth2me/essentials/IEssentials.java index 20c6c300e..6b820440a 100644 --- a/Essentials/src/com/earth2me/essentials/IEssentials.java +++ b/Essentials/src/com/earth2me/essentials/IEssentials.java @@ -9,6 +9,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitScheduler; + /** * @deprecated This will be moved to the api package soon */ diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index 6186736b4..ec3941cd1 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -20,6 +20,8 @@ public interface ISettings extends IConf boolean getAnnounceNewPlayers(); + String getNewPlayerKit(); + String getBackupCommand(); long getBackupInterval(); @@ -115,11 +117,11 @@ public interface ISettings extends IConf boolean warnOnSmite(); double getMaxMoney(); - + double getMinMoney(); boolean isEcoLogEnabled(); - + boolean isEcoLogUpdateEnabled(); boolean removeGodOnDisconnect(); diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index 47e5e6ac2..cf39997ea 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -63,10 +63,11 @@ public class Kit public static List getItems(final User user, final Map kit) throws Exception { - if (kit == null) { + if (kit == null) + { throw new Exception(_("kitError2")); } - + try { return (List)kit.get("items"); diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index e3992e52c..c9232f107 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -351,6 +351,12 @@ public class Settings implements ISettings return new SimpleTextInput(Util.replaceColor(config.getString("newbies.announce-format", "&dWelcome {DISPLAYNAME} to the server!"))); } + @Override + public String getNewPlayerKit() + { + return config.getString("newbies.kit", ""); + } + @Override public String getNewbieSpawn() { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java index aee0af910..67f0fafd0 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java @@ -38,7 +38,7 @@ public class Commandkit extends EssentialsCommand { throw new Exception(_("noKitPermission", "essentials.kit." + kitName)); } - + final List items = Kit.getItems(user, kit); Kit.checkTime(user, kitName, kit); @@ -47,7 +47,7 @@ public class Commandkit extends EssentialsCommand charge.isAffordableFor(user); Kit.expandItems(ess, user, items); - + charge.charge(user); user.sendMessage(_("kitGive", kitName)); diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 81d911c82..11bc38329 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -547,6 +547,11 @@ newbies: # When we spawn for the first time, which spawnpoint do we use? # Set to "none" if you want to use the spawn point of the world. spawnpoint: newbies + + # Do we want to give users anything on first join? Set to '' to disable + # This kit will be given reguardless of cost, and permissions. + #kit: '' + kit: tools # Set this to lowest, if you want Multiverse to handle the respawning # Set this to high, if you want EssentialsSpawn to handle the respawning diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java index c7a17845a..ba71c176f 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java @@ -1,12 +1,13 @@ package com.earth2me.essentials.spawn; +import com.earth2me.essentials.*; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.OfflinePlayer; -import com.earth2me.essentials.User; import com.earth2me.essentials.textreader.IText; import com.earth2me.essentials.textreader.KeywordReplacer; import com.earth2me.essentials.textreader.SimpleTextPager; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.Bukkit; @@ -67,13 +68,14 @@ public class EssentialsSpawnPlayerListener implements Listener public void onPlayerJoin(final PlayerJoinEvent event) { - final User user = ess.getUser(event.getPlayer()); - - if (user.hasPlayedBefore()) + if (event.getPlayer().hasPlayedBefore()) { LOGGER.log(Level.FINE, "Old player join"); return; } + + final User user = ess.getUser(event.getPlayer()); + if (!"none".equalsIgnoreCase(ess.getSettings().getNewbieSpawn())) { ess.scheduleSyncDelayedTask(new NewPlayerTeleport(user), 1L); @@ -86,6 +88,21 @@ public class EssentialsSpawnPlayerListener implements Listener ess.broadcastMessage(user, pager.getString(0)); } + final String kitName = ess.getSettings().getNewPlayerKit(); + if (!kitName.isEmpty()) + { + try + { + final Map kit = ess.getSettings().getKit(kitName.toLowerCase(Locale.ENGLISH)); + final List items = Kit.getItems(user, kit); + Kit.expandItems(ess, user, items); + } + catch (Exception ex) + { + LOGGER.log(Level.WARNING, ex.getMessage()); + } + } + LOGGER.log(Level.FINE, "New player join"); } @@ -109,7 +126,7 @@ public class EssentialsSpawnPlayerListener implements Listener try { - Location spawn = spawns.getSpawn(ess.getSettings().getNewbieSpawn()); + final Location spawn = spawns.getSpawn(ess.getSettings().getNewbieSpawn()); if (spawn != null) { user.getTeleport().now(spawn, false, TeleportCause.PLUGIN); -- cgit v1.2.3 From a75eefcdd47f50292fe2ca4d3d8740ebc10b253b Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 21:43:24 +0000 Subject: CME --- Essentials/src/com/earth2me/essentials/Mob.java | 3 ++- Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java index 656ed6bc1..38c11a81a 100644 --- a/Essentials/src/com/earth2me/essentials/Mob.java +++ b/Essentials/src/com/earth2me/essentials/Mob.java @@ -1,6 +1,7 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; +import java.util.Collections; import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -73,7 +74,7 @@ public enum Mob } public static Set getMobList() { - return hashMap.keySet(); + return Collections.unmodifiableSet(hashMap.keySet()); } public LivingEntity spawn(final Player player, final Server server, final Location loc) throws MobException diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 5c118eaaa..27a9d3d3a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -27,7 +27,7 @@ public class Commandspawnmob extends EssentialsCommand { if (args.length < 1) { - Set availableList = Mob.getMobList(); + final Set availableList = Mob.getMobList(); for (String mob : availableList) { if (!user.isAuthorized("essentials.spawnmob." + mob.toLowerCase())) -- cgit v1.2.3 From 7cec1564b9e2b5074cae24f36de75b0838309b2a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 21:54:51 +0000 Subject: Build custom mob list /spawnmob --- .../com/earth2me/essentials/commands/Commandspawnmob.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 27a9d3d3a..7c71c9576 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -5,9 +5,7 @@ import com.earth2me.essentials.Mob; import com.earth2me.essentials.Mob.MobException; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; -import java.util.Locale; -import java.util.Random; -import java.util.Set; +import java.util.*; import org.bukkit.DyeColor; import org.bukkit.Location; import org.bukkit.Server; @@ -27,12 +25,13 @@ public class Commandspawnmob extends EssentialsCommand { if (args.length < 1) { - final Set availableList = Mob.getMobList(); - for (String mob : availableList) + final Set mobList = Mob.getMobList(); + final Set availableList = new HashSet(); + for (String mob : mobList) { - if (!user.isAuthorized("essentials.spawnmob." + mob.toLowerCase())) + if (user.isAuthorized("essentials.spawnmob." + mob.toLowerCase())) { - availableList.remove(mob); + availableList.add(mob); } } if (availableList.isEmpty()) -- cgit v1.2.3 From 1811631b93c5d1d2d731b5aced8b9e780b5b4fc4 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 00:08:37 +0000 Subject: Apply colors to group tags. --- Essentials/src/com/earth2me/essentials/commands/Commandlist.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java index 92833a66c..187e6c7e5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import com.earth2me.essentials.Util; import java.util.*; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -72,7 +73,7 @@ public class Commandlist extends EssentialsCommand for (String group : groups) { final StringBuilder groupString = new StringBuilder(); - groupString.append(group).append(": "); + groupString.append(Util.replaceColor(group)).append(": "); final List users = sort.get(group); Collections.sort(users); boolean first = true; -- cgit v1.2.3 From 8b7c5cf2eda4d501b7022b2cfc18b66cd7314014 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 00:19:40 +0000 Subject: Add listgroups as TL key --- Essentials/src/com/earth2me/essentials/commands/Commandlist.java | 2 +- Essentials/src/messages.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_nl.properties | 1 + 8 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java index 187e6c7e5..77788c7c2 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java @@ -73,7 +73,7 @@ public class Commandlist extends EssentialsCommand for (String group : groups) { final StringBuilder groupString = new StringBuilder(); - groupString.append(Util.replaceColor(group)).append(": "); + groupString.append(_("listGroupTag",Util.replaceColor(group))); final List users = sort.get(group); Collections.sort(users); boolean first = true; diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index d10ec0908..60b09b734 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Failed to load warp {0} localFormat=Local: <{0}> {1} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 9bb84edba..0b8671379 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Kaster lyn efter {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79Der er \u00a7c{0}\u00a79 ud af maksimum\u00a7c{1}\u00a79 spillere online. listAmountHidden = \u00a79Der er \u00a7c{0}\u00a77/{1}\u00a79 ud af maksimum \u00a7c{2}\u00a79 spillere online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Kunne ikke l\u00c3\u00a6se warp {0} localFormat=Local: <{0}> {1} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 944d5c7ef..fac736f2b 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Peinige {0} listAfkTag = \u00a77[Inaktiv]\u00a7f listAmount = \u00a79Es sind \u00a7c{0}\u00a79 von maximal \u00a7c{1}\u00a79 Spielern online. listAmountHidden = \u00a79Es sind \u00a7c{0}\u00a77/{1}\u00a79 von maximal \u00a7c{2}\u00a79 Spielern online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[Versteckt]\u00a7f loadWarpError=Fehler beim Laden von Warp-Punkt {0} localFormat=Lokal: <{0}> {1} diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index c38abd727..66f357022 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -408,3 +408,4 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. +listGroupTag={0}\u00a7f: diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 07a788eb5..fbaba1cac 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Golpeando a {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Error al cargar el tenetransporte {0} localFormat=Local: <{0}> {1} diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 8afe6cb0c..0473b3ce4 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77{0} a \u00e9t\u00e9 foudroy\u00e9. listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79Il y a \u00a7c{0}\u00a79 joueurs en ligne sur \u00a7c{1}\u00a79 au total. listAmountHidden = \u00a79Il y a \u00a7c{0}\u00a77/{1}\u00a79 sur un maximum de \u00a7c{2}\u00a79 joueurs en ligne. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[MASQU\u00c9]\u00a7f loadWarpError=\u00c9chec du chargement du point de t\u00e9l\u00e9portation {0}. localFormat=Locale : <{0}> {1} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index da88603d6..05a735949 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Brand {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Fout bij het laden van warp {0} localFormat=Local: <{0}> {1} -- cgit v1.2.3 From 68fbc4060541697e209852d3716bad47f41669fe Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 00:22:31 +0000 Subject: Fixing spawnmob count. --- Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 7c71c9576..8d716106f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -175,7 +175,7 @@ public class Commandspawnmob extends EssentialsCommand changeMobData(mobMount.getType(), spawnedMount, mountData, user); } } - user.sendMessage(args[1] + " " + mob.name.toLowerCase(Locale.ENGLISH) + mob.suffix + " " + _("spawned")); + user.sendMessage(mobCount + " " + mob.name.toLowerCase(Locale.ENGLISH) + mob.suffix + " " + _("spawned")); } catch (MobException e1) { -- cgit v1.2.3 From fabc1c3dd95ce18422f8896d90bc81ce600df965 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 00:39:37 +0000 Subject: Missed one. --- Essentials/src/messages_en.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 66f357022..d1499aad8 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Failed to load warp {0} localFormat=Local: <{0}> {1} @@ -408,4 +409,3 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. -listGroupTag={0}\u00a7f: -- cgit v1.2.3 From d31e434e4dd8f58ea1da760f931693342631565c Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 5 Mar 2012 18:28:04 +1100 Subject: Allow spamming of this, by reducing explosion damage to 0, same effect, no mess --- Essentials/src/com/earth2me/essentials/commands/Commandkittycannon.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkittycannon.java b/Essentials/src/com/earth2me/essentials/commands/Commandkittycannon.java index 3d9846923..9db608235 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkittycannon.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkittycannon.java @@ -37,7 +37,7 @@ public class Commandkittycannon extends EssentialsCommand { final Location loc = ocelot.getLocation(); ocelot.remove(); - loc.getWorld().createExplosion(loc, 1f); + loc.getWorld().createExplosion(loc, 0F); } }, 20); } -- cgit v1.2.3 From 0b60d4efe2fed324131e083f6d4168256d943588 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 5 Mar 2012 18:40:18 +1100 Subject: I dont think free noteblocks are a good idea --- Essentials/src/com/earth2me/essentials/commands/Commandessentials.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java index 56432a91f..ce2f03af9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java @@ -117,7 +117,7 @@ public class Commandessentials extends EssentialsCommand if (loc.getBlock().getTypeId() == 0) { noteBlocks.put(player, loc.getBlock()); - loc.getBlock().setType(Material.NOTE_BLOCK); + player.sendBlockChange(loc, Material.NOTE_BLOCK, (byte)0); } } taskid = ess.scheduleSyncRepeatingTask(new Runnable() @@ -149,7 +149,6 @@ public class Commandessentials extends EssentialsCommand } } }, 20, 2); - return; } private void stopTune() -- cgit v1.2.3 From cdf5d454839c73e5ff392ba041dbcec259d9b4e3 Mon Sep 17 00:00:00 2001 From: Iaccidentally Date: Thu, 1 Mar 2012 23:10:32 -0500 Subject: update messages.properties for the new bukkit download link (ci.bukkit,org no longer works) --- Essentials/src/messages.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index f7958319d..ad3ff11ac 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -294,7 +294,7 @@ requestDenied=\u00a77Teleport request denied. requestDeniedFrom=\u00a77{0} denied your teleport request. requestSent=\u00a77Request sent to {0}\u00a77. requestTimedOut=\u00a7cTeleport request has timed out -requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://ci.bukkit.org. +requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} second=second seconds=seconds -- cgit v1.2.3 From d27ff9abb6eb33b53f6c3c56d3dbff0346a024ee Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 16:29:06 +0000 Subject: Don't think we need animation event anymore. --- .../src/com/earth2me/essentials/EssentialsPlayerListener.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 9b964364b..ee247f465 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -277,13 +277,6 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.NORMAL) - public void onPlayerAnimation(final PlayerAnimationEvent event) - { - final User user = ess.getUser(event.getPlayer()); - user.updateActivity(true); - } - @EventHandler(priority = EventPriority.MONITOR) public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event) { -- cgit v1.2.3 From 016299a1ddf7dd3bd5cf5fe26a96ad9909e8b8e5 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 16:33:20 +0000 Subject: Shouldn't really be canceling events at priority monitor, oops. --- Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index ee247f465..0779c01ab 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -317,9 +317,11 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.NORMAL) public void onPlayerInteract(final PlayerInteractEvent event) { + final User user = ess.getUser(event.getPlayer()); + user.updateActivity(true); switch (event.getAction()) { case RIGHT_CLICK_BLOCK: @@ -334,7 +336,6 @@ public class EssentialsPlayerListener implements Listener break; case LEFT_CLICK_AIR: case LEFT_CLICK_BLOCK: - final User user = ess.getUser(event.getPlayer()); if (user.hasPowerTools() && user.arePowerToolsEnabled()) { if (usePowertools(user)) -- cgit v1.2.3 From 8450734cf115aa8ee11910705118799424791e40 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 16:54:12 +0000 Subject: Entity event cleanup --- .../essentials/EssentialsEntityListener.java | 89 ++++++++++------------ 1 file changed, 42 insertions(+), 47 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index e4879186d..45d78ebeb 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -24,48 +24,47 @@ public class EssentialsEntityListener implements Listener } @EventHandler(priority = EventPriority.LOWEST) - public void onEntityDamage(EntityDamageEvent event) + public void onEntityDamage(final EntityDamageByEntityEvent event) { - if (event instanceof EntityDamageByEntityEvent) + final Entity eAttack = event.getDamager(); + final Entity eDefend = event.getEntity(); + if (eDefend instanceof Player && eAttack instanceof Player) { - EntityDamageByEntityEvent edEvent = (EntityDamageByEntityEvent)event; - Entity eAttack = edEvent.getDamager(); - Entity eDefend = edEvent.getEntity(); - if (eDefend instanceof Player && eAttack instanceof Player) + final User defender = ess.getUser(eDefend); + final User attacker = ess.getUser(eAttack); + attacker.updateActivity(true); + final List commandList = attacker.getPowertool(attacker.getItemInHand()); + if (commandList != null && !commandList.isEmpty()) { - User defender = ess.getUser(eDefend); - User attacker = ess.getUser(eAttack); - attacker.updateActivity(true); - ItemStack is = attacker.getItemInHand(); - List commandList = attacker.getPowertool(is); - if (commandList != null && !commandList.isEmpty()) + for (String command : commandList) { - for (String command : commandList) + if (command != null && !command.isEmpty()) { - - if (command != null && !command.isEmpty()) - { - attacker.getServer().dispatchCommand(attacker, command.replaceAll("\\{player\\}", defender.getName())); - event.setCancelled(true); - return; - } + attacker.getServer().dispatchCommand(attacker, command.replaceAll("\\{player\\}", defender.getName())); + event.setCancelled(true); + return; } } } - if (eDefend instanceof Animals && eAttack instanceof Player) + } + else if (eDefend instanceof Animals && eAttack instanceof Player) + { + final User player = ess.getUser(eAttack); + final ItemStack hand = player.getItemInHand(); + if (hand != null && hand.getType() == Material.MILK_BUCKET) { - User player = ess.getUser(eAttack); - ItemStack hand = player.getItemInHand(); - if (hand != null && hand.getType() == Material.MILK_BUCKET) - { - ((Animals)eDefend).setAge(-24000); - hand.setType(Material.BUCKET); - player.setItemInHand(hand); - player.updateInventory(); - event.setCancelled(true); - } + ((Animals)eDefend).setAge(-24000); + hand.setType(Material.BUCKET); + player.setItemInHand(hand); + player.updateInventory(); + event.setCancelled(true); } } + } + + @EventHandler(priority = EventPriority.LOWEST) + public void onEntityDamage(final EntityDamageEvent event) + { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) { final Player player = (Player)event.getEntity(); @@ -76,7 +75,7 @@ public class EssentialsEntityListener implements Listener } @EventHandler(priority = EventPriority.LOWEST) - public void onEntityCombust(EntityCombustEvent event) + public void onEntityCombust(final EntityCombustEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) { @@ -85,26 +84,22 @@ public class EssentialsEntityListener implements Listener } @EventHandler(priority = EventPriority.LOWEST) - public void onEntityDeath(final EntityDeathEvent event) + public void onPlayerDeathEvent(final PlayerDeathEvent event) { - if (event instanceof PlayerDeathEvent) + final User user = ess.getUser(event.getEntity()); + if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back")) { - final PlayerDeathEvent pdevent = (PlayerDeathEvent)event; - final User user = ess.getUser(pdevent.getEntity()); - if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back")) - { - user.setLastLocation(); - user.sendMessage(_("backAfterDeath")); - } - if (!ess.getSettings().areDeathMessagesEnabled()) - { - pdevent.setDeathMessage(""); - } + user.setLastLocation(); + user.sendMessage(_("backAfterDeath")); + } + if (!ess.getSettings().areDeathMessagesEnabled()) + { + event.setDeathMessage(""); } } @EventHandler(priority = EventPriority.LOWEST) - public void onFoodLevelChange(FoodLevelChangeEvent event) + public void onFoodLevelChange(final FoodLevelChangeEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) { @@ -113,7 +108,7 @@ public class EssentialsEntityListener implements Listener } @EventHandler(priority = EventPriority.LOWEST) - public void onEntityRegainHealth(EntityRegainHealthEvent event) + public void onEntityRegainHealth(final EntityRegainHealthEvent event) { if (event.getRegainReason() == RegainReason.SATIATED && event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isAfk() && ess.getSettings().getFreezeAfkPlayers()) -- cgit v1.2.3 From eb74a1de9c1edfca947614759dff6d0e9889c945 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 17:03:34 +0000 Subject: Make the antioch message optional. --- .../src/com/earth2me/essentials/commands/Commandantioch.java | 7 +++++-- Essentials/src/plugin.yml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java index 54277d466..968d0012c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java @@ -17,8 +17,11 @@ public class Commandantioch extends EssentialsCommand @Override public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - ess.broadcastMessage(user, "...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,"); - ess.broadcastMessage(user, "who being naughty in My sight, shall snuff it."); + if (args.length > 0) + { + ess.broadcastMessage(user, "...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,"); + ess.broadcastMessage(user, "who being naughty in My sight, shall snuff it."); + } final Location loc = Util.getTarget(user); loc.getWorld().spawn(loc, TNTPrimed.class); diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 9165febb2..4931191d1 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -13,7 +13,7 @@ commands: aliases: [eafk] antioch: description: 'A little surprise for operators.' - usage: / + usage: / [message] aliases: [eantioch] back: description: Teleports you to your location prior to tp/spawn/warp. -- cgit v1.2.3 From a45c19a08ba657144d536725e3c33b319372d763 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 17:05:55 +0000 Subject: Extra command aliases --- Essentials/src/plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 4931191d1..343708b2f 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -14,7 +14,7 @@ commands: antioch: description: 'A little surprise for operators.' usage: / [message] - aliases: [eantioch] + aliases: [eantioch,grenade,tnt,egrenade,etnt] back: description: Teleports you to your location prior to tp/spawn/warp. usage: / -- cgit v1.2.3 From 3e3c7f0d545955912f925b08049adf38372e5472 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 2 Mar 2012 19:05:30 +0000 Subject: Only update displayname on world change, not every teleport. --- .../essentials/EssentialsPlayerListener.java | 15 +++++------ Essentials/src/com/earth2me/essentials/User.java | 29 +++++++++++----------- .../src/com/earth2me/essentials/UserData.java | 19 ++++++++++---- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 0779c01ab..1b9464da4 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -233,18 +233,13 @@ public class EssentialsPlayerListener implements Listener return; } - final User user = ess.getUser(event.getPlayer()); //There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports. if ((event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND) && ess.getSettings().registerBackInListener()) { + final User user = ess.getUser(event.getPlayer()); user.setLastLocation(); } - if (ess.getSettings().changeDisplayName()) - { - user.setDisplayNick(); - } - updateCompass(user); } @EventHandler(priority = EventPriority.HIGH) @@ -307,9 +302,15 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.MONITOR) public void onPlayerChangedWorld(final PlayerChangedWorldEvent event) { + final User user = ess.getUser(event.getPlayer()); + if (ess.getSettings().changeDisplayName()) + { + user.setDisplayNick(); + } + updateCompass(user); + if (ess.getSettings().getNoGodWorlds().contains(event.getPlayer().getLocation().getWorld().getName())) { - User user = ess.getUser(event.getPlayer()); if (user.isGodModeEnabledRaw()) { user.sendMessage(_("noGodWorldWarning")); diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index ba34548fe..125962da9 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -249,7 +249,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return teleportRequestHere; } - public String getNick(boolean addprefixsuffix) + public String getNick(final boolean addprefixsuffix) { final StringBuilder nickname = new StringBuilder(); final String nick = getNickname(); @@ -261,28 +261,28 @@ public class User extends UserData implements Comparable, IReplyTo, IUser { nickname.append(ess.getSettings().getNicknamePrefix()).append(nick); } - if (isOp()) + + if (addprefixsuffix && ess.getSettings().addPrefixSuffix()) { - try - { - nickname.insert(0, ess.getSettings().getOperatorColor().toString()); - nickname.append("§f"); - } - catch (Exception e) + if (isOp()) { + try + { + nickname.insert(0, ess.getSettings().getOperatorColor().toString()); + } + catch (Exception e) + { + } } - } - if (addprefixsuffix && ess.getSettings().addPrefixSuffix()) - { if (!ess.getSettings().disablePrefix()) { - final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName()); + final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§'); nickname.insert(0, prefix); } if (!ess.getSettings().disableSuffix()) { - final String suffix = ess.getPermissionsHandler().getSuffix(base).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName()); + final String suffix = ess.getPermissionsHandler().getSuffix(base).replace('&', '§'); nickname.append(suffix); if (suffix.length() < 2 || !suffix.substring(suffix.length() - 2, suffix.length() - 1).equals("§")) { @@ -330,6 +330,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return super.getDisplayName() == null ? super.getName() : super.getDisplayName(); } + @Override public Teleport getTeleport() { return teleport; @@ -385,7 +386,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser catch (Throwable ex) { } - } + } super.setMoney(value); Trade.log("Update", "Set", "API", getName(), new Trade(value, ess), null, null, null, ess); } diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index cda2fa511..1fdc98254 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -44,7 +44,7 @@ public abstract class UserData extends PlayerExtension implements IConf savedInventory = _getSavedInventory(); teleportEnabled = getTeleportEnabled(); ignoredPlayers = getIgnoredPlayers(); - godmode = getGodModeEnabled(); + godmode = _getGodModeEnabled(); muted = getMuted(); muteTimeout = _getMuteTimeout(); jailed = getJailed(); @@ -58,6 +58,7 @@ public abstract class UserData extends PlayerExtension implements IConf isNPC = _isNPC(); arePowerToolsEnabled = _arePowerToolsEnabled(); kitTimestamps = _getKitTimestamps(); + nickname = _getNickname(); } private double money; @@ -189,13 +190,21 @@ public abstract class UserData extends PlayerExtension implements IConf return false; } - public String getNickname() + private String nickname; + + public String _getNickname() { return config.getString("nickname"); } + + public String getNickname() + { + return nickname; + } public void setNickname(String nick) { + nickname = nick; config.setProperty("nickname", nick); config.save(); } @@ -515,7 +524,7 @@ public abstract class UserData extends PlayerExtension implements IConf } private boolean godmode; - private boolean getGodModeEnabled() + private boolean _getGodModeEnabled() { return config.getBoolean("godmode", false); } @@ -817,12 +826,12 @@ public abstract class UserData extends PlayerExtension implements IConf private Map _getKitTimestamps() { - + if (config.isConfigurationSection("timestamps.kits")) { return config.getConfigurationSection("timestamps.kits").getValues(false); } - return new HashMap(); + return new HashMap(); } public Long getKitTimestamp(final String name) -- cgit v1.2.3 From 7cb728b15fcf79d2d39c5f6749f6cb9209c4f635 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Mar 2012 05:09:03 +0000 Subject: I think switches are better. --- .../src/com/earth2me/essentials/EssentialsPlayerListener.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 1b9464da4..76668b615 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -182,10 +182,15 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.HIGH) public void onPlayerLogin(final PlayerLoginEvent event) { - if (event.getResult() != Result.ALLOWED && event.getResult() != Result.KICK_FULL && event.getResult() != Result.KICK_BANNED) - { - return; + switch (event.getResult()) { + case ALLOWED: + case KICK_FULL: + case KICK_BANNED: + break; + default: + return; } + User user = ess.getUser(event.getPlayer()); user.setNPC(false); -- cgit v1.2.3 From faba1e3604808a46c78bb74d8890351ab49ddb5a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Mar 2012 05:27:02 +0000 Subject: *make it look like i'm doing something* --- .../com/earth2me/essentials/EssentialsBlockListener.java | 2 +- .../com/earth2me/essentials/EssentialsPlayerListener.java | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java index 648bfcef5..f2e2e8a77 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java @@ -32,7 +32,7 @@ public class EssentialsBlockListener implements Listener { return; } - boolean unlimitedForUser = user.hasUnlimited(is); + final boolean unlimitedForUser = user.hasUnlimited(is); if (unlimitedForUser && user.getGameMode() == GameMode.SURVIVAL) { ess.scheduleSyncDelayedTask( diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 76668b615..7ab1847f1 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -182,15 +182,16 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.HIGH) public void onPlayerLogin(final PlayerLoginEvent event) { - switch (event.getResult()) { + switch (event.getResult()) + { case ALLOWED: case KICK_FULL: - case KICK_BANNED: + case KICK_BANNED: break; default: - return; + return; } - + User user = ess.getUser(event.getPlayer()); user.setNPC(false); @@ -199,7 +200,7 @@ public class EssentialsPlayerListener implements Listener user.checkMuteTimeout(currentTime); user.checkJailTimeout(currentTime); - if (banExpired == false && (user.isBanned() || event.getResult() == Result.KICK_BANNED)) + if (!banExpired && (user.isBanned() || event.getResult() == Result.KICK_BANNED)) { final String banReason = user.getBanReason(); event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : _("defaultBanReason")); @@ -291,7 +292,7 @@ public class EssentialsPlayerListener implements Listener { for (Player player : ess.getServer().getOnlinePlayers()) { - User spyer = ess.getUser(player); + final User spyer = ess.getUser(player); if (spyer.isSocialSpyEnabled() && !user.equals(spyer)) { player.sendMessage(user.getDisplayName() + " : " + event.getMessage()); @@ -400,7 +401,7 @@ public class EssentialsPlayerListener implements Listener } @EventHandler(priority = EventPriority.LOW) - public void onPlayerPickupItem(PlayerPickupItemEvent event) + public void onPlayerPickupItem(final PlayerPickupItemEvent event) { if (event.isCancelled() || !ess.getSettings().getDisableItemPickupWhileAfk()) { -- cgit v1.2.3 From 619e099a04a8453365121865cb587447be8174a2 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Mar 2012 07:03:54 +0000 Subject: Force all kits to lowercase. --- Essentials/src/com/earth2me/essentials/Kit.java | 8 +++-- .../src/com/earth2me/essentials/Settings.java | 41 +++++++++++++++------- 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index 88816368c..138a12979 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -60,11 +60,15 @@ public class Kit } } - public static List getItems(final User user, final Map els) throws Exception + public static List getItems(final User user, final Map kit) throws Exception { + if (kit == null) { + throw new Exception(_("kitError2")); + } + try { - return (List)els.get("items"); + return (List)kit.get("items"); } catch (Exception e) { diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 732b5485c..e3992e52c 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -13,6 +13,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.ChatColor; import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.MemoryConfiguration; import org.bukkit.event.EventPriority; import org.bukkit.inventory.ItemStack; @@ -208,18 +209,22 @@ public class Settings implements ISettings { return config.getDouble("heal-cooldown", 0); } + private ConfigurationSection kits; - @Override - public Map getKit(String name) + public ConfigurationSection _getKits() { - name = name.replace('.', '_').replace('/', '_'); if (config.isConfigurationSection("kits")) { - final ConfigurationSection kits = getKits(); - if (kits.isConfigurationSection(name)) + final ConfigurationSection section = config.getConfigurationSection("kits"); + final ConfigurationSection newSection = new MemoryConfiguration(); + for (String kitItem : section.getKeys(false)) { - return kits.getConfigurationSection(name).getValues(true); + if (section.isConfigurationSection(kitItem)) + { + newSection.set(kitItem.toLowerCase(Locale.ENGLISH), section.getConfigurationSection(kitItem)); + } } + return newSection; } return null; } @@ -227,9 +232,20 @@ public class Settings implements ISettings @Override public ConfigurationSection getKits() { + return kits; + } + + @Override + public Map getKit(String name) + { + name = name.replace('.', '_').replace('/', '_'); if (config.isConfigurationSection("kits")) { - return config.getConfigurationSection("kits"); + final ConfigurationSection kits = getKits(); + if (kits.isConfigurationSection(name)) + { + return kits.getConfigurationSection(name).getValues(true); + } } return null; } @@ -358,8 +374,9 @@ public class Settings implements ISettings { config.load(); noGodWorlds = new HashSet(config.getStringList("no-god-in-worlds")); - enabledSigns = getEnabledSigns(); - itemSpawnBl = getItemSpawnBlacklist(); + enabledSigns = _getEnabledSigns(); + itemSpawnBl = _getItemSpawnBlacklist(); + kits = _getKits(); chatFormats.clear(); } private List itemSpawnBl = new ArrayList(); @@ -370,7 +387,7 @@ public class Settings implements ISettings return itemSpawnBl; } - private List getItemSpawnBlacklist() + private List _getItemSpawnBlacklist() { final List epItemSpwn = new ArrayList(); if (ess.getItemDb() == null) @@ -405,7 +422,7 @@ public class Settings implements ISettings return enabledSigns; } - private List getEnabledSigns() + private List _getEnabledSigns() { List newSigns = new ArrayList(); @@ -559,7 +576,7 @@ public class Settings implements ISettings { return config.getBoolean("economy-log-enabled", false); } - + @Override public boolean isEcoLogUpdateEnabled() { -- cgit v1.2.3 From caf598f55b271cf1e009c8073cb4d13538559a73 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Mar 2012 07:09:41 +0000 Subject: Capital case for formatting. --- Essentials/src/com/earth2me/essentials/Kit.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index 138a12979..47e5e6ac2 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -1,6 +1,7 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; +import static com.earth2me.essentials.I18n.capitalCase; import com.earth2me.essentials.commands.NoChargeException; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import java.util.*; @@ -22,7 +23,7 @@ public class Kit { if (user.isAuthorized("essentials.kit." + kiteItem.toLowerCase(Locale.ENGLISH))) { - list.append(" ").append(kiteItem); + list.append(" ").append(capitalCase(kiteItem)); } } return list.toString().trim(); -- cgit v1.2.3 From e6736e48a5da9a3dd8480fef3640eae85f4b13ce Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Sat, 3 Mar 2012 18:07:43 +1100 Subject: Cleanup Signed-off-by: Chris Ward --- .../src/com/earth2me/essentials/commands/Commandessentials.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java index 14bbf5e02..0f390f4e0 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java @@ -35,6 +35,10 @@ public class Commandessentials extends EssentialsCommand { run_nya(server, sender, commandLabel, args); } + else if (args[0].equalsIgnoreCase("moo")) + { + run_moo(server, sender, commandLabel, args); + } else { run_reload(server, sender, commandLabel, args); } @@ -159,4 +163,9 @@ public class Commandessentials extends EssentialsCommand } noteBlocks.clear(); } + + private void run_moo(final Server server, final CommandSender sender, final String command, final String args[]) + { + sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | ||", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } ); + } } -- cgit v1.2.3 From 873c9880dd361e1edae6e0ecca745e1592cafc67 Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Sat, 3 Mar 2012 19:21:27 +1100 Subject: Cleanup Signed-off-by: Chris Ward --- .../src/com/earth2me/essentials/commands/Commandessentials.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java index 0f390f4e0..56432a91f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java @@ -9,6 +9,7 @@ import org.bukkit.Material; import org.bukkit.Server; import org.bukkit.block.Block; import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; @@ -166,6 +167,9 @@ public class Commandessentials extends EssentialsCommand private void run_moo(final Server server, final CommandSender sender, final String command, final String args[]) { - sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | ||", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } ); + if(sender instanceof ConsoleCommandSender) + sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | ||", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } ); + else + sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | | |", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } ); } } -- cgit v1.2.3 From b512a243e71034dc56ecdc37281d18e39b21109f Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 4 Mar 2012 15:43:00 +1100 Subject: Fix op colours, which KHobbits broke! --- Essentials/src/com/earth2me/essentials/User.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 125962da9..f89f1a5ad 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -262,19 +262,19 @@ public class User extends UserData implements Comparable, IReplyTo, IUser nickname.append(ess.getSettings().getNicknamePrefix()).append(nick); } - if (addprefixsuffix && ess.getSettings().addPrefixSuffix()) + if (isOp()) { - if (isOp()) + try { - try - { - nickname.insert(0, ess.getSettings().getOperatorColor().toString()); - } - catch (Exception e) - { - } + nickname.insert(0, ess.getSettings().getOperatorColor().toString()); + nickname.append("§f"); } - + catch (Exception e) + { + } + } + if (addprefixsuffix && ess.getSettings().addPrefixSuffix()) + { if (!ess.getSettings().disablePrefix()) { final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§'); -- cgit v1.2.3 From e28f1b1be3bf9a44a0eb4c4116a9a166cec7be20 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 08:18:25 +0000 Subject: Half-revert double backflip. 10 points. (op prefix changes that md-5 broke, thinking I broke op prefixes) --- Essentials/src/com/earth2me/essentials/User.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index f89f1a5ad..092b61880 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -262,12 +262,15 @@ public class User extends UserData implements Comparable, IReplyTo, IUser nickname.append(ess.getSettings().getNicknamePrefix()).append(nick); } - if (isOp()) + if (addprefixsuffix && isOp()) { try { - nickname.insert(0, ess.getSettings().getOperatorColor().toString()); - nickname.append("§f"); + final String opPrefix = ess.getSettings().getOperatorColor().toString(); + if (opPrefix.length() > 0) { + nickname.insert(0, opPrefix); + nickname.append("§f"); + } } catch (Exception e) { -- cgit v1.2.3 From b16a1f7237f58a3c7728bc238923fb90e218659e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 09:20:03 +0000 Subject: Adding option to modify all users balances (including offline) /eco reset ** --- .../earth2me/essentials/commands/Commandeco.java | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java index b9694ee49..dd6d6ad0d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java @@ -34,7 +34,31 @@ public class Commandeco extends EssentialsCommand throw new NotEnoughArgumentsException(ex); } - if (args[1].contentEquals("*")) + if (args[1].contentEquals("**")) + { + for (String sUser : ess.getUserMap().getAllUniqueUsers()) + { + final User player = ess.getUser(sUser); + switch (cmd) + { + case GIVE: + player.giveMoney(amount); + break; + + case TAKE: + if (player.canAfford(amount, false)) + { + player.takeMoney(amount); + } + break; + + case RESET: + player.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount); + break; + } + } + } + else if (args[1].contentEquals("*")) { for (Player onlinePlayer : server.getOnlinePlayers()) { -- cgit v1.2.3 From cbfb52419577fffca58c8e334a6c8b8caa1961f6 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 10:11:58 +0000 Subject: Allow more currency customization. Added currency key to messages. --- Essentials/src/com/earth2me/essentials/User.java | 12 ++-- Essentials/src/com/earth2me/essentials/Util.java | 16 ++++- .../src/com/earth2me/essentials/api/Economy.java | 2 +- .../essentials/commands/Commandbalance.java | 4 +- .../essentials/commands/Commandbalancetop.java | 4 +- .../earth2me/essentials/commands/Commandsell.java | 4 +- .../earth2me/essentials/commands/Commandwhois.java | 2 +- .../earth2me/essentials/commands/Commandworth.java | 16 ++--- .../earth2me/essentials/signs/EssentialsSign.java | 2 +- .../com/earth2me/essentials/signs/SignTrade.java | 8 +-- Essentials/src/messages.properties | 75 +++++++++++----------- Essentials/src/messages_da.properties | 75 +++++++++++----------- Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 75 +++++++++++----------- Essentials/src/messages_es.properties | 75 +++++++++++----------- Essentials/src/messages_fr.properties | 75 +++++++++++----------- Essentials/src/messages_nl.properties | 75 +++++++++++----------- 17 files changed, 269 insertions(+), 252 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 092b61880..b02a70a03 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -105,10 +105,10 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return; } setMoney(getMoney() + value); - sendMessage(_("addedToAccount", Util.formatCurrency(value, ess))); + sendMessage(_("addedToAccount", Util.displayCurrency(value, ess))); if (initiator != null) { - initiator.sendMessage(_("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName(), Util.formatCurrency(getMoney(), ess))); + initiator.sendMessage(_("addedToOthersAccount", Util.displayCurrency(value, ess), this.getDisplayName(), Util.displayCurrency(getMoney(), ess))); } } @@ -122,8 +122,8 @@ public class User extends UserData implements Comparable, IReplyTo, IUser { setMoney(getMoney() - value); reciever.setMoney(reciever.getMoney() + value); - sendMessage(_("moneySentTo", Util.formatCurrency(value, ess), reciever.getDisplayName())); - reciever.sendMessage(_("moneyRecievedFrom", Util.formatCurrency(value, ess), getDisplayName())); + sendMessage(_("moneySentTo", Util.displayCurrency(value, ess), reciever.getDisplayName())); + reciever.sendMessage(_("moneyRecievedFrom", Util.displayCurrency(value, ess), getDisplayName())); } else { @@ -144,10 +144,10 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return; } setMoney(getMoney() - value); - sendMessage(_("takenFromAccount", Util.formatCurrency(value, ess))); + sendMessage(_("takenFromAccount", Util.displayCurrency(value, ess))); if (initiator != null) { - initiator.sendMessage(_("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName(), Util.formatCurrency(getMoney(), ess))); + initiator.sendMessage(_("takenFromOthersAccount", Util.displayCurrency(value, ess), this.getDisplayName(), Util.displayCurrency(getMoney(), ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 3e3a7efd0..51e80fc5b 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -422,11 +422,11 @@ public class Util } return is; } - private static DecimalFormat df = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US)); + private static DecimalFormat dFormat = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US)); - public static String formatCurrency(final double value, final IEssentials ess) + public static String formatAsCurrency(final double value) { - String str = ess.getSettings().getCurrencySymbol() + df.format(value); + String str = dFormat.format(value); if (str.endsWith(".00")) { str = str.substring(0, str.length() - 3); @@ -434,6 +434,16 @@ public class Util return str; } + public static String displayCurrency(final double value, final IEssentials ess) + { + return _("currency", ess.getSettings().getCurrencySymbol(), formatAsCurrency(value)); + } + + public static String shortCurrency(final double value, final IEssentials ess) + { + return ess.getSettings().getCurrencySymbol() + formatAsCurrency(value); + } + public static double roundDouble(final double d) { return Math.round(d * 100.0) / 100.0; diff --git a/Essentials/src/com/earth2me/essentials/api/Economy.java b/Essentials/src/com/earth2me/essentials/api/Economy.java index a1d421c38..6ed1829b3 100644 --- a/Essentials/src/com/earth2me/essentials/api/Economy.java +++ b/Essentials/src/com/earth2me/essentials/api/Economy.java @@ -249,7 +249,7 @@ public final class Economy { throw new RuntimeException(noCallBeforeLoad); } - return Util.formatCurrency(amount, ess); + return Util.displayCurrency(amount, ess); } /** diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java index 58f164ad6..15c3c9088 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java @@ -21,7 +21,7 @@ public class Commandbalance extends EssentialsCommand { throw new NotEnoughArgumentsException(); } - sender.sendMessage(_("balance", Util.formatCurrency(getPlayer(server, args, 0, true).getMoney(), ess))); + sender.sendMessage(_("balance", Util.displayCurrency(getPlayer(server, args, 0, true).getMoney(), ess))); } @Override @@ -32,6 +32,6 @@ public class Commandbalance extends EssentialsCommand || user.isAuthorized("essentials.balance.other")) ? user : getPlayer(server, args, 0, true)).getMoney(); - user.sendMessage(_("balance", Util.formatCurrency(bal, ess))); + user.sendMessage(_("balance", Util.displayCurrency(bal, ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java index fffb69ea4..6c5e96b9f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java @@ -130,11 +130,11 @@ public class Commandbalancetop extends EssentialsCommand } }); - cache.getLines().add(_("serverTotal", Util.formatCurrency(totalMoney, ess))); + cache.getLines().add(_("serverTotal", Util.displayCurrency(totalMoney, ess))); int pos = 1; for (Map.Entry entry : sortedEntries) { - cache.getLines().add(pos + ". " + entry.getKey() + ", " + Util.formatCurrency(entry.getValue(), ess)); + cache.getLines().add(pos + ". " + entry.getKey() + ", " + Util.displayCurrency(entry.getValue(), ess)); pos++; } cacheage = System.currentTimeMillis(); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java index d59c09b1e..5958a5c0f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java @@ -160,8 +160,8 @@ public class Commandsell extends EssentialsCommand user.updateInventory(); Trade.log("Command", "Sell", "Item", user.getName(), new Trade(ris, ess), user.getName(), new Trade(worth * amount, ess), user.getLocation(), ess); user.giveMoney(worth * amount); - user.sendMessage(_("itemSold", Util.formatCurrency(worth * amount, ess), amount, is.getType().toString().toLowerCase(Locale.ENGLISH), Util.formatCurrency(worth, ess))); - logger.log(Level.INFO, _("itemSoldConsole", user.getDisplayName(), is.getType().toString().toLowerCase(Locale.ENGLISH), Util.formatCurrency(worth * amount, ess), amount, Util.formatCurrency(worth, ess))); + user.sendMessage(_("itemSold", Util.displayCurrency(worth * amount, ess), amount, is.getType().toString().toLowerCase(Locale.ENGLISH), Util.displayCurrency(worth, ess))); + logger.log(Level.INFO, _("itemSoldConsole", user.getDisplayName(), is.getType().toString().toLowerCase(Locale.ENGLISH), Util.displayCurrency(worth * amount, ess), amount, Util.displayCurrency(worth, ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java index 7e211455e..d068aac9a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java @@ -60,7 +60,7 @@ public class Commandwhois extends EssentialsCommand sender.sendMessage(_("whoisLocation", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ())); if (!ess.getSettings().isEcoDisabled()) { - sender.sendMessage(_("whoisMoney", Util.formatCurrency(user.getMoney(), ess))); + sender.sendMessage(_("whoisMoney", Util.displayCurrency(user.getMoney(), ess))); } sender.sendMessage(user.isAfk() ? _("whoisStatusAway") diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandworth.java b/Essentials/src/com/earth2me/essentials/commands/Commandworth.java index 586b31873..c8573ba25 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandworth.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandworth.java @@ -51,14 +51,14 @@ public class Commandworth extends EssentialsCommand ? _("worthMeta", iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), iStack.getDurability(), - Util.formatCurrency(worth * amount, ess), + Util.displayCurrency(worth * amount, ess), amount, - Util.formatCurrency(worth, ess)) + Util.displayCurrency(worth, ess)) : _("worth", iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), - Util.formatCurrency(worth * amount, ess), + Util.displayCurrency(worth * amount, ess), amount, - Util.formatCurrency(worth, ess))); + Util.displayCurrency(worth, ess))); } @Override @@ -95,14 +95,14 @@ public class Commandworth extends EssentialsCommand ? _("worthMeta", iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), iStack.getDurability(), - Util.formatCurrency(worth * amount, ess), + Util.displayCurrency(worth * amount, ess), amount, - Util.formatCurrency(worth, ess)) + Util.displayCurrency(worth, ess)) : _("worth", iStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), - Util.formatCurrency(worth * amount, ess), + Util.displayCurrency(worth * amount, ess), amount, - Util.formatCurrency(worth, ess))); + Util.displayCurrency(worth, ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java index b0df73a42..21e70516e 100644 --- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java +++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java @@ -266,7 +266,7 @@ public class EssentialsSign final Double money = trade.getMoney(); if (money != null) { - sign.setLine(index, Util.formatCurrency(money, ess)); + sign.setLine(index, Util.shortCurrency(money, ess)); } } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java index 6b47ebc76..6ea4f5e80 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java @@ -135,11 +135,11 @@ public class SignTrade extends EssentialsSign final Double money = getMoney(split[0]); if (money != null) { - if (Util.formatCurrency(money, ess).length() * 2 > 15) + if (Util.shortCurrency(money, ess).length() * 2 > 15) { throw new SignException("Line can be too long!"); } - sign.setLine(index, Util.formatCurrency(money, ess) + ":0"); + sign.setLine(index, Util.shortCurrency(money, ess) + ":0"); return; } } @@ -155,7 +155,7 @@ public class SignTrade extends EssentialsSign { throw new SignException(_("moreThanZero")); } - sign.setLine(index, Util.formatCurrency(money, ess) + ":" + Util.formatCurrency(amount, ess).substring(1)); + sign.setLine(index, Util.shortCurrency(money, ess) + ":" + Util.shortCurrency(amount, ess).substring(1)); return; } } @@ -313,7 +313,7 @@ public class SignTrade extends EssentialsSign final Double amount = getDouble(split[1]); if (money != null && amount != null) { - final String newline = Util.formatCurrency(money, ess) + ":" + Util.formatCurrency(amount + value, ess).substring(1); + final String newline = Util.shortCurrency(money, ess) + ":" + Util.shortCurrency(amount + value, ess).substring(1); if (newline.length() > 15) { throw new SignException("This sign is full: Line too long!"); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index ad3ff11ac..d10ec0908 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -11,9 +11,9 @@ alertPlaced=placed: alertUsed=used: autoAfkKickReason=You have been kicked for idling more than {0} minutes. backAfterDeath=\u00a77Use the /back command to return to your death point. +backUsageMsg=\u00a77Returning to previous location. backupFinished=Backup finished backupStarted=Backup started -backUsageMsg=\u00a77Returning to previous location. balance=\u00a77Balance: {0} balanceTop=\u00a77Top balances ({0}) banExempt=\u00a7cYou can not ban that player. @@ -49,6 +49,7 @@ couldNotFindTemplate=Could not find template {0} creatingConfigFromTemplate=Creating config from template: {0} creatingEmptyConfig=Creating empty config: {0} creative=creative +currency={0}{1} day=day days=days defaultBanReason=The Ban Hammer has spoken! @@ -64,14 +65,14 @@ depth=\u00a77You are at sea level. depthAboveSea=\u00a77You are {0} block(s) above sea level. depthBelowSea=\u00a77You are {0} block(s) below sea level. destinationNotSet=Destination not set +disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}. disabled=disabled disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}. dontMoveMessage=\u00a77Teleportation will commence in {0}. Don''t move. downloadingGeoIp=Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB) duplicatedUserdata=Duplicated userdata: {0} and {1} -enabled=enabled enableUnlimited=\u00a77Giving unlimited amount of {0} to {1}. +enabled=enabled enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. enchantmentNotFound = \u00a7cEnchantment not found enchantmentPerm = \u00a7cYou do not have the permission for {0} @@ -99,9 +100,9 @@ gcentities= entities gcfree=Free memory: {0} MB gcmax=Maximum memory: {0} MB gctotal=Allocated memory: {0} MB -geoipJoinFormat=Player {0} comes from {1} geoIpUrlEmpty=GeoIP download url is empty. geoIpUrlInvalid=GeoIP download url is invalid. +geoipJoinFormat=Player {0} comes from {1} godDisabledFor=disabled for {0} godEnabledFor=enabled for {0} godMode=\u00a77God mode {0}. @@ -112,9 +113,9 @@ helpConsole=To view help from the console, type ?. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: holeInFloor=Hole in floor -homes=Homes: {0} homeSet=\u00a77Home set. homeSetToBed=\u00a77Your home is now set to this bed. +homes=Homes: {0} hour=hour hours=hours ignorePlayer=You ignore player {0} from now on. @@ -124,28 +125,28 @@ infoChapterPages=Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=File info.txt does not exist. Creating one for you. infoPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: infoUnknownChapter=Unknown chapter. +invBigger=The other users inventory is bigger than yours. +invRestored=Your inventory has been restored. +invSee=You see the inventory of {0}. +invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. invalidWorld=\u00a7cInvalid world. -invBigger=The other users inventory is bigger than yours. inventoryCleared=\u00a77Inventory Cleared. inventoryClearedOthers=\u00a77Inventory of \u00a7c{0}\u00a77 cleared. -invRestored=Your inventory has been restored. -invSee=You see the inventory of {0}. -invSeeHelp=Use /invsee to restore your inventory. is=is itemCannotBeSold=That item cannot be sold to the server. itemMustBeStacked=Item must be traded in stacks. A quantity of 2s would be two stacks, etc. itemNotEnough1=\u00a7cYou do not have enough of that item to sell. itemNotEnough2=\u00a77If you meant to sell all of your items of that type, use /sell itemname itemNotEnough3=\u00a77/sell itemname -1 will sell all but one item, etc. -itemsCsvNotLoaded=Could not load items.csv. itemSellAir=You really tried to sell Air? Put an item in your hand. itemSold=\u00a77Sold for \u00a7c{0} \u00a77({1} {2} at {3} each) itemSoldConsole={0} sold {1} for \u00a77{2} \u00a77({3} items at {4} each) itemSpawn=\u00a77Giving {0} of {1} +itemsCsvNotLoaded=Could not load items.csv. jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0} jailMessage=\u00a7cYou do the crime, you do the time. jailNotExist=That jail does not exist. @@ -162,8 +163,8 @@ kitError=\u00a7cThere are no valid kits. kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration? kitGive=\u00a77Giving kit {0}. kitInvFull=\u00a7cYour inventory was full, placing kit on the floor -kits=\u00a77Kits: {0} kitTimed=\u00a7cYou can''t use that kit again for another {0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77You have just been smited lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cTo mark your mail as read, type /mail clear mailCleared=\u00a77Mail Cleared! mailSent=\u00a77Mail sent! +markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear markedAsAway=\u00a77You are now marked as away. markedAsNotAway=\u00a77You are no longer marked as away. -markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear maxHomes=You cannot set more than {0} homes. mayNotJail=\u00a7cYou may not jail that person me=me @@ -185,10 +186,10 @@ minute=minute minutes=minutes missingItems=You do not have {0}x {1}. missingPrefixSuffix=Missing a prefix or suffix for {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Error while changing mob spawner. mobSpawnLimit=Mob quantity limited to server limit mobSpawnTarget=Target block must be a mob spawner. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} has been received from {1} moneySentTo=\u00a7a{0} has been sent to {1} moneyTaken={0} taken from your bank account. @@ -196,10 +197,10 @@ month=month months=months moreThanZero=Quantities must be greater than 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cYou may not mute that player. mutedPlayer=Player {0} muted. mutedPlayerFor=Player {0} muted for {1}. mutedUserSpeaks={0} tried to speak, but is muted. -muteExempt=\u00a7cYou may not mute that player. nearbyPlayers=Players nearby: {0} needTpohere=You need access to /tpohere to teleport other players. negativeBalanceError=User is not allowed to have a negative balance. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit noKits=\u00a77There are no kits available yet noMail=You do not have any mail noMotd=\u00a7cThere is no message of the day. -none=none noNewMail=\u00a77You have no new mail. noPendingRequest=You do not have a pending request. noPerm=\u00a7cYou do not have the \u00a7f{0}\u00a7c permission. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. noPlacePermission=\u00a7cYou do not have permission to place a block near that sign. noPowerTools=You have no power tools assigned. noRules=\u00a7cThere are no rules specified yet. +noWarpsDefined=No warps defined +none=none notAllowedToQuestion=\u00a7cYou are not authorized to use question. notAllowedToShout=\u00a7cYou are not authorized to shout. notEnoughExperience=You do not have enough experience. notEnoughMoney=You do not have sufficient funds. -nothingInHand = \u00a7cYou have nothing in your hand. notRecommendedBukkit= * ! * Bukkit version is not the recommended build for Essentials. notSupportedYet=Not supported yet. +nothingInHand = \u00a7cYou have nothing in your hand. now=now -noWarpsDefined=No warps defined nuke=May death rain upon them numberRequired=A number goes there, silly. onlyDayNight=/time only supports day/night. onlyPlayers=Only in-game players can use {0}. onlySunStorm=/weather only supports sun/storm. orderBalances=Ordering balances of {0} users, please wait ... +pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. +pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. +pTimePlayers=These players have their own time: +pTimeReset=Player time has been reset for: \u00a7e{0} +pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} +pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} parseError=Error parsing {0} on line {1} pendingTeleportCancelled=\u00a7cPending teleportation request cancelled. permissionsError=Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled. @@ -271,14 +280,6 @@ powerToolRemoveAll=All commands removed from {0}. powerToolsDisabled=All of your power tools have been disabled. powerToolsEnabled=All of your power tools have been enabled. protectionOwner=\u00a76[EssentialsProtect] Protection owner: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. -pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. -pTimePlayers=These players have their own time: -pTimeReset=Player time has been reset for: \u00a7e{0} -pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} -pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Question]\u00a7f {0} readNextPage=Type /{0} {1} to read the next page reloadAllPlugins=\u00a77Reloaded all plugins. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74You are not allowed to create sign here. similarWarpExist=A warp with a similar name already exists. slimeMalformedSize=Malformed size. soloMob=That mob likes to be alone -spawned=spawned spawnSet=\u00a77Spawn location set for group {0}. +spawned=spawned suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} has been taken from your account. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... -teleportationCommencing=\u00a77Teleportation commencing... -teleportationDisabled=\u00a77Teleportation disabled. -teleportationEnabled=\u00a77Teleportation enabled. teleportAtoB=\u00a77{0}\u00a77 teleported you to {1}\u00a77. teleportDisabled={0} has teleportation disabled. teleportHereRequest=\u00a7c{0}\u00a7c has requested that you teleport to them. -teleporting=\u00a77Teleporting... -teleportingPortal=\u00a77Teleporting via portal. teleportNewPlayerError=Failed to teleport new player teleportRequest=\u00a7c{0}\u00a7c has requested to teleport to you. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Teleporting to top. -tempbanExempt=\u00a77You may not tempban that player +teleportationCommencing=\u00a77Teleportation commencing... +teleportationDisabled=\u00a77Teleportation disabled. +teleportationEnabled=\u00a77Teleportation enabled. +teleporting=\u00a77Teleporting... +teleportingPortal=\u00a77Teleporting via portal. tempBanned=Temporarily banned from server for {0} +tempbanExempt=\u00a77You may not tempban that player thunder= You {0} thunder in your world thunderDuration=You {0} thunder in your world for {1} seconds. timeBeforeHeal=Time before next heal: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}. unlimitedItems=Unlimited items: unmutedPlayer=Player {0} unmuted. upgradingFilesError=Error while upgrading the files -userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} -userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp userDoesNotExist=The user {0} does not exist. userIsAway={0} is now AFK userIsNotAway={0} is no longer AFK userJailed=\u00a77You have been jailed userUsedPortal={0} used an existing exit portal. +userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} +userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp usingTempFolderForTesting=Using temp folder for testing: versionMismatch=Version mismatch! Please update {0} to the same version. versionMismatchAll=Version mismatch! Please update all Essentials jars to the same version. voiceSilenced=\u00a77Your voice has been silenced warpDeleteError=Problem deleting the warp file. -warpingTo=\u00a77Warping to {0}. warpListPermission=\u00a7cYou do not have Permission to list warps. warpNotExist=That warp does not exist. -warps=Warps: {0} -warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. warpSet=\u00a77Warp {0} set. warpUsePermission=\u00a7cYou do not have Permission to use that warp. +warpingTo=\u00a77Warping to {0}. +warps=Warps: {0} +warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. weatherStorm=\u00a77You set the weather to storm in {0} weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds weatherSun=\u00a77You set the weather to sun in {0} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 0d8260947..9bb84edba 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -11,9 +11,9 @@ alertPlaced=placerede: alertUsed=brugte: autoAfkKickReason=Du er blevet kicked for at idle mere end {0} minutter. backAfterDeath=\u00a77Brug /back kommandoen for at teleportere til dit d\u00f8dspunkt. +backUsageMsg=\u00a77Teleporterer til tidligere placering. backupFinished=Backup sluttet backupStarted=Backup startet -backUsageMsg=\u00a77Teleporterer til tidligere placering. balance=\u00a77Saldo: {0} balanceTop=\u00a77Top saldoer ({0}) banExempt=\u00a7cDu kan ikke banne den p\u00e5g\u00e6ldende spiller. @@ -49,6 +49,7 @@ couldNotFindTemplate=Kunne ikke finde skabelon {0} creatingConfigFromTemplate=Opretter config fra skabelon: {0} creatingEmptyConfig=Opretter tom config: {0} creative=creative +currency={0}{1} day=dag days=dage defaultBanReason=Banhammeren har talt! @@ -64,14 +65,14 @@ depth=\u00a77Du er ved havoverfladen. depthAboveSea=\u00a77Du er {0} blok(ke) over havets overflade. depthBelowSea=\u00a77Du er {0} blok(ke) under havets overflade. destinationNotSet=Destination ikke sat +disableUnlimited=\u00a77Deaktiverede ubergr\u00e6nset placering af {0} for {1}. disabled=deaktiveret disabledToSpawnMob=Skabelse af denne mob er deaktiveret i configfilen. -disableUnlimited=\u00a77Deaktiverede ubergr\u00e6nset placering af {0} for {1}. dontMoveMessage=\u00a77Teleportering vil begynde om {0}. Bev\u00e6g dig ikke. downloadingGeoIp=Downloader GeoIP database... det her kan tage et stykke tid (land: 0.6 MB, by: 27MB) duplicatedUserdata=Duplikerede userdata: {0} og {1} -enabled=aktiveret enableUnlimited=\u00a77Giver ubegr\u00e6nset m\u00e6ngde af {0} til {1}. +enabled=aktiveret enchantmentApplied = \u00a77Enchantment {0} er blevet tilf\u00c3\u00b8jet til tingen i din h\u00c3\u00a5nd. enchantmentNotFound = \u00a7cEnchantment ikke fundet. enchantmentPerm = \u00a7cDu har ikke tilladelse til at {0} @@ -99,9 +100,9 @@ gcentities= entities gcfree=Free memory: {0} MB gcmax=Maximum memory: {0} MB gctotal=Allocated memory: {0} MB -geoipJoinFormat=Spilleren {0} kommer fra {1} geoIpUrlEmpty=GeoIP download url er tom. geoIpUrlInvalid=GeoIP download url er ugyldig. +geoipJoinFormat=Spilleren {0} kommer fra {1} godDisabledFor=deaktiveret for {0} godEnabledFor=aktiveret for {0} godMode=\u00a77Gud mode {0}. @@ -112,9 +113,9 @@ helpConsole=For at se hj\u00e6lp fra konsolen, skriv ?. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f: holeInFloor=Hul i gulv -homes=Hjem: {0} homeSet=\u00a77Hjem sat. homeSetToBed=\u00a77Dit hjem er nu sat til denne seng. +homes=Hjem: {0} hour=time hours=timer ignorePlayer=Du ignorerer spiller {0} fra nu af. @@ -124,28 +125,28 @@ infoChapterPages=Kapitel {0}, side \u00a7c{1}\u00a7f af \u00a7c{2}\u00a7f: infoFileDoesNotExist=Fil info.txt eksisterer ikke. Fixer liiige en for dig. infoPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f: infoUnknownChapter=Ukendt kapitel. +invBigger=Den anden brugers inventory er st\u00f8rre end din. +invRestored=Din inventory er blevet genoprettet. +invSee=Du ser {0}''s inventory. +invSeeHelp=Brug /invsee for at genoprette din inventory. invalidCharge=\u00a7cUgyldig opladning (korrekt oversat?). invalidMob=Ugyldig mob type. invalidServer=Ugyldig server! invalidSignLine=Linje {0} p\u00e5 skilt er ugyldig. invalidWorld=\u00a7cUgyldig verden. -invBigger=Den anden brugers inventory er st\u00f8rre end din. inventoryCleared=\u00a77Inventory ryddet. inventoryClearedOthers=\u00a7c{0}\u00a77''s inventory ryddet. -invRestored=Din inventory er blevet genoprettet. -invSee=Du ser {0}''s inventory. -invSeeHelp=Brug /invsee for at genoprette din inventory. is=er itemCannotBeSold=Denne ting kan ikke s\u00e6lges til serveren. itemMustBeStacked=Tingen skal handles i stakke. En m\u00e6ngde af 2s ville v\u00e6re to stakke, osv. itemNotEnough1=\u00a7cDu har ikke nok af denne ting til at kunne s\u00e6lge. itemNotEnough2=\u00a77Hvis du mente, at du ville s\u00c3\u00a6lge alle ting af den type, brug da /sell tingens-navn itemNotEnough3=\u00a77/sell ting-navn -1 vil s\u00e6lge alle enheder, undtagen \u00c3\u00a9n, osv. -itemsCsvNotLoaded=Kunne ikke loade items.csv. itemSellAir=Fors\u00f8gte du virkelig at s\u00e6lge luft? Kom en ting i h\u00e5nden, hattemand. itemSold=\u00a77Solgte til \u00a7c{0} \u00a77({1} {2} ting for {3} pr. stk.) itemSoldConsole={0} solgte {1} til \u00a77{2} \u00a77({3} ting for {4} pr. stk.) itemSpawn=\u00a77Giver {0} af {1} +itemsCsvNotLoaded=Kunne ikke loade items.csv. jailAlreadyIncarcerated=\u00a7cSpilleren er allerede i f\u00c3\u00a6ngsel: {0} jailMessage=\u00a7cDu bryder reglerne, du tager straffen. jailNotExist=Det f\u00e6ngsel eksisterer ikke. @@ -162,8 +163,8 @@ kitError=\u00a7cDer er ikke nogen gyldige kits. kitErrorHelp=\u00a7cM\u00e5ske mangler en ting en m\u00e6ngde i konfigurationen? Eller m\u00c3\u00a5ske er der nisser p\u00c3\u00a5 spil? kitGive=\u00a77Giver kit til {0} (oversat korrekt?). kitInvFull=\u00a7cDin inventory er fuld, placerer kit p\u00e5 gulvet. -kits=\u00a77Kits: {0} kitTimed=\u00a7cDu kan ikke benytte dette kit igen i {0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77Du er blevet ramt af Guds vrede (din admin) lightningUse=\u00a77Kaster lyn efter {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cFor at markere din flaskepost som l\u00e6st, skriv /mail clear mailCleared=\u00a77Flaskepot ryddet! mailSent=\u00a77Flaskepot sendt! +markMailAsRead=\u00a7cFor at markere din flaskepost som l\u00e6st, skriv /mail clear markedAsAway=\u00a77Du er nu markeret som v\u00c3\u00a6rende ikke tilstede. markedAsNotAway=\u00a77Du er ikke l\u00e6ngere markeret som v\u00c3\u00a6rende ikke tilstede. -markMailAsRead=\u00a7cFor at markere din flaskepost som l\u00e6st, skriv /mail clear maxHomes=Du kan ikke have mere end {0} hjem. mayNotJail=\u00a7cDu kan ikke smide denne person i f\u00c3\u00a6ngsel. me=mig @@ -185,10 +186,10 @@ minute=minut minutes=minutter missingItems=Du har ikke {0}x {1}. missingPrefixSuffix=Mangler et pr\u00e6fiks eller suffiks for {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Fejl ved \u00e6ndring af mob spawner. mobSpawnLimit=Mob m\u00e6ngde begr\u00e6nset til serverens fastsatte gr\u00e6nse. mobSpawnTarget=M\u00e5l blok skal v\u00e6re en mob spawner. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} er modtaget fra {1} moneySentTo=\u00a7a{0} er sendt til {1} moneyTaken={0} blev taget fra din bankkonto. @@ -196,10 +197,10 @@ month=m\u00e5nede months=m\u00e5neder moreThanZero=M\u00e6ngder skal v\u00e6re st\u00f8rre end 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cDu kan ikke mute denne spiller. mutedPlayer=Spiller {0} muted. mutedPlayerFor=Spiller {0} muted i {1}. mutedUserSpeaks={0} pr\u00f8vede at snakke, men er muted. -muteExempt=\u00a7cDu kan ikke mute denne spiller. nearbyPlayers=Spillere i n\u00c3\u00a6rheden: {0} needTpohere=Du skal have adgang til /tpohere for at teleportere andre spillere. negativeBalanceError=Brugeren har ikke tilladelse til at have en negativ saldo. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cDu har brug for \u00a7c{0}\u00a7c permission for at bruge noKits=\u00a77Der er ikke nogen kits tilg\u00e6ngelige endnu noMail=Du har ikke noget flaskepost. noMotd=\u00a7cDer er ingen Message of the day. -none=ingen noNewMail=\u00a77Du har ingen ny flaskepost. noPendingRequest=Du har ikke en ventende anmodning. noPerm=\u00a7cDu har ikke \u00a7f{0}\u00a7c permission. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cDu har ikke tilladelse til at spawne denne mob. noPlacePermission=\u00a7cDu har ikke tiladelse til at placere en block n\u00c3\u00a6r det skilt. noPowerTools= Du har ingen power tools tilf\u00c3\u00b8jet. noRules=\u00a7cDer er ingen regler endnu. ANARKI! +noWarpsDefined=Ingen warps er defineret +none=ingen notAllowedToQuestion=\u00a7cDu har ikke tilladelse til at bruge sp\u00f8rgsm\u00e5l. notAllowedToShout=\u00a7cDu har ikke tilladelse til at r\u00e5be. notEnoughExperience=You do not have enough experience. notEnoughMoney=Du har ikke tilstr\u00e6kkeligt med penge. -nothingInHand = \u00a7cDu har intet i din h\u00c3\u00a5nd. notRecommendedBukkit=* ! * Bukkit version er ikke den anbefalede build til Essentials. notSupportedYet=Ikke underst\u00f8ttet endnu. +nothingInHand = \u00a7cDu har intet i din h\u00c3\u00a5nd. now=nu -noWarpsDefined=Ingen warps er defineret nuke=May death rain upon them numberRequired=Et nummer skal v\u00e6re, din tardo. onlyDayNight=/time underst\u00f8tter kun day/night. onlyPlayers=Kun in-game spillere kan bruge {0}. onlySunStorm=/weather underst\u00c3\u00b8tter kun sun/storm. orderBalances=Tjekker saldoer af {0} spillere, vent venligst... +pTimeCurrent=\u00a7e{0}''s\u00a7f Tiden er {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f Tiden er fastsat til {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f Tiden er normal og matcher serveren. +pTimeOthersPermission=\u00a7cDu har ikke tilladelse til at \u00c3\u00a6ndre andre spilleres tid. +pTimePlayers=Disse spillere har deres egen tid: +pTimeReset=Spiler-tid er blevet nulstillet for: \u00a7e{0} (oversat korrekt?) +pTimeSet=Spiller-tid er blevet sat til \u00a73{0}\u00a7f for: \u00a7e{1} (oversat korrekt?) +pTimeSetFixed=Spiller-tid er fastsat til \u00a73{0}\u00a7f for: \u00a7e{1} parseError=Fejl ved parsing af {0} p\u00e5 linje {1} pendingTeleportCancelled=\u00a7cAnmodning om teleport er blevet afvist. permissionsError=Mangler Permissions/GroupManager; chat pr\u00e6fikser/suffikser vil v\u00e6re deaktiveret. @@ -271,14 +280,6 @@ powerToolRemoveAll=Alle kommandoer fjernet fra {0}. powerToolsDisabled= Alle dine power tools er blevet deaktiveret. powerToolsEnabled= Alle dine power tools er blevet aktiveret. protectionOwner=\u00a76[EssentialsProtect] Protection owner: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f Tiden er {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f Tiden er fastsat til {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f Tiden er normal og matcher serveren. -pTimeOthersPermission=\u00a7cDu har ikke tilladelse til at \u00c3\u00a6ndre andre spilleres tid. -pTimePlayers=Disse spillere har deres egen tid: -pTimeReset=Spiler-tid er blevet nulstillet for: \u00a7e{0} (oversat korrekt?) -pTimeSet=Spiller-tid er blevet sat til \u00a73{0}\u00a7f for: \u00a7e{1} (oversat korrekt?) -pTimeSetFixed=Spiller-tid er fastsat til \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Sp\u00f8rgsm\u00e5l]\u00a7f {0} readNextPage=Skriv /{0} {1} for at l\u00c3\u00a6se n\u00c3\u00a6ste side. reloadAllPlugins=\u00a77Reload alle plugins. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74Du har ikke tilladelse til at lave et skilt he similarWarpExist=En warp med dette navn eksisterer allerede. slimeMalformedSize=Forkert st\u00f8rrelse. (Korrekt oversat?) soloMob=Denne mob kan godt lide at v\u00e6re alene. Den hygger sig. -spawned=spawnet spawnSet=\u00a77Spawnplacering fastsat for gruppe: {0}. +spawned=spawnet suicideMessage=\u00a77Farvel grusomme verden... suicideSuccess= \u00a77{0} tog sit eget liv survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} er blevet taget fra din konto. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Anmodning om teleport er sendt til alle spillere. teleportAll=\u00a77Teleporterer alle spillere... -teleportationCommencing=\u00a77Teleport begynder... -teleportationDisabled=\u00a77Teleport deaktiveret. -teleportationEnabled=\u00a77Teleport aktiveret. teleportAtoB=\u00a77{0}\u00a77 teleporterede dig til {1}\u00a77. teleportDisabled={0} har ikke teleportation aktiveret. teleportHereRequest=\u00a7c{0}\u00a7c har anmodet om, at du teleporterer dig til ham/hende. -teleporting=\u00a77Teleporterer... -teleportingPortal=\u00a77Teleporterede via portal. teleportNewPlayerError=Fejlede ved teleportering af ny spiller teleportRequest=\u00a7c{0}\u00a7c har anmodet om at teleportere til dig. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Teleporterer til toppen. -tempbanExempt=\u00a77Du m\u00c3\u00a5 ikke tempbanne denne spiller! Slemme, slemme du! +teleportationCommencing=\u00a77Teleport begynder... +teleportationDisabled=\u00a77Teleport deaktiveret. +teleportationEnabled=\u00a77Teleport aktiveret. +teleporting=\u00a77Teleporterer... +teleportingPortal=\u00a77Teleporterede via portal. tempBanned=Midlertidigt bannet fra serveren for {0} +tempbanExempt=\u00a77Du m\u00c3\u00a5 ikke tempbanne denne spiller! Slemme, slemme du! thunder= Du har nu {0} torden i din verden thunderDuration=Du har nu {0} torden i din verden i {1} sekunder. timeBeforeHeal=Tid f\u00c3\u00b8r du kan heale igen: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cIngen tilladelse til ubegr\u00e6nset ting {0}. unlimitedItems=Ubegr\u00c3\u00a6nsede ting: unmutedPlayer=Spilleren {0} unmuted. upgradingFilesError=Fejl under opgradering af filerne. -userdataMoveBackError=Kunne ikke flytte userdata/{0}.tmp til userdata/{1} -userdataMoveError=Kunne ikke flytte userdata/{0} til userdata/{1}.tmp userDoesNotExist=Brugeren {0} eksisterer ikke. userIsAway={0} er nu AFK. Skub ham i havet eller bur ham inde! userIsNotAway={0} er ikke l\u00e6ngere AFK. userJailed=\u00a77Du er blevet f\u00e6ngslet. userUsedPortal={0} brugte en eksisterende udgangsportal. +userdataMoveBackError=Kunne ikke flytte userdata/{0}.tmp til userdata/{1} +userdataMoveError=Kunne ikke flytte userdata/{0} til userdata/{1}.tmp usingTempFolderForTesting=Bruger temp-mappe til testing: versionMismatch=Versioner matcher ikke! Opdater venligst {0} til den nyeste version. versionMismatchAll=Versioner matcher ikke! Opdater venligst alle Essentials jar-filer til samme version. voiceSilenced=\u00a77Din stemme er blevet gjort stille. warpDeleteError=Ah, shit; kunne sgu ikke fjerne warp-filen. Jeg giver en \u00c3\u00b8l i lufthavnen. -warpingTo=\u00a77Warper til {0}. warpListPermission=\u00a7cDu har ikke tilladelse til at vise listen over warps. warpNotExist=Den warp eksisterer ikke. -warps=Warps: {0} -warpsCount=\u00a77Der er {0} warps. Viser side {1} af {2}. warpSet=\u00a77Warp {0} sat. warpUsePermission=\u00a7cDu har ikke tilladelse til at benytte den warp. +warpingTo=\u00a77Warper til {0}. +warps=Warps: {0} +warpsCount=\u00a77Der er {0} warps. Viser side {1} af {2}. weatherStorm=\u00a77Du har sat vejret til ''storm'' i {0} weatherStormFor=\u00a77Du har sat vejret til ''storm'' i {0} i {1} sekunder weatherSun=\u00a77Du har sat vejret til ''sol'' i {0} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 815972f03..944d5c7ef 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -49,6 +49,7 @@ couldNotFindTemplate=Vorlage {0} konnte nicht gefunden werden. creatingConfigFromTemplate=Erstelle Konfiguration aus Vorlage: {0} creatingEmptyConfig=Erstelle leere Konfiguration: {0} creative=creative +currency={0}{1} day=Tag days=Tage defaultBanReason=Der Bann-Hammer hat gesprochen! diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index dfc7600dc..c38abd727 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -11,9 +11,9 @@ alertPlaced=placed: alertUsed=used: autoAfkKickReason=You have been kicked for idling more than {0} minutes. backAfterDeath=\u00a77Use the /back command to return to your death point. +backUsageMsg=\u00a77Returning to previous location. backupFinished=Backup finished backupStarted=Backup started -backUsageMsg=\u00a77Returning to previous location. balance=\u00a77Balance: {0} balanceTop=\u00a77Top balances ({0}) banExempt=\u00a7cYou can not ban that player. @@ -49,6 +49,7 @@ couldNotFindTemplate=Could not find template {0} creatingConfigFromTemplate=Creating config from template: {0} creatingEmptyConfig=Creating empty config: {0} creative=creative +currency={0}{1} day=day days=days defaultBanReason=The Ban Hammer has spoken! @@ -64,14 +65,14 @@ depth=\u00a77You are at sea level. depthAboveSea=\u00a77You are {0} block(s) above sea level. depthBelowSea=\u00a77You are {0} block(s) below sea level. destinationNotSet=Destination not set +disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}. disabled=disabled disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77Disabled unlimited placing of {0} for {1}. dontMoveMessage=\u00a77Teleportation will commence in {0}. Don''t move. downloadingGeoIp=Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB) duplicatedUserdata=Duplicated userdata: {0} and {1} -enabled=enabled enableUnlimited=\u00a77Giving unlimited amount of {0} to {1}. +enabled=enabled enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. enchantmentNotFound = \u00a7cEnchantment not found enchantmentPerm = \u00a7cYou do not have the permission for {0} @@ -99,9 +100,9 @@ gcentities= entities gcfree=Free memory: {0} MB gcmax=Maximum memory: {0} MB gctotal=Allocated memory: {0} MB -geoipJoinFormat=Player {0} comes from {1} geoIpUrlEmpty=GeoIP download url is empty. geoIpUrlInvalid=GeoIP download url is invalid. +geoipJoinFormat=Player {0} comes from {1} godDisabledFor=disabled for {0} godEnabledFor=enabled for {0} godMode=\u00a77God mode {0}. @@ -112,9 +113,9 @@ helpConsole=To view help from the console, type ?. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: holeInFloor=Hole in floor -homes=Homes: {0} homeSet=\u00a77Home set. homeSetToBed=\u00a77Your home is now set to this bed. +homes=Homes: {0} hour=hour hours=hours ignorePlayer=You ignore player {0} from now on. @@ -124,28 +125,28 @@ infoChapterPages=Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=File info.txt does not exist. Creating one for you. infoPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: infoUnknownChapter=Unknown chapter. +invBigger=The other users inventory is bigger than yours. +invRestored=Your inventory has been restored. +invSee=You see the inventory of {0}. +invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. invalidWorld=\u00a7cInvalid world. -invBigger=The other users inventory is bigger than yours. inventoryCleared=\u00a77Inventory Cleared. inventoryClearedOthers=\u00a77Inventory of \u00a7c{0}\u00a77 cleared. -invRestored=Your inventory has been restored. -invSee=You see the inventory of {0}. -invSeeHelp=Use /invsee to restore your inventory. is=is itemCannotBeSold=That item cannot be sold to the server. itemMustBeStacked=Item must be traded in stacks. A quantity of 2s would be two stacks, etc. itemNotEnough1=\u00a7cYou do not have enough of that item to sell. itemNotEnough2=\u00a77If you meant to sell all of your items of that type, use /sell itemname itemNotEnough3=\u00a77/sell itemname -1 will sell all but one item, etc. -itemsCsvNotLoaded=Could not load items.csv. itemSellAir=You really tried to sell Air? Put an item in your hand. itemSold=\u00a77Sold for \u00a7c{0} \u00a77({1} {2} at {3} each) itemSoldConsole={0} sold {1} for \u00a77{2} \u00a77({3} items at {4} each) itemSpawn=\u00a77Giving {0} of {1} +itemsCsvNotLoaded=Could not load items.csv. jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0} jailMessage=\u00a7cYou do the crime, you do the time. jailNotExist=That jail does not exist. @@ -162,8 +163,8 @@ kitError=\u00a7cThere are no valid kits. kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration? kitGive=\u00a77Giving kit {0}. kitInvFull=\u00a7cYour inventory was full, placing kit on the floor -kits=\u00a77Kits: {0} kitTimed=\u00a7cYou can''t use that kit again for another {0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77You have just been smited lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cTo mark your mail as read, type /mail clear mailCleared=\u00a77Mail Cleared! mailSent=\u00a77Mail sent! +markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear markedAsAway=\u00a77You are now marked as away. markedAsNotAway=\u00a77You are no longer marked as away. -markMailAsRead=\u00a7cTo mark your mail as read, type /mail clear maxHomes=You cannot set more than {0} homes. mayNotJail=\u00a7cYou may not jail that person me=me @@ -185,10 +186,10 @@ minute=minute minutes=minutes missingItems=You do not have {0}x {1}. missingPrefixSuffix=Missing a prefix or suffix for {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Error while changing mob spawner. mobSpawnLimit=Mob quantity limited to server limit mobSpawnTarget=Target block must be a mob spawner. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} has been received from {1} moneySentTo=\u00a7a{0} has been sent to {1} moneyTaken={0} taken from your bank account. @@ -196,10 +197,10 @@ month=month months=months moreThanZero=Quantities must be greater than 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cYou may not mute that player. mutedPlayer=Player {0} muted. mutedPlayerFor=Player {0} muted for {1}. mutedUserSpeaks={0} tried to speak, but is muted. -muteExempt=\u00a7cYou may not mute that player. nearbyPlayers=Players nearby: {0} needTpohere=You need access to /tpohere to teleport other players. negativeBalanceError=User is not allowed to have a negative balance. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit noKits=\u00a77There are no kits available yet noMail=You do not have any mail noMotd=\u00a7cThere is no message of the day. -none=none noNewMail=\u00a77You have no new mail. noPendingRequest=You do not have a pending request. noPerm=\u00a7cYou do not have the \u00a7f{0}\u00a7c permission. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. noPlacePermission=\u00a7cYou do not have permission to place a block near that sign. noPowerTools=You have no power tools assigned. noRules=\u00a7cThere are no rules specified yet. +noWarpsDefined=No warps defined +none=none notAllowedToQuestion=\u00a7cYou are not authorized to use question. notAllowedToShout=\u00a7cYou are not authorized to shout. notEnoughExperience=You do not have enough experience. notEnoughMoney=You do not have sufficient funds. -nothingInHand = \u00a7cYou have nothing in your hand. notRecommendedBukkit=* ! * Bukkit version is not the recommended build for Essentials. notSupportedYet=Not supported yet. +nothingInHand = \u00a7cYou have nothing in your hand. now=now -noWarpsDefined=No warps defined nuke=May death rain upon them numberRequired=A number goes there, silly. onlyDayNight=/time only supports day/night. onlyPlayers=Only in-game players can use {0}. onlySunStorm=/weather only supports sun/storm. orderBalances=Ordering balances of {0} users, please wait ... +pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. +pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. +pTimePlayers=These players have their own time: +pTimeReset=Player time has been reset for: \u00a7e{0} +pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} +pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} parseError=Error parsing {0} on line {1} pendingTeleportCancelled=\u00a7cPending teleportation request cancelled. permissionsError=Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled. @@ -271,14 +280,6 @@ powerToolRemoveAll=All commands removed from {0}. powerToolsDisabled=All of your power tools have been enabled. powerToolsEnabled=All of your power tools have been enabled. protectionOwner=\u00a76[EssentialsProtect] Protection owner: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. -pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. -pTimePlayers=These players have their own time: -pTimeReset=Player time has been reset for: \u00a7e{0} -pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} -pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Question]\u00a7f {0} readNextPage=Type /{0} {1} to read the next page reloadAllPlugins=\u00a77Reloaded all plugins. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74You are not allowed to create sign here. similarWarpExist=A warp with a similar name already exists. slimeMalformedSize=Malformed size. soloMob=That mob likes to be alone -spawned=spawned spawnSet=\u00a77Spawn location set for group {0}. +spawned=spawned suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} has been taken from your account. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... -teleportationCommencing=\u00a77Teleportation commencing... -teleportationDisabled=\u00a77Teleportation disabled. -teleportationEnabled=\u00a77Teleportation enabled. teleportAtoB=\u00a77{0}\u00a77 teleported you to {1}\u00a77. teleportDisabled={0} has teleportation disabled. teleportHereRequest=\u00a7c{0}\u00a7c has requested that you teleport to them. -teleporting=\u00a77Teleporting... -teleportingPortal=\u00a77Teleporting via portal. teleportNewPlayerError=Failed to teleport new player teleportRequest=\u00a7c{0}\u00a7c has requested to teleport to you. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Teleporting to top. -tempbanExempt=\u00a77You may not tempban that player +teleportationCommencing=\u00a77Teleportation commencing... +teleportationDisabled=\u00a77Teleportation disabled. +teleportationEnabled=\u00a77Teleportation enabled. +teleporting=\u00a77Teleporting... +teleportingPortal=\u00a77Teleporting via portal. tempBanned=Temporarily banned from server for {0} +tempbanExempt=\u00a77You may not tempban that player thunder= You {0} thunder in your world thunderDuration=You {0} thunder in your world for {1} seconds. timeBeforeHeal=Time before next heal: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}. unlimitedItems=Unlimited items: unmutedPlayer=Player {0} unmuted. upgradingFilesError=Error while upgrading the files -userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} -userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp userDoesNotExist=The user {0} does not exist. userIsAway={0} is now AFK userIsNotAway={0} is no longer AFK userJailed=\u00a77You have been jailed userUsedPortal={0} used an existing exit portal. +userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} +userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp usingTempFolderForTesting=Using temp folder for testing: versionMismatch=Version mismatch! Please update {0} to the same version. versionMismatchAll=Version mismatch! Please update all Essentials jars to the same version. voiceSilenced=\u00a77Your voice has been silenced warpDeleteError=Problem deleting the warp file. -warpingTo=\u00a77Warping to {0}. warpListPermission=\u00a7cYou do not have Permission to list that warps. warpNotExist=That warp does not exist. -warps=Warps: {0} -warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. warpSet=\u00a77Warp {0} set. warpUsePermission=\u00a7cYou do not have Permission to use that warp. +warpingTo=\u00a77Warping to {0}. +warps=Warps: {0} +warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. weatherStorm=\u00a77You set the weather to storm in {0} weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds weatherSun=\u00a77You set the weather to sun in {0} diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 909ec7434..07a788eb5 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -11,9 +11,9 @@ alertPlaced=situado: alertUsed=usado: autoAfkKickReason=Has sido echado por ausentarte mas de {0} minutos. backAfterDeath=\u00a77Usa el comando /back para volver al punto en el que moriste. +backUsageMsg=\u00a77Volviendo a la localizacion anterior. backupFinished=Copia de seguridad completada backupStarted=Comenzando copia de seguridad -backUsageMsg=\u00a77Volviendo a la localizacion anterior. balance=\u00a77Cantidad: {0} balanceTop=\u00a77Top cantidades ({0}) banExempt=\u00a7cNo puedes banear a ese jugador @@ -49,6 +49,7 @@ couldNotFindTemplate=No se puede encontrar el template {0} creatingConfigFromTemplate=Creando configuracion desde el template: {0} creatingEmptyConfig=Creando configuracion vacia: {0} creative=creative +currency={0}{1} day=dia days=dias defaultBanReason=Baneado por incumplir las normas! @@ -64,14 +65,14 @@ depth=\u00a77Estas al nivel del mar. depthAboveSea=\u00a77Estas {0} bloque(s) por encima del mar. depthBelowSea=\u00a77Estas {0} bloque(s) por debajo del mar. destinationNotSet=Destino no establecido. +disableUnlimited=\u00a77Desactivando colocacion ilimitada de {0} para {1}. disabled=desactivado disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77Desactivando colocacion ilimitada de {0} para {1}. dontMoveMessage=\u00a77Teletransporte comenzara en {0}. No te muevas. downloadingGeoIp=Descargando base de datos de GeoIP ... puede llevar un tiempo (pais: 0.6 MB, ciudad: 20MB) duplicatedUserdata=Datos de usuario duplicados: {0} y {1} -enabled=activado enableUnlimited=\u00a77Dando cantidad ilimitada de {0} a {1}. +enabled=activado enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. enchantmentNotFound = \u00a7cEnchantment not found enchantmentPerm = \u00a7cYou do not have the permission for {0} @@ -99,9 +100,9 @@ gcentities= entidades gcfree=Memoria libre: {0} MB gcmax=Memoria maxima: {0} MB gctotal=Memoria localizada: {0} MB -geoipJoinFormat=El jugador {0} viene de {1} geoIpUrlEmpty=Link para descargar GeoIP esta vacio. geoIpUrlInvalid=Link para descargar GeoIP es invalido. +geoipJoinFormat=El jugador {0} viene de {1} godDisabledFor=Desactivado para {0} godEnabledFor=Activado para {0} godMode=\u00a77Modo Dios {0}. @@ -112,9 +113,9 @@ helpConsole=Para obtener ayuda de la consola, escribe ?. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f: holeInFloor=Agujero en el suelo -homes=Hogares: {0} homeSet=\u00a77Hogar establecido. homeSetToBed=\u00a77Tu hogar esta ahora establecido a esta cama. +homes=Hogares: {0} hour=hora hours=horas ignorePlayer=A partir de ahora ignoras al jugador {0}. @@ -124,28 +125,28 @@ infoChapterPages=Seccion {0}, pagina \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=El archivo info.txt no existe. Creando uno para ti. infoPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f: infoUnknownChapter=Seccion desconocida. +invBigger=El inventario del otro usuario es mas grande que el tuyo +invRestored=Tu inventario ha sido recuperado. +invSee=Estas viendo el inventario de {0}. +invSeeHelp=Usa /invsee para recuperar tu inventario. invalidCharge=\u00a7cCargo invalido. invalidMob=Mob invalido. invalidServer=Servidor invalido! invalidSignLine=Linea {0} en el signo es invalida. invalidWorld=\u00a7cMundo invalido. -invBigger=El inventario del otro usuario es mas grande que el tuyo inventoryCleared=\u00a77Inventario limpiado. inventoryClearedOthers=\u00a77Inventario de \u00a7c{0}\u00a77 limpiado. -invRestored=Tu inventario ha sido recuperado. -invSee=Estas viendo el inventario de {0}. -invSeeHelp=Usa /invsee para recuperar tu inventario. is=es itemCannotBeSold=Ese objeto no puede ser vendido al servidor. itemMustBeStacked=El objeto tiene que ser intercambiado en pilas. Una cantidad de 2s seria de dos pilas, etc. itemNotEnough1=\u00a7cNo tienes suficientes ejemplares de ese objeto para venderlo. itemNotEnough2=\u00a77Si pensabas en vender todos tus objetos de ese tipo, usa /sell nombredeobjeto itemNotEnough3=\u00a77/sell nombredeobjeto -1 vendera todos excepto un objeto, etc. -itemsCsvNotLoaded=Error al leer items.csv. itemSellAir=Realmente has intentado vender Aire? Pon un objeto en tu mano! itemSold=\u00a77Vendido para \u00a7c {0} \u00a77 ({1} {2} a {3} cada uno) itemSoldConsole={0} Vendido {1} para\u00a77 {2} \u00a77({3} objetos a {4} cada uno) itemSpawn=\u00a77Dando {0} de {1} +itemsCsvNotLoaded=Error al leer items.csv. jailAlreadyIncarcerated=\u00a7cLa persona ya esta en la carcel: {0} jailMessage=\u00a7cPor hacer el mal, tiempo en la carcel estaras. jailNotExist=Esa carcel no existe. @@ -162,8 +163,8 @@ kitError=\u00a7cNo hay ningun kit valido. kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration? kitGive=\u00a77Dando kit a {0}. kitInvFull=\u00a7cTu inventario esta lleno, su kit se pondra en el suelo -kits=\u00a77Kits: {0} kitTimed=\u00a7c No puedes usar ese kit de nuevo para otro{0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77Acabas de ser golpeado lightningUse=\u00a77Golpeando a {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cPara marcar tu email como leido, escribe /mail clear mailCleared=\u00a77Email limpiado! mailSent=\u00a77Email enviado!! +markMailAsRead=\u00a7cPara marcar tu email como leido, escribe /mail clear markedAsAway=\u00a77Has sido puesto como AFK. markedAsNotAway=\u00a77Ya no estas AFK. -markMailAsRead=\u00a7cPara marcar tu email como leido, escribe /mail clear maxHomes=No puedes establecer mas de {0} hogares. mayNotJail=\u00a7cNo puedes encarcelar a esa persona me=yo @@ -185,10 +186,10 @@ minute=minuto minutes=minutos missingItems=No tienes {0}x de {1}. missingPrefixSuffix=Falta un prefijo o un sufijo para {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Error al cambiar la localizacion para el nacimiento de los mobs. mobSpawnLimit=Cantidad de Mobs limitados al limite del server mobSpawnTarget=El block seleccionado sera el lugar donde van a nacer los mobs. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} ha sido recivido de {1} moneySentTo=\u00a7a{0} ha sido enviado a {1} moneyTaken={0} han sido sacados de tu cuenta bancaria. @@ -196,10 +197,10 @@ month=mes months=meses moreThanZero=Las cantidades han de ser mayores que 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cNo puedes silenciar a ese jugador. mutedPlayer=Player {0} silenciado. mutedPlayerFor=Player {0} silenciado durante {1}. mutedUserSpeaks={0} intento hablar, pero esta silenciado. -muteExempt=\u00a7cNo puedes silenciar a ese jugador. nearbyPlayers=Players nearby: {0} needTpohere=Necesitas acceso a /tpohere para teletransportar a otros jugadores. negativeBalanceError=El usuario no tiene permitido tener un saldo negativo. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cNecesitas los \u00a7c{0}\u00a7c permisos para usar ese ki noKits=\u00a77No hay kits disponibles todavia noMail=No tienes ningun email recivido noMotd=\u00a7cNo hay ningun mensaje del dia. -none=ninguno noNewMail=\u00a77No tienes ningun correo nuevo. noPendingRequest=No tienes ninguna peticion pendiente. noPerm=\u00a7cNo tienes el permiso de \u00a7f{0}\u00a7c. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. noPlacePermission=\u00a7cNo tienes permiso para situar ese bloque en ese lugar. noPowerTools=You have no power tools assigned. noRules=\u00a7cNo hay reglas especificadas todavia. +noWarpsDefined=No hay teletransportes definidos aun +none=ninguno notAllowedToQuestion=\u00a7cYou estas autorizado para usar las preguntas. notAllowedToShout=\u00a7cNo estas autorizado para gritar. notEnoughExperience=You do not have enough experience. notEnoughMoney=No tienes el dinero suficiente. -nothingInHand = \u00a7cYou have nothing in your hand. notRecommendedBukkit=* ! * La version de bukkit no es la recomendada para esta version de Essentials. notSupportedYet=No esta soportado aun. +nothingInHand = \u00a7cYou have nothing in your hand. now=ahora -noWarpsDefined=No hay teletransportes definidos aun nuke=May death rain upon them numberRequired=Un numero es necesario, amigo. onlyDayNight=/time solo soporta day/night. (dia/noche) onlyPlayers=Solo los jugadores conectados pueden usar {0}. onlySunStorm=/weather solo soporta sun/storm. (sol/tormenta) orderBalances=Ordering balances of {0} users, please wait ... +pTimeCurrent=\u00a7e{0}''s\u00a7f la hora es {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f la hora ha sido cambiada a {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f el tiempo es normal y coincide con el servidor. +pTimeOthersPermission=\u00a7cNo estas autorizado para especificar'' la hora de otros usuarios. +pTimePlayers=Estos usuarios tienen su propia hora: +pTimeReset=La hora del usuario ha sido reiniciada a las: \u00a7e{0} +pTimeSet=La hora del jugador ha sido cambiada para las: \u00a73{0}\u00a7f for: \u00a7e{1} +pTimeSetFixed=La hora del jugador ha sido arreglada para las: \u00a73{0}\u00a7f for: \u00a7e{1} parseError=error analizando {0} en la linea {1} pendingTeleportCancelled=\u00a7cPeticion de teletransporte pendiente cancelado. permissionsError=Falta el plugin Permissions/GroupManager; Los prefijos/sufijos de chat seran desactivados. @@ -271,14 +280,6 @@ powerToolRemoveAll=Todos los comandos borrados desde {0}. powerToolsDisabled=All of your power tools have been disabled. powerToolsEnabled=All of your power tools have been enabled. protectionOwner=\u00a76[EssentialsProtect] Dueño de la proteccion: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f la hora es {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f la hora ha sido cambiada a {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f el tiempo es normal y coincide con el servidor. -pTimeOthersPermission=\u00a7cNo estas autorizado para especificar'' la hora de otros usuarios. -pTimePlayers=Estos usuarios tienen su propia hora: -pTimeReset=La hora del usuario ha sido reiniciada a las: \u00a7e{0} -pTimeSet=La hora del jugador ha sido cambiada para las: \u00a73{0}\u00a7f for: \u00a7e{1} -pTimeSetFixed=La hora del jugador ha sido arreglada para las: \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Pregunta]\u00a7f {0} readNextPage=Type /{0} {1} to read the next page reloadAllPlugins=\u00a77Todos los plugins recargados. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74No puedes poner carteles en ese sitio. similarWarpExist=Ya existe un teletransporte con ese nombre. slimeMalformedSize=Medidas malformadas. soloMob=A este mob le gusta estar solo -spawned=nacido spawnSet=\u00a77El lugar de nacimiento ha sido puesto para el grupo {0}. +spawned=nacido suicideMessage=\u00a77Adios mundo cruel... suicideSuccess= \u00a77{0} se quito su propia vida survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} ha sido sacado de tu cuenta. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Peticion de teletransporte enviada a todos los jugadores... teleportAll=\u00a77Teletransportando a todos los jugadores... -teleportationCommencing=\u00a77Comenzando teletransporte... -teleportationDisabled=\u00a77Teletransporte desactivado. -teleportationEnabled=\u00a77Teletransporte activado. teleportAtoB=\u00a77{0}\u00a77 te teletransporto a {1}\u00a77. teleportDisabled={0} tiene desactivado los teletransportes. teleportHereRequest=\u00a7c{0}\u00a7c ha pedido que te teletransportes con el. -teleporting=\u00a77Teletransportando... -teleportingPortal=\u00a77Teletransportando via portal. teleportNewPlayerError=Error al teletransportar al nuevo jugador teleportRequest=\u00a7c{0}\u00a7c te ha pedido teletransportarse contigo. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Teletransportandote a la cima. -tempbanExempt=\u00a77No puedes banear temporalmente a ese jugador +teleportationCommencing=\u00a77Comenzando teletransporte... +teleportationDisabled=\u00a77Teletransporte desactivado. +teleportationEnabled=\u00a77Teletransporte activado. +teleporting=\u00a77Teletransportando... +teleportingPortal=\u00a77Teletransportando via portal. tempBanned=Baneado temporalmente del servidor por {0} +tempbanExempt=\u00a77No puedes banear temporalmente a ese jugador thunder= Tu has {0} los truenos en tu mundo. thunderDuration=Tu has {0} los truenos en tu mundo durante {1} seconds. timeBeforeHeal=Tiempo antes de la siguiente curacion: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cNo tienes permiso para objetos ilimitados {0}. unlimitedItems=Objetos ilimitados. unmutedPlayer=Jugador {0} desmuteado. upgradingFilesError=Error mientras se actualizaban los archivos -userdataMoveBackError=Error al mover userdata/{0}.tmp a userdata/{1} -userdataMoveError=Error al mover userdata/{0} a userdata/{1}.tmp userDoesNotExist=El usuario {0} no existe userIsAway={0} esta ahora ausente! userIsNotAway={0} ya no esta ausente! userJailed=\u00a77Has sido encarcelado! userUsedPortal={0} uso un portal de salida existente. +userdataMoveBackError=Error al mover userdata/{0}.tmp a userdata/{1} +userdataMoveError=Error al mover userdata/{0} a userdata/{1}.tmp usingTempFolderForTesting=Usando carpeta temporal para pruebas: versionMismatch=La version no coincide! Por favor actualiza {0} a la misma version. versionMismatchAll=La version no coincide! Por favor actualiza todos los jars de Essentials a la misma version. voiceSilenced=\u00a77Tu voz ha sido silenciada warpDeleteError=Problema al borrar el archivo de teletransporte. -warpingTo=\u00a77Teletransportandote a {0}. warpListPermission=\u00a7cNo tienes permiso para listar esos teletransportes. warpNotExist=Ese teletransporte no existe. -warps=Warps: {0} -warpsCount=\u00a77Hay {0} teletransportes. Mostrando pagina {1} de {2}. warpSet=\u00a77Teletransporte {0} establecido. warpUsePermission=\u00a7cNo tienes permisos para usar ese teletransporte. +warpingTo=\u00a77Teletransportandote a {0}. +warps=Warps: {0} +warpsCount=\u00a77Hay {0} teletransportes. Mostrando pagina {1} de {2}. weatherStorm=\u00a77Has establecido el tiempo a tormenta en este mundo. weatherStormFor=\u00a77Has establecido el tiempo a tormenta en este {1} durante {0} segundos. weatherSun=\u00a77Has establecido el tiempo a sol en este mundo. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index a74be475b..8afe6cb0c 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -11,9 +11,9 @@ alertPlaced=a plac\u00e9 : alertUsed=a utilis\u00e9 : autoAfkKickReason=Vous avez \u00e9t\u00e9 \u00e9ject\u00e9 pour inactivit\u00e9e sup\u00e9rieure \u00e0 {0} minutes. backAfterDeath=\u00a77Utilisez la commande /back pour retourner \u00e0 l''endroit ou vous \u00eates mort. +backUsageMsg=\u00a77Retour \u00e0 votre emplacement pr\u00e9c\u00c3\u00a8dent. backupFinished=Sauvegarde termin\u00e9 backupStarted=D\u00e9but de la sauvegarde... -backUsageMsg=\u00a77Retour \u00e0 votre emplacement pr\u00e9c\u00c3\u00a8dent. balance=\u00a77Solde : {0} balanceTop=\u00a77Meilleurs soldes au ({0}) banExempt=\u00a77Vous ne pouvez pas bannir ce joueur. @@ -49,6 +49,7 @@ couldNotFindTemplate=Le mod\u00c3\u00a8le {0} est introuvable creatingConfigFromTemplate=Cr\u00e9ation de la configuration \u00e0 partir du mod\u00c3\u00a8le : {0} creatingEmptyConfig=Cr\u00e9ation d''une configuration vierge : {0} creative=cr\u00e9atif +currency={0}{1} day=jour days=jours defaultBanReason=Le marteau du bannissement a frapp\u00e9 ! @@ -64,14 +65,14 @@ depth=\u00a77Vous \u00eates au niveau de la mer. depthAboveSea=\u00a77Vous \u00eates \u00e0 {0} bloc(s) au-dessus du niveau de la mer. depthBelowSea=\u00a77Vous \u00eates \u00e0 {0} bloc(s) en-dessous du niveau de la mer. destinationNotSet=Destination non d\u00e9finie +disableUnlimited=\u00a77D\u00e9sactivation du placement illimit\u00e9 de {0} pour {1}. disabled=d\u00e9sactiv\u00e9 disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77D\u00e9sactivation du placement illimit\u00e9 de {0} pour {1}. dontMoveMessage=\u00a77La t\u00e9l\u00e9portation commence dans {0}. Ne bougez pas. downloadingGeoIp=T\u00e9l\u00e9chargement de la base de donn\u00e9es GeoIP ... Cela peut prendre un moment (Pays : 0.6 Mo, villes : 20Mo) duplicatedUserdata=Donn\u00e9e utilisateur dupliqu\u00e9e : {0} et {1} -enabled=activ\u00e9 enableUnlimited=\u00a77Quantit\u00e9 illimit\u00e9e de {0} \u00e0 {1}. +enabled=activ\u00e9 enchantmentApplied = \u00a77L''enchantement {0} a \u00e9t\u00e9 appliqu\u00e9 \u00e0 l''objet dans votre main. enchantmentNotFound = \u00a7cEnchantement non-trouv\u00e9 enchantmentPerm = \u00a7cVous n''avez pas les droits pour {0}. @@ -99,9 +100,9 @@ gcentities=entit\u00e9s gcfree=M\u00e9moire libre : {0} Mo gcmax=M\u00e9moire maximale : {0} Mo gctotal=M\u00e9moire utilis\u00e9e : {0} Mo -geoipJoinFormat=Joueur {0} vient de {1} geoIpUrlEmpty=L''URL de t\u00e9l\u00e9chargement de GeoIP est vide. geoIpUrlInvalid=L''URL de t\u00e9l\u00e9chargement de GeoIP est invalide. +geoipJoinFormat=Joueur {0} vient de {1} godDisabledFor=d\u00e9sactiv\u00e9 pour {0} godEnabledFor=activ\u00e9 pour {0} godMode=\u00a77Mode Dieu {0}. @@ -112,9 +113,9 @@ helpConsole=Pour voir l''aide tapez ? helpOp=\u00a7c[Aide Admin]\u00a7f \u00a77{0} : \u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f sur \u00a7c{1}\u00a7f. holeInFloor=Trou dans le Sol. -homes=R\u00e9sidences : {0} homeSet=\u00a77R\u00e9sidence d\u00e9finie. homeSetToBed=\u00a77Votre r\u00e9sidence est d\u00e9sormais li\u00e9e \u00e0 ce lit. +homes=R\u00e9sidences : {0} hour=heure hours=heures ignorePlayer=Vous ignorez d\u00e9sormais {0}. @@ -124,28 +125,28 @@ infoChapterPages=Chapitre {0}, page \u00a7c{1}\u00a7f sur \u00a7c{2}\u00a7f: infoFileDoesNotExist=Le fichier info.txt n'existe pas. Le fichier est en cours de cr\u00e9ation pour vous. infoPages=Page \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f. infoUnknownChapter=Chapitre inconnu. +invBigger=Les inventaires des autres joueurs sont plus gros que le v\u00f4tre. +invRestored=Votre inventaire vous a \u00e9t\u00e9 rendu. +invSee=Vous voyez l''inventaire de {0}. +invSeeHelp=Utilisez /invsee pour revenir \u00e0 votre inventaire. invalidCharge=\u00a7cCharge invalide. invalidMob=Mauvias type de cr\u00e9ature. invalidServer=Serveur non valide. invalidSignLine=La ligne {0} du panneau est invalide. invalidWorld=\u00a7cMonde invalide. -invBigger=Les inventaires des autres joueurs sont plus gros que le v\u00f4tre. inventoryCleared=\u00a77Inventaire nettoy\u00e9. inventoryClearedOthers=\u00a77L''inventaire de \u00a7c{0}\u00a77 a \u00e9t\u00e9 nettoy\u00e9. -invRestored=Votre inventaire vous a \u00e9t\u00e9 rendu. -invSee=Vous voyez l''inventaire de {0}. -invSeeHelp=Utilisez /invsee pour revenir \u00e0 votre inventaire. is=est itemCannotBeSold=Cet objet ne peut \u00eatre vendu au serveur. itemMustBeStacked=Cet objet doit \u00eatre vendu par 64. Une quantit\u00e9 de 2 serait deux fois 64. itemNotEnough1=\u00a7cVous n'avez pas assez de cet objet pour le vendre. itemNotEnough2=\u00a77Si vous voulez vendre l'int\u00e9gralit\u00e9 de vos objets de ce type l\u00e0, utilisez /sell nomObjet itemNotEnough3=\u00a77/sell nomObjet -1 vendra tout sauf un objet, etc. -itemsCsvNotLoaded=N'a pas pu charger items.csv. itemSellAir=Vouliez-vous vraiment vendre de l'air ? Mettez un objet dans votre main. itemSold=\u00a77Vendu pour \u00a7c{0} \u00a77({1} {2} \u00e0 {3} chacun) itemSoldConsole={0} vendu {1} pour \u00a77{2} \u00a77({3} objet(s) \u00e0 {4} chacun) itemSpawn=\u00a77Donne {0} de {1} +itemsCsvNotLoaded=N'a pas pu charger items.csv. jailAlreadyIncarcerated=\u00a7cJoueur d\u00e9j\u00e0 emprisonn\u00e9 : {0} jailMessage=\u00a7cVous avez commis un crime, vous en payez le prix. jailNotExist=Cette prison n'existe pas. @@ -162,8 +163,8 @@ kitError=\u00a7cIl n'y a pas de kits valides. kitErrorHelp=\u00a7cPeut-\u00eatre qu'un objet manque d'une quantit\u00e9 dans la configuration ? kitGive=\u00a77Donner le kit {0}. kitInvFull=\u00a7cVotre inventaire \u00e9tait plein, le kit est parre-terre. -kits=\u00a77Kits :{0} kitTimed=\u00a7cVous ne pouvez pas utiliser ce kit pendant encore {0}. +kits=\u00a77Kits :{0} lightningSmited=\u00a77Vous venez d'\u00eatre foudroy\u00e9. lightningUse=\u00a77{0} a \u00e9t\u00e9 foudroy\u00e9. listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Locale : <{0}> {1} mailClear=\u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear mailCleared=\u00a77Courrier supprim\u00e9 ! mailSent=\u00a77Courrier envoy\u00e9 ! +markMailAsRead=\u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear markedAsAway=\u00a77Vous \u00eates d\u00e9sormais AFK. markedAsNotAway=\u00a77Vous n'\u00eates d\u00e9sormais plus AFK. -markMailAsRead=\u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear maxHomes=Vous ne pouvez pas cr\u00e9er plus de {0} r\u00e9sidences. mayNotJail=\u00a7cVous ne pouvez pas emprisonner cette personne. me=moi @@ -185,10 +186,10 @@ minute=minute minutes=minutes missingItems=Vous n''avez pas {0} x {1}. missingPrefixSuffix=Pr\u00e9fixe ou Suffixe manquant pour {0} -mobsAvailable=\u00a77cr\u00e9atures : {0} mobSpawnError=Erreur lors du changement du g\u00e9n\u00e9rateur de cr\u00e9atures. mobSpawnLimit=Quantit\u00e9 de cr\u00e9atures limit\u00e9 \u00e0 au maximum du serveur. mobSpawnTarget=Le bloc cible doit \u00eatre un g\u00e9n\u00e9rateur de cr\u00e9atures. +mobsAvailable=\u00a77cr\u00e9atures : {0} moneyRecievedFrom=\u00a7a{0} a \u00e9t\u00e9 re\u00e7u de {1} moneySentTo=\u00a7a{0} a \u00e9t\u00e9 envoy\u00e9 \u00e0 {1} moneyTaken={0} pr\u00e9lev\u00e9(s) de votre compte. @@ -196,10 +197,10 @@ month=mois months=mois moreThanZero=Les quantit\u00e9s doivent \u00eatre sup\u00e9rieures \u00e0 z\u00e9ro. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cVous ne pouvez pas r\u00e9duire ce joueur au silence. mutedPlayer=Le joueur {0} est d\u00e9sormais muet. mutedPlayerFor={0} a \u00e9t\u00e9 muet pour {1}. mutedUserSpeaks={0} a essay\u00e9 de parler mais est muet. -muteExempt=\u00a7cVous ne pouvez pas r\u00e9duire ce joueur au silence. nearbyPlayers=Joueurs dans les environs : {0} needTpohere=Vous avez besoin de l'acc\u00c3\u00a8s \u00e0 /tpohere pour t\u00e9l\u00e9porter d'autres joueurs. negativeBalanceError=L'utilisateur n'est pas autoris\u00e9 \u00e0 avoir un solde n\u00e9gatif. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cVous avez besoin de la permission \u00a7c{0}\u00a7c pour noKits=\u00a77Il n'y a pas encore de kits disponibles. noMail=Vous n'avez pas de courrier noMotd=\u00a7cIl n'y a pas de message su jour. -none=aucun noNewMail=\u00a77Vous n'avez pas de courrier. noPendingRequest=Vous n'avez pas de requ\u00eate non lue. noPerm=\u00a7cVous n''avez pas la permission \u00a7f{0}\u00a7c. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cVous n'avez pas la permission d'invoquer cette cr\u00e9a noPlacePermission=\u00a7cVous n'avez pas la permission de placer un bloc pr\u00c3\u00a8 de cette pancarte. noPowerTools=Vous n'avez pas d'outil macro associ\u00e9. noRules=\u00a7cIl n'y a pas encore de r\u00e8gles d\u00e9finies. +noWarpsDefined=Aucun point de t\u00e9l\u00e9portation d\u00e9fini. +none=aucun notAllowedToQuestion=\u00a7cVous n'\u00eates pas autoris\u00e9 \u00e0 poser des questions. notAllowedToShout=\u00a7cVous n'\u00eates pas autoris\u00e9 \u00e0 crier. notEnoughExperience=Vous n'avez pas assez d'exp\u00e9rience. notEnoughMoney=Vous n'avez pas les fonds n\u00e9cessaires. -nothingInHand = \u00a7cVous n'avez rien en main. notRecommendedBukkit=* ! * La version de Bukkit n'est pas celle qui est recommand\u00e9 pour cette version de Essentials. notSupportedYet=Pas encore pris en charge. +nothingInHand = \u00a7cVous n'avez rien en main. now=maintenant -noWarpsDefined=Aucun point de t\u00e9l\u00e9portation d\u00e9fini. nuke=Que la mort s'abatte sur eux ! numberRequired=Il faut fournir un nombre ici. onlyDayNight=/time ne supporte que (jour) day/night (nuit). onlyPlayers=Seulement les joueurs en jeu peuvent utiliser {0}. onlySunStorm=/weather ne supporte que (soleil) sun/storm (temp\u00eate). orderBalances=Classement des balance de {0} utilisateurs, patientez ... +pTimeCurrent=Pour \u00a7e{0}\u00a7f l''heure est {1}. +pTimeCurrentFixed=L''heure de \u00a7e{0}\u00a7f est fix\u00e9e \u00e0 {1}. +pTimeNormal=\u00a7fPour \u00a7e{0}\u00a7f l'heure est normale et correspond au server. +pTimeOthersPermission=\u00a7cVous n'etes pas autoris\u00e9 \u00e0 changer l'heure des autres joueurs. +pTimePlayers=Ces joueurs ont leur propre horraire : +pTimeReset=l''heure a \u00e9t\u00e9 r\u00e9initialis\u00e9e \u00e0 : \u00a7e{0} +pTimeSet=l''heure du joueur a \u00e9t\u00e9 r\u00e9egl\u00e9ee \u00e0 \u00a73{0}\u00a7f pour : \u00a7e{1} +pTimeSetFixed=l''heure du joueur a \u00e9t\u00e9 fix\u00e9e \u00e0 : \u00a7e{1} parseError=Erreur de conversion {0} \u00e0 la ligne {1} pendingTeleportCancelled=\u00a7cRequete de t\u00e9l\u00e9portation annul\u00e9e. permissionsError=Permissions/GroupManager manquant, les pr\u00e9fixes et suffixes ne seront pas affich\u00e9s. @@ -271,14 +280,6 @@ powerToolRemoveAll=Toutes les commandes retir\u00e9es de {0}. powerToolsDisabled=Toutes vos commandes assign\u00e9es ont \u00e9t\u00e9 retir\u00e9es. powerToolsEnabled=Toutes vos commandes assign\u00e9es ont \u00e9t\u00e9 activ\u00e9es. protectionOwner=\u00a76[EssentialsProtect] Propri\u00e9taire de la protection : {0} -pTimeCurrent=Pour \u00a7e{0}\u00a7f l''heure est {1}. -pTimeCurrentFixed=L''heure de \u00a7e{0}\u00a7f est fix\u00e9e \u00e0 {1}. -pTimeNormal=\u00a7fPour \u00a7e{0}\u00a7f l'heure est normale et correspond au server. -pTimeOthersPermission=\u00a7cVous n'etes pas autoris\u00e9 \u00e0 changer l'heure des autres joueurs. -pTimePlayers=Ces joueurs ont leur propre horraire : -pTimeReset=l''heure a \u00e9t\u00e9 r\u00e9initialis\u00e9e \u00e0 : \u00a7e{0} -pTimeSet=l''heure du joueur a \u00e9t\u00e9 r\u00e9egl\u00e9ee \u00e0 \u00a73{0}\u00a7f pour : \u00a7e{1} -pTimeSetFixed=l''heure du joueur a \u00e9t\u00e9 fix\u00e9e \u00e0 : \u00a7e{1} questionFormat=\u00a77[Question]\u00a7f {0} readNextPage=Utilisez /{0} {1} pour lire la page suivante. reloadAllPlugins=\u00a77Toutes les extensions ont \u00e9t\u00e9 recharg\u00e9es. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74Vous n'avez pas l'autorisation de cr\u00e9er u similarWarpExist=Un point de t\u00e9l\u00e9portation avec un nom similaire existe d\u00e9j\u00e0. slimeMalformedSize=Taille mal form\u00e9e. soloMob=Ce cr\u00e9ature aime \u00eatre seul. -spawned=invoqu\u00e9(s) spawnSet=\u00a77Le point de d\u00e9part a \u00e9t\u00e9 d\u00e9fini pour le groupe {0}. +spawned=invoqu\u00e9(s) suicideMessage=\u00a77Au revoir monde cruel... suicideSuccess=\u00a77{0} s''est suicid\u00e9. survival=survie @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} ont \u00e9t\u00e9 retir\u00e9 de votre compte. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Demande de t\u00e9l\u00e9portation envoy\u00e9e \u00e0 tous les joueurs... teleportAll=\u00a77T\u00e9l\u00e9poration de tous les joueurs. -teleportationCommencing=\u00a77D\u00e9but de la t\u00e9l\u00e9portation... -teleportationDisabled=\u00a77T\u00e9l\u00e9poration d\u00e9sactiv\u00e9. -teleportationEnabled=\u00a77T\u00e9l\u00e9portation activ\u00e9e. teleportAtoB=\u00a77{0}\u00a77 vous a t\u00e9l\u00e9port\u00e9 \u00e0 {1}\u00a77. teleportDisabled={0} a la t\u00e9l\u00e9portation d\u00e9sactiv\u00e9. teleportHereRequest=\u00a7c{0}\u00a7c Vous a demand\u00e9 de vous t\u00e9l\u00e9porter \u00e0 lui/elle. -teleporting=\u00a77T\u00e9l\u00e9poration en cours... -teleportingPortal=\u00a77T\u00e9l\u00e9portation via portail. teleportNewPlayerError=\u00c9chec de la t\u00e9l\u00e9portation du nouveau joueur. teleportRequest=\u00a7c{0}\u00a7c vous demande s''il peut se t\u00e9l\u00e9porter vers vous. teleportRequestTimeoutInfo=\u00a77Cette demande de t\u00e9l\u00e9portation expirera dans {0} secondes. teleportTop=\u00a77T\u00e9l\u00e9portation vers le haut. -tempbanExempt=\u00a77Vous ne pouvez pas bannir temporairement ce joueur. +teleportationCommencing=\u00a77D\u00e9but de la t\u00e9l\u00e9portation... +teleportationDisabled=\u00a77T\u00e9l\u00e9poration d\u00e9sactiv\u00e9. +teleportationEnabled=\u00a77T\u00e9l\u00e9portation activ\u00e9e. +teleporting=\u00a77T\u00e9l\u00e9poration en cours... +teleportingPortal=\u00a77T\u00e9l\u00e9portation via portail. tempBanned=Banni temporairement du serveur pour {0} +tempbanExempt=\u00a77Vous ne pouvez pas bannir temporairement ce joueur. thunder=Vous avez {0} la foudre dans votre monde. thunderDuration=Vous avez {0} la foudre dans le serveur pendant {1} secondes. timeBeforeHeal=Temps avant le prochain soin : {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cPas de permission pour l''objet illimit\u00e9 {0} unlimitedItems=Objets illimit\u00e9s: unmutedPlayer=Le joueur {0} n''est plus muet. upgradingFilesError=Erreur durant la mise \u00e0 jour des fichiers. -userdataMoveBackError=Echec du d\u00e9placement de userdata/{0}.tmp vers userdata/{1} -userdataMoveError=Echec du d\u00e9placement de userdata/{0} vers userdata/{1}.tmp userDoesNotExist=L''utilisateur {0} n''existe pas. userIsAway={0} s'est mis en AFK userIsNotAway={0} n'est plus AFK userJailed=\u00a77Vous avez \u00e9t\u00e9 emprisonn\u00e9. userUsedPortal={0} a utilis\u00e9 un portail existant. +userdataMoveBackError=Echec du d\u00e9placement de userdata/{0}.tmp vers userdata/{1} +userdataMoveError=Echec du d\u00e9placement de userdata/{0} vers userdata/{1}.tmp usingTempFolderForTesting=Utilise un fichier temporaire pour un test. versionMismatch=Versions diff\u00e9rentes ! Mettez s''il vous plait {0} \u00e0 la m\u00eame version. versionMismatchAll=Mauvaise version ! S'il vous plait mettez des jars Essentials de version identique. voiceSilenced=\u00a77Vous avez \u00e9t\u00e9 r\u00e9duit au silence. warpDeleteError=Probl\u00c3\u00a8me concernant la suppression du fichier warp. -warpingTo=\u00a77T\u00e9l\u00e9portation vers {0}. warpListPermission=\u00a7cVous n'avez pas la permission d'afficher la liste des points de t\u00e9l\u00e9portation. warpNotExist=Ce point de t\u00e9l\u00e9portation n'existe pas. -warps=point de t\u00e9l\u00e9portations : {0} -warpsCount=\u00a77Il y a {0} points de t\u00e9l\u00e9portations. Page {1} sur {2}. warpSet=\u00a77Le point de t\u00e9l\u00e9portation {0} a \u00e9t\u00e9 cr\u00e9\u00e9. warpUsePermission=\u00a7cVous n'avez pas la permission d'utiliser ce point de t\u00e9l\u00e9portation. +warpingTo=\u00a77T\u00e9l\u00e9portation vers {0}. +warps=point de t\u00e9l\u00e9portations : {0} +warpsCount=\u00a77Il y a {0} points de t\u00e9l\u00e9portations. Page {1} sur {2}. weatherStorm=\u00a77Vous avez programm\u00e9 l''orage dans {0} weatherStormFor=\u00a77Vous avez programm\u00e9 l''orage dans {0} pour {1} secondes. weatherSun=\u00a77Vous avez programm\u00e9 le beau temps dans {0} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 51bbe2bed..da88603d6 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -11,9 +11,9 @@ alertPlaced=geplaatst: alertUsed=gebruikt: autoAfkKickReason=You have been kicked for idling more than {0} minutes. backAfterDeath=\u00a77Gebruik het /back command om terug te keren naar je sterfplaats. +backUsageMsg=\u00a77Naar de vorige locatie aan het gaan. backupFinished=Backup voltooid backupStarted=Backup gestart -backUsageMsg=\u00a77Naar de vorige locatie aan het gaan. balance=\u00a77Saldo: {0} balanceTop=\u00a77 Top saldi ({0}) banExempt=\u00a77Je kunt deze speler niet verbannen. @@ -49,6 +49,7 @@ couldNotFindTemplate=Het sjabloon kon niet worden gevonden {0} creatingConfigFromTemplate=Bezig met aanmaken van een config vanaf sjabloon: {0} creatingEmptyConfig=Bezig met een lege config aanmaken: {0} creative=creative +currency={0}{1} day=dag days=dagen defaultBanReason=De Ban Hamer heeft gesproken! @@ -64,14 +65,14 @@ depth=\u00a77Je zit op zeeniveau. depthAboveSea=\u00a77Je zit {0} blok(ken) boven zeeniveau. depthBelowSea=\u00a77Je zit {0} blok(ken) onder zeeniveau. destinationNotSet=Bestemming niet ingesteld +disableUnlimited=\u00a77Oneindig plaatsen van {0} uitgeschakeld voor {1}. disabled=uitgeschakeld disabledToSpawnMob=Spawning this mob was disabled in the config file. -disableUnlimited=\u00a77Oneindig plaatsen van {0} uitgeschakeld voor {1}. dontMoveMessage=\u00a77Beginnen met teleporteren in {0}. Niet bewegen. downloadingGeoIp=Bezig met downloaden van GeoIP database ... Dit kan een tijdje duren (country: 0.6 MB, city: 20MB) duplicatedUserdata=Dubbele userdata: {0} en {1}. -enabled=ingeschakeld enableUnlimited=\u00a77Oneindig aantal {0} aan {1} gegeven. +enabled=ingeschakeld enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. enchantmentNotFound = \u00a7cEnchantment not found enchantmentPerm = \u00a7cYou do not have the permission for {0} @@ -99,9 +100,9 @@ gcentities= entities gcfree=Vrij geheugen: {0} MB gcmax=Maximaal geheugen: {0} MB gctotal=Gealloceerd geheugen: {0} MB -geoipJoinFormat=Speler {0} komt uit {1} geoIpUrlEmpty=GeoIP download url is leeg. geoIpUrlInvalid=GeoIP download url is ongeldig. +geoipJoinFormat=Speler {0} komt uit {1} godDisabledFor=uitgeschakeld voor {0} godEnabledFor=ingeschakeld voor {0} godMode=\u00a77God mode {0}. @@ -112,9 +113,9 @@ helpConsole=type ? om de consolehelp weer te geven. helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f: holeInFloor=Gat in de vloer -homes=Homes: {0} homeSet=\u00a77Home ingesteld. homeSetToBed=\u00a77Je home is is nu verplaatst naar dit bed. +homes=Homes: {0} hour=uur hours=uren ignorePlayer=Je negeert {0} vanaf nu. @@ -124,28 +125,28 @@ infoChapterPages=Hoofdstuk {0}, Pagina \u00a7c{1}\u00a7f van de \u00a7c{2}\u00a7 infoFileDoesNotExist=Bestand info.txt bestaat niet. Bezig met aanmaken. infoPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f: infoUnknownChapter=Onbekend hoofdstuk. +invBigger=De inventory van de andere speler is groter dan die van jou. +invRestored=Je inventory is hersteld. +invSee=Je kijkt naar de inventory van {0}. +invSeeHelp=Type /invsee om je inventory te herstellen. invalidCharge=\u00a7cOngeldig te laden. invalidMob=Ongeldig mob type. invalidServer=Ongeldige server! invalidSignLine=Regel {0} op het bordje is ongeldig. invalidWorld=\u00a7cOngeldige wereld. -invBigger=De inventory van de andere speler is groter dan die van jou. inventoryCleared=\u00a77inventory leeggemaakt. inventoryClearedOthers=\u00a77inventory van \u00a7c{0}\u00a77 leeggemaakt. -invRestored=Je inventory is hersteld. -invSee=Je kijkt naar de inventory van {0}. -invSeeHelp=Type /invsee om je inventory te herstellen. is=is itemCannotBeSold=Dat voorwerp kan niet aan de server worden verkocht. itemMustBeStacked=Voorwerp moet geruild worden als stapel. Een hoeveelheid van 2 moet dus geruild worden als twee stapels, etc. itemNotEnough1=\u00a7cJe hebt niet genoeg van dat voorwerp om te verkopen. itemNotEnough2=\u00a77Type /sell itemname Als je alles daarvan wilt verkopen itemNotEnough3=\u00a77/sell itemname -1 zorgt ervoor dat ze allemaal behalve 1 worden verkocht, etc. -itemsCsvNotLoaded=De item kunnen niet geladen worden.csv. itemSellAir=Je wilde serieus lucht verkopen? Plaats een voorwerp in je hand. itemSold=\u00a77Verkocht voor \u00a7c{0} \u00a77({1} {2} voorwerpen voor {3} per stuk) itemSoldConsole={0} verkocht {1} voor \u00a77{2} \u00a77({3} voorwerpen voor {4} per stuk) itemSpawn=\u00a77Geeft {0} {1} +itemsCsvNotLoaded=De item kunnen niet geladen worden.csv. jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0} jailMessage=\u00a7cYou do the crime, you do the time. jailNotExist=Die gevangenis bestaat niet. @@ -162,8 +163,8 @@ kitError=\u00a7cEr zijn geen geldige kits. kitErrorHelp=\u00a7cMisschien mist er een hoeveelheid van het item in de configuratie? kitGive=\u00a77Kit {0} wordt gegeven. kitInvFull=\u00a7cJe inventory was vol, de kit wordt op de grond geplaatst -kits=\u00a77Kits: {0} kitTimed=\u00a7cJe kan die kit pas weer gebruiken over {0}. +kits=\u00a77Kits: {0} lightningSmited=\u00a77Je bent zojuist verbrand lightningUse=\u00a77Brand {0} listAfkTag = \u00a77[AFK]\u00a7f @@ -175,9 +176,9 @@ localFormat=Local: <{0}> {1} mailClear=\u00a7cType /mail clear, om ej berichten als gelezen te markeren. mailCleared=\u00a77Bericht geklaard! mailSent=\u00a77Bericht verzonden! +markMailAsRead=\u00a7cType /mail clear, om je berichten als gelezen te markeren markedAsAway=\u00a77Je staat nu als afwezig gemeld. markedAsNotAway=\u00a77Je staat niet meer als afwezig gemeld. -markMailAsRead=\u00a7cType /mail clear, om je berichten als gelezen te markeren maxHomes=You cannot set more than {0} homes. mayNotJail=\u00a7cJe mag die speler niet in de gevangenis zetten. me=me @@ -185,10 +186,10 @@ minute=minuut minutes=minuten missingItems=Je hebt geen {0}x {1}. missingPrefixSuffix=Er mist een prefix of suffix voor {0} -mobsAvailable=\u00a77Mobs: {0} mobSpawnError=Fout bij het veranderen van de mob spawner. mobSpawnLimit=Grootte van de mob hang af van het server limiet mobSpawnTarget=Target blok moet een mob spawner zijn. +mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} is ontvangen van {1} moneySentTo=\u00a7a{0} is verzonden naar {1} moneyTaken={0} van je bankrekening afgehaald. @@ -196,10 +197,10 @@ month=maand months=maanden moreThanZero=Het aantal moet groter zijn dan 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cJe kan deze speler niet muten. mutedPlayer=Speler {0} gemute. mutedPlayerFor=Speler {0} is gemute voor {1}. mutedUserSpeaks={0} probeerde te praten, maar is gemute. -muteExempt=\u00a7cJe kan deze speler niet muten. nearbyPlayers=Players nearby: {0} needTpohere=Je moet toegang krijgen tot /tpohere om naar andere spelers te teleporteren. negativeBalanceError=Speler is niet toegestaan om een negatief saldo te hebben. @@ -221,7 +222,6 @@ noKitPermission=\u00a7cJe hebt de \u00a7c{0}\u00a7c toestemming nodig om die kit noKits=\u00a77Er zijn nog geen kits beschikbaar noMail=Je hebt geen berichten noMotd=\u00a7cEr is geen bericht van de dag. -none=geen noNewMail=\u00a77Je hebt geen nieuwe berichten. noPendingRequest=Je hebt geen aanvragen. noPerm=\u00a7cJe hebt de \u00a7f{0}\u00a7c toestemming niet. @@ -229,21 +229,30 @@ noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. noPlacePermission=\u00a7cJe hebt geen toestemming om een blok naast die sign te plaatsen. noPowerTools=You have no power tools assigned. noRules=\u00a7cEr zijn nog geen regels gegeven. +noWarpsDefined=Geen warps gedefinieerd +none=geen notAllowedToQuestion=\u00a7cJe bent niet bevoegd om de vraag functie te gebruiken. notAllowedToShout=\u00a7cJe bent niet bevoegd om de roep functie te gebruiken. notEnoughExperience=You do not have enough experience. notEnoughMoney=Je hebt niet voldoende middelen. -nothingInHand = \u00a7cYou have nothing in your hand. notRecommendedBukkit=* ! * De Bukkit versie is niet de aangeraden build voor Essentials. notSupportedYet=Nog niet ondersteund. +nothingInHand = \u00a7cYou have nothing in your hand. now=nu -noWarpsDefined=Geen warps gedefinieerd nuke=May death rain upon them numberRequired=Er moet daar een nummer, grapjas. onlyDayNight=/time ondersteund alleen day/night. onlyPlayers=Alleen in-game spelers kunnen {0} gebruiken. onlySunStorm=/weather only supports sun/storm. orderBalances=Ordering balances of {0} users, please wait ... +pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. +pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. +pTimePlayers=These players have their own time: +pTimeReset=Player time has been reset for: \u00a7e{0} +pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} +pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} parseError=Fout bij ontleding {0} op regel {1} pendingTeleportCancelled=\u00a7cAangevraagde teleportatie afgelast. permissionsError=Permissions/GroupManager ontbreekt; chat prefixes/suffixes worden uitgeschakeld. @@ -271,14 +280,6 @@ powerToolRemoveAll=All commands removed from {0}. powerToolsDisabled=All of your power tools have been disabled. powerToolsEnabled=All of your power tools have been enabled. protectionOwner=\u00a76[EssentialsProtect] Beschermingeigenaar: {0} -pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. -pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. -pTimePlayers=These players have their own time: -pTimeReset=Player time has been reset for: \u00a7e{0} -pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} -pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} questionFormat=\u00a77[Vraag]\u00a7f {0} readNextPage=Type /{0} {1} to read the next page reloadAllPlugins=\u00a77Alle plugins zijn herladen. @@ -312,8 +313,8 @@ signProtectInvalidLocation=\u00a74You are not allowed to create sign here. similarWarpExist=Er bestaat al een warp met dezelfde naam. slimeMalformedSize=Misvoormde grootte. soloMob=Die mob is liever in zijn eentje -spawned=gespawned spawnSet=\u00a77Spawn locatie voor de groep {0} ingesteld. +spawned=gespawned suicideMessage=\u00a77Vaarwel vreedzame wereld... suicideSuccess= \u00a77{0} pleegde zelfmoord survival=survival @@ -321,20 +322,20 @@ takenFromAccount=\u00a7c{0} is van je bank rekening afgehaald. takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Bezig met teleporteren van alle spelers... -teleportationCommencing=\u00a77Aan het beginnen met teleporteren... -teleportationDisabled=\u00a77Teleportatie uitgeschakeld. -teleportationEnabled=\u00a77Teleportatie ingeschakeld. teleportAtoB=\u00a77{0}\u00a77 is naar {1}\u00a77 geteleporteerd. teleportDisabled={0} heeft teleporteren uit gezet. teleportHereRequest=\u00a7c{0}\u00a7c Heeft gevraagd of hij/zij naar jou mag teleporteren. -teleporting=\u00a77Bezig met teleporteren... -teleportingPortal=\u00a77Bezig met teleporteren via de portal. teleportNewPlayerError=Fout bij het teleporteren van nieuwe speler. teleportRequest=\u00a7c{0}\u00a7c vraagt of hij jou kan teleporteren. teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. teleportTop=\u00a77Bezig met teleporteren naar de top. -tempbanExempt=\u00a77Je mag deze speler niet een tempban geven +teleportationCommencing=\u00a77Aan het beginnen met teleporteren... +teleportationDisabled=\u00a77Teleportatie uitgeschakeld. +teleportationEnabled=\u00a77Teleportatie ingeschakeld. +teleporting=\u00a77Bezig met teleporteren... +teleportingPortal=\u00a77Bezig met teleporteren via de portal. tempBanned=Tijdelijk geband voor {0} +tempbanExempt=\u00a77Je mag deze speler niet een tempban geven thunder= Je {0} onweert de wereld thunderDuration=Je {0} onweert de wereld voor {1} seconde. timeBeforeHeal=Afkoeltijd tot de volgende heal: {0} @@ -365,25 +366,25 @@ unlimitedItemPermission=\u00a7cOnbevoegd om oneindig {0} te hebben. unlimitedItems=Oneindige voorwerpen: unmutedPlayer=Speler {0} mag weer spreken. upgradingFilesError=Fout tijdens het upgraden van de bestanden -userdataMoveBackError=Fout bij het verplaasten van userdata/{0}.tmp naar userdata/{1} -userdataMoveError=Fout bij het verplaasten van userdata/{0} naar userdata/{1}.tmp userDoesNotExist=Speler {0} bestaat niet. userIsAway={0} is nu AFK userIsNotAway={0} is niet meer AFK userJailed=\u00a77Je bent in de gevangenis gezet. userUsedPortal={0} gebruikte een bestaande uitgangs portal. +userdataMoveBackError=Fout bij het verplaasten van userdata/{0}.tmp naar userdata/{1} +userdataMoveError=Fout bij het verplaasten van userdata/{0} naar userdata/{1}.tmp usingTempFolderForTesting=Tijdelijke map om te testen: versionMismatch=Verkeerde versie! Update {0} naar dezelfde versie. versionMismatchAll=Verkeerde versie! Update alle Essentials jars naar dezelfde versie. voiceSilenced=\u00a77Je kan niet meer praten warpDeleteError=Fout bij het verwijderen van het warp bestand. -warpingTo=\u00a77Aan het warpen naar {0}. warpListPermission=\u00a7cJe hebt geen toegang om die warp te maken. warpNotExist=Die warp bestaat niet. -warps=Warps: {0} -warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. warpSet=\u00a77Warp {0} ingesteld. warpUsePermission=\u00a7cOnbevoegd om die warp te gebruiken. +warpingTo=\u00a77Aan het warpen naar {0}. +warps=Warps: {0} +warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. weatherStorm=\u00a77Je hebt het weer naar storm gezet in de {0} weatherStormFor=\u00a77Je hebt het weer in de {0} naar storm gezet voor {1} seconde weatherSun=\u00a77Je hebt het weer naar zon gezet in de {0} -- cgit v1.2.3 From c3d5b32986bcd5c34df8d534bc9045b9a5ff70da Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 16:17:16 +0000 Subject: Extra command alias. --- Essentials/src/plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 343708b2f..dcc8743b2 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -58,7 +58,7 @@ commands: clearinventory: description: Clear all items in your inventory. usage: / - aliases: [ci,eci,clearinvent,eclearinvent,eclearinventory] + aliases: [ci,eci,clearinvent,clean,eclean,eclearinvent,eclearinventory] compass: description: Describes your current bearing. usage: / -- cgit v1.2.3 From c7a6677d528a92e4820e297cb08bcbe642c5c6ae Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 20:06:50 +0000 Subject: Adding starter/newbie kit to EssentialsSpawn Optimization to EssentialsSpawn join event. --- .../src/com/earth2me/essentials/IEssentials.java | 1 + .../src/com/earth2me/essentials/ISettings.java | 6 +++-- Essentials/src/com/earth2me/essentials/Kit.java | 5 ++-- .../src/com/earth2me/essentials/Settings.java | 6 +++++ .../earth2me/essentials/commands/Commandkit.java | 4 +-- Essentials/src/config.yml | 5 ++++ .../spawn/EssentialsSpawnPlayerListener.java | 31 +++++++++++++++++----- 7 files changed, 45 insertions(+), 13 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/IEssentials.java b/Essentials/src/com/earth2me/essentials/IEssentials.java index 20c6c300e..6b820440a 100644 --- a/Essentials/src/com/earth2me/essentials/IEssentials.java +++ b/Essentials/src/com/earth2me/essentials/IEssentials.java @@ -9,6 +9,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitScheduler; + /** * @deprecated This will be moved to the api package soon */ diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index 6186736b4..ec3941cd1 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -20,6 +20,8 @@ public interface ISettings extends IConf boolean getAnnounceNewPlayers(); + String getNewPlayerKit(); + String getBackupCommand(); long getBackupInterval(); @@ -115,11 +117,11 @@ public interface ISettings extends IConf boolean warnOnSmite(); double getMaxMoney(); - + double getMinMoney(); boolean isEcoLogEnabled(); - + boolean isEcoLogUpdateEnabled(); boolean removeGodOnDisconnect(); diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index 47e5e6ac2..cf39997ea 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -63,10 +63,11 @@ public class Kit public static List getItems(final User user, final Map kit) throws Exception { - if (kit == null) { + if (kit == null) + { throw new Exception(_("kitError2")); } - + try { return (List)kit.get("items"); diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index e3992e52c..c9232f107 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -351,6 +351,12 @@ public class Settings implements ISettings return new SimpleTextInput(Util.replaceColor(config.getString("newbies.announce-format", "&dWelcome {DISPLAYNAME} to the server!"))); } + @Override + public String getNewPlayerKit() + { + return config.getString("newbies.kit", ""); + } + @Override public String getNewbieSpawn() { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java index aee0af910..67f0fafd0 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java @@ -38,7 +38,7 @@ public class Commandkit extends EssentialsCommand { throw new Exception(_("noKitPermission", "essentials.kit." + kitName)); } - + final List items = Kit.getItems(user, kit); Kit.checkTime(user, kitName, kit); @@ -47,7 +47,7 @@ public class Commandkit extends EssentialsCommand charge.isAffordableFor(user); Kit.expandItems(ess, user, items); - + charge.charge(user); user.sendMessage(_("kitGive", kitName)); diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 81d911c82..11bc38329 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -547,6 +547,11 @@ newbies: # When we spawn for the first time, which spawnpoint do we use? # Set to "none" if you want to use the spawn point of the world. spawnpoint: newbies + + # Do we want to give users anything on first join? Set to '' to disable + # This kit will be given reguardless of cost, and permissions. + #kit: '' + kit: tools # Set this to lowest, if you want Multiverse to handle the respawning # Set this to high, if you want EssentialsSpawn to handle the respawning diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java index c7a17845a..ba71c176f 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java @@ -1,12 +1,13 @@ package com.earth2me.essentials.spawn; +import com.earth2me.essentials.*; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.OfflinePlayer; -import com.earth2me.essentials.User; import com.earth2me.essentials.textreader.IText; import com.earth2me.essentials.textreader.KeywordReplacer; import com.earth2me.essentials.textreader.SimpleTextPager; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.Bukkit; @@ -67,13 +68,14 @@ public class EssentialsSpawnPlayerListener implements Listener public void onPlayerJoin(final PlayerJoinEvent event) { - final User user = ess.getUser(event.getPlayer()); - - if (user.hasPlayedBefore()) + if (event.getPlayer().hasPlayedBefore()) { LOGGER.log(Level.FINE, "Old player join"); return; } + + final User user = ess.getUser(event.getPlayer()); + if (!"none".equalsIgnoreCase(ess.getSettings().getNewbieSpawn())) { ess.scheduleSyncDelayedTask(new NewPlayerTeleport(user), 1L); @@ -86,6 +88,21 @@ public class EssentialsSpawnPlayerListener implements Listener ess.broadcastMessage(user, pager.getString(0)); } + final String kitName = ess.getSettings().getNewPlayerKit(); + if (!kitName.isEmpty()) + { + try + { + final Map kit = ess.getSettings().getKit(kitName.toLowerCase(Locale.ENGLISH)); + final List items = Kit.getItems(user, kit); + Kit.expandItems(ess, user, items); + } + catch (Exception ex) + { + LOGGER.log(Level.WARNING, ex.getMessage()); + } + } + LOGGER.log(Level.FINE, "New player join"); } @@ -109,7 +126,7 @@ public class EssentialsSpawnPlayerListener implements Listener try { - Location spawn = spawns.getSpawn(ess.getSettings().getNewbieSpawn()); + final Location spawn = spawns.getSpawn(ess.getSettings().getNewbieSpawn()); if (spawn != null) { user.getTeleport().now(spawn, false, TeleportCause.PLUGIN); -- cgit v1.2.3 From 2b25ca2932d9a0d72f4651cf77a8895045f97a98 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 21:43:24 +0000 Subject: CME --- Essentials/src/com/earth2me/essentials/Mob.java | 3 ++- Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java index 7be698950..8523a1a87 100644 --- a/Essentials/src/com/earth2me/essentials/Mob.java +++ b/Essentials/src/com/earth2me/essentials/Mob.java @@ -1,6 +1,7 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; +import java.util.Collections; import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -71,7 +72,7 @@ public enum Mob } public static Set getMobList() { - return hashMap.keySet(); + return Collections.unmodifiableSet(hashMap.keySet()); } public LivingEntity spawn(final Player player, final Server server, final Location loc) throws MobException diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 4971c7922..5c0dc84fe 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -27,7 +27,7 @@ public class Commandspawnmob extends EssentialsCommand { if (args.length < 1) { - Set availableList = Mob.getMobList(); + final Set availableList = Mob.getMobList(); for (String mob : availableList) { if (!user.isAuthorized("essentials.spawnmob." + mob.toLowerCase())) -- cgit v1.2.3 From 15c0565923cf521daa8af3dac10aed6b38133c98 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 4 Mar 2012 21:54:51 +0000 Subject: Build custom mob list /spawnmob --- .../com/earth2me/essentials/commands/Commandspawnmob.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 5c0dc84fe..97141e585 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -5,9 +5,7 @@ import com.earth2me.essentials.Mob; import com.earth2me.essentials.Mob.MobException; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; -import java.util.Locale; -import java.util.Random; -import java.util.Set; +import java.util.*; import org.bukkit.DyeColor; import org.bukkit.Location; import org.bukkit.Server; @@ -27,12 +25,13 @@ public class Commandspawnmob extends EssentialsCommand { if (args.length < 1) { - final Set availableList = Mob.getMobList(); - for (String mob : availableList) + final Set mobList = Mob.getMobList(); + final Set availableList = new HashSet(); + for (String mob : mobList) { - if (!user.isAuthorized("essentials.spawnmob." + mob.toLowerCase())) + if (user.isAuthorized("essentials.spawnmob." + mob.toLowerCase())) { - availableList.remove(mob); + availableList.add(mob); } } if (availableList.isEmpty()) -- cgit v1.2.3 From 7819b9d2f027cd0fc4c6a11e325e2f2dbc839946 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 00:08:37 +0000 Subject: Apply colors to group tags. --- Essentials/src/com/earth2me/essentials/commands/Commandlist.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java index 92833a66c..187e6c7e5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import com.earth2me.essentials.Util; import java.util.*; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -72,7 +73,7 @@ public class Commandlist extends EssentialsCommand for (String group : groups) { final StringBuilder groupString = new StringBuilder(); - groupString.append(group).append(": "); + groupString.append(Util.replaceColor(group)).append(": "); final List users = sort.get(group); Collections.sort(users); boolean first = true; -- cgit v1.2.3 From 8577202f4882a588f458423bd3026b4ec3cefbed Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 00:19:40 +0000 Subject: Add listgroups as TL key --- Essentials/src/com/earth2me/essentials/commands/Commandlist.java | 2 +- Essentials/src/messages.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_nl.properties | 1 + 8 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java index 187e6c7e5..77788c7c2 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java @@ -73,7 +73,7 @@ public class Commandlist extends EssentialsCommand for (String group : groups) { final StringBuilder groupString = new StringBuilder(); - groupString.append(Util.replaceColor(group)).append(": "); + groupString.append(_("listGroupTag",Util.replaceColor(group))); final List users = sort.get(group); Collections.sort(users); boolean first = true; diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index d10ec0908..60b09b734 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Failed to load warp {0} localFormat=Local: <{0}> {1} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 9bb84edba..0b8671379 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Kaster lyn efter {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79Der er \u00a7c{0}\u00a79 ud af maksimum\u00a7c{1}\u00a79 spillere online. listAmountHidden = \u00a79Der er \u00a7c{0}\u00a77/{1}\u00a79 ud af maksimum \u00a7c{2}\u00a79 spillere online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Kunne ikke l\u00c3\u00a6se warp {0} localFormat=Local: <{0}> {1} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 944d5c7ef..fac736f2b 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Peinige {0} listAfkTag = \u00a77[Inaktiv]\u00a7f listAmount = \u00a79Es sind \u00a7c{0}\u00a79 von maximal \u00a7c{1}\u00a79 Spielern online. listAmountHidden = \u00a79Es sind \u00a7c{0}\u00a77/{1}\u00a79 von maximal \u00a7c{2}\u00a79 Spielern online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[Versteckt]\u00a7f loadWarpError=Fehler beim Laden von Warp-Punkt {0} localFormat=Lokal: <{0}> {1} diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index c38abd727..66f357022 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -408,3 +408,4 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. +listGroupTag={0}\u00a7f: diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 07a788eb5..fbaba1cac 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Golpeando a {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Error al cargar el tenetransporte {0} localFormat=Local: <{0}> {1} diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 8afe6cb0c..0473b3ce4 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77{0} a \u00e9t\u00e9 foudroy\u00e9. listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79Il y a \u00a7c{0}\u00a79 joueurs en ligne sur \u00a7c{1}\u00a79 au total. listAmountHidden = \u00a79Il y a \u00a7c{0}\u00a77/{1}\u00a79 sur un maximum de \u00a7c{2}\u00a79 joueurs en ligne. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[MASQU\u00c9]\u00a7f loadWarpError=\u00c9chec du chargement du point de t\u00e9l\u00e9portation {0}. localFormat=Locale : <{0}> {1} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index da88603d6..05a735949 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Brand {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Fout bij het laden van warp {0} localFormat=Local: <{0}> {1} -- cgit v1.2.3 From e91ed6044141a60d70d65dba464d5e3d189b056a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 00:22:31 +0000 Subject: Fixing spawnmob count. --- Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 97141e585..c8478f923 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -175,7 +175,7 @@ public class Commandspawnmob extends EssentialsCommand changeMobData(mobMount.getType(), spawnedMount, mountData, user); } } - user.sendMessage(args[1] + " " + mob.name.toLowerCase(Locale.ENGLISH) + mob.suffix + " " + _("spawned")); + user.sendMessage(mobCount + " " + mob.name.toLowerCase(Locale.ENGLISH) + mob.suffix + " " + _("spawned")); } catch (MobException e1) { -- cgit v1.2.3 From bdf32cde9e3ca43c0fcf35dac57160e8cd1db4ac Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 00:39:37 +0000 Subject: Missed one. --- Essentials/src/messages_en.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 66f357022..d1499aad8 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -170,6 +170,7 @@ lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listGroupTag={0}\u00a7f: listHiddenTag = \u00a77[HIDDEN]\u00a7f loadWarpError=Failed to load warp {0} localFormat=Local: <{0}> {1} @@ -408,4 +409,3 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. -listGroupTag={0}\u00a7f: -- cgit v1.2.3 From 0dd5c0370ee0cd01ec07cf3b6acef67985e5999e Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 5 Mar 2012 18:40:18 +1100 Subject: I dont think free noteblocks are a good idea --- Essentials/src/com/earth2me/essentials/commands/Commandessentials.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java index 56432a91f..ce2f03af9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java @@ -117,7 +117,7 @@ public class Commandessentials extends EssentialsCommand if (loc.getBlock().getTypeId() == 0) { noteBlocks.put(player, loc.getBlock()); - loc.getBlock().setType(Material.NOTE_BLOCK); + player.sendBlockChange(loc, Material.NOTE_BLOCK, (byte)0); } } taskid = ess.scheduleSyncRepeatingTask(new Runnable() @@ -149,7 +149,6 @@ public class Commandessentials extends EssentialsCommand } } }, 20, 2); - return; } private void stopTune() -- cgit v1.2.3 From 96b217cbe8336810dcb760dfc1845b0472057682 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 08:41:19 +0000 Subject: Craftbukkit/Bukkit R7 --- lib/bukkit.jar | Bin 4686754 -> 4686877 bytes lib/craftbukkit.jar | Bin 10919232 -> 10921072 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/bukkit.jar b/lib/bukkit.jar index 28e143709..8d0f64e0e 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index ce2ecfeb8..7c14fe740 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From ba96117f55384275c655e9be3bae891d284e7631 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 14:17:09 +0000 Subject: Temp fix to disable version check on R7 --- Essentials/src/com/earth2me/essentials/Essentials.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 24ac0ad6e..d7f749eb7 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -133,7 +133,7 @@ public class Essentials extends JavaPlugin implements IEssentials if (versionMatch.matches()) { final int versionNumber = Integer.parseInt(versionMatch.group(1)); - if (versionNumber < BUKKIT_VERSION) + if (versionNumber < BUKKIT_VERSION && versionNumber > 100) { LOGGER.log(Level.SEVERE, _("notRecommendedBukkit")); LOGGER.log(Level.SEVERE, _("requiredBukkit", Integer.toString(BUKKIT_VERSION))); -- cgit v1.2.3 From 1e34a396cd1ab01c1b5cae038deac09bbf776615 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 5 Mar 2012 15:51:15 +0000 Subject: Change starter kit to default to stone tools --- Essentials/src/config.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 11bc38329..4c9b31dc0 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -158,12 +158,19 @@ player-commands: # All kit names should be lower case, and will be treated as lower in permissions/costs. # Times are measured in seconds. kits: - tools: + dtools: delay: 10 items: - 277 1 - 278 1 - 279 1 + tools: + delay: 10 + items: + - 272 1 + - 273 1 + - 274 1 + - 275 1 # Essentials Sign Control # See http://ess.khhq.net/wiki/Sign_Tutorial for instructions on how to use these. -- cgit v1.2.3 From 5c55e18d33c64d1dd4f82b7c4ddeda8061a96cd7 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 6 Mar 2012 23:17:10 +0000 Subject: Fixing typo in config.yml --- Essentials/src/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 4c9b31dc0..6a0f6e996 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -83,7 +83,7 @@ warn-on-smite: true overridden-commands: - god -# Disabled commands will be completelly unavailable on the server. +# Disabled commands will be completely unavailable on the server. disabled-commands: # - nick @@ -326,9 +326,9 @@ currency-symbol: '$' # The amount is always limited to 10 trillions because of the limitations of a java double max-money: 10000000000000 -# Set the minimum amount of money a player can have -# Setting this to 0, will disable overdrafts/loans compeltely. Users need 'essentials.eco.loan' perm to go below 0. -min-money: -10000000000000 +# Set the minimum amount of money a player can have (must be above the negitive of max-money). +# Setting this to 0, will disable overdrafts/loans completely. Users need 'essentials.eco.loan' perm to go below 0. +min-money: -10000 # Enable this to log all interactions with trade/buy/sell signs and sell command economy-log-enabled: false -- cgit v1.2.3 From 9ac5ce8a752bbd546dfba6e75b73d873be2265e5 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 7 Mar 2012 12:14:32 +0000 Subject: Update info.txt to hint at /einfo. --- Essentials/src/info.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Essentials/src/info.txt b/Essentials/src/info.txt index efc629923..0b4fb3c42 100644 --- a/Essentials/src/info.txt +++ b/Essentials/src/info.txt @@ -11,6 +11,9 @@ Extra pages: Type /info Colours Type /info Tags +If you have problem viewing this file ingame, try using /einfo. +If this works, it means another command is blocking /info. + It can contain chapters like the Chapter1 below: #Chapter1 -- cgit v1.2.3 From c7046b696ab7f6136acf4c22fb0e7b0d88d91629 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 10 Mar 2012 21:42:46 +0000 Subject: Use ignoreCancelled on event registration. --- .../essentials/EssentialsBlockListener.java | 6 +---- .../essentials/EssentialsEntityListener.java | 8 +++---- .../essentials/EssentialsPlayerListener.java | 26 ++++++---------------- Essentials/src/com/earth2me/essentials/Jails.java | 8 +++---- 4 files changed, 16 insertions(+), 32 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java index f2e2e8a77..17f0f1778 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java @@ -17,13 +17,9 @@ public class EssentialsBlockListener implements Listener this.ess = ess; } - @EventHandler(priority = EventPriority.LOWEST) + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) public void onBlockPlace(final BlockPlaceEvent event) { - if (event.isCancelled()) - { - return; - } final User user = ess.getUser(event.getPlayer()); // Do not rely on getItemInHand(); // http://leaky.bukkit.org/issues/663 diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index 45d78ebeb..524edc16f 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -62,7 +62,7 @@ public class EssentialsEntityListener implements Listener } } - @EventHandler(priority = EventPriority.LOWEST) + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) public void onEntityDamage(final EntityDamageEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) @@ -74,7 +74,7 @@ public class EssentialsEntityListener implements Listener } } - @EventHandler(priority = EventPriority.LOWEST) + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) public void onEntityCombust(final EntityCombustEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) @@ -98,7 +98,7 @@ public class EssentialsEntityListener implements Listener } } - @EventHandler(priority = EventPriority.LOWEST) + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) public void onFoodLevelChange(final FoodLevelChangeEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) @@ -107,7 +107,7 @@ public class EssentialsEntityListener implements Listener } } - @EventHandler(priority = EventPriority.LOWEST) + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) public void onEntityRegainHealth(final EntityRegainHealthEvent event) { if (event.getRegainReason() == RegainReason.SATIATED && event.getEntity() instanceof Player diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 7ab1847f1..c1bd9bbe0 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -75,13 +75,9 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.HIGH) + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerMove(final PlayerMoveEvent event) { - if (event.isCancelled()) - { - return; - } final User user = ess.getUser(event.getPlayer()); if (user.isAfk() && ess.getSettings().getFreezeAfkPlayers()) @@ -231,13 +227,9 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.HIGH) + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerTeleport(final PlayerTeleportEvent event) { - if (event.isCancelled()) - { - return; - } //There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports. if ((event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND) && ess.getSettings().registerBackInListener()) @@ -248,7 +240,7 @@ public class EssentialsPlayerListener implements Listener } - @EventHandler(priority = EventPriority.HIGH) + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerEggThrow(final PlayerEggThrowEvent event) { final User user = ess.getUser(event.getPlayer()); @@ -260,7 +252,7 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.HIGH) + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerBucketEmpty(final PlayerBucketEmptyEvent event) { final User user = ess.getUser(event.getPlayer()); @@ -278,13 +270,9 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event) { - if (event.isCancelled()) - { - return; - } final User user = ess.getUser(event.getPlayer()); final String cmd = event.getMessage().toLowerCase(Locale.ENGLISH).split(" ")[0].replace("/", "").toLowerCase(Locale.ENGLISH); final List commands = Arrays.asList("msg", "r", "mail", "m", "t", "emsg", "tell", "er", "reply", "ereply", "email"); @@ -400,10 +388,10 @@ public class EssentialsPlayerListener implements Listener return used; } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayerPickupItem(final PlayerPickupItemEvent event) { - if (event.isCancelled() || !ess.getSettings().getDisableItemPickupWhileAfk()) + if (!ess.getSettings().getDisableItemPickupWhileAfk()) { return; } diff --git a/Essentials/src/com/earth2me/essentials/Jails.java b/Essentials/src/com/earth2me/essentials/Jails.java index 7217992ad..67c46a310 100644 --- a/Essentials/src/com/earth2me/essentials/Jails.java +++ b/Essentials/src/com/earth2me/essentials/Jails.java @@ -149,7 +149,7 @@ public class Jails extends AsyncStorageObjectHolder Date: Sun, 11 Mar 2012 01:46:01 +0000 Subject: Add Enderman check to EntityChangeEvent (Should fix sheep eating grass). --- .../earth2me/essentials/protect/EssentialsProtectEntityListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java index 57302517f..d19f48abb 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java @@ -334,7 +334,7 @@ public class EssentialsProtectEntityListener implements Listener { return; } - if (prot.getSettingBool(ProtectConfig.prevent_enderman_pickup)) + if (event.getEntityType() == EntityType.ENDERMAN && prot.getSettingBool(ProtectConfig.prevent_enderman_pickup)) { event.setCancelled(true); return; -- cgit v1.2.3 From a40c936bcff0a05887d3acc9ab096aaab4b9df2d Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 11 Mar 2012 20:58:54 +0000 Subject: New Permission: essentials.lightning.others With this permission you can use /lightning , without only strike based on direction. --- Essentials/src/com/earth2me/essentials/commands/Commandlightning.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java index be9ac61f5..810ef0b33 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java @@ -24,7 +24,7 @@ public class Commandlightning extends EssentialsCommand { user = ess.getUser(((Player)sender)); } - if (args.length < 1 & user != null) + if ((args.length < 1 || !user.isAuthorized("essentials.lightning.others")) & user != null) { user.getWorld().strikeLightning(user.getTargetBlock(null, 600).getLocation()); return; -- cgit v1.2.3 From 8dcd591beb12bd0bc03f2a3d6092ce1a7654495b Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 11 Mar 2012 23:59:59 +0000 Subject: Update setworth to allow /setworth ingame Allow /setworth to be used from console. --- .../essentials/commands/Commandsetworth.java | 29 +++++++++++++++++++++- Essentials/src/plugin.yml | 2 +- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java index 1d236b70a..734d9244d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import org.bukkit.Server; +import org.bukkit.command.CommandSender; import org.bukkit.inventory.ItemStack; @@ -21,8 +22,34 @@ public class Commandsetworth extends EssentialsCommand throw new NotEnoughArgumentsException(); } + ItemStack stack; + String price; + + if (args.length == 1) + { + stack = user.getInventory().getItemInHand(); + price = args[0]; + } + else + { + stack = ess.getItemDb().get(args[0]); + price = args[1]; + } + + ess.getWorth().setPrice(stack, Double.parseDouble(price)); + user.sendMessage(_("worthSet")); + } + + @Override + public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception + { + if (args.length < 2) + { + throw new NotEnoughArgumentsException(); + } + ItemStack stack = ess.getItemDb().get(args[0]); ess.getWorth().setPrice(stack, Double.parseDouble(args[1])); - user.sendMessage(_("worthSet")); + sender.sendMessage(_("worthSet")); } } diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 714abde4b..27541d782 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -295,7 +295,7 @@ commands: aliases: [createwarp,esetwarp] setworth: description: Set the sell value of an item. - usage: / + usage: / [itemname|id] aliases: [esetworth] socialspy: description: Toggles if you can see msg/mail commands in chat. -- cgit v1.2.3 From e11525ab64fb1044a4e7d2c5e2aa4654699b3c34 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 12 Mar 2012 01:00:57 +0000 Subject: Update offline user check. Add ban reason to /seen --- Essentials/src/com/earth2me/essentials/Jails.java | 2 +- Essentials/src/com/earth2me/essentials/User.java | 5 +++-- .../src/com/earth2me/essentials/commands/Commandban.java | 3 +-- .../src/com/earth2me/essentials/commands/Commandseen.java | 14 +++++++------- .../com/earth2me/essentials/commands/Commandtempban.java | 3 +-- .../earth2me/essentials/commands/Commandtogglejail.java | 7 +++---- .../com/earth2me/essentials/commands/Commandtpaccept.java | 3 +-- .../src/com/earth2me/essentials/commands/Commandtpo.java | 3 +-- .../com/earth2me/essentials/commands/Commandtpohere.java | 3 +-- .../earth2me/essentials/commands/EssentialsCommand.java | 5 ++--- 10 files changed, 21 insertions(+), 27 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Jails.java b/Essentials/src/com/earth2me/essentials/Jails.java index 67c46a310..7ca4d3bcd 100644 --- a/Essentials/src/com/earth2me/essentials/Jails.java +++ b/Essentials/src/com/earth2me/essentials/Jails.java @@ -115,7 +115,7 @@ public class Jails extends AsyncStorageObjectHolder, IReplyTo, IUser try { final String opPrefix = ess.getSettings().getOperatorColor().toString(); - if (opPrefix.length() > 0) { + if (opPrefix.length() > 0) + { nickname.insert(0, opPrefix); nickname.append("§f"); } @@ -326,7 +327,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser @Override public String getDisplayName() { - if (!(base instanceof OfflinePlayer) && ess.getSettings().changeDisplayName()) + if (base.isOnline() && ess.getSettings().changeDisplayName()) { setDisplayNick(); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandban.java b/Essentials/src/com/earth2me/essentials/commands/Commandban.java index d39419686..bc09cbba8 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandban.java @@ -2,7 +2,6 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.Console; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.User; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -24,7 +23,7 @@ public class Commandban extends EssentialsCommand throw new NotEnoughArgumentsException(); } final User user = getPlayer(server, args, 0, true); - if (user.getBase() instanceof OfflinePlayer) + if (!user.isOnline()) { if (sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.ban.offline")) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java index cf500e094..131d38f81 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java @@ -23,20 +23,20 @@ public class Commandseen extends EssentialsCommand } try { - User u = getPlayer(server, args, 0); - sender.sendMessage(_("seenOnline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogin()))); + User user = getPlayer(server, args, 0); + sender.sendMessage(_("seenOnline", user.getDisplayName(), Util.formatDateDiff(user.getLastLogin()))); } catch (NoSuchFieldException e) { - User u = ess.getOfflineUser(args[0]); - if (u == null) + User user = ess.getOfflineUser(args[0]); + if (user == null) { throw new Exception(_("playerNotFound")); } - sender.sendMessage(_("seenOffline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogout()))); - if (u.isBanned()) + sender.sendMessage(_("seenOffline", user.getDisplayName(), Util.formatDateDiff(user.getLastLogout()))); + if (user.isBanned()) { - sender.sendMessage(_("whoisBanned", _("true"))); + sender.sendMessage(_("whoisBanned", user.getBanReason())); } } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java index 144d19d15..25c457a20 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java @@ -2,7 +2,6 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.Console; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; import org.bukkit.Server; @@ -25,7 +24,7 @@ public class Commandtempban extends EssentialsCommand throw new NotEnoughArgumentsException(); } final User user = getPlayer(server, args, 0, true); - if (user.getBase() instanceof OfflinePlayer) + if (!user.isOnline()) { if (sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.tempban.offline")) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java index f98343311..3240b73a9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java @@ -1,7 +1,6 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; import org.bukkit.Server; @@ -28,7 +27,7 @@ public class Commandtogglejail extends EssentialsCommand if (args.length >= 2 && !player.isJailed()) { - if (player.getBase() instanceof OfflinePlayer) + if (!player.isOnline()) { if (sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.togglejail.offline")) @@ -45,7 +44,7 @@ public class Commandtogglejail extends EssentialsCommand return; } } - if (!(player.getBase() instanceof OfflinePlayer)) + if (player.isOnline()) { ess.getJails().sendToJail(player, args[1]); } @@ -96,7 +95,7 @@ public class Commandtogglejail extends EssentialsCommand player.setJailTimeout(0); player.sendMessage(_("jailReleasedPlayerNotify")); player.setJail(null); - if (!(player.getBase() instanceof OfflinePlayer)) + if (player.isOnline()) { player.getTeleport().back(); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index 891742043..449ae7489 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java @@ -1,7 +1,6 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import org.bukkit.Server; @@ -21,7 +20,7 @@ public class Commandtpaccept extends EssentialsCommand final User target = user.getTeleportRequest(); if (target == null - || target.getBase() instanceof OfflinePlayer + || !target.isOnline() || (user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpahere")) || (!user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpa") && !target.isAuthorized("essentials.tpaall")) ) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java index 7c13b80d4..b10f0a301 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java @@ -1,7 +1,6 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.User; import org.bukkit.Server; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -25,7 +24,7 @@ public class Commandtpo extends EssentialsCommand //Just basically the old tp command final User player = getPlayer(server, args, 0, true); // Check if user is offline - if (player.getBase() instanceof OfflinePlayer) + if (!player.isOnline()) { throw new NoSuchFieldException(_("playerNotFound")); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java index e226f0702..6183bcf74 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java @@ -1,7 +1,6 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.User; import org.bukkit.Server; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -26,7 +25,7 @@ public class Commandtpohere extends EssentialsCommand final User player = getPlayer(server, args, 0, true); // Check if user is offline - if (player.getBase() instanceof OfflinePlayer) + if (!player.isOnline()) { throw new NoSuchFieldException(_("playerNotFound")); } diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java index 13328e1b5..6bc0649e9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java +++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java @@ -3,7 +3,6 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.IEssentialsModule; -import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import java.util.List; @@ -31,7 +30,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand { this.ess = ess; } - + @Override public void setEssentialsModule(final IEssentialsModule module) { @@ -62,7 +61,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand final User user = ess.getUser(args[pos]); if (user != null) { - if (!getOffline && (user.getBase() instanceof OfflinePlayer || user.isHidden())) + if (!getOffline && (!user.isOnline() || user.isHidden())) { throw new NoSuchFieldException(_("playerNotFound")); } -- cgit v1.2.3 From adffbab6783aa016a7402ae20c922232389f18e1 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 12 Mar 2012 01:15:10 +0000 Subject: Adding jail time to /whois. --- Essentials/src/com/earth2me/essentials/commands/Commandwhois.java | 5 +++++ Essentials/src/messages.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_nl.properties | 1 + 8 files changed, 12 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java index d068aac9a..f9955cfb4 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java @@ -62,6 +62,11 @@ public class Commandwhois extends EssentialsCommand { sender.sendMessage(_("whoisMoney", Util.displayCurrency(user.getMoney(), ess))); } + sender.sendMessage(_("whoisJail", (user.isJailed() + ? user.getJailTimeout() > 0 + ? Util.formatDateDiff(user.getJailTimeout()) + : _("true") + : _("false")))); sender.sendMessage(user.isAfk() ? _("whoisStatusAway") : _("whoisStatusAvailable")); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 60b09b734..390cd3564 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -397,6 +397,7 @@ whoisGod=\u00a79 - God mode: {0} whoisHealth=\u00a79 - Health: {0}/20 whoisIPAddress=\u00a79 - IP Address: {0} whoisIs={0} is {1} +whoisJail=\u00a79 - Jail: {0} whoisLocation=\u00a79 - Location: ({0}, {1}, {2}, {3}) whoisMoney=\u00a79 - Money: {0} whoisOP=\u00a79 - OP: {0} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 0b8671379..23a8cd46f 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -397,6 +397,7 @@ whoisGod=\u00a79 - God mode: {0} whoisHealth=\u00a79 - Health: {0}/20 whoisIPAddress=\u00a79 - IP-Adresse: {0} whoisIs={0} er {1} +whoisJail=\u00a79 - Jail: {0} whoisLocation=\u00a79 - Placering: ({0}, {1}, {2}, {3}) whoisMoney=\u00a79 - Saldo: {0} whoisOP=\u00a79 - OP: {0} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index fac736f2b..3365afd38 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -397,6 +397,7 @@ whoisGod=\u00a79 - God mode: {0} whoisHealth=\u00a79 - Gesundheit: {0}/20 whoisIPAddress=\u00a79 - IP-Adresse: {0} whoisIs={0} ist {1} +whoisJail=\u00a79 - Jail: {0} whoisLocation=\u00a79 - Position: ({0}, {1}, {2}, {3}) whoisMoney=\u00a79 - Geldb\u00f6rse: {0} whoisOP=\u00a79 - OP: {0} diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index d1499aad8..171e022a0 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -397,6 +397,7 @@ whoisGod=\u00a79 - God mode: {0} whoisHealth=\u00a79 - Health: {0}/20 whoisIPAddress=\u00a79 - IP Address: {0} whoisIs={0} is {1} +whoisJail=\u00a79 - Jail: {0} whoisLocation=\u00a79 - Location: ({0}, {1}, {2}, {3}) whoisMoney=\u00a79 - Money: {0} whoisOP=\u00a79 - OP: {0} diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index fbaba1cac..f33ca8b07 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -397,6 +397,7 @@ whoisGod=\u00a79 - God mode: {0} whoisHealth=\u00a79 - Salud: {0}/20 whoisIPAddress=\u00a79 - Direccion IP: {0} whoisIs={0} es {1} +whoisJail=\u00a79 - Jail: {0} whoisLocation=\u00a79 - Localizacion: ({0}, {1}, {2}, {3}) whoisMoney=\u00a79 - Dinero: {0} whoisOP=\u00a79 - OP: {0} diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 0473b3ce4..420f40f46 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -397,6 +397,7 @@ whoisGod=\u00a79 - Mode Dieu : {0} whoisHealth=\u00a79 - Sant\u00e9 : {0} / 20 whoisIPAddress=\u00a79 - Adresse IP : {0} whoisIs={0} est {1} +whoisJail=\u00a79 - Jail: {0} whoisLocation=\u00a79 - Emplacement : ({0}, {1}, {2}, {3}) whoisMoney=\u00a79 - Argent : {0} whoisOP=\u00a79 - OP : {0} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 05a735949..60d1caaea 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -397,6 +397,7 @@ whoisGod=\u00a79 - God mode: {0} whoisHealth=\u00a79 - Levens: {0}/20 whoisIPAddress=\u00a79 - IP Adres: {0} whoisIs={0} is {1} +whoisJail=\u00a79 - Jail: {0} whoisLocation=\u00a79 - Locatie: ({0}, {1}, {2}, {3}) whoisMoney=\u00a79 - Geld: {0} whoisOP=\u00a79 - OP: {0} -- cgit v1.2.3 From 2da802d4b7b73ecdacfe6a02ce9197a468c75cbc Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 12 Mar 2012 15:00:44 +0000 Subject: New permission: essentials.seen.banreason With this permission players can see why a user was banned, in /seen. --- .../earth2me/essentials/commands/Commandseen.java | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java index 131d38f81..2783fb68e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java @@ -16,6 +16,17 @@ public class Commandseen extends EssentialsCommand @Override protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception + { + seen(server,sender,args,true); + } + + @Override + protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception + { + seen(server,user,args,user.isAuthorized("essentials.seen.banreason")); + } + + protected void seen (final Server server, final CommandSender sender, final String[] args, final boolean show) throws Exception { if (args.length < 1) { @@ -23,20 +34,20 @@ public class Commandseen extends EssentialsCommand } try { - User user = getPlayer(server, args, 0); - sender.sendMessage(_("seenOnline", user.getDisplayName(), Util.formatDateDiff(user.getLastLogin()))); + User player = getPlayer(server, args, 0); + sender.sendMessage(_("seenOnline", player.getDisplayName(), Util.formatDateDiff(player.getLastLogin()))); } catch (NoSuchFieldException e) { - User user = ess.getOfflineUser(args[0]); - if (user == null) + User player = ess.getOfflineUser(args[0]); + if (player == null) { throw new Exception(_("playerNotFound")); } - sender.sendMessage(_("seenOffline", user.getDisplayName(), Util.formatDateDiff(user.getLastLogout()))); - if (user.isBanned()) + sender.sendMessage(_("seenOffline", player.getDisplayName(), Util.formatDateDiff(player.getLastLogout()))); + if (player.isBanned()) { - sender.sendMessage(_("whoisBanned", user.getBanReason())); + sender.sendMessage(_("whoisBanned", show ? player.getBanReason() : _("true"))); } } } -- cgit v1.2.3 From c0490c08902dafe6db021f8ac5c08610f3a58d9e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 12 Mar 2012 15:21:37 +0000 Subject: New TL Key, allow formatting/colouring of help output. --- .../src/com/earth2me/essentials/textreader/HelpInput.java | 10 +++++----- Essentials/src/messages.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_nl.properties | 1 + 8 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java index efe66d585..6d4efd811 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java @@ -50,7 +50,7 @@ public class HelpInput implements IText final String node = "essentials." + k.getKey(); if (!ess.getSettings().isCommandDisabled(k.getKey()) && user.isAuthorized(node)) { - lines.add("§c" + k.getKey() + "§7: " + k.getValue().get(DESCRIPTION)); + lines.add(_("helpLine", k.getKey(), k.getValue().get(DESCRIPTION))); } } else @@ -69,7 +69,7 @@ public class HelpInput implements IText } if (user.isAuthorized("essentials.help." + pluginName)) { - lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION)); + lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } else if (permissions instanceof List && !((List)permissions).isEmpty()) { @@ -84,21 +84,21 @@ public class HelpInput implements IText } if (enabled) { - lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION)); + lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } } else if (permissions instanceof String && !"".equals(permissions)) { if (user.isAuthorized(permissions.toString())) { - lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION)); + lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } } else { if (!ess.getSettings().hidePermissionlessHelp()) { - lines.add("§c" + k.getKey() + "§7: " + value.get(DESCRIPTION)); + lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } } } diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 390cd3564..b41c3be0a 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -410,3 +410,4 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. +helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 23a8cd46f..7973ce9f0 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -410,3 +410,4 @@ year=\u00e5r years=\u00e5r youAreHealed=\u00a77Du er blevet healed. Halleluja! youHaveNewMail=\u00a7cDu har {0} flaskeposter!\u00a7f Type \u00a77/mail read for at se din flaskepost. +helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 3365afd38..ed3bc4285 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -410,3 +410,4 @@ year=Jahr years=Jahre youAreHealed=\u00a77Du wurdest geheilt. youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen. +helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 171e022a0..e2582525f 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -410,3 +410,4 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. +helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index f33ca8b07..bbbd5e787 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -410,3 +410,4 @@ year=año years=años youAreHealed=\u00a77Has sido curado. youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f para ver tus emails no leidos!. +helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 420f40f46..c012a6242 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -410,3 +410,4 @@ year=ann\u00e9e years=ann\u00e9es youAreHealed=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9. youHaveNewMail=\u00a7cVous avez {0} messages ! \u00a7fEntrez \u00a77/mail read\u00a7f pour voir votre courrier. +helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 60d1caaea..66f9a74c0 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -410,3 +410,4 @@ year=jaar years=jaren youAreHealed=\u00a77Je bent genezen. youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken. +helpLine=\u00a76/{0}\u00a7f: {1} -- cgit v1.2.3 From dfbc1956c981c18b8331fbf52786982063657c97 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 12 Mar 2012 15:35:20 +0000 Subject: Fixing a few TL Keys --- Essentials/src/com/earth2me/essentials/UserData.java | 4 ++-- Essentials/src/com/earth2me/essentials/commands/Commandbreak.java | 3 ++- Essentials/src/com/earth2me/essentials/commands/Commandgive.java | 6 +++--- Essentials/src/com/earth2me/essentials/commands/Commandsudo.java | 7 +++---- Essentials/src/com/earth2me/essentials/commands/Commandtp.java | 3 +-- Essentials/src/messages.properties | 5 ++++- Essentials/src/messages_da.properties | 5 ++++- Essentials/src/messages_de.properties | 5 ++++- Essentials/src/messages_en.properties | 5 ++++- Essentials/src/messages_es.properties | 5 ++++- Essentials/src/messages_fr.properties | 5 ++++- Essentials/src/messages_nl.properties | 5 ++++- 12 files changed, 39 insertions(+), 19 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 1fdc98254..3b6516277 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -1,5 +1,6 @@ package com.earth2me.essentials; +import static com.earth2me.essentials.I18n._; import java.io.File; import java.util.*; import java.util.logging.Logger; @@ -176,8 +177,7 @@ public abstract class UserData extends PlayerExtension implements IConf } else { - //TODO: move this message to messages file - throw new Exception("Home " + name + " doesn't exist"); + throw new Exception(_("invalidHome", name)); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java index 2691ad4f2..a03c24264 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import org.bukkit.Material; import org.bukkit.Server; @@ -29,7 +30,7 @@ public class Commandbreak extends EssentialsCommand } if (block.getType() == Material.BEDROCK && !user.isAuthorized("essentials.break.bedrock")) { - throw new Exception("You are not allowed to destroy bedrock."); //TODO: Translation + throw new Exception(_("noBreakBedrock")); } final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase()); server.getPluginManager().callEvent(event); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java index d6e3d8f98..9db7d4da3 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import com.earth2me.essentials.User; import java.util.Locale; @@ -19,7 +20,6 @@ public class Commandgive extends EssentialsCommand super("give"); } - //TODO: move these messages to message file @Override public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { @@ -39,7 +39,7 @@ public class Commandgive extends EssentialsCommand : (!ess.getUser(sender).isAuthorized("essentials.itemspawn.exempt") && !ess.getUser(sender).canSpawnItem(stack.getTypeId())))) { - throw new Exception(ChatColor.RED + "You are not allowed to spawn the item " + itemname); + throw new Exception(_("cantSpawnItem", itemname)); } final User giveTo = getPlayer(server, args, 0); @@ -82,7 +82,7 @@ public class Commandgive extends EssentialsCommand if (stack.getType() == Material.AIR) { - throw new Exception(ChatColor.RED + "You can't give air."); + throw new Exception(_("cantSpawnItem", "Air")); } final String itemName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' '); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java index d43d486b9..23083fa3d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; import org.bukkit.Server; @@ -30,14 +31,12 @@ public class Commandsudo extends EssentialsCommand System.arraycopy(args, 2, arguments, 0, args.length - 2); } - //TODO: Translate this. if (user.isAuthorized("essentials.sudo.exempt")) { - throw new Exception("You cannot sudo this user"); + throw new Exception(_("sudoExempt")); } - //TODO: Translate this. - sender.sendMessage("Forcing " + user.getDisplayName() + " to run: /" + command + " " + getFinalArg(arguments, 0)); + sender.sendMessage(_("sudoRun", user.getDisplayName(), command, getFinalArg(arguments, 0))); final PluginCommand execCommand = ess.getServer().getPluginCommand(command); if (execCommand != null) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java index 7ea3f0541..f65dc75f8 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java @@ -39,8 +39,7 @@ public class Commandtp extends EssentialsCommand default: if (!user.isAuthorized("essentials.tpohere")) { - //TODO: Translate this - throw new Exception("You need access to /tpohere to teleport other players."); + throw new Exception(_("needTpohere")); } user.sendMessage(_("teleporting")); final User target = getPlayer(server, args, 0); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index b41c3be0a..b6bbae274 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. helpConsole=To view help from the console, type ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: holeInFloor=Hole in floor @@ -130,6 +131,7 @@ invRestored=Your inventory has been restored. invSee=You see the inventory of {0}. invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. +invalidHome=Home {0} doesn't exist invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cYou do not have permission to change the nickname of nickSet=\u00a77Your nickname is now \u00a7c{0} noAccessCommand=\u00a7cYou do not have access to that command. noAccessPermission=\u00a7cYou do not have permission to access that {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cYou do not have permission to destroy that {0}. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo matching commands. @@ -316,6 +319,7 @@ slimeMalformedSize=Malformed size. soloMob=That mob likes to be alone spawnSet=\u00a77Spawn location set for group {0}. spawned=spawned +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival @@ -410,4 +414,3 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 7973ce9f0..8f75f3a7b 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Du er blevet l\u00f8sladt heal=\u00a77Du er blevet healed. healOther=\u00a77Healed {0}. helpConsole=For at se hj\u00e6lp fra konsolen, skriv ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f: holeInFloor=Hul i gulv @@ -130,6 +131,7 @@ invRestored=Din inventory er blevet genoprettet. invSee=Du ser {0}''s inventory. invSeeHelp=Brug /invsee for at genoprette din inventory. invalidCharge=\u00a7cUgyldig opladning (korrekt oversat?). +invalidHome=Home {0} doesn't exist invalidMob=Ugyldig mob type. invalidServer=Ugyldig server! invalidSignLine=Linje {0} p\u00e5 skilt er ugyldig. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cDu har ikke tilladelse til at \u00e6ndre en andens n nickSet=\u00a77Dit nickname er nu \u00a7c{0} noAccessCommand=\u00a7cDu har ikke adgang til denne kommando. noAccessPermission=\u00a7cDu har ikke tilladelse til at f\u00e5 adgang til {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cDu har ikke tilladelse til at \u00f8del\u00e6gge {0}. noGodWorldWarning=\u00a7cAdvarsel! God mode er sl\u00c3\u00a5et fra i denne verden. noHelpFound=\u00a7cIngen matchende kommandoer. @@ -316,6 +319,7 @@ slimeMalformedSize=Forkert st\u00f8rrelse. (Korrekt oversat?) soloMob=Denne mob kan godt lide at v\u00e6re alene. Den hygger sig. spawnSet=\u00a77Spawnplacering fastsat for gruppe: {0}. spawned=spawnet +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Farvel grusomme verden... suicideSuccess= \u00a77{0} tog sit eget liv survival=survival @@ -410,4 +414,3 @@ year=\u00e5r years=\u00e5r youAreHealed=\u00a77Du er blevet healed. Halleluja! youHaveNewMail=\u00a7cDu har {0} flaskeposter!\u00a7f Type \u00a77/mail read for at se din flaskepost. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index ed3bc4285..b2e298442 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Du wurdest frei gelassen. heal=\u00a77Du wurdest geheilt. healOther=\u00a77{0} geheilt. helpConsole=Um die Hilfe der Konsole zu sehen, schreibe ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[Hilfe]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f: holeInFloor=Loch im Boden @@ -130,6 +131,7 @@ invRestored=Dein Inventar wurde wieder hergestellt. invSee=Du siehst das Inventar von {0}. invSeeHelp=Benutze /invsee um dein Inventar wiederherzustellen. invalidCharge=\u00a7cUng\u00fcltige Verf\u00fcgung. +invalidHome=Home {0} doesn't exist invalidMob=Ung\u00fcltiger Monstername. invalidServer=Ung\u00fcltiger Server! invalidSignLine=Die Zeile {0} auf dem Schild ist falsch. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cDu hast keine Rechte um den Nicknamen von anderen zu nickSet=\u00a77Dein Nickname ist nun \u00a7c{0} noAccessCommand=\u00a7cDu hast keinen Zugriff auf diesen Befehl. noAccessPermission=\u00a7cDu hast keine Rechte, den Block {0} zu \u00f6ffnen. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cDu hast keine Rechte, den Block {0} zu zerst\u00f6ren. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cKeine \u00fcbereinstimmenden Kommandos. @@ -316,6 +319,7 @@ slimeMalformedSize=Ung\u00fcltige Gr\u00f6sse. soloMob=Das Monster m\u00f6chte allein sein. spawnSet=\u00a77Spawn-Punkt gesetzt f\u00fcr Gruppe {0}. spawned=erzeugt +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Lebewohl grausame Welt... suicideSuccess= \u00a77{0} hat sich das Leben genommen. survival=survival @@ -410,4 +414,3 @@ year=Jahr years=Jahre youAreHealed=\u00a77Du wurdest geheilt. youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index e2582525f..2afb11651 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. helpConsole=To view help from the console, type ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: holeInFloor=Hole in floor @@ -130,6 +131,7 @@ invRestored=Your inventory has been restored. invSee=You see the inventory of {0}. invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. +invalidHome=Home {0} doesn't exist invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cYou do not have permission to change the nickname of nickSet=\u00a77Your nickname is now \u00a7c{0} noAccessCommand=\u00a7cYou do not have access to that command. noAccessPermission=\u00a7cYou do not have permission to access that {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cYou do not have permission to destroy that {0}. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo matching commands. @@ -316,6 +319,7 @@ slimeMalformedSize=Malformed size. soloMob=That mob likes to be alone spawnSet=\u00a77Spawn location set for group {0}. spawned=spawned +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival @@ -410,4 +414,3 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index bbbd5e787..9d5954263 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Has sido liberado heal=\u00a77Has sido curado. healOther=\u00a77Has curado a {0}. helpConsole=Para obtener ayuda de la consola, escribe ?. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f: holeInFloor=Agujero en el suelo @@ -130,6 +131,7 @@ invRestored=Tu inventario ha sido recuperado. invSee=Estas viendo el inventario de {0}. invSeeHelp=Usa /invsee para recuperar tu inventario. invalidCharge=\u00a7cCargo invalido. +invalidHome=Home {0} doesn't exist invalidMob=Mob invalido. invalidServer=Servidor invalido! invalidSignLine=Linea {0} en el signo es invalida. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cNo tienes permiso para cambiar el nombre de usuario nickSet=\u00a77Tu nombre es ahora \u00a7c{0} noAccessCommand=\u00a7cNo tienes acceso a ese comando. noAccessPermission=\u00a7cNo tienes permisos para hacer eso {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cNo tienes permisos para destrozar eso {0}. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo hay comandos relacionados. @@ -316,6 +319,7 @@ slimeMalformedSize=Medidas malformadas. soloMob=A este mob le gusta estar solo spawnSet=\u00a77El lugar de nacimiento ha sido puesto para el grupo {0}. spawned=nacido +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Adios mundo cruel... suicideSuccess= \u00a77{0} se quito su propia vida survival=survival @@ -410,4 +414,3 @@ year=año years=años youAreHealed=\u00a77Has sido curado. youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f para ver tus emails no leidos!. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index c012a6242..b1dd7bc0c 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Vous avez \u00e9t\u00e9 lib\u00e9r\u00e9. heal=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9. healOther=\u00a77{0} a \u00e9t\u00e9 soign\u00e9. helpConsole=Pour voir l''aide tapez ? +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[Aide Admin]\u00a7f \u00a77{0} : \u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f sur \u00a7c{1}\u00a7f. holeInFloor=Trou dans le Sol. @@ -130,6 +131,7 @@ invRestored=Votre inventaire vous a \u00e9t\u00e9 rendu. invSee=Vous voyez l''inventaire de {0}. invSeeHelp=Utilisez /invsee pour revenir \u00e0 votre inventaire. invalidCharge=\u00a7cCharge invalide. +invalidHome=Home {0} doesn't exist invalidMob=Mauvias type de cr\u00e9ature. invalidServer=Serveur non valide. invalidSignLine=La ligne {0} du panneau est invalide. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cVous n'avez pas la permission de changer le surnom d nickSet=\u00a77Votre surnom est maintenant \u00a7c{0} noAccessCommand=\u00a7cVous n'avez pas acc\u00c3\u00a8s \u00e0 cette commande. noAccessPermission=\u00a7cVous n''avez pas la permissions d''acc\u00e9der \u00e0 cette {0} +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cVous n''avez pas la permission de d\u00e9truire ce {0}. noGodWorldWarning=\u00a7cWarning! Le mode Dieu est d\u00e9sactiv\u00e9 dans ce monde. noHelpFound=\u00a7cAucune commande correspondante. @@ -316,6 +319,7 @@ slimeMalformedSize=Taille mal form\u00e9e. soloMob=Ce cr\u00e9ature aime \u00eatre seul. spawnSet=\u00a77Le point de d\u00e9part a \u00e9t\u00e9 d\u00e9fini pour le groupe {0}. spawned=invoqu\u00e9(s) +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Au revoir monde cruel... suicideSuccess=\u00a77{0} s''est suicid\u00e9. survival=survie @@ -410,4 +414,3 @@ year=ann\u00e9e years=ann\u00e9es youAreHealed=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9. youHaveNewMail=\u00a7cVous avez {0} messages ! \u00a7fEntrez \u00a77/mail read\u00a7f pour voir votre courrier. -helpLine=\u00a76/{0}\u00a7f: {1} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 66f9a74c0..9d4af2810 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -110,6 +110,7 @@ haveBeenReleased=\u00a77Je bent bevrijdt heal=\u00a77Je bent genezen. healOther=\u00a77Je geneezde {0}. helpConsole=type ? om de consolehelp weer te geven. +helpLine=\u00a76/{0}\u00a7f: {1} helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f: holeInFloor=Gat in de vloer @@ -130,6 +131,7 @@ invRestored=Je inventory is hersteld. invSee=Je kijkt naar de inventory van {0}. invSeeHelp=Type /invsee om je inventory te herstellen. invalidCharge=\u00a7cOngeldig te laden. +invalidHome=Home {0} doesn't exist invalidMob=Ongeldig mob type. invalidServer=Ongeldige server! invalidSignLine=Regel {0} op het bordje is ongeldig. @@ -214,6 +216,7 @@ nickOthersPermission=\u00a7cJe hebt geen toestemming om de nickname van anderen nickSet=\u00a77Je nickname is nu \u00a7c{0} noAccessCommand=\u00a7cJe hebt geen toegang tot die opdracht. noAccessPermission=\u00a7cJe hebt hier geen toegang voor {0}. +noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cJe hebt geen toegang om dat te vernietigen {0}. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo matching commands. @@ -316,6 +319,7 @@ slimeMalformedSize=Misvoormde grootte. soloMob=Die mob is liever in zijn eentje spawnSet=\u00a77Spawn locatie voor de groep {0} ingesteld. spawned=gespawned +sudoExempt=You cannot sudo this user suicideMessage=\u00a77Vaarwel vreedzame wereld... suicideSuccess= \u00a77{0} pleegde zelfmoord survival=survival @@ -410,4 +414,3 @@ year=jaar years=jaren youAreHealed=\u00a77Je bent genezen. youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken. -helpLine=\u00a76/{0}\u00a7f: {1} -- cgit v1.2.3 From dfd63a81acdae71b23bb40523bc40dbd58a4d75b Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 12 Mar 2012 16:50:32 +0000 Subject: Missed a TL key. --- Essentials/src/messages.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_nl.properties | 1 + 7 files changed, 7 insertions(+) diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index b6bbae274..146ab7736 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -320,6 +320,7 @@ soloMob=That mob likes to be alone spawnSet=\u00a77Spawn location set for group {0}. spawned=spawned sudoExempt=You cannot sudo this user +sudoRun=Forcing {0} to run: /{1} {2} suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 8f75f3a7b..4a46b1302 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -320,6 +320,7 @@ soloMob=Denne mob kan godt lide at v\u00e6re alene. Den hygger sig. spawnSet=\u00a77Spawnplacering fastsat for gruppe: {0}. spawned=spawnet sudoExempt=You cannot sudo this user +sudoRun=Forcing {0} to run: /{1} {2} suicideMessage=\u00a77Farvel grusomme verden... suicideSuccess= \u00a77{0} tog sit eget liv survival=survival diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index b2e298442..aaeec37a4 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -320,6 +320,7 @@ soloMob=Das Monster m\u00f6chte allein sein. spawnSet=\u00a77Spawn-Punkt gesetzt f\u00fcr Gruppe {0}. spawned=erzeugt sudoExempt=You cannot sudo this user +sudoRun=Forcing {0} to run: /{1} {2} suicideMessage=\u00a77Lebewohl grausame Welt... suicideSuccess= \u00a77{0} hat sich das Leben genommen. survival=survival diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 2afb11651..ef3855714 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -320,6 +320,7 @@ soloMob=That mob likes to be alone spawnSet=\u00a77Spawn location set for group {0}. spawned=spawned sudoExempt=You cannot sudo this user +sudoRun=Forcing {0} to run: /{1} {2} suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 9d5954263..ecee52869 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -320,6 +320,7 @@ soloMob=A este mob le gusta estar solo spawnSet=\u00a77El lugar de nacimiento ha sido puesto para el grupo {0}. spawned=nacido sudoExempt=You cannot sudo this user +sudoRun=Forcing {0} to run: /{1} {2} suicideMessage=\u00a77Adios mundo cruel... suicideSuccess= \u00a77{0} se quito su propia vida survival=survival diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index b1dd7bc0c..c7898356d 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -320,6 +320,7 @@ soloMob=Ce cr\u00e9ature aime \u00eatre seul. spawnSet=\u00a77Le point de d\u00e9part a \u00e9t\u00e9 d\u00e9fini pour le groupe {0}. spawned=invoqu\u00e9(s) sudoExempt=You cannot sudo this user +sudoRun=Forcing {0} to run: /{1} {2} suicideMessage=\u00a77Au revoir monde cruel... suicideSuccess=\u00a77{0} s''est suicid\u00e9. survival=survie diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 9d4af2810..7a56a4e8d 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -320,6 +320,7 @@ soloMob=Die mob is liever in zijn eentje spawnSet=\u00a77Spawn locatie voor de groep {0} ingesteld. spawned=gespawned sudoExempt=You cannot sudo this user +sudoRun=Forcing {0} to run: /{1} {2} suicideMessage=\u00a77Vaarwel vreedzame wereld... suicideSuccess= \u00a77{0} pleegde zelfmoord survival=survival -- cgit v1.2.3 From 267495a4063ed57582e01fea8d5671c5a14f9681 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 13 Mar 2012 16:15:01 +0000 Subject: Fixing warp command costs. --- Essentials/src/com/earth2me/essentials/Trade.java | 18 ++++++++++++++---- .../com/earth2me/essentials/commands/Commandwarp.java | 5 ++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java index 3594c3137..fbdc471bd 100644 --- a/Essentials/src/com/earth2me/essentials/Trade.java +++ b/Essentials/src/com/earth2me/essentials/Trade.java @@ -158,11 +158,9 @@ public class Trade InventoryWorkaround.removeItem(user.getInventory(), true, true, getItemStack()); user.updateInventory(); } - if (command != null && !command.isEmpty() - && !user.isAuthorized("essentials.nocommandcost.all") - && !user.isAuthorized("essentials.nocommandcost." + command)) + if (command != null) { - final double cost = ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command); + final double cost = getCommandCost(user); if (!user.canAfford(cost) && cost > 0) { throw new ChargeException(_("notEnoughMoney")); @@ -194,6 +192,18 @@ public class Trade { return exp; } + + public Double getCommandCost(final IUser user) + { + double cost = 0d; + if (command != null && !command.isEmpty() + && !user.isAuthorized("essentials.nocommandcost.all") + && !user.isAuthorized("essentials.nocommandcost." + command)) + { + cost = ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command); + } + return cost; + } private static FileWriter fw = null; public static void log(String type, String subtype, String event, String sender, Trade charge, String receiver, Trade pay, Location loc, IEssentials ess) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java index 62641172b..84df12900 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java @@ -115,7 +115,10 @@ public class Commandwarp extends EssentialsCommand private void warpUser(final User owner, final User user, final String name) throws Exception { - final Trade charge = new Trade("warp-" + name.toLowerCase(Locale.ENGLISH).replace('_', '-'), ess); + final Trade chargeWarp = new Trade("warp-" + name.toLowerCase(Locale.ENGLISH).replace('_', '-'), ess); + final Trade chargeCmd = new Trade(this.getName(), ess); + final double fullCharge = chargeWarp.getCommandCost(user) + chargeCmd.getCommandCost(user); + final Trade charge = new Trade(fullCharge, ess); charge.isAffordableFor(owner); if (ess.getSettings().getPerWarpPermission() && !owner.isAuthorized("essentials.warp." + name)) { -- cgit v1.2.3 From 6cf2bb5cd9875a3f07fc9d66d771985489651bae Mon Sep 17 00:00:00 2001 From: ementalo Date: Wed, 14 Mar 2012 21:16:22 +0000 Subject: Adding permissions for overwriting exisitng warps essentials.warp.overwrite.[warpname] will allow overwrting of exsiting warps essentials.warp.overwrite.* for all warps Adding WarpNotFoundException class --- .../essentials/commands/Commandsetwarp.java | 21 ++++++++++++++++++++- .../essentials/commands/WarpNotFoundException.java | 15 +++++++++++++++ Essentials/src/messages.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_nl.properties | 1 + 9 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 Essentials/src/com/earth2me/essentials/commands/WarpNotFoundException.java diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java index 1a7d27b4b..b39a7efcf 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import com.earth2me.essentials.Warps; import org.bukkit.Location; import org.bukkit.Server; @@ -26,7 +27,25 @@ public class Commandsetwarp extends EssentialsCommand } final Location loc = user.getLocation(); - ess.getWarps().setWarp(args[0], loc); + final Warps warps = ess.getWarps(); + Location warpLoc = null; + + try + { + warpLoc = warps.getWarp(args[0]); + } + catch (WarpNotFoundException ex) + { + } + + if (warpLoc == null || user.hasPermission("essentials.warp.overwrite." + args[0])) + { + warps.setWarp(args[0], loc); + } + else + { + throw new Exception(_("warpOverwrite")); + } user.sendMessage(_("warpSet", args[0])); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/WarpNotFoundException.java b/Essentials/src/com/earth2me/essentials/commands/WarpNotFoundException.java new file mode 100644 index 000000000..9258bf926 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/WarpNotFoundException.java @@ -0,0 +1,15 @@ +package com.earth2me.essentials.commands; + + +public class WarpNotFoundException extends Exception +{ + public WarpNotFoundException() + { + super("Warp not found"); + } + + public WarpNotFoundException(String message) + { + super(message); + } +} diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 146ab7736..0db1ab1b3 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -386,6 +386,7 @@ voiceSilenced=\u00a77Your voice has been silenced warpDeleteError=Problem deleting the warp file. warpListPermission=\u00a7cYou do not have Permission to list warps. warpNotExist=That warp does not exist. +warpOverwrite=\u00a7cYou cannot overwrite that warp. warpSet=\u00a77Warp {0} set. warpUsePermission=\u00a7cYou do not have Permission to use that warp. warpingTo=\u00a77Warping to {0}. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 4a46b1302..6168b7bdb 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -386,6 +386,7 @@ voiceSilenced=\u00a77Din stemme er blevet gjort stille. warpDeleteError=Ah, shit; kunne sgu ikke fjerne warp-filen. Jeg giver en \u00c3\u00b8l i lufthavnen. warpListPermission=\u00a7cDu har ikke tilladelse til at vise listen over warps. warpNotExist=Den warp eksisterer ikke. +warpOverwrite=\u00a7cYou cannot overwrite that warp. warpSet=\u00a77Warp {0} sat. warpUsePermission=\u00a7cDu har ikke tilladelse til at benytte den warp. warpingTo=\u00a77Warper til {0}. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index aaeec37a4..1ebac92ae 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -386,6 +386,7 @@ voiceSilenced=\u00a77Du bist stumm warpDeleteError=Fehler beim L\u00f6schen der Warp-Datei. warpListPermission=\u00a7cDu hast keine Berechtigung, die Warp-Punkte anzuzeigen. warpNotExist=Warp-Punkt existiert nicht. +warpOverwrite=\u00a7cYou cannot overwrite that warp. warpSet=\u00a77Warp-Punkt {0} wurde erstellt. warpUsePermission=\u00a7cDu hast keinen Zugriff f\u00fcr diesen Warp-Punkt. warpingTo=\u00a77Teleportiere zu Warp-Punkt {0}. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index ef3855714..e7433b943 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -386,6 +386,7 @@ voiceSilenced=\u00a77Your voice has been silenced warpDeleteError=Problem deleting the warp file. warpListPermission=\u00a7cYou do not have Permission to list that warps. warpNotExist=That warp does not exist. +warpOverwrite=\u00a7cYou cannot overwrite that warp. warpSet=\u00a77Warp {0} set. warpUsePermission=\u00a7cYou do not have Permission to use that warp. warpingTo=\u00a77Warping to {0}. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index ecee52869..9ffe1fa6c 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -386,6 +386,7 @@ voiceSilenced=\u00a77Tu voz ha sido silenciada warpDeleteError=Problema al borrar el archivo de teletransporte. warpListPermission=\u00a7cNo tienes permiso para listar esos teletransportes. warpNotExist=Ese teletransporte no existe. +warpOverwrite=\u00a7cYou cannot overwrite that warp. warpSet=\u00a77Teletransporte {0} establecido. warpUsePermission=\u00a7cNo tienes permisos para usar ese teletransporte. warpingTo=\u00a77Teletransportandote a {0}. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index c7898356d..a65e79c52 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -386,6 +386,7 @@ voiceSilenced=\u00a77Vous avez \u00e9t\u00e9 r\u00e9duit au silence. warpDeleteError=Probl\u00c3\u00a8me concernant la suppression du fichier warp. warpListPermission=\u00a7cVous n'avez pas la permission d'afficher la liste des points de t\u00e9l\u00e9portation. warpNotExist=Ce point de t\u00e9l\u00e9portation n'existe pas. +warpOverwrite=\u00a7cYou cannot overwrite that warp. warpSet=\u00a77Le point de t\u00e9l\u00e9portation {0} a \u00e9t\u00e9 cr\u00e9\u00e9. warpUsePermission=\u00a7cVous n'avez pas la permission d'utiliser ce point de t\u00e9l\u00e9portation. warpingTo=\u00a77T\u00e9l\u00e9portation vers {0}. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 7a56a4e8d..b21185784 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -386,6 +386,7 @@ voiceSilenced=\u00a77Je kan niet meer praten warpDeleteError=Fout bij het verwijderen van het warp bestand. warpListPermission=\u00a7cJe hebt geen toegang om die warp te maken. warpNotExist=Die warp bestaat niet. +warpOverwrite=\u00a7cYou cannot overwrite that warp. warpSet=\u00a77Warp {0} ingesteld. warpUsePermission=\u00a7cOnbevoegd om die warp te gebruiken. warpingTo=\u00a77Aan het warpen naar {0}. -- cgit v1.2.3 From d3033716ca532fb2d327493a5af19a2bd30d57a1 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 00:49:22 +0000 Subject: Add Griefcraft metrics to Essentials Warns on first start, and first staff join, and 5 minute warning before logging starts. --- .../src/com/earth2me/essentials/Essentials.java | 29 +- .../com/earth2me/essentials/EssentialsUpgrade.java | 11 + .../src/com/earth2me/essentials/ISettings.java | 4 + .../src/com/earth2me/essentials/Settings.java | 13 + .../com/earth2me/essentials/metrics/Metrics.java | 529 +++++++++++++++++++++ .../essentials/metrics/MetricsListener.java | 40 ++ .../essentials/metrics/MetricsStarter.java | 62 +++ 7 files changed, 682 insertions(+), 6 deletions(-) create mode 100644 Essentials/src/com/earth2me/essentials/metrics/Metrics.java create mode 100644 Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java create mode 100644 Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index ccc90cb01..22ac04c6d 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -24,6 +24,8 @@ import com.earth2me.essentials.commands.EssentialsCommand; import com.earth2me.essentials.commands.IEssentialsCommand; import com.earth2me.essentials.commands.NoChargeException; import com.earth2me.essentials.commands.NotEnoughArgumentsException; +import com.earth2me.essentials.metrics.MetricsListener; +import com.earth2me.essentials.metrics.MetricsStarter; import com.earth2me.essentials.perm.PermissionsHandler; import com.earth2me.essentials.register.payment.Methods; import com.earth2me.essentials.signs.SignBlockListener; @@ -223,7 +225,7 @@ public class Essentials extends JavaPlugin implements IEssentials final EssentialsEntityListener entityListener = new EssentialsEntityListener(this); pm.registerEvents(entityListener, this); - + final EssentialsWorldListener worldListener = new EssentialsWorldListener(this); pm.registerEvents(worldListener, this); @@ -237,6 +239,18 @@ public class Essentials extends JavaPlugin implements IEssentials getScheduler().scheduleSyncRepeatingTask(this, timer, 1, 100); Economy.setEss(this); execTimer.mark("RegListeners"); + + final MetricsStarter metricsStarter = new MetricsStarter(this); + if (metricsStarter.getStart()) + { + getScheduler().scheduleAsyncDelayedTask(this, metricsStarter, 1); + } + else if (metricsStarter.getStart() == false) + { + final MetricsListener metricsListener = new MetricsListener(this, metricsStarter); + pm.registerEvents(metricsListener, this); + } + final String timeroutput = execTimer.end(); if (getSettings().isDebug()) { @@ -599,15 +613,16 @@ public class Essentials extends JavaPlugin implements IEssentials { return i18n; } - - private static class EssentialsWorldListener implements Listener, Runnable { + + + private static class EssentialsWorldListener implements Listener, Runnable + { private transient final IEssentials ess; public EssentialsWorldListener(final IEssentials ess) { this.ess = ess; } - @EventHandler(priority = EventPriority.LOW) public void onWorldLoad(final WorldLoadEvent event) @@ -616,7 +631,8 @@ public class Essentials extends JavaPlugin implements IEssentials ess.getWarps().reloadConfig(); for (IConf iConf : ((Essentials)ess).confList) { - if (iConf instanceof IEssentialsModule) { + if (iConf instanceof IEssentialsModule) + { iConf.reloadConfig(); } } @@ -629,7 +645,8 @@ public class Essentials extends JavaPlugin implements IEssentials ess.getWarps().reloadConfig(); for (IConf iConf : ((Essentials)ess).confList) { - if (iConf instanceof IEssentialsModule) { + if (iConf instanceof IEssentialsModule) + { iConf.reloadConfig(); } } diff --git a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java index f70f0c091..8bfec57d1 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java @@ -777,6 +777,16 @@ public class EssentialsUpgrade doneFile.setProperty("updateJailsToNewJailsConfig", true); doneFile.save(); } + + private void warnMetrics() { + if (doneFile.getBoolean("warnMetrics", false)) + { + return; + } + ess.getSettings().setMetricsEnabled(false); + doneFile.setProperty("warnMetrics", true); + doneFile.save(); + } public void beforeSettings() { @@ -800,5 +810,6 @@ public class EssentialsUpgrade deleteOldItemsCsv(); updateSpawnsToNewSpawnsConfig(); updateJailsToNewJailsConfig(); + warnMetrics(); } } diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index ec3941cd1..c5773404e 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -163,4 +163,8 @@ public interface ISettings extends IConf EventPriority getRespawnPriority(); long getTpaAcceptCancellation(); + + boolean isMetricsEnabled(); + + void setMetricsEnabled(boolean metricsEnabled); } diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index c9232f107..e0e2dd63b 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -23,6 +23,7 @@ public class Settings implements ISettings private final transient EssentialsConf config; private final static Logger logger = Logger.getLogger("Minecraft"); private final transient IEssentials ess; + private boolean metricsEnabled = true; public Settings(IEssentials ess) { @@ -718,4 +719,16 @@ public class Settings implements ISettings { return config.getLong("tpa-accept-cancellation", 0); } + + @Override + public boolean isMetricsEnabled() + { + return metricsEnabled; + } + + @Override + public void setMetricsEnabled(boolean metricsEnabled) + { + this.metricsEnabled = metricsEnabled; + } } diff --git a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java new file mode 100644 index 000000000..3a43af70f --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java @@ -0,0 +1,529 @@ +package com.earth2me.essentials.metrics; + +/* + * Copyright 2011 Tyler Blair. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + * following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following + * disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the authors and contributors and + * should not be interpreted as representing official policies, either expressed or implied, of anybody else. + */ +import org.bukkit.Bukkit; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.PluginDescriptionFile; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; +import java.net.Proxy; +import java.net.URL; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; + + +/** + *

The metrics class obtains data about a plugin and submits statistics about it to the metrics backend.

+ * Public methods provided by this class:

+ * + * Graph createGraph(String name);
+ * void addCustomData(Metrics.Plotter plotter);
+ * void start();
+ *
+ */ +public class Metrics +{ + /** + * The current revision number + */ + private final static int REVISION = 5; + /** + * The base url of the metrics domain + */ + private static final String BASE_URL = "http://metrics.essentials3.net"; + /** + * The url used to report a server's status + */ + private static final String REPORT_URL = "/report/%s"; + /** + * The file where guid and opt out is stored in + */ + private static final String CONFIG_FILE = "plugins/PluginMetrics/config.yml"; + /** + * The separator to use for custom data. This MUST NOT change unless you are hosting your own version of metrics and + * want to change it. + */ + private static final String CUSTOM_DATA_SEPARATOR = "~~"; + /** + * Interval of time to ping (in minutes) + */ + private final static int PING_INTERVAL = 10; + /** + * The plugin this metrics submits for + */ + private final Plugin plugin; + /** + * All of the custom graphs to submit to metrics + */ + private final Set graphs = Collections.synchronizedSet(new HashSet()); + /** + * The default graph, used for addCustomData when you don't want a specific graph + */ + private final Graph defaultGraph = new Graph("Default"); + /** + * The plugin configuration file + */ + private final YamlConfiguration configuration; + /** + * Unique server id + */ + private final String guid; + + public Metrics(Plugin plugin) throws IOException + { + if (plugin == null) + { + throw new IllegalArgumentException("Plugin cannot be null"); + } + + this.plugin = plugin; + + // load the config + File file = new File(CONFIG_FILE); + configuration = YamlConfiguration.loadConfiguration(file); + + // add some defaults + configuration.addDefault("opt-out", false); + configuration.addDefault("guid", UUID.randomUUID().toString()); + + // Do we need to create the file? + if (configuration.get("guid", null) == null) + { + configuration.options().header("http://metrics.griefcraft.com").copyDefaults(true); + configuration.save(file); + } + + // Load the guid then + guid = configuration.getString("guid"); + } + + /** + * Construct and create a Graph that can be used to separate specific plotters to their own graphs on the metrics + * website. Plotters can be added to the graph object returned. + * + * @param name + * @return Graph object created. Will never return NULL under normal circumstances unless bad parameters are given + */ + public Graph createGraph(String name) + { + if (name == null) + { + throw new IllegalArgumentException("Graph name cannot be null"); + } + + // Construct the graph object + Graph graph = new Graph(name); + + // Now we can add our graph + graphs.add(graph); + + // and return back + return graph; + } + + /** + * Adds a custom data plotter to the default graph + * + * @param plotter + */ + public void addCustomData(Plotter plotter) + { + if (plotter == null) + { + throw new IllegalArgumentException("Plotter cannot be null"); + } + + // Add the plotter to the graph o/ + defaultGraph.addPlotter(plotter); + + // Ensure the default graph is included in the submitted graphs + graphs.add(defaultGraph); + } + + public boolean isOptOut() + { + return configuration.getBoolean("opt-out", false); + } + + /** + * Start measuring statistics. This will immediately create an async repeating task as the plugin and send the + * initial data to the metrics backend, and then after that it will post in increments of PING_INTERVAL * 1200 + * ticks. + */ + public void start() + { + // Did we opt out? + if (configuration.getBoolean("opt-out", false)) + { + return; + } + + // Begin hitting the server with glorious data + plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() + { + private boolean firstPost = true; + + public void run() + { + try + { + // We use the inverse of firstPost because if it is the first time we are posting, + // it is not a interval ping, so it evaluates to FALSE + // Each time thereafter it will evaluate to TRUE, i.e PING! + postPlugin(!firstPost); + + // After the first post we set firstPost to false + // Each post thereafter will be a ping + firstPost = false; + } + catch (IOException e) + { + System.err.println("[Metrics] " + e.getMessage()); + } + } + }, 0, PING_INTERVAL * 1200); + } + + /** + * Generic method that posts a plugin to the metrics website + */ + private void postPlugin(boolean isPing) throws IOException + { + // The plugin's description file containg all of the plugin data such as name, version, author, etc + PluginDescriptionFile description = plugin.getDescription(); + + // Construct the post data + String data = encode("guid") + '=' + encode(guid) + + encodeDataPair("version", description.getVersion()) + + encodeDataPair("server", Bukkit.getVersion()) + + encodeDataPair("players", Integer.toString(Bukkit.getServer().getOnlinePlayers().length)) + + encodeDataPair("revision", String.valueOf(REVISION)); + + // If we're pinging, append it + if (isPing) + { + data += encodeDataPair("ping", "true"); + } + + // Acquire a lock on the graphs, which lets us make the assumption we also lock everything + // inside of the graph (e.g plotters) + synchronized (graphs) + { + Iterator iter = graphs.iterator(); + + while (iter.hasNext()) + { + Graph graph = iter.next(); + + // Because we have a lock on the graphs set already, it is reasonable to assume + // that our lock transcends down to the individual plotters in the graphs also. + // Because our methods are private, no one but us can reasonably access this list + // without reflection so this is a safe assumption without adding more code. + for (Plotter plotter : graph.getPlotters()) + { + // The key name to send to the metrics server + // The format is C-GRAPHNAME-PLOTTERNAME where separator - is defined at the top + // Legacy (R4) submitters use the format Custom%s, or CustomPLOTTERNAME + String key = String.format("C%s%s%s%s", CUSTOM_DATA_SEPARATOR, graph.getName(), CUSTOM_DATA_SEPARATOR, plotter.getColumnName()); + + // The value to send, which for the foreseeable future is just the string + // value of plotter.getValue() + String value = Integer.toString(plotter.getValue()); + + // Add it to the http post data :) + data += encodeDataPair(key, value); + } + } + } + + // Create the url + URL url = new URL(BASE_URL + String.format(REPORT_URL, description.getName())); + + // Connect to the website + URLConnection connection; + + // Mineshafter creates a socks proxy, so we can safely bypass it + // It does not reroute POST requests so we need to go around it + if (isMineshafterPresent()) + { + connection = url.openConnection(Proxy.NO_PROXY); + } + else + { + connection = url.openConnection(); + } + + connection.setDoOutput(true); + + // Write the data + OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream()); + writer.write(data); + writer.flush(); + + // Now read the response + BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String response = reader.readLine(); + + // close resources + writer.close(); + reader.close(); + + if (response.startsWith("ERR")) + { + throw new IOException(response); //Throw the exception + } + else + { + // Is this the first update this hour? + if (response.contains("OK This is your first update this hour")) + { + synchronized (graphs) + { + Iterator iter = graphs.iterator(); + + while (iter.hasNext()) + { + Graph graph = iter.next(); + + for (Plotter plotter : graph.getPlotters()) + { + plotter.reset(); + } + } + } + } + } + //if (response.startsWith("OK")) - We should get "OK" followed by an optional description if everything goes right + } + + /** + * Check if mineshafter is present. If it is, we need to bypass it to send POST requests + * + * @return + */ + private boolean isMineshafterPresent() + { + try + { + Class.forName("mineshafter.MineServer"); + return true; + } + catch (Exception e) + { + return false; + } + } + + /** + *

Encode a key/value data pair to be used in a HTTP post request. This INCLUDES a & so the first key/value pair + * MUST be included manually, e.g:

+ * + * String httpData = encode("guid") + '=' + encode("1234") + encodeDataPair("authors") + ".."; + * + * + * @param key + * @param value + * @return + */ + private static String encodeDataPair(String key, String value) throws UnsupportedEncodingException + { + return '&' + encode(key) + '=' + encode(value); + } + + /** + * Encode text as UTF-8 + * + * @param text + * @return + */ + private static String encode(String text) throws UnsupportedEncodingException + { + return URLEncoder.encode(text, "UTF-8"); + } + + + /** + * Represents a custom graph on the website + */ + public static class Graph + { + /** + * The graph's name, alphanumeric and spaces only :) If it does not comply to the above when submitted, it is + * rejected + */ + private final String name; + /** + * The set of plotters that are contained within this graph + */ + private final Set plotters = new LinkedHashSet(); + + private Graph(String name) + { + this.name = name; + } + + /** + * Gets the graph's name + * + * @return + */ + public String getName() + { + return name; + } + + /** + * Add a plotter to the graph, which will be used to plot entries + * + * @param plotter + */ + public void addPlotter(Plotter plotter) + { + plotters.add(plotter); + } + + /** + * Remove a plotter from the graph + * + * @param plotter + */ + public void removePlotter(Plotter plotter) + { + plotters.remove(plotter); + } + + /** + * Gets an unmodifiable set of the plotter objects in the graph + * + * @return + */ + public Set getPlotters() + { + return Collections.unmodifiableSet(plotters); + } + + @Override + public int hashCode() + { + return name.hashCode(); + } + + @Override + public boolean equals(Object object) + { + if (!(object instanceof Graph)) + { + return false; + } + + Graph graph = (Graph)object; + return graph.name.equals(name); + } + } + + + /** + * Interface used to collect custom data for a plugin + */ + public static abstract class Plotter + { + /** + * The plot's name + */ + private final String name; + + /** + * Construct a plotter with the default plot name + */ + public Plotter() + { + this("Default"); + } + + /** + * Construct a plotter with a specific plot name + * + * @param name + */ + public Plotter(String name) + { + this.name = name; + } + + /** + * Get the current value for the plotted point + * + * @return + */ + public abstract int getValue(); + + /** + * Get the column name for the plotted point + * + * @return the plotted point's column name + */ + public String getColumnName() + { + return name; + } + + /** + * Called after the website graphs have been updated + */ + public void reset() + { + } + + @Override + public int hashCode() + { + return getColumnName().hashCode() + getValue(); + } + + @Override + public boolean equals(Object object) + { + if (!(object instanceof Plotter)) + { + return false; + } + + Plotter plotter = (Plotter)object; + return plotter.name.equals(name) && plotter.getValue() == getValue(); + } + } +} diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java new file mode 100644 index 000000000..fb2db2e15 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java @@ -0,0 +1,40 @@ +package com.earth2me.essentials.metrics; + +import com.earth2me.essentials.IEssentials; +import com.earth2me.essentials.User; +import java.util.logging.Level; +import org.bukkit.Server; +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.PlayerJoinEvent; + + +public class MetricsListener implements Listener +{ + private final transient Server server; + private final transient IEssentials ess; + private final transient MetricsStarter starter; + + public MetricsListener(final IEssentials parent, final MetricsStarter starter) + { + this.ess = parent; + this.server = parent.getServer(); + this.starter = starter; + } + + @EventHandler(priority = EventPriority.MONITOR) + public void onPlayerJoin(final PlayerJoinEvent event) + { + final User player = ess.getUser(event.getPlayer()); + if (ess.getSettings().isMetricsEnabled() == false && (player.isAuthorized("essentials.essentials") || player.isAuthorized("bukkit.broadcast.admin"))) + { + player.sendMessage("PluginMetrics collects minimal statistic data, starting in about 5 minutes."); + player.sendMessage("To opt out, edit plugins/PluginMetrics/config.yml."); + ess.getLogger().log(Level.INFO, "[Metrics] Admin join - Starting 5 minute opt-out period."); + ess.getSettings().setMetricsEnabled(true); + ess.getScheduler().scheduleAsyncDelayedTask(ess, starter, 5 * 1200); + } + } +} diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java new file mode 100644 index 000000000..a775f68f1 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -0,0 +1,62 @@ +package com.earth2me.essentials.metrics; + + +import com.earth2me.essentials.IEssentials; +import java.io.IOException; +import java.util.logging.Level; + + +public class MetricsStarter implements Runnable +{ + private final IEssentials ess; + private transient Boolean start; + + public MetricsStarter(final IEssentials plugin) + { + ess = plugin; + try + { + final Metrics metrics = new Metrics(ess); + + if (!metrics.isOptOut()) + { + if (ess.getSettings().isMetricsEnabled()) + { + start = true; + } + else + { + ess.getLogger().info("This plugin collects minimal statistic data and sends it to http://metrics.essentials3.net."); + ess.getLogger().info("You can opt out by changing plugins/PluginMetrics/config.yml, set opt-out to true."); + ess.getLogger().info("This will start 5 minutes after the first admin/op joins."); + start = false; + } + return; + } + } + catch (IOException e) + { + ess.getLogger().log(Level.WARNING, "[Metrics] " + e.getMessage(), e); + } + } + + @Override + public void run() + { + try + { + final Metrics metrics = new Metrics(ess); + metrics.start(); + + } + catch (IOException e) + { + ess.getLogger().log(Level.WARNING, "[Metrics] " + e.getMessage(), e); + } + } + + public Boolean getStart() + { + return start; + } +} \ No newline at end of file -- cgit v1.2.3 From 5e8fd3993da989d0905e5c5e29cf3f5dd889bf49 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 01:17:12 +0000 Subject: Basic module graph. --- .../com/earth2me/essentials/EssentialsUpgrade.java | 9 +++--- .../essentials/metrics/MetricsStarter.java | 33 ++++++++++++++++++++-- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java index 8bfec57d1..bc0de9fa4 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java @@ -730,7 +730,7 @@ public class EssentialsUpgrade doneFile.setProperty("updateSpawnsToNewSpawnsConfig", true); doneFile.save(); } - + private void updateJailsToNewJailsConfig() { if (doneFile.getBoolean("updateJailsToNewJailsConfig", false)) @@ -777,13 +777,14 @@ public class EssentialsUpgrade doneFile.setProperty("updateJailsToNewJailsConfig", true); doneFile.save(); } - - private void warnMetrics() { + + private void warnMetrics() + { if (doneFile.getBoolean("warnMetrics", false)) { return; } - ess.getSettings().setMetricsEnabled(false); + ess.getSettings().setMetricsEnabled(false); doneFile.setProperty("warnMetrics", true); doneFile.save(); } diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java index a775f68f1..347d74bf6 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -1,7 +1,7 @@ package com.earth2me.essentials.metrics; - import com.earth2me.essentials.IEssentials; +import com.earth2me.essentials.metrics.Metrics.Graph; import java.io.IOException; import java.util.logging.Level; @@ -11,6 +11,17 @@ public class MetricsStarter implements Runnable private final IEssentials ess; private transient Boolean start; + + private enum Modules + { + Essentials, + EssentialsChat, + EssentialsSpawn, + EssentialsProtect, + EssentialsGeoIP, + EssentialsXMPP + }; + public MetricsStarter(final IEssentials plugin) { ess = plugin; @@ -45,7 +56,25 @@ public class MetricsStarter implements Runnable { try { - final Metrics metrics = new Metrics(ess); + final Metrics metrics = new Metrics(ess); + + Graph moduleGraph = metrics.createGraph("Modules Used"); + for (Modules module : Modules.values()) + { + final String moduleName = module.toString(); + if (ess.getServer().getPluginManager().isPluginEnabled(moduleName)) + { + moduleGraph.addPlotter(new Metrics.Plotter(moduleName) + { + @Override + public int getValue() + { + return 1; + } + }); + } + } + metrics.start(); } -- cgit v1.2.3 From 8776f4c1c040d8636a180939d7b076c3a1045ffd Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 01:32:08 +0000 Subject: Metrics errors aren't important. --- .../earth2me/essentials/metrics/MetricsStarter.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java index 347d74bf6..120b22742 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -45,9 +45,9 @@ public class MetricsStarter implements Runnable return; } } - catch (IOException e) + catch (IOException ex) { - ess.getLogger().log(Level.WARNING, "[Metrics] " + e.getMessage(), e); + metricsError(ex); } } @@ -78,9 +78,21 @@ public class MetricsStarter implements Runnable metrics.start(); } - catch (IOException e) + catch (IOException ex) { - ess.getLogger().log(Level.WARNING, "[Metrics] " + e.getMessage(), e); + metricsError(ex); + } + } + + public void metricsError(IOException ex) + { + if (ess.getSettings().isDebug()) + { + ess.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage(), ex); + } + else + { + ess.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage()); } } -- cgit v1.2.3 From b85756f8b1d0b3a2d8b144b0cb7552b8d08d2092 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 02:12:27 +0000 Subject: Adding some simple feature metrics. --- .../essentials/metrics/MetricsStarter.java | 55 ++++++++++++++++++---- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java index 120b22742..7c79b6406 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -2,7 +2,9 @@ package com.earth2me.essentials.metrics; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.metrics.Metrics.Graph; +import com.earth2me.essentials.metrics.Metrics.Plotter; import java.io.IOException; +import java.util.Locale; import java.util.logging.Level; @@ -64,17 +66,39 @@ public class MetricsStarter implements Runnable final String moduleName = module.toString(); if (ess.getServer().getPluginManager().isPluginEnabled(moduleName)) { - moduleGraph.addPlotter(new Metrics.Plotter(moduleName) - { - @Override - public int getValue() - { - return 1; - } - }); + moduleGraph.addPlotter(new SimplePlotter(moduleName)); } } + Graph localeGraph = metrics.createGraph("Locale"); + localeGraph.addPlotter(new SimplePlotter(ess.getI18n().getCurrentLocale().getDisplayLanguage(Locale.ENGLISH))); + + Graph featureGraph = metrics.createGraph("Features"); + featureGraph.addPlotter(new Plotter("Unique Accounts") + { + @Override + public int getValue() + { + return ess.getUserMap().getUniqueUsers(); + } + }); + featureGraph.addPlotter(new Plotter("Kits") + { + @Override + public int getValue() + { + return ess.getSettings().getKits().getKeys(false).size(); + } + }); + featureGraph.addPlotter(new Plotter("Warps") + { + @Override + public int getValue() + { + return ess.getWarps().getWarpNames().size(); + } + }); + metrics.start(); } @@ -100,4 +124,19 @@ public class MetricsStarter implements Runnable { return start; } + + + private class SimplePlotter extends Plotter + { + public SimplePlotter(final String name) + { + super(name); + } + + @Override + public int getValue() + { + return 1; + } + } } \ No newline at end of file -- cgit v1.2.3 From 5d79863cfc5cb72aa387a381cf8069cbd20a1c49 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 02:12:43 +0000 Subject: Fixing setwarp command. --- Essentials/src/com/earth2me/essentials/Warps.java | 3 ++- Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java | 5 +++-- .../src/com/earth2me/essentials/commands/WarpNotFoundException.java | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Warps.java b/Essentials/src/com/earth2me/essentials/Warps.java index 57326b54a..ece987aba 100644 --- a/Essentials/src/com/earth2me/essentials/Warps.java +++ b/Essentials/src/com/earth2me/essentials/Warps.java @@ -1,6 +1,7 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.commands.WarpNotFoundException; import java.io.File; import java.util.*; import java.util.logging.Level; @@ -48,7 +49,7 @@ public class Warps implements IConf EssentialsConf conf = warpPoints.get(new StringIgnoreCase(warp)); if (conf == null) { - throw new Exception(_("warpNotExist")); + throw new WarpNotFoundException(); } return conf.getLocation(null, server); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java index b39a7efcf..42da62b85 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import com.earth2me.essentials.Util; import com.earth2me.essentials.Warps; import org.bukkit.Location; import org.bukkit.Server; @@ -34,11 +35,11 @@ public class Commandsetwarp extends EssentialsCommand { warpLoc = warps.getWarp(args[0]); } - catch (WarpNotFoundException ex) + catch (Exception ex) { } - if (warpLoc == null || user.hasPermission("essentials.warp.overwrite." + args[0])) + if (warpLoc == null || user.isAuthorized("essentials.warp.overwrite." + Util.sanitizeFileName(args[0]))) { warps.setWarp(args[0], loc); } diff --git a/Essentials/src/com/earth2me/essentials/commands/WarpNotFoundException.java b/Essentials/src/com/earth2me/essentials/commands/WarpNotFoundException.java index 9258bf926..bfba73818 100644 --- a/Essentials/src/com/earth2me/essentials/commands/WarpNotFoundException.java +++ b/Essentials/src/com/earth2me/essentials/commands/WarpNotFoundException.java @@ -1,11 +1,12 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; public class WarpNotFoundException extends Exception { public WarpNotFoundException() { - super("Warp not found"); + super(_("warpNotExist")); } public WarpNotFoundException(String message) -- cgit v1.2.3 From d0d0117411c95bb188eff6af4779686382ce9472 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 03:49:17 +0000 Subject: Add metric opt out toggle ingame. --- .../src/com/earth2me/essentials/Essentials.java | 18 ++++++++++++++--- .../src/com/earth2me/essentials/IEssentials.java | 6 ++++++ .../essentials/commands/Commandessentials.java | 23 ++++++++++++++++++++++ .../com/earth2me/essentials/metrics/Metrics.java | 18 +++++++++++++---- .../essentials/metrics/MetricsListener.java | 2 +- .../essentials/metrics/MetricsStarter.java | 18 +++++++++-------- 6 files changed, 69 insertions(+), 16 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 22ac04c6d..352c25b41 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -24,6 +24,7 @@ import com.earth2me.essentials.commands.EssentialsCommand; import com.earth2me.essentials.commands.IEssentialsCommand; import com.earth2me.essentials.commands.NoChargeException; import com.earth2me.essentials.commands.NotEnoughArgumentsException; +import com.earth2me.essentials.metrics.Metrics; import com.earth2me.essentials.metrics.MetricsListener; import com.earth2me.essentials.metrics.MetricsStarter; import com.earth2me.essentials.perm.PermissionsHandler; @@ -84,6 +85,7 @@ public class Essentials extends JavaPlugin implements IEssentials private transient UserMap userMap; private transient ExecuteTimer execTimer; private transient I18n i18n; + private transient Metrics metrics; @Override public ISettings getSettings() @@ -239,13 +241,13 @@ public class Essentials extends JavaPlugin implements IEssentials getScheduler().scheduleSyncRepeatingTask(this, timer, 1, 100); Economy.setEss(this); execTimer.mark("RegListeners"); - + final MetricsStarter metricsStarter = new MetricsStarter(this); - if (metricsStarter.getStart()) + if (metricsStarter.getStart() != null && metricsStarter.getStart() == true) { getScheduler().scheduleAsyncDelayedTask(this, metricsStarter, 1); } - else if (metricsStarter.getStart() == false) + else if (metricsStarter.getStart() != null && metricsStarter.getStart() == false) { final MetricsListener metricsListener = new MetricsListener(this, metricsStarter); pm.registerEvents(metricsListener, this); @@ -449,6 +451,16 @@ public class Essentials extends JavaPlugin implements IEssentials return backup; } + public Metrics getMetrics() + { + return metrics; + } + + public void setMetrics(Metrics metrics) + { + this.metrics = metrics; + } + @Override public User getUser(final Object base) { diff --git a/Essentials/src/com/earth2me/essentials/IEssentials.java b/Essentials/src/com/earth2me/essentials/IEssentials.java index 6b820440a..83c2e7325 100644 --- a/Essentials/src/com/earth2me/essentials/IEssentials.java +++ b/Essentials/src/com/earth2me/essentials/IEssentials.java @@ -1,6 +1,7 @@ package com.earth2me.essentials; import com.earth2me.essentials.api.IJails; +import com.earth2me.essentials.metrics.Metrics; import com.earth2me.essentials.perm.PermissionsHandler; import com.earth2me.essentials.register.payment.Methods; import org.bukkit.World; @@ -65,4 +66,9 @@ public interface IEssentials extends Plugin ItemDb getItemDb(); UserMap getUserMap(); + + Metrics getMetrics(); + + void setMetrics(Metrics metrics); + } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java index ce2f03af9..bf1077c30 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java @@ -2,8 +2,12 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.Util; +import com.earth2me.essentials.metrics.Metrics; +import java.io.IOException; import java.util.HashMap; import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Server; @@ -40,6 +44,10 @@ public class Commandessentials extends EssentialsCommand { run_moo(server, sender, commandLabel, args); } + else if (args[0].equalsIgnoreCase("opt-out")) + { + run_optout(server, sender, commandLabel, args); + } else { run_reload(server, sender, commandLabel, args); } @@ -171,4 +179,19 @@ public class Commandessentials extends EssentialsCommand else sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | | |", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } ); } + + private void run_optout(final Server server, final CommandSender sender, final String command, final String args[]) + { + final Metrics metrics = ess.getMetrics(); + try + { + sender.sendMessage("Essentials collects simple metrics to highlight which features to concentrate work on in the future."); + metrics.setOptOut(!metrics.isOptOut()); + sender.sendMessage("Annonmous Metrics are now: " + (metrics.isOptOut() ? "disabled" : "enabled")); + } + catch (IOException ex) + { + sender.sendMessage("Unable to modify 'plugins/PluginMetrics/config.yml': " + ex.getMessage()); + } + } } diff --git a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java index 3a43af70f..a5de7816c 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java +++ b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java @@ -97,7 +97,11 @@ public class Metrics /** * The plugin configuration file */ - private final YamlConfiguration configuration; + private final YamlConfiguration configuration; + /** + * The plugin configuration file + */ + private final File configurationFile; /** * Unique server id */ @@ -113,8 +117,8 @@ public class Metrics this.plugin = plugin; // load the config - File file = new File(CONFIG_FILE); - configuration = YamlConfiguration.loadConfiguration(file); + configurationFile = new File(CONFIG_FILE); + configuration = YamlConfiguration.loadConfiguration(configurationFile); // add some defaults configuration.addDefault("opt-out", false); @@ -124,7 +128,7 @@ public class Metrics if (configuration.get("guid", null) == null) { configuration.options().header("http://metrics.griefcraft.com").copyDefaults(true); - configuration.save(file); + configuration.save(configurationFile); } // Load the guid then @@ -178,6 +182,12 @@ public class Metrics { return configuration.getBoolean("opt-out", false); } + + public void setOptOut(final boolean toggle) throws IOException + { + configuration.set("opt-out", toggle); + configuration.save(configurationFile); + } /** * Start measuring statistics. This will immediately create an async repeating task as the plugin and send the diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java index fb2db2e15..4af8f9173 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java @@ -31,7 +31,7 @@ public class MetricsListener implements Listener if (ess.getSettings().isMetricsEnabled() == false && (player.isAuthorized("essentials.essentials") || player.isAuthorized("bukkit.broadcast.admin"))) { player.sendMessage("PluginMetrics collects minimal statistic data, starting in about 5 minutes."); - player.sendMessage("To opt out, edit plugins/PluginMetrics/config.yml."); + player.sendMessage("To opt out, run /essentials opt-out"); ess.getLogger().log(Level.INFO, "[Metrics] Admin join - Starting 5 minute opt-out period."); ess.getSettings().setMetricsEnabled(true); ess.getScheduler().scheduleAsyncDelayedTask(ess, starter, 5 * 1200); diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java index 7c79b6406..ddd4c197c 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -29,7 +29,9 @@ public class MetricsStarter implements Runnable ess = plugin; try { + final Metrics metrics = new Metrics(ess); + ess.setMetrics(metrics); if (!metrics.isOptOut()) { @@ -40,14 +42,14 @@ public class MetricsStarter implements Runnable else { ess.getLogger().info("This plugin collects minimal statistic data and sends it to http://metrics.essentials3.net."); - ess.getLogger().info("You can opt out by changing plugins/PluginMetrics/config.yml, set opt-out to true."); + ess.getLogger().info("You can opt out by running /essentials opt-out"); ess.getLogger().info("This will start 5 minutes after the first admin/op joins."); start = false; } return; } } - catch (IOException ex) + catch (Exception ex) { metricsError(ex); } @@ -58,9 +60,9 @@ public class MetricsStarter implements Runnable { try { - final Metrics metrics = new Metrics(ess); + final Metrics metrics = ess.getMetrics(); - Graph moduleGraph = metrics.createGraph("Modules Used"); + final Graph moduleGraph = metrics.createGraph("Modules Used"); for (Modules module : Modules.values()) { final String moduleName = module.toString(); @@ -70,10 +72,10 @@ public class MetricsStarter implements Runnable } } - Graph localeGraph = metrics.createGraph("Locale"); + final Graph localeGraph = metrics.createGraph("Locale"); localeGraph.addPlotter(new SimplePlotter(ess.getI18n().getCurrentLocale().getDisplayLanguage(Locale.ENGLISH))); - Graph featureGraph = metrics.createGraph("Features"); + final Graph featureGraph = metrics.createGraph("Features"); featureGraph.addPlotter(new Plotter("Unique Accounts") { @Override @@ -102,13 +104,13 @@ public class MetricsStarter implements Runnable metrics.start(); } - catch (IOException ex) + catch (Exception ex) { metricsError(ex); } } - public void metricsError(IOException ex) + public void metricsError(final Exception ex) { if (ess.getSettings().isDebug()) { -- cgit v1.2.3 From 45cf2ae9605732dc3d6da3195b8fcc83f8972e8a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 04:41:56 +0000 Subject: Make /spawner errors more descriptive. --- .../essentials/commands/Commandspawner.java | 47 ++++++++++------------ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java index 1cd65a743..d2b50137d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java @@ -1,10 +1,7 @@ package com.earth2me.essentials.commands; +import com.earth2me.essentials.*; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.Mob; -import com.earth2me.essentials.Trade; -import com.earth2me.essentials.User; -import com.earth2me.essentials.Util; import java.util.Locale; import org.bukkit.Location; import org.bukkit.Material; @@ -34,34 +31,34 @@ public class Commandspawner extends EssentialsCommand throw new Exception(_("mobSpawnTarget")); } + String name = args[0]; + + Mob mob = null; + mob = Mob.fromName(name); + if (mob == null) + { + throw new Exception(_("invalidMob")); + } + if (ess.getSettings().getProtectPreventSpawn(mob.getType().toString().toLowerCase(Locale.ENGLISH))) + { + throw new Exception(_("disabledToSpawnMob")); + } + if (!user.isAuthorized("essentials.spawner." + mob.name.toLowerCase(Locale.ENGLISH))) + { + throw new Exception(_("noPermToSpawnMob")); + } + final Trade charge = new Trade("spawner-" + mob.name.toLowerCase(Locale.ENGLISH), ess); + charge.isAffordableFor(user); try { - String name = args[0]; - - Mob mob = null; - mob = Mob.fromName(name); - if (mob == null) - { - user.sendMessage(_("invalidMob")); - return; - } - if (ess.getSettings().getProtectPreventSpawn(mob.getType().toString().toLowerCase(Locale.ENGLISH))) - { - throw new Exception(_("unableToSpawnMob")); - } - if (!user.isAuthorized("essentials.spawner." + mob.name.toLowerCase(Locale.ENGLISH))) - { - throw new Exception(_("unableToSpawnMob")); - } - final Trade charge = new Trade("spawner-" + mob.name.toLowerCase(Locale.ENGLISH), ess); - charge.isAffordableFor(user); ((CreatureSpawner)target.getBlock().getState()).setSpawnedType(mob.getType()); - charge.charge(user); - user.sendMessage(_("setSpawner", mob.name)); } catch (Throwable ex) { throw new Exception(_("mobSpawnError"), ex); } + charge.charge(user); + user.sendMessage(_("setSpawner", mob.name)); + } } -- cgit v1.2.3 From e5e81eda72af4d8af5564b6aec43ee0a72067f26 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 05:09:34 +0000 Subject: Make /nuke drop tnt from a more reasonable height. --- Essentials/src/com/earth2me/essentials/commands/Commandnuke.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java index 19695233e..60b1e3111 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java @@ -51,7 +51,7 @@ public class Commandnuke extends EssentialsCommand { for (int z = -10; z <= 10; z += 5) { - final Location tntloc = new Location(world, loc.getBlockX() + x, world.getMaxHeight(), loc.getBlockZ() + z); + final Location tntloc = new Location(world, loc.getBlockX() + x, world.getHighestBlockYAt(loc) + 64, loc.getBlockZ() + z); final TNTPrimed tnt = world.spawn(tntloc, TNTPrimed.class); } } -- cgit v1.2.3 From bada36be686ebe8ceac0edc461a6cd5f970d5a44 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 06:42:58 +0000 Subject: Fix fake explosions. --- .../earth2me/essentials/TNTExplodeListener.java | 7 ++- .../essentials/craftbukkit/FakeExplosion.java | 51 ---------------------- .../protect/EssentialsProtectEntityListener.java | 7 ++- 3 files changed, 8 insertions(+), 57 deletions(-) delete mode 100644 Essentials/src/com/earth2me/essentials/craftbukkit/FakeExplosion.java diff --git a/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java b/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java index 54e49ad5f..4187f835d 100644 --- a/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java +++ b/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java @@ -1,6 +1,5 @@ package com.earth2me.essentials; -import com.earth2me.essentials.craftbukkit.FakeExplosion; import org.bukkit.entity.LivingEntity; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -46,8 +45,12 @@ public class TNTExplodeListener implements Listener, Runnable { return; } - FakeExplosion.createExplosion(event, ess.getServer(), ess.getServer().getOnlinePlayers()); + if (event.blockList().size() < 1) + { + return; + } event.setCancelled(true); + event.getLocation().getWorld().createExplosion(event.getLocation(), 0F); } @Override diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeExplosion.java b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeExplosion.java deleted file mode 100644 index 934d94fa2..000000000 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeExplosion.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.earth2me.essentials.craftbukkit; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; -import net.minecraft.server.ChunkPosition; -import net.minecraft.server.Packet60Explosion; -import org.bukkit.Location; -import org.bukkit.Server; -import org.bukkit.block.Block; -import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.craftbukkit.CraftWorld; -import org.bukkit.entity.Player; -import org.bukkit.event.entity.EntityExplodeEvent; - - -public class FakeExplosion -{ - public static void createExplosion(final EntityExplodeEvent event, final Server server, final Player[] players) - { - try - { - final Set set = new HashSet(event.blockList().size()); - final List blocksUnderPlayers = new ArrayList(players.length); - final Location loc = event.getLocation(); - for (Player player : players) - { - if (player.getWorld().equals(loc.getWorld())) - { - blocksUnderPlayers.add(new ChunkPosition(player.getLocation().getBlockX(), player.getLocation().getBlockY() - 1, player.getLocation().getBlockZ())); - } - } - for (Block block : event.blockList()) - { - final ChunkPosition cp = new ChunkPosition(block.getX(), block.getY(), block.getZ()); - if (!blocksUnderPlayers.contains(cp)) - { - set.add(cp); - } - } - ((CraftServer)server).getHandle().sendPacketNearby(loc.getX(), loc.getY(), loc.getZ(), 64.0, ((CraftWorld)loc.getWorld()).getHandle().worldProvider.dimension, new Packet60Explosion(loc.getX(), loc.getY(), loc.getZ(), 3.0F, set)); - } - catch (Throwable ex) - { - Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex); - } - } -} diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java index d19f48abb..fe3cadbbe 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java @@ -2,7 +2,6 @@ package com.earth2me.essentials.protect; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; -import com.earth2me.essentials.craftbukkit.FakeExplosion; import java.util.Locale; import org.bukkit.Material; import org.bukkit.block.Block; @@ -204,11 +203,11 @@ public class EssentialsProtectEntityListener implements Listener if (event.getEntity() instanceof EnderDragon && prot.getSettingBool(ProtectConfig.prevent_enderdragon_blockdmg)) { + event.setCancelled(true); if (prot.getSettingBool(ProtectConfig.enderdragon_fakeexplosions)) { - FakeExplosion.createExplosion(event, ess.getServer(), ess.getServer().getOnlinePlayers()); + event.getLocation().getWorld().createExplosion(event.getLocation(), 0F); } - event.setCancelled(true); return; } else if (event.getEntity() instanceof Creeper @@ -217,8 +216,8 @@ public class EssentialsProtectEntityListener implements Listener || (maxHeight >= 0 && event.getLocation().getBlockY() > maxHeight))) { //Nicccccccccce plaaacccccccccce.. - FakeExplosion.createExplosion(event, ess.getServer(), ess.getServer().getOnlinePlayers()); event.setCancelled(true); + event.getLocation().getWorld().createExplosion(event.getLocation(), 0F); return; } else if (event.getEntity() instanceof TNTPrimed -- cgit v1.2.3 From c513014732cc94473c746d3db5be33f773c417ca Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 08:08:25 +0000 Subject: Graph a little bit extra information. --- Essentials/src/com/earth2me/essentials/Jails.java | 13 ++++++ .../src/com/earth2me/essentials/api/IJails.java | 2 + .../essentials/metrics/MetricsStarter.java | 54 +++++++++++++++++++++- .../essentials/perm/PermissionsHandler.java | 5 ++ 4 files changed, 73 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Jails.java b/Essentials/src/com/earth2me/essentials/Jails.java index 7ca4d3bcd..65f486f42 100644 --- a/Essentials/src/com/earth2me/essentials/Jails.java +++ b/Essentials/src/com/earth2me/essentials/Jails.java @@ -146,6 +146,19 @@ public class Jails extends AsyncStorageObjectHolder getList() throws Exception; + int getCount(); + void removeJail(String jail) throws Exception; void sendToJail(com.earth2me.essentials.IUser user, String jail) throws Exception; diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java index ddd4c197c..83ad84337 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -3,7 +3,7 @@ package com.earth2me.essentials.metrics; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.metrics.Metrics.Graph; import com.earth2me.essentials.metrics.Metrics.Plotter; -import java.io.IOException; +import com.earth2me.essentials.register.payment.Method; import java.util.Locale; import java.util.logging.Level; @@ -84,6 +84,14 @@ public class MetricsStarter implements Runnable return ess.getUserMap().getUniqueUsers(); } }); + featureGraph.addPlotter(new Plotter("Jails") + { + @Override + public int getValue() + { + return ess.getJails().getCount(); + } + }); featureGraph.addPlotter(new Plotter("Kits") { @Override @@ -101,6 +109,50 @@ public class MetricsStarter implements Runnable } }); + final Graph enabledGraph = metrics.createGraph("EnabledFeatures"); + enabledGraph.addPlotter(new SimplePlotter("Total")); + final String BKcommand = ess.getSettings().getBackupCommand(); + if (BKcommand != null && !"".equals(BKcommand)) + { + enabledGraph.addPlotter(new SimplePlotter("Backup")); + } + if (ess.getJails().getCount() > 0) + { + enabledGraph.addPlotter(new SimplePlotter("Jails")); + } + if (ess.getSettings().getKits().getKeys(false).size() > 0) + { + enabledGraph.addPlotter(new SimplePlotter("Kits")); + } + if (ess.getWarps().getWarpNames().size() > 0) + { + enabledGraph.addPlotter(new SimplePlotter("Warps")); + } + if (!ess.getSettings().areSignsDisabled()) + { + enabledGraph.addPlotter(new SimplePlotter("Signs")); + } + if (ess.getSettings().getAutoAfk() > 0) + { + enabledGraph.addPlotter(new SimplePlotter("AutoAFK")); + } + if (ess.getSettings().changeDisplayName()) + { + enabledGraph.addPlotter(new SimplePlotter("DisplayName")); + } + if (ess.getSettings().getChatRadius() >= 1) + { + enabledGraph.addPlotter(new SimplePlotter("LocalChat")); + } + + final Graph depGraph = metrics.createGraph("Dependancies"); + Method method = ess.getPaymentMethod().getMethod(); + if (method != null) + { + depGraph.addPlotter(new SimplePlotter(method.getName() + " " + method.getVersion())); + } + depGraph.addPlotter(new SimplePlotter(ess.getPermissionsHandler().getName())); + metrics.start(); } diff --git a/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java b/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java index a344968c2..e1bf13d10 100644 --- a/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java +++ b/Essentials/src/com/earth2me/essentials/perm/PermissionsHandler.java @@ -210,4 +210,9 @@ public class PermissionsHandler implements IPermissionsHandler { this.useSuperperms = useSuperperms; } + + public String getName() + { + return handler.getClass().getSimpleName().replace("Handler", ""); + } } -- cgit v1.2.3 From c09329e5be9e2b923abad716d2f94031dc8f1594 Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 15 Mar 2012 09:15:28 +0100 Subject: :P --- Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java index 83ad84337..d5f7d634a 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -145,7 +145,7 @@ public class MetricsStarter implements Runnable enabledGraph.addPlotter(new SimplePlotter("LocalChat")); } - final Graph depGraph = metrics.createGraph("Dependancies"); + final Graph depGraph = metrics.createGraph("Dependencies"); Method method = ess.getPaymentMethod().getMethod(); if (method != null) { -- cgit v1.2.3 From 5b930cdc3b99fdc1fa6a4d05334f674374767eef Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 15 Mar 2012 20:48:41 +1100 Subject: Restore [free] and [disposal] signs back to their intended behaviour --- .../src/com/earth2me/essentials/signs/SignDisposal.java | 5 +---- Essentials/src/com/earth2me/essentials/signs/SignFree.java | 11 +++-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java index aa6376fa0..f44c6177a 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java @@ -14,10 +14,7 @@ public class SignDisposal extends EssentialsSign @Override protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) { - player.sendMessage("Bukkit broke this sign :("); - //TODO: wait for a fix in bukkit - //Problem: Items can be duplicated - //player.getBase().openInventory(ess.getServer().createInventory(player, 36)); + player.getBase().openInventory(ess.getServer().createInventory(player, 36)); return true; } } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java index f5f32c38c..c7adec307 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java @@ -35,14 +35,9 @@ public class SignFree extends EssentialsSign } item.setAmount(item.getType().getMaxStackSize()); - InventoryWorkaround.addItem(player.getInventory(), true, item); - player.sendMessage("Item added to your inventory."); - player.updateInventory(); - //TODO: wait for a fix in bukkit - //Problem: Items can be duplicated - //Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST); - //i.addItem(item); - //player.openInventory(i); + Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST); + i.addItem(item); + player.openInventory(i); Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess); return true; } -- cgit v1.2.3 From 79cd8d60659f7bb8e9ed8c851b7815c1b99dcacf Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 15 Mar 2012 20:51:51 +1100 Subject: Update minimum CraftBukkit version --- Essentials/src/com/earth2me/essentials/Essentials.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 352c25b41..2ba5a3909 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -69,7 +69,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 2015; + public static final int BUKKIT_VERSION = 2070; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); -- cgit v1.2.3 From cf000b04e40f9cd9d55cf425c9b50daa3b0e473f Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 15 Mar 2012 20:55:56 +1100 Subject: Fill the entire sign with free goodness --- Essentials/src/com/earth2me/essentials/signs/SignFree.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java index c7adec307..52e2b9540 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java @@ -34,8 +34,8 @@ public class SignFree extends EssentialsSign throw new SignException(_("cantSpawnItem", "Air")); } - item.setAmount(item.getType().getMaxStackSize()); - Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST); + item.setAmount(item.getType().getMaxStackSize() * 36); + Inventory i = ess.getServer().createInventory(player, 36); i.addItem(item); player.openInventory(i); Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess); -- cgit v1.2.3 From 4a149855ab3eae05393299fbcfe99693842de532 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 22:15:17 +0000 Subject: Updating Bukkit/CraftBukkit to match minimum ver. --- lib/bukkit.jar | Bin 4690989 -> 4706072 bytes lib/craftbukkit.jar | Bin 11039537 -> 11069383 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/bukkit.jar b/lib/bukkit.jar index 0b13c3119..5cc58ca1d 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index 8b32a634a..009194ab9 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From 5c280e7cb7a2eb7fd2cacf373db698c3b31f7c28 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 22:23:26 +0000 Subject: Add missing methods. --- Essentials/src/com/earth2me/essentials/OfflinePlayer.java | 13 +++++++++++++ .../src/com/earth2me/essentials/craftbukkit/FakeWorld.java | 6 ++++++ Essentials/test/com/earth2me/essentials/FakeServer.java | 12 ++++++++++++ 3 files changed, 31 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java index a1c46c3ea..6a88eb533 100644 --- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java +++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java @@ -7,6 +7,7 @@ import lombok.Delegate; import org.bukkit.*; import org.bukkit.block.Block; import org.bukkit.conversations.Conversation; +import org.bukkit.conversations.ConversationAbandonedEvent; import org.bukkit.entity.*; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -1027,4 +1028,16 @@ public class OfflinePlayer implements Player { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public boolean isBlocking() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void abandonConversation(Conversation arg0, ConversationAbandonedEvent arg1) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java index 91e5d5239..fee9d41e3 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java @@ -627,4 +627,10 @@ public class FakeWorld implements World { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public void setBiome(int arg0, int arg1, Biome arg2) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java index 58fdfc5fe..1d025abe7 100644 --- a/Essentials/test/com/earth2me/essentials/FakeServer.java +++ b/Essentials/test/com/earth2me/essentials/FakeServer.java @@ -705,4 +705,16 @@ public class FakeServer implements Server { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public String getWorldType() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getGenerateStructures() + { + throw new UnsupportedOperationException("Not supported yet."); + } } -- cgit v1.2.3 From adf3755abb29b635977a2eb3ca4688dbd917d471 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 15 Mar 2012 23:15:19 +0000 Subject: Handle permission check failures better. --- .../src/com/earth2me/essentials/Essentials.java | 2 ++ Essentials/src/com/earth2me/essentials/User.java | 8 ++++++- .../essentials/perm/GroupManagerHandler.java | 25 ++++++++++++++++------ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 2ba5a3909..684080f63 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -139,8 +139,10 @@ public class Essentials extends JavaPlugin implements IEssentials final int versionNumber = Integer.parseInt(versionMatch.group(1)); if (versionNumber < BUKKIT_VERSION && versionNumber > 100) { + LOGGER.log(Level.SEVERE, "* ! * ! * ! * ! * ! * ! * ! * ! * ! *"); LOGGER.log(Level.SEVERE, _("notRecommendedBukkit")); LOGGER.log(Level.SEVERE, _("requiredBukkit", Integer.toString(BUKKIT_VERSION))); + LOGGER.log(Level.SEVERE, "* ! * ! * ! * ! * ! * ! * ! * ! * ! *"); this.setEnabled(false); return; } diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 6a7feff07..8f6196e31 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -71,7 +71,13 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return false; } - return ess.getPermissionsHandler().hasPermission(base, node); + try { + return ess.getPermissionsHandler().hasPermission(base, node); + } + catch (Exception ex) { + ess.getLogger().log(Level.SEVERE, "Permission System Error: " + ess.getPermissionsHandler().getName() + " returned: " + ex.getMessage()); + return false; + } } public void healCooldown() throws Exception diff --git a/Essentials/src/com/earth2me/essentials/perm/GroupManagerHandler.java b/Essentials/src/com/earth2me/essentials/perm/GroupManagerHandler.java index 8c3cdf1e2..23fe142b2 100644 --- a/Essentials/src/com/earth2me/essentials/perm/GroupManagerHandler.java +++ b/Essentials/src/com/earth2me/essentials/perm/GroupManagerHandler.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.perm; import java.util.Arrays; import java.util.List; import org.anjocaido.groupmanager.GroupManager; +import org.anjocaido.groupmanager.dataholder.worlds.WorldsHolder; import org.anjocaido.groupmanager.permissions.AnjoPermissionsHandler; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; @@ -20,7 +21,7 @@ public class GroupManagerHandler implements IPermissionsHandler @Override public String getGroup(final Player base) { - final AnjoPermissionsHandler handler = groupManager.getWorldsHolder().getWorldPermissions(base); + final AnjoPermissionsHandler handler = getHandler(base); if (handler == null) { return null; @@ -31,7 +32,7 @@ public class GroupManagerHandler implements IPermissionsHandler @Override public List getGroups(final Player base) { - final AnjoPermissionsHandler handler = groupManager.getWorldsHolder().getWorldPermissions(base); + final AnjoPermissionsHandler handler = getHandler(base); if (handler == null) { return null; @@ -42,7 +43,7 @@ public class GroupManagerHandler implements IPermissionsHandler @Override public boolean canBuild(final Player base, final String group) { - final AnjoPermissionsHandler handler = groupManager.getWorldsHolder().getWorldPermissions(base); + final AnjoPermissionsHandler handler = getHandler(base); if (handler == null) { return false; @@ -53,7 +54,7 @@ public class GroupManagerHandler implements IPermissionsHandler @Override public boolean inGroup(final Player base, final String group) { - AnjoPermissionsHandler handler = groupManager.getWorldsHolder().getWorldPermissions(base); + AnjoPermissionsHandler handler = getHandler(base); if (handler == null) { return false; @@ -64,7 +65,7 @@ public class GroupManagerHandler implements IPermissionsHandler @Override public boolean hasPermission(final Player base, final String node) { - AnjoPermissionsHandler handler = groupManager.getWorldsHolder().getWorldPermissions(base); + AnjoPermissionsHandler handler = getHandler(base); if (handler == null) { return false; @@ -75,7 +76,7 @@ public class GroupManagerHandler implements IPermissionsHandler @Override public String getPrefix(final Player base) { - AnjoPermissionsHandler handler = groupManager.getWorldsHolder().getWorldPermissions(base); + AnjoPermissionsHandler handler = getHandler(base); if (handler == null) { return null; @@ -86,11 +87,21 @@ public class GroupManagerHandler implements IPermissionsHandler @Override public String getSuffix(final Player base) { - AnjoPermissionsHandler handler = groupManager.getWorldsHolder().getWorldPermissions(base); + AnjoPermissionsHandler handler = getHandler(base); if (handler == null) { return null; } return handler.getUserSuffix(base.getName()); } + + private AnjoPermissionsHandler getHandler(final Player base) + { + final WorldsHolder holder = groupManager.getWorldsHolder(); + if (holder == null) + { + return null; + } + return holder.getWorldPermissions(base); + } } -- cgit v1.2.3 From baadd4b1cbe132c822d5f36da52225d843c0d584 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 16 Mar 2012 23:03:22 +0000 Subject: Adding reference to &k in MOTD. --- Essentials/src/com/earth2me/essentials/textreader/TextInput.java | 2 +- Essentials/src/info.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/textreader/TextInput.java b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java index 316a0b576..6e9256b4c 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/TextInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java @@ -74,7 +74,7 @@ public class TextInput implements IText } if (line.length() > 0 && line.charAt(0) == '#') { - bookmarks.put(line.substring(1).toLowerCase(Locale.ENGLISH).replaceAll("&[0-9a-f]", ""), lineNumber); + bookmarks.put(line.substring(1).toLowerCase(Locale.ENGLISH).replaceAll("&[0-9a-fk]", ""), lineNumber); chapters.add(line.substring(1).replace('&', '§').replace("§§", "&")); } lines.add(line.replace('&', '§').replace("§§", "&")); diff --git a/Essentials/src/info.txt b/Essentials/src/info.txt index 0b4fb3c42..cfc037040 100644 --- a/Essentials/src/info.txt +++ b/Essentials/src/info.txt @@ -8,7 +8,7 @@ Name it info_username.txt or info_groupname.txt This also works with motd and rules. Extra pages: -Type /info Colours +Type /info Colors Type /info Tags If you have problem viewing this file ingame, try using /einfo. @@ -29,6 +29,7 @@ Minecraft colors: &4 &&4 &5 &&5 &6 &&6 &7 &&7 &8 &&8 &9 &&9 &a &&a &b &&b &c &&c &d &&d &e &&e &f &&f +&&k &k Magic! #Tags PLAYER: {PLAYER} -- cgit v1.2.3 From 87cd6930208560b206a32ec047c75342423c940a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 17 Mar 2012 01:43:49 +0000 Subject: Adding Exp to /whois, shows total exp and ingame level. Due to the way minecraft calculates levels (flawed formula), its possible to not match calculated level. --- Essentials/src/com/earth2me/essentials/commands/Commandwhois.java | 2 ++ Essentials/src/messages.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_nl.properties | 1 + 8 files changed, 9 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java index f9955cfb4..8adc4c95c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; +import com.earth2me.essentials.craftbukkit.SetExpFix; import java.util.Locale; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -54,6 +55,7 @@ public class Commandwhois extends EssentialsCommand sender.sendMessage(""); sender.sendMessage(_("whoisIs", user.getDisplayName(), user.getName())); sender.sendMessage(_("whoisHealth", user.getHealth())); + sender.sendMessage(_("whoisExp", SetExpFix.getTotalExperience(user), user.getLevel())); sender.sendMessage(_("whoisOP", (user.isOp() ? _("true") : _("false")))); sender.sendMessage(_("whoisGod", (user.isGodModeEnabled() ? _("true") : _("false")))); sender.sendMessage(_("whoisGamemode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)))); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 0db1ab1b3..71922e49c 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -397,6 +397,7 @@ weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds weatherSun=\u00a77You set the weather to sun in {0} weatherSunFor=\u00a77You set the weather to sun in {0} for {1} seconds whoisBanned=\u00a79 - Banned: {0} +whoisExp=\u00a79 - Exp: {0} (Level {1}) whoisGamemode=\u00a79 - Gamemode: {0} whoisGeoLocation=\u00a79 - Location: {0} whoisGod=\u00a79 - God mode: {0} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 6168b7bdb..f5ce209cb 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -397,6 +397,7 @@ weatherStormFor=\u00a77Du har sat vejret til ''storm'' i {0} i {1} sekunder weatherSun=\u00a77Du har sat vejret til ''sol'' i {0} weatherSunFor=\u00a77Du har sat vejret til ''sol'' i {0} i {1} sekunder whoisBanned=\u00a79 - Banned: {0} +whoisExp=\u00a79 - Exp: {0} (Level {1}) whoisGamemode=\u00a79 - Gamemode: {0} whoisGeoLocation=\u00a79 - Placering: {0} whoisGod=\u00a79 - God mode: {0} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 1ebac92ae..fbc93504e 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -416,3 +416,4 @@ year=Jahr years=Jahre youAreHealed=\u00a77Du wurdest geheilt. youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen. +whoisExp=\u00a79 - Exp: {0} (Level {1}) diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index e7433b943..09ee97a55 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -397,6 +397,7 @@ weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds weatherSun=\u00a77You set the weather to sun in {0} weatherSunFor=\u00a77You set the weather to sun in {0} for {1} seconds whoisBanned=\u00a79 - Banned: {0} +whoisExp=\u00a79 - Exp: {0} (Level {1}) whoisGamemode=\u00a79 - Gamemode: {0} whoisGeoLocation=\u00a79 - Location: {0} whoisGod=\u00a79 - God mode: {0} diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 9ffe1fa6c..d9add11c0 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -397,6 +397,7 @@ weatherStormFor=\u00a77Has establecido el tiempo a tormenta en este {1} durante weatherSun=\u00a77Has establecido el tiempo a sol en este mundo. weatherSunFor=\u00a77Has establecido el tiempo a sol en este {1} durante {0} segundos. whoisBanned=\u00a79 - Banned: {0} +whoisExp=\u00a79 - Exp: {0} (Level {1}) whoisGamemode=\u00a79 - Gamemode: {0} whoisGeoLocation=\u00a79 - Localizacion: {0} whoisGod=\u00a79 - God mode: {0} diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index a65e79c52..78b1b894e 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -397,6 +397,7 @@ weatherStormFor=\u00a77Vous avez programm\u00e9 l''orage dans {0} pour {1} secon weatherSun=\u00a77Vous avez programm\u00e9 le beau temps dans {0} weatherSunFor=\u00a77Vous avez programm\u00e9 le beau temps dans {0} pour {1} secondes. whoisBanned=\u00a79 - Banni : {0} +whoisExp=\u00a79 - Exp: {0} (Level {1}) whoisGamemode=\u00a79 - Mode de jeu : {0} whoisGeoLocation=\u00a79 - Emplacement : {0} whoisGod=\u00a79 - Mode Dieu : {0} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index b21185784..9b855643a 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -397,6 +397,7 @@ weatherStormFor=\u00a77Je hebt het weer in de {0} naar storm gezet voor {1} seco weatherSun=\u00a77Je hebt het weer naar zon gezet in de {0} weatherSunFor=\u00a77Je hebt het weer in de {0} naar zon gezet voor {1} seconde whoisBanned=\u00a79 - Banned: {0} +whoisExp=\u00a79 - Exp: {0} (Level {1}) whoisGamemode=\u00a79 - Gamemode: {0} whoisGeoLocation=\u00a79 - Locatie: {0} whoisGod=\u00a79 - God mode: {0} -- cgit v1.2.3 From e4ce814c2f3ff919ad77d2b3845f996a09bfc327 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 17 Mar 2012 03:38:32 +0000 Subject: Comments to SetExpFix. --- Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java b/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java index 5b1161851..70d15b856 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java @@ -5,6 +5,8 @@ import org.bukkit.entity.Player; public class SetExpFix { + //This method is used to update both the recorded total experience and displayed total experience. + //We reset both types to prevent issues. public static void setTotalExperience(final Player player, final int exp) { if (exp < 0) @@ -14,6 +16,9 @@ public class SetExpFix player.setExp(0); player.setLevel(0); player.setTotalExperience(0); + + //This following code is technically redundant now, as bukkit now calulcates levels more or less correctly + //At larger numbers however... player.getExp(3000), only seems to give 2999, putting the below calculations off. int amount = exp; while (amount > 0) { @@ -44,6 +49,8 @@ public class SetExpFix return 7 + (level * 7 >> 1); } + //This method is required because the bukkit player.getTotalExperience() method, shows exp that has been 'spent'. + //Without this people would be able to use exp and then still sell it. public static int getTotalExperience(final Player player) { int exp = (int) (getExpToLevel(player) * player.getExp()); -- cgit v1.2.3 From 762105d69214eb0cd0db2c595b5e156455676cc5 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 17 Mar 2012 06:08:06 +0000 Subject: New permission: essentials.tp.others - Allows players to /tp replaces old reused permission. New permission usage: if world-teleport-permissions is true in the config, TP commands will now check for essentials.world. when a tp would switch worlds. --- Essentials/src/com/earth2me/essentials/commands/Commandtp.java | 9 +++++++-- Essentials/src/com/earth2me/essentials/commands/Commandtpa.java | 5 +++++ Essentials/src/com/earth2me/essentials/commands/Commandtpo.java | 5 +++++ .../src/com/earth2me/essentials/commands/Commandworld.java | 8 ++------ Essentials/src/config.yml | 2 +- Essentials/src/messages.properties | 1 - Essentials/src/messages_da.properties | 1 - Essentials/src/messages_de.properties | 1 - Essentials/src/messages_en.properties | 1 - Essentials/src/messages_es.properties | 1 - Essentials/src/messages_fr.properties | 1 - Essentials/src/messages_nl.properties | 1 - 12 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java index f65dc75f8..72739966b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java @@ -30,6 +30,11 @@ public class Commandtp extends EssentialsCommand { throw new Exception(_("teleportDisabled", player.getDisplayName())); } + if (user.getWorld() != player.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + player.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); + } user.sendMessage(_("teleporting")); final Trade charge = new Trade(this.getName(), ess); charge.isAffordableFor(user); @@ -37,9 +42,9 @@ public class Commandtp extends EssentialsCommand throw new NoChargeException(); default: - if (!user.isAuthorized("essentials.tpohere")) + if (!user.isAuthorized("essentials.tp.others")) { - throw new Exception(_("needTpohere")); + throw new Exception(_("noPerm", "essentials.tp.others")); } user.sendMessage(_("teleporting")); final User target = getPlayer(server, args, 0); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java index 34195d51a..97fa15d5c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java @@ -36,6 +36,11 @@ public class Commandtpa extends EssentialsCommand player.sendMessage(_("teleportRequestTimeoutInfo", ess.getSettings().getTpaAcceptCancellation())); } } + if (user.getWorld() != player.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + player.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); + } user.sendMessage(_("requestSent", player.getDisplayName())); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java index b10f0a301..5edbe274d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java @@ -32,6 +32,11 @@ public class Commandtpo extends EssentialsCommand // Verify permission if (!player.isHidden() || user.isAuthorized("essentials.teleport.hidden")) { + if (user.getWorld() != player.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + player.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); + } user.getTeleport().now(player, false, TeleportCause.COMMAND); user.sendMessage(_("teleporting")); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java index 41554c8ce..c160e0a7a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java @@ -54,13 +54,9 @@ public class Commandworld extends EssentialsCommand } } - if (ess.getSettings().getIsWorldTeleportPermissions()) + if (ess.getSettings().getIsWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + world.getName())) { - if (!user.isAuthorized("essentials.world." + world.getName())) - { - user.sendMessage(_("invalidWorld")); //TODO: Make a "world teleport denied" translation - throw new NoChargeException(); - } + throw new Exception(_("noPerm", "essentials.world." + world.getName())); } double factor; diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 6a0f6e996..2bbb87afc 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -250,7 +250,7 @@ death-messages: true no-god-in-worlds: # - world_nether -# Set to true to enable per-world permissions for teleporting with /world +# Set to true to enable per-world permissions for teleporting with /world, /tp ,/tpa and /tpo. # Give someone permission to teleport to a world with essentials.world. world-teleport-permissions: false diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 71922e49c..02598c9cb 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -205,7 +205,6 @@ mutedPlayer=Player {0} muted. mutedPlayerFor=Player {0} muted for {1}. mutedUserSpeaks={0} tried to speak, but is muted. nearbyPlayers=Players nearby: {0} -needTpohere=You need access to /tpohere to teleport other players. negativeBalanceError=User is not allowed to have a negative balance. nickChanged=Nickname changed. nickDisplayName=\u00a77You have to enable change-displayname in Essentials config. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index f5ce209cb..37bae113c 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -205,7 +205,6 @@ mutedPlayer=Spiller {0} muted. mutedPlayerFor=Spiller {0} muted i {1}. mutedUserSpeaks={0} pr\u00f8vede at snakke, men er muted. nearbyPlayers=Spillere i n\u00c3\u00a6rheden: {0} -needTpohere=Du skal have adgang til /tpohere for at teleportere andre spillere. negativeBalanceError=Brugeren har ikke tilladelse til at have en negativ saldo. nickChanged=Nickname \u00e6ndret. nickDisplayName=\u00a77Du bliver n\u00c3\u00b8dt til at aktivere change-displayname i Essentials config. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index fbc93504e..99501d2e5 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -205,7 +205,6 @@ mutedPlayer=Player {0} ist nun stumm. mutedPlayerFor=Player {0} ist nun stumm f\u00fcr {1}. mutedUserSpeaks={0} versuchte zu sprechen, aber ist stumm geschaltet. nearbyPlayers=Players nearby: {0} -needTpohere=Du brauchst Zugriff auf /tpohere um andere Spieler teleportieren zu k\u00f6nnen. negativeBalanceError=Spieler darf keine Schulden machen. nickChanged=Nickname ge\u00e4ndert. nickDisplayName=\u00a77Du musst \u00a7fchange-displayname\u00a7c in der Essentials-Config aktivieren. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 09ee97a55..6f4d29020 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -205,7 +205,6 @@ mutedPlayer=Player {0} muted. mutedPlayerFor=Player {0} muted for {1}. mutedUserSpeaks={0} tried to speak, but is muted. nearbyPlayers=Players nearby: {0} -needTpohere=You need access to /tpohere to teleport other players. negativeBalanceError=User is not allowed to have a negative balance. nickChanged=Nickname changed. nickDisplayName=\u00a77You have to enable change-displayname in Essentials config. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index d9add11c0..f1609f7f9 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -205,7 +205,6 @@ mutedPlayer=Player {0} silenciado. mutedPlayerFor=Player {0} silenciado durante {1}. mutedUserSpeaks={0} intento hablar, pero esta silenciado. nearbyPlayers=Players nearby: {0} -needTpohere=Necesitas acceso a /tpohere para teletransportar a otros jugadores. negativeBalanceError=El usuario no tiene permitido tener un saldo negativo. nickChanged=Nombre de jugador cambiado. nickDisplayName=\u00a77Tienes que habilitar cambio de nombre de usuario en la configuracion de Essentials. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 78b1b894e..4e33fa061 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -205,7 +205,6 @@ mutedPlayer=Le joueur {0} est d\u00e9sormais muet. mutedPlayerFor={0} a \u00e9t\u00e9 muet pour {1}. mutedUserSpeaks={0} a essay\u00e9 de parler mais est muet. nearbyPlayers=Joueurs dans les environs : {0} -needTpohere=Vous avez besoin de l'acc\u00c3\u00a8s \u00e0 /tpohere pour t\u00e9l\u00e9porter d'autres joueurs. negativeBalanceError=L'utilisateur n'est pas autoris\u00e9 \u00e0 avoir un solde n\u00e9gatif. nickChanged=surnom modifi\u00e9. nickDisplayName=\u00a77Vous devez activer change-displayname dans la configuration Essentials. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 9b855643a..c08111085 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -205,7 +205,6 @@ mutedPlayer=Speler {0} gemute. mutedPlayerFor=Speler {0} is gemute voor {1}. mutedUserSpeaks={0} probeerde te praten, maar is gemute. nearbyPlayers=Players nearby: {0} -needTpohere=Je moet toegang krijgen tot /tpohere om naar andere spelers te teleporteren. negativeBalanceError=Speler is niet toegestaan om een negatief saldo te hebben. nickChanged=Nickname veranderd. nickDisplayName=\u00a77You have to enable change-displayname in Essentials config. -- cgit v1.2.3 From 12cb4fd5f8f92fd05a375ee1c81d92c7eca44ff7 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sat, 17 Mar 2012 11:12:32 +0100 Subject: Fix bukkit download url --- Essentials/src/messages_en.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 6f4d29020..0a64b2308 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -298,7 +298,7 @@ requestDenied=\u00a77Teleport request denied. requestDeniedFrom=\u00a77{0} denied your teleport request requestSent=\u00a77Request sent to {0}\u00a77. requestTimedOut=\u00a7cTeleport request has timed out -requiredBukkit=* ! * You need atleast build {0} of CraftBukkit, download it from http://ci.bukkit.org. +requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} second=second seconds=seconds -- cgit v1.2.3 From ca11d4d98b2467cb400dea039cd6ec25261a6cf9 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sat, 17 Mar 2012 11:15:28 +0100 Subject: Fix bukkit download url --- Essentials/src/messages_da.properties | 2 +- Essentials/src/messages_de.properties | 2 +- Essentials/src/messages_es.properties | 2 +- Essentials/src/messages_fr.properties | 2 +- Essentials/src/messages_nl.properties | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 37bae113c..fd4803d3f 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -298,7 +298,7 @@ requestDenied=\u00a77Anmodning om teleport afvist. requestDeniedFrom=\u00a77{0} afviste din anmodning om teleport. requestSent=\u00a77Anmodning sendt til {0}\u00a77. requestTimedOut=\u00a7cTeleport request has timed out -requiredBukkit=* ! * You need atleast build {0} of CraftBukkit, download it from http://ci.bukkit.org. +requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} second=sekund seconds=sekunder diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 99501d2e5..767f028fd 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -298,7 +298,7 @@ requestDenied=\u00a77Teleportierungsanfrage verweigert. requestDeniedFrom=\u00a77{0} hat deine Teleportierungsanfrage abgelehnt. requestSent=\u00a77Anfrage gesendet an {0}\u00a77. requestTimedOut=\u00a7cTeleport request has timed out -requiredBukkit=* ! * You need atleast build {0} of CraftBukkit, download it from http://ci.bukkit.org. +requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} second=Sekunde seconds=Sekunden diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index f1609f7f9..6356bfbff 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -298,7 +298,7 @@ requestDenied=\u00a77Peticion de teletransporte denegada. requestDeniedFrom=\u00a77{0} ha denegado tu peticion de teletransporte. requestSent=\u00a77Peticion enviada a {0}\u00a77. requestTimedOut=\u00a7cTeleport request has timed out -requiredBukkit=* ! * You need atleast build {0} of CraftBukkit, download it from http://ci.bukkit.org. +requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} second=segundo seconds=segundos diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 4e33fa061..e92efb181 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -298,7 +298,7 @@ requestDenied=\u00a77Demande de t\u00e9l\u00e9portation refus\u00e9e. requestDeniedFrom=\u00a77{0} a refus\u00e9 votre demande de t\u00e9l\u00e9portation. requestSent=\u00a77Requ\u00eate envoy\u00e9e \u00e0 {0}\u00a77. requestTimedOut=\u00a7cLa de mande de t\u00e9l\u00e9portation a expir\u00e9. -requiredBukkit=* ! * Vous avez besoin au moins de la version {0} de CraftBukkit. T\u00e9l\u00e9chargez-la ici http://ci.bukkit.org. +requiredBukkit=* ! * Vous avez besoin au moins de la version {0} de CraftBukkit. T\u00e9l\u00e9chargez-la ici http://dl.bukkit.org/downloads/craftbukkit/ returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} second=seconde seconds=secondes diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index c08111085..5ab703d99 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -298,7 +298,7 @@ requestDenied=\u00a77Teleporteer aanvraag geweigerd. requestDeniedFrom=\u00a77{0} denied your teleport request. requestSent=\u00a77Aanvraag verstuurd naar {0}\u00a77. requestTimedOut=\u00a7cTeleport request has timed out -requiredBukkit=* ! * You need atleast build {0} of CraftBukkit, download it from http://ci.bukkit.org. +requiredBukkit=* ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} second=seconde seconds=seconde -- cgit v1.2.3 From 17be04cd99521565448e606d21c123f3c498c153 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 17 Mar 2012 20:23:46 +0000 Subject: Error and info cleanup. --- Essentials/src/com/earth2me/essentials/Essentials.java | 7 ++----- .../earth2me/essentials/storage/AbstractDelayedYamlFileReader.java | 7 +++++-- .../earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java | 1 - Essentials/src/config.yml | 1 + 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 684080f63..05e5df1aa 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -35,10 +35,8 @@ import com.earth2me.essentials.signs.SignPlayerListener; import java.io.File; import java.io.FileReader; import java.io.IOException; -import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; @@ -48,7 +46,6 @@ import org.bukkit.ChatColor; import org.bukkit.Server; import org.bukkit.World; import org.bukkit.command.Command; -import org.bukkit.command.CommandException; import org.bukkit.command.CommandSender; import org.bukkit.command.PluginCommand; import org.bukkit.entity.Player; @@ -139,10 +136,10 @@ public class Essentials extends JavaPlugin implements IEssentials final int versionNumber = Integer.parseInt(versionMatch.group(1)); if (versionNumber < BUKKIT_VERSION && versionNumber > 100) { - LOGGER.log(Level.SEVERE, "* ! * ! * ! * ! * ! * ! * ! * ! * ! *"); + LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *"); LOGGER.log(Level.SEVERE, _("notRecommendedBukkit")); LOGGER.log(Level.SEVERE, _("requiredBukkit", Integer.toString(BUKKIT_VERSION))); - LOGGER.log(Level.SEVERE, "* ! * ! * ! * ! * ! * ! * ! * ! * ! *"); + LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *"); this.setEnabled(false); return; } diff --git a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java index d48b4a060..83452884b 100644 --- a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java +++ b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java @@ -14,7 +14,7 @@ public abstract class AbstractDelayedYamlFileReader imp { private final transient File file; private final transient Class clazz; - private final transient Plugin plugin; + protected final transient IEssentials plugin; public AbstractDelayedYamlFileReader(final IEssentials ess, final File file, final Class clazz) { @@ -54,7 +54,10 @@ public abstract class AbstractDelayedYamlFileReader imp catch (FileNotFoundException ex) { onException(); - Bukkit.getLogger().log(Level.INFO, "File not found: " + file.toString()); + if (plugin.getSettings() == null || plugin.getSettings().isDebug()) + { + Bukkit.getLogger().log(Level.INFO, "File not found: " + file.toString()); + } } catch (ObjectLoadException ex) { diff --git a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java index 697ef7730..e8b3992ae 100644 --- a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java +++ b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java @@ -5,7 +5,6 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.logging.Level; -import java.util.logging.Logger; import org.bukkit.Bukkit; diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 2bbb87afc..3aea83772 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -175,6 +175,7 @@ kits: # Essentials Sign Control # See http://ess.khhq.net/wiki/Sign_Tutorial for instructions on how to use these. # To enable signs, remove # symbol. To disable all signs, comment/remove each sign. +# If there are no signs enabled, all sign features will be disabled including sign colours. # We recommend not enabling chest protection signs if you don't intend to use them, (or are using LWC/Lockette). enabledSigns: -- cgit v1.2.3 From 14bce8fd82b5b814b51d13fa1a48446d7805d305 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 18 Mar 2012 03:01:44 +0000 Subject: Shorten help messages. --- Essentials/src/plugin.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 27541d782..5f2091605 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -242,8 +242,8 @@ commands: usage: / aliases: [pong,echo,echo,eping,epong] powertool: - description: Assigns a command to the item in hand, {player} will be replaced by the name of the player that you click. - usage: / [l:|a:|r:|c:|d:][command] [arguments] + description: Assigns a command to the item in hand. + usage: / [l:|a:|r:|c:|d:][command] [arguments] - {player} can be replaced by name of a clicked player. aliases: [pt,epowertool,ept] powertooltoggle: description: Enables or disables all current powertools @@ -258,7 +258,7 @@ commands: usage: / aliases: [er,reply,ereply] realname: - description: Displays the username of a user based on nickname. + description: Displays the username of a user based on nick. usage: / aliases: [erealname] remove: @@ -330,7 +330,7 @@ commands: usage: / [day|night|dawn|17:30|4pm|4000ticks] [worldname|all] aliases: [etime, day, night] togglejail: - description: Prevents a player from interacting with the world and teleports him/her to the jail specified + description: Jails/Unjails a player and tp them to the jail specified. usage: / [datediff] aliases: [tjail,jail,ejail,unjail,eunjail,etogglejail] top: -- cgit v1.2.3 From c80605995858aa26a72d2e38d1ce3dec3889046a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 18 Mar 2012 03:29:49 +0000 Subject: Only show nickname update message in debug mode. --- Essentials/src/com/earth2me/essentials/User.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 8f6196e31..b9f5198dc 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -326,7 +326,9 @@ public class User extends UserData implements Comparable, IReplyTo, IUser } catch (IllegalArgumentException e) { - logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Use a shorter displayname prefix."); + if (ess.getSettings().isDebug()) { + logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player."); + } } } -- cgit v1.2.3 From 07f859e38bf524ed2360826e0c8c3a450420237c Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 18 Mar 2012 17:15:46 +0000 Subject: Missing kit time check from [kit] signs. --- Essentials/src/com/earth2me/essentials/signs/SignKit.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignKit.java b/Essentials/src/com/earth2me/essentials/signs/SignKit.java index 102bd01b9..c1a4cd0fd 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignKit.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignKit.java @@ -57,6 +57,7 @@ public class SignKit extends EssentialsSign try { final Map kit = ess.getSettings().getKit(kitName); + Kit.checkTime(player, kitName, kit); final List items = Kit.getItems(player, kit); Kit.expandItems(ess, player, items); charge.charge(player); -- cgit v1.2.3 From 970364886c4bf2400460c4903381ba295f89dfac Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 19 Mar 2012 08:21:39 +0000 Subject: Add 'color' sign type to config file. Enforce colour permission on signs when essentials signs are enabled. --- Essentials/src/com/earth2me/essentials/Settings.java | 10 +++++++++- .../src/com/earth2me/essentials/signs/SignBlockListener.java | 11 ++++++++++- Essentials/src/com/earth2me/essentials/signs/Signs.java | 1 + Essentials/src/config.yml | 3 ++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index e0e2dd63b..6db8dcafc 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -303,7 +303,7 @@ public class Settings implements ISettings @Override public boolean areSignsDisabled() { - return enabledSigns.isEmpty(); + return !signsEnabled; } @Override @@ -422,6 +422,7 @@ public class Settings implements ISettings return epItemSpwn; } private List enabledSigns = new ArrayList(); + private boolean signsEnabled = false; @Override public List enabledSigns() @@ -440,6 +441,11 @@ public class Settings implements ISettings { continue; } + if (signName.equals("COLOR") || signName.equals("COLOUR")) + { + signsEnabled = true; + continue; + } try { newSigns.add(Signs.valueOf(signName).getSign()); @@ -447,7 +453,9 @@ public class Settings implements ISettings catch (Exception ex) { logger.log(Level.SEVERE, _("unknownItemInList", signName, "enabledSigns")); + continue; } + signsEnabled = true; } return newSigns; } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java index e57919ab1..bd90d6c47 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; +import com.earth2me.essentials.Util; import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.Material; @@ -87,9 +88,17 @@ public class SignBlockListener implements Listener { for (int i = 0; i < 4; i++) { - event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "§$1")); + event.setLine(i, Util.replaceColor(event.getLine(i))); } } + else + { + for (int i = 0; i < 4; i++) + { + event.setLine(i, Util.stripColor(event.getLine(i))); + } + } + for (Signs signs : Signs.values()) { final EssentialsSign sign = signs.getSign(); diff --git a/Essentials/src/com/earth2me/essentials/signs/Signs.java b/Essentials/src/com/earth2me/essentials/signs/Signs.java index e29d45ad4..2cf05ee77 100644 --- a/Essentials/src/com/earth2me/essentials/signs/Signs.java +++ b/Essentials/src/com/earth2me/essentials/signs/Signs.java @@ -19,6 +19,7 @@ public enum Signs TRADE(new SignTrade()), WARP(new SignWarp()), WEATHER(new SignWeather()); + private final EssentialsSign sign; private Signs(final EssentialsSign sign) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 3aea83772..7b72ee1c0 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -175,10 +175,11 @@ kits: # Essentials Sign Control # See http://ess.khhq.net/wiki/Sign_Tutorial for instructions on how to use these. # To enable signs, remove # symbol. To disable all signs, comment/remove each sign. -# If there are no signs enabled, all sign features will be disabled including sign colours. +# Essentials Colored sign support will be enabled when any sign types are enabled. # We recommend not enabling chest protection signs if you don't intend to use them, (or are using LWC/Lockette). enabledSigns: + #- color #- balance #- buy #- sell -- cgit v1.2.3 From e752538568a7547f68800df003bd96b46ecedf27 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 20 Mar 2012 11:53:05 +0000 Subject: Fix per world teleport permission checking. --- Essentials/src/com/earth2me/essentials/commands/Commandtp.java | 5 +++++ .../src/com/earth2me/essentials/commands/Commandtpa.java | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java index 72739966b..05451fdcf 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java @@ -49,6 +49,11 @@ public class Commandtp extends EssentialsCommand user.sendMessage(_("teleporting")); final User target = getPlayer(server, args, 0); final User toPlayer = getPlayer(server, args, 1); + if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName())); + } target.getTeleport().now(toPlayer, false, TeleportCause.COMMAND); target.sendMessage(_("teleportAtoB", user.getDisplayName(), toPlayer.getDisplayName())); break; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java index 97fa15d5c..90e8e69d9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java @@ -25,6 +25,11 @@ public class Commandtpa extends EssentialsCommand { throw new Exception(_("teleportDisabled", player.getDisplayName())); } + if (user.getWorld() != player.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + player.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); + } if (!player.isIgnoredPlayer(user.getName())) { player.requestTeleport(user, false); @@ -36,11 +41,6 @@ public class Commandtpa extends EssentialsCommand player.sendMessage(_("teleportRequestTimeoutInfo", ess.getSettings().getTpaAcceptCancellation())); } } - if (user.getWorld() != player.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() - && !user.isAuthorized("essentials.world." + player.getWorld().getName())) - { - throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); - } user.sendMessage(_("requestSent", player.getDisplayName())); } } -- cgit v1.2.3 From 518b013a63a23f9bdb587355aa34442cf2327a25 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 20 Mar 2012 13:26:49 +0000 Subject: Teleport check cleanup --- .../src/com/earth2me/essentials/ISettings.java | 2 +- .../src/com/earth2me/essentials/Settings.java | 2 +- Essentials/src/com/earth2me/essentials/User.java | 2 +- .../earth2me/essentials/commands/Commandtp.java | 4 ++-- .../earth2me/essentials/commands/Commandtpa.java | 2 +- .../essentials/commands/Commandtpaccept.java | 22 ++++++++++------------ .../earth2me/essentials/commands/Commandtpo.java | 2 +- .../earth2me/essentials/commands/Commandworld.java | 2 +- 8 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index c5773404e..fe12720ea 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -154,7 +154,7 @@ public interface ISettings extends IConf boolean getRepairEnchanted(); - boolean getIsWorldTeleportPermissions(); + boolean isWorldTeleportPermissions(); boolean registerBackInListener(); diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 6db8dcafc..f094dda6e 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -678,7 +678,7 @@ public class Settings implements ISettings } @Override - public boolean getIsWorldTeleportPermissions() + public boolean isWorldTeleportPermissions() { return config.getBoolean("world-teleport-permissions", false); } diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index b9f5198dc..3d5cbb398 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -250,7 +250,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return teleportRequester; } - public boolean isTeleportRequestHere() + public boolean isTpRequestHere() { return teleportRequestHere; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java index 05451fdcf..22d4778d3 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java @@ -30,7 +30,7 @@ public class Commandtp extends EssentialsCommand { throw new Exception(_("teleportDisabled", player.getDisplayName())); } - if (user.getWorld() != player.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() + if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + player.getWorld().getName())) { throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); @@ -49,7 +49,7 @@ public class Commandtp extends EssentialsCommand user.sendMessage(_("teleporting")); final User target = getPlayer(server, args, 0); final User toPlayer = getPlayer(server, args, 1); - if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() + if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName())) { throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName())); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java index 90e8e69d9..95cbc58cd 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java @@ -25,7 +25,7 @@ public class Commandtpa extends EssentialsCommand { throw new Exception(_("teleportDisabled", player.getDisplayName())); } - if (user.getWorld() != player.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() + if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + player.getWorld().getName())) { throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index 449ae7489..ffc8f2fdd 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java @@ -19,16 +19,14 @@ public class Commandtpaccept extends EssentialsCommand { final User target = user.getTeleportRequest(); - if (target == null - || !target.isOnline() - || (user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpahere")) - || (!user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpa") && !target.isAuthorized("essentials.tpaall")) - ) - { - throw new Exception(_("noPendingRequest")); - } - - if (args.length > 0 && !target.getName().contains(args[0])) + + if (target == null || !target.isOnline() + || (args.length > 0 && !target.getName().contains(args[0])) + || (user.isTpRequestHere() && !target.isAuthorized("essentials.tpahere")) + || (!user.isTpRequestHere() && ((!target.isAuthorized("essentials.tpa") && !target.isAuthorized("essentials.tpaall")) + || (user.getWorld() != target.getWorld() + && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + target.getWorld().getName()))))) { throw new Exception(_("noPendingRequest")); } @@ -41,7 +39,7 @@ public class Commandtpaccept extends EssentialsCommand } final Trade charge = new Trade(this.getName(), ess); - if (user.isTeleportRequestHere()) + if (user.isTpRequestHere()) { charge.isAffordableFor(user); } @@ -52,7 +50,7 @@ public class Commandtpaccept extends EssentialsCommand user.sendMessage(_("requestAccepted")); target.sendMessage(_("requestAcceptedFrom", user.getDisplayName())); - if (user.isTeleportRequestHere()) + if (user.isTpRequestHere()) { user.getTeleport().teleport(target, charge, TeleportCause.COMMAND); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java index 5edbe274d..e30aee127 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java @@ -32,7 +32,7 @@ public class Commandtpo extends EssentialsCommand // Verify permission if (!player.isHidden() || user.isAuthorized("essentials.teleport.hidden")) { - if (user.getWorld() != player.getWorld() && ess.getSettings().getIsWorldTeleportPermissions() + if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + player.getWorld().getName())) { throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java index c160e0a7a..647115d66 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java @@ -54,7 +54,7 @@ public class Commandworld extends EssentialsCommand } } - if (ess.getSettings().getIsWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + world.getName())) + if (ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + world.getName())) { throw new Exception(_("noPerm", "essentials.world." + world.getName())); } -- cgit v1.2.3 From 3e88fb44f47f8f17a0f496164255fbbff07bafc9 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 20 Mar 2012 14:32:11 +0000 Subject: Split if tree for readability. --- .../essentials/commands/Commandtpaccept.java | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index ffc8f2fdd..7f06602ae 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java @@ -20,13 +20,24 @@ public class Commandtpaccept extends EssentialsCommand final User target = user.getTeleportRequest(); - if (target == null || !target.isOnline() - || (args.length > 0 && !target.getName().contains(args[0])) - || (user.isTpRequestHere() && !target.isAuthorized("essentials.tpahere")) - || (!user.isTpRequestHere() && ((!target.isAuthorized("essentials.tpa") && !target.isAuthorized("essentials.tpaall")) - || (user.getWorld() != target.getWorld() - && ess.getSettings().isWorldTeleportPermissions() - && !user.isAuthorized("essentials.world." + target.getWorld().getName()))))) + if (target == null || !target.isOnline()) + { + throw new Exception(_("noPendingRequest")); + } + + if (user.isTpRequestHere() && !target.isAuthorized("essentials.tpahere")) + { + throw new Exception(_("noPendingRequest")); + } + + if (!user.isTpRequestHere() && ((!target.isAuthorized("essentials.tpa") && !target.isAuthorized("essentials.tpaall")) + || (user.getWorld() != target.getWorld() && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + target.getWorld().getName())))) + { + throw new Exception(_("noPendingRequest")); + } + + if (args.length > 0 && !target.getName().contains(args[0])) { throw new Exception(_("noPendingRequest")); } -- cgit v1.2.3 From 264e175d6ccf8fdd246ba7d990caf2abaa61c346 Mon Sep 17 00:00:00 2001 From: Iaccidentally Date: Wed, 21 Mar 2012 13:23:36 -0300 Subject: update default player-commands to support new and missed commands --- Essentials/src/config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 7b72ee1c0..ef2485ae8 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -97,9 +97,14 @@ player-commands: - back - back.ondeath - balance + - balance.others + - balancetop + - chat.shout + - chat.question - clearinventory - compass - depth + - delhome - getpos - geoip.show - help @@ -108,20 +113,26 @@ player-commands: - home.others - ignore - info + - itemdb - kit + - kit.tools - list - mail - mail.send - me - motd - msg + - msg.color - nick + - near - pay - ping - powertool + - powertooltoggle - protect - r - rules + - realname - seen - sell - sethome @@ -144,6 +155,7 @@ player-commands: - signs.use.weather - spawn - suicide + - time - tpa - tpaccept - tpahere -- cgit v1.2.3 From 7bcec32134b5bf62d60b235471f6350979b65e76 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 21 Mar 2012 23:54:57 +0000 Subject: Cleaning up displaynames --- .../essentials/EssentialsPlayerListener.java | 21 ++------- Essentials/src/com/earth2me/essentials/User.java | 54 +++++++++++++--------- .../earth2me/essentials/commands/Commandafk.java | 1 + .../essentials/commands/Commandhelpop.java | 2 +- .../earth2me/essentials/commands/Commandlist.java | 10 ++-- .../earth2me/essentials/commands/Commandme.java | 5 +- .../essentials/commands/Commandrealname.java | 1 + .../earth2me/essentials/commands/Commandseen.java | 12 +++-- .../essentials/commands/Commandsuicide.java | 1 + .../earth2me/essentials/commands/Commandwhois.java | 1 + .../essentials/textreader/KeywordReplacer.java | 1 + 11 files changed, 58 insertions(+), 51 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index c1bd9bbe0..43adf0a6f 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -43,10 +43,7 @@ public class EssentialsPlayerListener implements Listener { final User user = ess.getUser(event.getPlayer()); updateCompass(user); - if (ess.getSettings().changeDisplayName()) - { - user.setDisplayNick(); - } + user.setDisplayNick(); } @EventHandler(priority = EventPriority.LOWEST) @@ -69,10 +66,7 @@ public class EssentialsPlayerListener implements Listener } } user.updateActivity(true); - if (ess.getSettings().changeDisplayName()) - { - user.setDisplayNick(); - } + user.setDisplayNick(); } @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) @@ -127,11 +121,7 @@ public class EssentialsPlayerListener implements Listener { ess.getBackup().onPlayerJoin(); final User user = ess.getUser(event.getPlayer()); - - if (ess.getSettings().changeDisplayName()) - { - user.setDisplayNick(); - } + user.setDisplayNick(); user.setLastLoginAddress(user.getAddress().getAddress().getHostAddress()); user.updateActivity(false); if (user.isAuthorized("essentials.sleepingignored")) @@ -297,10 +287,7 @@ public class EssentialsPlayerListener implements Listener public void onPlayerChangedWorld(final PlayerChangedWorldEvent event) { final User user = ess.getUser(event.getPlayer()); - if (ess.getSettings().changeDisplayName()) - { - user.setDisplayNick(); - } + user.setDisplayNick(); updateCompass(user); if (ess.getSettings().getNoGodWorlds().contains(event.getPlayer().getLocation().getWorld().getName())) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 3d5cbb398..a41fd1b5f 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -71,10 +71,12 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return false; } - try { + try + { return ess.getPermissionsHandler().hasPermission(base, node); } - catch (Exception ex) { + catch (Exception ex) + { ess.getLogger().log(Level.SEVERE, "Permission System Error: " + ess.getPermissionsHandler().getName() + " returned: " + ex.getMessage()); return false; } @@ -289,6 +291,10 @@ public class User extends UserData implements Comparable, IReplyTo, IUser { final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§'); nickname.insert(0, prefix); + if (prefix.length() < 2 || prefix.charAt(0) != '&') + { + nickname.insert(0, "&f"); + } } if (!ess.getSettings().disableSuffix()) { @@ -310,24 +316,28 @@ public class User extends UserData implements Comparable, IReplyTo, IUser public void setDisplayNick() { - String name = getNick(true); - setDisplayName(name); - if (name.length() > 16) - { - name = getNick(false); - } - if (name.length() > 16) - { - name = name.substring(0, name.charAt(15) == '§' ? 15 : 16); - } - try - { - setPlayerListName(name); - } - catch (IllegalArgumentException e) + if (base.isOnline() && ess.getSettings().changeDisplayName()) { - if (ess.getSettings().isDebug()) { - logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player."); + String name = getNick(true); + setDisplayName(name); + if (name.length() > 16) + { + name = getNick(false); + } + if (name.length() > 16) + { + name = Util.stripColor(name); + } + try + { + setPlayerListName(name); + } + catch (IllegalArgumentException e) + { + if (ess.getSettings().isDebug()) + { + logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player."); + } } } } @@ -335,10 +345,6 @@ public class User extends UserData implements Comparable, IReplyTo, IUser @Override public String getDisplayName() { - if (base.isOnline() && ess.getSettings().changeDisplayName()) - { - setDisplayNick(); - } return super.getDisplayName() == null ? super.getName() : super.getDisplayName(); } @@ -498,6 +504,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser setAfk(false); if (broadcast && !isHidden()) { + setDisplayNick(); ess.broadcastMessage(this, _("userIsNotAway", getDisplayName())); } } @@ -530,6 +537,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser setAfk(true); if (!isHidden()) { + setDisplayNick(); ess.broadcastMessage(this, _("userIsAway", getDisplayName())); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java index a1c83606c..c71883571 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java @@ -31,6 +31,7 @@ public class Commandafk extends EssentialsCommand private void toggleAfk(User user) { + user.setDisplayNick(); if (!user.toggleAfk()) { //user.sendMessage(_("markedAsNotAway")); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java b/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java index 20cd5cdd3..f26154f71 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java @@ -22,7 +22,7 @@ public class Commandhelpop extends EssentialsCommand { throw new NotEnoughArgumentsException(); } - + user.setDisplayNick(); final String message = _("helpOp", user.getDisplayName(), Util.stripColor(getFinalArg(args, 0))); logger.log(Level.INFO, message); for (Player onlinePlayer : server.getOnlinePlayers()) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java index 77788c7c2..7e699328b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java @@ -44,8 +44,10 @@ public class Commandlist extends EssentialsCommand if (showhidden && playerHidden > 0) { online = _("listAmountHidden", server.getOnlinePlayers().length - playerHidden, playerHidden, server.getMaxPlayers()); - } else { - online = _("listAmount",server.getOnlinePlayers().length - playerHidden, server.getMaxPlayers()); + } + else + { + online = _("listAmount", server.getOnlinePlayers().length - playerHidden, server.getMaxPlayers()); } sender.sendMessage(online); @@ -73,7 +75,7 @@ public class Commandlist extends EssentialsCommand for (String group : groups) { final StringBuilder groupString = new StringBuilder(); - groupString.append(_("listGroupTag",Util.replaceColor(group))); + groupString.append(_("listGroupTag", Util.replaceColor(group))); final List users = sort.get(group); Collections.sort(users); boolean first = true; @@ -95,6 +97,7 @@ public class Commandlist extends EssentialsCommand { groupString.append(_("listHiddenTag")); } + user.setDisplayNick(); groupString.append(user.getDisplayName()); groupString.append("§f"); } @@ -136,6 +139,7 @@ public class Commandlist extends EssentialsCommand { onlineUsers.append(_("listHiddenTag")); } + user.setDisplayNick(); onlineUsers.append(user.getDisplayName()); onlineUsers.append("§f"); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandme.java b/Essentials/src/com/earth2me/essentials/commands/Commandme.java index 1530f3ad7..0bf2a536d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandme.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandme.java @@ -31,11 +31,12 @@ public class Commandme extends EssentialsCommand { message = Util.replaceColor(message); } - else { + else + { message = Util.stripColor(message); } - + user.setDisplayNick(); ess.broadcastMessage(user, _("action", user.getDisplayName(), message)); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java b/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java index b48ac5bcb..6f9049756 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java @@ -31,6 +31,7 @@ public class Commandrealname extends EssentialsCommand { continue; } + u.setDisplayNick(); final String displayName = Util.stripColor(u.getDisplayName()).toLowerCase(Locale.ENGLISH); if (!whois.equals(displayName) && !displayName.equals(Util.stripColor(ess.getSettings().getNicknamePrefix()) + whois) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java index 2783fb68e..38abb2dab 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java @@ -17,16 +17,16 @@ public class Commandseen extends EssentialsCommand @Override protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { - seen(server,sender,args,true); + seen(server, sender, args, true); } - + @Override protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - seen(server,user,args,user.isAuthorized("essentials.seen.banreason")); + seen(server, user, args, user.isAuthorized("essentials.seen.banreason")); } - - protected void seen (final Server server, final CommandSender sender, final String[] args, final boolean show) throws Exception + + protected void seen(final Server server, final CommandSender sender, final String[] args, final boolean show) throws Exception { if (args.length < 1) { @@ -35,6 +35,7 @@ public class Commandseen extends EssentialsCommand try { User player = getPlayer(server, args, 0); + player.setDisplayNick(); sender.sendMessage(_("seenOnline", player.getDisplayName(), Util.formatDateDiff(player.getLastLogin()))); } catch (NoSuchFieldException e) @@ -44,6 +45,7 @@ public class Commandseen extends EssentialsCommand { throw new Exception(_("playerNotFound")); } + player.setDisplayNick(); sender.sendMessage(_("seenOffline", player.getDisplayName(), Util.formatDateDiff(player.getLastLogout()))); if (player.isBanned()) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java b/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java index d6afe707a..50933c8f5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java @@ -21,6 +21,7 @@ public class Commandsuicide extends EssentialsCommand user.damage(1000); user.setHealth(0); user.sendMessage(_("suicideMessage")); + user.setDisplayNick(); ess.broadcastMessage(user,_("suicideSuccess", user.getDisplayName())); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java index 8adc4c95c..4f1c2267a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java @@ -53,6 +53,7 @@ public class Commandwhois extends EssentialsCommand continue; } sender.sendMessage(""); + user.setDisplayNick(); sender.sendMessage(_("whoisIs", user.getDisplayName(), user.getName())); sender.sendMessage(_("whoisHealth", user.getHealth())); sender.sendMessage(_("whoisExp", SetExpFix.getTotalExperience(user), user.getLevel())); diff --git a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java index 4c4e3364b..d79483699 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java +++ b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java @@ -37,6 +37,7 @@ public class KeywordReplacer implements IText if (sender instanceof Player) { final User user = ess.getUser(sender); + user.setDisplayNick(); displayName = user.getDisplayName(); userName = user.getName(); ipAddress = user.getAddress().getAddress().toString(); -- cgit v1.2.3 From 7d7c1d34cf69ef9f3d9eb8e8bd76f1bd9de1841f Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 11:57:30 +0000 Subject: Fix typo. --- Essentials/src/com/earth2me/essentials/User.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index a41fd1b5f..9403fc368 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -293,7 +293,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser nickname.insert(0, prefix); if (prefix.length() < 2 || prefix.charAt(0) != '&') { - nickname.insert(0, "&f"); + nickname.insert(0, "§f"); } } if (!ess.getSettings().disableSuffix()) -- cgit v1.2.3 From 209c91d3de0aed2c96384c17be3643f34a6f9f10 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 12:02:19 +0000 Subject: Fixed again. --- Essentials/src/com/earth2me/essentials/User.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 9403fc368..51e10dbf5 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -291,7 +291,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser { final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§'); nickname.insert(0, prefix); - if (prefix.length() < 2 || prefix.charAt(0) != '&') + if (prefix.length() < 2 || prefix.charAt(0) != '§') { nickname.insert(0, "§f"); } -- cgit v1.2.3 From 1746569e1a82d940728fe13e663f368971a96646 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 17:25:13 +0000 Subject: Extra Trees --- .../src/com/earth2me/essentials/commands/Commandbigtree.java | 4 ++++ .../src/com/earth2me/essentials/commands/Commandtree.java | 12 ++++++++++++ Essentials/src/plugin.yml | 4 ++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java index 78d557934..5dd22503a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java @@ -27,6 +27,10 @@ public class Commandbigtree extends EssentialsCommand { tree = TreeType.BIG_TREE; } + else if (args.length > 0 && args[0].equalsIgnoreCase("jungle")) + { + tree = TreeType.JUNGLE; + } else { throw new NotEnoughArgumentsException(); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java index 20cc9d46f..6c2c15983 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java @@ -43,6 +43,18 @@ public class Commandtree extends EssentialsCommand { tree = TreeType.BROWN_MUSHROOM; } + else if (args[0].equalsIgnoreCase("jungle")) + { + tree = TreeType.SMALL_JUNGLE; + } + else if (args[0].equalsIgnoreCase("junglebush")) + { + tree = TreeType.JUNGLE_BUSH; + } + else if (args[0].equalsIgnoreCase("swamp")) + { + tree = TreeType.SWAMP; + } else { throw new NotEnoughArgumentsException(); diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 5f2091605..c54e79c12 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -49,7 +49,7 @@ commands: aliases: [ebroadcast,bcast,ebcast] bigtree: description: Spawn a big tree where you are looking. - usage: / + usage: / aliases: [ebigtree] burn: description: Set a player on fire. @@ -387,7 +387,7 @@ commands: aliases: [etptoggle] tree: description: Spawn a tree where you are looking. - usage: / + usage: / aliases: [etree] unban: description: Unbans the specified player. -- cgit v1.2.3 From 968c849b139a14743a1bf81fbfce27b45c612b76 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 17:25:42 +0000 Subject: Update missing 1.2.3 items in items.csv --- Essentials/src/items.csv | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv index acec277cc..70c23faa9 100644 --- a/Essentials/src/items.csv +++ b/Essentials/src/items.csv @@ -232,6 +232,10 @@ wtreesap,6,2 wlogsap,6,2 wtrunksap,6,2 wwoodsap,6,2 +junglesapling,6,3 +jsapling,6,3 +junglesap,6,3 +jsap,6,3 bedrock,7,0 oprock,7,0 opblock,7,0 @@ -360,6 +364,12 @@ wtree,17,2 wlog,17,2 wtrunk,17,2 wwood,17,2 +junglewood,17,3 +jwood,17,3 +junglelog,17,3 +jlog,17,3 +monkeytree,17,3 +monkeylog,17,3 leaves,18,4 leaf,18,4 treeleaves,18,4 @@ -454,6 +464,12 @@ bitreeleaf,18,6 bilogleaf,18,6 bitrunkleaf,18,6 biwoodleaf,18,6 +jungleleaves,18,7 +jleaves,18,7 +jleaf,18,7 +jungleleaf,18,7 +monkeyleaf,18,7 +monkeyleaves,18,7 sponge,19,0 glass,20,0 lapislazuliore,21,0 @@ -1295,6 +1311,10 @@ crackedstonebrick,98,2 crackedstonebricks,98,2 crackedstonebrickblock,98,2 crackedstonebb,98,2 +circlestonebrick,98,3 +circlestonebb,98,3 +circlestone,98,3 +circlesbb,98,3 hugeredmushroom,99,0 bigredmushroom,99,0 brmushroom,99,0 @@ -1462,8 +1482,14 @@ degg,122,0 bossegg,122,0 begg,122,0 redstonelamp,123,0 +redstonelampoff,123,0 redlamp,123,0 +redlampoff,123,0 rslamp,123,0 +rslampoff,123,0 +redstonelampon,124,0 +redlampon,124,0 +rslampon,124,0 ironshovel,256,0 ironspade,256,0 ishovel,256,0 @@ -2322,6 +2348,10 @@ chickenraw,365,0 cookedchicken,366,0 grilledchicken,366,0 toastedchicken,366,0 +gchicken,366,0 +bbqchicken,366,0 +friedchicken,366,0 +cchicken,366,0 rottenflesh,367,0 zombieflesh,367,0 rottenmeat,367,0 @@ -2463,6 +2493,9 @@ bottleofenchanting,384,0 enchantingbottle,384,0 expbottle,384,0 xpbottle,384,0 +firecharge,385,0 +fireball,385,0 +grenade,385,0 goldmusicrecord,2256,0 goldmusicdisk,2256,0 goldmusiccd,2256,0 -- cgit v1.2.3 From 3d7d4a47d95a7332699397c8d1e93439612195c9 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 17:26:05 +0000 Subject: Bukkit R0.3 api updates. --- .../com/earth2me/essentials/commands/Commandbreak.java | 6 +++++- .../earth2me/essentials/craftbukkit/FakeInventory.java | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java index a03c24264..406230401 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java @@ -2,10 +2,13 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import java.util.ArrayList; +import java.util.List; import org.bukkit.Material; import org.bukkit.Server; import org.bukkit.block.Block; import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.inventory.ItemStack; public class Commandbreak extends EssentialsCommand @@ -32,7 +35,8 @@ public class Commandbreak extends EssentialsCommand { throw new Exception(_("noBreakBedrock")); } - final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase()); + final List list = (List)block.getDrops(); + final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase(), list); server.getPluginManager().callEvent(event); if (event.isCancelled()) { diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java index 01e7bd5b2..8456c956e 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java @@ -222,4 +222,22 @@ public class FakeInventory implements Inventory { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public int getMaxStackSize() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMaxStackSize(int size) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public ListIterator iterator(int index) + { + throw new UnsupportedOperationException("Not supported yet."); + } } -- cgit v1.2.3 From 165a76d492f63c825e5e7b6490a8bb3fe7043a86 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 18:00:13 +0000 Subject: Add villager professions to /spawnmob --- .../src/com/earth2me/essentials/Essentials.java | 2 +- .../essentials/commands/Commandspawnmob.java | 43 ++++++++++++---------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 05e5df1aa..68f976113 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -66,7 +66,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 2070; + public static final int BUKKIT_VERSION = 2098; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 8d716106f..fdaa0eb9e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -11,6 +11,8 @@ import org.bukkit.Location; import org.bukkit.Server; import org.bukkit.block.Block; import org.bukkit.entity.*; +import org.bukkit.entity.Villager.Profession; +import org.bukkit.material.Colorable; public class Commandspawnmob extends EssentialsCommand @@ -199,7 +201,8 @@ public class Commandspawnmob extends EssentialsCommand private void changeMobData(final EntityType type, final Entity spawned, String data, final User user) throws Exception { data = data.toLowerCase(Locale.ENGLISH); - if (type == EntityType.SLIME || type == EntityType.MAGMA_CUBE) + + if (spawned instanceof Slime) { try { @@ -210,32 +213,24 @@ public class Commandspawnmob extends EssentialsCommand throw new Exception(_("slimeMalformedSize"), e); } } - if ((type == EntityType.SHEEP - || type == EntityType.COW - || type == EntityType.MUSHROOM_COW - || type == EntityType.CHICKEN - || type == EntityType.PIG - || type == EntityType.VILLAGER - || type == EntityType.OCELOT - || type == EntityType.WOLF) - && data.contains("baby")) + if (spawned instanceof Ageable && data.contains("baby")) { - ((Animals)spawned).setBaby(); + ((Ageable)spawned).setBaby(); return; } - if (type == EntityType.SHEEP) + if (spawned instanceof Colorable) { final String color = data.toUpperCase(Locale.ENGLISH).replace("BABY", ""); try { if (color.equals("RANDOM")) { - Random rand = new Random(); - ((Sheep)spawned).setColor(DyeColor.values()[rand.nextInt(DyeColor.values().length)]); + final Random rand = new Random(); + ((Colorable)spawned).setColor(DyeColor.values()[rand.nextInt(DyeColor.values().length)]); } else { - ((Sheep)spawned).setColor(DyeColor.valueOf(color)); + ((Colorable)spawned).setColor(DyeColor.valueOf(color)); } } catch (Exception e) @@ -243,9 +238,7 @@ public class Commandspawnmob extends EssentialsCommand throw new Exception(_("sheepMalformedColor"), e); } } - if ((type == EntityType.WOLF - || type == EntityType.OCELOT) - && data.contains("tamed")) + if (spawned instanceof Tameable && data.contains("tamed")) { final Tameable tameable = ((Tameable)spawned); tameable.setTamed(true); @@ -266,14 +259,24 @@ public class Commandspawnmob extends EssentialsCommand { ((Ocelot)spawned).setCatType(Ocelot.Type.SIAMESE_CAT); } - if (data.contains("red")) + else if (data.contains("red")) { ((Ocelot)spawned).setCatType(Ocelot.Type.RED_CAT); } - if (data.contains("black")) + else if (data.contains("black")) { ((Ocelot)spawned).setCatType(Ocelot.Type.BLACK_CAT); } } + if (type == EntityType.VILLAGER) + { + for (Profession prof : Villager.Profession.values()) + { + if (data.contains(prof.toString().toLowerCase(Locale.ENGLISH))) + { + ((Villager)spawned).setProfession(prof); + } + } + } } } -- cgit v1.2.3 From 56fce34539390ba0c78f30126f8524b46894df61 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 20:48:27 +0000 Subject: Extra items in 1.2.4 --- Essentials/src/items.csv | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv index 70c23faa9..703772685 100644 --- a/Essentials/src/items.csv +++ b/Essentials/src/items.csv @@ -17,6 +17,76 @@ wplank,5,0 plankwooden,5,0 plankwood,5,0 plankw,5,0 +darkplank,5,1 +darkwoodenplank,5,1 +darkwoodplank,5,1 +darkwplank,5,1 +darkplankwooden,5,1 +darkplankwood,5,1 +darkplankw,5,1 +dplank,5,1 +dwoodenplank,5,1 +dwoodplank,5,1 +dwplank,5,1 +dplankwooden,5,1 +dplankwood,5,1 +dplankw,5,1 +pineplank,5,1 +pinewoodenplank,5,1 +pinewoodplank,5,1 +pinewplank,5,1 +pineplankwooden,5,1 +pineplankwood,5,1 +pineplankw,5,1 +pplank,5,1 +pwoodenplank,5,1 +pwoodplank,5,1 +pwplank,5,1 +pplankwooden,5,1 +pplankwood,5,1 +pplankw,5,1 +lightplank,5,2 +lightwoodenplank,5,2 +lightwoodplank,5,2 +lightwplank,5,2 +lightplankwooden,5,2 +lightplankwood,5,2 +lightplankw,5,2 +liteplank,5,2 +litewoodenplank,5,2 +litewoodplank,5,2 +litewplank,5,2 +liteplankwooden,5,2 +liteplankwood,5,2 +liteplankw,5,2 +birchplank,5,2 +birchwoodenplank,5,2 +birchwoodplank,5,2 +birchwplank,5,2 +birchplankwooden,5,2 +birchplankwood,5,2 +birchplankw,5,2 +bplank,5,2 +bwoodenplank,5,2 +bwoodplank,5,2 +bwplank,5,2 +bplankwooden,5,2 +bplankwood,5,2 +bplankw,5,2 +jungleplank,5,3 +junglewoodenplank,5,3 +junglewoodplank,5,3 +junglewplank,5,3 +jungleplankwooden,5,3 +jungleplankwood,5,3 +jungleplankw,5,3 +jplank,5,3 +jwoodenplank,5,3 +jwoodplank,5,3 +jwplank,5,3 +jplankwooden,5,3 +jplankwood,5,3 +jplankw,5,3 sapling,6,0 treesapling,6,0 logsapling,6,0 @@ -492,6 +562,25 @@ dispenser,23,0 dispense,23,0 sandstone,24,0 sastone,24,0 +csandstone,24,1 +csastone,24,1 +creepersandstone,24,1 +creepersastone,24,1 +hieroglyphicsandstone,24,1 +hieroglyphicsastone,24,1 +hieroglyphsandstone,24,1 +hieroglyphsastone,24,1 +hsandstone,24,1 +hsastone,24,1 +pyramidsandstone,24,1 +pyramidsastone,24,1 +psandstone,24,1 +psastone,24,1 +smoothsandstone,24,2 +smoothsastone,24,2 +ssandstone,24,2 +smsastone,24,2 +ssastone,24,2 noteblock,25,0 musicblock,25,0 nblock,25,0 -- cgit v1.2.3 From cd0d37f73c5d8f2e9990d96ff95eb04ab4322bd5 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 20:53:58 +0000 Subject: Update to 1.2.4 (R0.1) New Minimum CB version: 2100 --- .../src/com/earth2me/essentials/Essentials.java | 2 +- lib/bukkit.jar | Bin 4706072 -> 4715475 bytes lib/craftbukkit.jar | Bin 11069383 -> 11102949 bytes 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 68f976113..4111d3ca7 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -66,7 +66,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 2098; + public static final int BUKKIT_VERSION = 2100; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/lib/bukkit.jar b/lib/bukkit.jar index 5cc58ca1d..95ac7392f 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index 009194ab9..67b691c8e 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From 0dc1270aedb932d19d5c1c2e313c4f2fb099bbc0 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 22:07:13 +0000 Subject: Split colour permissions into 3: color/magic/format --- .../src/com/earth2me/essentials/Settings.java | 4 +- Essentials/src/com/earth2me/essentials/User.java | 4 +- Essentials/src/com/earth2me/essentials/Util.java | 69 ++++++++++++++++++++-- .../earth2me/essentials/commands/Commandgive.java | 1 + .../essentials/commands/Commandhelpop.java | 2 +- .../earth2me/essentials/commands/Commandlist.java | 2 +- .../earth2me/essentials/commands/Commandmail.java | 4 +- .../earth2me/essentials/commands/Commandme.java | 9 +-- .../earth2me/essentials/commands/Commandmsg.java | 11 +--- .../earth2me/essentials/commands/Commandnick.java | 10 ++-- .../earth2me/essentials/commands/Commandping.java | 2 +- .../com/earth2me/essentials/commands/Commandr.java | 11 +--- .../essentials/commands/Commandrealname.java | 4 +- .../earth2me/essentials/commands/Commandwhois.java | 4 +- .../essentials/signs/SignBlockListener.java | 4 +- .../earth2me/essentials/signs/SignProtection.java | 2 +- .../chat/EssentialsChatPlayerListenerLowest.java | 9 +-- 17 files changed, 92 insertions(+), 60 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index f094dda6e..2aa1d93c1 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -327,7 +327,7 @@ public class Settings implements ISettings { String format = config.getString("chat.group-formats." + (group == null ? "Default" : group), config.getString("chat.format", "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}")); - format = Util.replaceColor(format); + format = Util.replaceFormat(format); format = format.replace("{DISPLAYNAME}", "%1$s"); format = format.replace("{GROUP}", "{0}"); format = format.replace("{MESSAGE}", "%2$s"); @@ -349,7 +349,7 @@ public class Settings implements ISettings @Override public IText getAnnounceNewPlayerFormat() { - return new SimpleTextInput(Util.replaceColor(config.getString("newbies.announce-format", "&dWelcome {DISPLAYNAME} to the server!"))); + return new SimpleTextInput(Util.replaceFormat(config.getString("newbies.announce-format", "&dWelcome {DISPLAYNAME} to the server!"))); } @Override diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 51e10dbf5..c4293cc63 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -194,7 +194,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser @Override public int compareTo(final User other) { - return Util.stripColor(this.getDisplayName()).compareToIgnoreCase(Util.stripColor(other.getDisplayName())); + return Util.stripFormat(this.getDisplayName()).compareToIgnoreCase(Util.stripFormat(other.getDisplayName())); } @Override @@ -326,7 +326,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser } if (name.length() > 16) { - name = Util.stripColor(name); + name = Util.stripFormat(name); } try { diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index fbb8deb08..7a6de8730 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -495,26 +495,83 @@ public class Util } return buf.toString(); } - private static transient final Pattern VANILLA_COLOR_PATTERN = Pattern.compile("\u00A7+[0-9A-FKa-fk]"); - private static transient final Pattern EASY_COLOR_PATTERN = Pattern.compile("&([0-9a-fk])"); + private static transient final Pattern VANILLA_PATTERN = Pattern.compile("\u00A7+[0-9A-FK-ORa-fk-or]"); + private static transient final Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])"); + private static transient final Pattern VANILLA_COLOR_PATTERN = Pattern.compile("\u00A7+[0-9A-Fa-f]"); + private static transient final Pattern VANILLA_MAGIC_PATTERN = Pattern.compile("\u00A7+[Kk]"); + private static transient final Pattern VANILLA_FORMAT_PATTERN = Pattern.compile("\u00A7+[L-ORl-or]"); + private static transient final Pattern REPLACE_COLOR_PATTERN = Pattern.compile("&([0-9a-f])"); + private static transient final Pattern REPLACE_MAGIC_PATTERN = Pattern.compile("&(k)"); + private static transient final Pattern REPLACE_FORMAT_PATTERN = Pattern.compile("&([l-or])"); + + public static String stripFormat(final String input) + { + if (input == null) + { + return null; + } + return VANILLA_PATTERN.matcher(input).replaceAll(""); + } - public static String stripColor(final String input) + public static String replaceFormat(final String input) { if (input == null) { return null; } + return REPLACE_PATTERN.matcher(input).replaceAll(""); + } - return VANILLA_COLOR_PATTERN.matcher(input).replaceAll(""); + public static String blockURL(final String input) + { + if (input == null) + { + return null; + } + return input.replace(".", ". ").replace(". ", ". "); } - public static String replaceColor(final String input) + public static String formatString(final IUser user, final String permBase, final String input) { if (input == null) { return null; } + String message; + if (user.isAuthorized(permBase + ".color")) + { + message = Util.replaceColor(input, REPLACE_COLOR_PATTERN); + } + else + { + message = Util.stripColor(input, VANILLA_COLOR_PATTERN); + } + if (user.isAuthorized(permBase + ".magic")) + { + message = Util.replaceColor(message, REPLACE_MAGIC_PATTERN); + } + else + { + message = Util.stripColor(message, VANILLA_MAGIC_PATTERN); + } + if (user.isAuthorized(permBase + ".format")) + { + message = Util.replaceColor(message, REPLACE_FORMAT_PATTERN); + } + else + { + message = Util.stripColor(message, VANILLA_FORMAT_PATTERN); + } + return message; + } - return EASY_COLOR_PATTERN.matcher(input).replaceAll("\u00a7$1"); + private static String stripColor(final String input, final Pattern pattern) + { + return pattern.matcher(input).replaceAll(""); + } + + private static String replaceColor(final String input, final Pattern pattern) + { + return pattern.matcher(input).replaceAll("\u00a7$1"); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java index 9db7d4da3..701fa6577 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java @@ -85,6 +85,7 @@ public class Commandgive extends EssentialsCommand throw new Exception(_("cantSpawnItem", "Air")); } + //TODO: TL this. final String itemName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' '); sender.sendMessage(ChatColor.BLUE + "Giving " + stack.getAmount() + " of " + itemName + " to " + giveTo.getDisplayName() + "."); if (giveTo.isAuthorized("essentials.oversizedstacks")) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java b/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java index f26154f71..948cfa769 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java @@ -23,7 +23,7 @@ public class Commandhelpop extends EssentialsCommand throw new NotEnoughArgumentsException(); } user.setDisplayNick(); - final String message = _("helpOp", user.getDisplayName(), Util.stripColor(getFinalArg(args, 0))); + final String message = _("helpOp", user.getDisplayName(), Util.stripFormat(getFinalArg(args, 0))); logger.log(Level.INFO, message); for (Player onlinePlayer : server.getOnlinePlayers()) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java index 7e699328b..c981f45c1 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandlist.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandlist.java @@ -75,7 +75,7 @@ public class Commandlist extends EssentialsCommand for (String group : groups) { final StringBuilder groupString = new StringBuilder(); - groupString.append(_("listGroupTag", Util.replaceColor(group))); + groupString.append(_("listGroupTag", Util.replaceFormat(group))); final List users = sort.get(group); Collections.sort(users); boolean first = true; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java index abc551f58..fa4643875 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java @@ -59,7 +59,7 @@ public class Commandmail extends EssentialsCommand } if (!u.isIgnoredPlayer(user.getName())) { - final String mail = Util.sanitizeString(Util.stripColor(getFinalArg(args, 2))); + final String mail = Util.sanitizeString(Util.stripFormat(getFinalArg(args, 2))); u.addMail(user.getName() + ": " + mail); } user.sendMessage(_("mailSent")); @@ -71,7 +71,7 @@ public class Commandmail extends EssentialsCommand { throw new Exception(_("noPerm", "essentials.mail.sendall")); } - ess.scheduleAsyncDelayedTask(new SendAll(user.getName() + ": " + Util.stripColor(getFinalArg(args, 1)))); + ess.scheduleAsyncDelayedTask(new SendAll(user.getName() + ": " + Util.stripFormat(getFinalArg(args, 1)))); user.sendMessage(_("mailSent")); return; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandme.java b/Essentials/src/com/earth2me/essentials/commands/Commandme.java index 0bf2a536d..ec2857841 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandme.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandme.java @@ -27,14 +27,7 @@ public class Commandme extends EssentialsCommand } String message = getFinalArg(args, 0); - if (user.isAuthorized("essentials.chat.color")) - { - message = Util.replaceColor(message); - } - else - { - message = Util.stripColor(message); - } + message = Util.formatString(user, "essentials.chat", message); user.setDisplayNick(); ess.broadcastMessage(user, _("action", user.getDisplayName(), message)); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java index 128d8eeb5..8a6cdad32 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java @@ -34,18 +34,11 @@ public class Commandmsg extends EssentialsCommand { throw new Exception(_("voiceSilenced")); } - if (user.isAuthorized("essentials.msg.color")) - { - message = Util.replaceColor(message); - } - else - { - message = Util.stripColor(message); - } + message = Util.formatString(user, "essentials.msg", message); } else { - message = Util.replaceColor(message); + message = Util.replaceFormat(message); } final String translatedMe = _("me"); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java b/Essentials/src/com/earth2me/essentials/commands/Commandnick.java index b9fbccb37..808e0be70 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandnick.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandnick.java @@ -64,11 +64,13 @@ public class Commandnick extends EssentialsCommand private String formatNickname(final User user, final String nick) { - if (user == null || user.isAuthorized("essentials.nick.color")) + if (user == null) { - return nick.replace('&', '\u00a7').replaceAll("\u00a7+k", ""); - } else { - return Util.stripColor(nick); + return Util.replaceFormat(nick); + } + else + { + return Util.formatString(user, "essentials.nick", nick); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandping.java b/Essentials/src/com/earth2me/essentials/commands/Commandping.java index 0956f4082..43aa18d5f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandping.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandping.java @@ -23,7 +23,7 @@ public class Commandping extends EssentialsCommand } else { - sender.sendMessage(Util.replaceColor(getFinalArg(args, 0))); + sender.sendMessage(Util.replaceFormat(getFinalArg(args, 0))); } } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandr.java b/Essentials/src/com/earth2me/essentials/commands/Commandr.java index fe2a4e5b1..00072fded 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandr.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandr.java @@ -32,20 +32,13 @@ public class Commandr extends EssentialsCommand if (sender instanceof Player) { User user = ess.getUser(sender); - if (user.isAuthorized("essentials.msg.color")) - { - message = Util.replaceColor(message); - } - else - { - message = Util.stripColor(message); - } + message = Util.formatString(user, "essentials.msg", message); replyTo = user; senderName = user.getDisplayName(); } else { - message = Util.replaceColor(message); + message = Util.replaceFormat(message); replyTo = Console.getConsoleReplyTo(); senderName = Console.NAME; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java b/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java index 6f9049756..c99018211 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandrealname.java @@ -32,9 +32,9 @@ public class Commandrealname extends EssentialsCommand continue; } u.setDisplayNick(); - final String displayName = Util.stripColor(u.getDisplayName()).toLowerCase(Locale.ENGLISH); + final String displayName = Util.stripFormat(u.getDisplayName()).toLowerCase(Locale.ENGLISH); if (!whois.equals(displayName) - && !displayName.equals(Util.stripColor(ess.getSettings().getNicknamePrefix()) + whois) + && !displayName.equals(Util.stripFormat(ess.getSettings().getNicknamePrefix()) + whois) && !whois.equalsIgnoreCase(u.getName())) { continue; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java index 4f1c2267a..6c7919163 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java @@ -37,7 +37,7 @@ public class Commandwhois extends EssentialsCommand showhidden = true; } final String whois = args[0].toLowerCase(Locale.ENGLISH); - final int prefixLength = Util.stripColor(ess.getSettings().getNicknamePrefix()).length(); + final int prefixLength = Util.stripFormat(ess.getSettings().getNicknamePrefix()).length(); for (Player onlinePlayer : server.getOnlinePlayers()) { final User user = ess.getUser(onlinePlayer); @@ -45,7 +45,7 @@ public class Commandwhois extends EssentialsCommand { continue; } - final String nickName = Util.stripColor(user.getNickname()); + final String nickName = Util.stripFormat(user.getNickname()); if (!whois.equalsIgnoreCase(nickName) && !whois.substring(prefixLength).equalsIgnoreCase(nickName) && !whois.equalsIgnoreCase(user.getName())) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java index bd90d6c47..fc020aa88 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java @@ -88,14 +88,14 @@ public class SignBlockListener implements Listener { for (int i = 0; i < 4; i++) { - event.setLine(i, Util.replaceColor(event.getLine(i))); + event.setLine(i, Util.replaceFormat(event.getLine(i))); } } else { for (int i = 0; i < 4; i++) { - event.setLine(i, Util.stripColor(event.getLine(i))); + event.setLine(i, Util.stripFormat(event.getLine(i))); } } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java index 088e74f01..2f2d25c46 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java @@ -147,7 +147,7 @@ public class SignProtection extends EssentialsSign { return SignProtectionState.OWNER; } - if (Util.stripColor(sign.getLine(3)).equalsIgnoreCase(username)) + if (Util.stripFormat(sign.getLine(3)).equalsIgnoreCase(username)) { return SignProtectionState.OWNER; } diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java index 5a8cde62d..2c0906cbf 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java @@ -37,14 +37,7 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer /** * This listener should apply the general chat formatting only...then return control back the event handler */ - if (user.isAuthorized("essentials.chat.color")) - { - event.setMessage(Util.replaceColor(event.getMessage())); - } - else - { - event.setMessage(Util.stripColor(event.getMessage())); - } + event.setMessage(Util.formatString(user, "essentials.chat", event.getMessage())); String group = user.getGroup(); String world = user.getWorld().getName(); event.setFormat(ess.getSettings().getChatFormat(group).format(new Object[] {group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH)})); -- cgit v1.2.3 From d20519ef8bf4141cb99ffc7dd2f43783e2c23253 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 22:15:18 +0000 Subject: New Permission: essentials.chat.url Without this perm, URLs will be modified not to be links. --- Essentials/src/com/earth2me/essentials/Util.java | 29 ++++++++++++++++------ .../earth2me/essentials/commands/Commandme.java | 2 +- .../earth2me/essentials/commands/Commandmsg.java | 2 +- .../com/earth2me/essentials/commands/Commandr.java | 2 +- .../chat/EssentialsChatPlayerListenerLowest.java | 7 ++++-- 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 7a6de8730..d387cad56 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -495,6 +495,7 @@ public class Util } return buf.toString(); } + private static transient final Pattern URL_PATTERN = Pattern.compile("^((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)$"); private static transient final Pattern VANILLA_PATTERN = Pattern.compile("\u00A7+[0-9A-FK-ORa-fk-or]"); private static transient final Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])"); private static transient final Pattern VANILLA_COLOR_PATTERN = Pattern.compile("\u00A7+[0-9A-Fa-f]"); @@ -528,7 +529,7 @@ public class Util { return null; } - return input.replace(".", ". ").replace(". ", ". "); + return URL_PATTERN.matcher(input).replaceAll("$1 $2"); } public static String formatString(final IUser user, final String permBase, final String input) @@ -546,21 +547,35 @@ public class Util { message = Util.stripColor(input, VANILLA_COLOR_PATTERN); } - if (user.isAuthorized(permBase + ".magic")) + if (user.isAuthorized(permBase + ".format")) { - message = Util.replaceColor(message, REPLACE_MAGIC_PATTERN); + message = Util.replaceColor(message, REPLACE_FORMAT_PATTERN); } else { - message = Util.stripColor(message, VANILLA_MAGIC_PATTERN); + message = Util.stripColor(message, VANILLA_FORMAT_PATTERN); } - if (user.isAuthorized(permBase + ".format")) + return message; + } + + public static String formatMessage(final IUser user, final String permBase, final String input) + { + if (input == null) { - message = Util.replaceColor(message, REPLACE_FORMAT_PATTERN); + return null; + } + String message = formatString(user, permBase, input); + if (user.isAuthorized(permBase + ".magic")) + { + message = Util.replaceColor(message, REPLACE_MAGIC_PATTERN); } else { - message = Util.stripColor(message, VANILLA_FORMAT_PATTERN); + message = Util.stripColor(message, VANILLA_MAGIC_PATTERN); + } + if (!user.isAuthorized(permBase + ".url")) + { + message = Util.blockURL(message); } return message; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandme.java b/Essentials/src/com/earth2me/essentials/commands/Commandme.java index ec2857841..4322592d4 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandme.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandme.java @@ -27,7 +27,7 @@ public class Commandme extends EssentialsCommand } String message = getFinalArg(args, 0); - message = Util.formatString(user, "essentials.chat", message); + message = Util.formatMessage(user, "essentials.chat", message); user.setDisplayNick(); ess.broadcastMessage(user, _("action", user.getDisplayName(), message)); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java index 8a6cdad32..2e1011e3b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java @@ -34,7 +34,7 @@ public class Commandmsg extends EssentialsCommand { throw new Exception(_("voiceSilenced")); } - message = Util.formatString(user, "essentials.msg", message); + message = Util.formatMessage(user, "essentials.msg", message); } else { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandr.java b/Essentials/src/com/earth2me/essentials/commands/Commandr.java index 00072fded..9b585509d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandr.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandr.java @@ -32,7 +32,7 @@ public class Commandr extends EssentialsCommand if (sender instanceof Player) { User user = ess.getUser(sender); - message = Util.formatString(user, "essentials.msg", message); + message = Util.formatMessage(user, "essentials.msg", message); replyTo = user; senderName = user.getDisplayName(); } diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java index 2c0906cbf..599c39dda 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java @@ -37,9 +37,12 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer /** * This listener should apply the general chat formatting only...then return control back the event handler */ - event.setMessage(Util.formatString(user, "essentials.chat", event.getMessage())); + event.setMessage(Util.formatMessage(user, "essentials.chat", event.getMessage())); String group = user.getGroup(); String world = user.getWorld().getName(); - event.setFormat(ess.getSettings().getChatFormat(group).format(new Object[] {group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH)})); + event.setFormat(ess.getSettings().getChatFormat(group).format(new Object[] + { + group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH) + })); } } -- cgit v1.2.3 From 284fef00e70479dc9bce7a6a2a0baef122753f6c Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 22:26:04 +0000 Subject: Split formatting perms for signs as well. --- Essentials/src/com/earth2me/essentials/Util.java | 16 ++++++++-------- .../com/earth2me/essentials/signs/SignBlockListener.java | 15 +++------------ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index d387cad56..53ee4b8f3 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -547,6 +547,14 @@ public class Util { message = Util.stripColor(input, VANILLA_COLOR_PATTERN); } + if (user.isAuthorized(permBase + ".magic")) + { + message = Util.replaceColor(message, REPLACE_MAGIC_PATTERN); + } + else + { + message = Util.stripColor(message, VANILLA_MAGIC_PATTERN); + } if (user.isAuthorized(permBase + ".format")) { message = Util.replaceColor(message, REPLACE_FORMAT_PATTERN); @@ -565,14 +573,6 @@ public class Util return null; } String message = formatString(user, permBase, input); - if (user.isAuthorized(permBase + ".magic")) - { - message = Util.replaceColor(message, REPLACE_MAGIC_PATTERN); - } - else - { - message = Util.stripColor(message, VANILLA_MAGIC_PATTERN); - } if (!user.isAuthorized(permBase + ".url")) { message = Util.blockURL(message); diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java index fc020aa88..8acca9804 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java @@ -84,19 +84,10 @@ public class SignBlockListener implements Listener return; } User user = ess.getUser(event.getPlayer()); - if (user.isAuthorized("essentials.signs.color")) - { - for (int i = 0; i < 4; i++) - { - event.setLine(i, Util.replaceFormat(event.getLine(i))); - } - } - else + + for (int i = 0; i < 4; i++) { - for (int i = 0; i < 4; i++) - { - event.setLine(i, Util.stripFormat(event.getLine(i))); - } + event.setLine(i, Util.formatString(user, "essentials.signs", event.getLine(i))); } for (Signs signs : Signs.values()) -- cgit v1.2.3 From 71358629f4347c570d2e267b7102f3af812e71d7 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 22:59:52 +0000 Subject: New command: /fly New perm: essentials.fly.others --- .../src/com/earth2me/essentials/Essentials.java | 2 +- .../src/com/earth2me/essentials/OfflinePlayer.java | 13 ++++- .../earth2me/essentials/commands/Commandfly.java | 63 ++++++++++++++++++++++ Essentials/src/messages.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 3 +- Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_nl.properties | 1 + Essentials/src/plugin.yml | 4 ++ 11 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 Essentials/src/com/earth2me/essentials/commands/Commandfly.java diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 4111d3ca7..660d4887b 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -66,7 +66,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 2100; + public static final int BUKKIT_VERSION = 2105; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java index 6a88eb533..c6230f5e0 100644 --- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java +++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java @@ -26,7 +26,6 @@ import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.util.Vector; - public class OfflinePlayer implements Player { private final transient IEssentials ess; @@ -1040,4 +1039,16 @@ public class OfflinePlayer implements Player { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public boolean isFlying() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFlying(boolean arg0) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandfly.java b/Essentials/src/com/earth2me/essentials/commands/Commandfly.java new file mode 100644 index 000000000..ea6192589 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandfly.java @@ -0,0 +1,63 @@ +package com.earth2me.essentials.commands; + +import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.User; +import java.util.Locale; +import org.bukkit.GameMode; +import org.bukkit.Server; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + + +public class Commandfly extends EssentialsCommand +{ + public Commandfly() + { + super("fly"); + } + + @Override + protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception + { + if (args.length < 1) + { + throw new NotEnoughArgumentsException(); + } + + flyOtherPlayers(server, sender, args[0]); + } + + @Override + protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception + { + if (args.length > 0 && !args[0].trim().isEmpty() && user.isAuthorized("essentials.fly.others")) + { + flyOtherPlayers(server, user, args[0]); + return; + } + user.setAllowFlight(!user.getAllowFlight()); + if (!user.getAllowFlight()) + { + user.setFlying(false); + } + user.sendMessage(_("flyMode", _(user.getAllowFlight() ? "true" : "false"), user.getDisplayName())); + } + + private void flyOtherPlayers(final Server server, final CommandSender sender, final String name) + { + for (Player matchPlayer : server.matchPlayer(name)) + { + final User player = ess.getUser(matchPlayer); + if (player.isHidden()) + { + continue; + } + player.setAllowFlight(!player.getAllowFlight()); + if (!player.getAllowFlight()) + { + player.setFlying(false); + } + sender.sendMessage(_("flyMode", _(player.getAllowFlight() ? "true" : "false"), player.getDisplayName())); + } + } +} diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 02598c9cb..aa32ad340 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -92,6 +92,7 @@ false=false feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Renaming file {0} failed +flyMode=\u00a77Set fly mode {0} for {1}. foreverAlone=\u00a7cYou have nobody to whom you can reply. freedMemory=Freed {0} MB. gameMode=\u00a77Set game mode {0} for {1}. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index fd4803d3f..9304c52df 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -92,6 +92,7 @@ false=false feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Omd\u00c3\u00b8bning af fil {0} fejlede. +flyMode=\u00a77Set fly mode {0} for {1}. foreverAlone=\u00a7cDu har ingen til hvem du kan svare. freedMemory=Frigjorde {0} MB. gameMode=\u00a77Satte game mode {0} for {1}. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 767f028fd..9c7846008 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -92,6 +92,7 @@ false=false feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Umbenennen von {0} gescheitert. +flyMode=\u00a77Set fly mode {0} for {1}. foreverAlone=\u00a7cDu hast niemanden, dem du antworten kannst. freedMemory={0} MB frei gemacht. gameMode=\u00a77Set game mode {0} for {1}. @@ -396,6 +397,7 @@ weatherStormFor=\u00a77In {0} st\u00fcrmt es nun f\u00fcr {1} Sekunden. weatherSun=\u00a77In {0} scheint nun die Sonne. weatherSunFor=\u00a77In {0} scheint nun f\u00fcr {1} Sekunden die Sonne. whoisBanned=\u00a79 - Banned: {0} +whoisExp=\u00a79 - Exp: {0} (Level {1}) whoisGamemode=\u00a79 - Gamemode: {0} whoisGeoLocation=\u00a79 - Herkunft: {0} whoisGod=\u00a79 - God mode: {0} @@ -415,4 +417,3 @@ year=Jahr years=Jahre youAreHealed=\u00a77Du wurdest geheilt. youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen. -whoisExp=\u00a79 - Exp: {0} (Level {1}) diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 0a64b2308..5cb5b8792 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -92,6 +92,7 @@ false=false feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Renaming file {0} failed +flyMode=\u00a77Set fly mode {0} for {1}. foreverAlone=\u00a7cYou have nobody to whom you can reply. freedMemory=Freed {0} MB. gameMode=\u00a77Set game mode {0} for {1}. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 6356bfbff..e1a256b40 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -92,6 +92,7 @@ false=false feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Error al renombrar el archivo {0} +flyMode=\u00a77Set fly mode {0} for {1}. foreverAlone=\u00a7cNo tienes nadie a quien puedas responder. freedMemory= {0} MB libres. gameMode=\u00a77Set game mode {0} for {1}. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index e92efb181..1766f4df3 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -92,6 +92,7 @@ false=non feed=\u00a77Vous avez \u00e9t\u00e9 rassasi\u00e9. feedOther=\u00a77 est rassasi\u00e9 {0}. fileRenameError=Echec du changement de nom de {0} +flyMode=\u00a77Set fly mode {0} for {1}. foreverAlone=\u00a7cVous n''avez personne \u00e0 qui r\u00e9pondre freedMemory=A lib\u00e9r\u00e9 {0} Mo. gameMode=\u00a77Mode de jeu {0} pour {1}. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 5ab703d99..c7f715e72 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -92,6 +92,7 @@ false=false feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Hernoemen van {0} mislukt +flyMode=\u00a77Set fly mode {0} for {1}. foreverAlone=\u00a7cJe hebt niemand waarnaar je kan reageren. freedMemory={0} MB gelost. gameMode=\u00a77Set game mode {0} for {1}. diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index c54e79c12..7eaca70f4 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -98,6 +98,10 @@ commands: description: Satisfy the hunger. usage: / [player] aliases: [efeed,eat,eeat] + fly: + description: Take off, and soar! + usage: / [player] + aliases: [efly] itemdb: description: Searches for an item. usage: / -- cgit v1.2.3 From 96f0dd5824d2f2a5a406b103bddf60ba45b3e0dc Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 23:07:23 +0000 Subject: Update CB to 2105 --- lib/bukkit.jar | Bin 4715475 -> 4715585 bytes lib/craftbukkit.jar | Bin 11102949 -> 11095968 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/bukkit.jar b/lib/bukkit.jar index 95ac7392f..60ba2177d 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index 67b691c8e..44b22101d 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From 3c9057f68e679792686510b3bfb1b26c7a8b05be Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 23:10:59 +0000 Subject: Fix jar building. --- Essentials/test/com/earth2me/essentials/FakeServer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java index 1d025abe7..63d03a5f9 100644 --- a/Essentials/test/com/earth2me/essentials/FakeServer.java +++ b/Essentials/test/com/earth2me/essentials/FakeServer.java @@ -717,4 +717,10 @@ public class FakeServer implements Server { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public long getConnectionThrottle() + { + throw new UnsupportedOperationException("Not supported yet."); + } } -- cgit v1.2.3 From c5eb1bb1058dd5d7189b88781980d03b0cd1ff82 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 23:47:35 +0000 Subject: Improve kit matching, and add enchantments. Enchanted kit example in config.yml --- Essentials/src/com/earth2me/essentials/Kit.java | 38 +++++++++++++++++++++---- Essentials/src/config.yml | 7 +++-- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index cf39997ea..9f7bb5a5d 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -2,11 +2,13 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; import static com.earth2me.essentials.I18n.capitalCase; +import com.earth2me.essentials.commands.Commandenchant; import com.earth2me.essentials.commands.NoChargeException; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import java.util.*; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; @@ -86,14 +88,40 @@ public class Kit boolean spew = false; for (String d : items) { - final String[] parts = d.split("[^0-9]+", 3); - final int id = Material.getMaterial(Integer.parseInt(parts[0])).getId(); - final int amount = parts.length > 1 ? Integer.parseInt(parts[parts.length > 2 ? 2 : 1]) : 1; - final short data = parts.length > 2 ? Short.parseShort(parts[1]) : 0; + final String[] parts = d.split(" "); + final String[] item = parts[0].split("[:+',;.]", 2); + final int id = Material.getMaterial(Integer.parseInt(item[0])).getId(); + final short data = item.length > 1 ? Short.parseShort(item[1]) : 0; + final int amount = parts.length > 1 ? Integer.parseInt(parts[1]) : 1; + + final ItemStack stack = new ItemStack(id, amount, data); + if (parts.length > 2) + { + for (int i = 2; i < parts.length; i++) + { + final String[] split = parts[i].split("[:+',;.]", 2); + if (split.length < 1) + { + continue; + } + final Enchantment enchantment = Commandenchant.getEnchantment(split[0], user); + int level; + if (split.length > 1) + { + level = Integer.parseInt(split[1]); + } + else + { + level = enchantment.getMaxLevel(); + } + stack.addEnchantment(enchantment, level); + } + } + final Map overfilled; if (user.isAuthorized("essentials.oversizedstacks")) { - overfilled = InventoryWorkaround.addItem(user.getInventory(), true, ess.getSettings().getOversizedStackSize(), new ItemStack(id, amount, data)); + overfilled = InventoryWorkaround.addItem(user.getInventory(), true, ess.getSettings().getOversizedStackSize(), stack); } else { diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index ef2485ae8..5462b6c12 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -168,19 +168,20 @@ player-commands: # Note: All items MUST be followed by a quantity! # All kit names should be lower case, and will be treated as lower in permissions/costs. +# Syntax: - itemID[:DataValue] Amount [Enchantment:Level].. # Times are measured in seconds. kits: dtools: delay: 10 items: - - 277 1 + - 277 1 efficiency:1 - 278 1 - - 279 1 + - 279:780 1 tools: delay: 10 items: - 272 1 - - 273 1 + - 273 1 - 274 1 - 275 1 -- cgit v1.2.3 From 42d01471d3c271ee69c6a610c827cd5da1a49602 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 00:15:22 +0000 Subject: Disabling player list updates by default (can mess with tab completion) Hopefully this will be reverted if/when patch is found. --- Essentials/src/com/earth2me/essentials/ISettings.java | 2 ++ Essentials/src/com/earth2me/essentials/Settings.java | 6 ++++++ Essentials/src/com/earth2me/essentials/User.java | 17 ++++++++++------- Essentials/src/config.yml | 3 +++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index fe12720ea..1ef8feaa9 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -127,6 +127,8 @@ public interface ISettings extends IConf boolean removeGodOnDisconnect(); boolean changeDisplayName(); + + boolean changePlayerListName(); boolean isPlayerCommand(String string); diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 2aa1d93c1..e194cf21b 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -609,6 +609,12 @@ public class Settings implements ISettings { return config.getBoolean("change-displayname", true); } + + @Override + public boolean changePlayerListName() + { + return config.getBoolean("change-playerlist", false); + } @Override public boolean useBukkitPermissions() diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index c4293cc63..d84ab84aa 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -328,15 +328,18 @@ public class User extends UserData implements Comparable, IReplyTo, IUser { name = Util.stripFormat(name); } - try - { - setPlayerListName(name); - } - catch (IllegalArgumentException e) + if (ess.getSettings().changePlayerListName()) { - if (ess.getSettings().isDebug()) + try + { + setPlayerListName(name); + } + catch (IllegalArgumentException e) { - logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player."); + if (ess.getSettings().isDebug()) + { + logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player."); + } } } } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 5462b6c12..657030626 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -33,6 +33,9 @@ nickname-prefix: '~' # Disable this if you have any other plugin, that modifies the displayname of a user. change-displayname: true +# When this option is enabled, the (tab) player list will be updated with nicknames and colours. +#change-playerlist: true + # Adds the prefix and suffix to the displayname of the player, so it will be displayed in messages and lists. # The prefix/suffix can be set using Permissions, Group Manager or PermissionsEx. # The value of change-displayname (above) has to be true. -- cgit v1.2.3 From 2f434291cbe3888c1e146648f9d8459423f7ca55 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 00:19:27 +0000 Subject: Fixing chat color formatting. --- Essentials/src/com/earth2me/essentials/Util.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 53ee4b8f3..48eb770b2 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -520,7 +520,7 @@ public class Util { return null; } - return REPLACE_PATTERN.matcher(input).replaceAll(""); + return REPLACE_PATTERN.matcher(input).replaceAll("\u00a7$1"); } public static String blockURL(final String input) -- cgit v1.2.3 From 033c2e22cd99147036488875e7c6c08d431aa8e4 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 07:56:44 +0000 Subject: Remove white user prefix, if prefix is blank. Messes with EssentialsChat colouring. --- Essentials/src/com/earth2me/essentials/User.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index d84ab84aa..dde0c20e2 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -291,16 +291,12 @@ public class User extends UserData implements Comparable, IReplyTo, IUser { final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§'); nickname.insert(0, prefix); - if (prefix.length() < 2 || prefix.charAt(0) != '§') - { - nickname.insert(0, "§f"); - } } if (!ess.getSettings().disableSuffix()) { final String suffix = ess.getPermissionsHandler().getSuffix(base).replace('&', '§'); nickname.append(suffix); - if (suffix.length() < 2 || !suffix.substring(suffix.length() - 2, suffix.length() - 1).equals("§")) + if (suffix.length() < 2 || suffix.charAt(suffix.length() - 2) != '§') { nickname.append("§f"); } -- cgit v1.2.3 From 49cb482ca52f8138fc98a49db11d201f3e1e179e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 10:03:15 +0000 Subject: Update Essentials/src/config.yml --- Essentials/src/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 657030626..dc9f41656 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -33,7 +33,8 @@ nickname-prefix: '~' # Disable this if you have any other plugin, that modifies the displayname of a user. change-displayname: true -# When this option is enabled, the (tab) player list will be updated with nicknames and colours. +# When this option is enabled, the (tab) player list will be updated with the displayname. +# The value of change-displayname (above) has to be true. #change-playerlist: true # Adds the prefix and suffix to the displayname of the player, so it will be displayed in messages and lists. -- cgit v1.2.3 From 20c973dab2793ef71065bc44f259d3467cd7b2df Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 23 Mar 2012 11:13:03 +0100 Subject: Fix UTF8 handling in Configuration class --- .../com/earth2me/essentials/EssentialsConf.java | 97 ++++++++++++++++++---- 1 file changed, 82 insertions(+), 15 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java index 9ffe7e5b6..846a7b4b0 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java @@ -1,7 +1,14 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; +import com.google.common.io.Files; import java.io.*; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.channels.FileChannel; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CoderResult; import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -24,6 +31,7 @@ public class EssentialsConf extends YamlConfiguration private transient File configFile; private transient String templateName = null; private transient Class resourceClass = EssentialsConf.class; + private static final Charset UTF8 = Charset.forName("UTF-8"); public EssentialsConf(final File configFile) { @@ -104,15 +112,46 @@ public class EssentialsConf extends YamlConfiguration try { - super.load(configFile); - } - catch (FileNotFoundException ex) - { - LOGGER.log(Level.SEVERE, null, ex); + final FileInputStream inputStream = new FileInputStream(configFile); + try + { + final FileChannel channel = inputStream.getChannel(); + final ByteBuffer buffer = ByteBuffer.allocate((int)configFile.length()); + channel.read(buffer); + buffer.rewind(); + final CharBuffer data = CharBuffer.allocate((int)configFile.length()); + CharsetDecoder decoder = UTF8.newDecoder(); + CoderResult result = decoder.decode(buffer, data, true); + if (result.isError()) + { + buffer.rewind(); + data.clear(); + LOGGER.log(Level.INFO, "File {0} is not utf-8 encoded, trying {1}", new Object[] + { + configFile.getAbsolutePath().toString(), Charset.defaultCharset().displayName() + }); + decoder = Charset.defaultCharset().newDecoder(); + result = decoder.decode(buffer, data, true); + if (result.isError()) + { + throw new InvalidConfigurationException("Invalid Characters in file " + configFile.getAbsolutePath().toString()); + } else { + decoder.flush(data); + } + } else { + decoder.flush(data); + } + data.rewind(); + super.loadFromString(data.toString()); + } + finally + { + inputStream.close(); + } } catch (IOException ex) { - LOGGER.log(Level.SEVERE, null, ex); + LOGGER.log(Level.SEVERE, ex.getMessage(), ex); } catch (InvalidConfigurationException ex) { @@ -301,27 +340,55 @@ public class EssentialsConf extends YamlConfiguration return def; } } - - public void save() { + + public void save() + { try { save(configFile); } catch (IOException ex) { - LOGGER.log(Level.SEVERE, null, ex); + LOGGER.log(Level.SEVERE, ex.getMessage(), ex); } } - - public Object getProperty(String path) { + + @Override + public void save(final File file) throws IOException + { + if (file == null) + { + throw new IllegalArgumentException("File cannot be null"); + } + + Files.createParentDirs(file); + + final String data = saveToString(); + + final OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), UTF8); + + try + { + writer.write(data); + } + finally + { + writer.close(); + } + } + + public Object getProperty(String path) + { return get(path); } - - public void setProperty(String path, Object object) { + + public void setProperty(String path, Object object) + { set(path, object); } - - public void removeProperty(String path) { + + public void removeProperty(String path) + { set(path, null); } } -- cgit v1.2.3 From c46f14665c0eeea0ebf64251e4cc773d7d2c8a55 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 10:16:38 +0000 Subject: Adding missing entities to Protect Spawn Blacklist --- Essentials/src/config.yml | 31 +++++++++++----------- .../protect/EssentialsProtectEntityListener.java | 2 +- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index dc9f41656..2399b9be9 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -462,30 +462,31 @@ protect: entitytarget: false # Prevent the spawning of creatures spawn: - chicken: false - cow: false creeper: false - ghast: false - giant: false - monster: false - pig: false - pig_zombie: false - sheep: false skeleton: false - slime: false spider: false - squid: false + giant: false zombie: false - wolf: false - cave_spider: false + slime: false + ghast: false + pig_zombie: false enderman: false + cave_spider: false silverfish: false - ender_dragon: false - villager: false blaze: false - mushroom_cow: false magma_cube: false + ender_dragon: false + pig: false + sheep: false + cow: false + chicken: false + squid: false + wolf: false + mushroom_cow: false snowman: false + ocelot: false + iron_golem: false + villager: false # Maximum height the creeper should explode. -1 allows them to explode everywhere. # Set prevent.creeper-explosion to true, if you want to disable creeper explosions. diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java index fe3cadbbe..1868e20c1 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java @@ -274,7 +274,7 @@ public class EssentialsProtectEntityListener implements Listener { return; } - final CreatureType creature = event.getCreatureType(); + final EntityType creature = event.getEntityType(); if (creature == null) { return; -- cgit v1.2.3 From 29a190f93a89c0b9d5532aadd7a84f16b1a4c736 Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 23 Mar 2012 12:10:46 +0100 Subject: http://youtu.be/8DdeLUA0Fms --- Essentials/src/com/earth2me/essentials/I18n.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Essentials/src/com/earth2me/essentials/I18n.java b/Essentials/src/com/earth2me/essentials/I18n.java index 63fdcc065..97d500a6a 100644 --- a/Essentials/src/com/earth2me/essentials/I18n.java +++ b/Essentials/src/com/earth2me/essentials/I18n.java @@ -114,6 +114,7 @@ public class I18n implements II18n { currentLocale = new Locale(parts[0], parts[1], parts[2]); } + ResourceBundle.clearCache(); Logger.getLogger("Minecraft").log(Level.INFO, String.format("Using locale %s", currentLocale.toString())); customBundle = ResourceBundle.getBundle(MESSAGES, currentLocale, new FileResClassLoader(I18n.class.getClassLoader(), ess)); localeBundle = ResourceBundle.getBundle(MESSAGES, currentLocale); -- cgit v1.2.3 From 8a22258945e4737230a977202128a581d4d3aeef Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 23 Mar 2012 14:22:10 +0100 Subject: Fix utf-8 decoding problems. --- .../src/com/earth2me/essentials/EssentialsConf.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java index 846a7b4b0..89fb53d34 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java @@ -126,23 +126,25 @@ public class EssentialsConf extends YamlConfiguration { buffer.rewind(); data.clear(); - LOGGER.log(Level.INFO, "File {0} is not utf-8 encoded, trying {1}", new Object[] - { - configFile.getAbsolutePath().toString(), Charset.defaultCharset().displayName() - }); + LOGGER.log(Level.INFO, "File " + configFile.getAbsolutePath().toString() + "is not utf-8 encoded, trying " + Charset.defaultCharset().displayName()); decoder = Charset.defaultCharset().newDecoder(); result = decoder.decode(buffer, data, true); if (result.isError()) { throw new InvalidConfigurationException("Invalid Characters in file " + configFile.getAbsolutePath().toString()); - } else { + } + else + { decoder.flush(data); } - } else { + } + else + { decoder.flush(data); } + final int end = data.position(); data.rewind(); - super.loadFromString(data.toString()); + super.loadFromString(data.subSequence(0, end).toString()); } finally { -- cgit v1.2.3 From c503adabc5ab0e2780fa0faeadfe1008112d9019 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 13:26:03 +0000 Subject: Fix url matching. --- Essentials/src/com/earth2me/essentials/Util.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 48eb770b2..510ab8a9a 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -495,7 +495,7 @@ public class Util } return buf.toString(); } - private static transient final Pattern URL_PATTERN = Pattern.compile("^((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)$"); + private static transient final Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)"); private static transient final Pattern VANILLA_PATTERN = Pattern.compile("\u00A7+[0-9A-FK-ORa-fk-or]"); private static transient final Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])"); private static transient final Pattern VANILLA_COLOR_PATTERN = Pattern.compile("\u00A7+[0-9A-Fa-f]"); @@ -529,7 +529,12 @@ public class Util { return null; } - return URL_PATTERN.matcher(input).replaceAll("$1 $2"); + String text = URL_PATTERN.matcher(input).replaceAll("$1 $2"); + while (URL_PATTERN.matcher(text).find()) + { + text = URL_PATTERN.matcher(text).replaceAll("$1 $2"); + } + return text; } public static String formatString(final IUser user, final String permBase, final String input) -- cgit v1.2.3 From a0cba8e63d95b62dfc34db77927f715aac162c1c Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 23 Mar 2012 14:30:00 +0100 Subject: Spaaaaaace! So much space! Gotta see it all! --- Essentials/src/com/earth2me/essentials/EssentialsConf.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java index 89fb53d34..85c2bbd8c 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java @@ -126,7 +126,7 @@ public class EssentialsConf extends YamlConfiguration { buffer.rewind(); data.clear(); - LOGGER.log(Level.INFO, "File " + configFile.getAbsolutePath().toString() + "is not utf-8 encoded, trying " + Charset.defaultCharset().displayName()); + LOGGER.log(Level.INFO, "File " + configFile.getAbsolutePath().toString() + " is not utf-8 encoded, trying " + Charset.defaultCharset().displayName()); decoder = Charset.defaultCharset().newDecoder(); result = decoder.decode(buffer, data, true); if (result.isError()) -- cgit v1.2.3 From 0a74da88d6afdc5be4045309cf8415ca2acb38cd Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 17:16:09 +0000 Subject: Help command refresh. --- .../earth2me/essentials/commands/Commandhelp.java | 11 ++++- .../earth2me/essentials/textreader/HelpInput.java | 51 ++++++++++++++++------ .../earth2me/essentials/textreader/TextPager.java | 21 ++++++++- Essentials/src/messages.properties | 7 ++- Essentials/src/messages_da.properties | 5 ++- Essentials/src/messages_de.properties | 5 ++- Essentials/src/messages_en.properties | 5 ++- Essentials/src/messages_es.properties | 5 ++- Essentials/src/messages_fr.properties | 5 ++- Essentials/src/messages_nl.properties | 5 ++- 10 files changed, 95 insertions(+), 25 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java index 769aac483..6339359f1 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java @@ -4,6 +4,7 @@ import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; import com.earth2me.essentials.textreader.*; +import java.util.Locale; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -21,6 +22,7 @@ public class Commandhelp extends EssentialsCommand IText output; String pageStr = args.length > 0 ? args[0] : null; String chapterPageStr = args.length > 1 ? args[1] : null; + String command = commandLabel; final IText input = new TextInput(user, "help", false, ess); if (input.getLines().isEmpty()) @@ -31,7 +33,12 @@ public class Commandhelp extends EssentialsCommand } else { - output = new HelpInput(user, pageStr, ess); + if (pageStr.length() > 26) + { + pageStr = pageStr.substring(0, 25); + } + output = new HelpInput(user, pageStr.toLowerCase(Locale.ENGLISH), ess); + command = command.concat(" ").concat(pageStr); pageStr = chapterPageStr; } chapterPageStr = null; @@ -41,7 +48,7 @@ public class Commandhelp extends EssentialsCommand output = new KeywordReplacer(input, user, ess); } final TextPager pager = new TextPager(output); - pager.showPage(pageStr, chapterPageStr, commandLabel, user); + pager.showPage(pageStr, chapterPageStr, command, user); } @Override diff --git a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java index 6d4efd811..76316c94d 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java @@ -24,33 +24,46 @@ public class HelpInput implements IText public HelpInput(final User user, final String match, final IEssentials ess) throws IOException { boolean reported = false; + final List newLines = new ArrayList(); String pluginName = ""; + String pluginNameLow = ""; + if (!match.equalsIgnoreCase("")) + { + lines.add(_("helpMatching", match)); + } + for (Plugin p : ess.getServer().getPluginManager().getPlugins()) { try { final PluginDescriptionFile desc = p.getDescription(); final Map> cmds = desc.getCommands(); - pluginName = p.getDescription().getName().toLowerCase(Locale.ENGLISH); + pluginName = p.getDescription().getName(); + pluginNameLow = pluginName.toLowerCase(Locale.ENGLISH); + if (pluginNameLow.equals(match)) + { + lines.clear(); + newLines.clear(); + lines.add(_("helpFrom", p.getDescription().getName())); + } + for (Map.Entry> k : cmds.entrySet()) { try { - if ((!match.equalsIgnoreCase("")) - && (!k.getKey().toLowerCase(Locale.ENGLISH).contains(match)) + if (!match.equalsIgnoreCase("") && (!pluginNameLow.contains(match)) && (!k.getKey().toLowerCase(Locale.ENGLISH).contains(match)) && (!(k.getValue().get(DESCRIPTION) instanceof String - && ((String)k.getValue().get(DESCRIPTION)).toLowerCase(Locale.ENGLISH).contains(match))) - && (!pluginName.contains(match))) + && ((String)k.getValue().get(DESCRIPTION)).toLowerCase(Locale.ENGLISH).contains(match)))) { continue; } - if (pluginName.contains("essentials")) + if (pluginNameLow.contains("essentials")) { final String node = "essentials." + k.getKey(); if (!ess.getSettings().isCommandDisabled(k.getKey()) && user.isAuthorized(node)) { - lines.add(_("helpLine", k.getKey(), k.getValue().get(DESCRIPTION))); + newLines.add(_("helpLine", k.getKey(), k.getValue().get(DESCRIPTION))); } } else @@ -67,9 +80,9 @@ public class HelpInput implements IText { permissions = value.get(PERMISSIONS); } - if (user.isAuthorized("essentials.help." + pluginName)) + if (user.isAuthorized("essentials.help." + pluginNameLow)) { - lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); + newLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } else if (permissions instanceof List && !((List)permissions).isEmpty()) { @@ -84,21 +97,21 @@ public class HelpInput implements IText } if (enabled) { - lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); + newLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } } else if (permissions instanceof String && !"".equals(permissions)) { if (user.isAuthorized(permissions.toString())) { - lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); + newLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } } else { if (!ess.getSettings().hidePermissionlessHelp()) { - lines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); + newLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } } } @@ -109,6 +122,17 @@ public class HelpInput implements IText continue; } } + if (!newLines.isEmpty()) + { + if (pluginNameLow.equals(match)) + { + break; + } + if (match.equalsIgnoreCase("")) + { + lines.add(_("helpPlugin", pluginName, pluginNameLow)); + } + } } catch (NullPointerException ex) { @@ -118,12 +142,13 @@ public class HelpInput implements IText { if (!reported) { - logger.log(Level.WARNING, _("commandHelpFailedForPlugin", pluginName), ex); + logger.log(Level.WARNING, _("commandHelpFailedForPlugin", pluginNameLow), ex); } reported = true; continue; } } + lines.addAll(newLines); } @Override diff --git a/Essentials/src/com/earth2me/essentials/textreader/TextPager.java b/Essentials/src/com/earth2me/essentials/textreader/TextPager.java index c23df734d..cb70839dd 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/TextPager.java +++ b/Essentials/src/com/earth2me/essentials/textreader/TextPager.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.textreader; +import com.earth2me.essentials.I18n; import static com.earth2me.essentials.I18n._; import java.util.List; import java.util.Locale; @@ -49,7 +50,23 @@ public class TextPager final int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0); if (!onePage) { - sender.sendMessage(_("infoPages", page, pages)); + StringBuilder content = new StringBuilder(); + final String[] title = commandName.split(" ", 2); + if (title.length > 1) + { + content.append(I18n.capitalCase(title[0])).append(": "); + content.append(title[1]); + } + else if (chapterPageStr != null) + { + content.append(I18n.capitalCase(commandName)).append(": "); + content.append(chapterPageStr); + } + else + { + content.append(I18n.capitalCase(commandName)); + } + sender.sendMessage(_("infoPages", page, pages, content)); } for (int i = start; i < lines.size() && i < start + (onePage ? 20 : 9); i++) { @@ -116,7 +133,7 @@ public class TextPager if (!onePage) { - sender.sendMessage(_("infoPages", page, pages)); + sender.sendMessage(_("infoPages", page, pages, I18n.capitalCase(commandName))); } for (int i = start; i < end && i < start + (onePage ? 20 : 9); i++) { diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index aa32ad340..b0e9b80f3 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -111,9 +111,12 @@ haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. helpConsole=To view help from the console, type ?. +helpFrom=\u00a77Commands from {0}: helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Commands matching "{0}": helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} holeInFloor=Hole in floor homeSet=\u00a77Home set. homeSetToBed=\u00a77Your home is now set to this bed. @@ -125,7 +128,7 @@ illegalDate=Illegal date format. infoChapter=Select chapter: infoChapterPages=Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=File info.txt does not exist. Creating one for you. -infoPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Page \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- infoUnknownChapter=Unknown chapter. invBigger=The other users inventory is bigger than yours. invRestored=Your inventory has been restored. @@ -133,7 +136,7 @@ invSee=You see the inventory of {0}. invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. invalidHome=Home {0} doesn't exist -invalidMob=Invalid mob type. +invalidMob=Invalid mob type.& invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. invalidWorld=\u00a7cInvalid world. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 9304c52df..ec50806a6 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -111,9 +111,12 @@ haveBeenReleased=\u00a77Du er blevet l\u00f8sladt heal=\u00a77Du er blevet healed. healOther=\u00a77Healed {0}. helpConsole=For at se hj\u00e6lp fra konsolen, skriv ?. +helpFrom=\u00a77Commands from {0}: helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Commands matching "{0}": helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} holeInFloor=Hul i gulv homeSet=\u00a77Hjem sat. homeSetToBed=\u00a77Dit hjem er nu sat til denne seng. @@ -125,7 +128,7 @@ illegalDate=Forkert datoformat. infoChapter=V\u00e6lg kapitel: infoChapterPages=Kapitel {0}, side \u00a7c{1}\u00a7f af \u00a7c{2}\u00a7f: infoFileDoesNotExist=Fil info.txt eksisterer ikke. Fixer liiige en for dig. -infoPages=Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f: +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Side \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- infoUnknownChapter=Ukendt kapitel. invBigger=Den anden brugers inventory er st\u00f8rre end din. invRestored=Din inventory er blevet genoprettet. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 9c7846008..7f2c91b69 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -111,9 +111,12 @@ haveBeenReleased=\u00a77Du wurdest frei gelassen. heal=\u00a77Du wurdest geheilt. healOther=\u00a77{0} geheilt. helpConsole=Um die Hilfe der Konsole zu sehen, schreibe ?. +helpFrom=\u00a77Commands from {0}: helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Commands matching "{0}": helpOp=\u00a7c[Hilfe]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} holeInFloor=Loch im Boden homeSet=\u00a77Zuhause gesetzt. homeSetToBed=\u00a77Dein Zuhause ist nun an diesem Bett. @@ -125,7 +128,7 @@ illegalDate=Ung\u00fcltiges Datumsformat. infoChapter=W\u00e4hle Kapitel: infoChapterPages=Kapitel {0}, Seite \u00a7c{1}\u00a7f von \u00a7c{2}\u00a7f: infoFileDoesNotExist=Datei info.txt existiert nicht. Erzeuge eine neue Datei. -infoPages=Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f: +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Seite \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- infoUnknownChapter=Unbekanntes Kapitel: invBigger=Das andere Inventar ist gr\u00f6sser als deins. invRestored=Dein Inventar wurde wieder hergestellt. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 5cb5b8792..2c4deae80 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -111,9 +111,12 @@ haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. helpConsole=To view help from the console, type ?. +helpFrom=\u00a77Commands from {0}: helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Commands matching "{0}": helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} holeInFloor=Hole in floor homeSet=\u00a77Home set. homeSetToBed=\u00a77Your home is now set to this bed. @@ -125,7 +128,7 @@ illegalDate=Illegal date format. infoChapter=Select chapter: infoChapterPages=Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=File info.txt does not exist. Creating one for you. -infoPages=Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Page \u00a74{0}\u00a76/\u00a74{1} &e---- infoUnknownChapter=Unknown chapter. invBigger=The other users inventory is bigger than yours. invRestored=Your inventory has been restored. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index e1a256b40..3d32bf2d1 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -111,9 +111,12 @@ haveBeenReleased=\u00a77Has sido liberado heal=\u00a77Has sido curado. healOther=\u00a77Has curado a {0}. helpConsole=Para obtener ayuda de la consola, escribe ?. +helpFrom=\u00a77Commands from {0}: helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Commands matching "{0}": helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} holeInFloor=Agujero en el suelo homeSet=\u00a77Hogar establecido. homeSetToBed=\u00a77Tu hogar esta ahora establecido a esta cama. @@ -125,7 +128,7 @@ illegalDate=Forma de fecha ilegal. infoChapter=Selecciona una seccion: infoChapterPages=Seccion {0}, pagina \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=El archivo info.txt no existe. Creando uno para ti. -infoPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f: +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Pagina \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- infoUnknownChapter=Seccion desconocida. invBigger=El inventario del otro usuario es mas grande que el tuyo invRestored=Tu inventario ha sido recuperado. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 1766f4df3..e4e370b90 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -111,9 +111,12 @@ haveBeenReleased=\u00a77Vous avez \u00e9t\u00e9 lib\u00e9r\u00e9. heal=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9. healOther=\u00a77{0} a \u00e9t\u00e9 soign\u00e9. helpConsole=Pour voir l''aide tapez ? +helpFrom=\u00a77Commands from {0}: helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Commands matching "{0}": helpOp=\u00a7c[Aide Admin]\u00a7f \u00a77{0} : \u00a7f {1} helpPages=Page \u00a7c{0}\u00a7f sur \u00a7c{1}\u00a7f. +helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} holeInFloor=Trou dans le Sol. homeSet=\u00a77R\u00e9sidence d\u00e9finie. homeSetToBed=\u00a77Votre r\u00e9sidence est d\u00e9sormais li\u00e9e \u00e0 ce lit. @@ -125,7 +128,7 @@ illegalDate=Format de date ill\u00e9gal. infoChapter=S\u00e9lectionnez le chapitre : infoChapterPages=Chapitre {0}, page \u00a7c{1}\u00a7f sur \u00a7c{2}\u00a7f: infoFileDoesNotExist=Le fichier info.txt n'existe pas. Le fichier est en cours de cr\u00e9ation pour vous. -infoPages=Page \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f. +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Page \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- infoUnknownChapter=Chapitre inconnu. invBigger=Les inventaires des autres joueurs sont plus gros que le v\u00f4tre. invRestored=Votre inventaire vous a \u00e9t\u00e9 rendu. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index c7f715e72..8d3a4cbd7 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -111,9 +111,12 @@ haveBeenReleased=\u00a77Je bent bevrijdt heal=\u00a77Je bent genezen. healOther=\u00a77Je geneezde {0}. helpConsole=type ? om de consolehelp weer te geven. +helpFrom=\u00a77Commands from {0}: helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Commands matching "{0}": helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} holeInFloor=Gat in de vloer homeSet=\u00a77Home ingesteld. homeSetToBed=\u00a77Je home is is nu verplaatst naar dit bed. @@ -125,7 +128,7 @@ illegalDate=Illegaal data formaat. infoChapter=Selecteer hoofdstuk: infoChapterPages=Hoofdstuk {0}, Pagina \u00a7c{1}\u00a7f van de \u00a7c{2}\u00a7f: infoFileDoesNotExist=Bestand info.txt bestaat niet. Bezig met aanmaken. -infoPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f: +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Pagina \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- infoUnknownChapter=Onbekend hoofdstuk. invBigger=De inventory van de andere speler is groter dan die van jou. invRestored=Je inventory is hersteld. -- cgit v1.2.3 From 77c6a3b7302e53f1df042e1fadf89d1b632c67d1 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 17:50:15 +0000 Subject: Wrong colour code symbol. --- Essentials/src/messages_en.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 2c4deae80..faf5aebd7 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -128,7 +128,7 @@ illegalDate=Illegal date format. infoChapter=Select chapter: infoChapterPages=Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: infoFileDoesNotExist=File info.txt does not exist. Creating one for you. -infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Page \u00a74{0}\u00a76/\u00a74{1} &e---- +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Page \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- infoUnknownChapter=Unknown chapter. invBigger=The other users inventory is bigger than yours. invRestored=Your inventory has been restored. -- cgit v1.2.3 From b3de0aabae8c8c1ca428e9c1f44edb3b7519ed11 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 18:26:19 +0000 Subject: Fix for showing plugins when user has no permission. --- .../src/com/earth2me/essentials/textreader/HelpInput.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java index 76316c94d..4efb6c43f 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java @@ -36,6 +36,7 @@ public class HelpInput implements IText { try { + final List pluginLines = new ArrayList(); final PluginDescriptionFile desc = p.getDescription(); final Map> cmds = desc.getCommands(); pluginName = p.getDescription().getName(); @@ -63,7 +64,7 @@ public class HelpInput implements IText final String node = "essentials." + k.getKey(); if (!ess.getSettings().isCommandDisabled(k.getKey()) && user.isAuthorized(node)) { - newLines.add(_("helpLine", k.getKey(), k.getValue().get(DESCRIPTION))); + pluginLines.add(_("helpLine", k.getKey(), k.getValue().get(DESCRIPTION))); } } else @@ -82,7 +83,7 @@ public class HelpInput implements IText } if (user.isAuthorized("essentials.help." + pluginNameLow)) { - newLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); + pluginLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } else if (permissions instanceof List && !((List)permissions).isEmpty()) { @@ -97,21 +98,21 @@ public class HelpInput implements IText } if (enabled) { - newLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); + pluginLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } } else if (permissions instanceof String && !"".equals(permissions)) { if (user.isAuthorized(permissions.toString())) { - newLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); + pluginLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } } else { if (!ess.getSettings().hidePermissionlessHelp()) { - newLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); + pluginLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION))); } } } @@ -122,8 +123,9 @@ public class HelpInput implements IText continue; } } - if (!newLines.isEmpty()) + if (!pluginLines.isEmpty()) { + newLines.addAll(pluginLines); if (pluginNameLow.equals(match)) { break; -- cgit v1.2.3 From dddf529ff5fcd5f11df24b2b945fdf0d4534b266 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 20:15:03 +0000 Subject: Make sure items don't stack wrong in [free] signs. --- Essentials/src/com/earth2me/essentials/signs/SignFree.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java index 52e2b9540..24ce481ff 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java @@ -34,10 +34,12 @@ public class SignFree extends EssentialsSign throw new SignException(_("cantSpawnItem", "Air")); } - item.setAmount(item.getType().getMaxStackSize() * 36); - Inventory i = ess.getServer().createInventory(player, 36); - i.addItem(item); - player.openInventory(i); + item.setAmount(item.getType().getMaxStackSize()); + Inventory invent = ess.getServer().createInventory(player, 36); + for (int i = 0; i < 36; i++) { + invent.addItem(item); + } + player.openInventory(invent); Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess); return true; } -- cgit v1.2.3 From 72028086c0179dc5885725bc15b3dc740eab7637 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 22:38:01 +0000 Subject: 'Enabled' looks better than 'true'. --- Essentials/src/com/earth2me/essentials/commands/Commandfly.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandfly.java b/Essentials/src/com/earth2me/essentials/commands/Commandfly.java index ea6192589..526fc090d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandfly.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandfly.java @@ -40,7 +40,7 @@ public class Commandfly extends EssentialsCommand { user.setFlying(false); } - user.sendMessage(_("flyMode", _(user.getAllowFlight() ? "true" : "false"), user.getDisplayName())); + user.sendMessage(_("flyMode", _(user.getAllowFlight() ? "enabled" : "disabled"), user.getDisplayName())); } private void flyOtherPlayers(final Server server, final CommandSender sender, final String name) @@ -57,7 +57,7 @@ public class Commandfly extends EssentialsCommand { player.setFlying(false); } - sender.sendMessage(_("flyMode", _(player.getAllowFlight() ? "true" : "false"), player.getDisplayName())); + sender.sendMessage(_("flyMode", _(player.getAllowFlight() ? "enabled" : "disabled"), player.getDisplayName())); } } } -- cgit v1.2.3 From a8cbb5c8f53bed7cdd71bdcb39b93b2d8aa84a32 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 23 Mar 2012 23:13:04 +0000 Subject: Extra itemcsv. --- Essentials/src/items.csv | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv index 703772685..2e1a331de 100644 --- a/Essentials/src/items.csv +++ b/Essentials/src/items.csv @@ -809,6 +809,7 @@ blawool,35,15 blacotton,35,15 pistonmovingpiece,36,0 pistonmp,36,0 +pistontop,36,0 yellowflower,37,0 yflower,37,0 flower,37,0 @@ -979,6 +980,9 @@ sbdstep,43,5 stonebrickdoubleslab,43,5 stonebdslab,43,5 sbdslab,43,5 +adminslab,43,6 +magicslab,43,6 +adslab,43,6 smoothstonestep,44,0 stonestep,44,0 sstep,44,0 -- cgit v1.2.3 From 7ca2b65c4f85957ca8c054fca1890a5dfd1fbe4e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 24 Mar 2012 21:07:49 +0000 Subject: New permission check: essentials.list.hidden is now required to /getpos hidden players. --- .../earth2me/essentials/commands/Commandgetpos.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java b/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java index c61702e59..c985ef725 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java @@ -12,21 +12,23 @@ public class Commandgetpos extends EssentialsCommand { super("getpos"); } - + @Override public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { if (args.length > 0 && user.isAuthorized("essentials.getpos.others")) { final User otherUser = getPlayer(server, args, 0); - outputPosition(user, otherUser.getLocation(), user.getLocation()); - } - else - { - outputPosition(user, user.getLocation(), null); + if (!otherUser.isHidden() || user.isAuthorized("essentials.list.hidden")) + { + outputPosition(user, otherUser.getLocation(), user.getLocation()); + return; + } + } + outputPosition(user, user.getLocation(), null); } - + @Override protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { @@ -37,7 +39,7 @@ public class Commandgetpos extends EssentialsCommand final User user = getPlayer(server, args, 0); outputPosition(sender, user.getLocation(), null); } - + //TODO: Translate private void outputPosition(final CommandSender sender, final Location coords, final Location distance) { -- cgit v1.2.3 From 3c3e8d167fae9792021a0f82beeaffc217269fb2 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 24 Mar 2012 21:12:15 +0000 Subject: Better English. --- Essentials/src/messages.properties | 2 +- Essentials/src/messages_en.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index b0e9b80f3..ecaf691e6 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -171,7 +171,7 @@ kitGive=\u00a77Giving kit {0}. kitInvFull=\u00a7cYour inventory was full, placing kit on the floor kitTimed=\u00a7cYou can''t use that kit again for another {0}. kits=\u00a77Kits: {0} -lightningSmited=\u00a77You have just been smited +lightningSmited=\u00a77Thou hast been smitten lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index faf5aebd7..d56675209 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -171,7 +171,7 @@ kitGive=\u00a77Giving kit {0}. kitInvFull=\u00a7cYour inventory was full, placing kit on the floor kitTimed=\u00a7cYou can''t use that kit again for another {0}. kits=\u00a77Kits: {0} -lightningSmited=\u00a77You have just been smited +lightningSmited=\u00a77Thou hast been smitten lightningUse=\u00a77Smiting {0} listAfkTag = \u00a77[AFK]\u00a7f listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. -- cgit v1.2.3 From 160c3f428ce7ae3b80d6d08ca796f6881b1c8eca Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 24 Mar 2012 23:25:43 +0000 Subject: Mysql is bad. --- Essentials/src/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 2399b9be9..316394af0 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -406,6 +406,8 @@ protect: # Database settings for sign/rail protection # mysql or sqlite + # We strongly recommend against using mysql here, unless you have a good reason. + # sqllite seems to be faster in almost all cases, and in some cases mysql can be far far slower. datatype: 'sqlite' # If you specified MySQL above, you MUST enter the appropriate details here. -- cgit v1.2.3 From 71aaf81bbadf07e5ba093abb72f9afa5fa40279a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 24 Mar 2012 23:28:56 +0000 Subject: Update Essentials/src/config.yml --- Essentials/src/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 316394af0..a1e099271 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -407,7 +407,7 @@ protect: # mysql or sqlite # We strongly recommend against using mysql here, unless you have a good reason. - # sqllite seems to be faster in almost all cases, and in some cases mysql can be far far slower. + # Sqlite seems to be faster in almost all cases, and in some cases mysql can be much slower. datatype: 'sqlite' # If you specified MySQL above, you MUST enter the appropriate details here. -- cgit v1.2.3 From b7221516dce1e10664a3b54104fd012c30c0fbef Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 25 Mar 2012 02:33:52 +0100 Subject: Invsee now shows a live player inventory in a window, rather than cloning players inventory. New Permission: essentials.invsee.modify - Player with this permission will be able to add/remove items from the other players inventory. --- .../essentials/EssentialsPlayerListener.java | 30 ++++++++++--- .../src/com/earth2me/essentials/UserData.java | 52 ++++------------------ .../essentials/commands/Commandinvsee.java | 37 ++------------- Essentials/src/plugin.yml | 6 +-- 4 files changed, 41 insertions(+), 84 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 43adf0a6f..486235993 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -20,6 +20,9 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryCloseEvent; +import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerLoginEvent.Result; import org.bukkit.event.player.*; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -107,11 +110,6 @@ public class EssentialsPlayerListener implements Listener { user.toggleGodModeEnabled(); } - if (user.getSavedInventory() != null) - { - user.getInventory().setContents(user.getSavedInventory()); - user.setSavedInventory(null); - } user.updateActivity(false); user.dispose(); } @@ -388,4 +386,26 @@ public class EssentialsPlayerListener implements Listener event.setCancelled(true); } } + + @EventHandler(priority = EventPriority.LOW) + public void onInventoryClickEvent(final InventoryClickEvent event) + { + if (event.getView().getTopInventory().getType() == InventoryType.PLAYER) + { + final User user = ess.getUser(event.getWhoClicked()); + if (user.isInvSee() && !user.isAuthorized("essentials.invsee.modify")) + { + event.setCancelled(true); + } + } + } + @EventHandler(priority = EventPriority.MONITOR) + public void onInventoryCloseEvent(final InventoryCloseEvent event) + { + if (event.getView().getTopInventory().getType() == InventoryType.PLAYER) + { + final User user = ess.getUser(event.getPlayer()); + user.setInvSee(false); + } + } } diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 3b6516277..11c701c34 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -42,7 +42,6 @@ public abstract class UserData extends PlayerExtension implements IConf lastHealTimestamp = _getLastHealTimestamp(); jail = _getJail(); mails = _getMails(); - savedInventory = _getSavedInventory(); teleportEnabled = getTeleportEnabled(); ignoredPlayers = getIgnoredPlayers(); godmode = _getGodModeEnabled(); @@ -407,50 +406,17 @@ public abstract class UserData extends PlayerExtension implements IConf mails.add(mail); setMails(mails); } - private ItemStack[] savedInventory; - - public ItemStack[] getSavedInventory() - { - return savedInventory; - } - - private ItemStack[] _getSavedInventory() - { - int size = config.getInt("inventory.size", 0); - if (size < 1 || (getInventory() != null && size > getInventory().getSize())) - { - return null; - } - ItemStack[] is = new ItemStack[size]; - for (int i = 0; i < size; i++) - { - is[i] = config.getItemStack("inventory." + i); - } - return is; + + private boolean invSee; + + public boolean isInvSee() { + return invSee; } - - public void setSavedInventory(ItemStack[] is) - { - if (is == null || is.length == 0) - { - savedInventory = null; - config.removeProperty("inventory"); - } - else - { - savedInventory = is; - config.setProperty("inventory.size", is.length); - for (int i = 0; i < is.length; i++) - { - if (is[i] == null || is[i].getType() == Material.AIR) - { - continue; - } - config.setProperty("inventory." + i, is[i]); - } - } - config.save(); + + public void setInvSee(boolean set) { + invSee = set; } + private boolean teleportEnabled; private boolean getTeleportEnabled() diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java index 1f5c32faa..a4a659e97 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java @@ -17,41 +17,12 @@ public class Commandinvsee extends EssentialsCommand @Override protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - - if (args.length < 1 && user.getSavedInventory() == null) + if (args.length < 1) { throw new NotEnoughArgumentsException(); } - User invUser = user; - if (args.length == 1) - { - invUser = getPlayer(server, args, 0); - } - if (invUser == user && user.getSavedInventory() != null) - { - invUser.getInventory().setContents(user.getSavedInventory()); - user.setSavedInventory(null); - user.sendMessage(_("invRestored")); - throw new NoChargeException(); - } - - if (user.getSavedInventory() == null) - { - user.setSavedInventory(user.getInventory().getContents()); - } - ItemStack[] invUserStack = invUser.getInventory().getContents(); - final int userStackLength = user.getInventory().getContents().length; - if (invUserStack.length < userStackLength) - { - invUserStack = Arrays.copyOf(invUserStack, userStackLength); - } - if (invUserStack.length > userStackLength) - { - throw new Exception(_("invBigger")); - } - user.getInventory().setContents(invUserStack); - user.sendMessage(_("invSee", invUser.getDisplayName())); - user.sendMessage(_("invSeeHelp")); - throw new NoChargeException(); + final User invUser = getPlayer(server, args, 0); + user.setInvSee(true); + user.openInventory(invUser.getInventory()); } } diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 7eaca70f4..2230cf71c 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -189,7 +189,7 @@ commands: killall: description: Kill all mobs in a world. usage: / [mobType] [radius] - aliases: [ekillall,butcher,ebutcher] + aliases: [ekillall,butcher,ebutcher,mobkill,emobkill] kittycannon: description: Throw an exploding kitten at your opponent usage: / @@ -308,11 +308,11 @@ commands: spawner: description: Change the mob type of a spawner usage: / - aliases: [espawner] + aliases: [espawner,changems,echangems] spawnmob: description: Spawns a mob. usage: / [:data][,[:data]] [amount] [player] - aliases: [espawnmob] + aliases: [espawnmob,mob,emob] sudo: description: Make another user perform a command. usage: / -- cgit v1.2.3 From e53a480c22c3d39fbdc845b0a96b6f1a3d0458e9 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 25 Mar 2012 02:55:19 +0100 Subject: Should probably cancel this at lowest. --- Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 486235993..d6757f025 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -387,7 +387,7 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.LOWEST) public void onInventoryClickEvent(final InventoryClickEvent event) { if (event.getView().getTopInventory().getType() == InventoryType.PLAYER) -- cgit v1.2.3 From 1b2e3b19518950f6b4a72a4978259786a9787e35 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 25 Mar 2012 11:09:13 +0200 Subject: AntiCheat has different version numbers, so don't check. --- Essentials/src/com/earth2me/essentials/Essentials.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 660d4887b..b3a17de13 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -125,7 +125,8 @@ public class Essentials extends JavaPlugin implements IEssentials for (Plugin plugin : pm.getPlugins()) { if (plugin.getDescription().getName().startsWith("Essentials") - && !plugin.getDescription().getVersion().equals(this.getDescription().getVersion())) + && !plugin.getDescription().getVersion().equals(this.getDescription().getVersion()) + && !plugin.getDescription().getName().equals("EssentialsAntiCheat")) { LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName())); } -- cgit v1.2.3 From 3e6e71ca41a3b694f44c04e8910bb0de627211be Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 25 Mar 2012 11:39:19 +0200 Subject: Optimize metrics --- .../essentials/commands/Commandessentials.java | 8 +- .../com/earth2me/essentials/metrics/Metrics.java | 268 ++++++++++++++------- .../essentials/metrics/MetricsStarter.java | 11 +- 3 files changed, 192 insertions(+), 95 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java index bf1077c30..6b248f6d5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java @@ -186,8 +186,12 @@ public class Commandessentials extends EssentialsCommand try { sender.sendMessage("Essentials collects simple metrics to highlight which features to concentrate work on in the future."); - metrics.setOptOut(!metrics.isOptOut()); - sender.sendMessage("Annonmous Metrics are now: " + (metrics.isOptOut() ? "disabled" : "enabled")); + if (metrics.isOptOut()) { + metrics.enable(); + } else { + metrics.disable(); + } + sender.sendMessage("Anonymous Metrics are now: " + (metrics.isOptOut() ? "disabled" : "enabled")); } catch (IOException ex) { diff --git a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java index a5de7816c..bf4fd9388 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java +++ b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java @@ -23,27 +23,18 @@ package com.earth2me.essentials.metrics; * The views and conclusions contained in the software and documentation are those of the authors and contributors and * should not be interpreted as representing official policies, either expressed or implied, of anybody else. */ -import org.bukkit.Bukkit; -import org.bukkit.configuration.file.YamlConfiguration; -import org.bukkit.plugin.Plugin; -import org.bukkit.plugin.PluginDescriptionFile; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; +import java.io.*; import java.net.Proxy; import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.UUID; +import java.util.*; +import java.util.logging.Level; +import org.bukkit.Bukkit; +import org.bukkit.configuration.InvalidConfigurationException; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.PluginDescriptionFile; /** @@ -64,7 +55,7 @@ public class Metrics /** * The base url of the metrics domain */ - private static final String BASE_URL = "http://metrics.essentials3.net"; + private static final String BASE_URL = "http://metrics.griefcraft.com"; /** * The url used to report a server's status */ @@ -81,7 +72,7 @@ public class Metrics /** * Interval of time to ping (in minutes) */ - private final static int PING_INTERVAL = 10; + private static final int PING_INTERVAL = 10; /** * The plugin this metrics submits for */ @@ -97,7 +88,7 @@ public class Metrics /** * The plugin configuration file */ - private final YamlConfiguration configuration; + private final YamlConfiguration configuration; /** * The plugin configuration file */ @@ -106,8 +97,16 @@ public class Metrics * Unique server id */ private final String guid; + /** + * Lock for synchronization + */ + private final Object optOutLock = new Object(); + /** + * Id of the scheduled task + */ + private volatile int taskId = -1; - public Metrics(Plugin plugin) throws IOException + public Metrics(final Plugin plugin) throws IOException { if (plugin == null) { @@ -142,7 +141,7 @@ public class Metrics * @param name * @return Graph object created. Will never return NULL under normal circumstances unless bad parameters are given */ - public Graph createGraph(String name) + public Graph createGraph(final String name) { if (name == null) { @@ -150,7 +149,7 @@ public class Metrics } // Construct the graph object - Graph graph = new Graph(name); + final Graph graph = new Graph(name); // Now we can add our graph graphs.add(graph); @@ -164,7 +163,7 @@ public class Metrics * * @param plotter */ - public void addCustomData(Plotter plotter) + public void addCustomData(final Plotter plotter) { if (plotter == null) { @@ -178,86 +177,170 @@ public class Metrics graphs.add(defaultGraph); } - public boolean isOptOut() + /** + * Start measuring statistics. This will immediately create an async repeating task as the plugin and send the + * initial data to the metrics backend, and then after that it will post in increments of PING_INTERVAL * 1200 + * ticks. + */ + public void start() { - return configuration.getBoolean("opt-out", false); + synchronized (optOutLock) + { + // Did we opt out? + if (isOptOut()) + { + return; + } + + // Begin hitting the server with glorious data + taskId = plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() + { + private boolean firstPost = true; + + public void run() + { + try + { + // This has to be synchronized or it can collide with the disable method. + synchronized (optOutLock) + { + // Disable Task, if it is running and the server owner decided to opt-out + if (isOptOut() && taskId > 0) + { + plugin.getServer().getScheduler().cancelTask(taskId); + taskId = -1; + } + } + + // We use the inverse of firstPost because if it is the first time we are posting, + // it is not a interval ping, so it evaluates to FALSE + // Each time thereafter it will evaluate to TRUE, i.e PING! + postPlugin(!firstPost); + + // After the first post we set firstPost to false + // Each post thereafter will be a ping + firstPost = false; + } + catch (IOException e) + { + Bukkit.getLogger().log(Level.INFO, "[Metrics] {0}", e.getMessage()); + } + } + }, 0, PING_INTERVAL * 1200); + } } - - public void setOptOut(final boolean toggle) throws IOException + + /** + * Has the server owner denied plugin metrics? + * + * @return + */ + public boolean isOptOut() { - configuration.set("opt-out", toggle); - configuration.save(configurationFile); + synchronized (optOutLock) + { + try + { + // Reload the metrics file + configuration.load(CONFIG_FILE); + } + catch (IOException ex) + { + Bukkit.getLogger().log(Level.INFO, "[Metrics] {0}", ex.getMessage()); + return true; + } + catch (InvalidConfigurationException ex) + { + Bukkit.getLogger().log(Level.INFO, "[Metrics] {0}", ex.getMessage()); + return true; + } + return configuration.getBoolean("opt-out", false); + } } /** - * Start measuring statistics. This will immediately create an async repeating task as the plugin and send the - * initial data to the metrics backend, and then after that it will post in increments of PING_INTERVAL * 1200 - * ticks. + * Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task. + * + * @throws IOException */ - public void start() + public void enable() throws IOException { - // Did we opt out? - if (configuration.getBoolean("opt-out", false)) + // This has to be synchronized or it can collide with the check in the task. + synchronized (optOutLock) { - return; + // Check if the server owner has already set opt-out, if not, set it. + if (isOptOut()) + { + configuration.set("opt-out", false); + configuration.save(configurationFile); + } + + // Disable Task, if it is running + if (taskId < 0) + { + start(); + } } + } - // Begin hitting the server with glorious data - plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() + /** + * Disables metrics for the server by setting "opt-out" to true in the config file and canceling the metrics task. + * + * @throws IOException + */ + public void disable() throws IOException + { + // This has to be synchronized or it can collide with the check in the task. + synchronized (optOutLock) { - private boolean firstPost = true; + // Check if the server owner has already set opt-out, if not, set it. + if (!isOptOut()) + { + configuration.set("opt-out", true); + final File file = new File(CONFIG_FILE); + configuration.save(file); + } - public void run() + // Disable Task, if it is running + if (taskId >= 0) { - try - { - // We use the inverse of firstPost because if it is the first time we are posting, - // it is not a interval ping, so it evaluates to FALSE - // Each time thereafter it will evaluate to TRUE, i.e PING! - postPlugin(!firstPost); - - // After the first post we set firstPost to false - // Each post thereafter will be a ping - firstPost = false; - } - catch (IOException e) - { - System.err.println("[Metrics] " + e.getMessage()); - } + this.plugin.getServer().getScheduler().cancelTask(taskId); + taskId = -1; } - }, 0, PING_INTERVAL * 1200); + } } /** * Generic method that posts a plugin to the metrics website */ - private void postPlugin(boolean isPing) throws IOException + private void postPlugin(final boolean isPing) throws IOException { // The plugin's description file containg all of the plugin data such as name, version, author, etc - PluginDescriptionFile description = plugin.getDescription(); + final PluginDescriptionFile description = plugin.getDescription(); // Construct the post data - String data = encode("guid") + '=' + encode(guid) - + encodeDataPair("version", description.getVersion()) - + encodeDataPair("server", Bukkit.getVersion()) - + encodeDataPair("players", Integer.toString(Bukkit.getServer().getOnlinePlayers().length)) - + encodeDataPair("revision", String.valueOf(REVISION)); + final StringBuilder data = new StringBuilder(); + data.append(encode("guid")).append('=').append(encode(guid)); + encodeDataPair(data, "version", description.getVersion()); + encodeDataPair(data, "server", Bukkit.getVersion()); + encodeDataPair(data, "players", Integer.toString(Bukkit.getServer().getOnlinePlayers().length)); + encodeDataPair(data, "revision", String.valueOf(REVISION)); // If we're pinging, append it if (isPing) { - data += encodeDataPair("ping", "true"); + encodeDataPair(data, "ping", "true"); } // Acquire a lock on the graphs, which lets us make the assumption we also lock everything // inside of the graph (e.g plotters) synchronized (graphs) { - Iterator iter = graphs.iterator(); + final Iterator iter = graphs.iterator(); while (iter.hasNext()) { - Graph graph = iter.next(); + final Graph graph = iter.next(); // Because we have a lock on the graphs set already, it is reasonable to assume // that our lock transcends down to the individual plotters in the graphs also. @@ -268,20 +351,20 @@ public class Metrics // The key name to send to the metrics server // The format is C-GRAPHNAME-PLOTTERNAME where separator - is defined at the top // Legacy (R4) submitters use the format Custom%s, or CustomPLOTTERNAME - String key = String.format("C%s%s%s%s", CUSTOM_DATA_SEPARATOR, graph.getName(), CUSTOM_DATA_SEPARATOR, plotter.getColumnName()); + final String key = String.format("C%s%s%s%s", CUSTOM_DATA_SEPARATOR, graph.getName(), CUSTOM_DATA_SEPARATOR, plotter.getColumnName()); // The value to send, which for the foreseeable future is just the string // value of plotter.getValue() - String value = Integer.toString(plotter.getValue()); + final String value = Integer.toString(plotter.getValue()); // Add it to the http post data :) - data += encodeDataPair(key, value); + encodeDataPair(data, key, value); } } } // Create the url - URL url = new URL(BASE_URL + String.format(REPORT_URL, description.getName())); + final URL url = new URL(BASE_URL + String.format(REPORT_URL, description.getName())); // Connect to the website URLConnection connection; @@ -300,19 +383,19 @@ public class Metrics connection.setDoOutput(true); // Write the data - OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream()); - writer.write(data); + final OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream()); + writer.write(data.toString()); writer.flush(); // Now read the response - BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); - String response = reader.readLine(); + final BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); + final String response = reader.readLine(); // close resources writer.close(); reader.close(); - if (response.startsWith("ERR")) + if (response == null || response.startsWith("ERR")) { throw new IOException(response); //Throw the exception } @@ -323,11 +406,11 @@ public class Metrics { synchronized (graphs) { - Iterator iter = graphs.iterator(); + final Iterator iter = graphs.iterator(); while (iter.hasNext()) { - Graph graph = iter.next(); + final Graph graph = iter.next(); for (Plotter plotter : graph.getPlotters()) { @@ -362,16 +445,19 @@ public class Metrics *

Encode a key/value data pair to be used in a HTTP post request. This INCLUDES a & so the first key/value pair * MUST be included manually, e.g:

* - * String httpData = encode("guid") + '=' + encode("1234") + encodeDataPair("authors") + ".."; + * StringBuffer data = new StringBuffer(); + * data.append(encode("guid")).append('=').append(encode(guid)); + * encodeDataPair(data, "version", description.getVersion()); * * + * @param buffer * @param key * @param value * @return */ - private static String encodeDataPair(String key, String value) throws UnsupportedEncodingException + private static void encodeDataPair(final StringBuilder buffer, final String key, final String value) throws UnsupportedEncodingException { - return '&' + encode(key) + '=' + encode(value); + buffer.append('&').append(encode(key)).append('=').append(encode(value)); } /** @@ -380,7 +466,7 @@ public class Metrics * @param text * @return */ - private static String encode(String text) throws UnsupportedEncodingException + private static String encode(final String text) throws UnsupportedEncodingException { return URLEncoder.encode(text, "UTF-8"); } @@ -401,7 +487,7 @@ public class Metrics */ private final Set plotters = new LinkedHashSet(); - private Graph(String name) + private Graph(final String name) { this.name = name; } @@ -421,7 +507,7 @@ public class Metrics * * @param plotter */ - public void addPlotter(Plotter plotter) + public void addPlotter(final Plotter plotter) { plotters.add(plotter); } @@ -431,7 +517,7 @@ public class Metrics * * @param plotter */ - public void removePlotter(Plotter plotter) + public void removePlotter(final Plotter plotter) { plotters.remove(plotter); } @@ -453,14 +539,14 @@ public class Metrics } @Override - public boolean equals(Object object) + public boolean equals(final Object object) { if (!(object instanceof Graph)) { return false; } - Graph graph = (Graph)object; + final Graph graph = (Graph)object; return graph.name.equals(name); } } @@ -489,7 +575,7 @@ public class Metrics * * @param name */ - public Plotter(String name) + public Plotter(final String name) { this.name = name; } @@ -525,15 +611,15 @@ public class Metrics } @Override - public boolean equals(Object object) + public boolean equals(final Object object) { if (!(object instanceof Plotter)) { return false; } - Plotter plotter = (Plotter)object; + final Plotter plotter = (Plotter)object; return plotter.name.equals(name) && plotter.getValue() == getValue(); } } -} +} \ No newline at end of file diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java index d5f7d634a..6380b7f6c 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -17,6 +17,7 @@ public class MetricsStarter implements Runnable private enum Modules { Essentials, + EssentialsAntiCheat, EssentialsChat, EssentialsSpawn, EssentialsProtect, @@ -146,10 +147,16 @@ public class MetricsStarter implements Runnable } final Graph depGraph = metrics.createGraph("Dependencies"); - Method method = ess.getPaymentMethod().getMethod(); + final Method method = ess.getPaymentMethod().getMethod(); if (method != null) { - depGraph.addPlotter(new SimplePlotter(method.getName() + " " + method.getVersion())); + String version = method.getVersion(); + final int dashPosition = version.indexOf('-'); + if (dashPosition > 0) + { + version = version.substring(0, dashPosition); + } + depGraph.addPlotter(new SimplePlotter(method.getName() + " " + version)); } depGraph.addPlotter(new SimplePlotter(ess.getPermissionsHandler().getName())); -- cgit v1.2.3 From 0cbded9fcab30735ebccb794c640c16ac6e4f229 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 25 Mar 2012 11:44:33 +0200 Subject: This is no longer stored in file, so it's not part of UserData anymore. --- Essentials/src/com/earth2me/essentials/User.java | 11 +++++++++++ Essentials/src/com/earth2me/essentials/UserData.java | 16 ++-------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index dde0c20e2..f1e6ac67d 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -23,6 +23,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser private transient long lastActivity = System.currentTimeMillis(); private boolean hidden = false; private transient Location afkPosition = null; + private boolean invSee = false; private static final Logger logger = Logger.getLogger("Minecraft"); User(final Player base, final IEssentials ess) @@ -592,4 +593,14 @@ public class User extends UserData implements Comparable, IReplyTo, IUser { return teleportRequestTime; } + + public boolean isInvSee() + { + return invSee; + } + + public void setInvSee(boolean set) + { + invSee = set; + } } diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 11c701c34..3c8066cc9 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -188,14 +188,13 @@ public abstract class UserData extends PlayerExtension implements IConf } return false; } - private String nickname; - + public String _getNickname() { return config.getString("nickname"); } - + public String getNickname() { return nickname; @@ -406,17 +405,6 @@ public abstract class UserData extends PlayerExtension implements IConf mails.add(mail); setMails(mails); } - - private boolean invSee; - - public boolean isInvSee() { - return invSee; - } - - public void setInvSee(boolean set) { - invSee = set; - } - private boolean teleportEnabled; private boolean getTeleportEnabled() -- cgit v1.2.3 From e13a2c371d6f97397fb5fac708124b3f6403c66e Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 25 Mar 2012 11:45:50 +0200 Subject: Wrong url --- Essentials/src/com/earth2me/essentials/metrics/Metrics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java index bf4fd9388..98ca62f47 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java +++ b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java @@ -55,7 +55,7 @@ public class Metrics /** * The base url of the metrics domain */ - private static final String BASE_URL = "http://metrics.griefcraft.com"; + private static final String BASE_URL = "http://metrics.essentials3.net"; /** * The url used to report a server's status */ -- cgit v1.2.3 From 6f86b7400ae8f2ca6f236e250992227e63406def Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 25 Mar 2012 11:47:26 +0200 Subject: CopyPaste-Fail --- Essentials/src/com/earth2me/essentials/metrics/Metrics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java index 98ca62f47..e009daa5d 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java +++ b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java @@ -275,7 +275,7 @@ public class Metrics configuration.save(configurationFile); } - // Disable Task, if it is running + // Enable Task, if it is not running if (taskId < 0) { start(); -- cgit v1.2.3 From 7bd7992b241dd049bbdef162536440e4c9d69b65 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 25 Mar 2012 14:20:26 +0100 Subject: Fix chat format regex. --- Essentials/src/com/earth2me/essentials/Settings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index e194cf21b..08c3b74db 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -333,7 +333,7 @@ public class Settings implements ISettings format = format.replace("{MESSAGE}", "%2$s"); format = format.replace("{WORLDNAME}", "{1}"); format = format.replace("{SHORTWORLDNAME}", "{2}"); - format = format.replaceAll("\\{(\\D*)\\}", "\\[$1\\]"); + format = format.replaceAll("\\{(\\D*?)\\}", "\\[$1\\]"); mFormat = new MessageFormat(format); chatFormats.put(group, mFormat); } -- cgit v1.2.3 From 00033c11bce3c1a960bf0d14c81b90ab8462f64a Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 25 Mar 2012 14:26:08 +0100 Subject: Update [balance] sign to use currency formatting. --- Essentials/src/com/earth2me/essentials/signs/SignBalance.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBalance.java b/Essentials/src/com/earth2me/essentials/signs/SignBalance.java index 0b7328ba5..4949cb645 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBalance.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBalance.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.signs; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; +import com.earth2me.essentials.Util; public class SignBalance extends EssentialsSign @@ -15,7 +16,7 @@ public class SignBalance extends EssentialsSign @Override protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException { - player.sendMessage(_("balance", player.getMoney())); + player.sendMessage(_("balance", Util.displayCurrency(player.getMoney(), ess))); return true; } } -- cgit v1.2.3 From b60363b6bd916f1c209e2fbe3bdb8c0585e08c9c Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 25 Mar 2012 16:30:22 +0100 Subject: Reduce amount of move event calls being processed. --- .../src/com/earth2me/essentials/EssentialsPlayerListener.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index d6757f025..cbd4cebce 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -75,6 +75,13 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerMove(final PlayerMoveEvent event) { + if (event.getFrom().getBlockX() == event.getTo().getBlockX() + && event.getFrom().getBlockZ() == event.getTo().getBlockZ() + && event.getFrom().getBlockY() == event.getTo().getBlockY()) + { + return; + } + final User user = ess.getUser(event.getPlayer()); if (user.isAfk() && ess.getSettings().getFreezeAfkPlayers()) @@ -399,13 +406,14 @@ public class EssentialsPlayerListener implements Listener } } } + @EventHandler(priority = EventPriority.MONITOR) public void onInventoryCloseEvent(final InventoryCloseEvent event) { if (event.getView().getTopInventory().getType() == InventoryType.PLAYER) { final User user = ess.getUser(event.getPlayer()); - user.setInvSee(false); + user.setInvSee(false); } } } -- cgit v1.2.3 From 1dbb11ea552bb7f576067e4ac184fd58db40eb80 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 25 Mar 2012 16:46:36 +0100 Subject: Don't override other plugins which allow joining over capacity. --- Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index cbd4cebce..b45e1fb10 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -198,7 +198,7 @@ public class EssentialsPlayerListener implements Listener return; } - if (server.getOnlinePlayers().length >= server.getMaxPlayers() && !user.isAuthorized("essentials.joinfullserver")) + if (event.getResult() == Result.KICK_FULL && !user.isAuthorized("essentials.joinfullserver")) { event.disallow(Result.KICK_FULL, _("serverFull")); return; -- cgit v1.2.3 From d2506cd928125c44023c6e4baed2d76f661aff21 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 25 Mar 2012 17:27:06 +0100 Subject: Reorder login/join event calls. --- .../com/earth2me/essentials/EssentialsPlayerListener.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index b45e1fb10..6b6b4a034 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -126,9 +126,13 @@ public class EssentialsPlayerListener implements Listener { ess.getBackup().onPlayerJoin(); final User user = ess.getUser(event.getPlayer()); + user.setDisplayNick(); + user.setLastLogin(System.currentTimeMillis()); user.setLastLoginAddress(user.getAddress().getAddress().getHostAddress()); + user.updateActivity(false); + updateCompass(user); if (user.isAuthorized("essentials.sleepingignored")) { user.setSleepingIgnored(true); @@ -184,7 +188,10 @@ public class EssentialsPlayerListener implements Listener } User user = ess.getUser(event.getPlayer()); - user.setNPC(false); + if (user.isNPC()) + { + user.setNPC(false); + } final long currentTime = System.currentTimeMillis(); final boolean banExpired = user.checkBanTimeout(currentTime); @@ -204,9 +211,6 @@ public class EssentialsPlayerListener implements Listener return; } event.allow(); - - user.setLastLogin(System.currentTimeMillis()); - updateCompass(user); } private void updateCompass(final User user) -- cgit v1.2.3 From 47cf1289d7baa72b318ecc444102dfe234c98e75 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 25 Mar 2012 19:10:39 +0100 Subject: Don't show 'backup started' on /backup if it hasn't been configured. --- Essentials/src/com/earth2me/essentials/commands/Commandbackup.java | 7 ++++++- Essentials/src/messages.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_nl.properties | 1 + 8 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java b/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java index 32c8c9e80..9a10100c0 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java @@ -19,7 +19,12 @@ public class Commandbackup extends EssentialsCommand final Backup backup = ess.getBackup(); if (backup == null) { - throw new Exception(); + throw new Exception(_("backupDisabled")); + } + final String command = ess.getSettings().getBackupCommand(); + if (command == null || "".equals(command)) + { + throw new Exception(_("backupDisabled")); } backup.run(); sender.sendMessage(_("backupStarted")); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index ecaf691e6..7707ac09a 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -12,6 +12,7 @@ alertUsed=used: autoAfkKickReason=You have been kicked for idling more than {0} minutes. backAfterDeath=\u00a77Use the /back command to return to your death point. backUsageMsg=\u00a77Returning to previous location. +backupDisabled=An external backup script has not been configured. backupFinished=Backup finished backupStarted=Backup started balance=\u00a77Balance: {0} diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index ec50806a6..e06985430 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -12,6 +12,7 @@ alertUsed=brugte: autoAfkKickReason=Du er blevet kicked for at idle mere end {0} minutter. backAfterDeath=\u00a77Brug /back kommandoen for at teleportere til dit d\u00f8dspunkt. backUsageMsg=\u00a77Teleporterer til tidligere placering. +backupDisabled=An external backup script has not been configured. backupFinished=Backup sluttet backupStarted=Backup startet balance=\u00a77Saldo: {0} diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 7f2c91b69..4e4f7e78d 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -12,6 +12,7 @@ alertUsed=benutzt: autoAfkKickReason=Du wurdest gekickt, weil du f\u00fcr {0} Minuten inaktiv warst. backAfterDeath=\u00a77Benutze den Befehl /back um zu deinem Todespunkt zur\u00fcck zu kehren. backUsageMsg=\u00a77Kehre zur letzten Position zur\u00fcck. +backupDisabled=An external backup script has not been configured. backupFinished=Backup beendet backupStarted=Backup gestartet balance=\u00a77Geldb\u00f6rse: {0} diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index d56675209..34367f115 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -12,6 +12,7 @@ alertUsed=used: autoAfkKickReason=You have been kicked for idling more than {0} minutes. backAfterDeath=\u00a77Use the /back command to return to your death point. backUsageMsg=\u00a77Returning to previous location. +backupDisabled=An external backup script has not been configured. backupFinished=Backup finished backupStarted=Backup started balance=\u00a77Balance: {0} diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 3d32bf2d1..ad1aefe6c 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -12,6 +12,7 @@ alertUsed=usado: autoAfkKickReason=Has sido echado por ausentarte mas de {0} minutos. backAfterDeath=\u00a77Usa el comando /back para volver al punto en el que moriste. backUsageMsg=\u00a77Volviendo a la localizacion anterior. +backupDisabled=An external backup script has not been configured. backupFinished=Copia de seguridad completada backupStarted=Comenzando copia de seguridad balance=\u00a77Cantidad: {0} diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index e4e370b90..0c4b94efc 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -12,6 +12,7 @@ alertUsed=a utilis\u00e9 : autoAfkKickReason=Vous avez \u00e9t\u00e9 \u00e9ject\u00e9 pour inactivit\u00e9e sup\u00e9rieure \u00e0 {0} minutes. backAfterDeath=\u00a77Utilisez la commande /back pour retourner \u00e0 l''endroit ou vous \u00eates mort. backUsageMsg=\u00a77Retour \u00e0 votre emplacement pr\u00e9c\u00c3\u00a8dent. +backupDisabled=An external backup script has not been configured. backupFinished=Sauvegarde termin\u00e9 backupStarted=D\u00e9but de la sauvegarde... balance=\u00a77Solde : {0} diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 8d3a4cbd7..d0f56752b 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -12,6 +12,7 @@ alertUsed=gebruikt: autoAfkKickReason=You have been kicked for idling more than {0} minutes. backAfterDeath=\u00a77Gebruik het /back command om terug te keren naar je sterfplaats. backUsageMsg=\u00a77Naar de vorige locatie aan het gaan. +backupDisabled=An external backup script has not been configured. backupFinished=Backup voltooid backupStarted=Backup gestart balance=\u00a77Saldo: {0} -- cgit v1.2.3 From 2cc96e995b2040baa56ba3b6bf58c5766b588708 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 25 Mar 2012 23:31:02 +0100 Subject: Update tp to check if target player has tptoggle disabled. Update tpo to allow player to player tp. --- .../earth2me/essentials/commands/Commandtp.java | 8 ++++ .../earth2me/essentials/commands/Commandtpo.java | 50 ++++++++++++++-------- Essentials/src/plugin.yml | 2 +- 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java index 22d4778d3..d6d6b76f9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java @@ -49,6 +49,14 @@ public class Commandtp extends EssentialsCommand user.sendMessage(_("teleporting")); final User target = getPlayer(server, args, 0); final User toPlayer = getPlayer(server, args, 1); + if (!target.isTeleportEnabled()) + { + throw new Exception(_("teleportDisabled", target.getDisplayName())); + } + if (!toPlayer.isTeleportEnabled()) + { + throw new Exception(_("teleportDisabled", toPlayer.getDisplayName())); + } if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName())) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java index e30aee127..53204114e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java @@ -16,33 +16,49 @@ public class Commandtpo extends EssentialsCommand @Override public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - if (args.length < 1) + switch (args.length) { + case 0: throw new NotEnoughArgumentsException(); - } - //Just basically the old tp command - final User player = getPlayer(server, args, 0, true); - // Check if user is offline - if (!player.isOnline()) - { - throw new NoSuchFieldException(_("playerNotFound")); - } - - // Verify permission - if (!player.isHidden() || user.isAuthorized("essentials.teleport.hidden")) - { + case 1: + final User player = getPlayer(server, args, 0, true); + if (!player.isOnline() || (player.isHidden() && !user.isAuthorized("essentials.teleport.hidden"))) + { + throw new NoSuchFieldException(_("playerNotFound")); + } if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + player.getWorld().getName())) { throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); } + user.sendMessage(_("teleporting")); user.getTeleport().now(player, false, TeleportCause.COMMAND); + + default: + if (!user.isAuthorized("essentials.tp.others")) + { + throw new Exception(_("noPerm", "essentials.tp.others")); + } user.sendMessage(_("teleporting")); - } - else - { - throw new NoSuchFieldException(_("playerNotFound")); + final User target = getPlayer(server, args, 0, true); + final User toPlayer = getPlayer(server, args, 1, true); + + if (!target.isOnline() || !toPlayer.isOnline() + || ((target.isHidden() || toPlayer.isHidden()) && !user.isAuthorized("essentials.teleport.hidden"))) + { + throw new NoSuchFieldException(_("playerNotFound")); + } + + if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName())); + } + + target.getTeleport().now(toPlayer, false, TeleportCause.COMMAND); + target.sendMessage(_("teleportAtoB", user.getDisplayName(), toPlayer.getDisplayName())); + break; } } } diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 2230cf71c..022143b3f 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -375,7 +375,7 @@ commands: aliases: [s,etphere] tpo: description: Teleport override for tptoggle. - usage: / + usage: / [otherplayer] aliases: [etpo] tpohere: description: Teleport here override for tptoggle. -- cgit v1.2.3 From e30d9002891113200c2b8e0bfdc19cf5e4402925 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 26 Mar 2012 00:39:39 +0100 Subject: Clarify how backup works. Add option for auto save-all. --- Essentials/src/com/earth2me/essentials/Backup.java | 6 ++++++ Essentials/src/com/earth2me/essentials/commands/Commandbackup.java | 2 +- Essentials/src/config.yml | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Backup.java b/Essentials/src/com/earth2me/essentials/Backup.java index ada36c9d7..baa90e561 100644 --- a/Essentials/src/com/earth2me/essentials/Backup.java +++ b/Essentials/src/com/earth2me/essentials/Backup.java @@ -61,6 +61,12 @@ public class Backup implements Runnable { return; } + if ("save-all".equalsIgnoreCase(command)) { + final CommandSender cs = server.getConsoleSender(); + server.dispatchCommand(cs, "save-all"); + active = false; + return; + } LOGGER.log(Level.INFO, _("backupStarted")); final CommandSender cs = server.getConsoleSender(); server.dispatchCommand(cs, "save-all"); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java b/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java index 9a10100c0..38644c680 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java @@ -22,7 +22,7 @@ public class Commandbackup extends EssentialsCommand throw new Exception(_("backupDisabled")); } final String command = ess.getSettings().getBackupCommand(); - if (command == null || "".equals(command)) + if (command == null || "".equals(command) || "save-all".equalsIgnoreCase(command)) { throw new Exception(_("backupDisabled")); } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index a1e099271..133557030 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -217,8 +217,9 @@ enabledSigns: # Backup runs a command while saving is disabled backup: # Interval in minutes - interval: 60 - # Add a command that backups your data, e.g. + interval: 30 + # Unless you add a valid backup command or script here, this feature will be useless. + # Use 'save-all' to simply force regular world saving without backup. #command: 'rdiff-backup World1 backups/World1' # Set this true to enable permission per warp. -- cgit v1.2.3 From 5d45495371bf976907e6f9bb1934eddf3f3f5d3c Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 26 Mar 2012 13:28:32 +0100 Subject: Fix kit enchants for people without oversized stack permission. Add permissions lookup to debug mode. --- Essentials/src/com/earth2me/essentials/Kit.java | 5 ++- Essentials/src/com/earth2me/essentials/User.java | 4 +++ .../craftbukkit/InventoryWorkaround.java | 38 +++++++++++----------- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index 9f7bb5a5d..36a2e60b0 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -2,7 +2,6 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; import static com.earth2me.essentials.I18n.capitalCase; -import com.earth2me.essentials.commands.Commandenchant; import com.earth2me.essentials.commands.NoChargeException; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import java.util.*; @@ -104,7 +103,7 @@ public class Kit { continue; } - final Enchantment enchantment = Commandenchant.getEnchantment(split[0], user); + final Enchantment enchantment = Enchantments.getByName(split[0]); int level; if (split.length > 1) { @@ -125,7 +124,7 @@ public class Kit } else { - overfilled = InventoryWorkaround.addItem(user.getInventory(), true, new ItemStack(id, amount, data)); + overfilled = InventoryWorkaround.addItem(user.getInventory(), true, 0, stack); } for (ItemStack itemStack : overfilled.values()) { diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index f1e6ac67d..cfa6a4a4a 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -57,6 +57,10 @@ public class User extends UserData implements Comparable, IReplyTo, IUser @Override public boolean isAuthorized(final String node) { + if (ess.getSettings().isDebug()) + { + ess.getLogger().log(Level.INFO, "checking if " + base.getName() + " has " + node); + } if (base instanceof OfflinePlayer) { return false; diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/InventoryWorkaround.java b/Essentials/src/com/earth2me/essentials/craftbukkit/InventoryWorkaround.java index a6d5d4fbc..fc9cbb74b 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/InventoryWorkaround.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/InventoryWorkaround.java @@ -15,12 +15,12 @@ public final class InventoryWorkaround { } - public static int first(final Inventory inventory, final ItemStack item, final boolean forceDurability, final boolean forceAmount, final boolean forceEnchantments) + public static int first(final Inventory inventory, final ItemStack item, final boolean enforceDurability, final boolean enforceAmount, final boolean enforceEnchantments) { - return next(inventory, item, 0, forceDurability, forceAmount, forceEnchantments); + return next(inventory, item, 0, enforceDurability, enforceAmount, enforceEnchantments); } - public static int next(final Inventory cinventory, final ItemStack item, final int start, final boolean forceDurability, final boolean forceAmount, final boolean forceEnchantments) + public static int next(final Inventory cinventory, final ItemStack item, final int start, final boolean enforceDurability, final boolean enforceAmount, final boolean enforceEnchantments) { final ItemStack[] inventory = cinventory.getContents(); for (int i = start; i < inventory.length; i++) @@ -30,7 +30,7 @@ public final class InventoryWorkaround { continue; } - if (item.getTypeId() == cItem.getTypeId() && (!forceAmount || item.getAmount() == cItem.getAmount()) && (!forceDurability || cItem.getDurability() == item.getDurability()) && (!forceEnchantments || cItem.getEnchantments().equals(item.getEnchantments()))) + if (item.getTypeId() == cItem.getTypeId() && (!enforceAmount || item.getAmount() == cItem.getAmount()) && (!enforceDurability || cItem.getDurability() == item.getDurability()) && (!enforceEnchantments || cItem.getEnchantments().equals(item.getEnchantments()))) { return i; } @@ -38,12 +38,12 @@ public final class InventoryWorkaround return -1; } - public static int firstPartial(final Inventory cinventory, final ItemStack item, final boolean forceDurability) + public static int firstPartial(final Inventory cinventory, final ItemStack item, final boolean enforceDurability) { - return firstPartial(cinventory, item, forceDurability, item.getType().getMaxStackSize()); + return firstPartial(cinventory, item, enforceDurability, item.getType().getMaxStackSize()); } - public static int firstPartial(final Inventory cinventory, final ItemStack item, final boolean forceDurability, final int maxAmount) + public static int firstPartial(final Inventory cinventory, final ItemStack item, final boolean enforceDurability, final int maxAmount) { if (item == null) { @@ -57,7 +57,7 @@ public final class InventoryWorkaround { continue; } - if (item.getTypeId() == cItem.getTypeId() && cItem.getAmount() < maxAmount && (!forceDurability || cItem.getDurability() == item.getDurability()) && cItem.getEnchantments().equals(item.getEnchantments())) + if (item.getTypeId() == cItem.getTypeId() && cItem.getAmount() < maxAmount && (!enforceDurability || cItem.getDurability() == item.getDurability()) && cItem.getEnchantments().equals(item.getEnchantments())) { return i; } @@ -65,12 +65,12 @@ public final class InventoryWorkaround return -1; } - public static boolean addAllItems(final Inventory cinventory, final boolean forceDurability, final ItemStack... items) + public static boolean addAllItems(final Inventory cinventory, final boolean enforceDurability, final ItemStack... items) { final Inventory fake = new FakeInventory(cinventory.getContents()); - if (addItem(fake, forceDurability, items).isEmpty()) + if (addItem(fake, enforceDurability, items).isEmpty()) { - addItem(cinventory, forceDurability, items); + addItem(cinventory, enforceDurability, items); return true; } else @@ -84,7 +84,7 @@ public final class InventoryWorkaround return addItem(cinventory, forceDurability, 0, items); } - public static Map addItem(final Inventory cinventory, final boolean forceDurability, final int oversizedStacks, final ItemStack... items) + public static Map addItem(final Inventory cinventory, final boolean enforceDurability, final int oversizedStacks, final ItemStack... items) { final Map leftover = new HashMap(); @@ -109,7 +109,7 @@ public final class InventoryWorkaround combined[j] = items[i].clone(); break; } - if (combined[j].getTypeId() == items[i].getTypeId() && (!forceDurability || combined[j].getDurability() == items[i].getDurability()) && combined[j].getEnchantments().equals(items[i].getEnchantments())) + if (combined[j].getTypeId() == items[i].getTypeId() && (!enforceDurability || combined[j].getDurability() == items[i].getDurability()) && combined[j].getEnchantments().equals(items[i].getEnchantments())) { combined[j].setAmount(combined[j].getAmount() + items[i].getAmount()); break; @@ -130,7 +130,7 @@ public final class InventoryWorkaround { // Do we already have a stack of it? final int maxAmount = oversizedStacks > item.getType().getMaxStackSize() ? oversizedStacks : item.getType().getMaxStackSize(); - final int firstPartial = firstPartial(cinventory, item, forceDurability, maxAmount); + final int firstPartial = firstPartial(cinventory, item, enforceDurability, maxAmount); // Drat! no partial stack if (firstPartial == -1) @@ -186,7 +186,7 @@ public final class InventoryWorkaround return leftover; } - public static Map removeItem(final Inventory cinventory, final boolean forceDurability, final boolean forceEnchantments, final ItemStack... items) + public static Map removeItem(final Inventory cinventory, final boolean enforceDurability, final boolean enforceEnchantments, final ItemStack... items) { final Map leftover = new HashMap(); @@ -211,7 +211,7 @@ public final class InventoryWorkaround } // get first Item, ignore the amount - final int first = first(cinventory, item, forceDurability, false, forceEnchantments); + final int first = first(cinventory, item, enforceDurability, false, enforceEnchantments); // Drat! we don't have this type in the inventory if (first == -1) @@ -244,7 +244,7 @@ public final class InventoryWorkaround return leftover; } - public static boolean containsItem(final Inventory cinventory, final boolean forceDurability, final boolean forceEnchantments, final ItemStack... items) + public static boolean containsItem(final Inventory cinventory, final boolean enforceDurability, final boolean enforceEnchantments, final ItemStack... items) { final Map leftover = new HashMap(); @@ -266,7 +266,7 @@ public final class InventoryWorkaround combined[j] = items[i].clone(); break; } - if (combined[j].getTypeId() == items[i].getTypeId() && (!forceDurability || combined[j].getDurability() == items[i].getDurability()) && (!forceEnchantments || combined[j].getEnchantments().equals(items[i].getEnchantments()))) + if (combined[j].getTypeId() == items[i].getTypeId() && (!enforceDurability || combined[j].getDurability() == items[i].getDurability()) && (!enforceEnchantments || combined[j].getEnchantments().equals(items[i].getEnchantments()))) { combined[j].setAmount(combined[j].getAmount() + items[i].getAmount()); break; @@ -292,7 +292,7 @@ public final class InventoryWorkaround break; } - final int slot = next(cinventory, item, position, forceDurability, false, forceEnchantments); + final int slot = next(cinventory, item, position, enforceDurability, false, enforceEnchantments); // Drat! we don't have this type in the inventory if (slot == -1) -- cgit v1.2.3 From 97eed50ccca4455b667cb42043860055f0dfc089 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 27 Mar 2012 15:28:40 +0100 Subject: Adding world permission checks to: tpaall tpall tpahere tphere tpohere User is required to have the permission for the world he is in, before he can teleport users outside this world, to it. --- Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java | 5 +++++ .../src/com/earth2me/essentials/commands/Commandtpaccept.java | 6 ++++-- Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java | 5 +++++ Essentials/src/com/earth2me/essentials/commands/Commandtpall.java | 5 +++++ Essentials/src/com/earth2me/essentials/commands/Commandtphere.java | 5 +++++ Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java | 6 ++++++ 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java index c0abdc1ad..7af445c51 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaall.java @@ -45,6 +45,11 @@ public class Commandtpaall extends EssentialsCommand { continue; } + if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + user.getWorld().getName())) + { + continue; + } try { player.requestTeleport(user, true); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index 7f06602ae..9203f9015 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java @@ -25,12 +25,14 @@ public class Commandtpaccept extends EssentialsCommand throw new Exception(_("noPendingRequest")); } - if (user.isTpRequestHere() && !target.isAuthorized("essentials.tpahere")) + if (user.isTpRequestHere() && ((!target.isAuthorized("essentials.tpahere") && !target.isAuthorized("essentials.tpaall")) + || (user.getWorld() != target.getWorld() && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + user.getWorld().getName())))) { throw new Exception(_("noPendingRequest")); } - if (!user.isTpRequestHere() && ((!target.isAuthorized("essentials.tpa") && !target.isAuthorized("essentials.tpaall")) + if (!user.isTpRequestHere() && (!target.isAuthorized("essentials.tpa") || (user.getWorld() != target.getWorld() && ess.getSettings().isWorldTeleportPermissions() && !user.isAuthorized("essentials.world." + target.getWorld().getName())))) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java index 376c2be44..9d389ecac 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java @@ -25,6 +25,11 @@ public class Commandtpahere extends EssentialsCommand { throw new Exception(_("teleportDisabled", player.getDisplayName())); } + if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + user.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName())); + } player.requestTeleport(user, true); player.sendMessage(_("teleportHereRequest", user.getDisplayName())); player.sendMessage(_("typeTpaccept")); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java index f21f1a6bc..6335a4a54 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java @@ -42,6 +42,11 @@ public class Commandtpall extends EssentialsCommand { continue; } + if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + user.getWorld().getName())) + { + continue; + } try { player.getTeleport().now(user, false, TeleportCause.COMMAND); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java index 733091d1a..92eb87226 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java @@ -22,6 +22,11 @@ public class Commandtphere extends EssentialsCommand { throw new Exception(_("teleportDisabled", player.getDisplayName())); } + if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + user.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName())); + } player.getTeleport().teleport(user, new Trade(this.getName(), ess), TeleportCause.COMMAND); user.sendMessage(_("teleporting")); player.sendMessage(_("teleporting")); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java index 6183bcf74..880c4e362 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpohere.java @@ -30,6 +30,12 @@ public class Commandtpohere extends EssentialsCommand throw new NoSuchFieldException(_("playerNotFound")); } + if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + user.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName())); + } + // Verify permission if (!player.isHidden() || user.isAuthorized("essentials.teleport.hidden")) { -- cgit v1.2.3 From b14e7c197fb6e11ed26703314308db99ca241208 Mon Sep 17 00:00:00 2001 From: snowleo Date: Tue, 27 Mar 2012 21:14:38 +0200 Subject: Adds pvp protection after teleport --- .../essentials/EssentialsEntityListener.java | 3 +++ .../essentials/EssentialsPlayerListener.java | 5 ++--- .../com/earth2me/essentials/EssentialsTimer.java | 1 + .../src/com/earth2me/essentials/ISettings.java | 2 ++ .../src/com/earth2me/essentials/Settings.java | 8 ++++++- Essentials/src/com/earth2me/essentials/User.java | 26 +++++++++++++++++++++- Essentials/src/config.yml | 4 ++++ 7 files changed, 44 insertions(+), 5 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index 524edc16f..029288530 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -32,6 +32,9 @@ public class EssentialsEntityListener implements Listener { final User defender = ess.getUser(eDefend); final User attacker = ess.getUser(eAttack); + if (attacker.hasInvulnerabilityAfterTeleport() || defender.hasInvulnerabilityAfterTeleport()) { + event.setCancelled(true); + } attacker.updateActivity(true); final List commandList = attacker.getPowertool(attacker.getItemInHand()); if (commandList != null && !commandList.isEmpty()) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 6b6b4a034..97ced232d 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -229,14 +229,13 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerTeleport(final PlayerTeleportEvent event) { - + final User user = ess.getUser(event.getPlayer()); //There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports. if ((event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND) && ess.getSettings().registerBackInListener()) { - final User user = ess.getUser(event.getPlayer()); user.setLastLocation(); } - + user.enableInvulnerabilityAfterTeleport(); } @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsTimer.java b/Essentials/src/com/earth2me/essentials/EssentialsTimer.java index 0c413bfc8..18f980a62 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsTimer.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsTimer.java @@ -48,6 +48,7 @@ public class EssentialsTimer implements Runnable } user.checkMuteTimeout(currentTime); user.checkJailTimeout(currentTime); + user.resetInvulnerabilityAfterTeleport(); } } } diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index 1ef8feaa9..74942640e 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -169,4 +169,6 @@ public interface ISettings extends IConf boolean isMetricsEnabled(); void setMetricsEnabled(boolean metricsEnabled); + + public long getTeleportInvulnerability(); } diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 08c3b74db..9dee4e990 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -609,7 +609,7 @@ public class Settings implements ISettings { return config.getBoolean("change-displayname", true); } - + @Override public boolean changePlayerListName() { @@ -745,4 +745,10 @@ public class Settings implements ISettings { this.metricsEnabled = metricsEnabled; } + + @Override + public long getTeleportInvulnerability() + { + return config.getLong("teleport-invulnerability", 0) * 1000; + } } diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index cfa6a4a4a..f931b07d9 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -603,8 +603,32 @@ public class User extends UserData implements Comparable, IReplyTo, IUser return invSee; } - public void setInvSee(boolean set) + public void setInvSee(final boolean set) { invSee = set; } + private transient long teleportInvulnerabilityTimestamp = 0; + + public void enableInvulnerabilityAfterTeleport() + { + final long time = ess.getSettings().getTeleportInvulnerability(); + if (time > 0) + { + teleportInvulnerabilityTimestamp = System.currentTimeMillis() + time; + } + } + + public void resetInvulnerabilityAfterTeleport() + { + if (teleportInvulnerabilityTimestamp != 0 + && teleportInvulnerabilityTimestamp < System.currentTimeMillis()) + { + teleportInvulnerabilityTimestamp = 0; + } + } + + public boolean hasInvulnerabilityAfterTeleport() + { + return teleportInvulnerabilityTimestamp != 0 && teleportInvulnerabilityTimestamp >= System.currentTimeMillis(); + } } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 133557030..ec1f3fc8d 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -50,6 +50,10 @@ teleport-cooldown: 0 # The delay, in seconds, before a user actually teleports. If the user moves or gets attacked in this timeframe, the teleport never occurs. teleport-delay: 0 +# The delay, in seconds, a player can't be attacked by other players after he has been teleported by a command +# This will also prevent that the player can attack other players +teleport-invulnerability: 0 + # The delay, in seconds, required between /heal attempts heal-cooldown: 60 -- cgit v1.2.3 From a7df8a1a0ac858bd943a9987b33783dddda4ba4c Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 27 Mar 2012 21:08:06 +0100 Subject: Try to reduce lag caused by join spam. --- .../src/com/earth2me/essentials/EssentialsPlayerListener.java | 1 - Essentials/src/com/earth2me/essentials/UserData.java | 11 ++++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 97ced232d..eb21aea39 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -129,7 +129,6 @@ public class EssentialsPlayerListener implements Listener user.setDisplayNick(); user.setLastLogin(System.currentTimeMillis()); - user.setLastLoginAddress(user.getAddress().getAddress().getHostAddress()); user.updateActivity(false); updateCompass(user); diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 3c8066cc9..abf338470 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -621,10 +621,16 @@ public abstract class UserData extends PlayerExtension implements IConf return lastLogin; } - public void setLastLogin(long time) + private void _setLastLogin(long time) { lastLogin = time; config.setProperty("timestamps.login", time); + } + + public void setLastLogin(long time) + { + _setLastLogin(time); + _setLastLoginAddress(base.getAddress().getAddress().getHostAddress()); config.save(); } private long lastLogout; @@ -657,11 +663,10 @@ public abstract class UserData extends PlayerExtension implements IConf return lastLoginAddress; } - public void setLastLoginAddress(String address) + private void _setLastLoginAddress(String address) { lastLoginAddress = address; config.setProperty("ipAddress", address); - config.save(); } private boolean afk; -- cgit v1.2.3 From 5b626614048a7aed902b3ea3a3834c54447cbd27 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 28 Mar 2012 00:59:51 +0100 Subject: Pull example perm files out of the ess jar. --- Essentials/src/examples/bpermissions.yml | 119 -------------------- Essentials/src/examples/permissionsbukkit.yml | 132 ----------------------- Essentials/src/examples/permissionsex.yml | 149 -------------------------- examples/bpermissions.yml | 119 ++++++++++++++++++++ examples/permissionsbukkit.yml | 132 +++++++++++++++++++++++ examples/permissionsex.yml | 149 ++++++++++++++++++++++++++ 6 files changed, 400 insertions(+), 400 deletions(-) delete mode 100644 Essentials/src/examples/bpermissions.yml delete mode 100644 Essentials/src/examples/permissionsbukkit.yml delete mode 100644 Essentials/src/examples/permissionsex.yml create mode 100644 examples/bpermissions.yml create mode 100644 examples/permissionsbukkit.yml create mode 100644 examples/permissionsex.yml diff --git a/Essentials/src/examples/bpermissions.yml b/Essentials/src/examples/bpermissions.yml deleted file mode 100644 index 6b7900c4f..000000000 --- a/Essentials/src/examples/bpermissions.yml +++ /dev/null @@ -1,119 +0,0 @@ -default: Default -groups: - Default: - - essentials.spawn - - essentials.rules - - essentials.motd - - essentials.list - - essentials.helpop - - essentials.help - Builder: - - essentials.build - - essentials.afk - - essentials.back - - essentials.back.ondeath - - essentials.balance - - essentials.balance.others - - essentials.balancetop - - essentials.chat.color - - essentials.chat.shout - - essentials.chat.question - - essentials.compass - - essentials.depth - - essentials.home - - essentials.ignore - - essentials.kit - - essentials.kit.tools - - essentials.mail - - essentials.mail.send - - essentials.me - - essentials.msg - - essentials.nick - - essentials.pay - - essentials.ping - - essentials.powertool - - essentials.protect - - essentials.sethome - - essentials.signs.use.* - - essentials.signs.create.disposal - - essentials.signs.create.mail - - essentials.signs.create.protection - - essentials.signs.create.trade - - essentials.signs.break.disposal - - essentials.signs.break.mail - - essentials.signs.break.protection - - essentials.signs.break.trade - - essentials.suicide - - essentials.time - - essentials.tpa - - essentials.tpaccept - - essentials.tpahere - - essentials.tpdeny - - essentials.warp - - essentials.warp.list - - essentials.worth - Moderator: - - essentials.build - - essentials.ban - - essentials.ban.notify - - essentials.banip - - essentials.broadcast - - essentials.clearinventory - - essentials.delwarp - - essentials.eco.loan - - essentials.ext - - essentials.getpos - - essentials.helpop.recieve - - essentials.home.others - - essentials.invsee - - essentials.jails - - essentials.jump - - essentials.kick - - essentials.kick.notify - - essentials.kill - - essentials.mute - - essentials.nick.others - - essentials.realname - - essentials.setwarp - - essentials.signs.create.* - - essentials.signs.break.* - - essentials.spawner - - essentials.thunder - - essentials.time - - essentials.time.set - - essentials.protect.alerts - - essentials.protect.admin - - essentials.protect.ownerinfo - - essentials.ptime - - essentials.ptime.others - - essentials.togglejail - - essentials.top - - essentials.tp - - essentials.tphere - - essentials.tppos - - essentials.tptoggle - - essentials.unban - - essentials.unbanip - - essentials.weather - - essentials.whois - - essentials.world - Admin: - # Since we use essentials.* permission here, we can still disable commands like this - # This can be done with any pemission nodes - - ^essentials.backup - - ^essentials.essentials - - ^essentials.setspawn - - ^essentials.reloadall - - essentials.* - Owner: - - essentials.* -players: - notch: - - Default - snowleo: - - Admin - - Moderator - - Builder - - Default - KHobbits: - - Owner diff --git a/Essentials/src/examples/permissionsbukkit.yml b/Essentials/src/examples/permissionsbukkit.yml deleted file mode 100644 index 515256ef1..000000000 --- a/Essentials/src/examples/permissionsbukkit.yml +++ /dev/null @@ -1,132 +0,0 @@ -users: - snowleo: - groups: - - Admin -groups: - Default: - permissions: - permissions.build: false - essentials.spawn: true - essentials.rules: true - essentials.motd: true - essentials.list: true - essentials.helpop: true - essentials.help: true - Builder: - permissions: - permissions.build: true - essentials.afk: true - essentials.back: true - essentials.back.ondeath: true - essentials.balance: true - essentials.balance.others: true - essentials.balancetop: true - essentials.chat.color: true - essentials.chat.shout: true - essentials.chat.question: true - essentials.compass: true - essentials.depth: true - essentials.home: true - essentials.ignore: true - essentials.kit: true - essentials.kit.tools: true - essentials.mail: true - essentials.mail.send: true - essentials.me: true - essentials.msg: true - essentials.nick: true - essentials.pay: true - essentials.ping: true - essentials.powertool: true - essentials.protect: true - essentials.sethome: true - essentials.signs.use.*: true - essentials.signs.create.disposal: true - essentials.signs.create.mail: true - essentials.signs.create.protection: true - essentials.signs.create.trade: true - essentials.signs.break.disposal: true - essentials.signs.break.mail: true - essentials.signs.break.protection: true - essentials.signs.break.trade: true - essentials.suicide: true - essentials.time: true - essentials.tpa: true - essentials.tpaccept: true - essentials.tpahere: true - essentials.tpdeny: true - essentials.warp: true - essentials.warp.list: true - essentials.worth: true - inheritance: - - Default - Moderator: - permissions: - essentials.ban: true - essentials.ban.notify: true - essentials.banip: true - essentials.broadcast: true - essentials.clearinventory: true - essentials.delwarp: true - essentials.eco.loan: true - essentials.ext: true - essentials.getpos: true - essentials.helpop.recieve: true - essentials.home.others: true - essentials.invsee: true - essentials.jails: true - essentials.jump: true - essentials.kick: true - essentials.kick.notify: true - essentials.kill: true - essentials.mute: true - essentials.nick.others: true - essentials.realname: true - essentials.setwarp: true - essentials.signs.create.*: true - essentials.signs.break.*: true - essentials.spawner: true - essentials.thunder: true - essentials.time: true - essentials.time.set: true - essentials.protect.alerts: true - essentials.protect.admin: true - essentials.protect.ownerinfo: true - essentials.ptime: true - essentials.ptime.others: true - essentials.togglejail: true - essentials.top: true - essentials.tp: true - essentials.tphere: true - essentials.tppos: true - essentials.tptoggle: true - essentials.unban: true - essentials.unbanip: true - essentials.weather: true - essentials.whois: true - essentials.world: true - inheritance: - - Builder - Admin: - permissions: - permissions.*: true - # Since we use essentials.* permission here, we can still disable commands like this - # This is only available for essentials permissions - -essentials.backup: true - -essentials.essentials: true - -essentials.setspawn: true - -essentials.reloadall: true - essentials.*: true - inheritance: - - Moderator - Owner: - permissions: - # Double negation - -essentials.backup: false - -essentials.essentials: false - -essentials.setspawn: false - -essentials.reloadall: false - inheritance: - - Admin -messages: - build: '&cYou do not have permission to build here.' diff --git a/Essentials/src/examples/permissionsex.yml b/Essentials/src/examples/permissionsex.yml deleted file mode 100644 index 3dc6354fb..000000000 --- a/Essentials/src/examples/permissionsex.yml +++ /dev/null @@ -1,149 +0,0 @@ -groups: - Default: - default: true - permissions: - - essentials.spawn - - essentials.rules - - essentials.motd - - essentials.list - - essentials.helpop - - essentials.help - - modifyworld.* - prefix: '&e' - options: - build: false - rank: '1000' - Builder: - permissions: - - essentials.afk - - essentials.back - - essentials.back.ondeath - - essentials.balance - - essentials.balance.others - - essentials.balancetop - - essentials.chat.color - - essentials.chat.shout - - essentials.chat.question - - essentials.compass - - essentials.depth - - essentials.home - - essentials.ignore - - essentials.kit - - essentials.kit.tools - - essentials.mail - - essentials.mail.send - - essentials.me - - essentials.msg - - essentials.nick - - essentials.pay - - essentials.ping - - essentials.powertool - - essentials.protect - - essentials.sethome - - essentials.signs.use.* - - essentials.signs.create.disposal - - essentials.signs.create.mail - - essentials.signs.create.protection - - essentials.signs.create.trade - - essentials.signs.break.disposal - - essentials.signs.break.mail - - essentials.signs.break.protection - - essentials.signs.break.trade - - essentials.suicide - - essentials.time - - essentials.tpa - - essentials.tpaccept - - essentials.tpahere - - essentials.tpdeny - - essentials.warp - - essentials.warp.list - - essentials.worth - inheritance: - - default - prefix: '&2' - options: - build: true - rank: '500' - Moderator: - permissions: - - essentials.ban - - essentials.ban.notify - - essentials.banip - - essentials.broadcast - - essentials.clearinventory - - essentials.delwarp - - essentials.eco.loan - - essentials.ext - - essentials.getpos - - essentials.helpop.recieve - - essentials.home.others - - essentials.invsee - - essentials.jails - - essentials.jump - - essentials.kick - - essentials.kick.notify - - essentials.kill - - essentials.mute - - essentials.nick.others - - essentials.realname - - essentials.setwarp - - essentials.signs.create.* - - essentials.signs.break.* - - essentials.spawner - - essentials.thunder - - essentials.time - - essentials.time.set - - essentials.protect.alerts - - essentials.protect.admin - - essentials.protect.ownerinfo - - essentials.ptime - - essentials.ptime.others - - essentials.togglejail - - essentials.top - - essentials.tp - - essentials.tphere - - essentials.tppos - - essentials.tptoggle - - essentials.unban - - essentials.unbanip - - essentials.weather - - essentials.whois - - essentials.world - - permissions.user.promote.default - - permissions.user.demote.default - - permissions.manage.membership - inheritance: - - builder - prefix: '&5' - options: - build: true - rank: '200' - Admin: - permissions: - - -essentials.backup - - -essentials.essentials - - -essentials.setspawn - - -essentials.reloadall - - essentials.* - - permissions.manage.users - - permissions.manage.users.permissions - - permissions.manage.users.permissions.timed - inheritance: - - moderator - prefix: '&c' - options: - build: true - rank: '100' - Owner: - permissions: - - '*' - inheritance: - - admin - prefix: '&4' - options: - build: true - rank: '0' -users: - snowleo: - group: - - Builder diff --git a/examples/bpermissions.yml b/examples/bpermissions.yml new file mode 100644 index 000000000..6b7900c4f --- /dev/null +++ b/examples/bpermissions.yml @@ -0,0 +1,119 @@ +default: Default +groups: + Default: + - essentials.spawn + - essentials.rules + - essentials.motd + - essentials.list + - essentials.helpop + - essentials.help + Builder: + - essentials.build + - essentials.afk + - essentials.back + - essentials.back.ondeath + - essentials.balance + - essentials.balance.others + - essentials.balancetop + - essentials.chat.color + - essentials.chat.shout + - essentials.chat.question + - essentials.compass + - essentials.depth + - essentials.home + - essentials.ignore + - essentials.kit + - essentials.kit.tools + - essentials.mail + - essentials.mail.send + - essentials.me + - essentials.msg + - essentials.nick + - essentials.pay + - essentials.ping + - essentials.powertool + - essentials.protect + - essentials.sethome + - essentials.signs.use.* + - essentials.signs.create.disposal + - essentials.signs.create.mail + - essentials.signs.create.protection + - essentials.signs.create.trade + - essentials.signs.break.disposal + - essentials.signs.break.mail + - essentials.signs.break.protection + - essentials.signs.break.trade + - essentials.suicide + - essentials.time + - essentials.tpa + - essentials.tpaccept + - essentials.tpahere + - essentials.tpdeny + - essentials.warp + - essentials.warp.list + - essentials.worth + Moderator: + - essentials.build + - essentials.ban + - essentials.ban.notify + - essentials.banip + - essentials.broadcast + - essentials.clearinventory + - essentials.delwarp + - essentials.eco.loan + - essentials.ext + - essentials.getpos + - essentials.helpop.recieve + - essentials.home.others + - essentials.invsee + - essentials.jails + - essentials.jump + - essentials.kick + - essentials.kick.notify + - essentials.kill + - essentials.mute + - essentials.nick.others + - essentials.realname + - essentials.setwarp + - essentials.signs.create.* + - essentials.signs.break.* + - essentials.spawner + - essentials.thunder + - essentials.time + - essentials.time.set + - essentials.protect.alerts + - essentials.protect.admin + - essentials.protect.ownerinfo + - essentials.ptime + - essentials.ptime.others + - essentials.togglejail + - essentials.top + - essentials.tp + - essentials.tphere + - essentials.tppos + - essentials.tptoggle + - essentials.unban + - essentials.unbanip + - essentials.weather + - essentials.whois + - essentials.world + Admin: + # Since we use essentials.* permission here, we can still disable commands like this + # This can be done with any pemission nodes + - ^essentials.backup + - ^essentials.essentials + - ^essentials.setspawn + - ^essentials.reloadall + - essentials.* + Owner: + - essentials.* +players: + notch: + - Default + snowleo: + - Admin + - Moderator + - Builder + - Default + KHobbits: + - Owner diff --git a/examples/permissionsbukkit.yml b/examples/permissionsbukkit.yml new file mode 100644 index 000000000..515256ef1 --- /dev/null +++ b/examples/permissionsbukkit.yml @@ -0,0 +1,132 @@ +users: + snowleo: + groups: + - Admin +groups: + Default: + permissions: + permissions.build: false + essentials.spawn: true + essentials.rules: true + essentials.motd: true + essentials.list: true + essentials.helpop: true + essentials.help: true + Builder: + permissions: + permissions.build: true + essentials.afk: true + essentials.back: true + essentials.back.ondeath: true + essentials.balance: true + essentials.balance.others: true + essentials.balancetop: true + essentials.chat.color: true + essentials.chat.shout: true + essentials.chat.question: true + essentials.compass: true + essentials.depth: true + essentials.home: true + essentials.ignore: true + essentials.kit: true + essentials.kit.tools: true + essentials.mail: true + essentials.mail.send: true + essentials.me: true + essentials.msg: true + essentials.nick: true + essentials.pay: true + essentials.ping: true + essentials.powertool: true + essentials.protect: true + essentials.sethome: true + essentials.signs.use.*: true + essentials.signs.create.disposal: true + essentials.signs.create.mail: true + essentials.signs.create.protection: true + essentials.signs.create.trade: true + essentials.signs.break.disposal: true + essentials.signs.break.mail: true + essentials.signs.break.protection: true + essentials.signs.break.trade: true + essentials.suicide: true + essentials.time: true + essentials.tpa: true + essentials.tpaccept: true + essentials.tpahere: true + essentials.tpdeny: true + essentials.warp: true + essentials.warp.list: true + essentials.worth: true + inheritance: + - Default + Moderator: + permissions: + essentials.ban: true + essentials.ban.notify: true + essentials.banip: true + essentials.broadcast: true + essentials.clearinventory: true + essentials.delwarp: true + essentials.eco.loan: true + essentials.ext: true + essentials.getpos: true + essentials.helpop.recieve: true + essentials.home.others: true + essentials.invsee: true + essentials.jails: true + essentials.jump: true + essentials.kick: true + essentials.kick.notify: true + essentials.kill: true + essentials.mute: true + essentials.nick.others: true + essentials.realname: true + essentials.setwarp: true + essentials.signs.create.*: true + essentials.signs.break.*: true + essentials.spawner: true + essentials.thunder: true + essentials.time: true + essentials.time.set: true + essentials.protect.alerts: true + essentials.protect.admin: true + essentials.protect.ownerinfo: true + essentials.ptime: true + essentials.ptime.others: true + essentials.togglejail: true + essentials.top: true + essentials.tp: true + essentials.tphere: true + essentials.tppos: true + essentials.tptoggle: true + essentials.unban: true + essentials.unbanip: true + essentials.weather: true + essentials.whois: true + essentials.world: true + inheritance: + - Builder + Admin: + permissions: + permissions.*: true + # Since we use essentials.* permission here, we can still disable commands like this + # This is only available for essentials permissions + -essentials.backup: true + -essentials.essentials: true + -essentials.setspawn: true + -essentials.reloadall: true + essentials.*: true + inheritance: + - Moderator + Owner: + permissions: + # Double negation + -essentials.backup: false + -essentials.essentials: false + -essentials.setspawn: false + -essentials.reloadall: false + inheritance: + - Admin +messages: + build: '&cYou do not have permission to build here.' diff --git a/examples/permissionsex.yml b/examples/permissionsex.yml new file mode 100644 index 000000000..3dc6354fb --- /dev/null +++ b/examples/permissionsex.yml @@ -0,0 +1,149 @@ +groups: + Default: + default: true + permissions: + - essentials.spawn + - essentials.rules + - essentials.motd + - essentials.list + - essentials.helpop + - essentials.help + - modifyworld.* + prefix: '&e' + options: + build: false + rank: '1000' + Builder: + permissions: + - essentials.afk + - essentials.back + - essentials.back.ondeath + - essentials.balance + - essentials.balance.others + - essentials.balancetop + - essentials.chat.color + - essentials.chat.shout + - essentials.chat.question + - essentials.compass + - essentials.depth + - essentials.home + - essentials.ignore + - essentials.kit + - essentials.kit.tools + - essentials.mail + - essentials.mail.send + - essentials.me + - essentials.msg + - essentials.nick + - essentials.pay + - essentials.ping + - essentials.powertool + - essentials.protect + - essentials.sethome + - essentials.signs.use.* + - essentials.signs.create.disposal + - essentials.signs.create.mail + - essentials.signs.create.protection + - essentials.signs.create.trade + - essentials.signs.break.disposal + - essentials.signs.break.mail + - essentials.signs.break.protection + - essentials.signs.break.trade + - essentials.suicide + - essentials.time + - essentials.tpa + - essentials.tpaccept + - essentials.tpahere + - essentials.tpdeny + - essentials.warp + - essentials.warp.list + - essentials.worth + inheritance: + - default + prefix: '&2' + options: + build: true + rank: '500' + Moderator: + permissions: + - essentials.ban + - essentials.ban.notify + - essentials.banip + - essentials.broadcast + - essentials.clearinventory + - essentials.delwarp + - essentials.eco.loan + - essentials.ext + - essentials.getpos + - essentials.helpop.recieve + - essentials.home.others + - essentials.invsee + - essentials.jails + - essentials.jump + - essentials.kick + - essentials.kick.notify + - essentials.kill + - essentials.mute + - essentials.nick.others + - essentials.realname + - essentials.setwarp + - essentials.signs.create.* + - essentials.signs.break.* + - essentials.spawner + - essentials.thunder + - essentials.time + - essentials.time.set + - essentials.protect.alerts + - essentials.protect.admin + - essentials.protect.ownerinfo + - essentials.ptime + - essentials.ptime.others + - essentials.togglejail + - essentials.top + - essentials.tp + - essentials.tphere + - essentials.tppos + - essentials.tptoggle + - essentials.unban + - essentials.unbanip + - essentials.weather + - essentials.whois + - essentials.world + - permissions.user.promote.default + - permissions.user.demote.default + - permissions.manage.membership + inheritance: + - builder + prefix: '&5' + options: + build: true + rank: '200' + Admin: + permissions: + - -essentials.backup + - -essentials.essentials + - -essentials.setspawn + - -essentials.reloadall + - essentials.* + - permissions.manage.users + - permissions.manage.users.permissions + - permissions.manage.users.permissions.timed + inheritance: + - moderator + prefix: '&c' + options: + build: true + rank: '100' + Owner: + permissions: + - '*' + inheritance: + - admin + prefix: '&4' + options: + build: true + rank: '0' +users: + snowleo: + group: + - Builder -- cgit v1.2.3 From 32c689e0f5a275d37df941d8e9e24caa62ef5890 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 28 Mar 2012 10:36:10 +0200 Subject: Fix isAffordableFor in Trade class This fixes buy signs giving out items, when the player has essentials.eco.loan permission, but min-money in config is set to 0. --- Essentials/src/com/earth2me/essentials/Trade.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java index fbdc471bd..502d3e34d 100644 --- a/Essentials/src/com/earth2me/essentials/Trade.java +++ b/Essentials/src/com/earth2me/essentials/Trade.java @@ -56,11 +56,9 @@ public class Trade public void isAffordableFor(final IUser user) throws ChargeException { - final double mon = user.getMoney(); if (getMoney() != null - && mon < getMoney() && getMoney() > 0 - && !user.isAuthorized("essentials.eco.loan")) + && user.canAfford(getMoney())) { throw new ChargeException(_("notEnoughMoney")); } @@ -71,12 +69,10 @@ public class Trade throw new ChargeException(_("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " "))); } + double money; if (command != null && !command.isEmpty() - && !user.isAuthorized("essentials.nocommandcost.all") - && !user.isAuthorized("essentials.nocommandcost." + command) - && mon < ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command) - && 0 < ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command) - && !user.isAuthorized("essentials.eco.loan")) + && 0 < (money = getCommandCost(user)) + && user.canAfford(money)) { throw new ChargeException(_("notEnoughMoney")); } -- cgit v1.2.3 From 71d874484037b73e8eed93194d1f0a966bb389e1 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 28 Mar 2012 11:21:31 +0200 Subject: Fix for the fix --- Essentials/src/com/earth2me/essentials/Trade.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java index 502d3e34d..730037d9a 100644 --- a/Essentials/src/com/earth2me/essentials/Trade.java +++ b/Essentials/src/com/earth2me/essentials/Trade.java @@ -58,7 +58,7 @@ public class Trade { if (getMoney() != null && getMoney() > 0 - && user.canAfford(getMoney())) + && !user.canAfford(getMoney())) { throw new ChargeException(_("notEnoughMoney")); } @@ -72,7 +72,7 @@ public class Trade double money; if (command != null && !command.isEmpty() && 0 < (money = getCommandCost(user)) - && user.canAfford(money)) + && !user.canAfford(money)) { throw new ChargeException(_("notEnoughMoney")); } -- cgit v1.2.3 From 9d545dcbf1fb95b6c2185de6f40e72708bdc53cd Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 28 Mar 2012 14:54:48 +0100 Subject: Don't register jail listeners, if no jails are set. --- Essentials/src/com/earth2me/essentials/Jails.java | 21 ++++++++++++++++++++- .../storage/AsyncStorageObjectHolder.java | 8 +++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Jails.java b/Essentials/src/com/earth2me/essentials/Jails.java index 65f486f42..00c9d8999 100644 --- a/Essentials/src/com/earth2me/essentials/Jails.java +++ b/Essentials/src/com/earth2me/essentials/Jails.java @@ -26,16 +26,17 @@ import org.bukkit.plugin.PluginManager; public class Jails extends AsyncStorageObjectHolder implements IJails { private static final transient Logger LOGGER = Bukkit.getLogger(); + private static transient boolean enabled = false; public Jails(final IEssentials ess) { super(ess, com.earth2me.essentials.settings.Jails.class); reloadConfig(); - registerListeners(); } private void registerListeners() { + enabled = true; final PluginManager pluginManager = ess.getServer().getPluginManager(); final JailBlockListener blockListener = new JailBlockListener(); final JailPlayerListener playerListener = new JailPlayerListener(); @@ -49,6 +50,24 @@ public class Jails extends AsyncStorageObjectHolder 0) + { + registerListeners(); + } + } + + @Override + public void finishWrite() + { + if (enabled == false) + { + registerListeners(); + } + } + @Override public Location getJail(final String jailName) throws Exception { diff --git a/Essentials/src/com/earth2me/essentials/storage/AsyncStorageObjectHolder.java b/Essentials/src/com/earth2me/essentials/storage/AsyncStorageObjectHolder.java index 31c61a63f..b651dd40b 100644 --- a/Essentials/src/com/earth2me/essentials/storage/AsyncStorageObjectHolder.java +++ b/Essentials/src/com/earth2me/essentials/storage/AsyncStorageObjectHolder.java @@ -79,7 +79,11 @@ public abstract class AsyncStorageObjectHolder implemen { new StorageObjectDataReader(); } - + + public abstract void finishRead(); + + public abstract void finishWrite(); + public abstract File getStorageFile(); @@ -101,6 +105,7 @@ public abstract class AsyncStorageObjectHolder implemen public void onFinish() { unlock(); + finishWrite(); } } @@ -126,6 +131,7 @@ public abstract class AsyncStorageObjectHolder implemen data = object; } rwl.writeLock().unlock(); + finishRead(); } @Override -- cgit v1.2.3 From c45d38ca69cdae44686add9c17bc13f9eaaf25b6 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 28 Mar 2012 15:12:25 +0100 Subject: Implement all abstract methods. --- Essentials/src/com/earth2me/essentials/user/User.java | 10 ++++++++++ .../src/com/earth2me/essentials/spawn/SpawnStorage.java | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/user/User.java b/Essentials/src/com/earth2me/essentials/user/User.java index 0e77dd6a9..589e26737 100644 --- a/Essentials/src/com/earth2me/essentials/user/User.java +++ b/Essentials/src/com/earth2me/essentials/user/User.java @@ -36,6 +36,16 @@ public class User extends UserBase implements IUser user.acquireWriteLock(); user.getData().setMoney(10 + money); } + + @Override + public void finishRead() + { + } + + @Override + public void finishWrite() + { + } @Override public long getLastTeleportTimestamp() diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/SpawnStorage.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/SpawnStorage.java index 088ee9052..9075d0b69 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/SpawnStorage.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/SpawnStorage.java @@ -25,6 +25,16 @@ public class SpawnStorage extends AsyncStorageObjectHolder implements IE { return new File(ess.getDataFolder(), "spawn.yml"); } + + @Override + public void finishRead() + { + } + + @Override + public void finishWrite() + { + } public void setSpawn(final Location loc, final String group) { -- cgit v1.2.3 From 10f82a6723b63973d6d2d3ed53aa6473a37d0f3e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 29 Mar 2012 00:13:56 +0100 Subject: Fix using /setworth --- Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java index 734d9244d..91a1dd657 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetworth.java @@ -17,7 +17,7 @@ public class Commandsetworth extends EssentialsCommand @Override public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - if (args.length < 2) + if (args.length < 1) { throw new NotEnoughArgumentsException(); } -- cgit v1.2.3 From d7139cb16cc4d3a85ee9290bb6c8e328edeebcb3 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 29 Mar 2012 02:00:51 +0100 Subject: Update to CB #2126 B #1425 Min CB version changed to 2122 --- .../src/com/earth2me/essentials/Essentials.java | 2 +- .../earth2me/essentials/commands/Commandbreak.java | 5 +++-- lib/bukkit.jar | Bin 4715585 -> 4715521 bytes lib/craftbukkit.jar | Bin 11095968 -> 11093197 bytes 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index b3a17de13..c3dac9b50 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -66,7 +66,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 2105; + public static final int BUKKIT_VERSION = 2122; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java index 406230401..242fa9b53 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java @@ -35,8 +35,9 @@ public class Commandbreak extends EssentialsCommand { throw new Exception(_("noBreakBedrock")); } - final List list = (List)block.getDrops(); - final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase(), list); + //final List list = (List)block.getDrops(); + //final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase(), list); + final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase()); server.getPluginManager().callEvent(event); if (event.isCancelled()) { diff --git a/lib/bukkit.jar b/lib/bukkit.jar index 60ba2177d..912400ba3 100644 Binary files a/lib/bukkit.jar and b/lib/bukkit.jar differ diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar index 44b22101d..815d0a929 100644 Binary files a/lib/craftbukkit.jar and b/lib/craftbukkit.jar differ -- cgit v1.2.3 From c09ada201c7652d2881f23e523f21fe9372ceb7c Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 29 Mar 2012 03:06:52 +0100 Subject: Interact event cleanup --- .../earth2me/essentials/EssentialsPlayerListener.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index eb21aea39..36adf37e2 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -19,7 +19,6 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.block.Action; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.event.inventory.InventoryType; @@ -228,6 +227,7 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerTeleport(final PlayerTeleportEvent event) { + //TODO: Don't fetch user unless one of these features are enabled. final User user = ess.getUser(event.getPlayer()); //There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports. if ((event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND) && ess.getSettings().registerBackInListener()) @@ -318,19 +318,16 @@ public class EssentialsPlayerListener implements Listener { return; } - if (ess.getSettings().getUpdateBedAtDaytime() && event.getClickedBlock().getType() == Material.BED_BLOCK) + if (event.getClickedBlock().getType() == Material.BED_BLOCK && ess.getSettings().getUpdateBedAtDaytime()) { event.getPlayer().setBedSpawnLocation(event.getClickedBlock().getLocation()); } break; - case LEFT_CLICK_AIR: case LEFT_CLICK_BLOCK: - if (user.hasPowerTools() && user.arePowerToolsEnabled()) + case LEFT_CLICK_AIR: + if (user.hasPowerTools() && user.arePowerToolsEnabled() && usePowertools(user, event.getItem())) { - if (usePowertools(user)) - { - event.setCancelled(true); - } + event.setCancelled(true); } break; default: @@ -338,9 +335,8 @@ public class EssentialsPlayerListener implements Listener } } - private boolean usePowertools(final User user) + private boolean usePowertools(final User user, final ItemStack is) { - final ItemStack is = user.getItemInHand(); int id; if (is == null || (id = is.getTypeId()) == 0) { -- cgit v1.2.3