summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--BuildAll/nbproject/build-impl.xml28
-rw-r--r--BuildAll/nbproject/genfiles.properties6
-rw-r--r--BuildAll/nbproject/project.properties12
-rw-r--r--BuildAll/nbproject/project.xml16
-rw-r--r--Essentials/nbproject/project.properties4
-rw-r--r--Essentials/src/com/earth2me/essentials/Charge.java104
-rw-r--r--Essentials/src/com/earth2me/essentials/ChargeException.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/ConfigPermissionsHandler.java45
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java123
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java254
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsDependancyChecker.java68
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java48
-rw-r--r--Essentials/src/com/earth2me/essentials/IEssentials.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/IPermissionsHandler.java21
-rw-r--r--Essentials/src/com/earth2me/essentials/IUser.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/InventoryWorkaround.java178
-rw-r--r--Essentials/src/com/earth2me/essentials/Mob.java17
-rw-r--r--Essentials/src/com/earth2me/essentials/OfflinePlayer.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/Permissions2Handler.java48
-rw-r--r--Essentials/src/com/earth2me/essentials/Permissions3Handler.java48
-rw-r--r--Essentials/src/com/earth2me/essentials/PlayerExtension.java27
-rw-r--r--Essentials/src/com/earth2me/essentials/Settings.java220
-rw-r--r--Essentials/src/com/earth2me/essentials/TNTExplodeListener.java82
-rw-r--r--Essentials/src/com/earth2me/essentials/TargetBlock.java1105
-rw-r--r--Essentials/src/com/earth2me/essentials/Teleport.java28
-rw-r--r--Essentials/src/com/earth2me/essentials/Trade.java123
-rw-r--r--Essentials/src/com/earth2me/essentials/User.java12
-rw-r--r--Essentials/src/com/earth2me/essentials/UserData.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandantioch.java14
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandback.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandban.java22
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandessentials.java98
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandfireball.java24
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhome.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandjump.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkit.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandnuke.java58
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandspawner.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java31
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtop.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtp.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpall.java7
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtphere.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtppos.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandwarp.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandworld.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java314
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignBalance.java21
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignBuy.java34
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignDisposal.java24
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignException.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignFree.java36
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignHeal.java34
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignMail.java32
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignSell.java34
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignTime.java57
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignTrade.java220
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignWarp.java69
-rw-r--r--Essentials/src/config.yml6
-rw-r--r--Essentials/src/items.csv6
-rw-r--r--Essentials/src/messages.properties473
-rw-r--r--Essentials/src/messages_da.properties477
-rw-r--r--Essentials/src/messages_de.properties473
-rw-r--r--Essentials/src/messages_en.properties473
-rw-r--r--Essentials/src/messages_fr.properties533
-rw-r--r--Essentials/src/messages_nl.properties312
-rw-r--r--Essentials/src/plugin.yml8
-rw-r--r--Essentials/test/com/earth2me/essentials/EconomyTest.java95
-rw-r--r--EssentialsChat/nbproject/project.properties8
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java23
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java116
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java124
-rw-r--r--EssentialsGeoIP/nbproject/project.properties9
-rw-r--r--EssentialsPermissionsCommands/build.xml74
-rw-r--r--EssentialsPermissionsCommands/manifest.mf3
-rw-r--r--EssentialsPermissionsCommands/nbproject/build-impl.xml1080
-rw-r--r--EssentialsPermissionsCommands/nbproject/genfiles.properties8
-rw-r--r--EssentialsPermissionsCommands/nbproject/project.properties79
-rw-r--r--EssentialsPermissionsCommands/nbproject/project.xml28
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangadd.java30
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddi.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddp.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangcheckp.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdel.java30
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdeli.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdelp.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanglistp.java30
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanload.java30
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java32
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddp.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddsub.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanucheckp.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudel.java30
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelp.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelsub.java31
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanulistp.java30
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/EssentialsPermissionsCommands.java45
-rw-r--r--EssentialsPermissionsCommands/src/plugin.yml166
-rw-r--r--EssentialsProtect/build.xml20
-rw-r--r--EssentialsProtect/nbproject/project.properties174
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java200
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java272
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectData.java533
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java245
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java67
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectRegions.java5
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectServerListener.java34
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectSqlProperties.java12
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java38
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/IProtect.java21
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java111
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/IProtectedBlock.java14
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/OwnedBlock.java18
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java421
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java248
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMySQL.java140
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockSQLite.java96
-rw-r--r--EssentialsSpawn/nbproject/project.properties5
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java4
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java1
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java31
-rw-r--r--EssentialsXMPP/build.xml83
-rw-r--r--EssentialsXMPP/manifest.mf3
-rw-r--r--EssentialsXMPP/nbproject/build-impl.xml1080
-rw-r--r--EssentialsXMPP/nbproject/genfiles.properties8
-rw-r--r--EssentialsXMPP/nbproject/project.properties81
-rw-r--r--EssentialsXMPP/nbproject/project.xml28
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java27
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmpp.java39
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmppspy.java46
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java122
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java56
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/IEssentialsXMPP.java26
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java91
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java293
-rw-r--r--EssentialsXMPP/src/config.yml17
-rw-r--r--EssentialsXMPP/src/plugin.yml20
-rw-r--r--README.markdown16
-rwxr-xr-xlib/Permissions3.jarbin0 -> 72897 bytes
-rw-r--r--lib/smack-3.2.0.jarbin0 -> 306803 bytes
-rw-r--r--settings.zipbin0 -> 19795 bytes
145 files changed, 10052 insertions, 3703 deletions
diff --git a/.gitignore b/.gitignore
index 9035e9eae..2170d897b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,4 +22,7 @@
/EssentialsXMPP/dist/
/EssentialsXMPP/build/
/EssentialsProtect/dist/
-/EssentialsProtect/build/ \ No newline at end of file
+/EssentialsProtect/build/
+/EssentialsPermissionsCommands/nbproject/private/
+/EssentialsPermissionsCommands/build/
+/EssentialsPermissionsCommands/dist/ \ No newline at end of file
diff --git a/BuildAll/nbproject/build-impl.xml b/BuildAll/nbproject/build-impl.xml
index 2d4272990..4d03d5c8d 100644
--- a/BuildAll/nbproject/build-impl.xml
+++ b/BuildAll/nbproject/build-impl.xml
@@ -638,6 +638,13 @@ is divided into following sections:
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-jar.properties}"/>
+ <param location="${project.EssentialsPermissionsCommands}" name="call.subproject"/>
+ <param location="${project.EssentialsPermissionsCommands}/build.xml" name="call.script"/>
+ <param name="call.target" value="jar"/>
+ <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
+ </antcall>
+ <antcall target="-maybe-call-dep">
+ <param name="call.built.properties" value="${built-jar.properties}"/>
<param location="${project.EssentialsProtect}" name="call.subproject"/>
<param location="${project.EssentialsProtect}/build.xml" name="call.script"/>
<param name="call.target" value="jar"/>
@@ -650,6 +657,13 @@ is divided into following sections:
<param name="call.target" value="jar"/>
<param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
</antcall>
+ <antcall target="-maybe-call-dep">
+ <param name="call.built.properties" value="${built-jar.properties}"/>
+ <param location="${project.EssentialsXMPP}" name="call.subproject"/>
+ <param location="${project.EssentialsXMPP}/build.xml" name="call.script"/>
+ <param name="call.target" value="jar"/>
+ <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
+ </antcall>
</target>
<target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
<target depends="init" name="-check-automatic-build">
@@ -1123,6 +1137,13 @@ is divided into following sections:
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-clean.properties}"/>
+ <param location="${project.EssentialsPermissionsCommands}" name="call.subproject"/>
+ <param location="${project.EssentialsPermissionsCommands}/build.xml" name="call.script"/>
+ <param name="call.target" value="clean"/>
+ <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
+ </antcall>
+ <antcall target="-maybe-call-dep">
+ <param name="call.built.properties" value="${built-clean.properties}"/>
<param location="${project.EssentialsProtect}" name="call.subproject"/>
<param location="${project.EssentialsProtect}/build.xml" name="call.script"/>
<param name="call.target" value="clean"/>
@@ -1135,6 +1156,13 @@ is divided into following sections:
<param name="call.target" value="clean"/>
<param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
</antcall>
+ <antcall target="-maybe-call-dep">
+ <param name="call.built.properties" value="${built-clean.properties}"/>
+ <param location="${project.EssentialsXMPP}" name="call.subproject"/>
+ <param location="${project.EssentialsXMPP}/build.xml" name="call.script"/>
+ <param name="call.target" value="clean"/>
+ <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
+ </antcall>
</target>
<target depends="init" name="-do-clean">
<delete dir="${build.dir}"/>
diff --git a/BuildAll/nbproject/genfiles.properties b/BuildAll/nbproject/genfiles.properties
index b2e08c5de..cd7a3420b 100644
--- a/BuildAll/nbproject/genfiles.properties
+++ b/BuildAll/nbproject/genfiles.properties
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=c4188209
+build.xml.data.CRC32=2bd2dd75
build.xml.script.CRC32=7a797370
build.xml.stylesheet.CRC32=28e38971@1.43.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=c4188209
-nbproject/build-impl.xml.script.CRC32=73a4865f
+nbproject/build-impl.xml.data.CRC32=2bd2dd75
+nbproject/build-impl.xml.script.CRC32=769e541b
nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
diff --git a/BuildAll/nbproject/project.properties b/BuildAll/nbproject/project.properties
index ca7ee69ad..fa00f6f0c 100644
--- a/BuildAll/nbproject/project.properties
+++ b/BuildAll/nbproject/project.properties
@@ -31,11 +31,13 @@ jar.compress=false
javac.classpath=\
${reference.Essentials.jar}:\
${reference.EssentialsChat.jar}:\
- ${reference.EssentialsGroupBridge.jar}:\
- ${reference.EssentialsGroupManager.jar}:\
${reference.EssentialsProtect.jar}:\
+ ${reference.EssentialsPermissionsCommands.jar}:\
${reference.EssentialsSpawn.jar}:\
- ${reference.EssentialsGeoIP.jar}
+ ${reference.EssentialsGeoIP.jar}:\
+ ${reference.EssentialsXMPP.jar}:\
+ ${reference.EssentialsGroupBridge.jar}:\
+ ${reference.EssentialsGroupManager.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
@@ -69,15 +71,19 @@ project.EssentialsChat=../EssentialsChat
project.EssentialsGeoIP=../EssentialsGeoIP
project.EssentialsGroupBridge=../EssentialsGroupBridge
project.EssentialsGroupManager=../EssentialsGroupManager
+project.EssentialsPermissionsCommands=../EssentialsPermissionsCommands
project.EssentialsProtect=../EssentialsProtect
project.EssentialsSpawn=../EssentialsSpawn
+project.EssentialsXMPP=../EssentialsXMPP
reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
reference.EssentialsChat.jar=${project.EssentialsChat}/dist/EssentialsChat.jar
reference.EssentialsGeoIP.jar=${project.EssentialsGeoIP}/dist/EssentialsGeoIP.jar
reference.EssentialsGroupBridge.jar=${project.EssentialsGroupBridge}/dist/EssentialsGroupBridge.jar
reference.EssentialsGroupManager.jar=${project.EssentialsGroupManager}/dist/EssentialsGroupManager.jar
+reference.EssentialsPermissionsCommands.jar=${project.EssentialsPermissionsCommands}/dist/EssentialsPermissionsCommands.jar
reference.EssentialsProtect.jar=${project.EssentialsProtect}/dist/EssentialsProtect.jar
reference.EssentialsSpawn.jar=${project.EssentialsSpawn}/dist/EssentialsSpawn.jar
+reference.EssentialsXMPP.jar=${project.EssentialsXMPP}/dist/EssentialsXMPP.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
diff --git a/BuildAll/nbproject/project.xml b/BuildAll/nbproject/project.xml
index e00554632..cda8261b6 100644
--- a/BuildAll/nbproject/project.xml
+++ b/BuildAll/nbproject/project.xml
@@ -56,6 +56,14 @@
<id>jar</id>
</reference>
<reference>
+ <foreign-project>EssentialsPermissionsCommands</foreign-project>
+ <artifact-type>jar</artifact-type>
+ <script>build.xml</script>
+ <target>jar</target>
+ <clean-target>clean</clean-target>
+ <id>jar</id>
+ </reference>
+ <reference>
<foreign-project>EssentialsProtect</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
@@ -71,6 +79,14 @@
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
+ <reference>
+ <foreign-project>EssentialsXMPP</foreign-project>
+ <artifact-type>jar</artifact-type>
+ <script>build.xml</script>
+ <target>jar</target>
+ <clean-target>clean</clean-target>
+ <id>jar</id>
+ </reference>
</references>
</configuration>
</project>
diff --git a/Essentials/nbproject/project.properties b/Essentials/nbproject/project.properties
index 0f92879ab..850d0d4d8 100644
--- a/Essentials/nbproject/project.properties
+++ b/Essentials/nbproject/project.properties
@@ -31,11 +31,11 @@ file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHO
file.reference.iCo4.jar=../lib/iCo4.jar
file.reference.iCo5.jar=../lib/iCo5.jar
file.reference.junit-4.5.jar=..\\lib\\junit_4\\junit-4.5.jar
-file.reference.Permissions.jar=..\\lib\\Permissions.jar
+file.reference.Permissions3.jar=../lib/Permissions3.jar
includes=**
jar.compress=false
javac.classpath=\
- ${file.reference.Permissions.jar}:\
+ ${file.reference.Permissions3.jar}:\
${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\
${file.reference.BOSEconomy.jar}:\
${file.reference.iCo4.jar}:\
diff --git a/Essentials/src/com/earth2me/essentials/Charge.java b/Essentials/src/com/earth2me/essentials/Charge.java
deleted file mode 100644
index 5098b3b1f..000000000
--- a/Essentials/src/com/earth2me/essentials/Charge.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.earth2me.essentials;
-
-import org.bukkit.inventory.ItemStack;
-
-
-public class Charge
-{
- private final String command;
- private final Double costs;
- private final ItemStack items;
- private final IEssentials ess;
-
- public Charge(String command, IEssentials ess)
- {
- this(command, null, null, ess);
- }
-
- public Charge(double money, IEssentials ess)
- {
- this(null, money, null, ess);
- }
-
- public Charge(ItemStack items, IEssentials ess)
- {
- this(null, null, items, ess);
- }
-
- private Charge(String command, Double money, ItemStack item, IEssentials ess)
- {
- this.command = command;
- this.costs = money;
- this.items = item;
- this.ess = ess;
- }
-
- public void isAffordableFor(IUser user) throws Exception
- {
- double mon = user.getMoney();
- if (costs != null)
- {
- if (mon < costs && !user.isAuthorized("essentials.eco.loan"))
- {
- throw new Exception(Util.i18n("notEnoughMoney"));
- }
- }
- if (items != null)
- {
- if (!InventoryWorkaround.containsItem(user.getInventory(), true, items))
- {
- throw new Exception(Util.format("missingItems", items.getAmount(), items.getType().toString().toLowerCase().replace("_", " ")));
- }
- }
- if (command != null && !command.isEmpty())
- {
- if (user.isAuthorized("essentials.nocommandcost.all")
- || user.isAuthorized("essentials.nocommandcost." + command))
- {
- return;
- }
- double cost = ess.getSettings().getCommandCost(command.startsWith("/") ? command.substring(1) : command);
- if (mon < cost && !user.isAuthorized("essentials.eco.loan"))
- {
- throw new Exception(Util.i18n("notEnoughMoney"));
- }
- }
- }
-
- public void charge(IUser user) throws Exception
- {
- double mon = user.getMoney();
- if (costs != null)
- {
- if (mon < costs && !user.isAuthorized("essentials.eco.loan"))
- {
- throw new Exception(Util.i18n("notEnoughMoney"));
- }
- user.takeMoney(costs);
- }
- if (items != null)
- {
- if (!InventoryWorkaround.containsItem(user.getInventory(), true, items))
- {
- throw new Exception(Util.format("missingItems", items.getAmount(), items.getType().toString().toLowerCase().replace("_", " ")));
- }
- InventoryWorkaround.removeItem(user.getInventory(), true, items);
- user.updateInventory();
- }
- if (command != null && !command.isEmpty())
- {
- if (user.isAuthorized("essentials.nocommandcost.all")
- || user.isAuthorized("essentials.nocommandcost." + command))
- {
- return;
- }
-
- double cost = ess.getSettings().getCommandCost(command.startsWith("/") ? command.substring(1) : command);
- if (mon < cost && !user.isAuthorized("essentials.eco.loan"))
- {
- throw new Exception(Util.i18n("notEnoughMoney"));
- }
- user.takeMoney(cost);
- }
- }
-}
diff --git a/Essentials/src/com/earth2me/essentials/ChargeException.java b/Essentials/src/com/earth2me/essentials/ChargeException.java
new file mode 100644
index 000000000..2fa4c7289
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/ChargeException.java
@@ -0,0 +1,15 @@
+package com.earth2me.essentials;
+
+
+public class ChargeException extends Exception
+{
+ public ChargeException(final String message)
+ {
+ super(message);
+ }
+
+ public ChargeException(final String message, final Throwable throwable)
+ {
+ super(message, throwable);
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/ConfigPermissionsHandler.java b/Essentials/src/com/earth2me/essentials/ConfigPermissionsHandler.java
new file mode 100644
index 000000000..9e3b24b0d
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/ConfigPermissionsHandler.java
@@ -0,0 +1,45 @@
+package com.earth2me.essentials;
+
+import org.bukkit.entity.Player;
+
+
+public class ConfigPermissionsHandler implements IPermissionsHandler
+{
+ private final transient IEssentials ess;
+
+ public ConfigPermissionsHandler(final IEssentials ess)
+ {
+ this.ess = ess;
+ }
+
+ public String getGroup(final Player base)
+ {
+ return "default";
+ }
+
+ public boolean canBuild(final Player base, final String group)
+ {
+ return true;
+ }
+
+ public boolean inGroup(final Player base, final String group)
+ {
+ return false;
+ }
+
+ public boolean hasPermission(final Player base, final String node)
+ {
+ final String[] cmds = node.split("\\.", 2);
+ return !ess.getSettings().isCommandRestricted(cmds[cmds.length - 1]);
+ }
+
+ public String getPrefix(final Player base)
+ {
+ return "";
+ }
+
+ public String getSuffix(final Player base)
+ {
+ return "";
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index ae886aab7..c89de0012 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -30,7 +30,7 @@ import com.earth2me.essentials.register.payment.Methods;
import java.math.BigInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.bukkit.craftbukkit.entity.CraftPlayer;
+import org.bukkit.command.PluginCommand;
import org.bukkit.craftbukkit.scheduler.CraftScheduler;
import org.bukkit.entity.Player;
import org.bukkit.event.Event.Priority;
@@ -43,13 +43,11 @@ import org.bukkit.plugin.java.*;
public class Essentials extends JavaPlugin implements IEssentials
{
public static final String AUTHORS = "Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology";
- public static final int minBukkitBuildVersion = 860;
+ public static final int minBukkitBuildVersion = 867;
private static final Logger logger = Logger.getLogger("Minecraft");
private Settings settings;
- private EssentialsPlayerListener playerListener;
- private EssentialsBlockListener blockListener;
- private EssentialsEntityListener entityListener;
- private JailPlayerListener jailPlayerListener;
+ private TNTExplodeListener tntListener;
+ private EssentialsDependancyChecker essDep;
private static Essentials instance = null;
private Spawn spawn;
private Jail jail;
@@ -60,12 +58,12 @@ public class Essentials extends JavaPlugin implements IEssentials
public ArrayList bannedIps = new ArrayList();
private Backup backup;
private final Map<String, User> users = new HashMap<String, User>();
- private EssentialsTimer timer;
private EssentialsUpdateTimer updateTimer;
private boolean registerFallback = true;
private final Methods paymentMethod = new Methods();
private final static boolean enableErrorLogging = false;
private final EssentialsErrorHandler errorHandler = new EssentialsErrorHandler();
+ private IPermissionsHandler permissionsHandler;
public static IEssentials getStatic()
{
@@ -86,6 +84,7 @@ public class Essentials extends JavaPlugin implements IEssentials
logger.log(Level.INFO, dataFolder.toString());
this.initialize(null, server, new PluginDescriptionFile(new FileReader(new File("src" + File.separator + "plugin.yml"))), dataFolder, null, null);
settings = new Settings(dataFolder);
+ permissionsHandler = new ConfigPermissionsHandler(this);
setStatic();
}
@@ -96,6 +95,11 @@ public class Essentials extends JavaPlugin implements IEssentials
public void onEnable()
{
+ final String[] javaversion = System.getProperty("java.version").split("\\.", 3);
+ if (javaversion == null || javaversion.length < 2 || Integer.parseInt(javaversion[1]) < 6)
+ {
+ logger.log(Level.SEVERE, "Java version not supported! Please install Java 1.6. You have " + System.getProperty("java.version"));
+ }
if (enableErrorLogging)
{
logger.addHandler(errorHandler);
@@ -116,8 +120,9 @@ public class Essentials extends JavaPlugin implements IEssentials
confList.add(worth);
reload();
backup = new Backup(this);
+ essDep = new EssentialsDependancyChecker(this);
- PluginManager pm = getServer().getPluginManager();
+ final PluginManager pm = getServer().getPluginManager();
for (Plugin plugin : pm.getPlugins())
{
if (plugin.getDescription().getName().startsWith("Essentials"))
@@ -142,12 +147,29 @@ public class Essentials extends JavaPlugin implements IEssentials
logger.log(Level.INFO, Util.i18n("bukkitFormatChanged"));
}
+ Plugin permissionsPlugin = pm.getPlugin("Permissions");
+
+ if (permissionsPlugin != null)
+ {
+ if (permissionsPlugin.getDescription().getVersion().charAt(0) == '3')
+ {
+ this.permissionsHandler = new Permissions3Handler(permissionsPlugin);
+ }
+ else
+ {
+ this.permissionsHandler = new Permissions2Handler(permissionsPlugin);
+ }
+ }
+ else
+ {
+ this.permissionsHandler = new ConfigPermissionsHandler(this);
+ }
- ServerListener serverListener = new EssentialsPluginListener(paymentMethod);
+ final ServerListener serverListener = new EssentialsPluginListener(paymentMethod);
pm.registerEvent(Type.PLUGIN_ENABLE, serverListener, Priority.Low, this);
pm.registerEvent(Type.PLUGIN_DISABLE, serverListener, Priority.Low, this);
- playerListener = new EssentialsPlayerListener(this);
+ final EssentialsPlayerListener playerListener = new EssentialsPlayerListener(this);
pm.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this);
pm.registerEvent(Type.PLAYER_QUIT, playerListener, Priority.Monitor, this);
pm.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.Lowest, this);
@@ -162,18 +184,18 @@ public class Essentials extends JavaPlugin implements IEssentials
pm.registerEvent(Type.PLAYER_BUCKET_EMPTY, playerListener, Priority.High, this);
pm.registerEvent(Type.PLAYER_ANIMATION, playerListener, Priority.High, this);
- blockListener = new EssentialsBlockListener(this);
+ final EssentialsBlockListener blockListener = new EssentialsBlockListener(this);
pm.registerEvent(Type.SIGN_CHANGE, blockListener, Priority.Low, this);
pm.registerEvent(Type.BLOCK_BREAK, blockListener, Priority.Lowest, this);
pm.registerEvent(Type.BLOCK_PLACE, blockListener, Priority.Lowest, this);
- entityListener = new EssentialsEntityListener(this);
+ final EssentialsEntityListener entityListener = new EssentialsEntityListener(this);
pm.registerEvent(Type.ENTITY_DAMAGE, entityListener, Priority.Lowest, this);
pm.registerEvent(Type.ENTITY_COMBUST, entityListener, Priority.Lowest, this);
pm.registerEvent(Type.ENTITY_DEATH, entityListener, Priority.Lowest, this);
jail = new Jail(this);
- jailPlayerListener = new JailPlayerListener(this);
+ final JailPlayerListener jailPlayerListener = new JailPlayerListener(this);
confList.add(jail);
pm.registerEvent(Type.BLOCK_BREAK, jail, Priority.High, this);
pm.registerEvent(Type.BLOCK_DAMAGE, jail, Priority.High, this);
@@ -183,11 +205,13 @@ public class Essentials extends JavaPlugin implements IEssentials
if (settings.isNetherEnabled() && getServer().getWorlds().size() < 2)
{
- logger.log(Level.WARNING, "Old nether is disabled until multiworld support in bukkit is fixed.");
getServer().createWorld(settings.getNetherName(), World.Environment.NETHER);
}
- timer = new EssentialsTimer(this);
+ tntListener = new TNTExplodeListener(this);
+ pm.registerEvent(Type.ENTITY_EXPLODE, tntListener, Priority.High, this);
+
+ final EssentialsTimer timer = new EssentialsTimer(this);
getScheduler().scheduleSyncRepeatingTask(this, timer, 1, 50);
if (enableErrorLogging)
{
@@ -246,7 +270,7 @@ public class Essentials extends JavaPlugin implements IEssentials
}
String[] retval = new String[lines.size()];
- if (lines == null || lines.isEmpty() || lines.get(0) == null)
+ if (lines.isEmpty() || lines.get(0) == null)
{
try
{
@@ -382,17 +406,11 @@ public class Essentials extends JavaPlugin implements IEssentials
continue;
}
- if (!(desc.getCommands() instanceof Map))
- {
- continue;
- }
-
- Map<String, Object> cmds = (Map<String, Object>)desc.getCommands();
- if (!cmds.containsKey(command.getName()))
+ PluginCommand pc = getServer().getPluginCommand(desc.getName() + ":" + commandLabel);
+ if (pc != null)
{
- continue;
+ return pc.execute(sender, commandLabel, args);
}
- return p.onCommand(sender, command, commandLabel, args);
}
}
@@ -459,21 +477,7 @@ public class Essentials extends JavaPlugin implements IEssentials
}
catch (Throwable ex)
{
- sender.sendMessage(Util.format("errorWithMessage", ex.getMessage()));
- LogRecord lr = new LogRecord(Level.WARNING, Util.format("errorCallingCommand", commandLabel));
- lr.setThrown(ex);
- if (getSettings().isDebug())
- {
- logger.log(lr);
- }
- else
- {
- if (enableErrorLogging)
- {
- errorHandler.publish(lr);
- errorHandler.flush();
- }
- }
+ showError(sender, ex, commandLabel);
return true;
}
}
@@ -484,6 +488,25 @@ public class Essentials extends JavaPlugin implements IEssentials
}
}
+ public void showError(final CommandSender sender, final Throwable exception, final String commandLabel)
+ {
+ sender.sendMessage(Util.format("errorWithMessage", exception.getMessage()));
+ final LogRecord logRecord = new LogRecord(Level.WARNING, Util.format("errorCallingCommand", commandLabel));
+ logRecord.setThrown(exception);
+ if (getSettings().isDebug())
+ {
+ logger.log(logRecord);
+ }
+ else
+ {
+ if (enableErrorLogging)
+ {
+ errorHandler.publish(logRecord);
+ errorHandler.flush();
+ }
+ }
+ }
+
public void loadBanList()
{
//I don't like this but it needs to be done until CB fixors
@@ -730,6 +753,11 @@ public class Essentials extends JavaPlugin implements IEssentials
return this.getScheduler().scheduleSyncDelayedTask(this, run);
}
+ public int scheduleSyncDelayedTask(final Runnable run, final long delay)
+ {
+ return this.getScheduler().scheduleSyncDelayedTask(this, run, delay);
+ }
+
public int scheduleSyncRepeatingTask(final Runnable run, long delay, long period)
{
return this.getScheduler().scheduleSyncRepeatingTask(this, run, delay, period);
@@ -744,4 +772,19 @@ public class Essentials extends JavaPlugin implements IEssentials
{
return bannedIps;
}
+
+ public TNTExplodeListener getTNTListener()
+ {
+ return tntListener;
+ }
+
+ public EssentialsDependancyChecker getDependancyChecker()
+ {
+ return essDep;
+ }
+
+ public IPermissionsHandler getPermissionsHandler()
+ {
+ return permissionsHandler;
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
index 8069d8f83..64206dac0 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
@@ -35,8 +35,14 @@ public class EssentialsBlockListener extends BlockListener
@Override
public void onBlockBreak(BlockBreakEvent event)
{
- if (event.isCancelled()) return;
- if (ess.getSettings().areSignsDisabled()) return;
+ if (event.isCancelled())
+ {
+ return;
+ }
+ if (ess.getSettings().areSignsDisabled())
+ {
+ return;
+ }
User user = ess.getUser(event.getPlayer());
if (protectedBlocks.contains(event.getBlock().getType()) && !user.isAuthorized("essentials.signs.protection.override"))
{
@@ -48,8 +54,8 @@ public class EssentialsBlockListener extends BlockListener
}
}
- if (checkProtectionSign(event.getBlock(), user) != NOSIGN &&
- checkProtectionSign(event.getBlock(), user) != OWNER)
+ if (checkProtectionSign(event.getBlock(), user) != NOSIGN
+ && checkProtectionSign(event.getBlock(), user) != OWNER)
{
event.setCancelled(true);
user.sendMessage(Util.format("noDestroyPermission", event.getBlock().getType().toString().toLowerCase()));
@@ -59,8 +65,14 @@ public class EssentialsBlockListener extends BlockListener
@Override
public void onSignChange(SignChangeEvent event)
{
- if (event.isCancelled()) return;
- if (ess.getSettings().areSignsDisabled()) return;
+ if (event.isCancelled())
+ {
+ return;
+ }
+ if (ess.getSettings().areSignsDisabled())
+ {
+ return;
+ }
User user = ess.getUser(event.getPlayer());
String username = user.getName().substring(0, user.getName().length() > 14 ? 14 : user.getName().length());
@@ -70,18 +82,26 @@ public class EssentialsBlockListener extends BlockListener
{
Block block = event.getBlock();
if (user.isAuthorized("essentials.signs.protection.create") && hasAdjacentChest(block) && !isBlockProtected(block, user))
+ {
event.setLine(0, "§1[Protection]");
+ }
else
+ {
event.setLine(0, "§4[Protection]");
+ }
event.setLine(3, username);
return;
}
if (event.getLine(0).equalsIgnoreCase("[Disposal]"))
{
if (user.isAuthorized("essentials.signs.disposal.create"))
+ {
event.setLine(0, "§1[Disposal]");
+ }
else
+ {
event.setLine(0, "§4[Disposal]");
+ }
return;
}
if (event.getLine(0).equalsIgnoreCase("[Heal]"))
@@ -94,8 +114,14 @@ public class EssentialsBlockListener extends BlockListener
String[] l1 = event.getLine(1).split("[ :-]+", 2);
boolean m1 = l1[0].matches("^[^0-9][\\.0-9]+");
double q1 = Double.parseDouble(m1 ? l1[0].substring(1) : l1[0]);
- if (q1 < 1 || (!m1 && (int)q1 < 1)) throw new Exception(Util.i18n("moreThanZero"));
- if (!m1) ItemDb.get(l1[1]);
+ if (q1 < 1 || (!m1 && (int)q1 < 1))
+ {
+ throw new Exception(Util.i18n("moreThanZero"));
+ }
+ if (!m1)
+ {
+ ItemDb.get(l1[1]);
+ }
event.setLine(1, (m1 ? Util.formatCurrency(q1) : (int)q1 + " " + l1[1]));
}
event.setLine(0, "§1[Heal]");
@@ -107,29 +133,40 @@ public class EssentialsBlockListener extends BlockListener
event.setLine(0, "§4[Free]");
ItemDb.get(event.getLine(1));
if (user.isAuthorized("essentials.signs.free.create"))
+ {
event.setLine(0, "§1[Free]");
+ }
return;
}
if (event.getLine(0).equalsIgnoreCase("[Mail]"))
{
if (user.isAuthorized("essentials.signs.mail.create"))
+ {
event.setLine(0, "§1[Mail]");
+ }
else
+ {
event.setLine(0, "§4[Mail]");
+ }
return;
}
if (event.getLine(0).equalsIgnoreCase("[Balance]"))
{
if (user.isAuthorized("essentials.signs.balance.create"))
+ {
event.setLine(0, "§1[Balance]");
+ }
else
+ {
event.setLine(0, "§4[Balance]");
+ }
return;
}
- if (event.getLine(0).equalsIgnoreCase("[Warp]"))
+ if (event.getLine(0).equalsIgnoreCase("[Warp]"))
{
event.setLine(0, "§4[Warp]");
- if (user.isAuthorized("essentials.signs.warp.create")) {
+ if (user.isAuthorized("essentials.signs.warp.create"))
+ {
if (!event.getLine(3).isEmpty())
{
String[] l1 = event.getLine(3).split("[ :-]+", 2);
@@ -139,38 +176,61 @@ public class EssentialsBlockListener extends BlockListener
throw new Exception(Util.format("invalidSignLine", 4));
}
double q1 = Double.parseDouble(m1 ? l1[0].substring(1) : l1[0]);
- if ((int)q1 < 1) throw new Exception(Util.i18n("moreThanZero"));
- if (!m1) ItemDb.get(l1[1]);
+ if ((int)q1 < 1)
+ {
+ throw new Exception(Util.i18n("moreThanZero"));
+ }
+ if (!m1)
+ {
+ ItemDb.get(l1[1]);
+ }
event.setLine(3, (m1 ? Util.formatCurrency(q1) : (int)q1 + " " + l1[1]));
}
- if (event.getLine(1).isEmpty()) {
+ if (event.getLine(1).isEmpty())
+ {
event.setLine(1, "§dWarp name!");
return;
- } else {
+ }
+ else
+ {
ess.getWarps().getWarp(event.getLine(1));
- if (event.getLine(2).equalsIgnoreCase("Everyone")) {
+ if (event.getLine(2).equalsIgnoreCase("Everyone"))
+ {
event.setLine(2, "§2Everyone");
}
- event.setLine(0, "§1[Warp]");
+ event.setLine(0, "§1[Warp]");
}
}
return;
}
+ if (event.getLine(0).equalsIgnoreCase("[Time]"))
+ {
+ if (user.isAuthorized("essentials.signs.time.create")
+ && (event.getLine(1).equalsIgnoreCase("day")
+ || event.getLine(1).equalsIgnoreCase("night")))
+ {
+ event.setLine(0, "§1[Time]");
+ }
+ else
+ {
+ event.setLine(0, "§4[Time]");
+ }
+ return;
+ }
}
catch (Throwable ex)
{
- user.sendMessage(Util.format("errorWithMessage", ex.getMessage()));
- if (ess.getSettings().isDebug())
- {
- logger.log(Level.WARNING, ex.getMessage(), ex);
- }
+ ess.showError(user, ex, "onSignChange");
}
}
@Override
public void onBlockPlace(BlockPlaceEvent event)
{
- if (event.isCancelled()) return;
+ if (event.isCancelled())
+ {
+ return;
+ }
Block signBlock = event.getBlockAgainst();
if (signBlock.getType() == Material.WALL_SIGN || signBlock.getType() == Material.SIGN_POST)
{
@@ -185,75 +245,78 @@ public class EssentialsBlockListener extends BlockListener
// Do not rely on getItemInHand();
// http://leaky.bukkit.org/issues/663
final ItemStack is = new ItemStack(event.getBlockPlaced().getType(), 1, (short)0, event.getBlockPlaced().getData());
- switch(is.getType()) {
- case WOODEN_DOOR:
- is.setType(Material.WOOD_DOOR);
- is.setDurability((short)0);
- break;
- case IRON_DOOR_BLOCK:
- is.setType(Material.IRON_DOOR);
- is.setDurability((short)0);
- break;
- case SIGN_POST:
- case WALL_SIGN:
- is.setType(Material.SIGN);
- is.setDurability((short)0);
- break;
- case CROPS:
- is.setType(Material.SEEDS);
- is.setDurability((short)0);
- break;
- case CAKE_BLOCK:
- is.setType(Material.CAKE);
- is.setDurability((short)0);
- break;
- case BED_BLOCK:
- is.setType(Material.BED);
- is.setDurability((short)0);
- break;
- case REDSTONE_WIRE:
- is.setType(Material.REDSTONE);
- is.setDurability((short)0);
- break;
- case REDSTONE_TORCH_OFF:
- case REDSTONE_TORCH_ON:
- is.setType(Material.REDSTONE_TORCH_ON);
- is.setDurability((short)0);
- break;
- case DIODE_BLOCK_OFF:
- case DIODE_BLOCK_ON:
- is.setType(Material.DIODE);
- is.setDurability((short)0);
- break;
- case DOUBLE_STEP:
- is.setType(Material.STEP);
- break;
- case TORCH:
- case RAILS:
- case LADDER:
- case WOOD_STAIRS:
- case COBBLESTONE_STAIRS:
- case LEVER:
- case STONE_BUTTON:
- case FURNACE:
- case DISPENSER:
- case PUMPKIN:
- case JACK_O_LANTERN:
- case WOOD_PLATE:
- case STONE_PLATE:
- is.setDurability((short)0);
- break;
+ switch (is.getType())
+ {
+ case WOODEN_DOOR:
+ is.setType(Material.WOOD_DOOR);
+ is.setDurability((short)0);
+ break;
+ case IRON_DOOR_BLOCK:
+ is.setType(Material.IRON_DOOR);
+ is.setDurability((short)0);
+ break;
+ case SIGN_POST:
+ case WALL_SIGN:
+ is.setType(Material.SIGN);
+ is.setDurability((short)0);
+ break;
+ case CROPS:
+ is.setType(Material.SEEDS);
+ is.setDurability((short)0);
+ break;
+ case CAKE_BLOCK:
+ is.setType(Material.CAKE);
+ is.setDurability((short)0);
+ break;
+ case BED_BLOCK:
+ is.setType(Material.BED);
+ is.setDurability((short)0);
+ break;
+ case REDSTONE_WIRE:
+ is.setType(Material.REDSTONE);
+ is.setDurability((short)0);
+ break;
+ case REDSTONE_TORCH_OFF:
+ case REDSTONE_TORCH_ON:
+ is.setType(Material.REDSTONE_TORCH_ON);
+ is.setDurability((short)0);
+ break;
+ case DIODE_BLOCK_OFF:
+ case DIODE_BLOCK_ON:
+ is.setType(Material.DIODE);
+ is.setDurability((short)0);
+ break;
+ case DOUBLE_STEP:
+ is.setType(Material.STEP);
+ break;
+ case TORCH:
+ case RAILS:
+ case LADDER:
+ case WOOD_STAIRS:
+ case COBBLESTONE_STAIRS:
+ case LEVER:
+ case STONE_BUTTON:
+ case FURNACE:
+ case DISPENSER:
+ case PUMPKIN:
+ case JACK_O_LANTERN:
+ case WOOD_PLATE:
+ case STONE_PLATE:
+ is.setDurability((short)0);
+ break;
}
boolean unlimitedForUser = user.hasUnlimited(is);
- if (unlimitedForUser) {
+ if (unlimitedForUser)
+ {
ess.scheduleSyncDelayedTask(
- new Runnable() {
-
- public void run() {
- user.getInventory().addItem(is);
- user.updateInventory();
- }
- });
+ new Runnable()
+ {
+ public void run()
+ {
+ user.getInventory().addItem(is);
+ user.updateInventory();
+ }
+ });
}
}
@@ -282,14 +345,19 @@ public class EssentialsBlockListener extends BlockListener
Sign sign = new CraftSign(block);
if (sign.getLine(0).equalsIgnoreCase("§1[Protection]") && !user.isAuthorized("essentials.signs.protection.override"))
{
- for (int i = 1; i <= 2; i++) {
+ for (int i = 1; i <= 2; i++)
+ {
String line = sign.getLine(i);
- if (line.startsWith("(") && line.endsWith(")")) {
+ if (line.startsWith("(") && line.endsWith(")"))
+ {
line = line.substring(1, line.length() - 1);
- if (user.inGroup(line)) {
+ if (user.inGroup(line))
+ {
return ALLOWED;
}
- } else if (line.equalsIgnoreCase(username)) {
+ }
+ else if (line.equalsIgnoreCase(username))
+ {
return ALLOWED;
}
}
@@ -352,7 +420,7 @@ public class EssentialsBlockListener extends BlockListener
}
return protect;
}
-
+
public static boolean isBlockProtected(Block block)
{
Block[] faces = getAdjacentBlocks(block);
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsDependancyChecker.java b/Essentials/src/com/earth2me/essentials/EssentialsDependancyChecker.java
new file mode 100644
index 000000000..a46c7f6e7
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/EssentialsDependancyChecker.java
@@ -0,0 +1,68 @@
+package com.earth2me.essentials;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+
+public class EssentialsDependancyChecker
+{
+ private static final Logger logger = Logger.getLogger("Minecraft");
+ final Essentials ess;
+
+ public EssentialsDependancyChecker(Essentials ess)
+ {
+ this.ess = ess;
+ }
+
+ public void checkProtectDependancies()
+ {
+ final String dependancyLocation = "http://mirrors.ibiblio.org/pub/mirrors/maven2/c3p0/c3p0/0.9.1.2/c3p0-0.9.1.2.jar";
+ File dependancyFile = new File("lib/c3p0-0.9.1.2.jar");
+ if (!dependancyFile.exists())
+ {
+ logger.log(Level.INFO, Util.i18n("dependancyNotFound"));
+ try
+ {
+ URL url = new URL(dependancyLocation);
+ BufferedInputStream inStream = new BufferedInputStream(url.openStream());
+ FileOutputStream fos = new FileOutputStream(dependancyFile);
+ BufferedOutputStream outStream = new BufferedOutputStream(fos, 1024);
+
+ byte[] buffer = new byte[1024];
+ int len = 0;
+
+ while ((len = inStream.read(buffer)) > 0)
+ {
+ outStream.write(buffer, 0, len);
+ }
+ outStream.close();
+ fos.close();
+ inStream.close();
+ logger.log(Level.INFO, Util.format("dependancyDownloaded", dependancyFile.getName()));
+
+ }
+ catch (MalformedURLException ex)
+ {
+ logger.log(Level.SEVERE, Util.i18n("urlMalformed"), ex);
+ }
+ catch (FileNotFoundException ex)
+ {
+ logger.log(Level.SEVERE, Util.i18n("dependancyException"), ex);
+ }
+ catch (IOException ex)
+ {
+ logger.log(Level.SEVERE, Util.i18n("dependancyException"), ex);
+ }
+ }
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index 81e24311d..ace790c09 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -52,7 +52,8 @@ public class EssentialsPlayerListener extends PlayerListener
User user = ess.getUser(event.getPlayer());
user.setDisplayName(user.getNick());
updateCompass(user);
- if (user.isJailed() && user.getJail() != null && !user.getJail().isEmpty()) {
+ if (user.isJailed() && user.getJail() != null && !user.getJail().isEmpty())
+ {
try
{
event.setRespawnLocation(ess.getJail().getJail(user.getJail()));
@@ -109,15 +110,18 @@ public class EssentialsPlayerListener extends PlayerListener
Location loc = event.getTo();
World nether = server.getWorld(ess.getSettings().getNetherName());
- if (nether == null) {
+ if (nether == null)
+ {
for (World world : worlds)
{
- if (world.getEnvironment() == World.Environment.NETHER) {
+ if (world.getEnvironment() == World.Environment.NETHER)
+ {
nether = world;
break;
}
}
- if (nether == null) {
+ if (nether == null)
+ {
return;
}
}
@@ -177,7 +181,7 @@ public class EssentialsPlayerListener extends PlayerListener
event.setTo(loc);
try
{
- user.getTeleport().now(loc, new Charge("portal", ess));
+ user.getTeleport().now(loc, new Trade("portal", ess));
}
catch (Exception ex)
{
@@ -465,18 +469,18 @@ public class EssentialsPlayerListener extends PlayerListener
}
if (sign.getLine(0).equals("§1[Warp]"))
{
-
+
if (!sign.getLine(2).isEmpty())
{
if (sign.getLine(2).equals("§2Everyone"))
{
- Charge charge = chargeUserForWarp(sign, user);
+ Trade charge = chargeUserForWarp(sign, user);
user.getTeleport().warp(sign.getLine(1), charge);
return;
}
if (user.inGroup(sign.getLine(2)))
{
- Charge charge = chargeUserForWarp(sign, user);
+ Trade charge = chargeUserForWarp(sign, user);
user.getTeleport().warp(sign.getLine(1), charge);
return;
}
@@ -484,11 +488,27 @@ public class EssentialsPlayerListener extends PlayerListener
if (user.isAuthorized("essentials.signs.warp.use")
&& (!ess.getSettings().getPerWarpPermission() || user.isAuthorized("essentials.warp." + sign.getLine(1))))
{
- Charge charge = chargeUserForWarp(sign, user);
+ Trade charge = chargeUserForWarp(sign, user);
user.getTeleport().warp(sign.getLine(1), charge);
}
return;
}
+ if (sign.getLine(0).equals("§1[Time]") && user.isAuthorized("essentials.signs.time.use"))
+ {
+ long time = user.getWorld().getTime();
+ time -= time % 24000;
+ if ("day".equalsIgnoreCase(sign.getLine(1)))
+ {
+ user.getWorld().setTime(time + 24000);
+ return;
+ }
+ if ("night".equalsIgnoreCase(sign.getLine(1)))
+ {
+ user.getWorld().setTime(time + 37700);
+ return;
+ }
+ throw new Exception(Util.i18n("onlyDayNight"));
+ }
}
catch (Throwable ex)
{
@@ -499,8 +519,8 @@ public class EssentialsPlayerListener extends PlayerListener
}
}
}
-
- private Charge chargeUserForWarp(Sign sign, User user) throws Exception
+
+ private Trade chargeUserForWarp(Sign sign, User user) throws Exception
{
if (!sign.getLine(3).isEmpty())
{
@@ -513,15 +533,15 @@ public class EssentialsPlayerListener extends PlayerListener
}
if (m1)
{
- return new Charge(q1, ess);
+ return new Trade(q1, ess);
}
else
{
ItemStack i = ItemDb.get(l1[1], (int)q1);
- return new Charge(i, ess);
+ return new Trade(i, ess);
}
}
- return new Charge("warpsign", ess);
+ return new Trade("warpsign", ess);
}
@Override
diff --git a/Essentials/src/com/earth2me/essentials/IEssentials.java b/Essentials/src/com/earth2me/essentials/IEssentials.java
index 8cc905355..426724c61 100644
--- a/Essentials/src/com/earth2me/essentials/IEssentials.java
+++ b/Essentials/src/com/earth2me/essentials/IEssentials.java
@@ -60,9 +60,19 @@ public interface IEssentials
int scheduleSyncDelayedTask(Runnable run);
+ int scheduleSyncDelayedTask(Runnable run, long delay);
+
int scheduleSyncRepeatingTask(final Runnable run, long delay, long period);
List<String> getBans();
List<String> getBannedIps();
+
+ TNTExplodeListener getTNTListener();
+
+ EssentialsDependancyChecker getDependancyChecker();
+
+ IPermissionsHandler getPermissionsHandler();
+
+ void showError(final CommandSender sender, final Throwable exception, final String commandLabel);
}
diff --git a/Essentials/src/com/earth2me/essentials/IPermissionsHandler.java b/Essentials/src/com/earth2me/essentials/IPermissionsHandler.java
new file mode 100644
index 000000000..a7bcc80b7
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/IPermissionsHandler.java
@@ -0,0 +1,21 @@
+package com.earth2me.essentials;
+
+import org.bukkit.entity.Player;
+
+
+public interface IPermissionsHandler
+{
+
+ String getGroup(Player base);
+
+ boolean canBuild(Player base, String group);
+
+ boolean inGroup(Player base, String group);
+
+ boolean hasPermission(Player base, String node);
+
+ String getPrefix(Player base);
+
+ String getSuffix(Player base);
+
+}
diff --git a/Essentials/src/com/earth2me/essentials/IUser.java b/Essentials/src/com/earth2me/essentials/IUser.java
index 4cb69d7d7..cfed0915f 100644
--- a/Essentials/src/com/earth2me/essentials/IUser.java
+++ b/Essentials/src/com/earth2me/essentials/IUser.java
@@ -33,6 +33,8 @@ public interface IUser
void takeMoney(double value);
+ void giveMoney(double value);
+
PlayerInventory getInventory();
void updateInventory();
diff --git a/Essentials/src/com/earth2me/essentials/InventoryWorkaround.java b/Essentials/src/com/earth2me/essentials/InventoryWorkaround.java
index 425113daf..9ac63c374 100644
--- a/Essentials/src/com/earth2me/essentials/InventoryWorkaround.java
+++ b/Essentials/src/com/earth2me/essentials/InventoryWorkaround.java
@@ -1,7 +1,9 @@
package com.earth2me.essentials;
import java.util.HashMap;
+import java.util.Map;
import org.bukkit.Location;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
import org.bukkit.entity.Item;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
@@ -17,18 +19,18 @@ public final class InventoryWorkaround
private InventoryWorkaround()
{
}
-
- public static int first(Inventory ci, ItemStack item, boolean forceDurability, boolean forceAmount)
+
+ public static int first(final Inventory inventory, final ItemStack item, final boolean forceDurability, final boolean forceAmount)
{
- return next(ci, item, 0, forceDurability, forceAmount);
+ return next(inventory, item, 0, forceDurability, forceAmount);
}
- public static int next(Inventory ci, ItemStack item, int start, boolean forceDurability, boolean forceAmount)
+ public static int next(final Inventory cinventory, final ItemStack item, final int start, final boolean forceDurability, final boolean forceAmount)
{
- ItemStack[] inventory = ci.getContents();
+ final ItemStack[] inventory = cinventory.getContents();
for (int i = start; i < inventory.length; i++)
{
- ItemStack cItem = inventory[i];
+ final ItemStack cItem = inventory[i];
if (cItem == null)
{
continue;
@@ -41,15 +43,133 @@ public final class InventoryWorkaround
return -1;
}
- public static HashMap<Integer, ItemStack> removeItem(Inventory ci, boolean forceDurability, ItemStack... items)
+ public static int firstPartial(final Inventory cinventory, final ItemStack item, final boolean forceDurability)
+ {
+ if (item == null)
+ {
+ return -1;
+ }
+ final ItemStack[] inventory = cinventory.getContents();
+ for (int i = 0; i < inventory.length; i++)
+ {
+ final ItemStack cItem = inventory[i];
+ if (cItem == null)
+ {
+ continue;
+ }
+ if (item.getTypeId() == cItem.getTypeId() && cItem.getAmount() < cItem.getType().getMaxStackSize() && (!forceDurability || cItem.getDurability() == item.getDurability()))
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public static Map<Integer, ItemStack> addItem(final Inventory cinventory, final boolean forceDurability, final ItemStack... items)
+ {
+ final Map<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
+
+ /* TODO: some optimization
+ * - Create a 'firstPartial' with a 'fromIndex'
+ * - Record the lastPartial per Material
+ * - Cache firstEmpty result
+ */
+
+ // combine items
+
+ ItemStack[] combined = new ItemStack[items.length];
+ for (int i = 0; i < items.length; i++)
+ {
+ if (items[i] == null)
+ {
+ continue;
+ }
+ for (int j = 0; j < combined.length; j++)
+ {
+ if (combined[j] == null)
+ {
+ combined[j] = new ItemStack(items[i].getType(), items[i].getAmount(), items[i].getDurability());
+ break;
+ }
+ if (combined[j].getTypeId() == items[i].getTypeId() && (!forceDurability || combined[j].getDurability() == items[i].getDurability()))
+ {
+ combined[j].setAmount(combined[j].getAmount() + items[i].getAmount());
+ break;
+ }
+ }
+ }
+
+
+ for (int i = 0; i < items.length; i++)
+ {
+ final ItemStack item = items[i];
+ while (true)
+ {
+ // Do we already have a stack of it?
+ final int firstPartial = firstPartial(cinventory, item, forceDurability);
+
+ // Drat! no partial stack
+ if (firstPartial == -1)
+ {
+ // Find a free spot!
+ final int firstFree = cinventory.firstEmpty();
+
+ if (firstFree == -1)
+ {
+ // No space at all!
+ leftover.put(i, item);
+ break;
+ }
+ else
+ {
+ // More than a single stack!
+ if (item.getAmount() > item.getType().getMaxStackSize())
+ {
+ cinventory.setItem(firstFree, new CraftItemStack(item.getTypeId(), item.getType().getMaxStackSize(), item.getDurability()));
+ item.setAmount(item.getAmount() - item.getType().getMaxStackSize());
+ }
+ else
+ {
+ // Just store it
+ cinventory.setItem(firstFree, item);
+ break;
+ }
+ }
+ }
+ else
+ {
+ // So, apparently it might only partially fit, well lets do just that
+ final ItemStack partialItem = cinventory.getItem(firstPartial);
+
+ final int amount = item.getAmount();
+ final int partialAmount = partialItem.getAmount();
+ final int maxAmount = partialItem.getType().getMaxStackSize();
+
+ // Check if it fully fits
+ if (amount + partialAmount <= maxAmount)
+ {
+ partialItem.setAmount(amount + partialAmount);
+ break;
+ }
+
+ // It fits partially
+ partialItem.setAmount(maxAmount);
+ item.setAmount(amount + partialAmount - maxAmount);
+ }
+ }
+ }
+ return leftover;
+ }
+
+ public static Map<Integer, ItemStack> removeItem(final Inventory cinventory, final boolean forceDurability, final ItemStack... items)
{
- HashMap<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
+ final Map<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
// TODO: optimization
for (int i = 0; i < items.length; i++)
{
- ItemStack item = items[i];
+ final ItemStack item = items[i];
if (item == null)
{
continue;
@@ -66,7 +186,7 @@ public final class InventoryWorkaround
}
// get first Item, ignore the amount
- int first = first(ci, item, forceDurability, false);
+ final int first = first(cinventory, item, forceDurability, false);
// Drat! we don't have this type in the inventory
if (first == -1)
@@ -77,20 +197,20 @@ public final class InventoryWorkaround
}
else
{
- ItemStack itemStack = ci.getItem(first);
- int amount = itemStack.getAmount();
+ final ItemStack itemStack = cinventory.getItem(first);
+ final int amount = itemStack.getAmount();
if (amount <= toDelete)
{
toDelete -= amount;
// clear the slot, all used up
- ci.clear(first);
+ cinventory.clear(first);
}
else
{
// split the stack and store
itemStack.setAmount(amount - toDelete);
- ci.setItem(first, itemStack);
+ cinventory.setItem(first, itemStack);
toDelete = 0;
}
}
@@ -99,9 +219,9 @@ public final class InventoryWorkaround
return leftover;
}
- public static boolean containsItem(Inventory ci, boolean forceDurability, ItemStack... items)
+ public static boolean containsItem(final Inventory cinventory, final boolean forceDurability, final ItemStack... items)
{
- HashMap<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
+ final Map<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
// TODO: optimization
@@ -131,7 +251,7 @@ public final class InventoryWorkaround
for (int i = 0; i < combined.length; i++)
{
- ItemStack item = combined[i];
+ final ItemStack item = combined[i];
if (item == null)
{
continue;
@@ -147,7 +267,7 @@ public final class InventoryWorkaround
break;
}
- int slot = next(ci, item, position, forceDurability, false);
+ final int slot = next(cinventory, item, position, forceDurability, false);
// Drat! we don't have this type in the inventory
if (slot == -1)
@@ -157,8 +277,8 @@ public final class InventoryWorkaround
}
else
{
- ItemStack itemStack = ci.getItem(slot);
- int amount = itemStack.getAmount();
+ final ItemStack itemStack = cinventory.getItem(slot);
+ final int amount = itemStack.getAmount();
if (amount <= mustHave)
{
@@ -175,17 +295,19 @@ public final class InventoryWorkaround
return leftover.isEmpty();
}
- public static Item[] dropItem(Location loc, ItemStack itm)
+ public static Item[] dropItem(final Location loc, final ItemStack itm)
{
- int maxStackSize = itm.getType().getMaxStackSize();
- int stacks = itm.getAmount() / maxStackSize;
- int leftover = itm.getAmount() % maxStackSize;
+ final int maxStackSize = itm.getType().getMaxStackSize();
+ final int stacks = itm.getAmount() / maxStackSize;
+ final int leftover = itm.getAmount() % maxStackSize;
Item[] itemStacks = new Item[stacks + (leftover > 0 ? 1 : 0)];
- for (int i = 0; i < stacks; i++) {
- itemStacks[i] = loc.getWorld().dropItem(loc, new ItemStack(itm.getType(), maxStackSize, itm.getDurability()));
+ for (int i = 0; i < stacks; i++)
+ {
+ itemStacks[i] = loc.getWorld().dropItem(loc, new ItemStack(itm.getType(), maxStackSize, itm.getDurability()));
}
- if (leftover > 0) {
- itemStacks[stacks] = loc.getWorld().dropItem(loc, new ItemStack(itm.getType(), leftover, itm.getDurability()));
+ if (leftover > 0)
+ {
+ itemStacks[stacks] = loc.getWorld().dropItem(loc, new ItemStack(itm.getType(), leftover, itm.getDurability()));
}
return itemStacks;
}
diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java
index 771d54abe..3c16ae01a 100644
--- a/Essentials/src/com/earth2me/essentials/Mob.java
+++ b/Essentials/src/com/earth2me/essentials/Mob.java
@@ -1,15 +1,11 @@
package com.earth2me.essentials;
-import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
-import net.minecraft.server.Entity;
-import net.minecraft.server.WorldServer;
import org.bukkit.Server;
-import org.bukkit.craftbukkit.entity.CraftEntity;
-import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@@ -84,14 +80,15 @@ public enum Mob
{
"unchecked", "CallToThreadDumpStack"
})
- public CraftEntity spawn(Player player, Server server) throws MobException
+ public Entity spawn(Player player, Server server) throws MobException
{
try
{
- WorldServer world = ((org.bukkit.craftbukkit.CraftWorld)player.getWorld()).getHandle();
- Constructor<CraftEntity> craft = (Constructor<CraftEntity>)ClassLoader.getSystemClassLoader().loadClass("org.bukkit.craftbukkit.entity.Craft" + craftClass).getConstructors()[0];
- Constructor<Entity> entity = (Constructor<Entity>)ClassLoader.getSystemClassLoader().loadClass("net.minecraft.server.Entity" + entityClass).getConstructors()[0];
- return craft.newInstance((CraftServer)server, entity.newInstance(world));
+ return player.getWorld().spawn(player.getLocation(), (Class<Entity>)ClassLoader.getSystemClassLoader().loadClass("net.minecraft.server.Entity" + entityClass));
+ //WorldServer world = ((org.bukkit.craftbukkit.CraftWorld)player.getWorld()).getHandle();
+ //Constructor<CraftEntity> craft = (Constructor<CraftEntity>)ClassLoader.getSystemClassLoader().loadClass("org.bukkit.craftbukkit.entity.Craft" + craftClass).getConstructors()[0];
+ //Constructor<Entity> entity = (Constructor<Entity>)ClassLoader.getSystemClassLoader().loadClass("net.minecraft.server.Entity" + entityClass).getConstructors()[0];
+ //return craft.newInstance((CraftServer)server, entity.newInstance(world));
}
catch (Exception ex)
{
diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
index 56a8a00a2..8427e2996 100644
--- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
+++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
@@ -29,6 +29,7 @@ import org.bukkit.util.Vector;
public class OfflinePlayer implements Player
{
private final String name;
+ final IEssentials ess = Essentials.getStatic();
private Location location = new Location(null, 0, 0, 0, 0, 0);
private World world = null;
private UUID uniqueId = UUID.randomUUID();
@@ -141,7 +142,7 @@ public class OfflinePlayer implements Player
{
return world;
}
-
+
public void setLocation(Location loc)
{
location = loc;
@@ -258,7 +259,7 @@ public class OfflinePlayer implements Player
public Server getServer()
{
- return Essentials.getStatic() == null ? null : Essentials.getStatic().getServer();
+ return ess == null ? null : ess.getServer();
}
public Vector getMomentum()
@@ -296,7 +297,8 @@ public class OfflinePlayer implements Player
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
- public void sendRawMessage(String string) {
+ public void sendRawMessage(String string)
+ {
throw new UnsupportedOperationException(Util.i18n("notSupportedYet"));
}
diff --git a/Essentials/src/com/earth2me/essentials/Permissions2Handler.java b/Essentials/src/com/earth2me/essentials/Permissions2Handler.java
new file mode 100644
index 000000000..c588bb5fa
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/Permissions2Handler.java
@@ -0,0 +1,48 @@
+package com.earth2me.essentials;
+
+import com.nijiko.permissions.PermissionHandler;
+import com.nijikokun.bukkit.Permissions.Permissions;
+import org.bukkit.entity.Player;
+import org.bukkit.plugin.Plugin;
+
+
+public class Permissions2Handler implements IPermissionsHandler
+{
+ private final transient PermissionHandler permissionHandler;
+
+ Permissions2Handler(final Plugin permissionsPlugin)
+ {
+ permissionHandler = ((Permissions)permissionsPlugin).getHandler();
+ }
+
+ public String getGroup(final Player base)
+ {
+ return permissionHandler.getGroup(base.getWorld().getName(), base.getName());
+ }
+
+ public boolean canBuild(final Player base, final String group)
+ {
+ return permissionHandler.canGroupBuild(base.getWorld().getName(), getGroup(base));
+ }
+
+ public boolean inGroup(final Player base, final String group)
+ {
+ return permissionHandler.inGroup(base.getWorld().getName(), base.getName(), group);
+ }
+
+ public boolean hasPermission(final Player base, final String node)
+ {
+ return permissionHandler.permission(base, node);
+ }
+
+ public String getPrefix(final Player base)
+ {
+ return permissionHandler.getGroupPrefix(base.getWorld().getName(), getGroup(base));
+ }
+
+ public String getSuffix(final Player base)
+ {
+ return permissionHandler.getGroupSuffix(base.getWorld().getName(), getGroup(base));
+ }
+
+}
diff --git a/Essentials/src/com/earth2me/essentials/Permissions3Handler.java b/Essentials/src/com/earth2me/essentials/Permissions3Handler.java
new file mode 100644
index 000000000..99c95da0a
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/Permissions3Handler.java
@@ -0,0 +1,48 @@
+package com.earth2me.essentials;
+
+import com.nijiko.permissions.PermissionHandler;
+import com.nijikokun.bukkit.Permissions.Permissions;
+import org.bukkit.entity.Player;
+import org.bukkit.plugin.Plugin;
+
+
+public class Permissions3Handler implements IPermissionsHandler
+{
+ private final transient PermissionHandler permissionHandler;
+
+ Permissions3Handler(final Plugin permissionsPlugin)
+ {
+ permissionHandler = ((Permissions)permissionsPlugin).getHandler();
+ }
+
+ public String getGroup(final Player base)
+ {
+ return permissionHandler.getPrimaryGroup(base.getWorld().getName(), base.getName());
+ }
+
+ public boolean canBuild(final Player base, final String group)
+ {
+ return permissionHandler.canUserBuild(base.getWorld().getName(), base.getName());
+ }
+
+ public boolean inGroup(final Player base, final String group)
+ {
+ return permissionHandler.inGroup(base.getWorld().getName(), base.getName(), group);
+ }
+
+ public boolean hasPermission(final Player base, final String node)
+ {
+ return permissionHandler.has(base, node);
+ }
+
+ public String getPrefix(final Player base)
+ {
+ return permissionHandler.getUserPrefix(base.getWorld().getName(), base.getName());
+ }
+
+ public String getSuffix(final Player base)
+ {
+ return permissionHandler.getUserSuffix(base.getWorld().getName(), base.getName());
+ }
+
+}
diff --git a/Essentials/src/com/earth2me/essentials/PlayerExtension.java b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
index 901edd345..c090dff2f 100644
--- a/Essentials/src/com/earth2me/essentials/PlayerExtension.java
+++ b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
@@ -53,38 +53,17 @@ public class PlayerExtension extends PlayerWrapper
public String getGroup()
{
- try
- {
- return com.nijikokun.bukkit.Permissions.Permissions.Security.getGroup(getWorld().getName(), getName());
- }
- catch (Throwable ex)
- {
- return "default";
- }
+ return ess.getPermissionsHandler().getGroup(base);
}
public boolean inGroup(String group)
{
- try
- {
- return com.nijikokun.bukkit.Permissions.Permissions.Security.inGroup(getWorld().getName(), getName(), group);
- }
- catch (Throwable ex)
- {
- return false;
- }
+ return ess.getPermissionsHandler().inGroup(base, group);
}
public boolean canBuild()
{
- try
- {
- return isOp() || com.nijikokun.bukkit.Permissions.Permissions.Security.canGroupBuild(getWorld().getName(), getGroup());
- }
- catch (Throwable ex)
- {
- return true;
- }
+ return ess.getPermissionsHandler().canBuild(base, getGroup());
}
public EntityPlayer getHandle()
diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java
index 461f8908f..b67788825 100644
--- a/Essentials/src/com/earth2me/essentials/Settings.java
+++ b/Essentials/src/com/earth2me/essentials/Settings.java
@@ -6,10 +6,8 @@ import org.bukkit.ChatColor;
import com.earth2me.essentials.commands.IEssentialsCommand;
import java.io.File;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.bukkit.entity.CreatureType;
import org.bukkit.inventory.ItemStack;
@@ -198,166 +196,7 @@ public class Settings implements IConf
return config.getBoolean("non-ess-in-help", true);
}
- public Map<String, Boolean> getEpSettings()
- {
- Map<String, Boolean> epSettings = new HashMap<String, Boolean>();
-
- epSettings.put("protect.protect.signs", config.getBoolean("protect.protect.signs", true));
- epSettings.put("protect.protect.rails", config.getBoolean("protect.protect.rails", true));
- epSettings.put("protect.protect.block-below", config.getBoolean("protect.protect.block-below", true));
- epSettings.put("protect.protect.prevent-block-on-rails", config.getBoolean("protect.protect.prevent-block-on-rails", false));
- return epSettings;
- }
-
- public Map<String, String> getEpDBSettings()
- {
- Map<String, String> epSettings = new HashMap<String, String>();
- epSettings.put("protect.datatype", config.getString("protect.datatype", "sqlite"));
- epSettings.put("protect.username", config.getString("protect.username", "root"));
- epSettings.put("protect.password", config.getString("protect.password", "root"));
- epSettings.put("protect.mysqlDb", config.getString("protect.mysqlDb", "jdbc:mysql://localhost:3306/minecraft"));
- return epSettings;
- }
-
- public List<Integer> getEpAlertOnPlacement()
- {
- final List<Integer> epAlertPlace = new ArrayList<Integer>();
- for (String itemName : config.getString("protect.alert.on-placement", "").split(",")) {
- itemName = itemName.trim();
- if (itemName.isEmpty()) {
- continue;
- }
- ItemStack is;
- try {
- is = ItemDb.get(itemName);
- epAlertPlace.add(is.getTypeId());
- } catch (Exception ex) {
- logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "alert.on-placement"));
- }
- }
- return epAlertPlace;
- }
-
- public List<Integer> getEpAlertOnUse()
- {
- final List<Integer> epAlertUse = new ArrayList<Integer>();
- for (String itemName : config.getString("protect.alert.on-use", "").split(",")) {
- itemName = itemName.trim();
- if (itemName.isEmpty()) {
- continue;
- }
- ItemStack is;
- try {
- is = ItemDb.get(itemName);
- epAlertUse.add(is.getTypeId());
- } catch (Exception ex) {
- logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "alert.on-use"));
- }
- }
- return epAlertUse;
- }
-
- public List<Integer> getEpAlertOnBreak()
- {
- final List<Integer> epAlertPlace = new ArrayList<Integer>();
- for (String itemName : config.getString("protect.alert.on-break", "").split(",")) {
- itemName = itemName.trim();
- if (itemName.isEmpty()) {
- continue;
- }
- ItemStack is;
- try {
- is = ItemDb.get(itemName);
- epAlertPlace.add(is.getTypeId());
- } catch (Exception ex) {
- logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "alert.on-break"));
- }
- }
- return epAlertPlace;
- }
-
- public List<Integer> epBlackListPlacement()
- {
- final List<Integer> epBlacklistPlacement = new ArrayList<Integer>();
- for (String itemName : config.getString("protect.blacklist.placement", "").split(",")) {
- itemName = itemName.trim();
- if (itemName.isEmpty()) {
- continue;
- }
- ItemStack is;
- try {
- is = ItemDb.get(itemName);
- epBlacklistPlacement.add(is.getTypeId());
- } catch (Exception ex) {
- logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "blacklist.placement"));
- }
- }
- return epBlacklistPlacement;
- }
-
- public List<Integer> epBlackListUsage()
- {
- final List<Integer> epBlackListUsage = new ArrayList<Integer>();
- for (String itemName : config.getString("protect.blacklist.usage", "").split(",")) {
- itemName = itemName.trim();
- if (itemName.isEmpty()) {
- continue;
- }
- ItemStack is;
- try {
- is = ItemDb.get(itemName);
- epBlackListUsage.add(is.getTypeId());
- } catch (Exception ex) {
- logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "blacklist.usage"));
- }
- }
- return epBlackListUsage;
- }
-
- public Map<String, Boolean> getEpGuardSettings()
- {
- final Map<String, Boolean> epSettings = new HashMap<String, Boolean>();
- epSettings.put("protect.prevent.lava-flow", config.getBoolean("protect.prevent.lava-flow", false));
- epSettings.put("protect.prevent.water-flow", config.getBoolean("protect.prevent.water-flow", false));
- epSettings.put("protect.prevent.water-bucket-flow", config.getBoolean("protect.prevent.water-bucket-flow", false));
- epSettings.put("protect.prevent.fire-spread", config.getBoolean("protect.prevent.fire-spread", true));
- epSettings.put("protect.prevent.flint-fire", config.getBoolean("protect.prevent.flint-fire", false));
- epSettings.put("protect.prevent.portal-creation", config.getBoolean("protect.prevent.portal-creation", false));
- epSettings.put("protect.prevent.lava-fire-spread", config.getBoolean("protect.prevent.lava-fire-spread", true));
- epSettings.put("protect.prevent.tnt-explosion", config.getBoolean("protect.prevent.tnt-explosion", false));
- epSettings.put("protect.prevent.creeper-explosion", config.getBoolean("protect.prevent.creeper-explosion", false));
- epSettings.put("protect.prevent.creeper-playerdamage", config.getBoolean("protect.prevent.creeper-playerdamage", false));
- epSettings.put("protect.prevent.creeper-blockdamage", config.getBoolean("protect.prevent.creeper-blockdamage", false));
- epSettings.put("protect.prevent.entitytarget", config.getBoolean("protect.prevent.entitytarget", false));
- for (CreatureType ct : CreatureType.values()) {
- final String name = ct.toString().toLowerCase();
- epSettings.put("protect.prevent.spawn."+name, config.getBoolean("protect.prevent.spawn."+name, false));
- }
- epSettings.put("protect.prevent.lightning-fire-spread", config.getBoolean("protect.prevent.lightning-fire-spread", true));
- return epSettings;
- }
-
- public Map<String, Boolean> getEpPlayerSettings()
- {
- final Map<String, Boolean> epPlayerSettings = new HashMap<String, Boolean>();
- epPlayerSettings.put("protect.disable.fall", config.getBoolean("protect.disable.fall", false));
- epPlayerSettings.put("protect.disable.pvp", config.getBoolean("protect.disable.pvp", false));
- epPlayerSettings.put("protect.disable.drown", config.getBoolean("protect.disable.drown", false));
- epPlayerSettings.put("protect.disable.suffocate", config.getBoolean("protect.disable.suffocate", false));
- epPlayerSettings.put("protect.disable.lavadmg", config.getBoolean("protect.disable.lavadmg", false));
- epPlayerSettings.put("protect.disable.projectiles", config.getBoolean("protect.disable.projectiles", false));
- epPlayerSettings.put("protect.disable.contactdmg", config.getBoolean("protect.disable.contactdmg", false));
- epPlayerSettings.put("protect.disable.firedmg", config.getBoolean("protect.disable.firedmg", false));
- epPlayerSettings.put("protect.disable.build", config.getBoolean("protect.disable.build", false));
- epPlayerSettings.put("protect.disable.lightning", config.getBoolean("protect.disable.lightning", false));
- epPlayerSettings.put("protect.disable.weather.lightning", config.getBoolean("protect.disable.weather.lightning", false));
- epPlayerSettings.put("protect.disable.weather.storm", config.getBoolean("protect.disable.weather.storm", false));
- epPlayerSettings.put("protect.disable.weather.thunder", config.getBoolean("protect.disable.weather.thunder", false));
- return epPlayerSettings;
-
- }
-
- public int getEpCreeperMaxHeight()
+ public int getProtectCreeperMaxHeight()
{
return config.getInt("protect.creeper.max-height", -1);
}
@@ -421,9 +260,9 @@ public class Settings implements IConf
config.load();
}
- public ArrayList<Integer> itemSpawnBlacklist()
+ public List<Integer> itemSpawnBlacklist()
{
- ArrayList<Integer> epItemSpwn = new ArrayList<Integer>();
+ final List<Integer> epItemSpwn = new ArrayList<Integer>();
for (String itemName : config.getString("item-spawn-blacklist", "").split(",")) {
itemName = itemName.trim();
if (itemName.isEmpty()) {
@@ -440,25 +279,6 @@ public class Settings implements IConf
return epItemSpwn;
}
- public ArrayList<Integer> epBlockBreakingBlacklist()
- {
- ArrayList<Integer> epBreakList = new ArrayList<Integer>();
- for (String itemName : config.getString("protect.blacklist.break", "").split(",")) {
- itemName = itemName.trim();
- if (itemName.isEmpty()) {
- continue;
- }
- ItemStack is;
- try {
- is = ItemDb.get(itemName);
- epBreakList.add(is.getTypeId());
- } catch (Exception ex) {
- logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "blacklist.break"));
- }
- }
- return epBreakList;
- }
-
public boolean spawnIfNoHome()
{
return config.getBoolean("spawn-if-no-home", false);
@@ -516,4 +336,38 @@ public class Settings implements IConf
{
return config.getBoolean("disable-eco", false);
}
+
+ public boolean getProtectPreventSpawn(final String creatureName)
+ {
+ return config.getBoolean("protect.prevent.spawn."+creatureName, false);
+ }
+
+ public List<Integer> getProtectList(final String configName)
+ {
+ final List<Integer> list = new ArrayList<Integer>();
+ for (String itemName : config.getString(configName, "").split(",")) {
+ itemName = itemName.trim();
+ if (itemName.isEmpty()) {
+ continue;
+ }
+ ItemStack itemStack;
+ try {
+ itemStack = ItemDb.get(itemName);
+ list.add(itemStack.getTypeId());
+ } catch (Exception ex) {
+ logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, configName));
+ }
+ }
+ return list;
+ }
+
+ public String getProtectString(final String configName)
+ {
+ return config.getString(configName, null);
+ }
+
+ public boolean getProtectBoolean(final String configName, boolean def)
+ {
+ return config.getBoolean(configName, def);
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java b/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java
new file mode 100644
index 000000000..0b7c136c7
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/TNTExplodeListener.java
@@ -0,0 +1,82 @@
+package com.earth2me.essentials;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import net.minecraft.server.ChunkPosition;
+import net.minecraft.server.Packet60Explosion;
+import org.bukkit.Location;
+import org.bukkit.block.Block;
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.craftbukkit.CraftWorld;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Player;
+import org.bukkit.event.entity.EntityExplodeEvent;
+import org.bukkit.event.entity.EntityListener;
+
+
+public class TNTExplodeListener extends EntityListener implements Runnable
+{
+ private final IEssentials ess;
+ private boolean enabled = false;
+ private int timer = -1;
+
+ public TNTExplodeListener(IEssentials ess)
+ {
+ this.ess = ess;
+ }
+
+ public void enable()
+ {
+ if (!enabled)
+ {
+ enabled = true;
+ timer = ess.scheduleSyncDelayedTask(this, 1000);
+ return;
+ }
+ if (timer != -1) {
+ ess.getScheduler().cancelTask(timer);
+ timer = ess.scheduleSyncDelayedTask(this, 1000);
+ }
+ }
+
+ @Override
+ public void onEntityExplode(final EntityExplodeEvent event)
+ {
+ if (!enabled)
+ {
+ return;
+ }
+ if (event.getEntity() instanceof LivingEntity)
+ {
+ return;
+ }
+ final Set<ChunkPosition> set = new HashSet<ChunkPosition>(event.blockList().size());
+ final Player[] players = ess.getServer().getOnlinePlayers();
+ final List<ChunkPosition> blocksUnderPlayers = new ArrayList<ChunkPosition>(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)ess.getServer()).getHandle().a(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));
+ event.setCancelled(true);
+ }
+
+ public void run()
+ {
+ enabled = false;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/TargetBlock.java b/Essentials/src/com/earth2me/essentials/TargetBlock.java
index ec9cd796e..d1f2e5cbb 100644
--- a/Essentials/src/com/earth2me/essentials/TargetBlock.java
+++ b/Essentials/src/com/earth2me/essentials/TargetBlock.java
@@ -1,599 +1,526 @@
package com.earth2me.essentials;
-import java.util.ArrayList;
+import java.util.List;
import org.bukkit.block.Block;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
-import org.bukkit.util.Vector;
+
+
/**
- * @author toi
- * Thanks to Raphfrk for optimization of this class.
+ * Original authors: toi & Raphfrk
*/
-public class TargetBlock {
-
- private Location loc;
- private double viewHeight;
- private int maxDistance;
- private int[] blockToIgnore;
- private double checkDistance, curDistance;
- private double xRotation, yRotation;
- private Vector targetPos = new Vector();
- private Vector targetPosDouble = new Vector();
- private Vector prevPos = new Vector();
- private final Vector offset = new Vector();
-
- /**
- * Constructor requiring a player, uses default values
- *
- * @param player Player to work with
- */
- public TargetBlock(Player player)
- {
- this.setValues(player.getLocation(), 300, 1.65, 0.2, null);
- }
-
- /**
- * Constructor requiring a location, uses default values
- *
- * @param loc Location to work with
- */
- public TargetBlock(Location loc)
- {
- this.setValues(loc, 300, 0, 0.2, null);
- }
-
- /**
- * Constructor requiring a player, max distance and a checking distance
- *
- * @param player Player to work with
- * @param maxDistance How far it checks for blocks
- * @param checkDistance How often to check for blocks, the smaller the more precise
- */
- public TargetBlock(Player player, int maxDistance, double checkDistance)
- {
- this.setValues(player.getLocation(), maxDistance, 1.65, checkDistance, null);
- }
-
- /**
- * Constructor requiring a location, max distance and a checking distance
- *
- * @param loc What location to work with
- * @param maxDistance How far it checks for blocks
- * @param checkDistance How often to check for blocks, the smaller the more precise
- */
- public TargetBlock(Location loc, int maxDistance, double checkDistance) {
- this.setValues(loc, maxDistance, 0, checkDistance, null);
- }
-
- /**
- * Constructor requiring a player, max distance, checking distance and an array of blocks to ignore
- *
- * @param player What player to work with
- * @param maxDistance How far it checks for blocks
- * @param checkDistance How often to check for blocks, the smaller the more precise
- * @param blocksToIgnore Integer array of what block ids to ignore while checking for viable targets
- */
- public TargetBlock (Player player, int maxDistance, double checkDistance, int[] blocksToIgnore)
- {
- this.setValues(player.getLocation(), maxDistance, 1.65, checkDistance, blocksToIgnore);
- }
-
- /**
- * Constructor requiring a location, max distance, checking distance and an array of blocks to ignore
- *
- * @param loc What location to work with
- * @param maxDistance How far it checks for blocks
- * @param checkDistance How often to check for blocks, the smaller the more precise
- * @param blocksToIgnore Array of what block ids to ignore while checking for viable targets
- */
- public TargetBlock (Location loc, int maxDistance, double checkDistance, int[] blocksToIgnore)
- {
- this.setValues(loc, maxDistance, 0, checkDistance, blocksToIgnore);
- }
-
- /**
- * Constructor requiring a player, max distance, checking distance and an array of blocks to ignore
- *
- * @param player What player to work with
- * @param maxDistance How far it checks for blocks
- * @param checkDistance How often to check for blocks, the smaller the more precise
- * @param blocksToIgnore String ArrayList of what block ids to ignore while checking for viable targets
- */
- public TargetBlock (Player player, int maxDistance, double checkDistance, ArrayList<String> blocksToIgnore)
- {
- int[] bti = this.convertStringArraytoIntArray(blocksToIgnore);
- this.setValues(player.getLocation(), maxDistance, 1.65, checkDistance, bti);
- }
-
- /**
- * Constructor requiring a location, max distance, checking distance and an array of blocks to ignore
- *
- * @param loc What location to work with
- * @param maxDistance How far it checks for blocks
- * @param checkDistance How often to check for blocks, the smaller the more precise
- * @param blocksToIgnore String ArrayList of what block ids to ignore while checking for viable targets
- */
- public TargetBlock (Location loc, int maxDistance, double checkDistance, ArrayList<String> blocksToIgnore)
- {
- int[] bti = this.convertStringArraytoIntArray(blocksToIgnore);
- this.setValues(loc, maxDistance, 0, checkDistance, bti);
- }
-
- /**
- * Set the values, all constructors uses this function
- *
- * @param loc Location of the view
- * @param maxDistance How far it checks for blocks
- * @param viewPos Where the view is positioned in y-axis
- * @param checkDistance How often to check for blocks, the smaller the more precise
- * @param blocksToIgnore Ids of blocks to ignore while checking for viable targets
- */
- private void setValues(Location loc, int maxDistance, double viewHeight, double checkDistance, int[] blocksToIgnore)
- {
- this.loc = loc;
- this.maxDistance = maxDistance;
- this.viewHeight = viewHeight;
- this.checkDistance = checkDistance;
- this.blockToIgnore = blocksToIgnore;
- this.curDistance = 0;
- xRotation = (loc.getYaw() + 90) % 360;
- yRotation = loc.getPitch() * -1;
-
- double h = (checkDistance * Math.cos(Math.toRadians(yRotation)));
- offset.setY((checkDistance * Math.sin(Math.toRadians(yRotation))));
- offset.setX((h * Math.cos(Math.toRadians(xRotation))));
- offset.setZ((h * Math.sin(Math.toRadians(xRotation))));
-
- targetPosDouble = new Vector(loc.getX(), loc.getY() + viewHeight, loc.getZ());
- targetPos = new Vector( targetPosDouble.getBlockX(), targetPosDouble.getBlockY(), targetPosDouble.getBlockZ());
- prevPos = targetPos.clone();
- }
-
- /**
- * Call this to reset checking position to allow you to check for a new target with the same TargetBlock instance.
- */
- public void reset()
- {
- targetPosDouble = new Vector(loc.getX(), loc.getY() + viewHeight, loc.getZ());
- targetPos = new Vector( targetPosDouble.getBlockX(), targetPosDouble.getBlockY(), targetPosDouble.getBlockZ());
- prevPos = targetPos.clone();
- this.curDistance = 0;
- }
-
- /**
- * Gets the distance to a block. Measures from the block underneath the player to the targetblock
- * Should only be used when passing player as an constructor parameter
- *
- * @return double
- */
- public double getDistanceToBlock()
- {
- Vector blockUnderPlayer = new Vector(
- (int) Math.floor(loc.getX() + 0.5),
- (int) Math.floor(loc.getY() - 0.5),
- (int) Math.floor(loc.getZ() + 0.5));
-
- Block blk = getTargetBlock();
- double x = blk.getX() - blockUnderPlayer.getBlockX();
- double y = blk.getY() - blockUnderPlayer.getBlockY();
- double z = blk.getZ() - blockUnderPlayer.getBlockZ();
-
- return Math.sqrt((Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2)));
- }
-
- /**
- * Gets the rounded distance to a block. Measures from the block underneath the player to the targetblock
- * Should only be used when passing player as an constructor parameter
- *
- * @return int
- */
- public int getDistanceToBlockRounded()
- {
- Vector blockUnderPlayer = new Vector(
- (int) Math.floor(loc.getX() + 0.5),
- (int) Math.floor(loc.getY() - 0.5),
- (int) Math.floor(loc.getZ() + 0.5));
-
- Block blk = getTargetBlock();
- double x = blk.getX() - blockUnderPlayer.getBlockX();
- double y = blk.getY() - blockUnderPlayer.getBlockY();
- double z = blk.getZ() - blockUnderPlayer.getBlockZ();
-
- return (int) Math.round((Math.sqrt((Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2)))));
- }
-
- /**
- * Gets the floored x distance to a block.
- *
- * @return int
- */
- public int getXDistanceToBlock()
- {
- this.reset();
- return (int) Math.floor(getTargetBlock().getX() - loc.getBlockX() + 0.5);
- }
-
- /**
- * Gets the floored y distance to a block
- *
- * @return int
- */
- public int getYDistanceToBlock()
- {
- this.reset();
- return (int) Math.floor(getTargetBlock().getY() - loc.getBlockY() + viewHeight);
- }
-
- /**
- * Gets the floored z distance to a block
- *
- * @return int
- */
- public int getZDistanceToBlock()
- {
- this.reset();
- return (int) Math.floor(getTargetBlock().getZ() - loc.getBlockZ() + 0.5);
- }
-
- /**
- * Returns the block at the sight. Returns null if out of range or if no viable target was found
- *
- * @return Block
- */
- @SuppressWarnings("empty-statement")
- public Block getTargetBlock()
- {
- this.reset();
- while ((getNextBlock() != null) && ((getCurrentBlock().getTypeId() == 0) || this.blockToIgnoreHasValue(getCurrentBlock().getTypeId())));
- return getCurrentBlock();
- }
-
- /**
- * Sets the type of the block at the sight. Returns false if the block wasn't set.
- *
- * @param typeID ID of type to set the block to
- * @return boolean
- */
- @SuppressWarnings("empty-statement")
- public boolean setTargetBlock(int typeID)
- {
- if (Material.getMaterial(typeID) != null)
- {
- this.reset();
- while (getNextBlock() != null && getCurrentBlock().getTypeId() == 0);
- if (getCurrentBlock() != null)
- {
- Block blk = loc.getWorld().getBlockAt(targetPos.getBlockX(), targetPos.getBlockY(), targetPos.getBlockZ());
- blk.setTypeId(typeID);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Sets the type of the block at the sight. Returns false if the block wasn't set.
- *
- * @param type Material to set the block to
- * @return boolean
- */
- @SuppressWarnings("empty-statement")
- public boolean setTargetBlock(Material type)
- {
- this.reset();
- while ((getNextBlock() != null) && ((getCurrentBlock().getTypeId() == 0) || this.blockToIgnoreHasValue(getCurrentBlock().getTypeId())));
- if (getCurrentBlock() != null)
- {
- Block blk = loc.getWorld().getBlockAt(targetPos.getBlockX(), targetPos.getBlockY(), targetPos.getBlockZ());
- blk.setType(type);
- return true;
- }
- return false;
- }
-
- /**
- * Sets the type of the block at the sight. Returns false if the block wasn't set.
- * Observe! At the moment this function is using the built-in enumerator function .valueOf(String) but would preferably be changed to smarter function, when implemented
- *
- * @param type Name of type to set the block to
- * @return boolean
- */
- @SuppressWarnings("empty-statement")
- public boolean setTargetBlock(String type)
- {
- Material mat = Material.valueOf(type);
- if (mat != null)
- {
- this.reset();
- while ((getNextBlock() != null) && ((getCurrentBlock().getTypeId() == 0) || this.blockToIgnoreHasValue(getCurrentBlock().getTypeId())));
- if (getCurrentBlock() != null)
- {
- Block blk = loc.getWorld().getBlockAt(targetPos.getBlockX(), targetPos.getBlockY(), targetPos.getBlockZ());
- blk.setType(mat);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns the block attached to the face at the sight. Returns null if out of range or if no viable target was found
- *
- * @return Block
- */
+public class TargetBlock
+{
+ private transient final Location location;
+ private transient final double viewHeight;
+ private transient final int maxDistance;
+ private transient final int[] blockToIgnore;
+ private transient final double checkDistance;
+ private transient double curDistance;
+ private transient double targetPositionX;
+ private transient double targetPositionY;
+ private transient double targetPositionZ;
+ private transient int itargetPositionX;
+ private transient int itargetPositionY;
+ private transient int itargetPositionZ;
+ private transient int prevPositionX;
+ private transient int prevPositionY;
+ private transient int prevPositionZ;
+ private transient final double offsetX;
+ private transient final double offsetY;
+ private transient final double offsetZ;
+
+ /**
+ * Constructor requiring a player, uses default values
+ *
+ * @param player Player to work with
+ */
+ public TargetBlock(final Player player)
+ {
+ this(player.getLocation(), 300, 1.65, 0.2, null);
+ }
+
+ /**
+ * Constructor requiring a location, uses default values
+ *
+ * @param loc Location to work with
+ */
+ public TargetBlock(final Location loc)
+ {
+ this(loc, 300, 0, 0.2, null);
+ }
+
+ /**
+ * Constructor requiring a player, max distance and a checking distance
+ *
+ * @param player Player to work with
+ * @param maxDistance How far it checks for blocks
+ * @param checkDistance How often to check for blocks, the smaller the more precise
+ */
+ public TargetBlock(final Player player, final int maxDistance, final double checkDistance)
+ {
+ this(player.getLocation(), maxDistance, 1.65, checkDistance, null);
+ }
+
+ /**
+ * Constructor requiring a location, max distance and a checking distance
+ *
+ * @param loc What location to work with
+ * @param maxDistance How far it checks for blocks
+ * @param checkDistance How often to check for blocks, the smaller the more precise
+ */
+ public TargetBlock(final Location loc, final int maxDistance, final double checkDistance)
+ {
+ this(loc, maxDistance, 0, checkDistance, null);
+ }
+
+ /**
+ * Constructor requiring a player, max distance, checking distance and an array of blocks to ignore
+ *
+ * @param player What player to work with
+ * @param maxDistance How far it checks for blocks
+ * @param checkDistance How often to check for blocks, the smaller the more precise
+ * @param blocksToIgnore Integer array of what block ids to ignore while checking for viable targets
+ */
+ public TargetBlock(final Player player, final int maxDistance, final double checkDistance, final int[] blocksToIgnore)
+ {
+ this(player.getLocation(), maxDistance, 1.65, checkDistance, blocksToIgnore);
+ }
+
+ /**
+ * Constructor requiring a location, max distance, checking distance and an array of blocks to ignore
+ *
+ * @param loc What location to work with
+ * @param maxDistance How far it checks for blocks
+ * @param checkDistance How often to check for blocks, the smaller the more precise
+ * @param blocksToIgnore Array of what block ids to ignore while checking for viable targets
+ */
+ public TargetBlock(final Location loc, final int maxDistance, final double checkDistance, final int[] blocksToIgnore)
+ {
+ this(loc, maxDistance, 0, checkDistance, blocksToIgnore);
+ }
+
+ /**
+ * Constructor requiring a player, max distance, checking distance and an array of blocks to ignore
+ *
+ * @param player What player to work with
+ * @param maxDistance How far it checks for blocks
+ * @param checkDistance How often to check for blocks, the smaller the more precise
+ * @param blocksToIgnore String ArrayList of what block ids to ignore while checking for viable targets
+ */
+ public TargetBlock(final Player player, final int maxDistance, final double checkDistance, final List<String> blocksToIgnore)
+ {
+ this(player.getLocation(), maxDistance, 1.65, checkDistance, TargetBlock.convertStringArraytoIntArray(blocksToIgnore));
+ }
+
+ /**
+ * Constructor requiring a location, max distance, checking distance and an array of blocks to ignore
+ *
+ * @param loc What location to work with
+ * @param maxDistance How far it checks for blocks
+ * @param checkDistance How often to check for blocks, the smaller the more precise
+ * @param blocksToIgnore String ArrayList of what block ids to ignore while checking for viable targets
+ */
+ public TargetBlock(final Location loc, final int maxDistance, final double checkDistance, final List<String> blocksToIgnore)
+ {
+ this(loc, maxDistance, 0, checkDistance, TargetBlock.convertStringArraytoIntArray(blocksToIgnore));
+ }
+
+ /**
+ * Set the values, all constructors uses this function
+ *
+ * @param loc Location of the view
+ * @param maxDistance How far it checks for blocks
+ * @param viewPos Where the view is positioned in y-axis
+ * @param checkDistance How often to check for blocks, the smaller the more precise
+ * @param blocksToIgnore Ids of blocks to ignore while checking for viable targets
+ */
+ private TargetBlock(final Location loc, final int maxDistance, final double viewHeight, final double checkDistance, final int[] blocksToIgnore)
+ {
+ this.location = loc;
+ this.maxDistance = maxDistance;
+ this.viewHeight = viewHeight;
+ this.checkDistance = checkDistance;
+ if (blocksToIgnore == null || blocksToIgnore.length == 0)
+ {
+ this.blockToIgnore = new int[0];
+ }
+ else
+ {
+ this.blockToIgnore = new int[blocksToIgnore.length];
+ System.arraycopy(blocksToIgnore, 0, this.blockToIgnore, 0, this.blockToIgnore.length);
+ }
+
+ final double xRotation = (loc.getYaw() + 90) % 360;
+ final double yRotation = loc.getPitch() * -1;
+
+ final double hypotenuse = (checkDistance * Math.cos(Math.toRadians(yRotation)));
+ offsetX = hypotenuse * Math.cos(Math.toRadians(xRotation));
+ offsetY = checkDistance * Math.sin(Math.toRadians(yRotation));
+ offsetZ = hypotenuse * Math.sin(Math.toRadians(xRotation));
+
+ reset();
+ }
+
+ /**
+ * Call this to reset checking position to allow you to check for a new target with the same TargetBlock instance.
+ */
+ public final void reset()
+ {
+ targetPositionX = location.getX();
+ targetPositionY = location.getY() + viewHeight;
+ targetPositionZ = location.getZ();
+ itargetPositionX = (int)Math.floor(targetPositionX);
+ itargetPositionY = (int)Math.floor(targetPositionY);
+ itargetPositionZ = (int)Math.floor(targetPositionZ);
+ prevPositionX = itargetPositionX;
+ prevPositionY = itargetPositionY;
+ prevPositionZ = itargetPositionZ;
+ this.curDistance = 0;
+ }
+
+ /**
+ * Gets the distance to a block. Measures from the block underneath the player to the targetblock
+ * Should only be used when passing player as an constructor parameter
+ *
+ * @return double
+ */
+ public double getDistanceToBlock()
+ {
+ final double blockUnderPlayerX = Math.floor(location.getX() + 0.5);
+ final double blockUnderPlayerY = Math.floor(location.getY() - 0.5);
+ final double blockUnderPlayerZ = Math.floor(location.getZ() + 0.5);
+
+ final Block block = getTargetBlock();
+ final double distX = block.getX() - blockUnderPlayerX;
+ final double distY = block.getY() - blockUnderPlayerY;
+ final double distZ = block.getZ() - blockUnderPlayerZ;
+
+ return Math.sqrt(distX*distX + distY*distY + distZ*distZ);
+ }
+
+ /**
+ * Gets the rounded distance to a block. Measures from the block underneath the player to the targetblock
+ * Should only be used when passing player as an constructor parameter
+ *
+ * @return int
+ */
+ public int getDistanceToBlockRounded()
+ {
+ return (int)Math.round(getDistanceToBlock());
+ }
+
+ /**
+ * Gets the floored x distance to a block.
+ *
+ * @return int
+ */
+ public int getXDistanceToBlock()
+ {
+ return (int)Math.floor(getTargetBlock().getX() - location.getBlockX() + 0.5);
+ }
+
+ /**
+ * Gets the floored y distance to a block
+ *
+ * @return int
+ */
+ public int getYDistanceToBlock()
+ {
+ return (int)Math.floor(getTargetBlock().getY() - location.getBlockY() + viewHeight);
+ }
+
+ /**
+ * Gets the floored z distance to a block
+ *
+ * @return int
+ */
+ public int getZDistanceToBlock()
+ {
+ return (int)Math.floor(getTargetBlock().getZ() - location.getBlockZ() + 0.5);
+ }
+
+ /**
+ * Returns the block at the sight. Returns null if out of range or if no viable target was found
+ *
+ * @return Block
+ */
+ public Block getTargetBlock()
+ {
+ this.reset();
+ Block block;
+ do
+ {
+ block = getNextBlock();
+ }
+ while (block != null && ((block.getTypeId() == 0) || this.blockIsIgnored(block.getTypeId())));
+
+ return block;
+ }
+
+ /**
+ * Sets the type of the block at the sight. Returns false if the block wasn't set.
+ *
+ * @param typeID ID of type to set the block to
+ * @return boolean
+ */
+ public boolean setTargetBlock(final int typeID)
+ {
+ return setTargetBlock(Material.getMaterial(typeID));
+ }
+
+ /**
+ * Sets the type of the block at the sight. Returns false if the block wasn't set.
+ *
+ * @param type Material to set the block to
+ * @return boolean
+ */
@SuppressWarnings("empty-statement")
- public Block getFaceBlock()
- {
- while ((getNextBlock() != null) && ((getCurrentBlock().getTypeId() == 0) || this.blockToIgnoreHasValue(getCurrentBlock().getTypeId())));
- if (getCurrentBlock() != null)
- {
- return getPreviousBlock();
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Sets the type of the block attached to the face at the sight. Returns false if the block wasn't set.
- *
- * @param typeID
- * @return boolean
- */
- public boolean setFaceBlock(int typeID)
- {
- if (Material.getMaterial(typeID) != null)
- {
- if (getCurrentBlock() != null)
- {
- Block blk = loc.getWorld().getBlockAt(prevPos.getBlockX(), prevPos.getBlockY(), prevPos.getBlockZ());
- blk.setTypeId(typeID);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Sets the type of the block attached to the face at the sight. Returns false if the block wasn't set.
- *
- * @param type
- * @return boolean
- */
- public boolean setFaceBlock(Material type)
- {
- if (getCurrentBlock() != null)
- {
- Block blk = loc.getWorld().getBlockAt(prevPos.getBlockX(), prevPos.getBlockY(), prevPos.getBlockZ());
- blk.setType(type);
- return true;
- }
- return false;
- }
-
- /**
- * Sets the type of the block attached to the face at the sight. Returns false if the block wasn't set.
- * Observe! At the moment this function is using the built-in enumerator function .valueOf(String) but would preferably be changed to smarter function, when implemented
- *
- * @param type
- * @return boolean
- */
- public boolean setFaceBlock(String type)
- {
- Material mat = Material.valueOf(type);
- if (mat != null)
- {
- if (getCurrentBlock() != null)
- {
- Block blk = loc.getWorld().getBlockAt(prevPos.getBlockX(), prevPos.getBlockY(), prevPos.getBlockZ());
- blk.setType(mat);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Get next block
- *
- * @return Block
- */
- public Block getNextBlock()
- {
- prevPos = targetPos.clone();
- do
- {
- curDistance += checkDistance;
-
- targetPosDouble.setX(offset.getX() + targetPosDouble.getX());
- targetPosDouble.setY(offset.getY() + targetPosDouble.getY());
- targetPosDouble.setZ(offset.getZ() + targetPosDouble.getZ());
- targetPos = new Vector( targetPosDouble.getBlockX(), targetPosDouble.getBlockY(), targetPosDouble.getBlockZ());
- }
- while (curDistance <= maxDistance && targetPos.getBlockX() == prevPos.getBlockX() && targetPos.getBlockY() == prevPos.getBlockY() && targetPos.getBlockZ() == prevPos.getBlockZ());
- if (curDistance > maxDistance)
- {
- return null;
- }
-
- return this.loc.getWorld().getBlockAt(this.targetPos.getBlockX(), this.targetPos.getBlockY(), this.targetPos.getBlockZ());
- }
-
- /**
- * Returns the current block along the line of vision
- *
- * @return Block
- */
- public Block getCurrentBlock()
- {
- if (curDistance > maxDistance)
- {
- return null;
- }
- else
- {
- return this.loc.getWorld().getBlockAt(this.targetPos.getBlockX(), this.targetPos.getBlockY(), this.targetPos.getBlockZ());
- }
- }
-
- /**
- * Sets current block type. Returns false if the block wasn't set.
- *
- * @param typeID
- */
- public boolean setCurrentBlock(int typeID)
- {
- if (Material.getMaterial(typeID) != null)
- {
- Block blk = getCurrentBlock();
- if (blk != null)
- {
- blk.setTypeId(typeID);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Sets current block type. Returns false if the block wasn't set.
- *
- * @param type
- */
- public boolean setCurrentBlock(Material type)
- {
- Block blk = getCurrentBlock();
- if (blk != null)
- {
- blk.setType(type);
- return true;
- }
- return false;
- }
-
- /**
- * Sets current block type. Returns false if the block wasn't set.
- * Observe! At the moment this function is using the built-in enumerator function .valueOf(String) but would preferably be changed to smarter function, when implemented
- *
- * @param type
- */
- public boolean setCurrentBlock(String type)
- {
- Material mat = Material.valueOf(type);
- if (mat != null)
- {
- Block blk = getCurrentBlock();
- if (blk != null)
- {
- blk.setType(mat);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns the previous block in the aimed path
- *
- * @return Block
- */
- public Block getPreviousBlock()
- {
- return this.loc.getWorld().getBlockAt(prevPos.getBlockX(), prevPos.getBlockY(), prevPos.getBlockZ());
- }
-
- /**
- * Sets previous block type id. Returns false if the block wasn't set.
- *
- * @param typeID
- */
- public boolean setPreviousBlock(int typeID)
- {
- if (Material.getMaterial(typeID) != null)
- {
- Block blk = getPreviousBlock();
- if (blk != null)
- {
- blk.setTypeId(typeID);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Sets previous block type id. Returns false if the block wasn't set.
- *
- * @param type
- */
- public boolean setPreviousBlock(Material type)
- {
- Block blk = getPreviousBlock();
- if (blk != null)
- {
- blk.setType(type);
- return true;
- }
- return false;
- }
-
- /**
- * Sets previous block type id. Returns false if the block wasn't set.
- * Observe! At the moment this function is using the built-in enumerator function .valueOf(String) but would preferably be changed to smarter function, when implemented
- *
- * @param type
- */
- public boolean setPreviousBlock(String type)
- {
- Material mat = Material.valueOf(type);
- if (mat != null)
- {
- Block blk = getPreviousBlock();
- if (blk != null)
- {
- blk.setType(mat);
- return true;
- }
- }
- return false;
- }
-
- private int[] convertStringArraytoIntArray(ArrayList<String> array)
- {
- if (array != null)
- {
- int intarray[] = new int[array.size()];
- for (int i = 0; i < array.size(); i++)
- {
- try
- {
- intarray[i] = Integer.parseInt(array.get(i));
- }
- catch (NumberFormatException nfe)
- {
- intarray[i] = 0;
- }
- }
- return intarray;
- }
- return null;
- }
-
- private boolean blockToIgnoreHasValue(int value)
- {
- if (this.blockToIgnore != null)
- {
- if (this.blockToIgnore.length > 0)
- {
- for (int i : this.blockToIgnore)
- {
- if (i == value)
- return true;
- }
- }
- }
- return false;
- }
+ public boolean setTargetBlock(final Material type)
+ {
+ if (type == null)
+ {
+ return false;
+ }
+ final Block block = getTargetBlock();
+ if (block != null)
+ {
+ block.setType(type);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Sets the type of the block at the sight. Returns false if the block wasn't set.
+ * Observe! At the moment this function is using the built-in enumerator function .valueOf(String) but would preferably be changed to smarter function, when implemented
+ *
+ * @param type Name of type to set the block to
+ * @return boolean
+ */
+ public boolean setTargetBlock(final String type)
+ {
+ return setTargetBlock(Material.valueOf(type));
+ }
+
+ /**
+ * Returns the block attached to the face at the sight. Returns null if out of range or if no viable target was found
+ *
+ * @return Block
+ */
+ public Block getFaceBlock()
+ {
+ final Block block = getTargetBlock();
+ if (block == null)
+ {
+ return null;
+ }
+ return getPreviousBlock();
+ }
+
+ /**
+ * Sets the type of the block attached to the face at the sight. Returns false if the block wasn't set.
+ *
+ * @param typeID
+ * @return boolean
+ */
+ public boolean setFaceBlock(final int typeID)
+ {
+ return setFaceBlock(Material.getMaterial(typeID));
+ }
+
+ /**
+ * Sets the type of the block attached to the face at the sight. Returns false if the block wasn't set.
+ *
+ * @param type
+ * @return boolean
+ */
+ public boolean setFaceBlock(final Material type)
+ {
+ if (type == null)
+ {
+ return false;
+ }
+ if (getCurrentBlock() != null)
+ {
+ final Block blk = location.getWorld().getBlockAt(prevPositionX, prevPositionY, prevPositionZ);
+ blk.setType(type);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Sets the type of the block attached to the face at the sight. Returns false if the block wasn't set.
+ * Observe! At the moment this function is using the built-in enumerator function .valueOf(String) but would preferably be changed to smarter function, when implemented
+ *
+ * @param type
+ * @return boolean
+ */
+ public boolean setFaceBlock(final String type)
+ {
+ return setFaceBlock(Material.valueOf(type));
+ }
+
+ /**
+ * Get next block
+ *
+ * @return Block
+ */
+ public Block getNextBlock()
+ {
+ prevPositionX = itargetPositionX;
+ prevPositionY = itargetPositionY;
+ prevPositionZ = itargetPositionZ;
+ do
+ {
+ curDistance += checkDistance;
+
+ targetPositionX += offsetX;
+ targetPositionY += offsetY;
+ targetPositionZ += offsetZ;
+ itargetPositionX = (int)Math.floor(targetPositionX);
+ itargetPositionY = (int)Math.floor(targetPositionY);
+ itargetPositionZ = (int)Math.floor(targetPositionZ);
+ }
+ while (curDistance <= maxDistance && itargetPositionX == prevPositionX && itargetPositionY == prevPositionY && itargetPositionZ == prevPositionZ);
+ if (curDistance > maxDistance)
+ {
+ return null;
+ }
+
+ return this.location.getWorld().getBlockAt(itargetPositionX, itargetPositionY, itargetPositionZ);
+ }
+
+ /**
+ * Returns the current block along the line of vision
+ *
+ * @return Block
+ */
+ public Block getCurrentBlock()
+ {
+ Block block;
+ if (curDistance <= maxDistance)
+ {
+ block = this.location.getWorld().getBlockAt(itargetPositionX, itargetPositionY, itargetPositionZ);
+ }
+ else
+ {
+ block = null;
+ }
+ return block;
+ }
+
+ /**
+ * Sets current block type. Returns false if the block wasn't set.
+ *
+ * @param typeID
+ */
+ public boolean setCurrentBlock(final int typeID)
+ {
+ return setCurrentBlock(Material.getMaterial(typeID));
+ }
+
+ /**
+ * Sets current block type. Returns false if the block wasn't set.
+ *
+ * @param type
+ */
+ public boolean setCurrentBlock(final Material type)
+ {
+ final Block blk = getCurrentBlock();
+ if (blk != null && type != null)
+ {
+ blk.setType(type);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Sets current block type. Returns false if the block wasn't set.
+ * Observe! At the moment this function is using the built-in enumerator function .valueOf(String) but would preferably be changed to smarter function, when implemented
+ *
+ * @param type
+ */
+ public boolean setCurrentBlock(final String type)
+ {
+ return setCurrentBlock(Material.valueOf(type));
+ }
+
+ /**
+ * Returns the previous block in the aimed path
+ *
+ * @return Block
+ */
+ public Block getPreviousBlock()
+ {
+ return this.location.getWorld().getBlockAt(prevPositionX, prevPositionY, prevPositionZ);
+ }
+
+ /**
+ * Sets previous block type id. Returns false if the block wasn't set.
+ *
+ * @param typeID
+ */
+ public boolean setPreviousBlock(final int typeID)
+ {
+ return setPreviousBlock(Material.getMaterial(typeID));
+ }
+
+ /**
+ * Sets previous block type id. Returns false if the block wasn't set.
+ *
+ * @param type
+ */
+ public boolean setPreviousBlock(final Material type)
+ {
+ final Block blk = getPreviousBlock();
+ if (blk != null && type != null)
+ {
+ blk.setType(type);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Sets previous block type id. Returns false if the block wasn't set.
+ * Observe! At the moment this function is using the built-in enumerator function .valueOf(String) but would preferably be changed to smarter function, when implemented
+ *
+ * @param type
+ */
+ public boolean setPreviousBlock(final String type)
+ {
+ return setPreviousBlock(Material.valueOf(type));
+ }
+
+ private static int[] convertStringArraytoIntArray(final List<String> array)
+ {
+ final int intarray[] = new int[array == null ? 0 : array.size()];
+ for (int i = 0; i < intarray.length; i++)
+ {
+ try
+ {
+ intarray[i] = Integer.parseInt(array.get(i));
+ }
+ catch (NumberFormatException nfe)
+ {
+ }
+ }
+ return intarray;
+ }
+
+ private boolean blockIsIgnored(final int value)
+ {
+ for (int i : this.blockToIgnore)
+ {
+ if (i == value)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
} \ No newline at end of file
diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java
index 404319ca8..e63d1699e 100644
--- a/Essentials/src/com/earth2me/essentials/Teleport.java
+++ b/Essentials/src/com/earth2me/essentials/Teleport.java
@@ -48,11 +48,11 @@ public class Teleport implements Runnable
private long initY;
private long initZ;
private Target teleportTarget;
- private Charge chargeFor;
+ private Trade chargeFor;
private final IEssentials ess;
private static final Logger logger = Logger.getLogger("Minecraft");
- private void initTimer(long delay, Target target, Charge chargeFor)
+ private void initTimer(long delay, Target target, Trade chargeFor)
{
this.started = System.currentTimeMillis();
this.delay = delay;
@@ -101,11 +101,7 @@ public class Teleport implements Runnable
}
catch (Throwable ex)
{
- user.sendMessage(Util.format("errorWithMessage", ex.getMessage()));
- if (ess.getSettings().isDebug())
- {
- logger.log(Level.WARNING, ex.getMessage(), ex);
- }
+ ess.showError(user.getBase(), ex, "teleport");
}
return;
}
@@ -122,12 +118,12 @@ public class Teleport implements Runnable
this.ess = ess;
}
- public void respawn(Spawn spawn, Charge chargeFor) throws Exception
+ public void respawn(Spawn spawn, Trade chargeFor) throws Exception
{
teleport(new Target(spawn.getSpawn(user.getGroup())), chargeFor);
}
- public void warp(String warp, Charge chargeFor) throws Exception
+ public void warp(String warp, Trade chargeFor) throws Exception
{
Location loc = ess.getWarps().getWarp(warp);
teleport(new Target(loc), chargeFor);
@@ -181,17 +177,17 @@ public class Teleport implements Runnable
cancel(false);
}
- public void teleport(Location loc, Charge chargeFor) throws Exception
+ public void teleport(Location loc, Trade chargeFor) throws Exception
{
teleport(new Target(loc), chargeFor);
}
- public void teleport(Entity entity, Charge chargeFor) throws Exception
+ public void teleport(Entity entity, Trade chargeFor) throws Exception
{
teleport(new Target(entity), chargeFor);
}
- private void teleport(Target target, Charge chargeFor) throws Exception
+ private void teleport(Target target, Trade chargeFor) throws Exception
{
double delay = ess.getSettings().getTeleportDelay();
@@ -234,7 +230,7 @@ public class Teleport implements Runnable
now(new Target(loc));
}
- public void now(Location loc, Charge chargeFor) throws Exception
+ public void now(Location loc, Trade chargeFor) throws Exception
{
cooldown(false);
chargeFor.charge(user);
@@ -247,7 +243,7 @@ public class Teleport implements Runnable
now(new Target(entity));
}
- public void back(Charge chargeFor) throws Exception
+ public void back(Trade chargeFor) throws Exception
{
teleport(new Target(user.getLastLocation()), chargeFor);
}
@@ -257,12 +253,12 @@ public class Teleport implements Runnable
back(null);
}
- public void home(Charge chargeFor) throws Exception
+ public void home(Trade chargeFor) throws Exception
{
home(user, chargeFor);
}
- public void home(IUser user, Charge chargeFor) throws Exception
+ public void home(IUser user, Trade chargeFor) throws Exception
{
Location loc = user.getHome(this.user.getLocation());
if (loc == null)
diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java
new file mode 100644
index 000000000..b4570d780
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/Trade.java
@@ -0,0 +1,123 @@
+package com.earth2me.essentials;
+
+import java.util.Map;
+import org.bukkit.inventory.ItemStack;
+
+
+public class Trade
+{
+ private final transient String command;
+ private final transient Double money;
+ private final transient ItemStack itemStack;
+ private final transient IEssentials ess;
+
+ public Trade(final String command, final IEssentials ess)
+ {
+ this(command, null, null, ess);
+ }
+
+ public Trade(final double money, final IEssentials ess)
+ {
+ this(null, money, null, ess);
+ }
+
+ public Trade(final ItemStack items, final IEssentials ess)
+ {
+ this(null, null, items, ess);
+ }
+
+ private Trade(final String command, final Double money, final ItemStack item, final IEssentials ess)
+ {
+ this.command = command;
+ this.money = money;
+ this.itemStack = item;
+ this.ess = ess;
+ }
+
+ public void isAffordableFor(final IUser user) throws ChargeException
+ {
+ final double mon = user.getMoney();
+ if (getMoney() != null
+ && mon < getMoney()
+ && !user.isAuthorized("essentials.eco.loan"))
+ {
+ throw new ChargeException(Util.i18n("notEnoughMoney"));
+ }
+
+ if (getItemStack() != null
+ && !InventoryWorkaround.containsItem(user.getInventory(), true, itemStack))
+ {
+ throw new ChargeException(Util.format("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase().replace("_", " ")));
+ }
+
+ 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)
+ && !user.isAuthorized("essentials.eco.loan"))
+ {
+ throw new ChargeException(Util.i18n("notEnoughMoney"));
+ }
+ }
+
+ public void pay(final IUser user)
+ {
+ if (getMoney() != null)
+ {
+ user.giveMoney(getMoney());
+ }
+ if (getItemStack() != null)
+ {
+ final Map<Integer, ItemStack> leftOver = InventoryWorkaround.addItem(user.getInventory(), true, getItemStack());
+ for (ItemStack itemStack : leftOver.values())
+ {
+ InventoryWorkaround.dropItem(user.getLocation(), itemStack);
+ }
+ user.updateInventory();
+ }
+ }
+
+ public void charge(final IUser user) throws ChargeException
+ {
+ if (getMoney() != null)
+ {
+ final double mon = user.getMoney();
+ if (mon < getMoney() && !user.isAuthorized("essentials.eco.loan"))
+ {
+ throw new ChargeException(Util.i18n("notEnoughMoney"));
+ }
+ user.takeMoney(getMoney());
+ }
+ if (getItemStack() != null)
+ {
+ if (!InventoryWorkaround.containsItem(user.getInventory(), true, itemStack))
+ {
+ throw new ChargeException(Util.format("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase().replace("_", " ")));
+ }
+ InventoryWorkaround.removeItem(user.getInventory(), true, getItemStack());
+ user.updateInventory();
+ }
+ if (command != null && !command.isEmpty()
+ && !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 && !user.isAuthorized("essentials.eco.loan"))
+ {
+ throw new ChargeException(Util.i18n("notEnoughMoney"));
+ }
+ user.takeMoney(cost);
+ }
+ }
+
+ public Double getMoney()
+ {
+ return money;
+ }
+
+ public ItemStack getItemStack()
+ {
+ return itemStack;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java
index 8365aabe3..befbf111f 100644
--- a/Essentials/src/com/earth2me/essentials/User.java
+++ b/Essentials/src/com/earth2me/essentials/User.java
@@ -48,16 +48,8 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
return false;
}
-
- try
- {
- return com.nijikokun.bukkit.Permissions.Permissions.Security.permission(base, node);
- }
- catch (Throwable ex)
- {
- String[] cmds = node.split("\\.", 2);
- return !ess.getSettings().isCommandRestricted(cmds[cmds.length - 1]);
- }
+
+ return ess.getPermissionsHandler().hasPermission(this, node);
}
public void healCooldown() throws Exception
diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java
index e9f05b8bd..5aa98eeb4 100644
--- a/Essentials/src/com/earth2me/essentials/UserData.java
+++ b/Essentials/src/com/earth2me/essentials/UserData.java
@@ -324,7 +324,7 @@ public abstract class UserData extends PlayerExtension implements IConf
private ItemStack[] _getSavedInventory()
{
int size = config.getInt("inventory.size", 0);
- if (size < 1 || size > getInventory().getSize())
+ if (size < 1 || (getInventory() != null && size > getInventory().getSize()))
{
return null;
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java
index a7d778921..4dd3042d0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandantioch.java
@@ -1,12 +1,10 @@
package com.earth2me.essentials.commands;
-import net.minecraft.server.EntityTNTPrimed;
-import net.minecraft.server.World;
import org.bukkit.Location;
import org.bukkit.Server;
-import org.bukkit.craftbukkit.CraftWorld;
import com.earth2me.essentials.User;
import com.earth2me.essentials.TargetBlock;
+import org.bukkit.entity.TNTPrimed;
public class Commandantioch extends EssentialsCommand
@@ -17,17 +15,13 @@ public class Commandantioch extends EssentialsCommand
}
@Override
- public void run(Server server, User user, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
charge(user);
ess.broadcastMessage(user.getName(), "...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,");
ess.broadcastMessage(user.getName(), "who being naughty in My sight, shall snuff it.");
- Location loc = user.getLocation();
- World world = ((CraftWorld)user.getWorld()).getHandle();
- loc = new TargetBlock(user).getTargetBlock().getLocation();
- EntityTNTPrimed tnt = new EntityTNTPrimed(world, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
- world.addEntity(tnt);
- world.makeSound(tnt, "random.fuse", 1.0F, 1.0F);
+ final Location loc = new TargetBlock(user).getTargetBlock().getLocation();
+ loc.getWorld().spawn(loc, TNTPrimed.class);
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandback.java b/Essentials/src/com/earth2me/essentials/commands/Commandback.java
index c852a7f99..26456a5d7 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandback.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandback.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
@@ -16,7 +16,7 @@ public class Commandback extends EssentialsCommand
@Override
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.sendMessage(Util.i18n("backUsageMsg"));
user.getTeleport().back(charge);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandban.java b/Essentials/src/com/earth2me/essentials/commands/Commandban.java
index 777fe08e1..40654551f 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandban.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandban.java
@@ -22,23 +22,27 @@ public class Commandban extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- User p = null;
if (server.matchPlayer(args[0]).isEmpty())
{
((CraftServer)server).getHandle().a(args[0]);
- sender.sendMessage(Util.format("playerBanned",args[0]));
+ sender.sendMessage(Util.format("playerBanned", args[0]));
}
else
{
- p = ess.getUser(server.matchPlayer(args[0]).get(0));
- String banReason = Util.i18n("defaultBanReason");
- if(args.length > 1) {
+ final User player = ess.getUser(server.matchPlayer(args[0]).get(0));
+ String banReason;
+ if (args.length > 1)
+ {
banReason = getFinalArg(args, 1);
- p.setBanReason(commandLabel);
+ player.setBanReason(commandLabel);
}
- p.kickPlayer(banReason);
- ((CraftServer)server).getHandle().a(p.getName());
- sender.sendMessage(Util.format("playerBanned", p.getName()));
+ else
+ {
+ banReason = Util.i18n("defaultBanReason");
+ }
+ player.kickPlayer(banReason);
+ ((CraftServer)server).getHandle().a(player.getName());
+ sender.sendMessage(Util.format("playerBanned", player.getName()));
}
ess.loadBanList();
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java
index 00686c9b7..f02b99b15 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbigtree.java
@@ -17,7 +17,7 @@ public class Commandbigtree extends EssentialsCommand
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
- TreeType tree = TreeType.TREE;
+ TreeType tree;
if (args.length > 0 && args[0].equalsIgnoreCase("redwood"))
{
tree = TreeType.TALL_REDWOOD;
@@ -36,7 +36,7 @@ public class Commandbigtree extends EssentialsCommand
double z = user.getLocation().getZ();
// offset tree in direction player is facing
- int r = (int)user.getCorrectedYaw();
+ final int r = (int)user.getCorrectedYaw();
if (r < 68 || r > 292) // north
{
x -= 3.0D;
@@ -54,8 +54,8 @@ public class Commandbigtree extends EssentialsCommand
z += 3.0D;
}
- Location safeLocation = Util.getSafeDestination(new Location(user.getWorld(), x, y, z));
- boolean success = user.getWorld().generateTree(safeLocation, (TreeType)tree);
+ final Location safeLocation = Util.getSafeDestination(new Location(user.getWorld(), x, y, z));
+ final boolean success = user.getWorld().generateTree(safeLocation, (TreeType)tree);
if (success)
{
charge(user);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
index 84daceba0..bf0226138 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
@@ -1,8 +1,14 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Util;
+import java.util.HashMap;
+import java.util.Map;
+import org.bukkit.Location;
+import org.bukkit.Material;
import org.bukkit.Server;
+import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
public class Commandessentials extends EssentialsCommand
@@ -11,12 +17,102 @@ public class Commandessentials extends EssentialsCommand
{
super("essentials");
}
+ private transient int taskid;
+ private final transient Map<Player, Block> noteBlocks = new HashMap<Player, Block>();
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
+ final Map<String, Byte> noteMap = new HashMap<String, Byte>();
+ noteMap.put("1F#", (byte)0x0);
+ noteMap.put("1G", (byte)0x1);
+ noteMap.put("1G#", (byte)0x2);
+ noteMap.put("1A", (byte)0x3);
+ noteMap.put("1A#", (byte)0x4);
+ noteMap.put("1B", (byte)0x5);
+ noteMap.put("1C", (byte)0x6);
+ noteMap.put("1C#", (byte)0x7);
+ noteMap.put("1D", (byte)0x8);
+ noteMap.put("1D#", (byte)0x9);
+ noteMap.put("1E", (byte)0xA);
+ noteMap.put("1F", (byte)0xB);
+ noteMap.put("2F#", (byte)(0x0 + 0xC));
+ noteMap.put("2G", (byte)(0x1 + 0xC));
+ noteMap.put("2G#", (byte)(0x2 + 0xC));
+ noteMap.put("2A", (byte)(0x3 + 0xC));
+ noteMap.put("2A#", (byte)(0x4 + 0xC));
+ noteMap.put("2B", (byte)(0x5 + 0xC));
+ noteMap.put("2C", (byte)(0x6 + 0xC));
+ noteMap.put("2C#", (byte)(0x7 + 0xC));
+ noteMap.put("2D", (byte)(0x8 + 0xC));
+ noteMap.put("2D#", (byte)(0x9 + 0xC));
+ noteMap.put("2E", (byte)(0xA + 0xC));
+ noteMap.put("2F", (byte)(0xB + 0xC));
+ if (args.length > 0 && args[0].equalsIgnoreCase("nya"))
+ {
+ if (!noteBlocks.isEmpty())
+ {
+ return;
+ }
+ final String tuneStr = "1D#,1E,2F#,,2A#,1E,1D#,1E,2F#,2B,2D#,2E,2D#,2A#,2B,,2F#,,1D#,1E,2F#,2B,2C#,2A#,2B,2C#,2E,2D#,2E,2C#,,2F#,,2G#,,1D,1D#,,1C#,1D,1C#,1B,,1B,,1C#,,1D,,1D,1C#,1B,1C#,1D#,2F#,2G#,1D#,2F#,1C#,1D#,1B,1C#,1B,1D#,,2F#,,2G#,1D#,2F#,1C#,1D#,1B,1D,1D#,1D,1C#,1B,1C#,1D,,1B,1C#,1D#,2F#,1C#,1D,1C#,1B,1C#,,1B,,1C#,,2F#,,2G#,,1D,1D#,,1C#,1D,1C#,1B,,1B,,1C#,,1D,,1D,1C#,1B,1C#,1D#,2F#,2G#,1D#,2F#,1C#,1D#,1B,1C#,1B,1D#,,2F#,,2G#,1D#,2F#,1C#,1D#,1B,1D,1D#,1D,1C#,1B,1C#,1D,,1B,1C#,1D#,2F#,1C#,1D,1C#,1B,1C#,,1B,,1B,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1A#,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1F#,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1A#,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1F#,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1A#,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1F#,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1A#,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1F#,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1B,,";
+ final String[] tune = tuneStr.split(",");
+
+ for (Player player : server.getOnlinePlayers())
+ {
+ final Location loc = player.getLocation();
+ loc.add(0, 3, 0);
+ while (loc.getBlockY() < player.getLocation().getBlockY() + 10 && loc.getBlock().getTypeId() != 0)
+ {
+ loc.add(0, 1, 0);
+ }
+ if (loc.getBlock().getTypeId() == 0)
+ {
+ noteBlocks.put(player, loc.getBlock());
+ loc.getBlock().setType(Material.NOTE_BLOCK);
+ }
+ }
+ taskid = ess.scheduleSyncRepeatingTask(new Runnable()
+ {
+ int i = 0;
+
+ public void run()
+ {
+ final String note = tune[i];
+ i++;
+ if (i >= tune.length)
+ {
+ Commandessentials.this.stopTune();
+ }
+ if (note.isEmpty())
+ {
+ return;
+ }
+ Map<Player, Block> noteBlocks = Commandessentials.this.noteBlocks;
+ for (Player player : server.getOnlinePlayers())
+ {
+ Block block = noteBlocks.get(player);
+ if (block == null)
+ {
+ continue;
+ }
+ player.playNote(block.getLocation(), (byte)0, noteMap.get(note));
+ }
+ }
+ }, 20, 2);
+ return;
+ }
ess.reload();
charge(sender);
sender.sendMessage(Util.format("essentialsReload", ess.getDescription().getVersion()));
}
+
+ private void stopTune()
+ {
+ ess.getScheduler().cancelTask(taskid);
+ for (Block block : noteBlocks.values())
+ {
+ block.setType(Material.AIR);
+ }
+ noteBlocks.clear();
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java b/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java
new file mode 100644
index 000000000..73c314935
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java
@@ -0,0 +1,24 @@
+package com.earth2me.essentials.commands;
+
+import com.earth2me.essentials.User;
+import org.bukkit.Server;
+import org.bukkit.entity.Fireball;
+import org.bukkit.util.Vector;
+
+
+public class Commandfireball extends EssentialsCommand
+{
+
+ public Commandfireball()
+ {
+ super("fireball");
+ }
+
+ @Override
+ protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
+ {
+ charge(user);
+ final Vector direction = user.getEyeLocation().getDirection().multiply(2);
+ user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), Fireball.class);
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
index c71ba4b0e..2649a9cb0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -16,7 +16,7 @@ public class Commandhome extends EssentialsCommand
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
if(args.length > 0 && user.isAuthorized("essentials.home.others"))
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
index 42ef0d424..5cdcbb2f2 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Location;
import org.bukkit.Server;
import com.earth2me.essentials.TargetBlock;
@@ -36,7 +36,7 @@ public class Commandjump extends EssentialsCommand
throw new Exception(Util.i18n("jumpError"), ex);
}
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().teleport(loc, charge);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
index e02a6d766..849ec2398 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
@@ -109,7 +109,7 @@ public class Commandkit extends EssentialsCommand
items = (List<String>)kit;
}
- Charge charge = new Charge("kit-" + kitName, ess);
+ Trade charge = new Trade("kit-" + kitName, ess);
try
{
charge.isAffordableFor(user);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java
new file mode 100644
index 000000000..9aa4f8ac0
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandnuke.java
@@ -0,0 +1,58 @@
+package com.earth2me.essentials.commands;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.bukkit.Location;
+import org.bukkit.Server;
+import org.bukkit.World;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+import org.bukkit.entity.TNTPrimed;
+
+
+public class Commandnuke extends EssentialsCommand
+{
+ public Commandnuke()
+ {
+ super("nuke");
+ }
+
+ @Override
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws NoSuchFieldException, NotEnoughArgumentsException
+ {
+ List<Player> targets;
+ if (args.length > 0)
+ {
+ targets = new ArrayList<Player>();
+ int pos = 0;
+ for (String arg : args)
+ {
+ targets.add(getPlayer(server, args, pos));
+ pos++;
+ }
+ }
+ else
+ {
+ targets = Arrays.asList(server.getOnlinePlayers());
+ }
+ ess.getTNTListener().enable();
+ for (Player player : targets)
+ {
+ if (player == null) {
+ continue;
+ }
+ player.sendMessage("May death rain upon them");
+ final Location loc = player.getLocation();
+ final World world = loc.getWorld();
+ for (int x = -10; x <= 10; x += 5)
+ {
+ for (int z = -10; z <= 10; z += 5)
+ {
+ final Location tntloc = new Location(world, loc.getBlockX() + x, 127, loc.getBlockZ() + z);
+ final TNTPrimed tnt = world.spawn(tntloc, TNTPrimed.class);
+ }
+ }
+ }
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
index f351019bc..df2f7f954 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
@@ -6,6 +6,7 @@ import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
import org.bukkit.block.CreatureSpawner;
+import org.bukkit.craftbukkit.block.CraftCreatureSpawner;
import org.bukkit.entity.CreatureType;
@@ -19,12 +20,12 @@ public class Commandspawner extends EssentialsCommand
@Override
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
- if (args.length < 1)
+ if (args.length < 1 || args[0].length() < 2)
{
throw new NotEnoughArgumentsException();
}
- Block target = user.getTarget().getTargetBlock();
+ final Block target = user.getTarget().getTargetBlock();
if (target.getType() != Material.MOB_SPAWNER)
{
throw new Exception(Util.i18n("mobSpawnTarget"));
@@ -33,7 +34,8 @@ public class Commandspawner extends EssentialsCommand
charge(user);
try
{
- ((CreatureSpawner)target).setCreatureType(CreatureType.fromName(args[0]));
+ final String name = args[0].substring(0, 1).toUpperCase() + args[0].substring(1).toLowerCase();
+ new CraftCreatureSpawner(target).setCreatureType(CreatureType.fromName(name));
}
catch (Throwable ex)
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
index 480e23aea..47edc831e 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
@@ -3,8 +3,6 @@ package com.earth2me.essentials.commands;
import net.minecraft.server.WorldServer;
import org.bukkit.Location;
import org.bukkit.Server;
-import org.bukkit.craftbukkit.entity.CraftEntity;
-import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Mob;
import com.earth2me.essentials.Mob.MobException;
@@ -20,6 +18,7 @@ import org.bukkit.craftbukkit.entity.CraftCreeper;
import org.bukkit.craftbukkit.entity.CraftSheep;
import org.bukkit.craftbukkit.entity.CraftSlime;
import org.bukkit.craftbukkit.entity.CraftWolf;
+import org.bukkit.entity.Entity;
public class Commandspawnmob extends EssentialsCommand
@@ -62,9 +61,9 @@ public class Commandspawnmob extends EssentialsCommand
}
- CraftEntity spawnedMob = null;
+ Entity spawnedMob = null;
Mob mob = null;
- CraftEntity spawnedMount = null;
+ Entity spawnedMount = null;
Mob mobMount = null;
mob = Mob.fromName(mobType);
@@ -96,8 +95,8 @@ public class Commandspawnmob extends EssentialsCommand
loc.setY(loc.getY() + 1);
block = user.getWorld().getBlockAt(loc);
}
- spawnedMob.teleportTo(loc);
- world.addEntity(spawnedMob.getHandle());
+ spawnedMob.teleport(loc);
+ //world.addEntity((CraftEntity)spawnedMob).getHandle());
if (mountType != null)
{
@@ -116,9 +115,10 @@ public class Commandspawnmob extends EssentialsCommand
user.sendMessage(Util.i18n("unableToSpawnMob"));
return;
}
- spawnedMount.teleportTo(spawnedMob);
- spawnedMount.getHandle().setPassengerOf(spawnedMob.getHandle());
- world.addEntity(spawnedMount.getHandle());
+ spawnedMount.teleport(spawnedMob);
+ spawnedMob.setPassenger(spawnedMount);
+ //spawnedMount.getHandle().setPassengerOf(spawnedMob.getHandle());
+ //world.addEntity(spawnedMount.getHandle());
}
if (mobData != null)
{
@@ -143,8 +143,8 @@ public class Commandspawnmob extends EssentialsCommand
for (int i = 1; i < mobCount; i++)
{
spawnedMob = mob.spawn(user, server);
- spawnedMob.teleportTo(loc);
- world.addEntity(spawnedMob.getHandle());
+ spawnedMob.teleport(loc);
+ //world.addEntity(spawnedMob.getHandle());
if (mobMount != null)
{
try
@@ -156,9 +156,10 @@ public class Commandspawnmob extends EssentialsCommand
user.sendMessage(Util.i18n("unableToSpawnMob"));
return;
}
- spawnedMount.teleportTo(spawnedMob);
- spawnedMount.getHandle().setPassengerOf(spawnedMob.getHandle());
- world.addEntity(spawnedMount.getHandle());
+ spawnedMount.teleport(spawnedMob);
+ spawnedMob.setPassenger(spawnedMount);
+ //spawnedMount.getHandle().setPassengerOf(spawnedMob.getHandle());
+ //world.addEntity(spawnedMount.getHandle());
}
if (mobData != null)
{
@@ -195,7 +196,7 @@ public class Commandspawnmob extends EssentialsCommand
return s.toUpperCase().charAt(0) + s.toLowerCase().substring(1);
}
- private void changeMobData(String type, CraftEntity spawned, String data, User user) throws Exception
+ private void changeMobData(String type, Entity spawned, String data, User user) throws Exception
{
if ("Slime".equalsIgnoreCase(type))
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
index 9704d4a59..8c0c687d0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Location;
import org.bukkit.Server;
import com.earth2me.essentials.User;
@@ -21,7 +21,7 @@ public class Commandtop extends EssentialsCommand
int topZ = user.getLocation().getBlockZ();
int topY = user.getWorld().getHighestBlockYAt(topX, topZ);
charge(user);
- user.getTeleport().teleport(new Location(user.getWorld(), user.getLocation().getX(), topY + 1, user.getLocation().getZ()), new Charge(this.getName(), ess));
+ user.getTeleport().teleport(new Location(user.getWorld(), user.getLocation().getX(), topY + 1, user.getLocation().getZ()), new Trade(this.getName(), ess));
user.sendMessage(Util.i18n("teleportTop"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
index 64f7f8d08..a8b805e8d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.Console;
import org.bukkit.Server;
import com.earth2me.essentials.User;
@@ -30,7 +30,7 @@ public class Commandtp extends EssentialsCommand
throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
}
user.sendMessage(Util.i18n("teleporting"));
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().teleport(p, charge);
break;
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
index 1aab32cdf..0cba80020 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -23,7 +23,7 @@ public class Commandtpaccept extends EssentialsCommand
throw new Exception(Util.i18n("noPendingRequest"));
}
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
if (user.isTeleportRequestHere())
{
charge.isAffordableFor(user);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
index 86311cd2e..d564e90ea 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpall.java
@@ -3,7 +3,6 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
-import java.util.logging.Level;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -50,11 +49,7 @@ public class Commandtpall extends EssentialsCommand
}
catch (Exception ex)
{
- sender.sendMessage(Util.format("errorWithMessage", ex.getMessage()));
- if (ess.getSettings().isDebug())
- {
- logger.log(Level.WARNING, ex.getMessage(), ex);
- }
+ ess.showError(sender, ex, getName());
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
index 3710b121b..036c4be27 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -21,7 +21,7 @@ public class Commandtphere extends EssentialsCommand
{
throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
}
- p.getTeleport().teleport(user, new Charge(this.getName(), ess));
+ p.getTeleport().teleport(user, new Trade(this.getName(), ess));
user.sendMessage(Util.i18n("teleporting"));
p.sendMessage(Util.i18n("teleporting"));
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
index 05f95bc40..805aefaca 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Location;
import org.bukkit.Server;
import com.earth2me.essentials.User;
@@ -26,7 +26,7 @@ public class Commandtppos extends EssentialsCommand
int y = Integer.parseInt(args[1]);
int z = Integer.parseInt(args[2]);
Location l = new Location(user.getWorld(), x, y, z);
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.sendMessage(Util.i18n("teleporting"));
user.getTeleport().teleport(l, charge);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
index f4e710aaf..50a8ff0cf 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -73,7 +73,7 @@ public class Commandwarp extends EssentialsCommand
private void warpUser(User user, String name) throws Exception
{
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
if (ess.getSettings().getPerWarpPermission())
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java
index bdbe83798..0a315b1d4 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import java.util.List;
import org.bukkit.Location;
import org.bukkit.Server;
@@ -68,7 +68,7 @@ public class Commandworld extends EssentialsCommand
Location loc = user.getLocation();
loc = new Location(world, loc.getBlockX() * factor + .5, loc.getBlockY(), loc.getBlockZ() * factor + .5);
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().teleport(loc, charge);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
index 12c9258c0..01ab569a1 100644
--- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
+++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
@@ -1,11 +1,10 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import java.util.List;
import org.bukkit.Server;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
-import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.IEssentials;
import org.bukkit.entity.Player;
import com.earth2me.essentials.User;
@@ -89,7 +88,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
{
if (sender instanceof Player)
{
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.charge(ess.getUser((Player)sender));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
new file mode 100644
index 000000000..a6f17c8bb
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
@@ -0,0 +1,314 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.ChargeException;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.ItemDb;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
+import org.bukkit.block.Block;
+import org.bukkit.block.Sign;
+import org.bukkit.craftbukkit.block.CraftSign;
+import org.bukkit.event.block.BlockBreakEvent;
+import org.bukkit.event.block.SignChangeEvent;
+import org.bukkit.event.player.PlayerInteractEvent;
+import org.bukkit.inventory.ItemStack;
+
+
+public class EssentialsSign
+{
+ protected transient final String signName;
+ private static final String FORMAT_SUCCESS = "§1[%s]";
+ private static final String FORMAT_FAIL = "§4[%s]";
+
+ public EssentialsSign(final String signName)
+ {
+ this.signName = signName;
+ }
+
+ public final boolean onSignCreate(final SignChangeEvent event, final IEssentials ess)
+ {
+ final ISign sign = new EventSign(event);
+ sign.setLine(0, String.format(FORMAT_FAIL, this.signName));
+ final User user = ess.getUser(event.getPlayer());
+ if (!(user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".create")
+ || user.isAuthorized("essentials.signs.create." + signName.toLowerCase())))
+ {
+ return false;
+ }
+ try
+ {
+ final boolean ret = onSignCreate(sign, user, getUsername(user), ess);
+ if (ret)
+ {
+ sign.setLine(0, String.format(FORMAT_SUCCESS, this.signName));
+ }
+ return ret;
+ }
+ catch (ChargeException ex)
+ {
+ ess.showError(user, ex, signName);
+ }
+ catch (SignException ex)
+ {
+ ess.showError(user, ex, signName);
+ }
+ return false;
+ }
+
+ private String getUsername(final User user)
+ {
+ return user.getName().substring(0, user.getName().length() > 14 ? 14 : user.getName().length());
+ }
+
+ public final boolean onSignInteract(final PlayerInteractEvent event, final IEssentials ess)
+ {
+ final ISign sign = new BlockSign(event.getClickedBlock());
+ final User user = ess.getUser(event.getPlayer());
+ try
+ {
+ return (user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".use")
+ || user.isAuthorized("essentials.signs.use." + signName.toLowerCase()))
+ && onSignInteract(sign, user, getUsername(user), ess);
+ }
+ catch (ChargeException ex)
+ {
+ ess.showError(user, ex, signName);
+ return false;
+ }
+ catch (SignException ex)
+ {
+ ess.showError(user, ex, signName);
+ return false;
+ }
+ }
+
+ public final boolean onSignBreak(final BlockBreakEvent event, final IEssentials ess)
+ {
+ final ISign sign = new BlockSign(event.getBlock());
+ final User user = ess.getUser(event.getPlayer());
+ try
+ {
+ return (user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".break")
+ || user.isAuthorized("essentials.signs.break." + signName.toLowerCase()))
+ && onSignBreak(sign, user, getUsername(user), ess);
+ }
+ catch (SignException ex)
+ {
+ ess.showError(user, ex, signName);
+ return false;
+ }
+ }
+
+ protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ return true;
+ }
+
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ return true;
+ }
+
+ protected boolean onSignBreak(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ return true;
+ }
+
+ protected final void validateTrade(final ISign sign, final int index, final IEssentials ess) throws SignException
+ {
+ final String line = sign.getLine(index).trim();
+ if (line.isEmpty())
+ {
+ return;
+ }
+ final Trade trade = getTrade(sign, index, 0, ess);
+ final Double money = trade.getMoney();
+ if (money != null)
+ {
+ sign.setLine(index, Util.formatCurrency(money));
+ }
+ }
+
+
+
+ protected final void validateTrade(final ISign sign, final int amountIndex, final int itemIndex,
+ final User player, final IEssentials ess) throws SignException
+ {
+ final Trade trade = getTrade(sign, amountIndex, itemIndex, player, ess);
+ final ItemStack item = trade.getItemStack();
+ sign.setLine(amountIndex, Integer.toString(item.getAmount()));
+ sign.setLine(itemIndex, sign.getLine(itemIndex).trim());
+ }
+
+ protected final Trade getTrade(final ISign sign, final int amountIndex, final int itemIndex,
+ final User player, final IEssentials ess) throws SignException
+ {
+
+ final ItemStack item = getItemStack(sign.getLine(itemIndex), 1);
+ final int amount = Math.min(getInteger(sign.getLine(amountIndex)), item.getType().getMaxStackSize() * player.getInventory().getSize());
+ if (item.getTypeId() == 0 || amount < 1)
+ {
+ throw new SignException(Util.i18n("moreThanZero"));
+ }
+ item.setAmount(amount);
+ return new Trade(item, ess);
+ }
+
+ protected final void validateInteger(final ISign sign, final int index) throws SignException
+ {
+ final String line = sign.getLine(index).trim();
+ if (line.isEmpty())
+ {
+ throw new SignException("Empty line " + index);
+ }
+ final int quantity = getInteger(line);
+ sign.setLine(index, Integer.toString(quantity));
+ }
+
+ protected final int getInteger(final String line) throws SignException
+ {
+ try
+ {
+ final int quantity = Integer.parseInt(line);
+ if (quantity <= 1)
+ {
+ throw new SignException(Util.i18n("moreThanZero"));
+ }
+ return quantity;
+ }
+ catch (NumberFormatException ex)
+ {
+ throw new SignException("Invalid sign", ex);
+ }
+ }
+
+ protected final ItemStack getItemStack(final String itemName, final int quantity) throws SignException
+ {
+ try
+ {
+ final ItemStack item = ItemDb.get(itemName);
+ item.setAmount(quantity);
+ return item;
+ }
+ catch (Exception ex)
+ {
+ throw new SignException(ex.getMessage(), ex);
+ }
+ }
+
+ protected final Double getMoney(final String line) throws SignException
+ {
+ final boolean isMoney = line.matches("^[^0-9-\\.][\\.0-9]+");
+ return isMoney ? getDouble(line.substring(1)) : null;
+ }
+
+ protected final Double getDouble(final String line) throws SignException
+ {
+ try
+ {
+ final double quantity = Double.parseDouble(line);
+ if (quantity <= 0.0)
+ {
+ throw new SignException(Util.i18n("moreThanZero"));
+ }
+ return quantity;
+ }
+ catch (NumberFormatException ex)
+ {
+ throw new SignException(ex.getMessage(), ex);
+ }
+ }
+
+ protected final Trade getTrade(final ISign sign, final int index, final IEssentials ess) throws SignException
+ {
+ return getTrade(sign, index, 1, ess);
+ }
+
+ protected final Trade getTrade(final ISign sign, final int index, final int decrement, final IEssentials ess) throws SignException
+ {
+ final String line = sign.getLine(index).trim();
+ if (line.isEmpty())
+ {
+ return new Trade(signName.toLowerCase() + "sign", ess);
+ }
+
+ final Double money = getMoney(line);
+ if (money == null)
+ {
+ final String[] split = line.split("[ :]+", 2);
+ if (split.length != 2)
+ {
+ throw new SignException(Util.i18n("invalidCharge"));
+ }
+ final int quantity = getInteger(split[0]);
+
+ final String item = split[1].toLowerCase();
+ if (item.equalsIgnoreCase("times"))
+ {
+ sign.setLine(index, (quantity - decrement) + " times");
+ return new Trade(signName.toLowerCase() + "sign", ess);
+ }
+ else
+ {
+ final ItemStack stack = getItemStack(item, quantity);
+ sign.setLine(index, quantity + " " + item);
+ return new Trade(quantity, ess);
+ }
+ }
+ else
+ {
+ return new Trade(money, ess);
+ }
+ }
+
+
+ static class EventSign implements ISign
+ {
+ private final transient SignChangeEvent event;
+
+ public EventSign(final SignChangeEvent event)
+ {
+ this.event = event;
+ }
+
+ public final String getLine(final int index)
+ {
+ return event.getLine(index);
+ }
+
+ public final void setLine(final int index, final String text)
+ {
+ event.setLine(index, text);
+ }
+ }
+
+
+ static class BlockSign implements ISign
+ {
+ private final transient Sign sign;
+
+ public BlockSign(final Block block)
+ {
+ this.sign = new CraftSign(block);
+ }
+
+ public final String getLine(final int index)
+ {
+ return sign.getLine(index);
+ }
+
+ public final void setLine(final int index, final String text)
+ {
+ sign.setLine(index, text);
+ }
+ }
+
+
+ public interface ISign
+ {
+ String getLine(final int index);
+
+ void setLine(final int index, final String text);
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBalance.java b/Essentials/src/com/earth2me/essentials/signs/SignBalance.java
new file mode 100644
index 000000000..3b961eef6
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignBalance.java
@@ -0,0 +1,21 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
+
+
+public class SignBalance extends EssentialsSign
+{
+ public SignBalance()
+ {
+ super("Balance");
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ player.sendMessage(Util.format("balance", player.getMoney()));
+ return true;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBuy.java b/Essentials/src/com/earth2me/essentials/signs/SignBuy.java
new file mode 100644
index 000000000..21dc7683e
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignBuy.java
@@ -0,0 +1,34 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.ChargeException;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+
+
+public class SignBuy extends EssentialsSign
+{
+ public SignBuy()
+ {
+ super("Buy");
+ }
+
+ @Override
+ protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ validateTrade(sign, 1, 2, player, ess);
+ validateTrade(sign, 3, ess);
+ return true;
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ final Trade items = getTrade(sign, 1, 2, player, ess);
+ final Trade charge = getTrade(sign, 3, ess);
+ charge.isAffordableFor(player);
+ items.pay(player);
+ charge.charge(player);
+ return true;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java
new file mode 100644
index 000000000..e4d050305
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java
@@ -0,0 +1,24 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import net.minecraft.server.InventoryPlayer;
+import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
+
+
+public class SignDisposal extends EssentialsSign
+{
+ public SignDisposal()
+ {
+ super("Disposal");
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess)
+ {
+ final CraftInventoryPlayer inv = new CraftInventoryPlayer(new InventoryPlayer(player.getHandle()));
+ inv.clear();
+ player.showInventory(inv);
+ return true;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignException.java b/Essentials/src/com/earth2me/essentials/signs/SignException.java
new file mode 100644
index 000000000..9c9ab44a2
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignException.java
@@ -0,0 +1,15 @@
+package com.earth2me.essentials.signs;
+
+
+public class SignException extends Exception
+{
+ public SignException(final String message)
+ {
+ super(message);
+ }
+
+ public SignException(final String message, final Throwable throwable)
+ {
+ super(message, throwable);
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java
new file mode 100644
index 000000000..6c45c8b07
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java
@@ -0,0 +1,36 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.ItemDb;
+import com.earth2me.essentials.User;
+import net.minecraft.server.InventoryPlayer;
+import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
+import org.bukkit.inventory.ItemStack;
+
+
+public class SignFree extends EssentialsSign
+{
+ public SignFree()
+ {
+ super("Free");
+ }
+
+ @Override
+ protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ getItemStack(sign.getLine(1), 9 * 4 * 64);
+ return true;
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ final ItemStack item = getItemStack(sign.getLine(1), 9 * 4 * 64);
+ final CraftInventoryPlayer inv = new CraftInventoryPlayer(new InventoryPlayer(player.getHandle()));
+ inv.clear();
+ inv.addItem(item);
+ player.showInventory(inv);
+ return true;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignHeal.java b/Essentials/src/com/earth2me/essentials/signs/SignHeal.java
new file mode 100644
index 000000000..190dfe07c
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignHeal.java
@@ -0,0 +1,34 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.ChargeException;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
+
+
+public class SignHeal extends EssentialsSign
+{
+ public SignHeal()
+ {
+ super("Heal");
+ }
+
+ @Override
+ protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ validateTrade(sign, 1, ess);
+ return true;
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ final Trade charge = getTrade(sign, 1, ess);
+ charge.isAffordableFor(player);
+ player.setHealth(20);
+ player.sendMessage(Util.i18n("youAreHealed"));
+ charge.charge(player);
+ return true;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignMail.java b/Essentials/src/com/earth2me/essentials/signs/SignMail.java
new file mode 100644
index 000000000..1c3d162c4
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignMail.java
@@ -0,0 +1,32 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
+import java.util.List;
+
+
+public class SignMail extends EssentialsSign
+{
+ public SignMail()
+ {
+ super("Mail");
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ final List<String> mail = player.getMails();
+ if (mail.isEmpty())
+ {
+ player.sendMessage(Util.i18n("noNewMail"));
+ return false;
+ }
+ for (String s : mail)
+ {
+ player.sendMessage(s);
+ }
+ player.sendMessage(Util.i18n("markMailAsRead"));
+ return true;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignSell.java b/Essentials/src/com/earth2me/essentials/signs/SignSell.java
new file mode 100644
index 000000000..2b74a78e6
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignSell.java
@@ -0,0 +1,34 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.ChargeException;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+
+
+public class SignSell extends EssentialsSign
+{
+ public SignSell()
+ {
+ super("Sell");
+ }
+
+ @Override
+ protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ validateTrade(sign, 1, 2, player, ess);
+ validateTrade(sign, 3, ess);
+ return true;
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ final Trade charge = getTrade(sign, 1, 2, player, ess);
+ final Trade money = getTrade(sign, 3, ess);
+ charge.isAffordableFor(player);
+ money.pay(player);
+ charge.charge(player);
+ return true;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTime.java b/Essentials/src/com/earth2me/essentials/signs/SignTime.java
new file mode 100644
index 000000000..120347467
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignTime.java
@@ -0,0 +1,57 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.ChargeException;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
+
+
+public class SignTime extends EssentialsSign
+{
+ public SignTime()
+ {
+ super("Time");
+ }
+
+ @Override
+ protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ validateTrade(sign, 2, ess);
+ final String timeString = sign.getLine(1);
+ if ("Day".equalsIgnoreCase(timeString))
+ {
+ sign.setLine(1, "§2Day");
+ return true;
+ }
+ if ("Night".equalsIgnoreCase(timeString))
+ {
+ sign.setLine(1, "§2Night");
+ return true;
+ }
+ throw new SignException(Util.i18n("onlyDayNight"));
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ final Trade charge = getTrade(sign, 2, ess);
+ charge.isAffordableFor(player);
+ final String timeString = sign.getLine(1);
+ long time = player.getWorld().getTime();
+ time -= time % 24000;
+ if ("§2Day".equalsIgnoreCase(timeString))
+ {
+ player.getWorld().setTime(time + 24000);
+ charge.charge(player);
+ return true;
+ }
+ if ("§2Night".equalsIgnoreCase(timeString))
+ {
+ player.getWorld().setTime(time + 37700);
+ charge.charge(player);
+ return true;
+ }
+ throw new SignException(Util.i18n("onlyDayNight"));
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
new file mode 100644
index 000000000..dd82bd09d
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
@@ -0,0 +1,220 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.ChargeException;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
+import org.bukkit.inventory.ItemStack;
+
+
+public class SignTrade extends EssentialsSign
+{
+ public SignTrade()
+ {
+ super("Trade");
+ }
+
+ @Override
+ protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ validateTrade(sign, 1, false, ess);
+ validateTrade(sign, 2, true, ess);
+ final Trade charge = getTrade(sign, 2, true, ess);
+ charge.isAffordableFor(player);
+ sign.setLine(3, "§8" + username);
+ charge.charge(player);
+ return true;
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ if (sign.getLine(3).substring(2).equalsIgnoreCase(username))
+ {
+ final Trade stored = getTrade(sign, 1, true, ess);
+ substractAmount(sign, 1, stored);
+ stored.pay(player);
+ }
+ else
+ {
+ final Trade charge = getTrade(sign, 1, false, ess);
+ final Trade trade = getTrade(sign, 2, false, ess);
+ charge.isAffordableFor(player);
+ substractAmount(sign, 2, trade);
+ trade.pay(player);
+ addAmount(sign, 1, charge);
+ charge.charge(player);
+ }
+ return true;
+ }
+
+ @Override
+ protected boolean onSignBreak(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ if (sign.getLine(3).length() > 3 && sign.getLine(3).substring(2).equalsIgnoreCase(username))
+ {
+ final Trade stored1 = getTrade(sign, 1, true, ess);
+ final Trade stored2 = getTrade(sign, 2, true, ess);
+ stored1.pay(player);
+ stored2.pay(player);
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ protected final void validateTrade(final ISign sign, final int index, final boolean amountNeeded, final IEssentials ess) throws SignException
+ {
+ final String line = sign.getLine(index).trim();
+ if (line.isEmpty())
+ {
+ throw new SignException("Empty line");
+ }
+ final String[] split = line.split("[ :]+");
+
+ if (split.length == 1 && !amountNeeded)
+ {
+ final Double money = getMoney(split[0]);
+ if (money != null)
+ {
+ sign.setLine(index, Util.formatCurrency(money) + ":0");
+ return;
+ }
+ }
+
+ if (split.length == 2 && amountNeeded)
+ {
+ final Double money = getMoney(split[0]);
+ final Double amount = getDouble(split[1]);
+ if (money != null && amount != null)
+ {
+ sign.setLine(index, Util.formatCurrency(money) + ":" + Util.formatCurrency(amount).substring(1));
+ return;
+ }
+ }
+
+ if (split.length == 2 && !amountNeeded)
+ {
+ final int amount = getInteger(split[0]);
+ final ItemStack item = getItemStack(split[1], amount);
+ if (amount < 1 || item.getTypeId() == 0)
+ {
+ throw new SignException(Util.i18n("moreThanZero"));
+ }
+ sign.setLine(index, amount + " " + split[1] + ":0");
+ return;
+ }
+
+ if (split.length == 3 && amountNeeded)
+ {
+ final int stackamount = getInteger(split[0]);
+ final ItemStack item = getItemStack(split[1], stackamount);
+ int amount = getInteger(split[2]);
+ amount -= amount % stackamount;
+ if (amount < 1 || stackamount < 1 || item.getTypeId() == 0)
+ {
+ throw new SignException(Util.i18n("moreThanZero"));
+ }
+ sign.setLine(index, stackamount + " " + split[1] + ":" + amount);
+ return;
+ }
+ throw new SignException(Util.format("invalidSignLine", index));
+ }
+
+ protected final Trade getTrade(final ISign sign, final int index, final boolean fullAmount, final IEssentials ess) throws SignException
+ {
+ final String line = sign.getLine(index).trim();
+ if (line.isEmpty())
+ {
+ throw new SignException("Empty line");
+ }
+ final String[] split = line.split("[ :]+");
+
+ if (split.length == 2)
+ {
+ final Double money = getMoney(split[0]);
+ final Double amount = getDouble(split[1]);
+ if (money != null && amount != null)
+ {
+ return new Trade(fullAmount ? amount : money, ess);
+ }
+ }
+
+ if (split.length == 3)
+ {
+ final int stackamount = getInteger(split[0]);
+ final ItemStack item = getItemStack(split[1], stackamount);
+ int amount = getInteger(split[2]);
+ amount -= amount % stackamount;
+ if (amount < 1 || stackamount < 1 || item.getTypeId() == 0)
+ {
+ throw new SignException(Util.i18n("moreThanZero"));
+ }
+ item.setAmount(fullAmount ? amount : stackamount);
+ return new Trade(item, ess);
+ }
+ throw new SignException(Util.format("invalidSignLine", index));
+ }
+
+ protected final void substractAmount(final ISign sign, final int index, final Trade trade) throws SignException
+ {
+ final Double money = trade.getMoney();
+ if (money != null)
+ {
+ changeAmount(sign, index, -money);
+ }
+ final ItemStack item = trade.getItemStack();
+ if (item != null)
+ {
+ changeAmount(sign, index, -item.getAmount());
+ }
+ }
+
+ protected final void addAmount(final ISign sign, final int index, final Trade trade) throws SignException
+ {
+ final Double money = trade.getMoney();
+ if (money != null)
+ {
+ changeAmount(sign, index, money);
+ }
+ final ItemStack item = trade.getItemStack();
+ if (item != null)
+ {
+ changeAmount(sign, index, item.getAmount());
+ }
+ }
+
+ private void changeAmount(final ISign sign, final int index, final double value) throws SignException
+ {
+ final String line = sign.getLine(index).trim();
+ if (line.isEmpty())
+ {
+ throw new SignException("Empty line");
+ }
+ final String[] split = line.split("[ :]+");
+
+ if (split.length == 2)
+ {
+ final Double money = getMoney(split[0]);
+ final Double amount = getDouble(split[1]);
+ if (money != null && amount != null)
+ {
+ sign.setLine(index, Util.formatCurrency(money) + ":" + Util.formatCurrency(amount + value).substring(1));
+ return;
+ }
+ }
+
+ if (split.length == 3)
+ {
+ final int stackamount = getInteger(split[0]);
+ final ItemStack item = getItemStack(split[1], stackamount);
+ int amount = getInteger(split[2]);
+ sign.setLine(index, stackamount + " " + split[1] + ":" + (amount + Math.round(value)));
+ return;
+ }
+ throw new SignException(Util.format("invalidSignLine", index));
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java
new file mode 100644
index 000000000..776d97924
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java
@@ -0,0 +1,69 @@
+package com.earth2me.essentials.signs;
+
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.ChargeException;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+
+
+public class SignWarp extends EssentialsSign
+{
+ public SignWarp()
+ {
+ super("Warp");
+ }
+
+ @Override
+ protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
+ {
+ validateTrade(sign, 3, ess);
+ final String warpName = sign.getLine(1);
+
+ if (warpName.isEmpty())
+ {
+ sign.setLine(1, "§dWarp name!");
+ return false;
+ }
+ else
+ {
+ try
+ {
+ ess.getWarps().getWarp(warpName);
+ }
+ catch (Exception ex)
+ {
+ throw new SignException(ex.getMessage(), ex);
+ }
+ final String group = sign.getLine(2);
+ if ("Everyone".equalsIgnoreCase(group))
+ {
+ sign.setLine(2, "§2Everyone");
+ }
+ return true;
+ }
+ }
+
+ @Override
+ protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
+ {
+ final String warpName = sign.getLine(1);
+ final String group = sign.getLine(2);
+ if ((!group.isEmpty()
+ && ("§2Everyone".equals(group)
+ || player.inGroup(group)))
+ || (!ess.getSettings().getPerWarpPermission() || player.isAuthorized("essentials.warp." + warpName)))
+ {
+ final Trade charge = getTrade(sign, 3, ess);
+ try
+ {
+ player.getTeleport().warp(warpName, charge);
+ }
+ catch (Exception ex)
+ {
+ throw new SignException(ex.getMessage(), ex);
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml
index 8fffa244b..a2369c2e9 100644
--- a/Essentials/src/config.yml
+++ b/Essentials/src/config.yml
@@ -88,7 +88,6 @@ motd:
- '&cWelcome, {PLAYER}&c!'
- '&fType &c/help&f for a list of commands.'
- 'Currently online: {PLAYERLIST}'
- - 'Did you know that you can make [Disposal] signs with Essentials?'
- 'You have {MAILS} mail messages'
# The server rules, available by typing /rules
@@ -156,6 +155,8 @@ restricted-commands:
- togglejail
- setjail
- eco.loan
+ - teleport.timer.bypass
+ - teleport.cooldown.bypass
# Note: All items MUST be followed by a quantity!
# Times are measured in seconds.
@@ -362,6 +363,9 @@ protect:
# Prevent placing blocks above protected rails, this is to stop a potential griefing
prevent-block-on-rails: false
+
+ #Store blocks / signs in memory before writing
+ memstore: false
# Disable various default physics and behaviors
disable:
diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv
index 43a554f8b..845170a00 100644
--- a/Essentials/src/items.csv
+++ b/Essentials/src/items.csv
@@ -452,12 +452,16 @@ sweb,30,0
web,30,0
longgrass,31,0
tallgrass,31,0
+wildgrass,31,0
grasslong,31,0
grasstall,31,0
+grasswild,31,0
lgrass,31,0
tgrass,31,0
+wgrass,31,0
grassl,31,0
grasst,31,0
+grassw,31,0
deadshrub,32,0
shrubdead,32,0
dshrub,32,0
@@ -794,6 +798,8 @@ blockdynamite,46,0
tnt,46,0
bomb,46,0
dynamite,46,0
+bookcase,47,0
+casebook,47,0
bookshelf,47,0
shelfbook,47,0
bookblock,47,0
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
index 261c2237e..dabc86b26 100644
--- a/Essentials/src/messages.properties
+++ b/Essentials/src/messages.properties
@@ -1,308 +1,311 @@
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
-loadinfo = Loaded {0} build {1} by {2}
-markedAsNotAway = \u00a77You are no longer marked as away.
-markedAsAway = \u00a77You are now marked as away.
-userIsNotAway = {0} is no longer AFK
-userIsAway = {0} is now AFK
-backupStarted = Backup started
-backupFinished = Backup finished
-invalidServer = Invalid server!
-usingTempFolderForTesting = Using temp folder for testing:
-versionMismatch = Version mismatch! Please update {0} to the same version.
-notRecommendedBukkit = Bukkit version is not the recommended build for Essentials.
-bukkitFormatChanged = Bukkit version format changed. Version not checked.
-itemsCsvNotLoaded = Could not load items.csv.
-corruptNodeInConfig = \u00a74Notice: Your configuration file has a corrupt {0} node.
-youHaveNewMail = \u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
-commandNotLoaded = \u00a7cCommand {0} is improperly loaded.
-deniedAccessCommand = {0} was denied access to command.
-noAccessCommand = \u00a7cYou do not have access to that command.
-errorCallingCommand = Error calling command /{0}
-commandFailed = Command {0} failed:
-bannedPlayersFileNotFound = banned-players.txt not found
-bannedPlayersFileError = Error reading banned-players.txt
-bannedIpsFileNotFound = banned-ips.txt not found
-bannedIpsFileError = Error reading banned-ips.txt
-noDestroyPermission = \u00a7cYou do not have permission to destroy that {0}.
-noAccessPermission = \u00a7cYou do not have permission to access that {0}.
-moreThanZero = Quantities must be greater than 0.
-errorWithMessage = \u00a7cError: {0}
-creatingConfigFromTemplate = Creating config from template: {0}
-creatingEmptyConfig = Creating empty config: {0}
-failedToCreateConfig = Failed to create config {0}
-couldNotFindTemplate = Could not find template {0}
-failedToWriteConfig = Failed to write config {0}
-failedToCloseConfig = Failed to close config {0}
-notEnoughMoney = You do not have sufficient funds.
-missingItems = You do not have {0}x {1}.
-tradeSignEmpty = The trade sign does not have enough supply left.
-tradeCompleted = \u00a77Trade completed.
+addedToAccount = \u00a7a{0} has been added to your account.
+alertBroke = broke:
+alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
+alertPlaced = placed:
+alertUsed = used:
backAfterDeath = \u00a77Use the /back command to return to your death point.
-mutedUserSpeaks = {0} tried to speak, but is muted.
-userCreatedPortal = {0} used a portal and generated an exit portal.
-generatingPortal = \u00a77Generating an exit portal.
-userUsedPortal = {0} used an existing exit portal.
-usingPortal = \u00a77Teleporting via portal to an existing portal.
-teleportingPortal = \u00a77Teleporting via portal.
-freedMemory = Freed {0} MB.
-defaultBanReason = The Ban Hammer has spoken!
-noNewMail = \u00a77You have no new mail.
-serverFull = Server is full
-returnPlayerToJailError = Error occured when trying to return player to jail.
-jailMessage = \u00a7cYou do the crime, you do the time.
-homeSetToBed = \u00a77Your home is now set to this bed.
-moneyTaken = {0} taken from your bank account.
-youAreHealed = \u00a77You have been healed.
-markMailAsRead = \u00a7cTo mark your mail as read, type /mail clear
-balance = \u00a77Balance: {0}
backUsageMsg = \u00a77Returning to previous location.
-playerBanned = \u00a7cPlayer {0} banned
+backupFinished = Backup finished
+backupStarted = Backup started
+balance = \u00a77Balance: {0}
banIpAddress = \u00a77Banned IP address
-bigTreeSuccess = \u00a77Big tree spawned.
+bannedIpsFileError = Error reading banned-ips.txt
+bannedIpsFileNotFound = banned-ips.txt not found
+bannedPlayersFileError = Error reading banned-players.txt
+bannedPlayersFileNotFound = banned-players.txt not found
bigTreeFailure = \u00a7cBig tree generation failure. Try again on grass or dirt.
+bigTreeSuccess = \u00a77Big tree spawned.
broadcast = [\u00a7cBroadcast\u00a7f]\u00a7a {0}
+buildAlert = \u00a7cYou are not permitted to build
+bukkitFormatChanged = Bukkit version format changed. Version not checked.
burnMsg = \u00a77You set {0} on fire for {1} seconds.
-playerNotFound = \u00a7cPlayer not found.
-inventoryCleared = \u00a77Inventory Cleared.
-inventoryClearedOthers = \u00a77Inventory of \u00a7c{0}\u00a77 cleared.
-compassBearing = \u00a77Bearing: {0} ({1} degrees).
-deleteJail = \u00a77Jail {0} has been removed.
-deleteWarp = \u00a77Warp {0} has been removed.
-depth = \u00a77You are at sea level.
-depthAboveSea = \u00a77You are {0} block(s) above sea level.
-depthBelowSea = \u00a77You are {0} block(s) below sea level.
-extinguish = \u00a77You extinguished yourself.
-extinguishOthers = \u00a77You extinguished {0}.
canTalkAgain = \u00a77You can talk again
-haveBeenReleased = \u00a77You have been released
-upgradingFilesError = Error while upgrading the files
+cantFindGeoIpDB = Can''t find GeoIP database!
+cantReadGeoIpDB = Failed to read GeoIP database!
+cantSpawnItem = \u00a7cYou are not allowed to spawn the item {0}
+commandFailed = Command {0} failed:
+commandNotLoaded = \u00a7cCommand {0} is improperly loaded.
+compassBearing = \u00a77Bearing: {0} ({1} degrees).
configFileMoveError = Failed to move config.yml to backup location.
configFileRenameError = Failed to rename temp file to config.yml
-fileRenameError = Renaming file {0} failed
-userdataMoveError = Failed to move userdata/{0} to userdata/{1}.tmp
-duplicatedUserdata = Duplicated userdata: {0} and {1}
-userdataMoveBackError = Failed to move userdata/{0}.tmp to userdata/{1}
-parseError = Error parsing {0} on line {1}
-unknownItemName = Unknown item name: {0}
-unknownItemId = Unknown item id: {0}
-jailNotExist = That jail does not exist.
-unableToSpawnMob = Unable to spawn mob.
-creatingPortal = Creating portal at {0},{1},{2}.
-notSupportedYet = Not supported yet.
-unknownItemInList = Unknown item {0} in {1} list.
-teleportationCommencing = \u00a77Teleportation commencing...
+connectedPlayers = Connected players:
+connectionFailed = Failed to open connection.
cooldownWithMessage = \u00a7cCooldown: {0}
-warpingTo = \u00a77Warping to {0}.
-timeBeforeTeleport = Time before next teleport: {0}
-pendingTeleportCancelled = \u00a7cPending teleportation request cancelled.
-dontMoveMessage = \u00a77Teleportation will commence in {0}. Don''t move.
-noHomeSet = You have not set a home.
-noHomeSetPlayer = Player has not set a home.
-timeBeforeHeal = Time before next heal: {0}
-addedToAccount = \u00a7a{0} has been added to your account.
-moneySentTo = \u00a7a{0} has been sent to {1}
-moneyRecievedFrom = \u00a7a{0} has been recieved from {1}
-takenFromAccount = \u00a7c{0} has been taken from your account.
-emptyWorldName = Set Home: World name is null or empty.
-now = now
-year = year
-years = years
-month = month
-months = months
+corruptNodeInConfig = \u00a74Notice: Your configuration file has a corrupt {0} node.
+couldNotFindTemplate = Could not find template {0}
+creatingConfigFromTemplate = Creating config from template: {0}
+creatingEmptyConfig = Creating empty config: {0}
+creatingPortal = Creating portal at {0},{1},{2}.
day = day
days = days
-hour = hour
-hours = hours
-minute = minute
-minutes = minutes
-second = second
-seconds = seconds
+defaultBanReason = The Ban Hammer has spoken!
+deleteFileError = Could not delete file: {0}
+deleteJail = \u00a77Jail {0} has been removed.
+deleteWarp = \u00a77Warp {0} has been removed.
+deniedAccessCommand = {0} was denied access to command.
+dependancyDownloaded = [Essentials] Dependancy {0} downloaded successfully.
+dependancyException = [Essentials] An error occured when trying to download a dependacy
+dependancyNotFound = [Essentials] A required dependancy was not found, downloading now.
+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
-holeInFloor = Hole in floor
-warpNotExist = That warp does not exist.
-similarWarpExist = A warp with a similar name already exists.
-warpDeleteError = Problem deleting the warp file.
-versionMismatchAll = Version mismatch! Please update all Essentials jars to the same version.
-missingPrefixSuffix = Missing a prefix or suffix for {0}
-permissionsError = Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
-shoutFormat = \u00a77[Shout]\u00a7f {0}
-notAllowedToShout = \u00a7cYou are not authorized to shout.
-questionFormat = \u00a77[Question]\u00a7f {0}
-notAllowedToQuestion = \u00a7cYou are not authorized to use question.
-localFormat = Local: <{0}> {1}
-geoipJoinFormat = Player {0} comes from {1}
-cantFindGeoIpDB = Can''t find GeoIP database!
-cantReadGeoIpDB = Failed to read GeoIP database!
-geoIpUrlEmpty = GeoIP download url is empty.
+disableUnlimited = \u00a77Disabled unlimited placing of {0} for {1}.
+disabled = disabled
+dontMoveMessage = \u00a77Teleportation will commence in {0}. Don''t move.
downloadingGeoIp = Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB)
-geoIpUrlInvalid = GeoIP download url is invalid.
-connectionFailed = Failed to open connection.
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
-alertPlaced = placed:
-alertBroke = broke:
-alertUsed = used:
-buildAlert = \u00a7cYou are not permitted to build
-protectionOwner = \u00a76[EssentialsProtect] Protection owner: {0}
-spawnSet = \u00a77Spawn location set for group {0}.
-teleportNewPlayerError = Failed to teleport new player
+duplicatedUserdata = Duplicated userdata: {0} and {1}
+emptyWorldName = Set Home: World name is null or empty.
+enableUnlimited = \u00a77Giving unlimited amount of {0} to {1}.
+enabled = enabled
+errorCallingCommand = Error calling command /{0}
+errorWithMessage = \u00a7cError: {0}
essentialsReload = \u00a77Essentials Reloaded {0}
-gcmax = Maximum memory: {0} MB
-gcmin = Minimum memory: {0} MB
+extinguish = \u00a77You extinguished yourself.
+extinguishOthers = \u00a77You extinguished {0}.
+failedToCloseConfig = Failed to close config {0}
+failedToCreateConfig = Failed to create config {0}
+failedToWriteConfig = Failed to write config {0}
+fileRenameError = Renaming file {0} failed
+foreverAlone = \u00a7cYou have nobody to whom you can reply.
+freedMemory = Freed {0} MB.
gcchunks = chunks,
gcentities = entities
-godMode = \u00a77God mode {0}.
-enabled = enabled
-disabled = disabled
-godEnabledFor = enabled for {0}
+gcmax = Maximum memory: {0} MB
+gcmin = Minimum memory: {0} MB
+generatingPortal = \u00a77Generating an exit portal.
+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}.
+haveBeenReleased = \u00a77You have been released
heal = \u00a77You have been healed.
healOther = \u00a77Healed {0}.
-helpPages = Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
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
+homeSet = \u00a77Home set.
+homeSetToBed = \u00a77Your home is now set to this bed.
+hour = hour
+hours = hours
+ignorePlayer = You ignore player {0} from now on.
+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:
-infoChapter = Select chapter:
infoUnknownChapter = Unknown chapter.
-infoChapterPages = Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f:
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.
-cantSpawnItem = \u00a7cYou are not allowed to spawn the item {0}
+invalidMob = Invalid mob type.
+invalidServer = Invalid server!
+invalidSignLine = Line {0} on sign is invalid.
+invalidWorld = \u00a7cInvalid world.
+inventoryCleared = \u00a77Inventory Cleared.
+inventoryClearedOthers = \u00a77Inventory of \u00a7c{0}\u00a77 cleared.
+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.
+itemSellAir = You really tried to sell Air? Put an item in your hand.
+itemSold = \u00a77Sold for \u00a7c {0} \u00a77 ({1} items at {2} 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.
+jailMessage = \u00a7cYou do the crime, you do the time.
+jailNotExist = That jail does not exist.
+jailSet = \u00a77Jail {0} has been set
jumpError = That would hurt your computer''s brain.
kickDefault = Kicked from server
kill = \u00a77Killed {0}.
-noKits = \u00a77There are no kits available yet
kitError = \u00a7cThere are no valid kits.
kitError2 = \u00a7cThat kit does not exist or is improperly defined.
kitErrorHelp = \u00a7cPerhaps an item is missing a quantity in the configuration?
-noKitPermission = \u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit.
-kitTimed = \u00a7cYou can''t use that kit again for another {0}.
-kitInvFull = \u00a7cYour inventory was full, placing kit on the floor
kitGive = \u00a77Giving kit {0}.
-lightningUse = \u00a77Smiting {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
-connectedPlayers = Connected players:
-noMail = You do not have any mail
+lightningUse = \u00a77Smiting {0}
+loadWarpError = Failed to load warp {0}
+loadinfo = Loaded {0} build {1} by {2}
+localFormat = Local: <{0}> {1}
mailClear = \u00a7cTo mark your mail as read, type /mail clear
-noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
-playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
-mailSent = \u00a77Mail sent!
mailCleared = \u00a77Mail Cleared!
-voiceSilenced = \u00a77Your voice has been silenced
-noMotd = \u00a7cThere is no message of the day."
+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.
+mayNotJail = \u00a7cYou may not jail that person
me = me
-mutedPlayerFor = Player {0} muted for {1}.
+minute = minute
+minutes = minutes
+missingItems = You do not have {0}x {1}.
+missingPrefixSuffix = Missing a prefix or suffix for {0}
+mobSpawnError = Error while changing mob spawner.
+mobSpawnLimit = Mob quantity limited to server limit
+mobSpawnTarget = Target block must be a mob spawner.
+moneyRecievedFrom = \u00a7a{0} has been recieved from {1}
+moneySentTo = \u00a7a{0} has been sent to {1}
+moneyTaken = {0} taken from your bank account.
+month = month
+months = months
+moreThanZero = Quantities must be greater than 0.
+msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
mutedPlayer = Player {0} muted.
-unmutedPlayer = Player {0} unmuted.
-nickOthersPermission = \u00a7cYou do not have permission to change the nickname of others
-nickNoMore = \u00a7You no longer have a nickname.
-nickNamesAlpha = \u00a7cNicknames must be alphanumeric.
+mutedPlayerFor = Player {0} muted for {1}.
+mutedUserSpeaks = {0} tried to speak, but is muted.
+needTpohere = You need access to /tpohere to teleport other players.
+negativeBalanceError = User is not allowed to have a negative balance.
+nickChanged = Nickname changed.
nickInUse = \u00a7cThat name is already in use.
+nickNamesAlpha = \u00a7cNicknames must be alphanumeric.
+nickNoMore = \u00a7You no longer have a nickname.
+nickOthersPermission = \u00a7cYou do not have permission to change the nickname of others
nickSet = \u00a77Your nickname is now \u00a7c{0}
-nickChanged = Nickname changed.
+noAccessCommand = \u00a7cYou do not have access to that command.
+noAccessPermission = \u00a7cYou do not have permission to access that {0}.
+noDestroyPermission = \u00a7cYou do not have permission to destroy that {0}.
+noHomeSet = You have not set a home.
+noHomeSetPlayer = Player has not set a home.
+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
+noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
+noMotd = \u00a7cThere is no message of the day."
+noNewMail = \u00a77You have no new mail.
+noPendingRequest = You do not have a pending request.
+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.
+notEnoughMoney = You do not have sufficient funds.
+notRecommendedBukkit = Bukkit version is not the recommended build for Essentials.
+notSupportedYet = Not supported yet.
+now = now
+numberRequired = A number goes there, silly.
+onlyDayNight = /time only supports day/night.
+onlyPlayers = Only in-game players can use {0}.
+parseError = Error parsing {0} on line {1}
+pendingTeleportCancelled = \u00a7cPending teleportation request cancelled.
+permissionsError = Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
+playerBanned = \u00a7cPlayer {0} banned
+playerInJail = \u00a7cPlayer is already in jail {0}.
+playerJailed = \u00a77Player {0} jailed.
+playerJailedFor = \u00a77Player {0} jailed for {1}.
+playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
+playerNotFound = \u00a7cPlayer not found.
pong = Pong!
+possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
powerToolAir = Command can''t be attached to air.
powerToolAttach = Command assigned to {0}
powerToolRemove = Command removed from {0}
-foreverAlone = \u00a7cYou have nobody to whom you can reply.
-is = is
+protectionOwner = \u00a76[EssentialsProtect] Protection owner: {0}
+questionFormat = \u00a77[Question]\u00a7f {0}
reloadAllPlugins = \u00a77Reloaded all plugins.
-noRules = \u00a7cThere are no rules specified yet.
-seenOnline = Player {0} is online since {1}
+requestAccepted = \u00a77Teleport request accepted.
+requestDenied = \u00a77Teleport request denied.
+requestSent = \u00a77Request sent to {0}\u00a77.
+returnPlayerToJailError = Error occured when trying to return player to jail.
+second = second
+seconds = seconds
seenOffline = Player {0} is offline since {1}
-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.
-itemSold = \u00a77Sold for \u00a7c {0} \u00a77 ({1} items at {2} each)
-itemSoldConsole = {0} sold {1} for \u00a77 {2} \u00a77 ({3} items at {4} each)
-itemSellAir = You really tried to sell Air? Put an item in your hand.
-homeSet = \u00a77Home set.
-jailSet = \u00a77Jail {0} has been set
-warpSet = \u00a77Warp {0} set.
-worthSet = Worth value set
-mobSpawnTarget = Target block must be a mob spawner.
-mobSpawnError = Error while changing mob spawner.
-invalidMob = Invalid mob type.
-unableToSpawnMob = Unable to spawn mob.
-mobSpawnLimit = Mob quantity limited to server limit
+seenOnline = Player {0} is online since {1}
+serverFull = Server is full
+sheepMalformedColor = Malformed color.
+shoutFormat = \u00a77[Shout]\u00a7f {0}
+similarWarpExist = A warp with a similar name already exists.
+slimeMalformedSize = Malformed size.
soloMob = That mob likes to be alone
-numberRequired = A number goes there, silly.
+spawnSet = \u00a77Spawn location set for group {0}.
spawned = spawned
-slimeMalformedSize = Malformed size.
-sheepMalformedColor = Malformed color.
suicideMessage = \u00a77Goodbye Cruel World...
suicideSuccess = \u00a77{0} took their own life
+takenFromAccount = \u00a7c{0} has been taken from your account.
+teleportAll = \u00a77Teleporting all players...
+teleportAtoB = \u00a77{0}\u00a77 teleported you to {1}\u00a77.
+teleportDisabled = {0} has teleportation disabled.
+teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to him/her.
+teleportNewPlayerError = Failed to teleport new player
+teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
+teleportTop = \u00a77Teleporting to top.
+teleportationCommencing = \u00a77Teleportation commencing...
+teleportationDisabled = \u00a77Teleportation disabled.
+teleportationEnabled = \u00a77Teleportation enabled.
+teleporting = \u00a77Teleporting...
+teleportingPortal = \u00a77Teleporting via portal.
tempBanned = Temporarily banned from server for {0}
-thunderDuration = You {0} thunder in your world for {1} seconds.
thunder = You {0} thunder in your world
-deleteFileError = Could not delete file: {0}
-userDoesNotExist = The user {0} does not exist.
-negativeBalanceError = User is not allowed to have a negative balance.
+thunderDuration = You {0} thunder in your world for {1} seconds.
+timeBeforeHeal = Time before next heal: {0}
+timeBeforeTeleport = Time before next teleport: {0}
+timePattern = (?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
timeSet = Time set in all worlds.
-onlyDayNight = /time only supports day/night.
-mayNotJail = \u00a7cYou may not jail that person
-userJailed = \u00a77You have been jailed
-playerJailed = \u00a77Player {0} jailed.
-playerJailedFor = \u00a77Player {0} jailed for {1}.
-playerInJail = \u00a7cPlayer is already in jail {0}.
-teleportTop = \u00a77Teleporting to top.
-teleporting = \u00a77Teleporting...
-teleportDisabled = {0} has teleportation disabled.
-needTpohere = You need access to /tpohere to teleport other players.
-teleportAtoB = \u00a77{0}\u00a77 teleported you to {1}\u00a77.
-teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
+tradeCompleted = \u00a77Trade completed.
+tradeSignEmpty = The trade sign does not have enough supply left.
+treeFailure = \u00a7cTree generation failure. Try again on grass or dirt.
+treeSpawned = \u00a77Tree spawned.
typeTpaccept = \u00a77To teleport, type \u00a7c/tpaccept\u00a77.
typeTpdeny = \u00a77To deny this request, type \u00a7c/tpdeny\u00a77.
-requestSent = \u00a77Request sent to {0}\u00a77.
-teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to him/her.
-teleportAll = \u00a77Teleporting all players...
-noPendingRequest = You do not have a pending request.
-requestDenied = \u00a77Teleport request denied.
-requestAccepted = \u00a77Teleport request accepted.
-teleportationEnabled = \u00a77Teleportation enabled.
-teleportationDisabled = \u00a77Teleportation disabled.
-treeSpawned = \u00a77Tree spawned.
-treeFailure = \u00a7cTree generation failure. Try again on grass or dirt.
-unbannedPlayer = Unbanned player.
+typeWorldName = \u00a77You can also type the name of a specific world.
+unableToSpawnMob = Unable to spawn mob.
+unableToSpawnMob = Unable to spawn mob.
unbannedIP = Unbanned IP address.
-unlimitedItems = Unlimited items:
-none = none
+unbannedPlayer = Unbanned player.
+unignorePlayer = You are not ignoring player {0} anymore.
+unknownItemId = Unknown item id: {0}
+unknownItemInList = Unknown item {0} in {1} list.
+unknownItemName = Unknown item name: {0}
unlimitedItemPermission = \u00a7cNo permission for unlimited item {0}.
-disableUnlimited = \u00a77Disabled unlimited placing of {0} for {1}.
-enableUnlimited = \u00a77Giving unlimited amount of {0} to {1}.
+unlimitedItems = Unlimited items:
+unmutedPlayer = Player {0} unmuted.
+upgradingFilesError = Error while upgrading the files
+userCreatedPortal = {0} used a portal and generated an exit portal.
+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
+usingPortal = \u00a77Teleporting via portal to an existing portal.
+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.
warpListPermission = \u00a7cYou do not have Permission to list that warps.
-noWarpsDefined = No warps defined
+warpNotExist = That warp does not exist.
+warpSet = \u00a77Warp {0} set.
warpUsePermission = \u00a7cYou do not have Permission to use that warp.
-weatherSunFor = \u00a77You set the weather to sun in your world for {0} seconds
-weatherSun = \u00a77You set the weather to sun in your world
-weatherStormFor = \u00a77You set the weather to storm in your world for {0} seconds
+warpingTo = \u00a77Warping to {0}.
weatherStorm = \u00a77You set the weather to storm in your world
-whoisIs = {0} is {1}
+weatherStormFor = \u00a77You set the weather to storm in your world for {0} seconds
+weatherSun = \u00a77You set the weather to sun in your world
+weatherSunFor = \u00a77You set the weather to sun in your world for {0} seconds
+whoisGeoLocation = \u00a79 - Location: {0}
whoisHealth = \u00a79 - Health: {0}/20
+whoisIPAddress = \u00a79 - IP Address: {0}
+whoisIs = {0} is {1}
whoisLocation = \u00a79 - Location: ({0}, {1}, {2}, {3})
whoisMoney = \u00a79 - Money: {0}
-whoisStatusAway = \u00a79 - Status: \u00a7cAway\u00a7f
whoisStatusAvailable = \u00a79 - Status: Available
-whoisIPAddress = \u00a79 - IP Address: {0}
-whoisGeoLocation = \u00a79 - Location: {0}
-invalidWorld = \u00a7cInvalid world.
-possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
-typeWorldName = \u00a77You can also type the name of a specific world.
+whoisStatusAway = \u00a79 - Status: \u00a7cAway\u00a7f
worth = \u00a77Stack of {0} worth \u00a7c{1}\u00a77 ({2} item(s) at {3} each)
worthMeta = \u00a77Stack of {0} with metadata of {1} worth \u00a7c{2}\u00a77 ({3} item(s) at {4} each)
-onlyPlayers = Only in-game players can use {0}.
-unignorePlayer = You are not ignoring player {0} anymore.
-ignorePlayer = You ignore player {0} from now on.
-illegalDate = Illegal date format.
-timePattern = (?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-kits = \u00a77Kits: {0}
-loadWarpError = Failed to load warp {0}
-invalidSignLine = Line {0} on sign is invalid. \ No newline at end of file
+worthSet = Worth value set
+year = year
+years = years
+youAreHealed = \u00a77You have been healed.
+youHaveNewMail = \u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties
index 1d78bed71..e77fc4ed5 100644
--- a/Essentials/src/messages_da.properties
+++ b/Essentials/src/messages_da.properties
@@ -1,310 +1,313 @@
-#Danish Translation by papand13, papand13@gmail.com
-#Danish Translation Version: 1.0
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
-loadinfo = Indl\u00e6ste {0} byg {1} af {2}
-markedAsNotAway = \u00a77Du er ikke l\u00e6ngere markeret som v\u00e6k.
-markedAsAway = \u00a77Du er nu markeret som v\u00e6k.
-userIsNotAway = {0} er ikke l\u00e6ngere AFK
-userIsAway = {0} er nu AFK
-backupStarted = Backup startede
-backupFinished = Backup sluttede
-invalidServer = Ugyldig server!
-usingTempFolderForTesting = Bruger temp mappe for testing:
-versionMismatch = Version matcher ikke! Venligst opdater {0} til den nyeste version.
-notRecommendedBukkit = Bukkit version er ikke den anbefalede byg for Essentials.
-bukkitFormatChanged = Bukkit version format \u00e6ndret. Version er ikke checket.
-itemsCsvNotLoaded = Kunne ikke indl\u00e6se items.csv.
-corruptNodeInConfig = \u00a74Notice: Din konfigurations fil har en korrupt {0} node.
-youHaveNewMail = \u00a7cDu har {0} beskeder!\u00a7f Type \u00a77/post l\u00e6s\u00a7f for at se din post.
-commandNotLoaded = \u00a7cCommand {0} er ikke indl\u00e6st korrekt.
-deniedAccessCommand = {0} var n\u00e6gtet adgang til kommando.
-noAccessCommand = \u00a7cDu har ikke adgang til den kommando.
-errorCallingCommand = Fejl ved opkald af kommando /{0}
-commandFailed = Kommando {0} fejlede:
-bannedPlayersFileNotFound = banned-players.txt ikke fundet
-bannedPlayersFileError = Fejl i l\u00e6sning af banned-players.txt
-bannedIpsFileNotFound = banned-ips.txt ikke fundet
-bannedIpsFileError = Fejl i l\u00e6sning af banned-ips.txt
-noDestroyPermission = \u00a7cDu har ikke tilladelse til at \u00f8del\u00e6gge det {0}.
-noAccessPermission = \u00a7cDu har ikke tilladelse til at f\u00e5 adgang til det {0}.
-moreThanZero = M\u00e6ngder skal v\u00e6re st\u00f8rre end 0.
-errorWithMessage = \u00a7cFejl: {0}
-creatingConfigFromTemplate = Opretter config fra skabelon: {0}
-creatingEmptyConfig = Opretter tom config: {0}
-failedToCreateConfig = Fejl i oprettelse af config {0}
-couldNotFindTemplate = Kunne ikke finde skabelon {0}
-failedToWriteConfig = Fejlede i at skrive config {0}
-failedToCloseConfig = Fejlede i at lukke config {0}
-notEnoughMoney = Du har ikke tilstr\u00e6kkelig penge.
-missingItems = Du har ikke {0}x {1}.
-tradeSignEmpty = Forhandlings skiltet har ikke nok forsyning tilbage.
-tradeCompleted = \u00a77Forhandling fuldf\u00f8rt.
+#Danish Translation by papand13, papand13@gmail.com
+#Danish Translation Version: 1.0
+addedToAccount = \u00a7a{0} er tilf\u00f8jet til din konto.
+alertBroke = \u00f8delagde:
+alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3}
+alertPlaced = placerede:
+alertUsed = brugte:
backAfterDeath = \u00a77Brug /back kommandoen for at retunere til dit d\u00f8ds punkt.
-mutedUserSpeaks = {0} pr\u00f8vede at snakke, men er muted.
-userCreatedPortal = {0} bruge en portal og genererede en udgangs portal.
-generatingPortal = \u00a77Genererer en udgangs portal.
-userUsedPortal = {0} brugte en eksisterende udgangs portal.
-usingPortal = \u00a77Teleporterede via portal til en eksisterende portal.
-teleportingPortal = \u00a77Teleporterede via portal.
-freedMemory = Befriede {0} MB.
-defaultBanReason = Ban hammeren har talt!
-noNewMail = \u00a77Du har ingen ny post.
-serverFull = Server er fuld
-returnPlayerToJailError = En fejl opstod ved fors\u00f8g p\u00e5 at returnere spiller til f\u00e6ngsel.
-jailMessage = \u00a7cBryd reglerne, og tag din straf.
-homeSetToBed = \u00a77Dit hjem er nu sat til denne seng.
-moneyTaken = {0} taget fra din bank konto.
-youAreHealed = \u00a77Du er blevet helbredt.
-markMailAsRead = \u00a7cTo marker din post som l\u00e6st, skriv /post ryd
-balance = \u00a77Balance: {0}
backUsageMsg = \u00a77Returnere til tidligere placering.
-playerBanned = \u00a7cSpiller {0} bannet
+backupFinished = Backup sluttede
+backupStarted = Backup startede
+balance = \u00a77Balance: {0}
banIpAddress = \u00a77Bannede IP addresse
-bigTreeSuccess = \u00a77Stort tr\u00e6 fremkaldt.
+bannedIpsFileError = Fejl i l\u00e6sning af banned-ips.txt
+bannedIpsFileNotFound = banned-ips.txt ikke fundet
+bannedPlayersFileError = Fejl i l\u00e6sning af banned-players.txt
+bannedPlayersFileNotFound = banned-players.txt ikke fundet
bigTreeFailure = \u00a7cStort tr\u00e6 genererings fejl. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord.
+bigTreeSuccess = \u00a77Stort tr\u00e6 fremkaldt.
broadcast = [\u00a7cMeddelelse\u00a7f]\u00a7a {0}
+buildAlert = \u00a7cDu er ikke tilladt at bygge!
+bukkitFormatChanged = Bukkit version format \u00e6ndret. Version er ikke checket.
burnMsg = \u00a77Du satte ild til {0} for {1} sekunder.
-playerNotFound = \u00a7cSpiller ikke fundet.
-inventoryCleared = \u00a77Inventory ryddet.
-inventoryClearedOthers = \u00a77Inventory af \u00a7c{0}\u00a77 ryddet.
-compassBearing = \u00a77B\u00e6rer: {0} ({1} grader).
-deleteJail = \u00a77F\u00e6ngsel {0} er fjernet.
-deleteWarp = \u00a77Warp {0} er fjernet.
-depth = \u00a77Du er ved havoverfladen.
-depthAboveSea = \u00a77Du er {0} blok(ke) over havoverfladen.
-depthBelowSea = \u00a77Du er {0} blok(ke) under havoverfladen.
-extinguish = \u00a77Du slukkede dig selv.
-extinguishOthers = \u00a77Du slukkede {0}.
canTalkAgain = \u00a77Du kan snakke igen
-haveBeenReleased = \u00a77Du er blevet l\u00f8sladt
-upgradingFilesError = Fejl under opgradering af filer
+cantFindGeoIpDB = Kan ikke finde GeoIP database!
+cantReadGeoIpDB = Fejl ved l\u00e6sning af GeoIP database!
+cantSpawnItem = \u00a7cDu er ikke tilladt at spawne elementet {0}
+commandFailed = Kommando {0} fejlede:
+commandNotLoaded = \u00a7cCommand {0} er ikke indl\u00e6st korrekt.
+compassBearing = \u00a77B\u00e6rer: {0} ({1} grader).
configFileMoveError = Kunne ikke flytte config.yml til backup placering.
configFileRenameError = Kunne ikke omd\u00f8be temp fil til config.yml
-fileRenameError = Resterende fil {0} fejlede
-userdataMoveError = Kunne ikke flytte userdata/{0} til userdata/{1}.tmp
-duplicatedUserdata = Duplikerede userdata: {0} og {1}
-userdataMoveBackError = Kunne ikke flytte userdata/{0}.tmp til userdata/{1}
-parseError = Fejl ved parsing {0} p\u00e5 linje {1}
-unknownItemName = Ukendt element navn: {0}
-unknownItemId = Ukendt element id: {0}
-jailNotExist = Det f\u00e6ngsel eksisterer ikke.
-unableToSpawnMob = Kunne ikke fremkalde mob.
-creatingPortal = Opretter portal ved {0},{1},{2}.
-notSupportedYet = Ikke underst\u00f8ttet endnu.
-unknownItemInList = Ukendt element {0} i {1} liste.
-teleportationCommencing = \u00a77Teleportering begynder...
+connectedPlayers = Tilsluttede spillere:
+connectionFailed = Failed ved \u00e5bning af forbindelse.
cooldownWithMessage = \u00a7cNedk\u00f8lning: {0}
-warpingTo = \u00a77Warper til {0}.
-timeBeforeTeleport = Tid f\u00f8r n\u00e6ste teleportering: {0}
-pendingTeleportCancelled = \u00a7cVentende teleportations anmodning aflyst.
-dontMoveMessage = \u00a77Teleportering vil begynde om {0}. Bev\u00e6g dig ikke.
-noHomeSet = Du har sat et nyt hjem.
-noHomeSetPlayer = Spiller har ikke sat et hjem.
-timeBeforeHeal = Tid inden n\u00e6ste helbredelse: {0}
-addedToAccount = \u00a7a{0} er tilf\u00f8jet til din konto.
-moneySentTo = \u00a7a{0} er sendt til {1}
-moneyRecievedFrom = \u00a7a{0} er modtaget fra {1}
-takenFromAccount = \u00a7c{0} er taget fra din konto.
-emptyWorldName = S\u00e6t Hjem: World navn er null eller tom.
-now = nu
-year = \u00e5r
-years = \u00e5r
-month = m\u00e5ned
-months = m\u00e5neder
+corruptNodeInConfig = \u00a74Notice: Din konfigurations fil har en korrupt {0} node.
+couldNotFindTemplate = Kunne ikke finde skabelon {0}
+creatingConfigFromTemplate = Opretter config fra skabelon: {0}
+creatingEmptyConfig = Opretter tom config: {0}
+creatingPortal = Opretter portal ved {0},{1},{2}.
day = dag
days = dage
-hour = time
-hours = timer
-minute = minut
-minutes = minutter
-second = sekunde
-seconds = sekunder
+defaultBanReason = Ban hammeren har talt!
+deleteFileError = Kunne ikke slette fil: {0}
+deleteJail = \u00a77F\u00e6ngsel {0} er fjernet.
+deleteWarp = \u00a77Warp {0} er fjernet.
+deniedAccessCommand = {0} var n\u00e6gtet adgang til kommando.
+dependancyDownloaded = [Essentials] Dependancy {0} downloaded successfully.
+dependancyException = [Essentials] An error occured when trying to download a dependacy
+dependancyNotFound = [Essentials] A required dependancy was not found, downloading now.
+depth = \u00a77Du er ved havoverfladen.
+depthAboveSea = \u00a77Du er {0} blok(ke) over havoverfladen.
+depthBelowSea = \u00a77Du er {0} blok(ke) under havoverfladen.
destinationNotSet = Destination er ikke sat
-holeInFloor = Hul i gulv
-warpNotExist = Den warp eksisterer ikke.
-similarWarpExist = En warp med lignende tekst eksisterer allerede.
-warpDeleteError = Problem ved sletning af warp filen.
-versionMismatchAll = Version matcher ikke! Venligst opdater alle Essentials jar''er til samme version.
-missingPrefixSuffix = Mangler et pr\u00e6fiks eller suffiks for {0}
-permissionsError = Mangler Permissions/GroupManager; chat pr\u00e6fikser/suffikser vil v\u00e6re sl\u00e5et fra.
-shoutFormat = \u00a77[R\u00e5b]\u00a7f {0}
-notAllowedToShout = \u00a7cDu er ikke autoriseret til at r\u00e5be.
-questionFormat = \u00a77[Sp\u00f8rgsm\u00e5l]\u00a7f {0}
-notAllowedToQuestion = \u00a7cDu er ikke autoriseret til at bruge et sp\u00f8rgsm\u00e5l.
-localFormat = Lokal: <{0}> {1}
-geoipJoinFormat = Spiller {0} kommer fra {1}
-cantFindGeoIpDB = Kan ikke finde GeoIP database!
-cantReadGeoIpDB = Fejl ved l\u00e6sning af GeoIP database!
-geoIpUrlEmpty = GeoIP download url er tom.
+disableUnlimited = \u00a77Deaktiverede ubergr\u00e6nset placering af {0} for {1}.
+disabled = deaktiveret
+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: 20MB)
-geoIpUrlInvalid = GeoIP download url er ugyldig.
-connectionFailed = Failed ved \u00e5bning af forbindelse.
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3}
-alertPlaced = placerede:
-alertBroke = \u00f8delagde:
-alertUsed = brugte:
-buildAlert = \u00a7cDu er ikke tilladt at bygge!
-protectionOwner = \u00a76[EssentialsProtect] Beskyttelses ejer: {0}
-spawnSet = \u00a77Spawn placering sat for gruppe {0}.
-teleportNewPlayerError = Failed ved teleportering af ny spiller
+duplicatedUserdata = Duplikerede userdata: {0} og {1}
+emptyWorldName = S\u00e6t Hjem: World navn er null eller tom.
+enableUnlimited = \u00a77Giver ubegr\u00e6nset m\u00e6ngde af {0} til {1}.
+enabled = aktiveret
+errorCallingCommand = Fejl ved opkald af kommando /{0}
+errorWithMessage = \u00a7cFejl: {0}
essentialsReload = \u00a77Essentials Genindl\u00e6st {0}
-gcmax = Maximum memory: {0} MB
-gcmin = Minimum memory: {0} MB
+extinguish = \u00a77Du slukkede dig selv.
+extinguishOthers = \u00a77Du slukkede {0}.
+failedToCloseConfig = Fejlede i at lukke config {0}
+failedToCreateConfig = Fejl i oprettelse af config {0}
+failedToWriteConfig = Fejlede i at skrive config {0}
+fileRenameError = Resterende fil {0} fejlede
+foreverAlone = \u00a7cDu har ingen du kan svare.
+freedMemory = Befriede {0} MB.
gcchunks = stykker,
gcentities = enheder
-godMode = \u00a77Gud tilstand {0}.
-enabled = aktiveret
-disabled = deaktiveret
-godEnabledFor = aktiveret for {0}
+gcmax = Maximum memory: {0} MB
+gcmin = Minimum memory: {0} MB
+generatingPortal = \u00a77Genererer en udgangs portal.
+geoIpUrlEmpty = GeoIP download url er tom.
+geoIpUrlInvalid = GeoIP download url er ugyldig.
+geoipJoinFormat = Spiller {0} kommer fra {1}
godDisabledFor = deaktiveret for {0}
+godEnabledFor = aktiveret for {0}
+godMode = \u00a77Gud tilstand {0}.
+haveBeenReleased = \u00a77Du er blevet l\u00f8sladt
heal = \u00a77Du er blevet helbredt.
healOther = \u00a77Helbredt {0}.
-helpPages = Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f:
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
+homeSet = \u00a77Hjem sat.
+homeSetToBed = \u00a77Dit hjem er nu sat til denne seng.
+hour = time
+hours = timer
+ignorePlayer = Du ignorere spiller {0} fra nu af.
+illegalDate = Ilegal dato format.
+infoChapter = V\u00e6lg kapitel:
+infoChapterPages = Kapitel {0}, side \u00a7c{1}\u00a7f af \u00a7c{2}\u00a7f:
infoFileDoesNotExist = Fil info.txt eksisterer ikke. Laver en for dig.
infoPages = Side \u00a7c{0}\u00a7f af \u00a7c{1}\u00a7f:
-infoChapter = V\u00e6lg kapitel:
infoUnknownChapter = Ukendt kapitel.
-infoChapterPages = Kapitel {0}, side \u00a7c{1}\u00a7f af \u00a7c{2}\u00a7f:
invBigger = Den anden brugers inventory er st\u00f8rre end din.
invRestored = Din inventory er blevet genoprettet.
invSee = Du ser inventoryen af {0}.
invSeeHelp = Brug /invsee for at genoprette din inventory.
-cantSpawnItem = \u00a7cDu er ikke tilladt at spawne elementet {0}
+invalidMob = Ugyldig mob type.
+invalidServer = Ugyldig server!
+invalidSignLine = Linje {0} p\u00e5 skilt er ugyldig.
+invalidWorld = \u00a7cUgyldig verden.
+inventoryCleared = \u00a77Inventory ryddet.
+inventoryClearedOthers = \u00a77Inventory af \u00a7c{0}\u00a77 ryddet.
+is = er
+itemCannotBeSold = Det element kan ikke s\u00e6lges til serveren.
+itemMustBeStacked = Element skal handles i stakke. En m\u00e6ngde af 2s ville v\u00e6re to stakke, osv.
+itemNotEnough1 = \u00a7cDu har ikke nok af det element til at s\u00e6lge.
+itemNotEnough2 = \u00a77Hvis du ville have solgt alle dine elementer af den type, brug /sell elementnavn
+itemNotEnough3 = \u00a77/sell elementnavn -1 vil s\u00e6lge alle p\u00e5 n\u00e6r et element, osv.
+itemSellAir = Fors\u00f8gte du virkelig at s\u00e6lge luft? Kom et element i din h\u00e5nd.
+itemSold = \u00a77Solgte for \u00a7c {0} \u00a77 ({1} elementer for {2} hver)
+itemSoldConsole = {0} solgte {1} for \u00a77 {2} \u00a77 ({3} elementer for {4} hver)
itemSpawn = \u00a77Giver {0} af {1}
+itemsCsvNotLoaded = Kunne ikke indl\u00e6se items.csv.
+jailMessage = \u00a7cBryd reglerne, og tag din straf.
+jailNotExist = Det f\u00e6ngsel eksisterer ikke.
+jailSet = \u00a77F\u00e6ngsel {0} er blevet sat
jumpError = Det ville skade din computer''s hjerne.
kickDefault = Kicket fra serveren
kill = \u00a77Dr\u00e6bte {0}.
-noKits = \u00a77Der er ikke nogen pakker tilg\u00e6ngelig endnu
kitError = \u00a7cDer er ikke nogen gyldige pakker.
kitError2 = \u00a7cDen pakke eksisterer ikke eller er forkert defineret.
kitErrorHelp = \u00a7cM\u00e5ske mangler et element en m\u00e6ngde i konfigurationen?
-noKitPermission = \u00a7cDu har brug for \u00a7c{0}\u00a7c tilladelsen for at bruge den pakke.
-kitTimed = \u00a7cDu kan ikke den pakke igen f\u00f8r om {0}.
-kitInvFull = \u00a7cDin inventory var fuld, placere pakken p\u00e5 gulvet
kitGive = \u00a77Giver pakke {0}.
-lightningUse = \u00a77Sl\u00e5r {0}
+kitInvFull = \u00a7cDin inventory var fuld, placere pakken p\u00e5 gulvet
+kitTimed = \u00a7cDu kan ikke den pakke igen f\u00f8r om {0}.
+kits = \u00a77Pakker: {0}
lightningSmited = \u00a77Du er blevet sl\u00e5et
-connectedPlayers = Tilsluttede spillere:
-noMail = Du har ikke noget post
+lightningUse = \u00a77Sl\u00e5r {0}
+loadWarpError = Kunne ikke indl\u00e6se warp {0}
+loadinfo = Indl\u00e6ste {0} byg {1} af {2}
+localFormat = Lokal: <{0}> {1}
mailClear = \u00a7cFor at markere din post som l\u00e6st, skriv /mail clear
-noMailSendPerm = \u00a7cDu har ikke \u00a7fessentials.mail.send\u00a7c tilladelsen.
-playerNeverOnServer = \u00a7cSpiller {0} var aldrig p\u00e5 denne server.
-mailSent = \u00a77Post sendt!
mailCleared = \u00a77Post ryddet!
-voiceSilenced = \u00a77Din stemme er blevet d\u00e6mpet
-noMotd = \u00a7cDer er ikke nogen besked for dagen."
+mailSent = \u00a77Post sendt!
+markMailAsRead = \u00a7cTo marker din post som l\u00e6st, skriv /post ryd
+markedAsAway = \u00a77Du er nu markeret som v\u00e6k.
+markedAsNotAway = \u00a77Du er ikke l\u00e6ngere markeret som v\u00e6k.
+mayNotJail = \u00a7cDu m\u00e5 ikke f\u00e6ngsle den person
me = mig
-mutedPlayerFor = Spiller {0} d\u00e6mpet for {1}.
+minute = minut
+minutes = minutter
+missingItems = Du har ikke {0}x {1}.
+missingPrefixSuffix = Mangler et pr\u00e6fiks eller suffiks for {0}
+mobSpawnError = Fejl ved \u00e6ndring af mob fremkalder.
+mobSpawnLimit = Mob m\u00e6ngde begr\u00e6nset til server gr\u00e6nse
+mobSpawnTarget = M\u00e5l blok skal v\u00e6re en mob fremkalder.
+moneyRecievedFrom = \u00a7a{0} er modtaget fra {1}
+moneySentTo = \u00a7a{0} er sendt til {1}
+moneyTaken = {0} taget fra din bank konto.
+month = m\u00e5ned
+months = m\u00e5neder
+moreThanZero = M\u00e6ngder skal v\u00e6re st\u00f8rre end 0.
+msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
mutedPlayer = Spiller {0} d\u00e6mpet.
-unmutedPlayer = Spiller {0} ikke-d\u00e6mpet.
-nickOthersPermission = \u00a7cDu har ikke tilladelse til at \u00e6ndre andres kaldenavn
-nickNoMore = \u00a7Du har ikke l\u00e6ngere et kaldenavn.
-nickNamesAlpha = \u00a7cKaldenavne skal v\u00e6re alfanumeriske.
+mutedPlayerFor = Spiller {0} d\u00e6mpet for {1}.
+mutedUserSpeaks = {0} pr\u00f8vede at snakke, men er muted.
+needTpohere = Du skal have adgang til /tpohere for at teleporter andre spillere.
+negativeBalanceError = Brugeren er ikke tilladt at have en negativ saldo.
+nickChanged = Kaldenavn \u00e6ndret.
nickInUse = \u00a7cDet navn er allerede i brug.
+nickNamesAlpha = \u00a7cKaldenavne skal v\u00e6re alfanumeriske.
+nickNoMore = \u00a7Du har ikke l\u00e6ngere et kaldenavn.
+nickOthersPermission = \u00a7cDu har ikke tilladelse til at \u00e6ndre andres kaldenavn
nickSet = \u00a77Dit kaldenavn er nu \u00a7c{0}
-nickChanged = Kaldenavn \u00e6ndret.
+noAccessCommand = \u00a7cDu har ikke adgang til den kommando.
+noAccessPermission = \u00a7cDu har ikke tilladelse til at f\u00e5 adgang til det {0}.
+noDestroyPermission = \u00a7cDu har ikke tilladelse til at \u00f8del\u00e6gge det {0}.
+noHomeSet = Du har sat et nyt hjem.
+noHomeSetPlayer = Spiller har ikke sat et hjem.
+noKitPermission = \u00a7cDu har brug for \u00a7c{0}\u00a7c tilladelsen for at bruge den pakke.
+noKits = \u00a77Der er ikke nogen pakker tilg\u00e6ngelig endnu
+noMail = Du har ikke noget post
+noMailSendPerm = \u00a7cDu har ikke \u00a7fessentials.mail.send\u00a7c tilladelsen.
+noMotd = \u00a7cDer er ikke nogen besked for dagen."
+noNewMail = \u00a77Du har ingen ny post.
+noPendingRequest = Du har ikke en ventende anmodning.
+noRules = \u00a7cDer er ingen regler fastsat endnu.
+noWarpsDefined = Ingen warps defineret
+none = ingen
+notAllowedToQuestion = \u00a7cDu er ikke autoriseret til at bruge et sp\u00f8rgsm\u00e5l.
+notAllowedToShout = \u00a7cDu er ikke autoriseret til at r\u00e5be.
+notEnoughMoney = Du har ikke tilstr\u00e6kkelig penge.
+notRecommendedBukkit = Bukkit version er ikke den anbefalede byg for Essentials.
+notSupportedYet = Ikke underst\u00f8ttet endnu.
+now = nu
+numberRequired = Der skal v\u00e6re et nummer, fjolle.
+onlyDayNight = /time underst\u00f8tter kun day/night.
+onlyPlayers = Kun in-game spillere kan bruge {0}.
+parseError = Fejl ved parsing {0} p\u00e5 linje {1}
+pendingTeleportCancelled = \u00a7cVentende teleportations anmodning aflyst.
+permissionsError = Mangler Permissions/GroupManager; chat pr\u00e6fikser/suffikser vil v\u00e6re sl\u00e5et fra.
+playerBanned = \u00a7cSpiller {0} bannet
+playerInJail = \u00a7cSpiller er allerede i f\u00e6ngsel {0}.
+playerJailed = \u00a77Spiller {0} f\u00e6ngslet.
+playerJailedFor = \u00a77Spiller {0} f\u00e6ngslet for {1}.
+playerNeverOnServer = \u00a7cSpiller {0} var aldrig p\u00e5 denne server.
+playerNotFound = \u00a7cSpiller ikke fundet.
pong = Pong!
+possibleWorlds = \u00a77Mulige verdener er numrene 0 igennem {0}.
powerToolAir = Kommando kan ikke blive tildelt luft.
powerToolAttach = Kommando tildelt til {0}
powerToolRemove = Kommando fjernet fra {0}
-foreverAlone = \u00a7cDu har ingen du kan svare.
-is = er
+protectionOwner = \u00a76[EssentialsProtect] Beskyttelses ejer: {0}
+questionFormat = \u00a77[Sp\u00f8rgsm\u00e5l]\u00a7f {0}
reloadAllPlugins = \u00a77Genindl\u00e6ste alle tilf\u00f8jelser.
-noRules = \u00a7cDer er ingen regler fastsat endnu.
-seenOnline = Spiller {0} er online siden {1}
+requestAccepted = \u00a77Teleporterings anmodning n\u00e6gtet.
+requestDenied = \u00a77Teleporterings anmodning n\u00e6gtet.
+requestSent = \u00a77Anmodning sendt til {0}\u00a77.
+returnPlayerToJailError = En fejl opstod ved fors\u00f8g p\u00e5 at returnere spiller til f\u00e6ngsel.
+second = sekunde
+seconds = sekunder
seenOffline = Spiller {0} er offline siden {1}
-itemCannotBeSold = Det element kan ikke s\u00e6lges til serveren.
-itemMustBeStacked = Element skal handles i stakke. En m\u00e6ngde af 2s ville v\u00e6re to stakke, osv.
-itemNotEnough1 = \u00a7cDu har ikke nok af det element til at s\u00e6lge.
-itemNotEnough2 = \u00a77Hvis du ville have solgt alle dine elementer af den type, brug /sell elementnavn
-itemNotEnough3 = \u00a77/sell elementnavn -1 vil s\u00e6lge alle p\u00e5 n\u00e6r et element, osv.
-itemSold = \u00a77Solgte for \u00a7c {0} \u00a77 ({1} elementer for {2} hver)
-itemSoldConsole = {0} solgte {1} for \u00a77 {2} \u00a77 ({3} elementer for {4} hver)
-itemSellAir = Fors\u00f8gte du virkelig at s\u00e6lge luft? Kom et element i din h\u00e5nd.
-homeSet = \u00a77Hjem sat.
-jailSet = \u00a77F\u00e6ngsel {0} er blevet sat
-warpSet = \u00a77Warp {0} sat.
-worthSet = V\u00e6rd v\u00e6rdi sat
-mobSpawnTarget = M\u00e5l blok skal v\u00e6re en mob fremkalder.
-mobSpawnError = Fejl ved \u00e6ndring af mob fremkalder.
-invalidMob = Ugyldig mob type.
-unableToSpawnMob = Kan ikke spawne mob.
-mobSpawnLimit = Mob m\u00e6ngde begr\u00e6nset til server gr\u00e6nse
+seenOnline = Spiller {0} er online siden {1}
+serverFull = Server er fuld
+sheepMalformedColor = Misdannet farve.
+shoutFormat = \u00a77[R\u00e5b]\u00a7f {0}
+similarWarpExist = En warp med lignende tekst eksisterer allerede.
+slimeMalformedSize = Misdannet st\u00f8rrelse.
soloMob = Den mob kan godt lide at v\u00e6re alene
-numberRequired = Der skal v\u00e6re et nummer, fjolle.
+spawnSet = \u00a77Spawn placering sat for gruppe {0}.
spawned = spawnet
-slimeMalformedSize = Misdannet st\u00f8rrelse.
-sheepMalformedColor = Misdannet farve.
suicideMessage = \u00a77Farvel grusomme verden...
suicideSuccess = \u00a77{0} tog sit eget liv
+takenFromAccount = \u00a7c{0} er taget fra din konto.
+teleportAll = \u00a77Teleportere alle spillere...
+teleportAtoB = \u00a77{0}\u00a77 teleporterede dig til {1}\u00a77.
+teleportDisabled = {0} har teleportation deaktiveret.
+teleportHereRequest = \u00a7c{0}\u00a7c har anmodet at du teleportere dig til ham/hende.
+teleportNewPlayerError = Failed ved teleportering af ny spiller
+teleportRequest = \u00a7c{0}\u00a7c har anmodet om at teleportere til dig.
+teleportTop = \u00a77Teleportere til toppen.
+teleportationCommencing = \u00a77Teleportering begynder...
+teleportationDisabled = \u00a77Teleportering deaktiveret.
+teleportationEnabled = \u00a77Teleportering aktiveret.
+teleporting = \u00a77Teleportere...
+teleportingPortal = \u00a77Teleporterede via portal.
tempBanned = Midlertidigt bannet fra serveren for {0}
-thunderDuration = Du {0} torden i din verden i {1} sekunder.
thunder = Du {0} torden i din verden
-deleteFileError = Kunne ikke slette fil: {0}
-userDoesNotExist = Brugeren {0} eksisterer ikke.
-negativeBalanceError = Brugeren er ikke tilladt at have en negativ saldo.
+thunderDuration = Du {0} torden i din verden i {1} sekunder.
+timeBeforeHeal = Tid inden n\u00e6ste helbredelse: {0}
+timeBeforeTeleport = Tid f\u00f8r n\u00e6ste teleportering: {0}
+timePattern = (?:([0-9]+)\\s*[a\u00e5y][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[wu][a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[ht][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
timeSet = Tid er sat i alle verdener.
-onlyDayNight = /time underst\u00f8tter kun day/night.
-mayNotJail = \u00a7cDu m\u00e5 ikke f\u00e6ngsle den person
-userJailed = \u00a77Du er blevet f\u00e6ngslet
-playerJailed = \u00a77Spiller {0} f\u00e6ngslet.
-playerJailedFor = \u00a77Spiller {0} f\u00e6ngslet for {1}.
-playerInJail = \u00a7cSpiller er allerede i f\u00e6ngsel {0}.
-teleportTop = \u00a77Teleportere til toppen.
-teleporting = \u00a77Teleportere...
-teleportDisabled = {0} har teleportation deaktiveret.
-needTpohere = Du skal have adgang til /tpohere for at teleporter andre spillere.
-teleportAtoB = \u00a77{0}\u00a77 teleporterede dig til {1}\u00a77.
-teleportRequest = \u00a7c{0}\u00a7c har anmodet om at teleportere til dig.
+tradeCompleted = \u00a77Forhandling fuldf\u00f8rt.
+tradeSignEmpty = Forhandlings skiltet har ikke nok forsyning tilbage.
+treeFailure = \u00a7cTr\u00e6 genererings fejl. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord.
+treeSpawned = \u00a77Tr\u00e6 fremkaldt.
typeTpaccept = \u00a77For at teleportere, skriv \u00a7c/tpaccept\u00a77.
typeTpdeny = \u00a77For at n\u00e6gte denne anmodning, skriv \u00a7c/tpdeny\u00a77.
-requestSent = \u00a77Anmodning sendt til {0}\u00a77.
-teleportHereRequest = \u00a7c{0}\u00a7c har anmodet at du teleportere dig til ham/hende.
-teleportAll = \u00a77Teleportere alle spillere...
-noPendingRequest = Du har ikke en ventende anmodning.
-requestDenied = \u00a77Teleporterings anmodning n\u00e6gtet.
-requestAccepted = \u00a77Teleporterings anmodning n\u00e6gtet.
-teleportationEnabled = \u00a77Teleportering aktiveret.
-teleportationDisabled = \u00a77Teleportering deaktiveret.
-treeSpawned = \u00a77Tr\u00e6 fremkaldt.
-treeFailure = \u00a7cTr\u00e6 genererings fejl. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord.
-unbannedPlayer = Tilgav spiller, ikke l\u00e6ngere bannet.
+typeWorldName = \u00a77Du kan ogs\u00e5 skrive nanvet p\u00e5 en specifik verden.
+unableToSpawnMob = Kan ikke spawne mob.
+unableToSpawnMob = Kunne ikke fremkalde mob.
unbannedIP = Tilgav IP addresse, ikke l\u00e6ngere bannet.
-unlimitedItems = Uendelige elementer:
-none = ingen
+unbannedPlayer = Tilgav spiller, ikke l\u00e6ngere bannet.
+unignorePlayer = Du ignorere ikke spiller {0} mere.
+unknownItemId = Ukendt element id: {0}
+unknownItemInList = Ukendt element {0} i {1} liste.
+unknownItemName = Ukendt element navn: {0}
unlimitedItemPermission = \u00a7cIngen tilladelse til ubegr\u00e6nset element {0}.
-disableUnlimited = \u00a77Deaktiverede ubergr\u00e6nset placering af {0} for {1}.
-enableUnlimited = \u00a77Giver ubegr\u00e6nset m\u00e6ngde af {0} til {1}.
+unlimitedItems = Uendelige elementer:
+unmutedPlayer = Spiller {0} ikke-d\u00e6mpet.
+upgradingFilesError = Fejl under opgradering af filer
+userCreatedPortal = {0} bruge en portal og genererede en udgangs portal.
+userDoesNotExist = Brugeren {0} eksisterer ikke.
+userIsAway = {0} er nu AFK
+userIsNotAway = {0} er ikke l\u00e6ngere AFK
+userJailed = \u00a77Du er blevet f\u00e6ngslet
+userUsedPortal = {0} brugte en eksisterende udgangs portal.
+userdataMoveBackError = Kunne ikke flytte userdata/{0}.tmp til userdata/{1}
+userdataMoveError = Kunne ikke flytte userdata/{0} til userdata/{1}.tmp
+usingPortal = \u00a77Teleporterede via portal til en eksisterende portal.
+usingTempFolderForTesting = Bruger temp mappe for testing:
+versionMismatch = Version matcher ikke! Venligst opdater {0} til den nyeste version.
+versionMismatchAll = Version matcher ikke! Venligst opdater alle Essentials jar''er til samme version.
+voiceSilenced = \u00a77Din stemme er blevet d\u00e6mpet
+warpDeleteError = Problem ved sletning af warp filen.
warpListPermission = \u00a7cDu har ikke tilladelse til at liste de warps.
-noWarpsDefined = Ingen warps defineret
+warpNotExist = Den warp eksisterer ikke.
+warpSet = \u00a77Warp {0} sat.
warpUsePermission = \u00a7cDu har ikke tilladelse til at benytte den warp.
-weatherSunFor = \u00a77Du har sat vejret til sol i din verden i {0} sekunder
-weatherSun = \u00a77Du har sat vejret til sol
-weatherStormFor = \u00a77Du har sat vejret til storm i din verden i {0} sekunder
+warpingTo = \u00a77Warper til {0}.
weatherStorm = \u00a77Du har sat vejret til storm i din verden
-whoisIs = {0} er {1}
+weatherStormFor = \u00a77Du har sat vejret til storm i din verden i {0} sekunder
+weatherSun = \u00a77Du har sat vejret til sol
+weatherSunFor = \u00a77Du har sat vejret til sol i din verden i {0} sekunder
+whoisGeoLocation = \u00a79 - Placering: {0}
whoisHealth = \u00a79 - Helbred: {0}/20
+whoisIPAddress = \u00a79 - IP Addresse: {0}
+whoisIs = {0} er {1}
whoisLocation = \u00a79 - Placering: ({0}, {1}, {2}, {3})
whoisMoney = \u00a79 - Penge: {0}
-whoisStatusAway = \u00a79 - Status: \u00a7cV\u00e6k\u00a7f
whoisStatusAvailable = \u00a79 - Status: Tilg\u00e6ngelig
-whoisIPAddress = \u00a79 - IP Addresse: {0}
-whoisGeoLocation = \u00a79 - Placering: {0}
-invalidWorld = \u00a7cUgyldig verden.
-possibleWorlds = \u00a77Mulige verdener er numrene 0 igennem {0}.
-typeWorldName = \u00a77Du kan ogs\u00e5 skrive nanvet p\u00e5 en specifik verden.
+whoisStatusAway = \u00a79 - Status: \u00a7cV\u00e6k\u00a7f
worth = \u00a77Stak af {0} v\u00e6rd \u00a7c{1}\u00a77 ({2} element(er) for {3} hver)
worthMeta = \u00a77Stak af {0} med metadata af {1} v\u00e6rd \u00a7c{2}\u00a77 ({3} element(er) for {4} hver)
-onlyPlayers = Kun in-game spillere kan bruge {0}.
-unignorePlayer = Du ignorere ikke spiller {0} mere.
-ignorePlayer = Du ignorere spiller {0} fra nu af.
-illegalDate = Ilegal dato format.
-timePattern = (?:([0-9]+)\\s*[a\u00e5y][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[wu][a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[ht][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-kits = \u00a77Pakker: {0}
-loadWarpError = Kunne ikke indl\u00e6se warp {0}
-invalidSignLine = Linje {0} p\u00e5 skilt er ugyldig. \ No newline at end of file
+worthSet = V\u00e6rd v\u00e6rdi sat
+year = \u00e5r
+years = \u00e5r
+youAreHealed = \u00a77Du er blevet helbredt.
+youHaveNewMail = \u00a7cDu har {0} beskeder!\u00a7f Type \u00a77/post l\u00e6s\u00a7f for at se din post.
diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties
index 65d666c67..6d2ca2166 100644
--- a/Essentials/src/messages_de.properties
+++ b/Essentials/src/messages_de.properties
@@ -1,308 +1,311 @@
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
-loadinfo = Plugin {0} Version {1} geladen, erstellt von {2}, \u00fcbersetzt von snowleo
-markedAsNotAway = \u00a77Du wirst nicht mehr als abwesend angezeigt.
-markedAsAway = \u00a77Du wirst als abwesend angezeigt.
-userIsNotAway = {0} ist wieder da.
-userIsAway = {0} ist abwesend.
-backupStarted = Backup gestartet
-backupFinished = Backup beendet
-invalidServer = Ung\u00fcltiger Server!
-usingTempFolderForTesting = Benutze tempor\u00e4ren Ordner zum Testen:
-versionMismatch = Versionen nicht identisch! Bitte aktualisiere {0}.
-notRecommendedBukkit = Die verwendete Bukkit-Version ist nicht empfohlen f\u00fcr Essentials.
-bukkitFormatChanged = Bukkit-Versionsformat hat sich ge\u00e4ndert. Version nicht kontrolliert.
-itemsCsvNotLoaded = Konnte items.csv nicht laden.
-corruptNodeInConfig = \u00a74Hinweis: Deine Konfigurationsdatei hat einen ung\u00fcltigen Knoten {0}.
-youHaveNewMail = \u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen.
-commandNotLoaded = \u00a7cBefehl {0} ist nicht richtig geladen.
-deniedAccessCommand = {0} hat keinen Zugriff auf diesen Befehl.
-noAccessCommand = \u00a7cDu hast keinen Zugriff auf diesen Befehl.
-errorCallingCommand = Fehler beim Aufrufen des Befehls /{0}
-commandFailed = Befehl {0} scheiterte:
-bannedPlayersFileNotFound = banned-players.txt nicht gefunden
-bannedPlayersFileError = Fehler beim Lesen von banned-players.txt
-bannedIpsFileNotFound = banned-ips.txt nicht gefunden
-bannedIpsFileError = Fehler beim Lesen von banned-ips.txt
-noDestroyPermission = \u00a7cDu hast keine Rechte, den Block {0} zu zerst\u00f6ren.
-noAccessPermission = \u00a7cDu hast keine Rechte, den Block {0} zu \u00f6ffnen.
-moreThanZero = Anzahl muss gr\u00f6sser als 0 sein.
-errorWithMessage = \u00a7cFehler: {0}
-creatingConfigFromTemplate = Erstelle Konfiguration aus Vorlage: {0}
-creatingEmptyConfig = Erstelle leere Konfiguration: {0}
-failedToCreateConfig = Fehler beim Erstellen der Konfiguration {0}
-couldNotFindTemplate = Vorlage {0} konnte nicht gefunden werden.
-failedToWriteConfig = Fehler beim Schreiben der Konfiguration {0}
-failedToCloseConfig = Fehler beim Schliessen der Konfiguration {0}
-notEnoughMoney = Du hast nicht genug Geld.
-missingItems = Du ben\u00f6tigst {0}x {1}.
-tradeSignEmpty = Der Bestand des Trade-Schild ist aufgebraucht.
-tradeCompleted = \u00a77Handel abgeschlossen.
+addedToAccount = \u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt.
+alertBroke = zerst\u00f6rt:
+alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3}
+alertPlaced = plaziert:
+alertUsed = benutzt:
backAfterDeath = \u00a77Benutze den Befehl /back um zu deinem Todespunkt zur\u00fcck zu kehren.
-mutedUserSpeaks = {0} versuchte zu sprechen, aber ist stumm geschalt.
-userCreatedPortal = {0} benutzt ein Portal und hat ein Ausgangsportal erstellt.
-generatingPortal = \u00a77Erstelle ein Ausgangsportal.
-userUsedPortal = {0} benutzt ein vorhandenes Ausgangsportal.
-usingPortal = \u00a77Teleportiere durch Portal zum Ausgangsportal.
-teleportingPortal = \u00a77Teleportiere durch Portal.
-freedMemory = {0} MB frei gemacht.
-defaultBanReason = Der Bann-Hammer hat gesprochen!
-noNewMail = \u00a77Du hast keine Nachrichten.
-serverFull = Server ist voll
-returnPlayerToJailError = Fehler beim Versuch, den Spieler ins Gef\u00e4ngnis zu teleportieren.
-jailMessage = \u00a7cYou do the crime, you do the time.
-homeSetToBed = \u00a77Dein Zuhause ist nun an diesem Bett.
-moneyTaken = {0} wurde aus deiner Geldb\u00f6rse genommen.
-youAreHealed = \u00a77Du wurdest geheilt.
-markMailAsRead = \u00a7cUm deine Nachrichten zu l\u00f6schen, schreibe /mail clear
-balance = \u00a77Geldb\u00f6rse: {0}
backUsageMsg = \u00a77Kehre zur letzten Position zur\u00fcck.
-playerBanned = \u00a7cSpieler {0} gesperrt.
+backupFinished = Backup beendet
+backupStarted = Backup gestartet
+balance = \u00a77Geldb\u00f6rse: {0}
banIpAddress = \u00a77IP-Adresse gesperrt.
-bigTreeSuccess = \u00a77Grosser Baum gepflanzt.
+bannedIpsFileError = Fehler beim Lesen von banned-ips.txt
+bannedIpsFileNotFound = banned-ips.txt nicht gefunden
+bannedPlayersFileError = Fehler beim Lesen von banned-players.txt
+bannedPlayersFileNotFound = banned-players.txt nicht gefunden
bigTreeFailure = \u00a7cFehler beim Pflanzen von grossem Baum. Versuch es auf Gras oder Dreck.
+bigTreeSuccess = \u00a77Grosser Baum gepflanzt.
broadcast = [\u00a7cRundruf\u00a7f]\u00a7a {0}
+buildAlert = \u00a7cDu hast keine Rechte zum Bauen.
+bukkitFormatChanged = Bukkit-Versionsformat hat sich ge\u00e4ndert. Version nicht kontrolliert.
burnMsg = \u00a77Du hast {0} in Flammen gesetzt f\u00fcr {1} Sekunden.
-playerNotFound = \u00a7cSpieler nicht gefunden.
-inventoryCleared = \u00a77Inventar geleert.
-inventoryClearedOthers = \u00a77Inventar von \u00a7c{0}\u00a77 geleert.
-compassBearing = \u00a77Peilung: {0} ({1} Grad).
-deleteJail = \u00a77Gef\u00e4ngnis {0} wurde gel\u00f6scht.
-deleteWarp = \u00a77Warp-Punkt {0} wurde gel\u00f6scht.
-depth = \u00a77Du bist auf Meeresh\u00f6he.
-depthAboveSea = \u00a77Du bist {0} Bl\u00f6cke \u00fcber Meeresh\u00f6he.
-depthBelowSea = \u00a77Du bist {0} Bl\u00f6cke unter Meeresh\u00f6he.
-extinguish = \u00a77Du hast dich selbst gel\u00f6scht.
-extinguishOthers = \u00a77Du hast {0} gel\u00f6scht.
canTalkAgain = \u00a77Du kannst wieder sprechen.
-haveBeenReleased = \u00a77Du wurdest frei gelassen.
-upgradingFilesError = Fehler beim Aktualisieren der Dateien
+cantFindGeoIpDB = Kann GeoIP-Datenbank nicht finden!
+cantReadGeoIpDB = Fehler beim Einlesen der GeoIP-Datenbank!
+cantSpawnItem = \u00a7cDu darfst {0} nicht erzeugen.
+commandFailed = Befehl {0} scheiterte:
+commandNotLoaded = \u00a7cBefehl {0} ist nicht richtig geladen.
+compassBearing = \u00a77Peilung: {0} ({1} Grad).
configFileMoveError = Verschieben von config.yml zu einer Sicherheitskopie gescheitert.
configFileRenameError = Verschieben einer tempor\u00e4ren Datei nach config.yml gescheitert.
-fileRenameError = Umbenennen von {0} gescheitert.
-userdataMoveError = Verschieben von userdata/{0} nach userdata/{1}.tmp gescheitert.
-duplicatedUserdata = Doppelte Datei in userdata: {0} and {1}
-userdataMoveBackError = Verschieben von userdata/{0}.tmp nach userdata/{1} gescheitert.
-parseError = Fehler beim Parsen von {0} in Zeile {1}
-unknownItemName = Unbekannter Gegenstand: {0}
-unknownItemId = Unbekannte Item-Id: {0}
-jailNotExist = Dieses Gef\u00e4ngnis existiert nicht.
-unableToSpawnMob = Fehler beim Erzeugen von Monster.
-creatingPortal = Erzeuge Portal bei {0},{1},{2}.
-notSupportedYet = Noch nicht verf\u00fcgbar.
-unknownItemInList = Unbekannter Gegenstand {0} in Liste {1}.
-teleportationCommencing = \u00a77Teleportierung started...
+connectedPlayers = Verbundene Spieler:
+connectionFailed = Fehler beim Verbindungsaufbau.
cooldownWithMessage = \u00a7cBeschr\u00e4nkung: {0}
-warpingTo = \u00a77Teleportiere zu Warp-Punkt {0}.
-timeBeforeTeleport = Zeit bis zum n\u00e4chsten Teleport: {0}
-pendingTeleportCancelled = \u00a7cLaufende Teleportierung abgebrochen.
-dontMoveMessage = \u00a77Teleportierung startet in {0}. Beweg dich nicht.
-noHomeSet = Du hast kein Zuhause gesetzt.
-noHomeSetPlayer = Spieler hat kein Zuhause gesetzt.
-timeBeforeHeal = Zeit bis zur n\u00e4chsten Heilung: {0}
-addedToAccount = \u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt.
-moneySentTo = \u00a7aDu hast {1} {0} gegeben.
-moneyRecievedFrom = \u00a7a{1} hat dir {0} gegeben.
-takenFromAccount = \u00a7c{0} wurden aus deiner Geldb\u00f6rse genommen.
-emptyWorldName = /sethome: Weltname ist null oder leer.
-now = jetzt
-year = Jahr
-years = Jahre
-month = Monat
-months = Monate
+corruptNodeInConfig = \u00a74Hinweis: Deine Konfigurationsdatei hat einen ung\u00fcltigen Knoten {0}.
+couldNotFindTemplate = Vorlage {0} konnte nicht gefunden werden.
+creatingConfigFromTemplate = Erstelle Konfiguration aus Vorlage: {0}
+creatingEmptyConfig = Erstelle leere Konfiguration: {0}
+creatingPortal = Erzeuge Portal bei {0},{1},{2}.
day = Tag
days = Tage
-hour = Stunde
-hours = Stunden
-minute = Minute
-minutes = Minuten
-second = Sekunde
-seconds = Sekunden
+defaultBanReason = Der Bann-Hammer hat gesprochen!
+deleteFileError = Konnte Datei nicht l\u00f6schen: {0}
+deleteJail = \u00a77Gef\u00e4ngnis {0} wurde gel\u00f6scht.
+deleteWarp = \u00a77Warp-Punkt {0} wurde gel\u00f6scht.
+deniedAccessCommand = {0} hat keinen Zugriff auf diesen Befehl.
+dependancyDownloaded = [Essentials] Dependancy {0} downloaded successfully.
+dependancyException = [Essentials] An error occured when trying to download a dependacy
+dependancyNotFound = [Essentials] A required dependancy was not found, downloading now.
+depth = \u00a77Du bist auf Meeresh\u00f6he.
+depthAboveSea = \u00a77Du bist {0} Bl\u00f6cke \u00fcber Meeresh\u00f6he.
+depthBelowSea = \u00a77Du bist {0} Bl\u00f6cke unter Meeresh\u00f6he.
destinationNotSet = Ziel nicht gesetzt
-holeInFloor = Loch im Boden
-warpNotExist = Warp-Punkt existiert nicht.
-similarWarpExist = Ein Warp-Punkt mit einem \u00e4hnlichen Namen existiert bereits.
-warpDeleteError = Fehler beim L\u00f6schen der Warp-Datei.
-versionMismatchAll = Versionen ungleich! Bitte aktualisiere alle Essentials jars auf die gleiche Version.
-missingPrefixSuffix = Prefix/Suffix fehlt f\u00fcr {0}
-permissionsError = Permissions/GroupManager fehlt; Chat-Prefixe/-Suffixe sind ausgeschaltet.
-shoutFormat = \u00a77[Schrei]\u00a7f {0}
-notAllowedToShout = \u00a7cDu bist nicht berechtigt zu schreien.
-questionFormat = \u00a77[Frage]\u00a7f {0}
-notAllowedToQuestion = \u00a7cDu bist nicht berechtigt zu fragen.
-localFormat = Lokal: <{0}> {1}
-geoipJoinFormat = Spieler {0} kommst aus {1}
-cantFindGeoIpDB = Kann GeoIP-Datenbank nicht finden!
-cantReadGeoIpDB = Fehler beim Einlesen der GeoIP-Datenbank!
-geoIpUrlEmpty = GeoIP Download-URL ist leer.
+disableUnlimited = \u00a77Deaktiviere unendliches Platzieren von {0} f\u00fcr {1}.
+disabled = deaktiviert
+dontMoveMessage = \u00a77Teleportierung startet in {0}. Beweg dich nicht.
downloadingGeoIp = Lade GeoIP-Datenbank ... dies kann etwas dauern (country: 0.6 MB, city: 20MB)
-geoIpUrlInvalid = GeoIP Download-URL ist ung\u00fcltig.
-connectionFailed = Fehler beim Verbindungsaufbau.
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3}
-alertPlaced = plaziert:
-alertBroke = zerst\u00f6rt:
-alertUsed = benutzt:
-buildAlert = \u00a7cDu hast keine Rechte zum Bauen.
-protectionOwner = \u00a76[EssentialsProtect] Besitzer dieses Blocks: {0}
-spawnSet = \u00a77Spawn-Punkt gesetzt f\u00fcr Gruppe {0}.
-teleportNewPlayerError = Fehler beim Teleportieren eines neuen Spielers
+duplicatedUserdata = Doppelte Datei in userdata: {0} and {1}
+emptyWorldName = /sethome: Weltname ist null oder leer.
+enableUnlimited = \u00a77Gebe {1} unendliche Mengen von {0}.
+enabled = aktiviert
+errorCallingCommand = Fehler beim Aufrufen des Befehls /{0}
+errorWithMessage = \u00a7cFehler: {0}
essentialsReload = \u00a77Essentials neu geladen {0}
-gcmax = Maximaler Speicher: {0} MB
-gcmin = Minimaler Speicher: {0} MB
+extinguish = \u00a77Du hast dich selbst gel\u00f6scht.
+extinguishOthers = \u00a77Du hast {0} gel\u00f6scht.
+failedToCloseConfig = Fehler beim Schliessen der Konfiguration {0}
+failedToCreateConfig = Fehler beim Erstellen der Konfiguration {0}
+failedToWriteConfig = Fehler beim Schreiben der Konfiguration {0}
+fileRenameError = Umbenennen von {0} gescheitert.
+foreverAlone = \u00a7cDu hast niemanden, dem du antworten kannst.
+freedMemory = {0} MB frei gemacht.
gcchunks = Chunks,
gcentities = Einheiten
-godMode = \u00a77Unsterblichkeit {0}.
-enabled = aktiviert
-disabled = deaktiviert
-godEnabledFor = aktiviert f\u00fcr {0}
+gcmax = Maximaler Speicher: {0} MB
+gcmin = Minimaler Speicher: {0} MB
+generatingPortal = \u00a77Erstelle ein Ausgangsportal.
+geoIpUrlEmpty = GeoIP Download-URL ist leer.
+geoIpUrlInvalid = GeoIP Download-URL ist ung\u00fcltig.
+geoipJoinFormat = Spieler {0} kommt aus {1}
godDisabledFor = aktiviert f\u00fcr {0}
+godEnabledFor = aktiviert f\u00fcr {0}
+godMode = \u00a77Unsterblichkeit {0}.
+haveBeenReleased = \u00a77Du wurdest frei gelassen.
heal = \u00a77Du wurdest geheilt.
healOther = \u00a77{0} geheilt.
-helpPages = Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f:
helpConsole = Um die Hilfe der Konsole zu sehen, schreibe ?.
helpOp = \u00a7c[Hilfe]\u00a7f \u00a77{0}:\u00a7f {1}
+helpPages = Seite \u00a7c{0}\u00a7f von \u00a7c{1}\u00a7f:
+holeInFloor = Loch im Boden
+homeSet = \u00a77Zuhause gesetzt.
+homeSetToBed = \u00a77Dein Zuhause ist nun an diesem Bett.
+hour = Stunde
+hours = Stunden
+ignorePlayer = Du ignorierst ab jetzt Spieler {0}.
+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:
-infoChapter = W\u00e4hle Kapitel:
infoUnknownChapter = Unbekanntes Kapitel:
-infoChapterPages = Kapitel {0}, Seite \u00a7c{1}\u00a7f von \u00a7c{2}\u00a7f:
invBigger = Das andere Inventar ist gr\u00f6sser als deins.
invRestored = Dein Inventar wurde wieder hergestellt.
invSee = Du siehst das Inventar von {0}.
invSeeHelp = Benutze /invsee um dein Inventar wiederherzustellen.
-cantSpawnItem = \u00a7cDu darfst {0} nicht erzeugen.
+invalidMob = Ung\u00fcltiger Monstername.
+invalidServer = Ung\u00fcltiger Server!
+invalidSignLine = Die Zeile {0} auf dem Schild ist falsch.
+invalidWorld = \u00a7cUng\u00fcltige Welt.
+inventoryCleared = \u00a77Inventar geleert.
+inventoryClearedOthers = \u00a77Inventar von \u00a7c{0}\u00a77 geleert.
+is = ist
+itemCannotBeSold = Dieser Gegenstand kann nicht verkauft werden.
+itemMustBeStacked = Gegenstand muss als Stapel verkauft werden. Eine Anzahl von 2s verkauft 2 Stapel usw.
+itemNotEnough1 = \u00a7cDu hast nicht genug Gegenst\u00e4nde zum Verkaufen.
+itemNotEnough2 = \u00a77Wenn du alles verkaufen willst, nutze /sell itemname
+itemNotEnough3 = \u00a77/sell itemname -1 verkauft alles bis auf eins usw.
+itemSellAir = Du versuchst Luft zu verkaufen? Nimm einen Gegenstand in die Hand.
+itemSold = \u00a77Verkauft f\u00fcr \u00a7c{0}\u00a77 ({1} Einheiten je {2})
+itemSoldConsole = {0} verkauft {1} f\u00fcr \u00a77{2}\u00a77 ({3} Einheiten je {4})
itemSpawn = \u00a77Gebe {0}x {1}
+itemsCsvNotLoaded = Konnte items.csv nicht laden.
+jailMessage = \u00a7cYou do the crime, you do the time.
+jailNotExist = Dieses Gef\u00e4ngnis existiert nicht.
+jailSet = \u00a77Gef\u00e4ngnis {0} wurde erstellt.
jumpError = Das w\u00fcrde deinen Computer \u00fcberlasten.
kickDefault = Vom Server geworfen
kill = \u00a77{0} get\u00f6tet.
-noKits = \u00a77Es sind keine Ausr\u00fcstungen verf\u00fcgbar.
kitError = \u00a7cEs gibt keine g\u00fcltigen Ausr\u00fcstungen.
kitError2 = \u00a7cDiese Ausr\u00fcstung existiert nicht oder ist ung\u00fcltig.
kitErrorHelp = \u00a7cEventuell fehlt bei einem Gegenstand die Menge?
-noKitPermission = \u00a7cDu brauchst die Berechtigung \u00a7c{0}\u00a7c um diese Ausr\u00fcstung anzufordern.
-kitTimed = \u00a7cDu kannst diese Ausr\u00fcstung nicht innerhalb von {0} anfordern.
-kitInvFull = \u00a7cDein Inventar ist voll, lege Ausr\u00fcstung auf den Boden
kitGive = \u00a77Gebe Ausr\u00fcstung {0}.
-lightningUse = \u00a77Peinige {0}
+kitInvFull = \u00a7cDein Inventar ist voll, lege Ausr\u00fcstung auf den Boden
+kitTimed = \u00a7cDu kannst diese Ausr\u00fcstung nicht innerhalb von {0} anfordern.
+kits = \u00a77Ausr\u00fcstungen: {0}
lightningSmited = \u00a77Du wurdest gepeinigt.
-connectedPlayers = Verbundene Spieler:
-noMail = Du hast keine Nachrichten
+lightningUse = \u00a77Peinige {0}
+loadWarpError = Fehler beim Laden von Warp-Punkt {0}
+loadinfo = Plugin {0} Version {1} geladen, erstellt von {2}, \u00fcbersetzt von snowleo
+localFormat = Lokal: <{0}> {1}
mailClear = \u00a7cUm deine Nachrichten zu l\u00f6schen, schreibe /mail clear
-noMailSendPerm = \u00a7cDu hast die Rechte \u00a7fessentials.mail.send\u00a7c nicht.
-playerNeverOnServer = \u00a7cSpieler {0} war niemals auf diesem Server.
-mailSent = \u00a77Nachricht gesendet!
mailCleared = \u00a77Nachrichten gel\u00f6scht!
-voiceSilenced = \u00a77Du bist stumm
-noMotd = \u00a7cEs existiert keine Willkommensnachricht."
+mailSent = \u00a77Nachricht gesendet!
+markMailAsRead = \u00a7cUm deine Nachrichten zu l\u00f6schen, schreibe /mail clear
+markedAsAway = \u00a77Du wirst als abwesend angezeigt.
+markedAsNotAway = \u00a77Du wirst nicht mehr als abwesend angezeigt.
+mayNotJail = \u00a7cDu kannst diese Person nicht einsperren.
me = mir
-mutedPlayerFor = Player {0} ist nun stumm f\u00fcr {1}.
+minute = Minute
+minutes = Minuten
+missingItems = Du ben\u00f6tigst {0}x {1}.
+missingPrefixSuffix = Prefix/Suffix fehlt f\u00fcr {0}
+mobSpawnError = Fehler beim \u00e4ndern des Monster-Spawner.
+mobSpawnLimit = Anzahl an Monster auf Serverlimit beschr\u00e4nkt
+mobSpawnTarget = Zielblock, muss ein Monster-Spawner sein.
+moneyRecievedFrom = \u00a7a{1} hat dir {0} gegeben.
+moneySentTo = \u00a7aDu hast {1} {0} gegeben.
+moneyTaken = {0} wurde aus deiner Geldb\u00f6rse genommen.
+month = Monat
+months = Monate
+moreThanZero = Anzahl muss gr\u00f6sser als 0 sein.
+msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
mutedPlayer = Player {0} ist nun stumm.
-unmutedPlayer = Player {0} ist nicht mehr stumm.
-nickOthersPermission = \u00a7cDu hast keine Rechte um den Nicknamen von anderen zu \u00e4ndern.
-nickNoMore = \u00a7Du hast keinen Nicknamen mehr.
-nickNamesAlpha = \u00a7cNicknamen d\u00fcrfen nur alphanumerische Zeichen enthalten.
+mutedPlayerFor = Player {0} ist nun stumm f\u00fcr {1}.
+mutedUserSpeaks = {0} versuchte zu sprechen, aber ist stumm geschalt.
+needTpohere = Du brauchst Zugriff auf /tpohere um andere Spieler teleportieren zu k\u00f6nnen.
+negativeBalanceError = Spieler darf keine Schulden machen.
+nickChanged = Nickname ge\u00e4ndert.
nickInUse = \u00a7cDieser Name wird bereits verwendet.
+nickNamesAlpha = \u00a7cNicknamen d\u00fcrfen nur alphanumerische Zeichen enthalten.
+nickNoMore = \u00a7Du hast keinen Nicknamen mehr.
+nickOthersPermission = \u00a7cDu hast keine Rechte um den Nicknamen von anderen zu \u00e4ndern.
nickSet = \u00a77Dein Nickname ist nun \u00a7c{0}
-nickChanged = Nickname ge\u00e4ndert.
+noAccessCommand = \u00a7cDu hast keinen Zugriff auf diesen Befehl.
+noAccessPermission = \u00a7cDu hast keine Rechte, den Block {0} zu \u00f6ffnen.
+noDestroyPermission = \u00a7cDu hast keine Rechte, den Block {0} zu zerst\u00f6ren.
+noHomeSet = Du hast kein Zuhause gesetzt.
+noHomeSetPlayer = Spieler hat kein Zuhause gesetzt.
+noKitPermission = \u00a7cDu brauchst die Berechtigung \u00a7c{0}\u00a7c um diese Ausr\u00fcstung anzufordern.
+noKits = \u00a77Es sind keine Ausr\u00fcstungen verf\u00fcgbar.
+noMail = Du hast keine Nachrichten
+noMailSendPerm = \u00a7cDu hast die Rechte \u00a7fessentials.mail.send\u00a7c nicht.
+noMotd = \u00a7cEs existiert keine Willkommensnachricht."
+noNewMail = \u00a77Du hast keine Nachrichten.
+noPendingRequest = Du hast keine Teleportierungsanfragen.
+noRules = \u00a7cEs wurden keine Regeln definiert.
+noWarpsDefined = Keine Warp-Punkte erstellt.
+none = keine
+notAllowedToQuestion = \u00a7cDu bist nicht berechtigt zu fragen.
+notAllowedToShout = \u00a7cDu bist nicht berechtigt zu schreien.
+notEnoughMoney = Du hast nicht genug Geld.
+notRecommendedBukkit = Die verwendete Bukkit-Version ist nicht empfohlen f\u00fcr Essentials.
+notSupportedYet = Noch nicht verf\u00fcgbar.
+now = jetzt
+numberRequired = Ein Zahl wird ben\u00f6tigt.
+onlyDayNight = /time unterst\u00fctzt nur day/night.
+onlyPlayers = Nur Spieler k\u00f6nnen {0} benutzen.
+parseError = Fehler beim Parsen von {0} in Zeile {1}
+pendingTeleportCancelled = \u00a7cLaufende Teleportierung abgebrochen.
+permissionsError = Permissions/GroupManager fehlt; Chat-Prefixe/-Suffixe sind ausgeschaltet.
+playerBanned = \u00a7cSpieler {0} gesperrt.
+playerInJail = \u00a7cSpieler ist bereits in Gef\u00e4ngnis {0}.
+playerJailed = \u00a77Spieler {0} eingesperrt.
+playerJailedFor = \u00a77Spieler {0} eingesperrt f\u00fcr {1}.
+playerNeverOnServer = \u00a7cSpieler {0} war niemals auf diesem Server.
+playerNotFound = \u00a7cSpieler nicht gefunden.
pong = Pong!
+possibleWorlds = \u00a77M\u00f6gliche Welten sind nummeriet von 0 bis {0}.
powerToolAir = Befehl kann nicht mit Luft verbunden werden.
powerToolAttach = Befehl verbunden mit {0}
powerToolRemove = Befehl entfernt von {0}
-foreverAlone = \u00a7cDu hast niemanden, dem du antworten kannst.
-is = ist
+protectionOwner = \u00a76[EssentialsProtect] Besitzer dieses Blocks: {0}
+questionFormat = \u00a77[Frage]\u00a7f {0}
reloadAllPlugins = \u00a77Alle plugins neu geladen.
-noRules = \u00a7cEs wurden keine Regeln definiert.
-seenOnline = Spieler {0} ist online seit {1}
+requestAccepted = \u00a77Teleportierungsanfrage akzeptiert.
+requestDenied = \u00a77Teleportierungsanfrage verweigert.
+requestSent = \u00a77Anfrage gesendet an {0}\u00a77.
+returnPlayerToJailError = Fehler beim Versuch, den Spieler ins Gef\u00e4ngnis zu teleportieren.
+second = Sekunde
+seconds = Sekunden
seenOffline = Spieler {0} ist offline seit {1}
-itemCannotBeSold = Dieser Gegenstand kann nicht verkauft werden.
-itemMustBeStacked = Gegenstand muss als Stapel verkauft werden. Eine Anzahl von 2s verkauft 2 Stapel usw.
-itemNotEnough1 = \u00a7cDu hast nicht genug Gegenst\u00e4nde zum Verkaufen.
-itemNotEnough2 = \u00a77Wenn du alles verkaufen willst, nutze /sell itemname
-itemNotEnough3 = \u00a77/sell itemname -1 verkauft alles bis auf eins usw.
-itemSold = \u00a77Verkauft f\u00fcr \u00a7c{0}\u00a77 ({1} Einheiten je {2})
-itemSoldConsole = {0} verkauft {1} f\u00fcr \u00a77{2}\u00a77 ({3} Einheiten je {4})
-itemSellAir = Du versuchst Luft zu verkaufen? Nimm einen Gegenstand in die Hand.
-homeSet = \u00a77Zuhause gesetzt.
-jailSet = \u00a77Gef\u00e4ngnis {0} wurde erstellt.
-warpSet = \u00a77Warp-Punkt {0} wurde erstellt.
-worthSet = Wert des Gegenstands gesetzt.
-mobSpawnTarget = Zielblock, muss ein Monster-Spawner sein.
-mobSpawnError = Fehler beim \u00e4ndern des Monster-Spawner.
-invalidMob = Ung\u00fcltiger Monstername.
-unableToSpawnMob = Erzeugen von Monster gescheitert
-mobSpawnLimit = Anzahl an Monster auf Serverlimit beschr\u00e4nkt
+seenOnline = Spieler {0} ist online seit {1}
+serverFull = Server ist voll
+sheepMalformedColor = Ung\u00fcltige Farbe.
+shoutFormat = \u00a77[Schrei]\u00a7f {0}
+similarWarpExist = Ein Warp-Punkt mit einem \u00e4hnlichen Namen existiert bereits.
+slimeMalformedSize = Ung\u00fcltige Gr\u00f6sse.
soloMob = Das Monster m\u00f6chte allein sein.
-numberRequired = Ein Zahl wird ben\u00f6tigt.
+spawnSet = \u00a77Spawn-Punkt gesetzt f\u00fcr Gruppe {0}.
spawned = erzeugt
-slimeMalformedSize = Ung\u00fcltige Gr\u00f6sse.
-sheepMalformedColor = Ung\u00fcltige Farbe.
suicideMessage = \u00a77Lebewohl grausame Welt...
suicideSuccess = \u00a77{0} hat sich das Leben genommen.
+takenFromAccount = \u00a7c{0} wurden aus deiner Geldb\u00f6rse genommen.
+teleportAll = \u00a77Teleportiere alle Spieler...
+teleportAtoB = \u00a77{0}\u00a77 teleportiert dich zu {1}\u00a77.
+teleportDisabled = {0} verweigert die Teleportierung.
+teleportHereRequest = \u00a7c{0}\u00a7c fragt, ob du dich zu ihm teleportierst.
+teleportNewPlayerError = Fehler beim Teleportieren eines neuen Spielers
+teleportRequest = \u00a7c{0}\u00a7c fragt, ob er sich zu dir teleportieren darf.
+teleportTop = \u00a77Teleportiere nach oben.
+teleportationCommencing = \u00a77Teleportierung started...
+teleportationDisabled = \u00a77Teleportierung deaktiviert.
+teleportationEnabled = \u00a77Teleportierung aktiviert.
+teleporting = \u00a77Teleportiere...
+teleportingPortal = \u00a77Teleportiere durch Portal.
tempBanned = Zeitlich gesperrt vom Server f\u00fcr {0}
-thunderDuration = Du hast Donner in deiner Welt {0} f\u00fcr {1} Sekunden.
thunder = Du hast Donner in deiner Welt {0}.
-deleteFileError = Konnte Datei nicht l\u00f6schen: {0}
-userDoesNotExist = Spieler {0} existiert nicht.
-negativeBalanceError = Spieler darf keine Schulden machen.
+thunderDuration = Du hast Donner in deiner Welt {0} f\u00fcr {1} Sekunden.
+timeBeforeHeal = Zeit bis zur n\u00e4chsten Heilung: {0}
+timeBeforeTeleport = Zeit bis zum n\u00e4chsten Teleport: {0}
+timePattern = (?:([0-9]+)\\s*[yj][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[dt][a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:h|st)[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
timeSet = Zeit gesetzt in allen Welten.
-onlyDayNight = /time unterst\u00fctzt nur day/night.
-mayNotJail = \u00a7cDu kannst diese Person nicht einsperren.
-userJailed = \u00a77Du wurdest eingesperrt.
-playerJailed = \u00a77Spieler {0} eingesperrt.
-playerJailedFor = \u00a77Spieler {0} eingesperrt f\u00fcr {1}.
-playerInJail = \u00a7cSpieler ist bereits in Gef\u00e4ngnis {0}.
-teleportTop = \u00a77Teleportiere nach oben.
-teleporting = \u00a77Teleportiere...
-teleportDisabled = {0} verweigert die Teleportierung.
-needTpohere = Du brauchst Zugriff auf /tpohere um andere Spieler teleportieren zu k\u00f6nnen.
-teleportAtoB = \u00a77{0}\u00a77 teleportiert dich zu {1}\u00a77.
-teleportRequest = \u00a7c{0}\u00a7c fragt, ob er sich zu dir teleportieren darf.
+tradeCompleted = \u00a77Handel abgeschlossen.
+tradeSignEmpty = Der Bestand des Trade-Schild ist aufgebraucht.
+treeFailure = \u00a7cBaumpflanzung gescheitert. Versuche es auf Gras oder Dreck.
+treeSpawned = \u00a77Baum gepflanzt.
typeTpaccept = \u00a77Um zu teleportieren, schreibe \u00a7c/tpaccept\u00a77.
typeTpdeny = \u00a77Um diese Anfrage abzulehnen, schreibe \u00a7c/tpdeny\u00a77.
-requestSent = \u00a77Anfrage gesendet an {0}\u00a77.
-teleportHereRequest = \u00a7c{0}\u00a7c fragt, ob du dich zu ihm teleportierst.
-teleportAll = \u00a77Teleportiere alle Spieler...
-noPendingRequest = Du hast keine Teleportierungsanfragen.
-requestDenied = \u00a77Teleportierungsanfrage verweigert.
-requestAccepted = \u00a77Teleportierungsanfrage akzeptiert.
-teleportationEnabled = \u00a77Teleportierung aktiviert.
-teleportationDisabled = \u00a77Teleportierung deaktiviert.
-treeSpawned = \u00a77Baum gepflanzt.
-treeFailure = \u00a7cBaumpflanzung gescheitert. Versuche es auf Gras oder Dreck.
-unbannedPlayer = Verbannung von Spieler r\u00fcckg\u00e4ngig gemacht.
+typeWorldName = \u00a77Du kannst auch den Namen der Welt eingeben.
+unableToSpawnMob = Erzeugen von Monster gescheitert
+unableToSpawnMob = Fehler beim Erzeugen von Monster.
unbannedIP = Verbannung von IP-Adresse r\u00fcckg\u00e4ngig gemacht.
-unlimitedItems = Unendliche Objekte:
-none = keine
+unbannedPlayer = Verbannung von Spieler r\u00fcckg\u00e4ngig gemacht.
+unignorePlayer = Du ignorierst Spieler {0} nicht mehr.
+unknownItemId = Unbekannte Item-Id: {0}
+unknownItemInList = Unbekannter Gegenstand {0} in Liste {1}.
+unknownItemName = Unbekannter Gegenstand: {0}
unlimitedItemPermission = \u00a7cDu hast keine Rechte f\u00fcr {0}.
-disableUnlimited = \u00a77Deaktiviere unendliches Platzieren von {0} f\u00fcr {1}.
-enableUnlimited = \u00a77Gebe {1} unendliche Mengen von {0}.
+unlimitedItems = Unendliche Objekte:
+unmutedPlayer = Player {0} ist nicht mehr stumm.
+upgradingFilesError = Fehler beim Aktualisieren der Dateien
+userCreatedPortal = {0} benutzt ein Portal und hat ein Ausgangsportal erstellt.
+userDoesNotExist = Spieler {0} existiert nicht.
+userIsAway = {0} ist abwesend.
+userIsNotAway = {0} ist wieder da.
+userJailed = \u00a77Du wurdest eingesperrt.
+userUsedPortal = {0} benutzt ein vorhandenes Ausgangsportal.
+userdataMoveBackError = Verschieben von userdata/{0}.tmp nach userdata/{1} gescheitert.
+userdataMoveError = Verschieben von userdata/{0} nach userdata/{1}.tmp gescheitert.
+usingPortal = \u00a77Teleportiere durch Portal zum Ausgangsportal.
+usingTempFolderForTesting = Benutze tempor\u00e4ren Ordner zum Testen:
+versionMismatch = Versionen nicht identisch! Bitte aktualisiere {0}.
+versionMismatchAll = Versionen ungleich! Bitte aktualisiere alle Essentials jars auf die gleiche Version.
+voiceSilenced = \u00a77Du bist stumm
+warpDeleteError = Fehler beim L\u00f6schen der Warp-Datei.
warpListPermission = \u00a7cDu hast keine Berechtigung, die Warp-Punkte anzuzeigen.
-noWarpsDefined = Keine Warp-Punkte erstellt.
+warpNotExist = Warp-Punkt existiert nicht.
+warpSet = \u00a77Warp-Punkt {0} wurde erstellt.
warpUsePermission = \u00a7cDu hast keinen Zugriff auf diesen Warp-Punkt.
-weatherSunFor = \u00a77Du hast das Wetter zu Sonne f\u00fcr {0} Sekunden in deiner Welt ge\u00e4ndert.
-weatherSun = \u00a77Du hast das Wetter zu Sonne in deiner Welt ge\u00e4ndert.
-weatherStormFor = \u00a77Du hast das Wetter zu Sturm f\u00fcr {0} Sekunden in deiner Welt ge\u00e4ndert.
+warpingTo = \u00a77Teleportiere zu Warp-Punkt {0}.
weatherStorm = \u00a77Du hast das Wetter zu Sturm in deiner Welt ge\u00e4ndert.
-whoisIs = {0} ist {1}
+weatherStormFor = \u00a77Du hast das Wetter zu Sturm f\u00fcr {0} Sekunden in deiner Welt ge\u00e4ndert.
+weatherSun = \u00a77Du hast das Wetter zu Sonne in deiner Welt ge\u00e4ndert.
+weatherSunFor = \u00a77Du hast das Wetter zu Sonne f\u00fcr {0} Sekunden in deiner Welt ge\u00e4ndert.
+whoisGeoLocation = \u00a79 - Herkunft: {0}
whoisHealth = \u00a79 - Gesundheit: {0}/20
+whoisIPAddress = \u00a79 - IP-Adresse: {0}
+whoisIs = {0} ist {1}
whoisLocation = \u00a79 - Position: ({0}, {1}, {2}, {3})
whoisMoney = \u00a79 - Geldb\u00f6rse: {0}
-whoisStatusAway = \u00a79 - Status: \u00a7cAbwesend\u00a7f
whoisStatusAvailable = \u00a79 - Status: Anwesend
-whoisIPAddress = \u00a79 - IP-Adresse: {0}
-whoisGeoLocation = \u00a79 - Herkunft: {0}
-invalidWorld = \u00a7cUng\u00fcltige Welt.
-possibleWorlds = \u00a77M\u00f6gliche Welten sind nummeriet von 0 bis {0}.
-typeWorldName = \u00a77Du kannst auch den Namen der Welt eingeben.
+whoisStatusAway = \u00a79 - Status: \u00a7cAbwesend\u00a7f
worth = \u00a77Ein Stapel von {0} ist \u00a7c{1}\u00a77 wert ({2} Einheiten je {3})
worthMeta = \u00a77Ein Stapel von {0} mit Metadaten {1} ist \u00a7c{2}\u00a77 wert. ({3} Einheiten je {4})
-onlyPlayers = Nur Spieler k\u00f6nnen {0} benutzen.
-unignorePlayer = Du ignorierst Spieler {0} nicht mehr.
-ignorePlayer = Du ignorierst ab jetzt Spieler {0}.
-illegalDate = Ung\u00fcltiges Datumsformat.
-timePattern = (?:([0-9]+)\\s*[yj][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[dt][a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:h|st)[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-kits = \u00a77Ausr\u00fcstungen: {0}
-loadWarpError = Fehler beim Laden von Warp-Punkt {0}
-invalidSignLine = Die Zeile {0} auf dem Schild ist falsch. \ No newline at end of file
+worthSet = Wert des Gegenstands gesetzt.
+year = Jahr
+years = Jahre
+youAreHealed = \u00a77Du wurdest geheilt.
+youHaveNewMail = \u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen.
diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties
index 261c2237e..dabc86b26 100644
--- a/Essentials/src/messages_en.properties
+++ b/Essentials/src/messages_en.properties
@@ -1,308 +1,311 @@
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
-loadinfo = Loaded {0} build {1} by {2}
-markedAsNotAway = \u00a77You are no longer marked as away.
-markedAsAway = \u00a77You are now marked as away.
-userIsNotAway = {0} is no longer AFK
-userIsAway = {0} is now AFK
-backupStarted = Backup started
-backupFinished = Backup finished
-invalidServer = Invalid server!
-usingTempFolderForTesting = Using temp folder for testing:
-versionMismatch = Version mismatch! Please update {0} to the same version.
-notRecommendedBukkit = Bukkit version is not the recommended build for Essentials.
-bukkitFormatChanged = Bukkit version format changed. Version not checked.
-itemsCsvNotLoaded = Could not load items.csv.
-corruptNodeInConfig = \u00a74Notice: Your configuration file has a corrupt {0} node.
-youHaveNewMail = \u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
-commandNotLoaded = \u00a7cCommand {0} is improperly loaded.
-deniedAccessCommand = {0} was denied access to command.
-noAccessCommand = \u00a7cYou do not have access to that command.
-errorCallingCommand = Error calling command /{0}
-commandFailed = Command {0} failed:
-bannedPlayersFileNotFound = banned-players.txt not found
-bannedPlayersFileError = Error reading banned-players.txt
-bannedIpsFileNotFound = banned-ips.txt not found
-bannedIpsFileError = Error reading banned-ips.txt
-noDestroyPermission = \u00a7cYou do not have permission to destroy that {0}.
-noAccessPermission = \u00a7cYou do not have permission to access that {0}.
-moreThanZero = Quantities must be greater than 0.
-errorWithMessage = \u00a7cError: {0}
-creatingConfigFromTemplate = Creating config from template: {0}
-creatingEmptyConfig = Creating empty config: {0}
-failedToCreateConfig = Failed to create config {0}
-couldNotFindTemplate = Could not find template {0}
-failedToWriteConfig = Failed to write config {0}
-failedToCloseConfig = Failed to close config {0}
-notEnoughMoney = You do not have sufficient funds.
-missingItems = You do not have {0}x {1}.
-tradeSignEmpty = The trade sign does not have enough supply left.
-tradeCompleted = \u00a77Trade completed.
+addedToAccount = \u00a7a{0} has been added to your account.
+alertBroke = broke:
+alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
+alertPlaced = placed:
+alertUsed = used:
backAfterDeath = \u00a77Use the /back command to return to your death point.
-mutedUserSpeaks = {0} tried to speak, but is muted.
-userCreatedPortal = {0} used a portal and generated an exit portal.
-generatingPortal = \u00a77Generating an exit portal.
-userUsedPortal = {0} used an existing exit portal.
-usingPortal = \u00a77Teleporting via portal to an existing portal.
-teleportingPortal = \u00a77Teleporting via portal.
-freedMemory = Freed {0} MB.
-defaultBanReason = The Ban Hammer has spoken!
-noNewMail = \u00a77You have no new mail.
-serverFull = Server is full
-returnPlayerToJailError = Error occured when trying to return player to jail.
-jailMessage = \u00a7cYou do the crime, you do the time.
-homeSetToBed = \u00a77Your home is now set to this bed.
-moneyTaken = {0} taken from your bank account.
-youAreHealed = \u00a77You have been healed.
-markMailAsRead = \u00a7cTo mark your mail as read, type /mail clear
-balance = \u00a77Balance: {0}
backUsageMsg = \u00a77Returning to previous location.
-playerBanned = \u00a7cPlayer {0} banned
+backupFinished = Backup finished
+backupStarted = Backup started
+balance = \u00a77Balance: {0}
banIpAddress = \u00a77Banned IP address
-bigTreeSuccess = \u00a77Big tree spawned.
+bannedIpsFileError = Error reading banned-ips.txt
+bannedIpsFileNotFound = banned-ips.txt not found
+bannedPlayersFileError = Error reading banned-players.txt
+bannedPlayersFileNotFound = banned-players.txt not found
bigTreeFailure = \u00a7cBig tree generation failure. Try again on grass or dirt.
+bigTreeSuccess = \u00a77Big tree spawned.
broadcast = [\u00a7cBroadcast\u00a7f]\u00a7a {0}
+buildAlert = \u00a7cYou are not permitted to build
+bukkitFormatChanged = Bukkit version format changed. Version not checked.
burnMsg = \u00a77You set {0} on fire for {1} seconds.
-playerNotFound = \u00a7cPlayer not found.
-inventoryCleared = \u00a77Inventory Cleared.
-inventoryClearedOthers = \u00a77Inventory of \u00a7c{0}\u00a77 cleared.
-compassBearing = \u00a77Bearing: {0} ({1} degrees).
-deleteJail = \u00a77Jail {0} has been removed.
-deleteWarp = \u00a77Warp {0} has been removed.
-depth = \u00a77You are at sea level.
-depthAboveSea = \u00a77You are {0} block(s) above sea level.
-depthBelowSea = \u00a77You are {0} block(s) below sea level.
-extinguish = \u00a77You extinguished yourself.
-extinguishOthers = \u00a77You extinguished {0}.
canTalkAgain = \u00a77You can talk again
-haveBeenReleased = \u00a77You have been released
-upgradingFilesError = Error while upgrading the files
+cantFindGeoIpDB = Can''t find GeoIP database!
+cantReadGeoIpDB = Failed to read GeoIP database!
+cantSpawnItem = \u00a7cYou are not allowed to spawn the item {0}
+commandFailed = Command {0} failed:
+commandNotLoaded = \u00a7cCommand {0} is improperly loaded.
+compassBearing = \u00a77Bearing: {0} ({1} degrees).
configFileMoveError = Failed to move config.yml to backup location.
configFileRenameError = Failed to rename temp file to config.yml
-fileRenameError = Renaming file {0} failed
-userdataMoveError = Failed to move userdata/{0} to userdata/{1}.tmp
-duplicatedUserdata = Duplicated userdata: {0} and {1}
-userdataMoveBackError = Failed to move userdata/{0}.tmp to userdata/{1}
-parseError = Error parsing {0} on line {1}
-unknownItemName = Unknown item name: {0}
-unknownItemId = Unknown item id: {0}
-jailNotExist = That jail does not exist.
-unableToSpawnMob = Unable to spawn mob.
-creatingPortal = Creating portal at {0},{1},{2}.
-notSupportedYet = Not supported yet.
-unknownItemInList = Unknown item {0} in {1} list.
-teleportationCommencing = \u00a77Teleportation commencing...
+connectedPlayers = Connected players:
+connectionFailed = Failed to open connection.
cooldownWithMessage = \u00a7cCooldown: {0}
-warpingTo = \u00a77Warping to {0}.
-timeBeforeTeleport = Time before next teleport: {0}
-pendingTeleportCancelled = \u00a7cPending teleportation request cancelled.
-dontMoveMessage = \u00a77Teleportation will commence in {0}. Don''t move.
-noHomeSet = You have not set a home.
-noHomeSetPlayer = Player has not set a home.
-timeBeforeHeal = Time before next heal: {0}
-addedToAccount = \u00a7a{0} has been added to your account.
-moneySentTo = \u00a7a{0} has been sent to {1}
-moneyRecievedFrom = \u00a7a{0} has been recieved from {1}
-takenFromAccount = \u00a7c{0} has been taken from your account.
-emptyWorldName = Set Home: World name is null or empty.
-now = now
-year = year
-years = years
-month = month
-months = months
+corruptNodeInConfig = \u00a74Notice: Your configuration file has a corrupt {0} node.
+couldNotFindTemplate = Could not find template {0}
+creatingConfigFromTemplate = Creating config from template: {0}
+creatingEmptyConfig = Creating empty config: {0}
+creatingPortal = Creating portal at {0},{1},{2}.
day = day
days = days
-hour = hour
-hours = hours
-minute = minute
-minutes = minutes
-second = second
-seconds = seconds
+defaultBanReason = The Ban Hammer has spoken!
+deleteFileError = Could not delete file: {0}
+deleteJail = \u00a77Jail {0} has been removed.
+deleteWarp = \u00a77Warp {0} has been removed.
+deniedAccessCommand = {0} was denied access to command.
+dependancyDownloaded = [Essentials] Dependancy {0} downloaded successfully.
+dependancyException = [Essentials] An error occured when trying to download a dependacy
+dependancyNotFound = [Essentials] A required dependancy was not found, downloading now.
+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
-holeInFloor = Hole in floor
-warpNotExist = That warp does not exist.
-similarWarpExist = A warp with a similar name already exists.
-warpDeleteError = Problem deleting the warp file.
-versionMismatchAll = Version mismatch! Please update all Essentials jars to the same version.
-missingPrefixSuffix = Missing a prefix or suffix for {0}
-permissionsError = Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
-shoutFormat = \u00a77[Shout]\u00a7f {0}
-notAllowedToShout = \u00a7cYou are not authorized to shout.
-questionFormat = \u00a77[Question]\u00a7f {0}
-notAllowedToQuestion = \u00a7cYou are not authorized to use question.
-localFormat = Local: <{0}> {1}
-geoipJoinFormat = Player {0} comes from {1}
-cantFindGeoIpDB = Can''t find GeoIP database!
-cantReadGeoIpDB = Failed to read GeoIP database!
-geoIpUrlEmpty = GeoIP download url is empty.
+disableUnlimited = \u00a77Disabled unlimited placing of {0} for {1}.
+disabled = disabled
+dontMoveMessage = \u00a77Teleportation will commence in {0}. Don''t move.
downloadingGeoIp = Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB)
-geoIpUrlInvalid = GeoIP download url is invalid.
-connectionFailed = Failed to open connection.
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3}
-alertPlaced = placed:
-alertBroke = broke:
-alertUsed = used:
-buildAlert = \u00a7cYou are not permitted to build
-protectionOwner = \u00a76[EssentialsProtect] Protection owner: {0}
-spawnSet = \u00a77Spawn location set for group {0}.
-teleportNewPlayerError = Failed to teleport new player
+duplicatedUserdata = Duplicated userdata: {0} and {1}
+emptyWorldName = Set Home: World name is null or empty.
+enableUnlimited = \u00a77Giving unlimited amount of {0} to {1}.
+enabled = enabled
+errorCallingCommand = Error calling command /{0}
+errorWithMessage = \u00a7cError: {0}
essentialsReload = \u00a77Essentials Reloaded {0}
-gcmax = Maximum memory: {0} MB
-gcmin = Minimum memory: {0} MB
+extinguish = \u00a77You extinguished yourself.
+extinguishOthers = \u00a77You extinguished {0}.
+failedToCloseConfig = Failed to close config {0}
+failedToCreateConfig = Failed to create config {0}
+failedToWriteConfig = Failed to write config {0}
+fileRenameError = Renaming file {0} failed
+foreverAlone = \u00a7cYou have nobody to whom you can reply.
+freedMemory = Freed {0} MB.
gcchunks = chunks,
gcentities = entities
-godMode = \u00a77God mode {0}.
-enabled = enabled
-disabled = disabled
-godEnabledFor = enabled for {0}
+gcmax = Maximum memory: {0} MB
+gcmin = Minimum memory: {0} MB
+generatingPortal = \u00a77Generating an exit portal.
+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}.
+haveBeenReleased = \u00a77You have been released
heal = \u00a77You have been healed.
healOther = \u00a77Healed {0}.
-helpPages = Page \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f:
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
+homeSet = \u00a77Home set.
+homeSetToBed = \u00a77Your home is now set to this bed.
+hour = hour
+hours = hours
+ignorePlayer = You ignore player {0} from now on.
+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:
-infoChapter = Select chapter:
infoUnknownChapter = Unknown chapter.
-infoChapterPages = Chapter {0}, page \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f:
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.
-cantSpawnItem = \u00a7cYou are not allowed to spawn the item {0}
+invalidMob = Invalid mob type.
+invalidServer = Invalid server!
+invalidSignLine = Line {0} on sign is invalid.
+invalidWorld = \u00a7cInvalid world.
+inventoryCleared = \u00a77Inventory Cleared.
+inventoryClearedOthers = \u00a77Inventory of \u00a7c{0}\u00a77 cleared.
+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.
+itemSellAir = You really tried to sell Air? Put an item in your hand.
+itemSold = \u00a77Sold for \u00a7c {0} \u00a77 ({1} items at {2} 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.
+jailMessage = \u00a7cYou do the crime, you do the time.
+jailNotExist = That jail does not exist.
+jailSet = \u00a77Jail {0} has been set
jumpError = That would hurt your computer''s brain.
kickDefault = Kicked from server
kill = \u00a77Killed {0}.
-noKits = \u00a77There are no kits available yet
kitError = \u00a7cThere are no valid kits.
kitError2 = \u00a7cThat kit does not exist or is improperly defined.
kitErrorHelp = \u00a7cPerhaps an item is missing a quantity in the configuration?
-noKitPermission = \u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit.
-kitTimed = \u00a7cYou can''t use that kit again for another {0}.
-kitInvFull = \u00a7cYour inventory was full, placing kit on the floor
kitGive = \u00a77Giving kit {0}.
-lightningUse = \u00a77Smiting {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
-connectedPlayers = Connected players:
-noMail = You do not have any mail
+lightningUse = \u00a77Smiting {0}
+loadWarpError = Failed to load warp {0}
+loadinfo = Loaded {0} build {1} by {2}
+localFormat = Local: <{0}> {1}
mailClear = \u00a7cTo mark your mail as read, type /mail clear
-noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
-playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
-mailSent = \u00a77Mail sent!
mailCleared = \u00a77Mail Cleared!
-voiceSilenced = \u00a77Your voice has been silenced
-noMotd = \u00a7cThere is no message of the day."
+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.
+mayNotJail = \u00a7cYou may not jail that person
me = me
-mutedPlayerFor = Player {0} muted for {1}.
+minute = minute
+minutes = minutes
+missingItems = You do not have {0}x {1}.
+missingPrefixSuffix = Missing a prefix or suffix for {0}
+mobSpawnError = Error while changing mob spawner.
+mobSpawnLimit = Mob quantity limited to server limit
+mobSpawnTarget = Target block must be a mob spawner.
+moneyRecievedFrom = \u00a7a{0} has been recieved from {1}
+moneySentTo = \u00a7a{0} has been sent to {1}
+moneyTaken = {0} taken from your bank account.
+month = month
+months = months
+moreThanZero = Quantities must be greater than 0.
+msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
mutedPlayer = Player {0} muted.
-unmutedPlayer = Player {0} unmuted.
-nickOthersPermission = \u00a7cYou do not have permission to change the nickname of others
-nickNoMore = \u00a7You no longer have a nickname.
-nickNamesAlpha = \u00a7cNicknames must be alphanumeric.
+mutedPlayerFor = Player {0} muted for {1}.
+mutedUserSpeaks = {0} tried to speak, but is muted.
+needTpohere = You need access to /tpohere to teleport other players.
+negativeBalanceError = User is not allowed to have a negative balance.
+nickChanged = Nickname changed.
nickInUse = \u00a7cThat name is already in use.
+nickNamesAlpha = \u00a7cNicknames must be alphanumeric.
+nickNoMore = \u00a7You no longer have a nickname.
+nickOthersPermission = \u00a7cYou do not have permission to change the nickname of others
nickSet = \u00a77Your nickname is now \u00a7c{0}
-nickChanged = Nickname changed.
+noAccessCommand = \u00a7cYou do not have access to that command.
+noAccessPermission = \u00a7cYou do not have permission to access that {0}.
+noDestroyPermission = \u00a7cYou do not have permission to destroy that {0}.
+noHomeSet = You have not set a home.
+noHomeSetPlayer = Player has not set a home.
+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
+noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
+noMotd = \u00a7cThere is no message of the day."
+noNewMail = \u00a77You have no new mail.
+noPendingRequest = You do not have a pending request.
+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.
+notEnoughMoney = You do not have sufficient funds.
+notRecommendedBukkit = Bukkit version is not the recommended build for Essentials.
+notSupportedYet = Not supported yet.
+now = now
+numberRequired = A number goes there, silly.
+onlyDayNight = /time only supports day/night.
+onlyPlayers = Only in-game players can use {0}.
+parseError = Error parsing {0} on line {1}
+pendingTeleportCancelled = \u00a7cPending teleportation request cancelled.
+permissionsError = Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
+playerBanned = \u00a7cPlayer {0} banned
+playerInJail = \u00a7cPlayer is already in jail {0}.
+playerJailed = \u00a77Player {0} jailed.
+playerJailedFor = \u00a77Player {0} jailed for {1}.
+playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
+playerNotFound = \u00a7cPlayer not found.
pong = Pong!
+possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
powerToolAir = Command can''t be attached to air.
powerToolAttach = Command assigned to {0}
powerToolRemove = Command removed from {0}
-foreverAlone = \u00a7cYou have nobody to whom you can reply.
-is = is
+protectionOwner = \u00a76[EssentialsProtect] Protection owner: {0}
+questionFormat = \u00a77[Question]\u00a7f {0}
reloadAllPlugins = \u00a77Reloaded all plugins.
-noRules = \u00a7cThere are no rules specified yet.
-seenOnline = Player {0} is online since {1}
+requestAccepted = \u00a77Teleport request accepted.
+requestDenied = \u00a77Teleport request denied.
+requestSent = \u00a77Request sent to {0}\u00a77.
+returnPlayerToJailError = Error occured when trying to return player to jail.
+second = second
+seconds = seconds
seenOffline = Player {0} is offline since {1}
-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.
-itemSold = \u00a77Sold for \u00a7c {0} \u00a77 ({1} items at {2} each)
-itemSoldConsole = {0} sold {1} for \u00a77 {2} \u00a77 ({3} items at {4} each)
-itemSellAir = You really tried to sell Air? Put an item in your hand.
-homeSet = \u00a77Home set.
-jailSet = \u00a77Jail {0} has been set
-warpSet = \u00a77Warp {0} set.
-worthSet = Worth value set
-mobSpawnTarget = Target block must be a mob spawner.
-mobSpawnError = Error while changing mob spawner.
-invalidMob = Invalid mob type.
-unableToSpawnMob = Unable to spawn mob.
-mobSpawnLimit = Mob quantity limited to server limit
+seenOnline = Player {0} is online since {1}
+serverFull = Server is full
+sheepMalformedColor = Malformed color.
+shoutFormat = \u00a77[Shout]\u00a7f {0}
+similarWarpExist = A warp with a similar name already exists.
+slimeMalformedSize = Malformed size.
soloMob = That mob likes to be alone
-numberRequired = A number goes there, silly.
+spawnSet = \u00a77Spawn location set for group {0}.
spawned = spawned
-slimeMalformedSize = Malformed size.
-sheepMalformedColor = Malformed color.
suicideMessage = \u00a77Goodbye Cruel World...
suicideSuccess = \u00a77{0} took their own life
+takenFromAccount = \u00a7c{0} has been taken from your account.
+teleportAll = \u00a77Teleporting all players...
+teleportAtoB = \u00a77{0}\u00a77 teleported you to {1}\u00a77.
+teleportDisabled = {0} has teleportation disabled.
+teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to him/her.
+teleportNewPlayerError = Failed to teleport new player
+teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
+teleportTop = \u00a77Teleporting to top.
+teleportationCommencing = \u00a77Teleportation commencing...
+teleportationDisabled = \u00a77Teleportation disabled.
+teleportationEnabled = \u00a77Teleportation enabled.
+teleporting = \u00a77Teleporting...
+teleportingPortal = \u00a77Teleporting via portal.
tempBanned = Temporarily banned from server for {0}
-thunderDuration = You {0} thunder in your world for {1} seconds.
thunder = You {0} thunder in your world
-deleteFileError = Could not delete file: {0}
-userDoesNotExist = The user {0} does not exist.
-negativeBalanceError = User is not allowed to have a negative balance.
+thunderDuration = You {0} thunder in your world for {1} seconds.
+timeBeforeHeal = Time before next heal: {0}
+timeBeforeTeleport = Time before next teleport: {0}
+timePattern = (?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
timeSet = Time set in all worlds.
-onlyDayNight = /time only supports day/night.
-mayNotJail = \u00a7cYou may not jail that person
-userJailed = \u00a77You have been jailed
-playerJailed = \u00a77Player {0} jailed.
-playerJailedFor = \u00a77Player {0} jailed for {1}.
-playerInJail = \u00a7cPlayer is already in jail {0}.
-teleportTop = \u00a77Teleporting to top.
-teleporting = \u00a77Teleporting...
-teleportDisabled = {0} has teleportation disabled.
-needTpohere = You need access to /tpohere to teleport other players.
-teleportAtoB = \u00a77{0}\u00a77 teleported you to {1}\u00a77.
-teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
+tradeCompleted = \u00a77Trade completed.
+tradeSignEmpty = The trade sign does not have enough supply left.
+treeFailure = \u00a7cTree generation failure. Try again on grass or dirt.
+treeSpawned = \u00a77Tree spawned.
typeTpaccept = \u00a77To teleport, type \u00a7c/tpaccept\u00a77.
typeTpdeny = \u00a77To deny this request, type \u00a7c/tpdeny\u00a77.
-requestSent = \u00a77Request sent to {0}\u00a77.
-teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to him/her.
-teleportAll = \u00a77Teleporting all players...
-noPendingRequest = You do not have a pending request.
-requestDenied = \u00a77Teleport request denied.
-requestAccepted = \u00a77Teleport request accepted.
-teleportationEnabled = \u00a77Teleportation enabled.
-teleportationDisabled = \u00a77Teleportation disabled.
-treeSpawned = \u00a77Tree spawned.
-treeFailure = \u00a7cTree generation failure. Try again on grass or dirt.
-unbannedPlayer = Unbanned player.
+typeWorldName = \u00a77You can also type the name of a specific world.
+unableToSpawnMob = Unable to spawn mob.
+unableToSpawnMob = Unable to spawn mob.
unbannedIP = Unbanned IP address.
-unlimitedItems = Unlimited items:
-none = none
+unbannedPlayer = Unbanned player.
+unignorePlayer = You are not ignoring player {0} anymore.
+unknownItemId = Unknown item id: {0}
+unknownItemInList = Unknown item {0} in {1} list.
+unknownItemName = Unknown item name: {0}
unlimitedItemPermission = \u00a7cNo permission for unlimited item {0}.
-disableUnlimited = \u00a77Disabled unlimited placing of {0} for {1}.
-enableUnlimited = \u00a77Giving unlimited amount of {0} to {1}.
+unlimitedItems = Unlimited items:
+unmutedPlayer = Player {0} unmuted.
+upgradingFilesError = Error while upgrading the files
+userCreatedPortal = {0} used a portal and generated an exit portal.
+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
+usingPortal = \u00a77Teleporting via portal to an existing portal.
+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.
warpListPermission = \u00a7cYou do not have Permission to list that warps.
-noWarpsDefined = No warps defined
+warpNotExist = That warp does not exist.
+warpSet = \u00a77Warp {0} set.
warpUsePermission = \u00a7cYou do not have Permission to use that warp.
-weatherSunFor = \u00a77You set the weather to sun in your world for {0} seconds
-weatherSun = \u00a77You set the weather to sun in your world
-weatherStormFor = \u00a77You set the weather to storm in your world for {0} seconds
+warpingTo = \u00a77Warping to {0}.
weatherStorm = \u00a77You set the weather to storm in your world
-whoisIs = {0} is {1}
+weatherStormFor = \u00a77You set the weather to storm in your world for {0} seconds
+weatherSun = \u00a77You set the weather to sun in your world
+weatherSunFor = \u00a77You set the weather to sun in your world for {0} seconds
+whoisGeoLocation = \u00a79 - Location: {0}
whoisHealth = \u00a79 - Health: {0}/20
+whoisIPAddress = \u00a79 - IP Address: {0}
+whoisIs = {0} is {1}
whoisLocation = \u00a79 - Location: ({0}, {1}, {2}, {3})
whoisMoney = \u00a79 - Money: {0}
-whoisStatusAway = \u00a79 - Status: \u00a7cAway\u00a7f
whoisStatusAvailable = \u00a79 - Status: Available
-whoisIPAddress = \u00a79 - IP Address: {0}
-whoisGeoLocation = \u00a79 - Location: {0}
-invalidWorld = \u00a7cInvalid world.
-possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
-typeWorldName = \u00a77You can also type the name of a specific world.
+whoisStatusAway = \u00a79 - Status: \u00a7cAway\u00a7f
worth = \u00a77Stack of {0} worth \u00a7c{1}\u00a77 ({2} item(s) at {3} each)
worthMeta = \u00a77Stack of {0} with metadata of {1} worth \u00a7c{2}\u00a77 ({3} item(s) at {4} each)
-onlyPlayers = Only in-game players can use {0}.
-unignorePlayer = You are not ignoring player {0} anymore.
-ignorePlayer = You ignore player {0} from now on.
-illegalDate = Illegal date format.
-timePattern = (?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-kits = \u00a77Kits: {0}
-loadWarpError = Failed to load warp {0}
-invalidSignLine = Line {0} on sign is invalid. \ No newline at end of file
+worthSet = Worth value set
+year = year
+years = years
+youAreHealed = \u00a77You have been healed.
+youHaveNewMail = \u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail.
diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties
index 704e951f2..5a333fbb6 100644
--- a/Essentials/src/messages_fr.properties
+++ b/Essentials/src/messages_fr.properties
@@ -1,305 +1,310 @@
-loadinfo = Charg\u00e9 {0} version {1} par {2}
-markedAsNotAway = \u00a77Vous n''\u00eates plus marqu\u00e9 comme inactif.
-markedAsAway = \u00a77Vous \u00eates d\u00e9sormais inactif.
-userIsNotAway = {0} n''est plus inactif
-userIsAway = {0} est d\u00e9sormais inactif
-backupStarted = D\u00e9but du backup
-backupFinished = Backup termin\u00e9
-invalidServer = Serveur non valide.
-usingTempFolderForTesting = Utilise un fichier temporaire pour un test.
-versionMismatch = Versions diff\u00e9rentes! S''il vous plait mettez {0} \u00e0 la m\u00eame version.
-notRecommendedBukkit = La version de Bukkit n''est pas celle qui est recommand\u00e9 pour cette version de Essentials.
-bukkitFormatChanged = Format de version Bukkit chang\u00e9. La version n''a pas \u00e9t\u00e9 v\u00e9rifi\u00e9e.
-itemsCsvNotLoaded = N''a pas pu charger items.csv.
-corruptNodeInConfig = \u00a74Annonce:Votre fichier configuration a un {0} noeud corrompu.
-youHaveNewMail = \u00a7cVous avez {0} messages!\u00a7f Tapez \u00a77/mail read\u00a7f pour voir votre courrier.
-commandNotLoaded = \u00a7cCommande {0} mal charg\u00e9.
-deniedAccessCommand = {0} a \u00e9t\u00e9 refuse d''acc\u00e8s a la commande.
-noAccessCommand = \u00a7cVous n''avez pas acc\u00e8s \u00e0 cette commande.
-errorCallingCommand = Erreur en appelant la commande /{0}
-commandFailed = Commande {0} \u00e9chec.
-bannedPlayersFileNotFound = banned-players.txt introuvable.
-bannedPlayersFileError = Erreur en lisant banned-players.txt
-bannedIpsFileNotFound = banned-ips.txt introuvable
-bannedIpsFileError = Erreur lisant banned-ips.txt
-noDestroyPermission = \u00a7cVous n''avez pas la permission de d\u00e9truire \u00e7a {0}.
-noAccessPermission = \u00a7cVous n''avez pas la permission d''acc\u00e9der \u00e0 \u00e7a {0}.
-moreThanZero = Les Quantit\u00e9s doivent \u00eatre sup\u00e9rieures \u00e0 z\u00e9ro.
-errorWithMessage = \u00a7cErreur:{0}
-creatingConfigFromTemplate = Cr\u00e9ation de configuration \u00e0 partir du mod\u00e8le:{0}
-creatingEmptyConfig = Cr\u00e9ation d''une configuration vierge:{0}
-failedToCreateConfig = Echec de la cr\u00e9ation de la configuration {0}
-couldNotFindTemplate = Mod\u00e8le introuvable {0}
-failedToWriteConfig = Echec de l''\u00e9criture de la configuration {0}
-failedToCloseConfig = Echec de la fermeture de la configuration {0}
-notEnoughMoney = Vous n''avez pas les fonds n\u00e9cessaires.
-missingItems = Vous n''avez pas {0}x {1}.
-tradeSignEmpty = Le panneau de vente n''as pas encore assez de stock.
-tradeCompleted = \u00a77Echange termin\u00e9.
+#version: TeamCity
+# Single quotes have to be doubled: ''
+# Translations start here
+addedToAccount = \u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 a votre compte.
+alertBroke = a cass\u00e9:
+alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3}
+alertPlaced = a plac\u00e9:
+alertUsed = a utilis\u00e9:
backAfterDeath = \u00a77Utilisez la commande /back pour retourner \u00e0 l''endroit ou vous \u00eates mort.
-mutedUserSpeaks = {0} a essay\u00e9 de parler mais est muet.
-userCreatedPortal = {0} a utilis\u00e9 un portail et a g\u00e9n\u00e9r\u00e9 un portail de sortie.
-generatingPortal = \u00a77G\u00e9n\u00e9ration d''un portail de sortie.
-userUsedPortal = {0} a utilis\u00e9 un portail existant.
-usingPortal = \u00a77T\u00e9l\u00e9portation via portail vers un portail existant.
-teleportingPortal = \u00a77T\u00e9l\u00e9portation via portail.
-freedMemory = A lib\u00e9r\u00e9 {0} MB.
-defaultBanReason = Le Marteau du ban a frapp\u00e9!
-noNewMail = \u00a77Vous n''avez pas de courrier.
-serverFull = Le serveur est plein.
-returnPlayerToJailError = Erreur en tentant de retourner un joueur en prison.
-jailMessage = \u00a7cVous avez commis un crime, vous en payez le prix.
-homeSetToBed = \u00a77Votre home est d\u00e9sormais ce lit.
-moneyTaken = {0} pr\u00e9lev\u00e9 de votre compte bancaire.
-youAreHealed = \u00a77Vous avez \u00e9t\u00e9 soign\u00e9.
-markMailAsRead = \u00a7cPour marquer tout votre courrier comme lu, tapez /mail clear.
-balance = \u00a77Solde:{0}
backUsageMsg = \u00a77Retour a votre emplacement pr\u00e9c\u00e8dent.
-playerBanned = \u00a7cJoueur {0} banni.
-banIpAddress = \u00a77Banni l''adresse IP.
-bigTreeSuccess = \u00a77Gros arbre cr\u00e9e.
-bigTreeFailure = \u00a7cEchec de la g\u00e9n\u00e9ration du gros arbre. Essayez encore sur de la terre ou de l''herbe.
+backupFinished = Backup termin\u00e9
+backupStarted = D\u00e9but du backup
+balance = \u00a77Solde: {0}
+banIpAddress = \u00a77Adresse IP banni
+bannedIpsFileError = Erreur de lecture de banned-ips.txt
+bannedIpsFileNotFound = Fichier banned-ips.txt introuvable
+bannedPlayersFileError = Erreur lors de la lecture de banned-players.txt
+bannedPlayersFileNotFound = banned-players.txt introuvable.
+bigTreeFailure = \u00a7c\u00c9chec de la g\u00e9n\u00e9ration du gros arbre. Essayez de nouveau sur de la terre ou de l''herbe.
+bigTreeSuccess = \u00a77Gros arbre cr\u00e9e.
broadcast = [\u00a7cMessage\u00a7f]\u00a7a {0}
-burnMsg = \u00a77Vous avez enflamm\u00e9 {0} pour {1} secondes.
-playerNotFound = \u00a7c Joueur introuvable.
-inventoryCleared = \u00a77Inventaire nettoy\u00e9.
-inventoryClearedOthers = \u00a77Ivnetaire de \u00a7c{0}\u00a77 nettoy\u00e9.
-compassBearing = \u00a77Orientation:{0} ({1} degr\u00e9s).
-deleteJail = \u00a77Prison {0} supprim\u00e9e.
-deleteWarp = \u00a77Warp {0} supprim\u00e9.
-depth = \u00a77Vous \u00eates au niveau de la mer.
-depthAboveSea = \u00a77Vous \u00eates {0} bloc(s) au-dessus du niveau de la mer.
-depthBelowSea = \u00a77Vous \u00eates {0} bloc(s) en-dessous du niveau de la mer.
-extinguish = \u00a77Vous vous \u00eates \u00e9teint vous-m\u00eame.
-extinguishOthers = \u00a77Vous avez \u00e9teint {0}.
+buildAlert = \u00a7cVous n''avez pas la permission de construire.
+bukkitFormatChanged = Le format de la version de Bukkit a \u00e9t\u00e9 chang\u00e9. La version n''a pas \u00e9t\u00e9 v\u00e9rifi\u00e9e.
+burnMsg = \u00a77Vous avez enflamm\u00e9 {0} pour {1} seconde(s).
canTalkAgain = \u00a77Vous pouvez de nouveau parler.
-haveBeenReleased = \u00a77Vous \u00eates libre de vos mouvements.
-upgradingFilesError = Erreur en mettant \u00e0 jour le fichier.
-configFileMoveError = Echec du d\u00e9placement config.yml dans son fichier backup.
-configFileRenameError = Echec du changement de nom du fichier temp \u00e0 config.yml
-fileRenameError = Echec du changement de nom de {0}.
-userdataMoveError = Echec du d\u00e9placement de userdata/{0} \u00e0 userdata/{1}.tmp
-duplicatedUserdata = Dupliqu\u00e9 userdata:{0} et {1}
-userdataMoveBackError = Echec du d\u00e9placement de userdata/{0}.tmp \u00e0 userdata/{1}
-parseError = Erreur de conversion {0} \u00e0 la ligne {1}
-unknownItemName = Nom d''objet inconnu:{0}
-unknownItemId = Num\u00e9ro d''objet inconnu:{0}
-jailNotExist = Cette prison n''existe pas.
-unableToSpawnMob = Incapable de cr\u00e9er le monstre.
+cantFindGeoIpDB = N''arrive pas \u00e0 trouver la base de donn\u00e9es GeoIP!
+cantReadGeoIpDB = Echec de la lecture de la base de donn\u00e9s GeoIP!
+cantSpawnItem = \u00a7cVous n''avez pas le droit de faire apparaitre {0}
+commandFailed = \u00c9chec de la commande {0}:
+commandNotLoaded = \u00a7cLa commande {0} a \u00e9t\u00e9 mal charg\u00e9e.
+compassBearing = \u00a77Orientation: {0} ({1} degr\u00e9s).
+configFileMoveError = \u00c9chec du d\u00e9placement de config.yml vers l''emplacement de backup.
+configFileRenameError = \u00c9chec du changement de nom du fichier temp de config.yml
+connectedPlayers = Joueurs connect\u00e9s:
+connectionFailed = \u00c9chec de l''ouverture de la connexion.
+cooldownWithMessage = \u00a7cRefroidissement: {0}
+corruptNodeInConfig = \u00a74Annonce: Votre fichier de configuration a un {0} n\u0153ud corrompu.
+couldNotFindTemplate = Le mod\u00e8le {0} est introuvable
+creatingConfigFromTemplate = Cr\u00e9ation de la configuration \u00e0 partir du mod\u00e8le : {0}
+creatingEmptyConfig = Cr\u00e9ation d''une configuration vierge : {0}
creatingPortal = Cr\u00e9ation d''un portail \u00e0 {0},{1},{2}.
-notSupportedYet = Pas encore pris en charge.
-unknownItemInList = Objet inconnu {0} dans {1} liste.
-teleportationCommencing = \u00a77D\u00e9but de la T\u00e9l\u00e9portation....
-cooldownWithMessage = \u00a7cRefroidissement:{0}
-warpingTo = \u00a77Warpant \u00e0 {0}.
-timeBeforeTeleport = Temps avant prochaine t\u00e9l\u00e9portation {0}
-pendingTeleportCancelled = \u00a7cRequete de t\u00e9l\u00e9portation annul\u00e9e.
-dontMoveMessage = \u00a77La t\u00e9l\u00e9portation commence dans {0}. Ne bougez pas.
-noHomeSet = Vous n''avez pas mis de home.
-noHomeSetPlayer = Player n''a pas fait de home.
-timeBeforeHeal = Temps avant prochains soins:{0}
-addedToAccount = \u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 a votre compte.
-moneySentTo = \u00a7a{0} a \u00e9t\u00e9 r\u00e9initialis\u00e9 \u00e0 {1}
-moneyRecievedFrom = \u00a7a{0} a \u00e9t\u00e9 re\u00e7u de {1}
-takenFromAccount = \u00a7c{0} a \u00e9t\u00e9 pris de votre compte.
-emptyWorldName = Set Home:Nom du monde est nul ou vide.
-now = maintenant
-year = ann\u00e9e
-years = ann\u00e9es
-month = mois
-months = mois
day = jour
days = jours
-hour = heure
-hours = heures
-minute = minute
-minutes = minutes
-second = seconde
-seconds = secondes
-destinationNotSet = Destination pas choisie.
-holeInFloor = Trou dans le Sol.
-warpNotExist = Ce warp n''existe pas.
-similarWarpExist = Un warp avec un nom similaire existe d\u00e9j\u00e0.
-warpDeleteError = Probl\u00e8me d\u00e9tectant le fichier de warp.
-versionMismatchAll = Mauvaise version! S''il vous plait mettez des jars Essentiels de version identique.
-missingPrefixSuffix = Pr\u00e9fixe ou Suffixe manquant pour {0}
-permissionsError = Permissions/GroupManager manquant, les pr\u00e9fixes et suffixes ne seront pas affich\u00e9s.
-shoutFormat = \u00a77[Crie]\u00a7f {0}
-notAllowedToShout = \u00a7cVous n''avez pas le droit de crier.
-questionFormat = \u00a77[Question]\u00a7f {0}
-notAllowedToQuestion = \u00a7cVous n''avez pas le droit de poser des questions.
-localFormat = Local:<{0}> {1}
-geoipJoinFormat = Joueur {0} vient de {1}
-cantFindGeoIpDB = N''arrive pas \u00e0 trouver la base de donn\u00e9es GeoIP!
-cantReadGeoIpDB = Echec de la lecture de la base de donn\u00e9s GeoIP!
+defaultBanReason = Le marteau du ban a frapp\u00e9!
+deleteFileError = Le fichier n''a pas pu \u00eatre supprim\u00e9: {0}
+deleteJail = \u00a77La prison {0} a \u00e9t\u00e9 supprim\u00e9e.
+deleteWarp = \u00a77Warp {0} supprim\u00e9.
+deniedAccessCommand = L''acc\u00e8s \u00e0 la commande a \u00e9t\u00e9 refus\u00e9 pour {0}.
+dependancyDownloaded = [Essentials] Fichier {0} correctement t\u00e9l\u00e9charg\u00e9.
+dependancyException = [Essentials] Une erreur est survenue lors de la tentative de t\u00e9l\u00e9chargement
+dependancyNotFound = [Essentials] Une d\u00e9pendance requise n''a pas \u00e9t\u00e9 trouv\u00e9e, t\u00e9l\u00e9chargement en cours.
+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
+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 (campagne : 0.6 Mo, ville : 20Mo)
+duplicatedUserdata = Donn\u00e9e utilisateur dupliqu\u00e9e: {0} et {1}
+emptyWorldName = Set Home: Le nom du monte est nul ou vide.
+enableUnlimited = \u00a77Donner un nombre illimit\u00e9 de {0} \u00e0 {1}.
+enabled = activ\u00e9
+errorCallingCommand = Erreur en appelant la commande /{0}
+errorWithMessage = \u00a7cErreur: {0}
+essentialsReload = \u00a77Essentials Recharg\u00e9 {0}
+extinguish = \u00a77Vous vous \u00eates \u00e9teint.
+extinguishOthers = \u00a77Vous avez \u00e9teint {0}.
+failedToCloseConfig = Echec de la fermeture de la configuration {0}
+failedToCreateConfig = Echec de la cr\u00e9ation de la configuration {0}
+failedToWriteConfig = \u00c9chec de l''\u00e9criture de la configuration {0}
+fileRenameError = Echec du changement de nom de {0}.
+foreverAlone = \u00a7cVous n''avez personne \u00e0 qui r\u00e9pondre.
+freedMemory = A lib\u00e9r\u00e9 {0} Mo.
+gcchunks = chunks,
+gcentities = entit\u00e9s
+gcmax = M\u00e9moire maximale: {0} Mo
+gcmin = M\u00e9moire minimale: {0} Mo
+generatingPortal = \u00a77G\u00e9n\u00e9ration d''un portail de sortie.
geoIpUrlEmpty = L''url de t\u00e9l\u00e9chargement de GeoIP est vide.
-downloadingGeoIp = T\u00e9l\u00e9chargement de la base de donn\u00e9es GeoIP ... cela va peut-\u00eatre prendre un moment (campagne:0.6 MB, ville:20MB)
geoIpUrlInvalid = L''url de t\u00e9l\u00e9chargement de GeoIP est invalide.
-connectionFailed = Echec de l''ouverture de la connexion.
-alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3}
-alertPlaced = a plac\u00e9
-alertBroke = a cass\u00e9
-alertUsed = a utilis\u00e9
-buildAlert = \u00a7cVous n''avez pas la permission de construire.
-protectionOwner = \u00a76[EssentialsProtect] Propri\u00e9taire Protect:{0}
-spawnSet = \u00a77Spawn cr\u00e9\u00e9 pour le groupe {0}.
-teleportNewPlayerError = Echec de la t\u00e9l\u00e9portation du nouveau joueur.
-essentialsReload = \u00a77Essentials Recharg\u00e9 {0}
-gcmax = M\u00e9moire maximale:{0} MB
-gcmin = M\u00e9moire minimale:{0} MB
-gcchunks = chunks,
-gcentities = entit\u00e9s
-godMode = \u00a77mode dieu {0}.
-enabled = activ\u00e9
-disabled = d\u00e9sactiv\u00e9
-godEnabledFor = activ\u00e9 pour {0}
+geoipJoinFormat = Joueur {0} vient de {1}
godDisabledFor = d\u00e9sactive pour {0}
+godEnabledFor = activ\u00e9 pour {0}
+godMode = \u00a77Mode Dieu {0}.
+haveBeenReleased = \u00a77Vous avez \u00e9t\u00e9 lib\u00e9r\u00e9
heal = \u00a77Vous avez \u00e9t\u00e9 soign\u00e9.
-healOther = \u00a77Soign\u00e9 {0}.
-helpPages = Page \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f.
+healOther = \u00a77{0} a \u00e9t\u00e9 soign\u00e9.
helpConsole = Pour voir l''aide tapez ?
helpOp = \u00a7c[Aide Admin]\u00a7f \u00a77{0}:\u00a7f {1}
-infoFileDoesNotExist = Le fichier info.txt n''existe pas. Cr\u00e9ation d''un autre.
+helpPages = Page \u00a7c{0}\u00a7f sur \u00a7c{1}\u00a7f.
+holeInFloor = Trou dans le Sol.
+homeSet = \u00a77Home d\u00e9fini.
+homeSetToBed = \u00a77Votre home est d\u00e9sormais d\u00e9fini sur ce lit.
+hour = heure
+hours = heures
+ignorePlayer = Vous ignorez d\u00e9sormais {0}.
+illegalDate = Format de date ill\u00e9gal.
+infoChapter = S\u00e9lectionner 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.
-infoChapter = S\u00e9lectionner le chapitre.
infoUnknownChapter = Chapitre inconnu.
-infoChapterPages = Chapitre {0}, page \u00a7c{1}\u00a7f de \u00a7c{2}\u00a7f:
-invBigger = L''inventaire de l''autre joueur est plus gros que le v\u00f4tre.
+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 voir l''inventaire de quelqu''un.
-cantSpawnItem = \u00a7cVous n''avez pas le droit de faire apparaitre {0}
+invalidMob = Mauvias type de monstre.
+invalidServer = Serveur non valide.
+invalidSignLine = La ligne {0} du panneau est invalide.
+invalidWorld = \u00a7cMonde invalide.
+inventoryCleared = \u00a77Inventaire nettoy\u00e9.
+inventoryClearedOthers = \u00a77L''inventaire de \u00a7c{0}\u00a77 a \u00e9t\u00e9 nettoy\u00e9.
+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.
+itemSellAir = Vous vouliez vraiment vendre de l''air? Mettez un objet dans votre main.
+itemSold = \u00a77Vendu pour \u00a7c {0} \u00a77 ({1} objet(s) \u00e0 {2} chacun)
+itemSoldConsole = {0} vendu {1} pour \u00a77 {2} \u00a77 ({3} objet(s) \u00e0 {4} chacun)
itemSpawn = \u00a77Donne {0} de {1}
-jumpError = \u00c7a aurait pu faire mal au cerveau de votre Ordinateur.
+itemsCsvNotLoaded = N''a pas pu charger items.csv.
+jailMessage = \u00a7cVous avez commis un crime, vous en payez le prix.
+jailNotExist = Cette prison n''existe pas.
+jailSet = \u00a77La prison {0} a \u00e9t\u00e9 cr\u00e9\u00e9.
+jumpError = \u00c7a aurait pu faire mal au cerveau de votre ordinateur.
kickDefault = Kick\u00e9 du serveur
kill = \u00a77Tu\u00e9 {0}.
-noKits = \u00a77Il n''y a pas encore de kit disponible.
kitError = \u00a7cIl n''y a pas de kits valides.
-kitError2 = \u00a7cCe kit n''existe pas ou est mal tap\u00e9.
-kitErrorHelp = \u00a7cPeut-etre qu''un objet manque une quantit\u00e9 dans la configuration?
-noKitPermission = \u00a7cVous avez besoin de la permission \u00a7c{0}\u00a7c pour utiliser ce kit.
-kitTimed = \u00a7cVous ne pouvez pas utiliser ce kit pendant encore {0}.
+kitError2 = \u00a7cCe kit n''existe pas ou a \u00e9t\u00e9 mal d\u00e9fini.
+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.
-kitGive = \u00a77Donnant le kit {0}.
-lightningUse = \u00a77Foudroie {0}
+kitTimed = \u00a7cVous ne pouvez pas utiliser ce kit pendant encore {0}.
+kits = \u00a77Kits:{0}
lightningSmited = \u00a77Vous venez d''\u00eatre foudroy\u00e9
-connectedPlayers = Joueurs connect\u00e9s:
+lightningUse = \u00a77{0} a \u00e9t\u00e9 foudroy\u00e9
+loadWarpError = \u00c9chec du chargement du warp {0}
+loadinfo = {0} version {1} par {2} a \u00e9t\u00e9 charg\u00e9
+localFormat = Local:<{0}> {1}
+mailClear = \u00a7cPour marquer votre courrier en tant que lu, entrez /mail clear
+mailCleared = \u00a77Mail 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.
+mayNotJail = \u00a7cVous ne pouvez pas emprisonner cette personne.
+me = moi
+minute = minute
+minutes = minutes
+missingItems = Vous n''avez pas {0} x {1}.
+missingPrefixSuffix = Pr\u00e9fixe ou Suffixe manquant pour {0}
+mobSpawnError = Erreur lors du changement du spawner de monstres.
+mobSpawnLimit = Quantit\u00e9 de monstres limit\u00e9 \u00e0 la limite du serveur.
+mobSpawnTarget = Le bloc cible doit \u00eatre un spawner de monstres.
+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 bancaire.
+month = mois
+months = mois
+moreThanZero = Les Quantit\u00e9s doivent \u00eatre sup\u00e9rieures \u00e0 z\u00e9ro.
+msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
+mutedPlayer = Le joueur {0} est d\u00e9sormais muet.
+mutedPlayerFor = {0} a \u00e9t\u00e9 mute pour {1}.
+mutedUserSpeaks = {0} a essay\u00e9 de parler mais est muet.
+needTpohere = Vous avez besoin de l''acc\u00e8s \u00e0 /tpohere pour t\u00e9l\u00e9porter d''autres joueurs.
+negativeBalanceError = L''utilisateur n''est pas autoris\u00e9 \u00e0 avoir un solde n\u00e9gatif.
+nickChanged = Pseudo modifi\u00e9.
+nickInUse = \u00a7cCe nom est d\u00e9j\u00e0 utilis\u00e9.
+nickNamesAlpha = \u00a7cLes pseudos doivent \u00eatre alphanum\u00e9riques.
+nickNoMore = \u00a7Vous n''avez plus de surnom.
+nickOthersPermission = \u00a7cVous n''avez pas la permission de changer le pseudo des autres.
+nickSet = \u00a77Votre pseudo est maintenant \u00a7c{0}
+noAccessCommand = \u00a7cVous n''avez pas acc\u00e8s \u00e0 cette commande.
+noAccessPermission = \u00a7cVous n''avez pas la permissions d''acc\u00e9der \u00e0 cette {0}
+noDestroyPermission = \u00a7cVous n''avez pas la permission de d\u00e9truire ce {0}.
+noHomeSet = Vous n''avez pas d\u00e9fini de home.
+noHomeSetPlayer = Le joueur n''a pas d\u00e9fini son home.
+noKitPermission = \u00a7cVous avez besoin de la permission \u00a7c{0}\u00a7c pour utiliser ce kit.
+noKits = \u00a77Il n''y a pas encore de kits disponibles.
noMail = Vous n''avez pas de courrier
-mailClear = \u00a7cPOur marquer votre courrier comme lu, tapez /mail clear
noMailSendPerm = \u00a7cVous n''avez pas la permission \u00a7fessentials.mail.send\u00a7c.
-playerNeverOnServer = \u00a7cLe joueur {0} n''as jamais \u00e9t\u00e9 sur le serveur.
-mailSent = \u00a77Mail Envoy\u00e9!
-mailCleared = \u00a77Mail Nettoy\u00e9!
-voiceSilenced = \u00a77Votre voix a \u00e9t\u00e9 r\u00e9duite au silence
noMotd = \u00a7cIl n''y a pas de message su jour.
-me = moi
-mutedPlayerFor = Joueur {0} muet pour {1}.
-mutedPlayer = Joueur {0} est d\u00e9sormais muet.
-unmutedPlayer = Joueur {0} n''est plus muet.
-nickOthersPermission = \u00a7cVous n''avez pas la permission de changer les surnoms des autres.
-nickNoMore = \u00a7Vous n''avez plus de surnom.
-nickNamesAlpha = \u00a7cLes surnoms doivent \u00eatre alphanum\u00e9riques.
-nickInUse = \u00a7cCe nom est d\u00e9j\u00e0 utilis\u00e9.
-nickSet = \u00a77Votre surnom est maintenant \u00a7c{0}
-nickChanged = Surnom chang\u00e9.
+noNewMail = \u00a77Vous n''avez pas de courrier.
+noPendingRequest = Vous n''avez pas de requ\u00eate non lue.
+noRules = \u00a7cIl n''y a pas encore de r\u00e8gles d\u00e9finies.
+noWarpsDefined = Aucun warps d\u00e9finis.
+none = aucun
+notAllowedToQuestion = \u00a7cVous n''\u00eates pas autoris\u00e9 \u00e0 poser des questions.
+notAllowedToShout = \u00a7cVous n''\u00eates pas autoris\u00e9 \u00e0 crier.
+notEnoughMoney = Vous n''avez pas les fonds n\u00e9cessaires.
+notRecommendedBukkit = La version de Bukkit n''est pas celle qui est recommand\u00e9 pour cette version de Essentials.
+notSupportedYet = Pas encore pris en charge.
+now = maintenant
+numberRequired = On a besoin d''un nombre ici, idiot.
+onlyDayNight = /time ne supporte que (jour) day/night (nuit).
+onlyPlayers = Seulement les joueurs en jeu peuvent utiliser {0}.
+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.
+playerBanned = \u00a7cLe joueur {0} a \u00e9t\u00e9 banni
+playerInJail = \u00a7cLe joueur est d\u00e9j\u00e0 dans la prison {0}.
+playerJailed = \u00a77Le joueur {0} a \u00e9t\u00e9 emprisonn\u00e9.
+playerJailedFor = \u00a77{0} a \u00e9t\u00e9 emprisonn\u00e9 pour {1}.
+playerNeverOnServer = \u00a7cLe joueur {0} n''a jamais \u00e9t\u00e9 sur le serveur.
+playerNotFound = \u00a7cLe joueur est introuvable.
pong = Pong!
+possibleWorlds = \u00a77Les mondes possibles sont les nombres 0 par {0}.
powerToolAir = La commande ne peut pas \u00eatre attach\u00e9e \u00e0 l''air.
powerToolAttach = Commande assign\u00e9e \u00e0 {0}
powerToolRemove = Commande enlev\u00e9e \u00e0 {0}
-foreverAlone = \u00a7cVous n''avez personne \u00e0 qui r\u00e9pondre.
-is = est
-reloadAllPlugins = \u00a77Recharge tous les plugins.
-noRules = \u00a7cIl n''y a pas encore de r\u00e8gles d\u00e9finies.
-seenOnline = Joueur {0} est en ligne depuis {1}
-seenOffline = Joueur {0} est hors ligne depuis {1}
-itemCannotBeSold = Cet objet ne peut \u00eatre vendu.
-itemMustBeStacked = Cet objet doit \u00eatre vendu par 64. Une quantit\u00e9 de 2 serait deux fois 64.
-itemNotEnough1 = \u00a7cVous n''avez pas assez de ca pour le vendre.
-itemNotEnough2 = \u00a77Si vous vouliez vendre tous vos objets de ce type-l\u00e0, utilisez /sell nomd''objet
-itemNotEnough3 = \u00a77/sell itemname -1 vendra tout sauf un item, etc.
-itemSold = \u00a77Sold for \u00a7c {0} \u00a77 ({1} items at {2} each) Vendu pour \u00a7c {0} \u00a77 ({1} objets \u00e0 {2} chacun)
-itemSoldConsole = {0} vendu {1} pour \u00a77 {2} \u00a77 ({3} objets \u00e0 {4} chacun)
-itemSellAir = Vous vouliez vraiment vendre de l''Air? Mettez un objet dans votre main.
-homeSet = \u00a77Home cr\u00e9e.
-jailSet = \u00a77Prison {0} a \u00e9t\u00e9 cr\u00e9e.
-warpSet = \u00a77Warp {0} cr\u00e9e.
-worthSet = Valeur cr\u00e9e
-mobSpawnTarget = Le bloc cible doit \u00eatre un spawner de monstres.
-mobSpawnError = Erreur en changeant le spawner de monstres.
-invalidMob = Mauvias type de monstre.
-unableToSpawnMob = Incapable de spawner un monstre.
-mobSpawnLimit = Quantit\u00e9 de monstres limit\u00e9 \u00e0 la limite du serveur.
+protectionOwner = \u00a76[EssentialsProtect] Propri\u00e9taire de la protection : {0}
+questionFormat = \u00a77[Question]\u00a7f {0}
+reloadAllPlugins = \u00a77Tous les plugins ont \u00e9t\u00e9 recharg\u00e9s.
+requestAccepted = \u00a77Demande de t\u00e9l\u00e9portation accept\u00e9e.
+requestDenied = \u00a77Demande de t\u00e9l\u00e9portation refus\u00e9e.
+requestSent = \u00a77Requ\u00eate envoy\u00e9e \u00e0 {0}\u00a77.
+returnPlayerToJailError = Erreur survenue lors de la tentative d''emprisonner de nouveau un joueur.
+second = seconde
+seconds = secondes
+seenOffline = Le joueur {0} est hors ligne depuis {1}
+seenOnline = Le joueur {0} est en ligne depuis {1}
+serverFull = Le serveur est plein.
+sheepMalformedColor = Couleur mal form\u00e9e.
+shoutFormat = \u00a77[Crie]\u00a7f {0}
+similarWarpExist = Un warp avec un nom similaire existe d\u00e9j\u00e0.
+slimeMalformedSize = Taille mal form\u00e9e.
soloMob = Ce monstre aime \u00eatre seul.
-numberRequired = On a besoin d''un nombre ici, sot.
+spawnSet = \u00a77Le point de spawn a \u00e9t\u00e9 d\u00e9fini pour le groupe {0}.
spawned = spawn\u00e9
-slimeMalformedSize = Taille mal form\u00e9e.
-sheepMalformedColor = Couleur mal form\u00e9e.
-suicideMessage = \u00a77 Au revoir monde cruel...
-suicideSuccess = \u00a77{0} a pris sa propre vie.
-tempBanned = Banni temporairement du serveur pour {0}
-thunderDuration = Vous avez {0} la foudre dans le serveur {1} secondes.
-thunder = Vous avez {0} la foudre dans votre serveur.
-deleteFileError = N''a pas pu supprimer le fichier:{0}
-userDoesNotExist = L''utilisateur {0} n''existe pas.
-negativeBalanceError = L''utilisateur ne peut avoir un solde n\u00e9gatif.
-timeSet = Heure modifi\u00e9e dans tous les mondes.
-onlyDayNight = /time ne supporte que (jour) day/night (nuit).
-mayNotJail = \u00a7cVous ne pouvez pas emprisonner cette personne.
-userJailed = \u00a77Vous avez \u00e9t\u00e9 emprisonn\u00e9
-playerJailed = \u00a77Joueur {0} emprisonn\u00e9.
-playerJailedFor = \u00a77Joueur {0} emprisonn\u00e9 pendant {1}.
-playerInJail = \u00a7cLe joueur est d\u00e9j\u00e0 dans la prison {0}.
-teleportTop = \u00a77T\u00e9l\u00e9portation vers le haut.
-teleporting = \u00a77T\u00e9l\u00e9poration en cours...
-teleportDisabled = {0} a la t\u00e9l\u00e9portation d\u00e9sactiv\u00e9.
-needTpohere = Vous avez besoin de l''acc\u00e8s \u00e0 /tpohere pour t\u00e9l\u00e9porter d''autres joueurs.
+suicideMessage = \u00a77Au revoir monde cruel...
+suicideSuccess = \u00a77{0} a pris sa propre vie.
+takenFromAccount = \u00a7c{0} ont \u00e9t\u00e9 pris de votre compte.
+teleportAll = \u00a77T\u00e9l\u00e9poration de tous les joueurs.
teleportAtoB = \u00a77{0}\u00a77 vous a t\u00e9l\u00e9port\u00e9 \u00e0 {1}\u00a77.
-teleportRequest = \u00a7c{0}\u00a7c vous demande si il peut se t\u00e9l\u00e9porter sur vous.
-typeTpaccept = \u00a77Pour le t\u00e9l\u00e9porter, tapez \u00a7c/tpaccept\u00a77.
-typeTpdeny = \u00a77Pour refuser cette demande, tapez \u00a7c/tpdeny\u00a77.
-requestSent = \u00a77Requete envoy\u00e9e \u00e0 {0}\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.
-teleportAll = \u00a77T\u00e9l\u00e9poration de tous les joueurs.
-noPendingRequest = Vous n''avez pas de requ\u00eate non lue.
-requestDenied = \u00a77Demande de t\u00e9l\u00e9portation refus\u00e9e.
-requestAccepted = \u00a77Demande de t\u00e9l\u00e9portation accept\u00e9e.
-teleportationEnabled = \u00a77T\u00e9l\u00e9poration activ\u00e9e.
+teleportNewPlayerError = \u00c9chec de la t\u00e9l\u00e9portation du nouveau joueur.
+teleportRequest = \u00a7c{0}\u00a7c vous demande s''il peut se t\u00e9l\u00e9porter sur vous.
+teleportTop = \u00a77T\u00e9l\u00e9portation vers le haut.
+teleportationCommencing = \u00a77D\u00e9but de la t\u00e9l\u00e9portation....
teleportationDisabled = \u00a77T\u00e9l\u00e9poration d\u00e9sactiv\u00e9.
-treeSpawned = \u00a77Arbre cr\u00e9e.
+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}
+thunder = Vous avez {0} la foudre dans votre monde.
+thunderDuration = Vous avez {0} la foudre dans le serveur {1} secondes.
+timeBeforeHeal = Temps avant le prochain soin : {0}
+timeBeforeTeleport = Temps avant prochaine t\u00e9l\u00e9portation {0}
+timePattern = (?:([0-9]+)\\\\s*[ya][a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*mo[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*(?:sem|w)[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*[dj][a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*h[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*m[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*(?:s[a-z]*)?)?
+timeSet = Heure modifi\u00e9e dans tous les mondes.
+tradeCompleted = \u00a77\u00c9change termin\u00e9.
+tradeSignEmpty = Le panneau de vente n''as pas encore assez de stock.
treeFailure = \u00a7cEchec de la g\u00e9n\u00e9ration de l''arbre. Essayez de nouveau sur de l''herbe ou de la terre.
-unbannedPlayer = Joueur d\u00e9banni.
+treeSpawned = \u00a77Arbre cr\u00e9\u00e9.
+typeTpaccept = \u00a77Pour le t\u00e9l\u00e9porter, tapez \u00a7c/tpaccept\u00a77.
+typeTpdeny = \u00a77Pour d\u00e9cliner cette demande, entrez \u00a7c/tpdeny\u00a77.
+typeWorldName = \u00a77Vous pouvez aussi taper le nom d''un monde sp\u00e9cifique.
+unableToSpawnMob = Incapable de spawner un monstre.
unbannedIP = Adresse IP d\u00e9banni.
+unbannedPlayer = Joueur d\u00e9banni.
+unignorePlayer = Vous n''ignorez plus {0}.
+unknownItemId = Num\u00e9ro d''objet inconnu : {0}
+unknownItemInList = L''objet {0} est inconnu dans la liste {1}.
+unknownItemName = Nom d''objet inconnu : {0}
+unlimitedItemPermission = \u00a7cPas de permission pour l''objet illimit\u00e9 {0}.
unlimitedItems = Objets illimit\u00e9s:
-none = aucun
-unlimitedItemPermission = \u00a7cas de permission pour l''objet illimit\u00e9 {0}.
-disableUnlimited = \u00a77D\u00e9sactivation du placement illimit\u00e9 de {0} pour {1}.
-enableUnlimited = \u00a77Activation du placement illimit\u00e9 de {0} pour {1}.
-warpListPermission = \u00a7cVous n''avez pas la permission de lister les warps.
-noWarpsDefined = Aucun warp d\u00e9fini.
+unmutedPlayer = Le joueur {0} n''est plus muet.
+upgradingFilesError = Erreur durant la mise \u00e0 jour des fichiers.
+userCreatedPortal = {0} a utilis\u00e9 un portail et a g\u00e9n\u00e9r\u00e9 un portail de sortie.
+userDoesNotExist = L''utilisateur {0} n''existe pas.
+userIsAway = {0} s''est mis en AFK
+userIsNotAway = {0} n''est plus inactif
+userJailed = \u00a77Vous avez \u00e9t\u00e9 emprisonn\u00e9
+userUsedPortal = {0} a utilis\u00e9 un portail existant.
+userdataMoveBackError = Echec du d\u00e9placement de userdata/{0}.tmp \u00e0 userdata/{1}
+userdataMoveError = Echec du d\u00e9placement de userdata/{0} \u00e0 userdata/{1}.tmp
+usingPortal = \u00a77T\u00e9l\u00e9portation via portail vers un portail existant.
+usingTempFolderForTesting = Utilise un fichier temporaire pour un test.
+versionMismatch = Versions diff\u00e9rentes! Mettez s''il vous pla\u00eet {0} \u00e0 la m\u00eame version.
+versionMismatchAll = Mauvaise version! S''il vous plait mettez des jars Essentiels de version identique.
+voiceSilenced = \u00a77Votre voix a \u00e9t\u00e9 r\u00e9duite au silence
+warpDeleteError = Probl\u00e8me concernant la suppression du fichier warp.
+warpListPermission = \u00a7cVous n''avez pas la permission d''afficher la liste des warps.
+warpNotExist = Ce warp n''existe pas.
+warpSet = \u00a77Le warp {0} a \u00e9t\u00e9 cr\u00e9\u00e9.
warpUsePermission = \u00a7cVous n''avez pas la permission d''utiliser ce warp.
-weatherSunFor = \u00a77Vous avez mis le beau temps dans ce monde pour {0} secondes.
-weatherSun = \u00a77Vous avez mis le beau temps dans ce monde.
-weatherStormFor = \u00a77Vous avez mis l''orage dans votre monde pour {0} secondes.
-weatherStorm = \u00a77Vous avez mis l''orage dans votre monde
+warpingTo = \u00a77T\u00e9l\u00e9portation au warp {0}.
+weatherStorm = \u00a77Vous avez d\u00e9fini l''orage dans votre monde
+weatherStormFor = \u00a77Vous avez d\u00e9fini l''orage dans votre monde pour {0} secondes.
+weatherSun = \u00a77Vous avez mis le beau temps dans votre monde
+weatherSunFor = \u00a77Vous avez mis le beau temps dans votre monde pour {0} secondes.
+whoisGeoLocation = \u00a79 - Emplacement: {0}
+whoisHealth = \u00a79 - Vie: {0} / 20
+whoisIPAddress = \u00a79 - Adresse IP: {0}
whoisIs = {0} est {1}
-whoisHealth = \u00a79 - Vie:{0}/20
-whoisLocation = \u00a79 - Emplacement:({0}, {1}, {2}, {3})
-whoisMoney = \u00a79 - Argent:{0}
-whoisStatusAway = \u00a79 - Statut:\u00a7cAilleurs\u00a7f
-whoisStatusAvailable = \u00a79 - Statut:Disponible
-whoisIPAddress = \u00a79 - Adresse IP:{0}
-whoisGeoLocation = \u00a79 - Emplacement:{0}
-invalidWorld = \u00a7cMonde invalide.
-possibleWorlds = \u00a77Les mondes possibles sont les nombres 0 par {0}.
-typeWorldName = \u00a77Vous pouvez aussi taper le nom d''un monde sp\u00e9cifique.
-worth = \u00a77Une pile de {0} vaut \u00a7c{1}\u00a77 ({2} objet(s) \u00e0 {3} chacun)
-worthMeta = \u00a77Une pile de {0} avec le metadata de {1} vaut \u00a7c{2}\u00a77 ({3} objet(s) \u00e0 {4} chacun)
-onlyPlayers = Seulement les joueurs en jeu peuvent utiliser {0}.
-unignorePlayer = Vous n''ignorez plus {0}.
-ignorePlayer = Vous ignorez d\u00e9sormais {0}.
-illegalDate = Format de date ill\u00e9gal.
-timePattern = (?:([0-9]+)\\s*[ya][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:sem|w)[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[dj][a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
-msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
-kits = \u00a77Kits:{0}
-loadWarpError = Echec du chargement du warp {0}
-invalidSignLine = Ligne {0} du panneau est invalide. \ No newline at end of file
+whoisLocation = \u00a79 - Emplacement: ({0}, {1}, {2}, {3})
+whoisMoney = \u00a79 - Argent: {0}
+whoisStatusAvailable = \u00a79 - Statut: Disponible
+whoisStatusAway = \u00a79 - Statut: \u00a7cAilleurs\u00a7f
+worth = \u00a77Un stack de {0} vaut \u00a7c{1}\u00a77 ({2} objet(s) \u00e0 {3} chacun)
+worthMeta = \u00a77Un stack de {0} avec la m\u00e9tadonn\u00e9e de {1} vaut \u00a7c{2}\u00a77 ({3} objet(s) \u00e0 {4} chacun)
+worthSet = Valeur cr\u00e9e
+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.
diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties
new file mode 100644
index 000000000..0aa1770bf
--- /dev/null
+++ b/Essentials/src/messages_nl.properties
@@ -0,0 +1,312 @@
+#version: TeamCity
+# Single quotes have to be doubled: ''
+# Translations start here
+# by Geertje123
+addedToAccount = \u00a7a{0} is aan je bankrekening toegevoegd.
+alertBroke = gebroken:
+alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3}
+alertPlaced = geplaatst:
+alertUsed = gebruikt:
+backAfterDeath = \u00a77Gebruik de /back command om terug te keren naar het punt waar je dood ging.
+backUsageMsg = \u00a77Bezig met terugkeren naar vorige locatie.
+backupFinished = Backup voltooid
+backupStarted = Backup wordt nu gemaakt
+balance = \u00a77Saldo: {0}
+banIpAddress = \u00a77Verboden IP-adres
+bannedIpsFileError = Fout bij het lezen van banned-ips.txt
+bannedIpsFileNotFound = banned-ips.txt werd niet gevonden
+bannedPlayersFileError = Fout bij het lezen van banned-players.txt
+bannedPlayersFileNotFound = banned-players.txt werd niet gevonden
+bigTreeFailure = \u00a7cCre\u00ebren van grote boom fout gegaan. Probeer het opnieuw op gras of dirt.
+bigTreeSuccess = \u00a77Grote boom gespawnd.
+broadcast = [\u00a7cBroadcast\u00a7f]\u00a7a {0}
+buildAlert = \u00a7cJe bent niet bevoegd om te bouwen
+bukkitFormatChanged = Bukkit versie formaat veranderd. Versie niet nagekeken.
+burnMsg = \u00a77Je hebt voor {1} seconden {0} in de fik gezet.
+canTalkAgain = \u00a77Je kan weer praten.
+cantFindGeoIpDB = De GeoIP database kon niet gevonden worden!
+cantReadGeoIpDB = Fout bij het lezen van de GeoIP database!
+cantSpawnItem = \u00a7cJe bent niet bevoegd om {0} te spawnen.
+commandFailed = Opdracht {0} mislukt:
+commandNotLoaded = \u00a7cOpdracht {0} is fout geladen.
+compassBearing = \u00a77Ligging: {0} ({1} graden).
+configFileMoveError = Het verplaatsen van config.yml naar de backup locatie is mislukt.
+configFileRenameError = Fout bij het hernoemen van de tijdelijke map naar config.yml
+connectedPlayers = Verbonden spelers:
+connectionFailed = Fout bij het verbinden.
+cooldownWithMessage = \u00a7cAfkoeltijd: {0}
+corruptNodeInConfig = \u00a74Waarschuwing: Het configuratie bestand bevat een fout {0}.
+couldNotFindTemplate = Het sjabloon kon niet gevonden worden {0}
+creatingConfigFromTemplate = Bezig met aanmaken van config vanaf sjabloon: {0}
+creatingEmptyConfig = Bezig met lege config aanmaken: {0}
+creatingPortal = Bezig met cre\u00ebren van portal bij {0},{1},{2}.
+day = dag
+days = dagen
+defaultBanReason = De Ban Hamer heeft gesproken!
+deleteFileError = Het bestand kon niet verwijderd worden: {0}
+deleteJail = \u00a77Gevangenis {0} is verwijderd.
+deleteWarp = \u00a77Warp {0} is verwijderd.
+deniedAccessCommand = {0} werd de toegang geweigerd tot de opdracht.
+dependancyDownloaded = [Essentials] Dependancy {0} downloaded successfully.
+dependancyException = [Essentials] An error occured when trying to download a dependacy
+dependancyNotFound = [Essentials] A required dependancy was not found, downloading now.
+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
+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 = Verdubbelde userdata: {0} en {1}.
+emptyWorldName = Set Home: Naam van wereld is leeg.
+enableUnlimited = \u00a77Oneindig van {0} gegeven aan {1}.
+enabled = ingeschakeld
+errorCallingCommand = Fout bij het aanroepen van de opdracht /{0}
+errorWithMessage = \u00a7cFout: {0}
+essentialsReload = \u00a77Essentials herlaadde {0}
+extinguish = \u00a77Je hebt jezelf uitgeblust.
+extinguishOthers = \u00a77Je hebt {0} uitgeblust.
+failedToCloseConfig = Fout bij het sluiten van config {0}
+failedToCreateConfig = Fout tijdens het aanmaken van config {0}
+failedToWriteConfig = Fout bij het cre\u00ebren van config {0}
+fileRenameError = Hernoemen van {0} mislukt
+foreverAlone = \u00a7cJe hebt niemand waarnaar je kan reageren.
+freedMemory = {0} MB gelost.
+gcchunks = chunks,
+gcentities = entities
+gcmax = Maximaal geheugen: {0} MB
+gcmin = Minimaal geheugen: {0} MB
+generatingPortal = \u00a77Uitgangs portal aan het cre\u00ebren.
+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}.
+haveBeenReleased = \u00a77Je bent bevrijdt
+heal = \u00a77Je bent gehealed.
+healOther = \u00a77Je healde {0}.
+helpConsole = type ?, Om help vanaf de console te bekijken.
+helpOp = \u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
+helpPages = Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f:
+holeInFloor = Gat in de vloer
+homeSet = \u00a77Home ingesteld.
+homeSetToBed = \u00a77Je home is is nu verplaatst naar dit bed.
+hour = uur
+hours = uren
+ignorePlayer = Je negeert {0} vanaf nu.
+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:
+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.
+invalidMob = Ongeldig mob type.
+invalidServer = Ongeldige server!
+invalidSignLine = Regel {0} op het bordje is ongeldig.
+invalidWorld = \u00a7cOngeldige wereld.
+inventoryCleared = \u00a77inventory leeggemaakt.
+inventoryClearedOthers = \u00a77inventory van \u00a7c{0}\u00a77 leeggemaakt.
+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.
+itemSellAir = Je wilde serieus lucht verkopen? Plaats een voorwerp in je hand.
+itemSold = \u00a77Verkocht voor \u00a7c {0} \u00a77 ({1} voorwerpen voor {2} per stuk)
+itemSoldConsole = {0} verkocht {1} voor \u00a77 {2} \u00a77 ({3} voorwerpen voor {4} per stuk)
+itemSpawn = \u00a77Geven van {0} van de {1}
+itemsCsvNotLoaded = De item kunnen niet geladen worden.csv.
+jailMessage = \u00a7cYou do the crime, you do the time.
+jailNotExist = Die gevangenis bestaat niet.
+jailSet = \u00a77Gevangenis {0} is ingesteld
+jumpError = Dat zou je computers hersenen beschadigen.
+kickDefault = Gekicked van de server
+kill = \u00a77Jij doodde {0}.
+kitError = \u00a7cEr zijn geen geldige kits.
+kitError2 = \u00a7cDie kit bestaat niet of is verkeerde beschreven.
+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
+kitTimed = \u00a7cJe kan die kit pas weer gebruiken over {0}.
+kits = \u00a77Kits: {0}
+lightningSmited = \u00a77Je bent zojuist verbrand
+lightningUse = \u00a77Brand {0}
+loadWarpError = Fout bij het laden van warp {0}
+loadinfo = Build {1} geladen {0} van {2}
+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.
+mayNotJail = \u00a7cJe mag die speler niet in de gevangenis zetten.
+me = me
+minute = minuut
+minutes = minuten
+missingItems = Je hebt geen {0}x {1}.
+missingPrefixSuffix = Er mist een prefix of suffix voor {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.
+moneyRecievedFrom = \u00a7a{0} is ontvangen van {1}
+moneySentTo = \u00a7a{0} is verzonden naar {1}
+moneyTaken = {0} van je bankrekening afgehaald.
+month = maand
+months = maanden
+moreThanZero = Aantal moet groter zijn dan 0.
+msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
+mutedPlayer = Speler {0} gemute.
+mutedPlayerFor = Speler {0} is gemute voor {1}.
+mutedUserSpeaks = {0} probeerde te praten, maar is gemute.
+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.
+nickInUse = \u00a7cDie naam is al in gebruik.
+nickNamesAlpha = \u00a7cNicknames moeten alfanumeriek zijn.
+nickNoMore = \u00a7Je hebt geen nickname meer.
+nickOthersPermission = \u00a7cJe hebt geen toestemming om de nickname van anderen te veranderen
+nickSet = \u00a77Je nickname is nu \u00a7c{0}
+noAccessCommand = \u00a7cJe hebt geen toegang tot die opdracht.
+noAccessPermission = \u00a7cJe hebt hier geen toegang voor {0}.
+noDestroyPermission = \u00a7cJe hebt geen toegang om dat te vernietigen {0}.
+noHomeSet = Je hebt geen home gemaakt.
+noHomeSetPlayer = Speler heeft geen home.
+noKitPermission = \u00a7cJe hebt de \u00a7c{0}\u00a7c toestemming nodig om die kit te gebruiken.
+noKits = \u00a77Er zijn nog geen kits beschikbaar
+noMail = Je hebt geen berichten
+noMailSendPerm = \u00a7cJe hebt de \u00a7fessentials.mail.send\u00a7c toestemming niet.
+noMotd = \u00a7cEr is geen bericht van de dag."
+noNewMail = \u00a77Je hebt geen nieuwe berichten.
+noPendingRequest = Je hebt geen aanvragen.
+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.
+notEnoughMoney = Je hebt niet voldoende middelen.
+notRecommendedBukkit = De Bukkit versie is niet de aangeraden build voor Essentials.
+notSupportedYet = Nog niet ondersteund.
+now = nu
+numberRequired = Er moet daar een nummer, grapjas.
+onlyDayNight = /time oondersteund alleen day/night.
+onlyPlayers = Alleen in-game spelers kunnen {0} gebruiken.
+parseError = Fout bij ontleding {0} op regel {1}
+pendingTeleportCancelled = \u00a7cAangevraagde teleportatie afgelast.
+permissionsError = Vermisde Permissions/GroupManager; chat prefixes/suffixes worden uitgeschakeld.
+playerBanned = \u00a7cSpeler {0} is geband
+playerInJail = \u00a7cSpeler zit al in de gevangenis {0}.
+playerJailed = \u00a77Speler {0} is in de gevangenis gezet.
+playerJailedFor = \u00a77Speler {0} is in de gevangenis gezet voor {1}.
+playerNeverOnServer = \u00a7cSpeler {0} is nooit op deze server geweest.
+playerNotFound = \u00a7cSpeler niet gevonden.
+pong = Pong!
+possibleWorlds = \u00a77Mogelijk zijn de werelden de nummer 0 tot en met {0}.
+powerToolAir = Command kan niet worden bevestigd aan de lucht.
+powerToolAttach = Command toegewezen aan {0}
+powerToolRemove = Command verwijderd van {0}
+protectionOwner = \u00a76[EssentialsProtect] Bescherming eigenaar: {0}
+questionFormat = \u00a77[Question]\u00a7f {0}
+reloadAllPlugins = \u00a77Alle plugins zijn herladen.
+requestAccepted = \u00a77Teleporteer aanvraag geaccepteerd.
+requestDenied = \u00a77Teleporteer aanvraag geweigerd.
+requestSent = \u00a77Aanvraag verstuurd naar {0}\u00a77.
+returnPlayerToJailError = Fout opgetreden bij terugzetten van speler in gevangenis.
+second = seconde
+seconds = seconde
+seenOffline = Speler {0} is offline vanaf {1}
+seenOnline = Speler {0} is online vanaf {1}
+serverFull = Server is vol
+sheepMalformedColor = Misvoormde kleur.
+shoutFormat = \u00a77[Shout]\u00a7f {0}
+similarWarpExist = Er bestaat al een warp met dezelfde naam.
+slimeMalformedSize = Misvoormde grootte.
+soloMob = Die mob is liever in zijn eentje
+spawnSet = \u00a77Spawn locatie voor de groep {0} ingesteld.
+spawned = gespawned
+suicideMessage = \u00a77Vaarwel vreedzame wereld...
+suicideSuccess = \u00a77{0} pleegde zelfmoord
+takenFromAccount = \u00a7c{0} is van je bank rekening afgehaald.
+teleportAll = \u00a77Bezig met teleporteren van alle spelers...
+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.
+teleportNewPlayerError = Fout bij het teleporteren van nieuwe speler.
+teleportRequest = \u00a7c{0}\u00a7c vraagt of hij jou kan teleporteren.
+teleportTop = \u00a77Bezig met teleporteren naar de top.
+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}
+thunder = Je {0} onweert de wereld
+thunderDuration = Je {0} onweert de wereld voor {1} seconde.
+timeBeforeHeal = Afkoeltijd tot de volgende heal: {0}
+timeBeforeTeleport = Afkoeltijd tot de volgende teleport: {0}
+timePattern = (?:([0-9]+)\\s*[yj][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[oa][a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[hu][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
+timeSet = Tijd ingesteld in alle werelden.
+tradeCompleted = \u00a77Ruil verricht.
+tradeSignEmpty = Het handelsbordje heeft een te kleine voorraad.
+treeFailure = \u00a7cFout bij het genereren van boom. Pobeer het opnieuw op gras of dirt.
+treeSpawned = \u00a77Boom gespawned.
+typeTpaccept = \u00a77Om te teleporten, type \u00a7c/tpaccept\u00a77.
+typeTpdeny = \u00a77Om te weigeren, type \u00a7c/tpdeny\u00a77.
+typeWorldName = \u00a77Je kan ook de exacte naam van de wereld typen.
+unableToSpawnMob = De mob kan niet gespawned worden.
+unableToSpawnMob = Mob kon niet gespawnd worden.
+unbannedIP = IP adres unbanned.
+unbannedPlayer = Speler unbanned.
+unignorePlayer = Je negeert {0} niet meer.
+unknownItemId = Onbekend voorwerp id: {0}
+unknownItemInList = Onbekend voorwerp {0} in {1} lijst.
+unknownItemName = Onbekende voorwerp naam: {0}
+unlimitedItemPermission = \u00a7cOnbevoegd om oneindig {0} te hebben.
+unlimitedItems = Oneindige voorwerpen:
+unmutedPlayer = Speler {0} ge-unmute.
+upgradingFilesError = Fout tijdens het upgraden van de bestanden
+userCreatedPortal = {0} gebruikte een portal en maakte een uitgangs portal.
+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
+usingPortal = \u00a77Bezig met via de portal naar de uitgangs portal.
+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.
+warpListPermission = \u00a7cJe hebt geen toegang om die warp te maken.
+warpNotExist = Die warp bestaat niet.
+warpSet = \u00a77Warp {0} ingesteld.
+warpUsePermission = \u00a7cOnbevoegd om die warp te gebruiken.
+warpingTo = \u00a77Aan het warpen naar {0}.
+weatherStorm = \u00a77Je hebt het weer naar storm gezet in de wereld
+weatherStormFor = \u00a77Je hebt het weer in de wereld naar storm gezet voor {0} seconde
+weatherSun = \u00a77Je hebt het weer naar zon gezet in de wereld
+weatherSunFor = \u00a77Je hebt het weer in de wereld naar zon gezet voor {0} seconde
+whoisGeoLocation = \u00a79 - Locatie: {0}
+whoisHealth = \u00a79 - Levens: {0}/20
+whoisIPAddress = \u00a79 - IP Adres: {0}
+whoisIs = {0} is {1}
+whoisLocation = \u00a79 - Locatie: ({0}, {1}, {2}, {3})
+whoisMoney = \u00a79 - Geld: {0}
+whoisStatusAvailable = \u00a79 - Status: Beschikbaar
+whoisStatusAway = \u00a79 - Status: \u00a7cWeg\u00a7f
+worth = \u00a77Stapel {0} met waarde \u00a7c{1}\u00a77 ({2} voorwerp(en) voor {3} per stuk)
+worthMeta = \u00a77Stapel {0} met een metadata van {1} met waarde \u00a7c{2}\u00a77 ({3} voorwerp(en) voor {4} per stuk)
+worthSet = Waarde ingesteld
+year = jaar
+years = jaren
+youAreHealed = \u00a77Je bent gehealed.
+youHaveNewMail = \u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken.
diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml
index b255f4c82..300912857 100644
--- a/Essentials/src/plugin.yml
+++ b/Essentials/src/plugin.yml
@@ -76,6 +76,10 @@ commands:
description: Extinguish players.
usage: /<command> <player>
aliases: [extinguish]
+ fireball:
+ description: Throw a fireball.
+ usage: /<command>
+ aliases: [efireball]
getpos:
description: Get your current coordinates.
usage: /<command>
@@ -175,6 +179,10 @@ commands:
description: Change your nickname or that of another player.
usage: /<command> <player> [nickname|off]
aliases: [enick]
+ nuke:
+ description: May death rain upon them.
+ usage: /<command> <player>
+ aliases: [enuke]
pay:
description: Pays another player from your balance
usage: /<command> [player] [amount]
diff --git a/Essentials/test/com/earth2me/essentials/EconomyTest.java b/Essentials/test/com/earth2me/essentials/EconomyTest.java
index 74f5f11d2..9677c9dd5 100644
--- a/Essentials/test/com/earth2me/essentials/EconomyTest.java
+++ b/Essentials/test/com/earth2me/essentials/EconomyTest.java
@@ -4,22 +4,22 @@ import com.earth2me.essentials.api.Economy;
import com.earth2me.essentials.api.NoLoanPermittedException;
import com.earth2me.essentials.api.UserDoesNotExistException;
import java.io.IOException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import junit.framework.TestCase;
import org.bukkit.plugin.InvalidDescriptionException;
+import org.junit.Test;
public class EconomyTest extends TestCase
{
- private final OfflinePlayer base1;
- private final Essentials ess;
+ private final transient Essentials ess;
+ private final static String NPCNAME = "npc1";
+ private final static String PLAYERNAME = "TestPlayer1";
- public EconomyTest(String testName)
+ public EconomyTest(final String testName)
{
super(testName);
ess = new Essentials();
- FakeServer server = new FakeServer();
+ final FakeServer server = new FakeServer();
try
{
ess.setupForTesting(server);
@@ -32,46 +32,45 @@ public class EconomyTest extends TestCase
{
fail("IOException");
}
- base1 = new OfflinePlayer("TestPlayer1");
- server.addPlayer(base1);
+ server.addPlayer(new OfflinePlayer(PLAYERNAME));
}
-
+
// only one big test, since we use static instances
+ @Test
public void testEconomy()
{
// test NPC
- String npcName = "npc1";
- assertFalse(Economy.playerExists(npcName));
- assertTrue(Economy.createNPC(npcName));
- assertTrue(Economy.playerExists(npcName));
- assertNotNull(ess.getOfflineUser(npcName));
+ assertFalse("NPC does not exists", Economy.playerExists(NPCNAME));
+ assertTrue("Create NPC", Economy.createNPC(NPCNAME));
+ assertTrue("NPC exists", Economy.playerExists(NPCNAME));
+ assertNotNull("NPC can be accessed", ess.getOfflineUser(NPCNAME));
try
{
- Economy.removeNPC(npcName);
+ Economy.removeNPC(NPCNAME);
}
catch (UserDoesNotExistException ex)
{
fail(ex.getMessage());
}
- assertFalse(Economy.playerExists(npcName));
-
+ assertFalse("NPC can be removed", Economy.playerExists(NPCNAME));
+
//test Math
try
{
- String playerName = "TestPlayer1";
- assertTrue(Economy.playerExists(playerName));
- Economy.resetBalance(playerName);
- assertEquals(0.0, Economy.getMoney(playerName));
- Economy.add(playerName, 10.0);
- assertEquals(10.0, Economy.getMoney(playerName));
- Economy.subtract(playerName, 5.0);
- assertEquals(5.0, Economy.getMoney(playerName));
- Economy.multiply(playerName, 2.0);
- assertEquals(10.0, Economy.getMoney(playerName));
- Economy.divide(playerName, 2.0);
- assertEquals(5.0, Economy.getMoney(playerName));
- Economy.setMoney(playerName, 10.0);
- assertEquals(10.0, Economy.getMoney(playerName));
+
+ assertTrue("Player exists", Economy.playerExists(PLAYERNAME));
+ Economy.resetBalance(PLAYERNAME);
+ assertEquals("Player has no money", 0.0, Economy.getMoney(PLAYERNAME));
+ Economy.add(PLAYERNAME, 10.0);
+ assertEquals("Add money", 10.0, Economy.getMoney(PLAYERNAME));
+ Economy.subtract(PLAYERNAME, 5.0);
+ assertEquals("Subtract money", 5.0, Economy.getMoney(PLAYERNAME));
+ Economy.multiply(PLAYERNAME, 2.0);
+ assertEquals("Multiply money", 10.0, Economy.getMoney(PLAYERNAME));
+ Economy.divide(PLAYERNAME, 2.0);
+ assertEquals("Divide money", 5.0, Economy.getMoney(PLAYERNAME));
+ Economy.setMoney(PLAYERNAME, 10.0);
+ assertEquals("Set money", 10.0, Economy.getMoney(PLAYERNAME));
}
catch (NoLoanPermittedException ex)
{
@@ -81,24 +80,23 @@ public class EconomyTest extends TestCase
{
fail(ex.getMessage());
}
-
+
//test Format
- assertEquals("$1000", Economy.format(1000.0));
- assertEquals("$10", Economy.format(10.0));
- assertEquals("$10.10", Economy.format(10.10));
- assertEquals("$10.10", Economy.format(10.102));
- assertEquals("$10.11", Economy.format(10.109));
-
-
+ assertEquals("Format $1000", "$1000", Economy.format(1000.0));
+ assertEquals("Format $10", "$10", Economy.format(10.0));
+ assertEquals("Format $10.10", "$10.10", Economy.format(10.10));
+ assertEquals("Format $10.10", "$10.10", Economy.format(10.102));
+ assertEquals("Format $10.11", "$10.11", Economy.format(10.109));
+
+
//test Exceptions
try
{
- String playerName = "TestPlayer1";
- assertTrue(Economy.playerExists(playerName));
- Economy.resetBalance(playerName);
- assertEquals(0.0, Economy.getMoney(playerName));
- Economy.subtract(playerName, 5.0);
- fail();
+ assertTrue("Player exists", Economy.playerExists(PLAYERNAME));
+ Economy.resetBalance(PLAYERNAME);
+ assertEquals("Reset balance", 0.0, Economy.getMoney(PLAYERNAME));
+ Economy.subtract(PLAYERNAME, 5.0);
+ fail("Did not throw exception");
}
catch (NoLoanPermittedException ex)
{
@@ -107,12 +105,11 @@ public class EconomyTest extends TestCase
{
fail(ex.getMessage());
}
-
+
try
{
- String playerName = "UnknownPlayer";
- Economy.resetBalance(playerName);
- fail();
+ Economy.resetBalance("UnknownPlayer");
+ fail("Did not throw exception");
}
catch (NoLoanPermittedException ex)
{
diff --git a/EssentialsChat/nbproject/project.properties b/EssentialsChat/nbproject/project.properties
index 89b368bee..08df72abc 100644
--- a/EssentialsChat/nbproject/project.properties
+++ b/EssentialsChat/nbproject/project.properties
@@ -26,14 +26,12 @@ dist.jar=${dist.dir}/EssentialsChat.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=../lib/craftbukkit-0.0.1-SNAPSHOT.jar
-file.reference.Permissions.jar=..\\lib\\Permissions.jar
+file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
includes=**
jar.compress=false
javac.classpath=\
- ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\
- ${file.reference.Permissions.jar}:\
- ${reference.Essentials.jar}
+ ${reference.Essentials.jar}:\
+ ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
index 0271fff6f..428413661 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
@@ -6,30 +6,25 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.event.Event.Priority;
import org.bukkit.event.Event.Type;
-import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public class EssentialsChat extends JavaPlugin
{
- private static final Logger logger = Logger.getLogger("Minecraft");
-
- public EssentialsChat()
- {
- super();
- }
+ private static final Logger LOGGER = Logger.getLogger("Minecraft");
public void onEnable()
{
- PluginManager pm = getServer().getPluginManager();
- EssentialsChatPlayerListener playerListener = new EssentialsChatPlayerListener(getServer());
- pm.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this);
- pm.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.Highest, this);
- if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion())) {
- logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ final PluginManager pluginManager = getServer().getPluginManager();
+ final EssentialsChatPlayerListener playerListener = new EssentialsChatPlayerListener(getServer());
+ pluginManager.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Lowest, this);
+ pluginManager.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.Highest, this);
+ if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion()))
+ {
+ LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
}
- logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
+ LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
}
public void onDisable()
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java
index d3dff8538..211733818 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java
@@ -1,7 +1,14 @@
package com.earth2me.essentials.chat;
import com.earth2me.essentials.Essentials;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
+import java.util.logging.Logger;
+import org.bukkit.Location;
import org.bukkit.Server;
+import org.bukkit.World;
+import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerChatEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerListener;
@@ -10,52 +17,109 @@ import org.bukkit.event.player.PlayerRespawnEvent;
public class EssentialsChatPlayerListener extends PlayerListener
{
- private final Server server;
+ private static final Logger LOGGER = Logger.getLogger("Minecraft");
+ private final transient IEssentials ess = Essentials.getStatic();
+ private final transient Server server;
- public EssentialsChatPlayerListener(Server server)
+ public EssentialsChatPlayerListener(final Server server)
{
this.server = server;
}
@Override
- @SuppressWarnings("CallToThreadDumpStack")
- public void onPlayerJoin(PlayerJoinEvent event)
+ public void onPlayerJoin(final PlayerJoinEvent event)
{
- try
+ final User user = ess.getUser(event.getPlayer());
+ updateDisplayName(user);
+ }
+
+ private void updateDisplayName(final User user)
+ {
+ final String prefix = ess.getPermissionsHandler().getPrefix(user).replace('&', '§').replace("{WORLDNAME}", user.getWorld().getName());
+ final String suffix = ess.getPermissionsHandler().getSuffix(user).replace('&', '§').replace("{WORLDNAME}", user.getWorld().getName());
+
+ user.setDisplayName(prefix + user.getNick() + suffix + (suffix.length() > 1 && suffix.substring(suffix.length() - 2, suffix.length() - 1).equals("§") ? "" : "§f"));
+ }
+
+ @Override
+ public void onPlayerChat(final PlayerChatEvent event)
+ {
+ if (event.isCancelled())
{
- EssentialsChatWorker.onPlayerJoin(server, event);
+ return;
}
- catch (Throwable ex)
+ final User user = ess.getUser(event.getPlayer());
+ updateDisplayName(user);
+
+ if (user.isAuthorized("essentials.chat.color"))
{
- ex.printStackTrace();
+ event.setMessage(event.getMessage().replaceAll("&([0-9a-f])", "§$1"));
}
- }
- @Override
- @SuppressWarnings("CallToThreadDumpStack")
- public void onPlayerRespawn(PlayerRespawnEvent event)
- {
- try
+ event.setFormat(ess.getSettings().getChatFormat(user.getGroup()).replace('&', '§').replace("§§", "&").replace("{DISPLAYNAME}", "%1$s").replace("{GROUP}", user.getGroup()).replace("{MESSAGE}", "%2$s").replace("{WORLDNAME}", user.getWorld().getName()).replace("{SHORTWORLDNAME}", user.getWorld().getName().substring(0, 1).toUpperCase()));
+
+ final int radius = ess.getSettings().getChatRadius();
+ if (radius < 1)
{
- EssentialsChatWorker.onPlayerRespawn(server, event);
+ return;
}
- catch (Throwable ex)
+
+ if (event.getMessage().startsWith("!") && event.getMessage().length() > 1)
{
- ex.printStackTrace();
+ if (user.isAuthorized("essentials.chat.shout"))
+ {
+ event.setMessage(event.getMessage().substring(1));
+ event.setFormat(Util.format("shoutFormat", event.getFormat()));
+ return;
+ }
+ user.sendMessage(Util.i18n("notAllowedToShout"));
+ event.setCancelled(true);
+ return;
}
- }
- @Override
- @SuppressWarnings("CallToThreadDumpStack")
- public void onPlayerChat(PlayerChatEvent event)
- {
- try
+ if (event.getMessage().startsWith("?") && event.getMessage().length() > 1)
{
- EssentialsChatWorker.onPlayerChat(server, event);
+ if (user.isAuthorized("essentials.chat.question"))
+ {
+ event.setMessage(event.getMessage().substring(1));
+ event.setFormat(Util.format("questionFormat", event.getFormat()));
+ return;
+ }
+ user.sendMessage(Util.i18n("notAllowedToQuestion"));
+ event.setCancelled(true);
+ return;
}
- catch (Throwable ex)
+
+ event.setCancelled(true);
+ LOGGER.info(Util.format("localFormat", user.getName(), event.getMessage()));
+
+ final Location loc = user.getLocation();
+ final World world = loc.getWorld();
+ final int x = loc.getBlockX();
+ final int y = loc.getBlockY();
+ final int z = loc.getBlockZ();
+
+ for (Player p : server.getOnlinePlayers())
{
- ex.printStackTrace();
+ final User u = ess.getUser(p);
+ if (u.isIgnoredPlayer(user.getName()) && !user.isOp())
+ {
+ continue;
+ }
+ if (u.equals(user) && !u.isAuthorized("essentials.chat.spy"))
+ {
+ final Location l = u.getLocation();
+ final int dx = Math.abs(x - l.getBlockX());
+ final int dy = Math.abs(y - l.getBlockY());
+ final int dz = Math.abs(z - l.getBlockZ());
+ final int delta = dx + dy + dz;
+ if (delta > radius || world != l.getWorld())
+ {
+ continue;
+ }
+ }
+
+ u.sendMessage(String.format(event.getFormat(), user.getDisplayName(), event.getMessage()));
}
}
}
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java
deleted file mode 100644
index 10787e75b..000000000
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package com.earth2me.essentials.chat;
-
-import com.earth2me.essentials.Essentials;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import com.nijikokun.bukkit.Permissions.Permissions;
-import java.util.logging.Logger;
-import org.bukkit.Location;
-import org.bukkit.Server;
-import org.bukkit.World;
-import org.bukkit.entity.Player;
-import org.bukkit.event.player.PlayerChatEvent;
-import org.bukkit.event.player.PlayerEvent;
-import org.bukkit.event.player.PlayerRespawnEvent;
-
-
-public class EssentialsChatWorker
-{
- private static final Logger logger = Logger.getLogger("Minecraft");
-
- public static void onPlayerRespawn(Server server, PlayerRespawnEvent event)
- {
- User user = Essentials.getStatic().getUser(event.getPlayer());
- updateDisplayName(user);
- }
-
- public static void onPlayerJoin(Server server, PlayerEvent event)
- {
- User user = Essentials.getStatic().getUser(event.getPlayer());
- updateDisplayName(user);
- }
-
- private static void updateDisplayName(User user)
- {
- try
- {
- String group = user.getGroup();
- try
- {
- String prefix = Permissions.Security.getGroupPrefix(user.getWorld().getName(), group).replace('&', '§').replace("{WORLDNAME}", user.getWorld().getName());
- String suffix = Permissions.Security.getGroupSuffix(user.getWorld().getName(), group).replace('&', '§').replace("{WORLDNAME}", user.getWorld().getName());
-
- user.setDisplayName(prefix + user.getNick() + suffix + (suffix.length() > 1 && suffix.substring(suffix.length() -2).equals("§") ? "" : "§f"));
- }
- catch (Throwable ex)
- {
- logger.warning(Util.format("missingPrefixSuffix", group));
- }
- }
- catch (Throwable ex)
- {
- logger.warning(Util.i18n("permissionsError"));
- }
- }
-
- public static void onPlayerChat(Server server, PlayerChatEvent event)
- {
- if (event.isCancelled()) return;
- User user = Essentials.getStatic().getUser(event.getPlayer());
- updateDisplayName(user);
-
- if (user.isAuthorized("essentials.chat.color"))
- event.setMessage(event.getMessage().replaceAll("&([0-9a-f])", "§$1"));
-
- event.setFormat(Essentials.getStatic().getSettings().getChatFormat(user.getGroup()).replace('&', '§').replace("§§", "&").replace("{DISPLAYNAME}", "%1$s").replace("{GROUP}", user.getGroup()).replace("{MESSAGE}", "%2$s").replace("{WORLDNAME}", user.getWorld().getName()));
-
- int radius = Essentials.getStatic().getSettings().getChatRadius();
- if (radius < 1) return;
-
- if (event.getMessage().startsWith("!") && event.getMessage().length() > 1)
- {
- if (user.isAuthorized("essentials.chat.shout"))
- {
- event.setMessage(event.getMessage().substring(1));
- event.setFormat(Util.format("shoutFormat", event.getFormat()));
- return;
- }
- user.sendMessage(Util.i18n("notAllowedToShout"));
- event.setCancelled(true);
- return;
- }
-
- if (event.getMessage().startsWith("?") && event.getMessage().length() > 1)
- {
- if (user.isAuthorized("essentials.chat.question"))
- {
- event.setMessage(event.getMessage().substring(1));
- event.setFormat(Util.format("questionFormat", event.getFormat()));
- return;
- }
- user.sendMessage(Util.i18n("notAllowedToQuestion"));
- event.setCancelled(true);
- return;
- }
-
- event.setCancelled(true);
- logger.info(Util.format("localFormat", user.getName(), event.getMessage()));
-
- Location loc = user.getLocation();
- World w = loc.getWorld();
- int x = loc.getBlockX();
- int y = loc.getBlockY();
- int z = loc.getBlockZ();
-
- for (Player p : server.getOnlinePlayers())
- {
- User u = Essentials.getStatic().getUser(p);
- if (u.isIgnoredPlayer(user.getName()) && !user.isOp()) {
- continue;
- }
- if (u != user && !u.isAuthorized("essentials.chat.spy"))
- {
- Location l = u.getLocation();
- int dx = Math.abs(x - l.getBlockX());
- int dy = Math.abs(y - l.getBlockY());
- int dz = Math.abs(z - l.getBlockZ());
- int delta = dx + dy + dz;
- if (delta > radius || w != l.getWorld()) continue;
- }
-
- u.sendMessage(String.format(event.getFormat(), user.getDisplayName(), event.getMessage()));
- }
- }
-}
diff --git a/EssentialsGeoIP/nbproject/project.properties b/EssentialsGeoIP/nbproject/project.properties
index ed96af206..8eb099985 100644
--- a/EssentialsGeoIP/nbproject/project.properties
+++ b/EssentialsGeoIP/nbproject/project.properties
@@ -1,9 +1,9 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
-annotation.processing.processor.options=
-annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=EssentialsGeoIP
+application.vendor=snowleo
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
@@ -24,13 +24,14 @@ debug.test.classpath=\
dist.dir=dist
dist.jar=${dist.dir}/EssentialsGeoIP.jar
dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
excludes=
-file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=../lib/craftbukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
includes=**
jar.compress=false
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}
+ ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsPermissionsCommands/build.xml b/EssentialsPermissionsCommands/build.xml
new file mode 100644
index 000000000..507230993
--- /dev/null
+++ b/EssentialsPermissionsCommands/build.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<!-- By default, only the Clean and Build commands use this build script. -->
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
+<!-- the Compile on Save feature is turned off for the project. -->
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+<!-- in the project's Project Properties dialog box.-->
+<project name="EssentialsPermissionsCommands" default="default" basedir=".">
+ <description>Builds, tests, and runs the project EssentialsPermissionsCommands.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-jar: called before JAR building
+ -post-jar: called after JAR building
+ -post-clean: called after cleaning build products
+
+ (Targets beginning with '-' are not intended to be called on their own.)
+
+ Example of inserting an obfuscator after compilation could look like this:
+
+ <target name="-post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Another way to customize the build is by overriding existing main targets.
+ The targets of interest are:
+
+ -init-macrodef-javac: defines macro for javac compilation
+ -init-macrodef-junit: defines macro for junit execution
+ -init-macrodef-debug: defines macro for class debugging
+ -init-macrodef-java: defines macro for class execution
+ -do-jar-with-manifest: JAR building (if you are using a manifest)
+ -do-jar-without-manifest: JAR building (if you are not using a manifest)
+ run: execution of project
+ -javadoc-build: Javadoc generation
+ test-report: JUnit report generation
+
+ An example of overriding the target for project execution could look like this:
+
+ <target name="run" depends="EssentialsPermissionsCommands-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
+ properties which you can use, check the target you are overriding in the
+ nbproject/build-impl.xml file.
+
+ -->
+</project>
diff --git a/EssentialsPermissionsCommands/manifest.mf b/EssentialsPermissionsCommands/manifest.mf
new file mode 100644
index 000000000..328e8e5bc
--- /dev/null
+++ b/EssentialsPermissionsCommands/manifest.mf
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
diff --git a/EssentialsPermissionsCommands/nbproject/build-impl.xml b/EssentialsPermissionsCommands/nbproject/build-impl.xml
new file mode 100644
index 000000000..5147dc1c2
--- /dev/null
+++ b/EssentialsPermissionsCommands/nbproject/build-impl.xml
@@ -0,0 +1,1080 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+ -->
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsPermissionsCommands-impl">
+ <fail message="Please build using Ant 1.7.1 or higher.">
+ <condition>
+ <not>
+ <antversion atleast="1.7.1"/>
+ </not>
+ </condition>
+ </fail>
+ <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
+ <!--
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init" name="-init-private">
+ <property file="nbproject/private/config.properties"/>
+ <property file="nbproject/private/configs/${config}.properties"/>
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-pre-init-libraries">
+ <property location="../lib/nblibraries.properties" name="libraries.path"/>
+ <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
+ <pathconvert dirsep="/" property="libraries.dir">
+ <path path="${libraries.dir.nativedirsep}"/>
+ </pathconvert>
+ <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
+ <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
+ </target>
+ <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
+ <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
+ <filterchain>
+ <replacestring from="$${base}" to="${libraries.dir}"/>
+ <escapeunicode/>
+ </filterchain>
+ </loadproperties>
+ </target>
+ <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
+ <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
+ <filterchain>
+ <replacestring from="$${base}" to="${libraries.dir}"/>
+ <escapeunicode/>
+ </filterchain>
+ </loadproperties>
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
+ <property file="nbproject/configs/${config}.properties"/>
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="splashscreen.available">
+ <and>
+ <not>
+ <equals arg1="${application.splash}" arg2="" trim="true"/>
+ </not>
+ <available file="${application.splash}"/>
+ </and>
+ </condition>
+ <condition property="main.class.available">
+ <and>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class.available"/>
+ </and>
+ </condition>
+ <condition property="do.archive">
+ <not>
+ <istrue value="${jar.archive.disabled}"/>
+ </not>
+ </condition>
+ <condition property="do.mkdist">
+ <and>
+ <isset property="do.archive"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ <not>
+ <istrue value="${mkdist.disabled}"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="do.mkdist"/>
+ </and>
+ </condition>
+ <condition property="do.archive+manifest.available">
+ <and>
+ <isset property="manifest.available"/>
+ <istrue value="${do.archive}"/>
+ </and>
+ </condition>
+ <condition property="do.archive+main.class.available">
+ <and>
+ <isset property="main.class.available"/>
+ <istrue value="${do.archive}"/>
+ </and>
+ </condition>
+ <condition property="do.archive+splashscreen.available">
+ <and>
+ <isset property="splashscreen.available"/>
+ <istrue value="${do.archive}"/>
+ </and>
+ </condition>
+ <condition property="do.archive+manifest.available+main.class">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <istrue value="${do.archive}"/>
+ </and>
+ </condition>
+ <condition property="manifest.available-mkdist.available">
+ <or>
+ <istrue value="${manifest.available}"/>
+ <isset property="do.mkdist"/>
+ </or>
+ </condition>
+ <condition property="manifest.available+main.class-mkdist.available">
+ <or>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="do.mkdist"/>
+ </or>
+ </condition>
+ <condition property="have.tests">
+ <or>
+ <available file="${test.src.dir}"/>
+ </or>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <and>
+ <isset property="javadoc.preview"/>
+ <isfalse value="${javadoc.preview}"/>
+ </and>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ <property name="application.args" value=""/>
+ <property name="source.encoding" value="${file.encoding}"/>
+ <property name="runtime.encoding" value="${source.encoding}"/>
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
+ <and>
+ <isset property="javadoc.encoding"/>
+ <not>
+ <equals arg1="${javadoc.encoding}" arg2=""/>
+ </not>
+ </and>
+ </condition>
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>
+ <property name="includes" value="**"/>
+ <property name="excludes" value=""/>
+ <property name="do.depend" value="false"/>
+ <condition property="do.depend.true">
+ <istrue value="${do.depend}"/>
+ </condition>
+ <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
+ <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
+ <length length="0" string="${endorsed.classpath}" when="greater"/>
+ </condition>
+ <condition else="false" property="jdkBug6558476">
+ <and>
+ <matches pattern="1\.[56]" string="${java.specification.version}"/>
+ <not>
+ <os family="unix"/>
+ </not>
+ </and>
+ </condition>
+ <property name="javac.fork" value="${jdkBug6558476}"/>
+ <property name="jar.index" value="false"/>
+ <property name="jar.index.metainf" value="${jar.index}"/>
+ <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="test.src.dir">Must set test.src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <attribute default="${javac.processorpath}" name="processorpath"/>
+ <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="${javac.debug}" name="debug"/>
+ <attribute default="${empty.dir}" name="sourcepath"/>
+ <attribute default="${empty.dir}" name="gensrcdir"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property location="${build.dir}/empty" name="empty.dir"/>
+ <mkdir dir="${empty.dir}"/>
+ <mkdir dir="@{apgeneratedsrcdir}"/>
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+ <src>
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+ <include name="*"/>
+ </dirset>
+ </src>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <compilerarg line="${javac.compilerargs}"/>
+ <compilerarg value="-processorpath"/>
+ <compilerarg path="@{processorpath}:${empty.dir}"/>
+ <compilerarg line="${ap.processors.internal}"/>
+ <compilerarg line="${annotation.processing.processor.options}"/>
+ <compilerarg value="-s"/>
+ <compilerarg path="@{apgeneratedsrcdir}"/>
+ <compilerarg line="${ap.proc.none.internal}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <attribute default="${javac.processorpath}" name="processorpath"/>
+ <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="${javac.debug}" name="debug"/>
+ <attribute default="${empty.dir}" name="sourcepath"/>
+ <attribute default="${empty.dir}" name="gensrcdir"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property location="${build.dir}/empty" name="empty.dir"/>
+ <mkdir dir="${empty.dir}"/>
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+ <src>
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+ <include name="*"/>
+ </dirset>
+ </src>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <sequential>
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </depend>
+ </sequential>
+ </macrodef>
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <sequential>
+ <fail unless="javac.includes">Must set javac.includes</fail>
+ <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
+ <path>
+ <filelist dir="@{destdir}" files="${javac.includes}"/>
+ </path>
+ <globmapper from="*.java" to="*.class"/>
+ </pathconvert>
+ <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
+ <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
+ <delete>
+ <files includesfile="${javac.includesfile.binary}"/>
+ </delete>
+ <delete>
+ <fileset file="${javac.includesfile.binary}"/>
+ </delete>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="**" name="testincludes"/>
+ <sequential>
+ <property name="junit.forkmode" value="perTest"/>
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
+ <batchtest todir="${build.test.results.dir}">
+ <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+ <filename name="@{testincludes}"/>
+ </fileset>
+ </batchtest>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg value="-ea"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
+ <target name="-profile-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-profile-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-profile-init-macrodef-profile">
+ <macrodef name="resolve">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${env.@{value}}"/>
+ </sequential>
+ </macrodef>
+ <macrodef name="profile">
+ <attribute default="${main.class}" name="classname"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property environment="env"/>
+ <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
+ <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg value="${profiler.info.jvmargs.agent}"/>
+ <jvmarg line="${profiler.info.jvmargs}"/>
+ <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+ <arg line="${application.args}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
+ <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+ <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${main.class}" name="name"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <attribute default="" name="stopclassname"/>
+ <sequential>
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${build.classes.dir}" name="dir"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset dir="@{dir}" includes="${fix.classes}">
+ <include name="${fix.includes}*.class"/>
+ </fileset>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-debug-args">
+ <property name="version-output" value="java version &quot;${ant.java.version}"/>
+ <condition property="have-jdk-older-than-1.4">
+ <or>
+ <contains string="${version-output}" substring="java version &quot;1.0"/>
+ <contains string="${version-output}" substring="java version &quot;1.1"/>
+ <contains string="${version-output}" substring="java version &quot;1.2"/>
+ <contains string="${version-output}" substring="java version &quot;1.3"/>
+ </or>
+ </condition>
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
+ <istrue value="${have-jdk-older-than-1.4}"/>
+ </condition>
+ <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
+ <os family="windows"/>
+ </condition>
+ <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
+ <isset property="debug.transport"/>
+ </condition>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${main.class}" name="classname"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg line="${debug-args-line}"/>
+ <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${main.class}" name="classname"/>
+ <attribute default="${run.classpath}" name="classpath"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-copylibs">
+ <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${manifest.file}" name="manifest"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert pathsep=" " property="jar.classpath">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ <customize/>
+ </manifest>
+ </copylibs>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target name="-init-ap-cmdline-properties">
+ <property name="annotation.processing.enabled" value="true"/>
+ <property name="annotation.processing.processors.list" value=""/>
+ <property name="annotation.processing.processor.options" value=""/>
+ <property name="annotation.processing.run.all.processors" value="true"/>
+ <property name="javac.processorpath" value="${javac.classpath}"/>
+ <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
+ <condition property="ap.supported.internal" value="true">
+ <not>
+ <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
+ </not>
+ </condition>
+ </target>
+ <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
+ <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
+ <isfalse value="${annotation.processing.run.all.processors}"/>
+ </condition>
+ <condition else="" property="ap.proc.none.internal" value="-proc:none">
+ <isfalse value="${annotation.processing.enabled}"/>
+ </condition>
+ </target>
+ <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
+ <property name="ap.cmd.line.internal" value=""/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target name="-deps-jar-init" unless="built-jar.properties">
+ <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
+ <delete file="${built-jar.properties}" quiet="true"/>
+ </target>
+ <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
+ <echo level="warn" message="Cycle detected: EssentialsPermissionsCommands was already built"/>
+ </target>
+ <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
+ <mkdir dir="${build.dir}"/>
+ <touch file="${built-jar.properties}" verbose="false"/>
+ <property file="${built-jar.properties}" prefix="already.built.jar."/>
+ <antcall target="-warn-already-built-jar"/>
+ <propertyfile file="${built-jar.properties}">
+ <entry key="${basedir}" value=""/>
+ </propertyfile>
+ <antcall target="-maybe-call-dep">
+ <param name="call.built.properties" value="${built-jar.properties}"/>
+ <param location="${project.Essentials}" name="call.subproject"/>
+ <param location="${project.Essentials}/build.xml" name="call.script"/>
+ <param name="call.target" value="jar"/>
+ <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
+ </antcall>
+ </target>
+ <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
+ <target depends="init" name="-check-automatic-build">
+ <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
+ </target>
+ <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
+ <antcall target="clean"/>
+ </target>
+ <target depends="init,deps-jar" name="-pre-pre-compile">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target if="do.depend.true" name="-compile-depend">
+ <pathconvert property="build.generated.subdirs">
+ <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+ <include name="*"/>
+ </dirset>
+ </pathconvert>
+ <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
+ <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target if="has.persistence.xml" name="-copy-persistence-xml">
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy todir="${build.classes.dir}/META-INF">
+ <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:force-recompile/>
+ <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target depends="init" name="-pre-pre-jar">
+ <dirname file="${dist.jar}" property="dist.jar.dir"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
+ <j2seproject1:jar/>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo level="info">To run this application from the command line without Ant, try:</echo>
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
+ <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+ <touch file="${tmp.manifest.file}" verbose="false"/>
+ </target>
+ <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
+ <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+ <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
+ </target>
+ <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
+ <manifest file="${tmp.manifest.file}" mode="update">
+ <attribute name="Main-Class" value="${main.class}"/>
+ </manifest>
+ </target>
+ <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
+ <basename file="${application.splash}" property="splashscreen.basename"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
+ <manifest file="${tmp.manifest.file}" mode="update">
+ <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
+ </manifest>
+ </target>
+ <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
+ <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
+ <echo level="info">To run this application from the command line without Ant, try:</echo>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
+ <echo level="info">java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
+ <delete>
+ <fileset file="${tmp.manifest.file}"/>
+ </delete>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target depends="init,compile" description="Run a main class." name="run">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="-do-not-recompile">
+ <property name="javac.includes.binary" value=""/>
+ </target>
+ <target depends="init,compile-single" name="run-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <target depends="init,compile-test-single" name="run-test-with-main">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
+ </target>
+ <target depends="init,compile" name="-debug-start-debuggee">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
+ <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
+ <target depends="init" name="-pre-debug-fix">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
+ <!--
+ =================
+ PROFILING SECTION
+ =================
+ -->
+ <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
+ <nbprofiledirect>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ </nbprofiledirect>
+ <profile/>
+ </target>
+ <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
+ <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
+ <nbprofiledirect>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ </nbprofiledirect>
+ <profile classname="${profile.class}"/>
+ </target>
+ <!--
+ =========================
+ APPLET PROFILING SECTION
+ =========================
+ -->
+ <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
+ <nbprofiledirect>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ </nbprofiledirect>
+ <profile classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </profile>
+ </target>
+ <!--
+ =========================
+ TESTS PROFILING SECTION
+ =========================
+ -->
+ <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
+ <nbprofiledirect>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ </nbprofiledirect>
+ <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
+ <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+ <jvmarg value="${profiler.info.jvmargs.agent}"/>
+ <jvmarg line="${profiler.info.jvmargs}"/>
+ <test name="${profile.class}"/>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ </junit>
+ </target>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target depends="init" if="have.sources" name="-javadoc-build">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+ <filename name="**/*.java"/>
+ </fileset>
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+ <include name="**/*.java"/>
+ </fileset>
+ </javadoc>
+ <copy todir="${dist.javadoc.dir}">
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+ <filename name="**/doc-files/**"/>
+ </fileset>
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+ <include name="**/doc-files/**"/>
+ </fileset>
+ </copy>
+ </target>
+ <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target if="do.depend.true" name="-compile-test-depend">
+ <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
+ </target>
+ <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
+ <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
+ <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target depends="init" if="have.tests" name="-pre-test-run">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
+ <j2seproject3:junit testincludes="**/*Test.java"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+ </target>
+ <target depends="init" if="have.tests" name="test-report"/>
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
+ <target depends="init" if="have.tests" name="-pre-test-run-single">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit excludes="" includes="${test.includes}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
+ <delete file="${test.report.file}"/>
+ <mkdir dir="${build.test.results.dir}"/>
+ <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
+ <customize>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <arg value="${test.class}"/>
+ <arg value="showoutput=true"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
+ </target>
+ <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+ <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" name="run-applet">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target name="-deps-clean-init" unless="built-clean.properties">
+ <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
+ <delete file="${built-clean.properties}" quiet="true"/>
+ </target>
+ <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
+ <echo level="warn" message="Cycle detected: EssentialsPermissionsCommands was already built"/>
+ </target>
+ <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
+ <mkdir dir="${build.dir}"/>
+ <touch file="${built-clean.properties}" verbose="false"/>
+ <property file="${built-clean.properties}" prefix="already.built.clean."/>
+ <antcall target="-warn-already-built-clean"/>
+ <propertyfile file="${built-clean.properties}">
+ <entry key="${basedir}" value=""/>
+ </propertyfile>
+ <antcall target="-maybe-call-dep">
+ <param name="call.built.properties" value="${built-clean.properties}"/>
+ <param location="${project.Essentials}" name="call.subproject"/>
+ <param location="${project.Essentials}/build.xml" name="call.script"/>
+ <param name="call.target" value="clean"/>
+ <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
+ </antcall>
+ </target>
+ <target depends="init" name="-do-clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
+ <target name="-check-call-dep">
+ <property file="${call.built.properties}" prefix="already.built."/>
+ <condition property="should.call.dep">
+ <not>
+ <isset property="already.built.${call.subproject}"/>
+ </not>
+ </condition>
+ </target>
+ <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
+ <ant antfile="${call.script}" inheritall="false" target="${call.target}">
+ <propertyset>
+ <propertyref prefix="transfer."/>
+ <mapper from="transfer.*" to="*" type="glob"/>
+ </propertyset>
+ </ant>
+ </target>
+</project>
diff --git a/EssentialsPermissionsCommands/nbproject/genfiles.properties b/EssentialsPermissionsCommands/nbproject/genfiles.properties
new file mode 100644
index 000000000..bb1e587db
--- /dev/null
+++ b/EssentialsPermissionsCommands/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=9c3a069f
+build.xml.script.CRC32=0a912bb3
+build.xml.stylesheet.CRC32=28e38971@1.43.1.45
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=9c3a069f
+nbproject/build-impl.xml.script.CRC32=dd030a92
+nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
diff --git a/EssentialsPermissionsCommands/nbproject/project.properties b/EssentialsPermissionsCommands/nbproject/project.properties
new file mode 100644
index 000000000..d92776f5b
--- /dev/null
+++ b/EssentialsPermissionsCommands/nbproject/project.properties
@@ -0,0 +1,79 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=EssentialsPermissionsCommands
+application.vendor=snowleo
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/EssentialsPermissionsCommands.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
+excludes=
+file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
+file.reference.Permissions3.jar=../lib/Permissions3.jar
+includes=**
+jar.compress=false
+javac.classpath=\
+ ${reference.Essentials.jar}:\
+ ${file.reference.Permissions3.jar}:\
+ ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=1.6
+javac.target=1.6
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+javac.test.processorpath=\
+ ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
+platform.active=default_platform
+project.Essentials=../Essentials
+reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+source.encoding=UTF-8
+src.dir=src
+test.src.dir=test
diff --git a/EssentialsPermissionsCommands/nbproject/project.xml b/EssentialsPermissionsCommands/nbproject/project.xml
new file mode 100644
index 000000000..89e773c31
--- /dev/null
+++ b/EssentialsPermissionsCommands/nbproject/project.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.java.j2seproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+ <name>EssentialsPermissionsCommands</name>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots>
+ <root id="test.src.dir"/>
+ </test-roots>
+ </data>
+ <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
+ <definitions>../lib/nblibraries.properties</definitions>
+ </libraries>
+ <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
+ <reference>
+ <foreign-project>Essentials</foreign-project>
+ <artifact-type>jar</artifact-type>
+ <script>build.xml</script>
+ <target>jar</target>
+ <clean-target>clean</clean-target>
+ <id>jar</id>
+ </reference>
+ </references>
+ </configuration>
+</project>
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangadd.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangadd.java
new file mode 100644
index 000000000..442729f16
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangadd.java
@@ -0,0 +1,30 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangadd extends EssentialsCommand
+{
+ public Commandmangadd()
+ {
+ super("mangadd");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String group = args[0];
+ String command = "/permissions g:" + group + " create";
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddi.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddi.java
new file mode 100644
index 000000000..f2eb55ee4
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddi.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangaddi extends EssentialsCommand
+{
+ public Commandmangaddi()
+ {
+ super("mangaddi");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String target = args[0];
+ final String group = args[1];
+ String command = "/permissions g:"+target+" parents add "+group;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddp.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddp.java
new file mode 100644
index 000000000..e57628c57
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddp.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangaddp extends EssentialsCommand
+{
+ public Commandmangaddp()
+ {
+ super("mangaddp");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String target = args[0];
+ final String perm = args[1];
+ String command = "/permissions g:"+target+" perms add "+perm;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangcheckp.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangcheckp.java
new file mode 100644
index 000000000..106dcd791
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangcheckp.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangcheckp extends EssentialsCommand
+{
+ public Commandmangcheckp()
+ {
+ super("mangcheckp");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String target = args[0];
+ final String perm = args[1];
+ String command = "/permissions g:"+target+" has "+perm;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdel.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdel.java
new file mode 100644
index 000000000..52fdc3da2
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdel.java
@@ -0,0 +1,30 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangdel extends EssentialsCommand
+{
+ public Commandmangdel()
+ {
+ super("mangdel");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String group = args[0];
+ String command = "/permissions g:"+group+" delete";
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdeli.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdeli.java
new file mode 100644
index 000000000..9b3bc3679
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdeli.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangdeli extends EssentialsCommand
+{
+ public Commandmangdeli()
+ {
+ super("mangdeli");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String target = args[0];
+ final String group = args[1];
+ String command = "/permissions g:"+target+" parents remove "+group;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdelp.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdelp.java
new file mode 100644
index 000000000..de4ce8a7e
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdelp.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangdelp extends EssentialsCommand
+{
+ public Commandmangdelp()
+ {
+ super("mangdelp");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String target = args[0];
+ final String perm = args[1];
+ String command = "/permissions g:"+target+" perms remove "+perm;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanglistp.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanglistp.java
new file mode 100644
index 000000000..2e775c147
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanglistp.java
@@ -0,0 +1,30 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanglistp extends EssentialsCommand
+{
+ public Commandmanglistp()
+ {
+ super("manglistp");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String target = args[0];
+ String command = "/permissions g:"+target+" perms list";
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanload.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanload.java
new file mode 100644
index 000000000..3e1803233
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanload.java
@@ -0,0 +1,30 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanload extends EssentialsCommand
+{
+ public Commandmanload()
+ {
+ super("manload");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ String world = "all";
+ if (args.length > 1)
+ {
+ world = args[0];
+ }
+ String command = "/permissions -reload "+world;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java
new file mode 100644
index 000000000..65a4df759
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java
@@ -0,0 +1,32 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanuadd extends EssentialsCommand
+{
+ public Commandmanuadd()
+ {
+ super("manuadd");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ final String group = args[1];
+ //TODO: Make this command add a player if it doesnt exist /permissions +player+ create
+ String command = "/permissions "+player+" parents add "+group;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddp.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddp.java
new file mode 100644
index 000000000..676631c63
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddp.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanuaddp extends EssentialsCommand
+{
+ public Commandmanuaddp()
+ {
+ super("manuaddp");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ final String perm = args[1];
+ String command = "/permissions "+player+" perms add "+perm;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddsub.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddsub.java
new file mode 100644
index 000000000..ee2cd3147
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddsub.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanuaddsub extends EssentialsCommand
+{
+ public Commandmanuaddsub()
+ {
+ super("manuaddsub");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ final String group = args[1];
+ String command = "/permissions "+player+" parents add "+group;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanucheckp.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanucheckp.java
new file mode 100644
index 000000000..df713fc31
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanucheckp.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanucheckp extends EssentialsCommand
+{
+ public Commandmanucheckp()
+ {
+ super("manucheckp");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ final String perm = args[1];
+ String command = "/permissions "+player+" has "+perm;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudel.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudel.java
new file mode 100644
index 000000000..9e117ac21
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudel.java
@@ -0,0 +1,30 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanudel extends EssentialsCommand
+{
+ public Commandmanudel()
+ {
+ super("manudel");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ String command = "/permissions "+player+" delete";
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelp.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelp.java
new file mode 100644
index 000000000..4a35f628b
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelp.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanudelp extends EssentialsCommand
+{
+ public Commandmanudelp()
+ {
+ super("manudelp");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ final String perm = args[1];
+ String command = "/permissions "+player+" perms remove "+perm;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelsub.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelsub.java
new file mode 100644
index 000000000..4640c68b1
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelsub.java
@@ -0,0 +1,31 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanudelsub extends EssentialsCommand
+{
+ public Commandmanudelsub()
+ {
+ super("manudelsub");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ final String group = args[1];
+ String command = "/permissions "+player+" parents remove "+group;
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanulistp.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanulistp.java
new file mode 100644
index 000000000..f5d4a484e
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanulistp.java
@@ -0,0 +1,30 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanulistp extends EssentialsCommand
+{
+ public Commandmanulistp()
+ {
+ super("manulistp");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ String command = "/permissions "+player+" perms list";
+ sender.sendMessage(commandLabel + " is deprecated. Use " + command + " instead.");
+ ess.getServer().dispatchCommand(sender, command);
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/EssentialsPermissionsCommands.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/EssentialsPermissionsCommands.java
new file mode 100644
index 000000000..e3c3f1dd6
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/EssentialsPermissionsCommands.java
@@ -0,0 +1,45 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.Essentials;
+import com.nijiko.permissions.PermissionHandler;
+import com.nijikokun.bukkit.Permissions.Permissions;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
+import org.bukkit.plugin.Plugin;
+import org.bukkit.plugin.PluginManager;
+import org.bukkit.plugin.java.JavaPlugin;
+
+
+public class EssentialsPermissionsCommands extends JavaPlugin
+{
+ private static PermissionHandler permissionHandler = null;
+
+ public static PermissionHandler getPermissionHandler()
+ {
+ return permissionHandler;
+ }
+
+ @Override
+ public void onEnable()
+ {
+ final PluginManager pluginManager = getServer().getPluginManager();
+ final Plugin permissionsPlugin = pluginManager.getPlugin("Permissions");
+
+ if (permissionsPlugin != null
+ && permissionsPlugin.getDescription().getVersion().charAt(0) == '3')
+ {
+ permissionHandler = ((Permissions)permissionsPlugin).getHandler();
+ }
+ }
+
+ @Override
+ public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args)
+ {
+ return Essentials.getStatic().onCommandEssentials(sender, command, label, args, EssentialsPermissionsCommands.class.getClassLoader(), "com.earth2me.essentials.permissions.Command");
+ }
+
+ @Override
+ public void onDisable()
+ {
+ }
+}
diff --git a/EssentialsPermissionsCommands/src/plugin.yml b/EssentialsPermissionsCommands/src/plugin.yml
new file mode 100644
index 000000000..a13023a5c
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/plugin.yml
@@ -0,0 +1,166 @@
+# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.)
+name: EssentialsPermissionsCommands
+main: com.earth2me.essentials.permissions.EssentialsPermissionsCommands
+# Note to developers: This next line cannot change, or the automatic versioning system will break.
+version: TeamCity
+website: http://www.earth2me.net:8001/
+description: Adds commands aliases to Permissions 3
+authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology]
+depend: [Permissions, Essentials]
+commands:
+ manuadd:
+ description: Move a player to desired group.(Adds to the file if not exists)
+ usage: /<command> <player> <group>
+ permission: groupmanager.manuadd
+ manudel:
+ description: Remove any user specific configuration. Make him default group.
+ usage: /<command> <player>
+ permission: groupmanager.manudel
+ manuaddsub:
+ description: Add a group to a player's subgroup list.
+ usage: /<command> <player> <group>
+ permission: groupmanager.manuaddsub
+ manudelsub:
+ description: Remove a group to a player's subgroup list.
+ usage: /<command> <player> <group>
+ permission: groupmanager.manudelsub
+ mangadd:
+ description: Add group to the system.
+ usage: /<command> <group>
+ permission: groupmanager.mangadd
+ mangdel:
+ description: Removes group from the system(all it's users become default)
+ usage: /<command> <group>
+ permission: groupmanager.mangdel
+ manuaddp:
+ description: Add permission diretly to the player.
+ usage: /<command> <player> <permission>
+ permission: groupmanager.manuaddp
+ manudelp:
+ description: Removes permission diretly from the player.
+ usage: /<command> <player> <permission>
+ permission: groupmanager.manudelp
+ manulistp:
+ description: List all permissions from a player.
+ usage: /<command> <player>
+ permission: groupmanager.manulistp
+ manucheckp:
+ description: Verify if user has a permission, and where it comes from.
+ usage: /<command> <player> <permission>
+ permission: groupmanager.manucheckp
+ mangaddp:
+ description: Add permission to a group.
+ usage: /<command> <group> <permission>
+ permission: groupmanager.mangaddp
+ mangdelp:
+ description: Removes permission from a group.
+ usage: /<command> <group> <permission>
+ permission: groupmanager.mangdelp
+ manglistp:
+ description: Lists all permissions from a group.
+ usage: /<command> <group>
+ permission: groupmanager.manglistp
+ mangcheckp:
+ description: Check if group has a permission, and where it comes from.
+ usage: /<command> <group> <permission>
+ permission: groupmanager.mangcheckp
+ mangaddi:
+ description: Add a group to another group inheritance list.
+ usage: /<command> <group1> <group2>
+ permission: groupmanager.mangaddi
+ mangdeli:
+ description: Remove a group from another group inheritance list.
+ usage: /<command> <group1> <group2>
+ permission: groupmanager.mangdeli
+ manuaddv:
+ description: Add, or replaces, a variable to a user (like prefix or suffix).
+ usage: /<command> <user> <variable> <value>
+ permission: groupmanager.manuaddv
+ manudelv:
+ description: Remove a variable from a user.
+ usage: /<command> <user> <variable>
+ permission: groupmanager.manudelv
+ manulistv:
+ description: List variables a user has (like prefix or suffix).
+ usage: /<command> <user>
+ permission: groupmanager.manulistv
+ manucheckv:
+ description: Verify a value of a variable of user, and where it comes from.
+ usage: /<command> <user> <variable>
+ permission: groupmanager.manucheckv
+ mangaddv:
+ description: Add, or replaces, a variable to a group (like prefix or suffix).
+ usage: /<command> <group> <variable> <value>
+ permission: groupmanager.mangaddv
+ mangdelv:
+ description: Remove a variable from a group.
+ usage: /<command> <group> <variable>
+ permission: groupmanager.mangdelv
+ manglistv:
+ description: List variables a group has (like prefix or suffix).
+ usage: /<command> <group>
+ permission: groupmanager.manglistv
+ mangcheckv:
+ description: Verify a value of a variable of group, and where it comes from.
+ usage: /<command> <group> <variable>
+ permission: groupmanager.mangcheckv
+ manwhois:
+ description: Tell the group that user belongs.
+ usage: /<command> <player>
+ permission: groupmanager.manwhois
+ tempadd:
+ description: Creates a temporary permission copy for that user.
+ usage: /<command> <player>
+ permission: groupmanager.tempadd
+ tempdel:
+ description: Remove the temporary permission copy for player.
+ usage: /<command> <player>
+ permission: groupmanager.tempdel
+ templist:
+ description: List players in overload-permissions mode made by /tempadd.
+ usage: /<command>
+ permission: groupmanager.templist
+ tempdelall:
+ description: Remove all overrides made by command /tempadd.
+ usage: /<command>
+ permission: groupmanager.tempdelall
+ mansave:
+ description: Save all permissions on file.
+ usage: /<command>
+ permission: groupmanager.mansave
+ manload:
+ description: Reload current world and config.yml. Or load given world.
+ usage: /<command> [world]
+ permission: groupmanager.manload
+ listgroups:
+ description: List the groups available.
+ usage: /<command>
+ permission: groupmanager.listgroups
+ manpromote:
+ description: Promote a player in the same heritage line to a higher rank.
+ usage: /<command> <player> <group>
+ permission: groupmanager.manpromote
+ mandemote:
+ description: Demote a player in the same heritage line to a lower rank.
+ usage: /<command> <player> <group>
+ permission: groupmanager.mandemote
+ mantogglevalidate:
+ description: Toggle on/off the validating if player is online.
+ usage: /<command>
+ permission: groupmanager.mantogglevalidate
+ mantogglesave:
+ description: Toggle on/ff the autosave.
+ usage: /<command>
+ permission: groupmanager.mantogglesave
+ manworld:
+ description: Prints the selected world name
+ usage: /<command>
+ permission: groupmanager.manworld
+ manselect:
+ description: Select a world to work with next commands.
+ usage: /<command> <world>
+ permission: groupmanager.manselect
+ manclear:
+ description: Clear world selection. Next commands will work on your world.
+ usage: /<command>
+ permission: groupmanager.manclear
diff --git a/EssentialsProtect/build.xml b/EssentialsProtect/build.xml
index f3ea6c2d0..a09cc7333 100644
--- a/EssentialsProtect/build.xml
+++ b/EssentialsProtect/build.xml
@@ -72,15 +72,13 @@
nbproject/build-impl.xml file.
-->
-
- <!--target name="-post-jar">
- <jar jarfile="${dist.dir}/EssentialsProtect.jar">
- <zipfileset src="${dist.jar}" excludes="META-INF/*" />
- <zipfileset src="../lib/mysql.jar" excludes="META-INF/*" />
- <zipfileset src="../lib/sqlite.jar" excludes="META-INF/*" />
- <manifest>
- <attribute name="Classpath" value="Essentials.jar"/>
- </manifest>
- </jar>
- </target-->
+ <target name="-post-jar">
+ <jar jarfile="${dist.dir}/EssentialsProtect.jar">
+ <zipfileset src="${dist.jar}" excludes="META-INF/*" />
+ <zipfileset src="../lib/c3p0-0.9.1.2.jar" excludes="META-INF/*" />
+ <manifest>
+ <attribute name="Classpath" value="EssentialsProtect.jar"/>
+ </manifest>
+ </jar>
+ </target>
</project>
diff --git a/EssentialsProtect/nbproject/project.properties b/EssentialsProtect/nbproject/project.properties
index 8d0c349b8..e5b38df2f 100644
--- a/EssentialsProtect/nbproject/project.properties
+++ b/EssentialsProtect/nbproject/project.properties
@@ -1,87 +1,87 @@
-annotation.processing.enabled=true
-annotation.processing.enabled.in.editor=false
-annotation.processing.run.all.processors=true
-annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
-application.title=EssentialsProtect
-application.vendor=devhome
-build.classes.dir=${build.dir}/classes
-build.classes.excludes=**/*.java,**/*.form
-# This directory is removed when the project is cleaned:
-build.dir=build
-build.generated.dir=${build.dir}/generated
-build.generated.sources.dir=${build.dir}/generated-sources
-# Only compile against the classpath explicitly listed here:
-build.sysclasspath=ignore
-build.test.classes.dir=${build.dir}/test/classes
-build.test.results.dir=${build.dir}/test/results
-# Uncomment to specify the preferred debugger connection transport:
-#debug.transport=dt_socket
-debug.classpath=\
- ${run.classpath}
-debug.test.classpath=\
- ${run.test.classpath}
-# This directory is removed when the project is cleaned:
-dist.dir=dist
-dist.jar=${dist.dir}/EssentialsProtect.jar
-dist.javadoc.dir=${dist.dir}/javadoc
-endorsed.classpath=
-excludes=
-file.reference.c3p0-0.9.1.2.jar=..\\lib\\c3p0-0.9.1.2.jar
-file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar
-includes=**
-jar.archive.disabled=${jnlp.enabled}
-jar.compress=false
-jar.index=${jnlp.enabled}
-javac.classpath=\
- ${reference.Essentials.jar}:\
- ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\
- ${file.reference.c3p0-0.9.1.2.jar}
-# Space-separated list of extra javac options
-javac.compilerargs=
-javac.deprecation=false
-javac.processorpath=\
- ${javac.classpath}
-javac.source=1.5
-javac.target=1.5
-javac.test.classpath=\
- ${javac.classpath}:\
- ${build.classes.dir}:\
- ${libs.junit.classpath}:\
- ${libs.junit_4.classpath}
-javac.test.processorpath=\
- ${javac.test.classpath}
-javadoc.additionalparam=
-javadoc.author=false
-javadoc.encoding=${source.encoding}
-javadoc.noindex=false
-javadoc.nonavbar=false
-javadoc.notree=false
-javadoc.private=false
-javadoc.splitindex=true
-javadoc.use=true
-javadoc.version=false
-javadoc.windowtitle=
-jnlp.codebase.type=no.codebase
-jnlp.descriptor=application
-jnlp.enabled=false
-jnlp.mixed.code=defaut
-jnlp.offline-allowed=false
-jnlp.signed=false
-manifest.file=manifest.mf
-meta.inf.dir=${src.dir}/META-INF
-platform.active=default_platform
-project.Essentials=../Essentials
-reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
-run.classpath=\
- ${javac.classpath}:\
- ${build.classes.dir}
-# Space-separated list of JVM arguments used when running the project
-# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
-# or test-sys-prop.name=value to set system properties for unit tests):
-run.jvmargs=
-run.test.classpath=\
- ${javac.test.classpath}:\
- ${build.test.classes.dir}
-source.encoding=UTF-8
-src.dir=src
-test.src.dir=test
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=EssentialsProtect
+application.vendor=devhome
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/original-EssentialsProtect.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
+excludes=
+file.reference.c3p0-0.9.1.2.jar=..\\lib\\c3p0-0.9.1.2.jar
+file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar
+includes=**
+jar.archive.disabled=${jnlp.enabled}
+jar.compress=false
+jar.index=${jnlp.enabled}
+javac.classpath=\
+ ${reference.Essentials.jar}:\
+ ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\
+ ${file.reference.c3p0-0.9.1.2.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}:\
+ ${libs.junit_4.classpath}
+javac.test.processorpath=\
+ ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+jnlp.codebase.type=no.codebase
+jnlp.descriptor=application
+jnlp.enabled=false
+jnlp.mixed.code=defaut
+jnlp.offline-allowed=false
+jnlp.signed=false
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+platform.active=default_platform
+project.Essentials=../Essentials
+reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+source.encoding=UTF-8
+src.dir=src
+test.src.dir=test
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
index b35a1346b..afa98b568 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
@@ -2,8 +2,15 @@ package com.earth2me.essentials.protect;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.IConf;
+import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import com.earth2me.essentials.protect.data.IProtectedBlock;
+import com.earth2me.essentials.protect.data.ProtectedBlockMemory;
+import com.earth2me.essentials.protect.data.ProtectedBlockMySQL;
+import com.earth2me.essentials.protect.data.ProtectedBlockSQLite;
+import java.beans.PropertyVetoException;
+import java.util.EnumMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
@@ -16,119 +23,148 @@ import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
-public class EssentialsProtect extends JavaPlugin implements IConf
+public class EssentialsProtect extends JavaPlugin implements IConf, IProtect
{
- private EssentialsProtectBlockListener blockListener = null;
- private EssentialsProtectPlayerListener playerListener = null;
- private EssentialsProtectEntityListener entityListener = null;
- private EssentialsProtectWeatherListener weatherListener = null;
- private EssentialsProtectServerListener serverListener = null;
- public static final String AUTHORS = Essentials.AUTHORS;
- private static final Logger logger = Logger.getLogger("Minecraft");
- public static Map<String, Boolean> genSettings = null;
- public static Map<String, String> dataSettings = null;
- public static Map<String, Boolean> guardSettings = null;
- public static Map<String, Boolean> playerSettings = null;
- public static List<Integer> usageList = null;
- public static List<Integer> blackListPlace = null;
- public static List<Integer> breakBlackList = null;
- public static List<Integer> onPlaceAlert = null;
- public static List<Integer> onUseAlert = null;
- public static List<Integer> onBreakAlert = null;
-
- public EssentialsProtect()
- {
- }
+ private static final Logger LOGGER = Logger.getLogger("Minecraft");
+
+ private final transient Map<ProtectConfig, Boolean> settingsBoolean = new EnumMap<ProtectConfig, Boolean>(ProtectConfig.class);
+ private final transient Map<ProtectConfig, String> settingsString = new EnumMap<ProtectConfig, String>(ProtectConfig.class);
+ private final transient Map<ProtectConfig, List<Integer>> settingsList = new EnumMap<ProtectConfig, List<Integer>>(ProtectConfig.class);
+ private transient IProtectedBlock storage = null;
+ public transient IEssentials ess = null;
public void onEnable()
{
- PluginManager pm = this.getServer().getPluginManager();
-
- playerListener = new EssentialsProtectPlayerListener(this);
- blockListener = new EssentialsProtectBlockListener(this);
- entityListener = new EssentialsProtectEntityListener(this);
- weatherListener = new EssentialsProtectWeatherListener(this);
- serverListener = new EssentialsProtectServerListener(this);
-
+ ess = Essentials.getStatic();
+ final PluginManager pm = this.getServer().getPluginManager();
+
+ final EssentialsProtectPlayerListener playerListener = new EssentialsProtectPlayerListener(this);
pm.registerEvent(Type.PLAYER_INTERACT, playerListener, Priority.Low, this);
-
- //blocklistener
+
+ final EssentialsProtectBlockListener blockListener = new EssentialsProtectBlockListener(this);
pm.registerEvent(Type.BLOCK_PLACE, blockListener, Priority.Highest, this);
pm.registerEvent(Type.BLOCK_FROMTO, blockListener, Priority.Highest, this);
pm.registerEvent(Type.BLOCK_IGNITE, blockListener, Priority.Highest, this);
pm.registerEvent(Type.BLOCK_BURN, blockListener, Priority.Highest, this);
pm.registerEvent(Type.BLOCK_BREAK, blockListener, Priority.Highest, this);
-
- //entitylistener
+
+ final EssentialsProtectEntityListener entityListener = new EssentialsProtectEntityListener(this);
pm.registerEvent(Type.ENTITY_EXPLODE, entityListener, Priority.Highest, this);
pm.registerEvent(Type.ENTITY_DAMAGE, entityListener, Priority.Highest, this);
- pm.registerEvent(Type.ENTITY_TARGET, entityListener, Priority.Highest, this);
pm.registerEvent(Type.CREATURE_SPAWN, entityListener, Priority.Highest, this);
+ pm.registerEvent(Type.ENTITY_TARGET, entityListener, Priority.Highest, this);
- //weatherlistener
- pm.registerEvent(Type.WEATHER_CHANGE, weatherListener, Priority.Highest, this);
- pm.registerEvent(Type.THUNDER_CHANGE, weatherListener, Priority.Highest, this);
+ final EssentialsProtectWeatherListener weatherListener = new EssentialsProtectWeatherListener(this);
pm.registerEvent(Type.LIGHTNING_STRIKE, weatherListener, Priority.Highest, this);
-
- //serverlistener
- pm.registerEvent(Type.PLUGIN_ENABLE, serverListener, Priority.Highest, this);
-
+ pm.registerEvent(Type.THUNDER_CHANGE, weatherListener, Priority.Highest, this);
+ pm.registerEvent(Type.WEATHER_CHANGE, weatherListener, Priority.Highest, this);
+
reloadConfig();
- Essentials.getStatic().addReloadListener(this);
- if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion())) {
- logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ ess.addReloadListener(this);
+ if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
+ {
+ LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
}
- logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
+ LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
}
- public static boolean checkProtectionItems(List<Integer> itemList, int id)
+ @Override
+ public boolean checkProtectionItems(final ProtectConfig list, final int id)
{
- return !itemList.isEmpty() && itemList.contains(id);
+ final List<Integer> itemList = settingsList.get(list);
+ return itemList != null && !itemList.isEmpty() && itemList.contains(id);
}
@Override
- public void onDisable()
+ public void alert(final User user, final String item, final String type)
{
- genSettings.clear();
- dataSettings.clear();
-
- blockListener = null;
- playerListener = null;
- entityListener = null;
- genSettings = null;
- dataSettings = null;
- guardSettings = null;
- playerSettings = null;
- usageList = null;
- blackListPlace = null;
- onPlaceAlert = null;
- onUseAlert = null;
- onBreakAlert = null;
+ final Location loc = user.getLocation();
+ for (Player p : this.getServer().getOnlinePlayers())
+ {
+ final User alertUser = ess.getUser(p);
+ if (alertUser.isAuthorized("essentials.protect.alerts"))
+ {
+ alertUser.sendMessage(Util.format("alertFormat", user.getName(), type, item, formatCoords(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())));
+ }
+ }
}
- public void reloadConfig()
+ public static String formatCoords(final int x, final int y, final int z)
{
- dataSettings = Essentials.getStatic().getSettings().getEpDBSettings();
- genSettings = Essentials.getStatic().getSettings().getEpSettings();
- guardSettings = Essentials.getStatic().getSettings().getEpGuardSettings();
- usageList = Essentials.getStatic().getSettings().epBlackListUsage();
- blackListPlace = Essentials.getStatic().getSettings().epBlackListPlacement();
- breakBlackList = Essentials.getStatic().getSettings().epBlockBreakingBlacklist();
- onPlaceAlert = Essentials.getStatic().getSettings().getEpAlertOnPlacement();
- onUseAlert = Essentials.getStatic().getSettings().getEpAlertOnUse();
- onBreakAlert = Essentials.getStatic().getSettings().getEpAlertOnBreak();
- playerSettings = Essentials.getStatic().getSettings().getEpPlayerSettings();
- EssentialsProtectData.createSqlTable();
+ return x + "," + y + "," + z;
}
- public void alert(User user, String item, String type)
+ public void reloadConfig()
{
- Location loc = user.getLocation();
- for (Player p : this.getServer().getOnlinePlayers())
+ for (ProtectConfig protectConfig : ProtectConfig.values())
{
- User alertUser = Essentials.getStatic().getUser(p);
- if (alertUser.isAuthorized("essentials.protect.alerts"))
- alertUser.sendMessage(Util.format("alertFormat", user.getName(), type, item, EssentialsProtectData.formatCoords(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())));
+ if (protectConfig.isList()) {
+ settingsList.put(protectConfig, ess.getSettings().getProtectList(protectConfig.getConfigName()));
+ } else if (protectConfig.isString()) {
+ settingsString.put(protectConfig, ess.getSettings().getProtectString(protectConfig.getConfigName()));
+ } else {
+ settingsBoolean.put(protectConfig, ess.getSettings().getProtectBoolean(protectConfig.getConfigName(), protectConfig.getDefaultValueBoolean()));
+ }
+
}
+
+ if (getSettingString(ProtectConfig.datatype).equalsIgnoreCase("mysql"))
+ {
+ try
+ {
+ storage = new ProtectedBlockMySQL(
+ getSettingString(ProtectConfig.mysqlDB),
+ getSettingString(ProtectConfig.dbUsername),
+ getSettingString(ProtectConfig.dbPassword));
+ }
+ catch (PropertyVetoException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ else
+ {
+ try
+ {
+ storage = new ProtectedBlockSQLite("jdbc:sqlite:plugins/Essentials/EssentialsProtect.db");
+ }
+ catch (PropertyVetoException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (getSettingBool(ProtectConfig.memstore))
+ {
+ storage = new ProtectedBlockMemory(storage, this);
+ }
+ }
+
+ @Override
+ public IProtectedBlock getStorage()
+ {
+ return storage;
+ }
+
+ @Override
+ public boolean getSettingBool(final ProtectConfig protectConfig)
+ {
+ final Boolean bool = settingsBoolean.get(protectConfig);
+ return bool == null ? protectConfig.getDefaultValueBoolean() : bool;
+ }
+
+ @Override
+ public String getSettingString(final ProtectConfig protectConfig)
+ {
+ final String str = settingsString.get(protectConfig);
+ return str == null ? protectConfig.getDefaultValueString() : str;
+ }
+
+ public void onDisable()
+ {
+ }
+
+ public IEssentials getEssentials()
+ {
+ return ess;
}
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
index b32ac95a1..8bc26f67e 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
@@ -1,8 +1,11 @@
package com.earth2me.essentials.protect;
-import com.earth2me.essentials.Essentials;
+import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
+import com.earth2me.essentials.protect.data.IProtectedBlock;
+import java.util.ArrayList;
+import java.util.List;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
@@ -12,269 +15,300 @@ import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.block.BlockListener;
import org.bukkit.event.block.BlockPlaceEvent;
-import org.bukkit.inventory.ItemStack;
public class EssentialsProtectBlockListener extends BlockListener
{
- private EssentialsProtect parent;
- private int railBlockX;
- private int railBlockY;
- private int railBlockZ;
- private EssentialsProtectData spData;
+ final private transient IProtect prot;
+ final private transient IEssentials ess;
- public EssentialsProtectBlockListener(EssentialsProtect parent)
+ public EssentialsProtectBlockListener(final IProtect parent)
{
- this.parent = parent;
- }
-
- private void initialize()
- {
- if (spData != null) return;
- spData = new EssentialsProtectData();
+ this.prot = parent;
+ this.ess = prot.getEssentials();
}
@Override
- public void onBlockPlace(BlockPlaceEvent event)
+ public void onBlockPlace(final BlockPlaceEvent event)
{
- if (event.isCancelled()) return;
- initialize();
- ItemStack item = event.getItemInHand();
- User user = Essentials.getStatic().getUser(event.getPlayer());
+ if (event.isCancelled())
+ {
+ return;
+ }
+
+ final User user = ess.getUser(event.getPlayer());
- if (EssentialsProtect.playerSettings.get("protect.disable.build") && !user.canBuild())
+ if (prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild())
{
- if(Essentials.getStatic().getSettings().warnOnBuildDisallow())
- {
- user.sendMessage(Util.i18n("buildAlert"));
- }
event.setCancelled(true);
return;
}
- Block blockPlaced = event.getBlockPlaced();
- int id = event.getBlockPlaced().getTypeId();
+ final Block blockPlaced = event.getBlockPlaced();
+ final int id = blockPlaced.getTypeId();
- if (EssentialsProtect.checkProtectionItems(EssentialsProtect.blackListPlace, id) && !user.isAuthorized("essentials.protect.exemptplacement"))
+ if (prot.checkProtectionItems(ProtectConfig.blacklist_placement, id) && !user.isAuthorized("essentials.protect.exemptplacement"))
{
event.setCancelled(true);
return;
}
- if (EssentialsProtect.checkProtectionItems(EssentialsProtect.onPlaceAlert, id))
+ if (prot.checkProtectionItems(ProtectConfig.alert_on_placement, id))
{
- parent.alert(user, item.getType().toString(), Util.i18n("alertPlaced"));
+ prot.alert(user, blockPlaced.getType().toString(), Util.i18n("alertPlaced"));
}
- if (spData.isBlockAboveProtectedRail(blockPlaced.getFace(BlockFace.DOWN)))
+ final Block below = blockPlaced.getFace(BlockFace.DOWN);
+ if (below.getType() == Material.RAILS
+ && prot.getSettingBool(ProtectConfig.prevent_block_on_rail)
+ && prot.getStorage().isProtected(below, user.getName()))
{
- if (EssentialsProtect.genSettings.get("protect.protect.prevent-block-on-rails"))
- {
- event.setCancelled(true);
- return;
- }
+ event.setCancelled(true);
+ return;
}
- if (blockPlaced.getType() == Material.RAILS)
+ final List<Block> protect = new ArrayList<Block>();
+ if (blockPlaced.getType() == Material.RAILS
+ && prot.getSettingBool(ProtectConfig.protect_rails)
+ && user.isAuthorized("essentials.protect"))
{
- if (EssentialsProtect.genSettings.get("protect.protect.rails"))
+ protect.add(blockPlaced);
+ if (prot.getSettingBool(ProtectConfig.protect_below_rails))
{
- if (user.isAuthorized("essentials.protect"))
- {
- railBlockX = blockPlaced.getX();
- railBlockY = blockPlaced.getY();
- railBlockZ = blockPlaced.getZ();
-
- spData.insertProtectionIntoDb(user.getWorld().getName(), user.getName(), railBlockX, railBlockY, railBlockZ);
- if (EssentialsProtect.genSettings.get("protect.protect.block-below"))
- {
- spData.insertProtectionIntoDb(user.getWorld().getName(), user.getName(), railBlockX, railBlockY - 1, railBlockZ);
- }
- }
+ protect.add(blockPlaced.getFace(BlockFace.DOWN));
}
}
- if (blockPlaced.getType() == Material.SIGN_POST || blockPlaced.getType() == Material.WALL_SIGN) {
- if (EssentialsProtect.genSettings.get("protect.protect.signs"))
+ if ((blockPlaced.getType() == Material.SIGN_POST || blockPlaced.getType() == Material.WALL_SIGN)
+ && prot.getSettingBool(ProtectConfig.protect_signs)
+ && user.isAuthorized("essentials.protect"))
+ {
+ protect.add(blockPlaced);
+ if (prot.getSettingBool(ProtectConfig.protect_against_signs))
{
- if (user.isAuthorized("essentials.protect"))
- {
- int signBlockX = blockPlaced.getX();
- int signBlockY = blockPlaced.getY();
- int signBlockZ = blockPlaced.getZ();
-
- initialize();
- spData.insertProtectionIntoDb(user.getWorld().getName(), user.getName(), signBlockX,
- signBlockY, signBlockZ);
-
- if (EssentialsProtect.genSettings.get("protect.protect.block-below"))
- {
- signBlockX = event.getBlockAgainst().getX();
- signBlockY = event.getBlockAgainst().getY();
- signBlockZ = event.getBlockAgainst().getZ();
- spData.insertProtectionIntoDb(user.getWorld().getName(), user.getName(), signBlockX,
- signBlockY, signBlockZ);
- }
- }
+ protect.add(event.getBlockAgainst());
}
}
+ for (Block block : protect)
+ {
+ prot.getStorage().protectBlock(block, user.getName());
+ }
}
@Override
public void onBlockIgnite(BlockIgniteEvent event)
{
Block block = event.getBlock();
- if (block.getType() == Material.RAILS && EssentialsProtect.genSettings.get("protect.protect.rails"))
+ if (block.getType() == Material.RAILS
+ && prot.getSettingBool(ProtectConfig.protect_rails))
{
event.setCancelled(true);
return;
}
- if ((block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST) && EssentialsProtect.genSettings.get("protect.protect.signs"))
+ if ((block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)
+ && prot.getSettingBool(ProtectConfig.protect_signs))
{
event.setCancelled(true);
return;
}
-
- if (event.getBlock().getType() == Material.OBSIDIAN ||
- event.getBlock().getFace(BlockFace.DOWN).getType() == Material.OBSIDIAN)
+ if (event.getBlock().getType() == Material.OBSIDIAN
+ || event.getBlock().getFace(BlockFace.DOWN).getType() == Material.OBSIDIAN)
{
- event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.portal-creation"));
+ event.setCancelled(prot.getSettingBool(ProtectConfig.prevent_portal_creation));
return;
}
-
- if ((event.getCause().equals(BlockIgniteEvent.IgniteCause.SPREAD)))
+
+ if (event.getCause().equals(BlockIgniteEvent.IgniteCause.SPREAD))
{
- event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.fire-spread"));
+ event.setCancelled(prot.getSettingBool(ProtectConfig.prevent_fire_spread));
return;
}
if (event.getCause().equals(BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL))
{
- event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.flint-fire"));
+ event.setCancelled(prot.getSettingBool(ProtectConfig.prevent_flint_fire));
return;
}
if (event.getCause().equals(BlockIgniteEvent.IgniteCause.LAVA))
{
- event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.lava-fire-spread"));
+ event.setCancelled(prot.getSettingBool(ProtectConfig.prevent_lava_fire_spread));
return;
}
-
if (event.getCause().equals(BlockIgniteEvent.IgniteCause.LIGHTNING))
{
- event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.lightning-fire-spread"));
+ event.setCancelled(prot.getSettingBool(ProtectConfig.prevent_lightning_fire_spread));
return;
}
}
@Override
- public void onBlockFromTo(BlockFromToEvent event)
+ public void onBlockFromTo(final BlockFromToEvent event)
{
- if (event.isCancelled()) return;
- Block block = event.getBlock();
- Block toBlock = event.getToBlock();
- if (toBlock.getType() == Material.RAILS && EssentialsProtect.genSettings.get("protect.protect.rails"))
+ if (event.isCancelled())
+ {
+ return;
+ }
+ final Block toBlock = event.getToBlock();
+ if (toBlock.getType() == Material.RAILS
+ && prot.getSettingBool(ProtectConfig.protect_rails))
{
event.setCancelled(true);
return;
}
- if ((toBlock.getType() == Material.WALL_SIGN || toBlock.getType() == Material.SIGN_POST) && EssentialsProtect.genSettings.get("protect.protect.signs"))
+ if ((toBlock.getType() == Material.WALL_SIGN || toBlock.getType() == Material.SIGN_POST)
+ && prot.getSettingBool(ProtectConfig.protect_signs))
{
event.setCancelled(true);
return;
}
+
+ final Block block = event.getBlock();
if (block.getType() == Material.WATER || block.getType() == Material.STATIONARY_WATER)
{
- event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.water-flow"));
+ event.setCancelled(prot.getSettingBool(ProtectConfig.prevent_water_flow));
return;
}
if (block.getType() == Material.LAVA || block.getType() == Material.STATIONARY_LAVA)
{
- event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.lava-flow"));
+ event.setCancelled(prot.getSettingBool(ProtectConfig.prevent_lava_flow));
return;
}
if (block.getType() == Material.AIR)
{
- event.setCancelled(EssentialsProtect.guardSettings.get("protect.prevent.water-bucket-flow"));
+ event.setCancelled(prot.getSettingBool(ProtectConfig.prevent_water_bucket_flow));
return;
}
}
@Override
- public void onBlockBurn(BlockBurnEvent event)
+ public void onBlockBurn(final BlockBurnEvent event)
{
- Block block = event.getBlock();
- if (block.getType() == Material.RAILS && EssentialsProtect.genSettings.get("protect.protect.rails"))
+ final Block block = event.getBlock();
+ if (block.getType() == Material.RAILS && prot.getSettingBool(ProtectConfig.protect_rails))
{
event.setCancelled(true);
return;
}
- if ((block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST) && EssentialsProtect.genSettings.get("protect.protect.signs"))
+ if ((block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)
+ && prot.getSettingBool(ProtectConfig.protect_signs))
{
event.setCancelled(true);
return;
}
- if (EssentialsProtect.guardSettings.get("protect.prevent.fire-spread"))
+ if (prot.getSettingBool(ProtectConfig.prevent_fire_spread))
{
event.setCancelled(true);
return;
}
}
+ private final static BlockFace[] faces = new BlockFace[]
+ {
+ BlockFace.NORTH,
+ BlockFace.EAST,
+ BlockFace.SOUTH,
+ BlockFace.WEST,
+ BlockFace.UP,
+ BlockFace.DOWN,
+ BlockFace.SELF
+ };
@Override
- public void onBlockBreak(BlockBreakEvent event)
+ public void onBlockBreak(final BlockBreakEvent event)
{
- if (event.isCancelled()) return;
- initialize();
- User user = Essentials.getStatic().getUser(event.getPlayer());
- Block block = event.getBlock();
- if (EssentialsProtect.playerSettings.get("protect.disable.build") && !user.canBuild())
+ if (event.isCancelled())
+ {
+ return;
+ }
+ final User user = ess.getUser(event.getPlayer());
+
+ if (prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild())
{
event.setCancelled(true);
return;
}
+ final Block block = event.getBlock();
+ final int typeId = block.getTypeId();
- if (EssentialsProtect.checkProtectionItems(EssentialsProtect.breakBlackList, block.getTypeId()) && !user.isAuthorized("essentials.protect.exemptbreak"))
+ if (prot.checkProtectionItems(ProtectConfig.blacklist_break, typeId)
+ && !user.isAuthorized("essentials.protect.exemptbreak"))
{
event.setCancelled(true);
return;
}
+ final Material type = block.getType();
- if (EssentialsProtect.checkProtectionItems(EssentialsProtect.onBreakAlert, block.getTypeId()))
+ if (prot.checkProtectionItems(ProtectConfig.alert_on_break, typeId))
{
- parent.alert(user, block.getType().toString(), Util.i18n("alertBroke"));
+ prot.alert(user, type.toString(), Util.i18n("alertBroke"));
}
+ final IProtectedBlock storage = prot.getStorage();
if (user.isAuthorized("essentials.protect.admin"))
{
- if (block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST || block.getType() == Material.RAILS)
+ if (type == Material.WALL_SIGN || type == Material.SIGN_POST || type == Material.RAILS)
{
- spData.removeProtectionFromDB(block, true);
+ storage.unprotectBlock(block);
+ if (type == Material.RAILS || type == Material.SIGN_POST)
+ {
+ final Block below = block.getFace(BlockFace.DOWN);
+ storage.unprotectBlock(below);
+ }
+ else
+ {
+ for (BlockFace blockFace : faces)
+ {
+ final Block against = block.getFace(blockFace);
+ storage.unprotectBlock(against);
+ }
+ }
}
else
{
- spData.removeProtectionFromDB(block);
+ for (BlockFace blockFace : faces)
+ {
+ final Block against = block.getFace(blockFace);
+ storage.unprotectBlock(against);
+ }
}
- return;
}
else
{
- boolean canDestroy = spData.canDestroy(user.getWorld().getName(), user.getName(), block);
- if (canDestroy)
+
+ final boolean isProtected = storage.isProtected(block, user.getName());
+ if (isProtected)
+ {
+ event.setCancelled(true);
+ }
+ else
{
- if (block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST || block.getType() == Material.RAILS)
+ if (type == Material.WALL_SIGN || type == Material.SIGN_POST || type == Material.RAILS)
{
- spData.removeProtectionFromDB(block, true);
+ storage.unprotectBlock(block);
+ if (type == Material.RAILS || type == Material.SIGN_POST)
+ {
+ final Block below = block.getFace(BlockFace.DOWN);
+ storage.unprotectBlock(below);
+ }
+ else
+ {
+ for (BlockFace blockFace : faces)
+ {
+ final Block against = block.getFace(blockFace);
+ storage.unprotectBlock(against);
+ }
+ }
}
else
{
- spData.removeProtectionFromDB(block);
+ for (BlockFace blockFace : faces)
+ {
+ final Block against = block.getFace(blockFace);
+ storage.unprotectBlock(against);
+ }
}
- return;
}
- event.setCancelled(true);
- return;
}
}
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectData.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectData.java
deleted file mode 100644
index 76b36d810..000000000
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectData.java
+++ /dev/null
@@ -1,533 +0,0 @@
-package com.earth2me.essentials.protect;
-
-import com.earth2me.essentials.Essentials;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.bukkit.block.Block;
-
-
-public class EssentialsProtectData
-{
- private static final Logger logger = Logger.getLogger("Minecraft");
- private static final String mysqlDriver = "com.mysql.jdbc.Driver";
- private static String mysqlUsername;
- private static String mysqlPassword;
- private static String mysqlDatabase;
- private static String dataType;
- private static final String sqlite = "jdbc:sqlite:plugins/Essentials/EssentialsProtect.db";
- private static final String mysqlTable;
- private static final String sqliteTable;
- private static final String insertQuery;
- private static final String countByLocationQuery;
- private static final String countByPlayerLocationQuery;
- private static final String playerByLocationQuery;
- private static final String deleteByLocationQuery;
-
- static
- {
- mysqlTable = EssentialsProtectSqlProperties.EssentialsProtect;
- sqliteTable = EssentialsProtectSqlProperties.EssentialsProtect_sqlite;
- insertQuery = EssentialsProtectSqlProperties.Insert;
- countByLocationQuery = EssentialsProtectSqlProperties.CountByLocation;
- countByPlayerLocationQuery = EssentialsProtectSqlProperties.CountByPLayerLocation;
- playerByLocationQuery = EssentialsProtectSqlProperties.PlayerByLocation;
- deleteByLocationQuery = EssentialsProtectSqlProperties.DeleteByLocation;
- mysqlUsername = EssentialsProtect.dataSettings.get("protect.username");
- mysqlPassword = EssentialsProtect.dataSettings.get("protect.password");
- mysqlDatabase = EssentialsProtect.dataSettings.get("protect.mysqlDb");
- dataType = EssentialsProtect.dataSettings.get("protect.datatype");
- }
-
- public EssentialsProtectData()
- {
- }
-
- public static String formatCoords(int x, int y, int z)
- {
- return x + "," + y + "," + z;
- }
-
- public void insertProtectionIntoDb(String worldname, String playerName, int x, int y, int z)
- {
- Connection conn = null;
- PreparedStatement ps = null;
- ResultSet rs = null;
- try
- {
- if (dataType.contentEquals("mysql"))
- {
- Class.forName(mysqlDriver);
- conn = DriverManager.getConnection(mysqlDatabase, mysqlUsername, mysqlPassword);
- }
- else
- {
- Class.forName("org.sqlite.JDBC");
- conn = DriverManager.getConnection(sqlite);
- }
- ps = conn.prepareStatement(insertQuery);
- ps.setString(1, worldname);
- ps.setString(2, playerName);
- ps.setInt(3, x);
- ps.setInt(4, y);
- ps.setInt(5, z);
- ps.executeUpdate();
-
- }
- catch (SQLException ex)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Unable to add protection into SQL", ex);
- }
- catch (ClassNotFoundException e)
- {
- // TODO Auto-generated catch block
- logger.log(Level.SEVERE, "[EssentialsProtect] Class not found", e);
- }
- finally
- {
- try
- {
- if (ps != null)
- {
- ps.close();
- }
- if (rs != null)
- {
- rs.close();
- }
- if (conn != null)
- {
- conn.close();
- }
- }
- catch (SQLException ex)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Could not close connection to SQL", ex);
- }
- }
- }
-
- public boolean canDestroy(String worldName, String playerName, Block block)
- {
- int x = block.getX();
- int y = block.getY();
- int z = block.getZ();
-
- int rowCount = 0;
- Connection conn = null;
- PreparedStatement ps = null;
- ResultSet rs = null;
- try
- {
- if (dataType.contentEquals("mysql"))
- {
- Class.forName(mysqlDriver);
- conn = DriverManager.getConnection(mysqlDatabase, mysqlUsername, mysqlPassword);
- }
- else
- {
- Class.forName("org.sqlite.JDBC");
- conn = DriverManager.getConnection(sqlite);
- }
- conn.setAutoCommit(false);
- ps = conn.prepareStatement(countByLocationQuery);
- ps.setString(1, worldName);
- ps.setInt(2, x);
- ps.setInt(3, y);
- ps.setInt(4, z);
- rs = ps.executeQuery();
- rs.next();
- rowCount = rs.getInt(1);
- rs.close();
- ps.close();
-
- if (rowCount == 0)
- {
- return true;
- }
- else
- {
- ps = conn.prepareStatement(countByPlayerLocationQuery);
- ps.setString(1, worldName);
- ps.setString(2, playerName);
- ps.setInt(3, x);
- ps.setInt(4, y);
- ps.setInt(5, z);
- rs = ps.executeQuery();
- rs.next();
- rowCount = rs.getInt(1);
-
- if (rowCount == 0)
- {
- return false;
- }
-
- }
-
- }
- catch (SQLException ex)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Unable to query Protection", ex);
- }
- catch (Throwable e)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Unable to query Protection", e);
- }
- finally
- {
- try
- {
- if (ps != null)
- {
- ps.close();
- }
- if (rs != null)
- {
- rs.close();
- }
- if (conn != null)
- {
- conn.close();
- }
- }
- catch (SQLException ex)
- {
- logger.log(Level.SEVERE, "[EssentialsProtection] Could not close connection to SQL", ex);
- }
- }
- return true;
- }
-
- @SuppressWarnings("CallToThreadDumpStack")
- public static void createSqlTable()
- {
- Connection conn = null;
- Statement st = null;
-
- try
- {
- if (dataType.contentEquals("mysql"))
- {
- Class.forName(mysqlDriver);
- conn = DriverManager.getConnection(mysqlDatabase, mysqlUsername, mysqlPassword);
- }
- else
- {
- Class.forName("org.sqlite.JDBC");
- conn = DriverManager.getConnection(sqlite);
- }
-
- st = conn.createStatement();
- st.executeUpdate(dataType.contentEquals("mysql") ? mysqlTable : sqliteTable);
- }
- catch (SQLException s)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Could not create table for " + dataType, s);
-
- }
- catch (ClassNotFoundException ex)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Could not find driver for " + dataType, ex);
-
- }
- catch (Throwable e)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Unexpected error occured whilst creating table ", e);
- }
- finally
- {
- try
- {
- if (conn != null && !conn.isClosed())
- {
- try
- {
- conn.close();
- }
- catch (SQLException e)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Unexpected error occured whilst closing the connection", e);
- }
- }
- }
- catch (SQLException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-
- public String getBlockOwner(String worldName, String playerName, Block block)
- {
- String returnPlayerName = null;
- int x = block.getX();
- int y = block.getY();
- int z = block.getZ();
-
- Connection conn = null;
- PreparedStatement ps = null;
- ResultSet rs = null;
- try
- {
- if (dataType.contentEquals("mysql"))
- {
- Class.forName(mysqlDriver);
- conn = DriverManager.getConnection(mysqlDatabase, mysqlUsername, mysqlPassword);
- }
- else
- {
- Class.forName("org.sqlite.JDBC");
- conn = DriverManager.getConnection(sqlite);
- }
- conn.setAutoCommit(false);
- ps = conn.prepareStatement(playerByLocationQuery);
-
- ps.setString(1, worldName);
- ps.setInt(2, x);
- ps.setInt(3, y);
- ps.setInt(4, z);
- rs = ps.executeQuery();
- while (rs.next())
- {
- returnPlayerName = rs.getString("playerName");
- }
- rs.close();
- ps.close();
-
- }
- catch (SQLException ex)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Unable to query EssentialsProtection", ex);
- }
- catch (Throwable e)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Unable to query EssentialsProtection", e);
- }
- finally
- {
- try
- {
- if (ps != null)
- {
- ps.close();
- }
- if (rs != null)
- {
- rs.close();
- }
- if (conn != null)
- {
- conn.close();
- }
- }
- catch (SQLException ex)
- {
- logger.log(Level.SEVERE, "[EssentialsProtection] Could not close connection to SQL", ex);
- }
-
- }
- return returnPlayerName;
- }
-
-
- public void removeProtectionFromDB(Block block)
- {
- try
- {
- Connection conn = null;
- if (dataType.contentEquals("mysql"))
- {
- Class.forName(mysqlDriver);
- conn = DriverManager.getConnection(mysqlDatabase, mysqlUsername,
- mysqlPassword);
- }
- else
- {
- Class.forName("org.sqlite.JDBC");
- conn = DriverManager.getConnection(sqlite);
- }
- PreparedStatement ps = null;
- try
- {
- ps = conn.prepareStatement(deleteByLocationQuery);
- ps.setString(1, block.getWorld().getName());
- ps.setInt(2, block.getX());
- ps.setInt(3, block.getY());
- ps.setInt(4, block.getZ());
- ps.executeUpdate();
-
- }
- catch (SQLException ex)
- {
- logger.log(Level.WARNING,
- "[EssentialsProtect] Could not delete block data from database",
- ex);
- }
- finally
- {
- if (conn != null && !conn.isClosed())
- {
- conn.close();
- }
- if (ps != null)
- {
- ps.close();
- }
- }
-
- }
- catch (Throwable e)
- {
- logger.log(Level.SEVERE, " [EssentialsProtect] Exception occured whilst trying to delete data from sql", e);
- }
-
- }
-
- public void removeProtectionFromDB(Block block, boolean removeBelow)
- {
- try
- {
- Connection conn = null;
- if (dataType.contentEquals("mysql"))
- {
- Class.forName(mysqlDriver);
- conn = DriverManager.getConnection(mysqlDatabase, mysqlUsername, mysqlPassword);
- }
- else
- {
- Class.forName("org.sqlite.JDBC");
- conn = DriverManager.getConnection(sqlite);
- }
- PreparedStatement ps = null;
- try
- {
- ps = conn.prepareStatement(deleteByLocationQuery);
- ps.setString(1, block.getWorld().getName());
- ps.setInt(2, block.getX());
- ps.setInt(3, block.getY());
- ps.setInt(4, block.getZ());
- ps.executeUpdate();
- if (removeBelow)
- {
- ps = conn.prepareStatement(deleteByLocationQuery);
- ps.setString(1, block.getWorld().getName());
- ps.setInt(2, block.getX());
- ps.setInt(3, block.getY() - 1);
- ps.setInt(4, block.getZ());
- ps.executeUpdate();
- }
-
- }
- catch (SQLException ex)
- {
- logger.log(Level.WARNING, "[EssentialsProtect] Could not delete block data from database", ex);
- }
- finally
- {
- if (conn != null && !conn.isClosed())
- {
- conn.close();
- }
- if (ps != null)
- {
- ps.close();
- }
- }
-
- }
- catch (Throwable e)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Exception occured whilst trying to delete data from sql", e);
- }
-
- }
-
- public boolean isBlockAboveProtectedRail(Block block)
- {
- Connection conn = null;
- PreparedStatement ps = null;
- ResultSet rs = null;
- if (block.getTypeId() == 66)
- {
- try
- {
- if (dataType.contentEquals("mysql"))
- {
- Class.forName(mysqlDriver);
- conn = DriverManager.getConnection(mysqlDatabase, mysqlUsername, mysqlPassword);
- }
- else
- {
- Class.forName("org.sqlite.JDBC");
- conn = DriverManager.getConnection(sqlite);
- }
- int rowCount = 0;
- conn.setAutoCommit(false);
- ps = conn.prepareStatement(countByLocationQuery);
- ps.setString(1, block.getWorld().getName());
- ps.setInt(2, block.getX());
- ps.setInt(3, block.getY());
- ps.setInt(4, block.getZ());
- rs = ps.executeQuery();
- rs.next();
- rowCount = rs.getInt(1);
- rs.close();
- ps.close();
-
- if (rowCount == 0)
- {
-
- return false;
- }
- else
- {
- return true;
- }
- }
- catch (SQLException s)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Could not query protection", s);
-
- }
- catch (ClassNotFoundException ex)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Could not find driver for " + dataType, ex);
-
- }
- catch (Throwable e)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Unexpected error occured whilst creating table", e);
- }
- finally
- {
- try
- {
- if (conn != null && !conn.isClosed())
- {
- try
- {
- conn.close();
- }
- catch (SQLException e)
- {
- logger.log(Level.SEVERE, "[EssentialsProtect] Unexpected error occured whilst closing the connection", e);
- }
-
- }
- }
- catch (SQLException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- return false;
- }
-}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
index 89afc7cff..42a55c874 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
@@ -1,11 +1,10 @@
package com.earth2me.essentials.protect;
-import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.EssentialsBlockListener;
+import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import java.util.ArrayList;
import java.util.HashSet;
-import java.util.List;
+import java.util.Set;
import net.minecraft.server.ChunkPosition;
import net.minecraft.server.Packet60Explosion;
import org.bukkit.Location;
@@ -18,7 +17,6 @@ import org.bukkit.craftbukkit.entity.CraftPlayer;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
-import org.bukkit.entity.Monster;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntityDamageByBlockEvent;
@@ -34,11 +32,13 @@ import org.bukkit.event.entity.EntityTargetEvent.TargetReason;
public class EssentialsProtectEntityListener extends EntityListener
{
- private EssentialsProtect parent;
+ private final transient IProtect prot;
+ private final transient IEssentials ess;
- public EssentialsProtectEntityListener(EssentialsProtect parent)
+ public EssentialsProtectEntityListener(final IProtect prot)
{
- this.parent = parent;
+ this.prot = prot;
+ this.ess = prot.getEssentials();
}
@Override
@@ -48,30 +48,35 @@ public class EssentialsProtectEntityListener extends EntityListener
{
return;
}
+ final Entity target = event.getEntity();
+ final User user = ess.getUser(target);
if (event instanceof EntityDamageByBlockEvent)
{
- DamageCause cause = event.getCause();
+ final DamageCause cause = event.getCause();
- if (EssentialsProtect.playerSettings.get("protect.disable.contactdmg") && cause == DamageCause.CONTACT
- && !(event.getEntity() instanceof Player
- && Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.contact")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
+ if (prot.getSettingBool(ProtectConfig.disable_contactdmg)
+ && cause == DamageCause.CONTACT
+ && !(target instanceof Player
+ && user.isAuthorized("essentials.protect.damage.contact")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
event.setCancelled(true);
return;
}
- if (EssentialsProtect.playerSettings.get("protect.disable.lavadmg") && cause == DamageCause.LAVA
- && !(event.getEntity() instanceof Player
- && Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.lava")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
+ if (prot.getSettingBool(ProtectConfig.disable_lavadmg)
+ && cause == DamageCause.LAVA
+ && !(target instanceof Player
+ && user.isAuthorized("essentials.protect.damage.lava")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
event.setCancelled(true);
return;
}
- if (EssentialsProtect.guardSettings.get("protect.prevent.tnt-explosion") && cause == DamageCause.BLOCK_EXPLOSION
- && !(event.getEntity() instanceof Player
- && Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.tnt")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
+ if (prot.getSettingBool(ProtectConfig.prevent_tnt_explosion)
+ && cause == DamageCause.BLOCK_EXPLOSION
+ && !(target instanceof Player
+ && user.isAuthorized("essentials.protect.damage.tnt")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
event.setCancelled(true);
return;
@@ -80,97 +85,90 @@ public class EssentialsProtectEntityListener extends EntityListener
if (event instanceof EntityDamageByEntityEvent)
{
- EntityDamageByEntityEvent edEvent = (EntityDamageByEntityEvent)event;
- Entity eAttack = edEvent.getDamager();
- Entity eDefend = edEvent.getEntity();
+ final EntityDamageByEntityEvent edEvent = (EntityDamageByEntityEvent)event;
+ final Entity eAttack = edEvent.getDamager();
+ final User attacker = ess.getUser(eAttack);
// PVP Settings
- if (eDefend instanceof Player && eAttack instanceof Player)
+ if (target instanceof Player && eAttack instanceof Player
+ && prot.getSettingBool(ProtectConfig.disable_pvp)
+ && (!user.isAuthorized("essentials.protect.pvp") || !attacker.isAuthorized("essentials.protect.pvp")))
{
- if (EssentialsProtect.playerSettings.get("protect.disable.pvp"))
- {
- User defender = Essentials.getStatic().getUser(eDefend);
- User attacker = Essentials.getStatic().getUser(eAttack);
-
- if (!defender.isAuthorized("essentials.protect.pvp") || !attacker.isAuthorized("essentials.protect.pvp"))
- {
- event.setCancelled(true);
- return;
- }
- }
+ event.setCancelled(true);
+ return;
}
+
//Creeper explode prevention
- if (eAttack != null && eAttack instanceof Monster)
+ if (eAttack instanceof Creeper && prot.getSettingBool(ProtectConfig.prevent_creeper_explosion)
+ && !(target instanceof Player
+ && user.isAuthorized("essentials.protect.damage.creeper")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
- if (eAttack instanceof Creeper && EssentialsProtect.guardSettings.get("protect.prevent.creeper-explosion")
- && !(event.getEntity() instanceof Player
- && Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.creeper")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
- {
- event.setCancelled(true);
- return;
- }
-
- if (eAttack instanceof Creeper && EssentialsProtect.guardSettings.get("protect.prevent.creeper-playerdamage")
- && !(event.getEntity() instanceof Player
- && Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.creeper")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
- {
- event.setCancelled(true);
- return;
- }
+ event.setCancelled(true);
+ return;
}
- }
- if (event instanceof EntityDamageByProjectileEvent)
- {
- if (event.getEntity() instanceof Player
- && EssentialsProtect.playerSettings.get("protect.disable.projectiles")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.projectiles")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable"))
+ if (eAttack instanceof Creeper && prot.getSettingBool(ProtectConfig.prevent_creeper_playerdmg)
+ && !(target instanceof Player
+ && user.isAuthorized("essentials.protect.damage.creeper")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
event.setCancelled(true);
return;
}
}
- DamageCause cause = event.getCause();
- Entity casualty = event.getEntity();
- if (casualty instanceof Player)
+ if (event instanceof EntityDamageByProjectileEvent
+ && target instanceof Player
+ && prot.getSettingBool(ProtectConfig.disable_projectiles)
+ && !(user.isAuthorized("essentials.protect.damage.projectiles")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
- if (EssentialsProtect.playerSettings.get("protect.disable.fall") && cause == DamageCause.FALL
- && !(Essentials.getStatic().getUser(casualty).isAuthorized("essentials.protect.damage.fall")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
+ event.setCancelled(true);
+ return;
+ }
+
+ final DamageCause cause = event.getCause();
+ if (target instanceof Player)
+ {
+ if (cause == DamageCause.FALL
+ && prot.getSettingBool(ProtectConfig.disable_fall)
+ && !(user.isAuthorized("essentials.protect.damage.fall")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
event.setCancelled(true);
return;
}
- if (EssentialsProtect.playerSettings.get("protect.disable.suffocate") && cause == DamageCause.SUFFOCATION
- && !(Essentials.getStatic().getUser(casualty).isAuthorized("essentials.protect.damage.suffocation")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
+ if (cause == DamageCause.SUFFOCATION
+ && prot.getSettingBool(ProtectConfig.disable_suffocate)
+ && !(user.isAuthorized("essentials.protect.damage.suffocation")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
event.setCancelled(true);
return;
}
- if (EssentialsProtect.playerSettings.get("protect.disable.firedmg") && (cause == DamageCause.FIRE
- || cause == DamageCause.FIRE_TICK)
- && !(Essentials.getStatic().getUser(casualty).isAuthorized("essentials.protect.damage.fire")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
+ if ((cause == DamageCause.FIRE
+ || cause == DamageCause.FIRE_TICK)
+ && prot.getSettingBool(ProtectConfig.disable_firedmg)
+ && !(user.isAuthorized("essentials.protect.damage.fire")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
event.setCancelled(true);
return;
}
- if (EssentialsProtect.playerSettings.get("protect.disable.drown") && cause == DamageCause.DROWNING
- && !(Essentials.getStatic().getUser(casualty).isAuthorized("essentials.protect.damage.drowning")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
+ if (cause == DamageCause.DROWNING
+ && prot.getSettingBool(ProtectConfig.disable_drown)
+ && !(user.isAuthorized("essentials.protect.damage.drowning")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
event.setCancelled(true);
return;
}
- if (EssentialsProtect.playerSettings.get("protect.disable.lightning") && cause == DamageCause.LIGHTNING
- && !(Essentials.getStatic().getUser(casualty).isAuthorized("essentials.protect.damage.lightning")
- && !Essentials.getStatic().getUser(event.getEntity()).isAuthorized("essentials.protect.damage.disable")))
+ if (cause == DamageCause.LIGHTNING
+ && prot.getSettingBool(ProtectConfig.disable_lightning)
+ && !(user.isAuthorized("essentials.protect.damage.lightning")
+ && !user.isAuthorized("essentials.protect.damage.disable")))
{
event.setCancelled(true);
return;
@@ -185,57 +183,56 @@ public class EssentialsProtectEntityListener extends EntityListener
{
return;
}
- if (event.getEntity() instanceof LivingEntity)
+ final int maxHeight = ess.getSettings().getProtectCreeperMaxHeight();
+ //Nicccccccccce plaaacccccccccce..
+ if (event.getEntity() instanceof LivingEntity
+ && (prot.getSettingBool(ProtectConfig.prevent_creeper_explosion)
+ || prot.getSettingBool(ProtectConfig.prevent_creeper_blockdmg)
+ || (maxHeight >= 0 && event.getLocation().getBlockY() > maxHeight)))
{
- //Nicccccccccce plaaacccccccccce..
- int maxHeight = Essentials.getStatic().getSettings().getEpCreeperMaxHeight();
- if (EssentialsProtect.guardSettings.get("protect.prevent.creeper-explosion")
- || EssentialsProtect.guardSettings.get("protect.prevent.creeper-blockdamage")
- || (maxHeight >= 0 && event.getLocation().getBlockY() > maxHeight))
+ final Set<ChunkPosition> set = new HashSet<ChunkPosition>(event.blockList().size());
+ final Player[] players = ess.getServer().getOnlinePlayers();
+ final Set<ChunkPosition> blocksUnderPlayers = new HashSet<ChunkPosition>(players.length);
+ final Location loc = event.getLocation();
+ for (Player player : players)
{
- HashSet<ChunkPosition> set = new HashSet<ChunkPosition>(event.blockList().size());
- Player[] players = parent.getServer().getOnlinePlayers();
- List<ChunkPosition> blocksUnderPlayers = new ArrayList<ChunkPosition>(players.length);
- Location loc = event.getLocation();
- for (Player player : players)
+ if (player.getWorld().equals(loc.getWorld()))
{
- if (player.getWorld().equals(loc.getWorld()))
- {
- blocksUnderPlayers.add(
- new ChunkPosition(
- player.getLocation().getBlockX(),
- player.getLocation().getBlockY() - 1,
- player.getLocation().getBlockZ()));
- }
+ blocksUnderPlayers.add(
+ new ChunkPosition(
+ player.getLocation().getBlockX(),
+ player.getLocation().getBlockY() - 1,
+ player.getLocation().getBlockZ()));
}
- for (Block block : event.blockList())
+ }
+ ChunkPosition cp;
+ for (Block block : event.blockList())
+ {
+ cp = new ChunkPosition(block.getX(), block.getY(), block.getZ());
+ if (!blocksUnderPlayers.contains(cp))
{
- ChunkPosition cp = new ChunkPosition(block.getX(), block.getY(), block.getZ());
- if (!blocksUnderPlayers.contains(cp))
- {
- set.add(cp);
- }
+ set.add(cp);
}
-
- ((CraftServer)parent.getServer()).getHandle().a(loc.getX(), loc.getY(), loc.getZ(), 64.0D, ((CraftWorld)loc.getWorld()).getHandle().worldProvider.dimension,
- new Packet60Explosion(loc.getX(), loc.getY(), loc.getZ(), 3.0f, set));
- event.setCancelled(true);
- return;
}
+
+ ((CraftServer)ess.getServer()).getHandle().a(loc.getX(), loc.getY(), loc.getZ(), 64.0D, ((CraftWorld)loc.getWorld()).getHandle().worldProvider.dimension,
+ new Packet60Explosion(loc.getX(), loc.getY(), loc.getZ(), 3.0f, set));
+ event.setCancelled(true);
+ return;
}
- else
- { //OH NOES TNT
- if (EssentialsProtect.guardSettings.get("protect.prevent.tnt-explosion"))
- {
- event.setCancelled(true);
- return;
- }
+ else if (!(event.getEntity() instanceof LivingEntity)
+ && prot.getSettingBool(ProtectConfig.prevent_tnt_explosion))
+ {
+ event.setCancelled(true);
+ return;
}
// This code will prevent explosions near protected rails, signs or protected chests
// TODO: Use protect db instead of this code
+
for (Block block : event.blockList())
{
- if ((block.getType() == Material.RAILS || block.getFace(BlockFace.UP).getType() == Material.RAILS) && EssentialsProtect.genSettings.get("protect.protect.rails"))
+ if ((block.getType() == Material.RAILS || block.getFace(BlockFace.UP).getType() == Material.RAILS)
+ && prot.getSettingBool(ProtectConfig.protect_rails))
{
event.setCancelled(true);
return;
@@ -247,7 +244,7 @@ public class EssentialsProtectEntityListener extends EntityListener
|| block.getFace(BlockFace.WEST).getType() == Material.WALL_SIGN
|| block.getType() == Material.SIGN_POST
|| block.getFace(BlockFace.UP).getType() == Material.SIGN_POST)
- && EssentialsProtect.genSettings.get("protect.protect.signs"))
+ && prot.getSettingBool(ProtectConfig.protect_signs))
{
event.setCancelled(true);
return;
@@ -262,7 +259,7 @@ public class EssentialsProtectEntityListener extends EntityListener
}
@Override
- public void onCreatureSpawn(CreatureSpawnEvent event)
+ public void onCreatureSpawn(final CreatureSpawnEvent event)
{
if (event.getEntity() instanceof CraftPlayer)
{
@@ -272,32 +269,32 @@ public class EssentialsProtectEntityListener extends EntityListener
{
return;
}
- String creatureName = event.getCreatureType().toString().toLowerCase();
+ final String creatureName = event.getCreatureType().toString().toLowerCase();
if (creatureName == null || creatureName.isEmpty())
{
return;
}
- if (EssentialsProtect.guardSettings.get("protect.prevent.spawn." + creatureName))
+ if (ess.getSettings().getProtectPreventSpawn(creatureName))
{
event.setCancelled(true);
}
}
@Override
- public void onEntityTarget(EntityTargetEvent event)
+ public void onEntityTarget(final EntityTargetEvent event)
{
if (!(event.getTarget() instanceof Player))
{
return;
}
- User user = Essentials.getStatic().getUser(event.getTarget());
+ final User user = ess.getUser(event.getTarget());
if ((event.getReason() == TargetReason.CLOSEST_PLAYER
|| event.getReason() == TargetReason.TARGET_ATTACKED_ENTITY
|| event.getReason() == TargetReason.PIG_ZOMBIE_TARGET
|| event.getReason() == TargetReason.RANDOM_TARGET
|| event.getReason() == TargetReason.TARGET_ATTACKED_OWNER
|| event.getReason() == TargetReason.OWNER_ATTACKED_TARGET)
- && EssentialsProtect.guardSettings.get("protect.prevent.entitytarget")
+ && prot.getSettingBool(ProtectConfig.prevent_entitytarget)
&& !user.isAuthorized("essentials.protect.entitytarget.bypass"))
{
event.setCancelled(true);
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
index 9e1d35732..a2209a46a 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
@@ -1,43 +1,34 @@
package com.earth2me.essentials.protect;
-import com.earth2me.essentials.Essentials;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import com.earth2me.essentials.IEssentials;
import org.bukkit.block.Block;
-import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.inventory.ItemStack;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
+import org.bukkit.event.block.Action;
public class EssentialsProtectPlayerListener extends PlayerListener
{
- private EssentialsProtect parent;
- private EssentialsProtectData spData = null;
+ private final transient IProtect prot;
+ private final transient IEssentials ess;
- public EssentialsProtectPlayerListener(EssentialsProtect parent)
+ public EssentialsProtectPlayerListener(final IProtect prot)
{
- this.parent = parent;
- }
-
- public void initialize()
- {
- if (spData != null) return;
- spData = new EssentialsProtectData();
+ this.prot = prot;
+ this.ess = prot.getEssentials();
}
@Override
- public void onPlayerInteract(PlayerInteractEvent event)
+ public void onPlayerInteract(final PlayerInteractEvent event)
{
- initialize();
- if (event.isCancelled()) return;
- ItemStack item = event.getItem();
- User user = Essentials.getStatic().getUser(event.getPlayer());
- Block blockClicked = event.getClickedBlock();
+ final User user = ess.getUser(event.getPlayer());
- if (EssentialsProtect.playerSettings.get("protect.disable.build") && !user.canBuild())
+ if (prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild())
{
- if(Essentials.getStatic().getSettings().warnOnBuildDisallow())
+ if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(Util.i18n("buildAlert"));
}
@@ -45,25 +36,39 @@ public class EssentialsProtectPlayerListener extends PlayerListener
return;
}
-
- if (item != null && EssentialsProtect.checkProtectionItems(EssentialsProtect.usageList, item.getTypeId()) && !user.isAuthorized("essentials.protect.exemptusage"))
+ final ItemStack item = event.getItem();
+ if (item != null
+ && prot.checkProtectionItems(ProtectConfig.blacklist_usage, item.getTypeId())
+ && !user.isAuthorized("essentials.protect.exemptusage"))
{
event.setCancelled(true);
return;
}
- if (event.getAction() == Action.RIGHT_CLICK_BLOCK && user.isAuthorized("essentials.protect.ownerinfo"))
+ if (user.isAuthorized("essentials.protect.ownerinfo") && event.getAction() == Action.RIGHT_CLICK_BLOCK)
{
- String ownerName = spData.getBlockOwner(user.getWorld().getName(), user.getName(),
- blockClicked);
- if (ownerName != null)
+ final StringBuilder stringBuilder = new StringBuilder();
+ boolean first = true;
+ final Block blockClicked = event.getClickedBlock();
+ for (String owner : prot.getStorage().getOwners(blockClicked))
+ {
+ if (!first)
+ {
+ stringBuilder.append(", ");
+ }
+ first = false;
+ stringBuilder.append(owner);
+ }
+ final String ownerNames = stringBuilder.toString();
+ if (ownerNames != null && !ownerNames.isEmpty())
{
- user.sendMessage(Util.format("protectionOwner", ownerName));
+ user.sendMessage(Util.format("protectionOwner", ownerNames));
}
}
- if (item != null && EssentialsProtect.checkProtectionItems(EssentialsProtect.onUseAlert, item.getTypeId()))
+ if (item != null
+ && prot.checkProtectionItems(ProtectConfig.alert_on_use, item.getTypeId()))
{
- parent.alert(user, item.getType().toString(), Util.i18n("alertUsed"));
+ prot.alert(user, item.getType().toString(), Util.i18n("alertUsed"));
}
}
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectRegions.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectRegions.java
deleted file mode 100644
index 6a640f3e1..000000000
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectRegions.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.earth2me.essentials.protect;
-
-public class EssentialsProtectRegions {
-
-}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectServerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectServerListener.java
deleted file mode 100644
index 5642ef0dd..000000000
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectServerListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.earth2me.essentials.protect;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.bukkit.event.server.PluginEnableEvent;
-import org.bukkit.event.server.ServerListener;
-
-
-public class EssentialsProtectServerListener extends ServerListener
-{
- private EssentialsProtect parent;
- Logger log = Logger.getLogger("minecraft");
-
- public EssentialsProtectServerListener(EssentialsProtect parent)
- {
- this.parent = parent;
- }
-
- @Override
- public void onPluginEnable(PluginEnableEvent event)
- {
- if ("WorldGuard".equals(event.getPlugin().getDescription().getName()))
- {
- String[] features = new String[] {"disable water flow", "disable lava flow", "disable water bucket flow", "disable all fire spread", "disable tnt explosion", "disable creeper explosion", "disable all damage types"};
- log.log(Level.WARNING, "[EssentialsProtect] WorldGuard was detected, in the near future the following features of Protect will be disabled in favor of WorldGuard's versions");
-
- for (String s : features)
- {
- log.log(Level.WARNING, s);
- }
-
- }
- }
-}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectSqlProperties.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectSqlProperties.java
deleted file mode 100644
index 30b2a7032..000000000
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectSqlProperties.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.earth2me.essentials.protect;
-
-public class EssentialsProtectSqlProperties {
-
- public static String EssentialsProtect="CREATE TABLE IF NOT EXISTS `EssentialsProtect` (`id` int(11) NOT NULL AUTO_INCREMENT, `worldName` varchar(150) NOT NULL, `playerName` varchar(150) NOT NULL, `x` int(11) NOT NULL, `y` int(11) NOT NULL, `z` int(11) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=205 DEFAULT CHARSET=latin1";
- public static String EssentialsProtect_sqlite = "CREATE TABLE IF NOT EXISTS EssentialsProtect (id INTEGER PRIMARY KEY, worldName TEXT ,playerName TEXT, x NUMERIC, y NUMERIC, z NUMERIC)";
- public static String CountByLocation="SELECT COUNT(*) from EssentialsProtect where worldName = ? and x = ? and y = ? and z = ? limit 10";
- public static String CountByPLayerLocation="SELECT COUNT(*) from EssentialsProtect where worldName = ? and playerName =? and x = ? and y = ? and z = ? limit 10";
- public static String DeleteByLocation="DELETE FROM EssentialsProtect WHERE worldName=? and x=? and y=? and z=?";
- public static String Insert="INSERT INTO EssentialsProtect (worldName, playerName, x, y, z) VALUES (?,?,?,?,?)";
- public static String PlayerByLocation="SELECT playerName FROM EssentialsProtect WHERE worldname = ? and x = ? and y = ? and z = ? LIMIT 10";
-}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java
index 901d3d8c7..e81efc72b 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectWeatherListener.java
@@ -8,53 +8,43 @@ import org.bukkit.event.weather.WeatherListener;
public class EssentialsProtectWeatherListener extends WeatherListener
{
- private EssentialsProtect parent;
+ private final transient IProtect prot;
- public EssentialsProtectWeatherListener(EssentialsProtect parent)
+ public EssentialsProtectWeatherListener(final IProtect prot)
{
- this.parent = parent;
+ this.prot = prot;
}
@Override
- public void onWeatherChange(WeatherChangeEvent event)
+ public void onWeatherChange(final WeatherChangeEvent event)
{
- if (event.isCancelled())
- {
- return;
- }
- if (EssentialsProtect.playerSettings.get("protect.disable.weather.storm") && event.toWeatherState())
+ if (!event.isCancelled()
+ && prot.getSettingBool(ProtectConfig.disable_weather_storm)
+ && event.toWeatherState())
{
event.setCancelled(true);
- return;
}
}
@Override
- public void onLightningStrike(LightningStrikeEvent event)
+ public void onLightningStrike(final LightningStrikeEvent event)
{
- if (event.isCancelled())
- {
- return;
- }
- if (EssentialsProtect.playerSettings.get("protect.disable.weather.lightning"))
+ if (!event.isCancelled()
+ && prot.getSettingBool(ProtectConfig.disable_weather_lightning))
{
event.setCancelled(true);
- return;
}
}
@Override
- public void onThunderChange(ThunderChangeEvent event)
+ public void onThunderChange(final ThunderChangeEvent event)
{
- if (event.isCancelled())
- {
- return;
- }
- if (EssentialsProtect.playerSettings.get("protect.disable.weather.thunder") && event.toThunderState())
+ if (!event.isCancelled()
+ && prot.getSettingBool(ProtectConfig.disable_weather_thunder)
+ && event.toThunderState())
{
event.setCancelled(true);
- return;
}
}
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/IProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/IProtect.java
new file mode 100644
index 000000000..ac095e33d
--- /dev/null
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/IProtect.java
@@ -0,0 +1,21 @@
+package com.earth2me.essentials.protect;
+
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.protect.data.IProtectedBlock;
+
+
+public interface IProtect
+{
+ void alert(final User user, final String item, final String type);
+
+ boolean checkProtectionItems(final ProtectConfig list, final int id);
+
+ boolean getSettingBool(final ProtectConfig protectConfig);
+
+ String getSettingString(final ProtectConfig protectConfig);
+
+ IProtectedBlock getStorage();
+
+ IEssentials getEssentials();
+}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java
new file mode 100644
index 000000000..d9161bda8
--- /dev/null
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java
@@ -0,0 +1,111 @@
+package com.earth2me.essentials.protect;
+
+
+public enum ProtectConfig
+{
+ datatype("protect.datatype", "sqlite"),
+ mysqlDB("protect.mysqlDb", "jdbc:mysql://localhost:3306/minecraft"),
+ dbUsername("protect.username", "root"),
+ dbPassword("protect.password", ""),
+ memstore("protect.memstore", false),
+ disable_contactdmg("protect.disable.contactdmg", false),
+ disable_lavadmg("protect.disable.lavadmg", false),
+ disable_build("protect.disable.build", false),
+ disable_pvp("protect.disable.pvp", false),
+ disable_projectiles("protect.disable.projectiles", false),
+ disable_fall("protect.disable.fall", false),
+ disable_suffocate("protect.disable.suffocate", false),
+ disable_firedmg("protect.disable.firedmg", false),
+ disable_lightning("protect.disable.lightning", false),
+ disable_drown("protect.disable.drown", false),
+ disable_weather_storm("protect.disable.weather.storm", false),
+ disable_weather_lightning("protect.disable.weather.lightning", false),
+ disable_weather_thunder("protect.disable.weather.thunder", false),
+ prevent_fire_spread("protect.prevent.fire-spread", true),
+ prevent_flint_fire("protect.prevent.flint-fire", false),
+ prevent_lava_fire_spread("protect.prevent.lava-fire-spread", true),
+ prevent_lightning_fire_spread("protect.prevent.lightning-fire-spread", true),
+ prevent_water_flow("protect.prevent.water-flow", false),
+ prevent_lava_flow("protect.prevent.lava-flow", false),
+ prevent_water_bucket_flow("protect.prevent.water-bucket-flow", false),
+ prevent_portal_creation("protect.prevent.portal-creation", false),
+ prevent_block_on_rail("protect.protect.prevent-block-on-rails", false),
+ prevent_tnt_explosion("protect.prevent.tnt-explosion", false),
+ prevent_creeper_explosion("protect.prevent.creeper-explosion", true),
+ prevent_creeper_playerdmg("protect.prevent.creeper-playerdamage", false),
+ prevent_creeper_blockdmg("protect.prevent.creeper-blockdamage", false),
+ prevent_entitytarget("protect.prevent.entitytarget", false),
+ protect_rails("protect.protect.rails", true),
+ protect_below_rails("protect.protect.block-below", true),
+ protect_signs("protect.protect.signs", true),
+ protect_against_signs("protect.protect.block-below", true),
+ alert_on_placement("protect.alert.on-placement"),
+ alert_on_use("protect.alert.on-use"),
+ alert_on_break("protect.alert.on-break"),
+ blacklist_placement("protect.blacklist.placement"),
+ blacklist_usage("protect.blacklist.usage"),
+ blacklist_break("protect.blacklist.break");
+ private final String configName;
+ private final String defValueString;
+ private final boolean defValueBoolean;
+ private final boolean isList;
+ private final boolean isString;
+
+ private ProtectConfig(final String configName)
+ {
+ this(configName, null, false, true, false);
+ }
+
+ private ProtectConfig(final String configName, final String defValueString)
+ {
+ this(configName, defValueString, false, false, true);
+ }
+
+ private ProtectConfig(final String configName, final boolean defValueBoolean)
+ {
+ this(configName, null, defValueBoolean, false, false);
+ }
+
+ private ProtectConfig(final String configName, final String defValueString, final boolean defValueBoolean, final boolean isList, final boolean isString)
+ {
+ this.configName = configName;
+ this.defValueString = defValueString;
+ this.defValueBoolean = defValueBoolean;
+ this.isList = isList;
+ this.isString = isString;
+ }
+
+ /**
+ * @return the configName
+ */
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ /**
+ * @return the default value String
+ */
+ public String getDefaultValueString()
+ {
+ return defValueString;
+ }
+
+ /**
+ * @return the default value boolean
+ */
+ public boolean getDefaultValueBoolean()
+ {
+ return defValueBoolean;
+ }
+
+ public boolean isString()
+ {
+ return isString;
+ }
+
+ public boolean isList()
+ {
+ return isList;
+ }
+}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/IProtectedBlock.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/IProtectedBlock.java
new file mode 100644
index 000000000..6580ce7f8
--- /dev/null
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/IProtectedBlock.java
@@ -0,0 +1,14 @@
+package com.earth2me.essentials.protect.data;
+
+import java.util.List;
+import org.bukkit.block.Block;
+
+public interface IProtectedBlock {
+ public void clearProtections();
+ public void importProtections(List<OwnedBlock> blocks);
+ public List<OwnedBlock> exportProtections();
+ public void protectBlock(Block block, String playerName);
+ public boolean isProtected(Block block, String playerName);
+ public List<String> getOwners(Block block);
+ public int unprotectBlock(Block block);
+}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/OwnedBlock.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/OwnedBlock.java
new file mode 100644
index 000000000..dea124b58
--- /dev/null
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/OwnedBlock.java
@@ -0,0 +1,18 @@
+package com.earth2me.essentials.protect.data;
+
+public class OwnedBlock {
+ final int x;
+ final int y;
+ final int z;
+ final String world;
+ final String playerName;
+
+ public OwnedBlock(int x, int y, int z, String world, String playerName)
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.world = world;
+ this.playerName = playerName;
+ }
+}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java
new file mode 100644
index 000000000..e6b3c7592
--- /dev/null
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java
@@ -0,0 +1,421 @@
+package com.earth2me.essentials.protect.data;
+
+import com.mchange.v2.c3p0.ComboPooledDataSource;
+import java.beans.PropertyVetoException;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.bukkit.block.Block;
+
+
+public abstract class ProtectedBlockJDBC implements IProtectedBlock
+{
+ protected static final Logger LOGGER = Logger.getLogger("Minecraft");
+ protected final transient ComboPooledDataSource cpds;
+
+ protected abstract PreparedStatement getStatementCreateTable(Connection conn) throws SQLException;
+
+ protected abstract PreparedStatement getStatementUpdateFrom2_0Table(Connection conn) throws SQLException;
+
+ protected abstract PreparedStatement getStatementDeleteAll(Connection conn) throws SQLException;
+
+ protected abstract PreparedStatement getStatementInsert(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException;
+
+ protected abstract PreparedStatement getStatementPlayerCountByLocation(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException;
+
+ protected abstract PreparedStatement getStatementPlayersByLocation(Connection conn, String name, int x, int y, int z) throws SQLException;
+
+ protected abstract PreparedStatement getStatementDeleteByLocation(Connection conn, String world, int x, int y, int z) throws SQLException;
+
+ protected abstract PreparedStatement getStatementAllBlocks(Connection conn) throws SQLException;
+
+ public ProtectedBlockJDBC(String driver, String url) throws PropertyVetoException
+ {
+ this(driver, url, null, null);
+ }
+
+ public ProtectedBlockJDBC(String driver, String url, String username, String password) throws PropertyVetoException
+ {
+ cpds = new ComboPooledDataSource();
+ cpds.setDriverClass(driver);
+ cpds.setJdbcUrl(url);
+ if (username != null)
+ {
+ cpds.setUser(username);
+ cpds.setPassword(password);
+ }
+ cpds.setMaxStatements(20);
+ createAndConvertTable();
+ }
+
+ private void createAndConvertTable()
+ {
+ Connection conn = null;
+ PreparedStatement ps = null;
+ try
+ {
+ conn = cpds.getConnection();
+ ps = getStatementCreateTable(conn);
+ ps.execute();
+ ps.close();
+ ps = getStatementUpdateFrom2_0Table(conn);
+ ps.execute();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ finally
+ {
+ if (ps != null)
+ {
+ try
+ {
+ ps.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (conn != null)
+ {
+ try
+ {
+ conn.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ }
+ }
+
+ public void clearProtections()
+ {
+ Connection conn = null;
+ PreparedStatement ps = null;
+ try
+ {
+ conn = cpds.getConnection();
+ ps = getStatementDeleteAll(conn);
+ ps.executeUpdate();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ finally
+ {
+ if (ps != null)
+ {
+ try
+ {
+ ps.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (conn != null)
+ {
+ try
+ {
+ conn.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ }
+ }
+
+ public void importProtections(List<OwnedBlock> blocks)
+ {
+ for (OwnedBlock ownedBlock : blocks)
+ {
+ if (ownedBlock.playerName == null)
+ {
+ continue;
+ }
+ protectBlock(ownedBlock.world, ownedBlock.x, ownedBlock.y, ownedBlock.z, ownedBlock.playerName);
+ }
+ }
+
+ public List<OwnedBlock> exportProtections()
+ {
+ Connection conn = null;
+ PreparedStatement ps = null;
+ ResultSet rs = null;
+ List<OwnedBlock> blocks = new ArrayList<OwnedBlock>();
+ try
+ {
+ conn = cpds.getConnection();
+ ps = getStatementAllBlocks(conn);
+ rs = ps.executeQuery();
+ while (rs.next())
+ {
+ OwnedBlock ob = new OwnedBlock(
+ rs.getInt(2),
+ rs.getInt(3),
+ rs.getInt(4),
+ rs.getString(1),
+ rs.getString(5));
+ blocks.add(ob);
+ }
+ return blocks;
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ return blocks;
+ }
+ finally
+ {
+ if (rs != null)
+ {
+ try
+ {
+ rs.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (ps != null)
+ {
+ try
+ {
+ ps.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (conn != null)
+ {
+ try
+ {
+ conn.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ }
+ }
+
+ public void protectBlock(Block block, String playerName)
+ {
+ protectBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), playerName);
+ }
+
+ private void protectBlock(String world, int x, int y, int z, String playerName)
+ {
+ Connection conn = null;
+ PreparedStatement ps = null;
+ try
+ {
+ conn = cpds.getConnection();
+ ps = getStatementInsert(conn, world, x, y, z, playerName);
+ ps.executeUpdate();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ finally
+ {
+ if (ps != null)
+ {
+ try
+ {
+ ps.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (conn != null)
+ {
+ try
+ {
+ conn.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ }
+ }
+
+ public boolean isProtected(Block block, String playerName)
+ {
+ Connection conn = null;
+ PreparedStatement ps = null;
+ ResultSet rs = null;
+ try
+ {
+ conn = cpds.getConnection();
+ ps = getStatementPlayerCountByLocation(conn, block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), playerName);
+ rs = ps.executeQuery();
+ return rs.next() && rs.getInt(1) > 0 && rs.getInt(2) == 0;
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ return true;
+ }
+ finally
+ {
+ if (rs != null)
+ {
+ try
+ {
+ rs.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (ps != null)
+ {
+ try
+ {
+ ps.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (conn != null)
+ {
+ try
+ {
+ conn.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ }
+ }
+
+ public List<String> getOwners(Block block)
+ {
+ Connection conn = null;
+ PreparedStatement ps = null;
+ ResultSet rs = null;
+ List<String> owners = new ArrayList<String>();
+ try
+ {
+ conn = cpds.getConnection();
+ ps = getStatementPlayersByLocation(conn, block.getWorld().getName(), block.getX(), block.getY(), block.getZ());
+ rs = ps.executeQuery();
+ while (rs.next())
+ {
+ owners.add(rs.getString(1));
+ }
+ return owners;
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ return owners;
+ }
+ finally
+ {
+ if (rs != null)
+ {
+ try
+ {
+ rs.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (ps != null)
+ {
+ try
+ {
+ ps.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (conn != null)
+ {
+ try
+ {
+ conn.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ }
+ }
+
+ public int unprotectBlock(Block block)
+ {
+ Connection conn = null;
+ PreparedStatement ps = null;
+ try
+ {
+ conn = cpds.getConnection();
+ ps = getStatementDeleteByLocation(conn, block.getWorld().getName(), block.getX(), block.getY(), block.getZ());
+ return ps.executeUpdate();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ return 0;
+ }
+ finally
+ {
+ if (ps != null)
+ {
+ try
+ {
+ ps.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ if (conn != null)
+ {
+ try
+ {
+ conn.close();
+ }
+ catch (SQLException ex)
+ {
+ LOGGER.log(Level.SEVERE, null, ex);
+ }
+ }
+ }
+ }
+}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java
new file mode 100644
index 000000000..2fd32b026
--- /dev/null
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMemory.java
@@ -0,0 +1,248 @@
+package com.earth2me.essentials.protect.data;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import org.bukkit.World;
+import org.bukkit.block.Block;
+import org.bukkit.plugin.Plugin;
+
+
+public class ProtectedBlockMemory implements IProtectedBlock
+{
+ private final transient List<String> worlds = new ArrayList<String>();
+ private final transient List<String> playerNames = new ArrayList<String>();
+ private final transient IProtectedBlock storage;
+ private final transient Plugin plugin;
+
+
+ static class ProtectedLocation
+ {
+ private final transient int x;
+ private final transient int y;
+ private final transient int z;
+ private final transient int w;
+
+ public ProtectedLocation(final Block block, final int worldId)
+ {
+ this.x = block.getX();
+ this.y = block.getY();
+ this.z = block.getZ();
+ this.w = worldId;
+ }
+
+ public ProtectedLocation(final OwnedBlock ownedBlock, final int worldId)
+ {
+ this.x = ownedBlock.x;
+ this.y = ownedBlock.y;
+ this.z = ownedBlock.z;
+ this.w = worldId;
+ }
+
+ @Override
+ public boolean equals(final Object object)
+ {
+ if (object instanceof ProtectedLocation)
+ {
+ final ProtectedLocation pLoc = (ProtectedLocation)object;
+ return x == pLoc.x && y == pLoc.y && z == pLoc.z && w == pLoc.w;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return x ^ y ^ z ^ w;
+ }
+ }
+
+
+ static class ProtectedBy
+ {
+ private transient int playerId = -1;
+ private transient Set<Integer> playerIds;
+
+ public void add(final int playerId)
+ {
+ if (this.playerId == -1 || this.playerId == playerId)
+ {
+ this.playerId = playerId;
+ }
+ else
+ {
+ if (playerIds == null)
+ {
+ playerIds = new HashSet<Integer>(4);
+ playerIds.add(this.playerId);
+ }
+ playerIds.add(playerId);
+ }
+ }
+
+ public boolean contains(final int playerId)
+ {
+ if (playerIds == null)
+ {
+ return this.playerId == playerId;
+ }
+ return playerIds.contains(playerId);
+ }
+
+ public List<String> getPlayers(final List<String> playerNames)
+ {
+ final List<String> list = new ArrayList<String>(2);
+ if (playerIds == null)
+ {
+ list.add(playerNames.get(playerId));
+ }
+ else
+ {
+ for (Integer integer : playerIds)
+ {
+ list.add(playerNames.get(integer));
+ }
+ }
+ return list;
+ }
+
+ public int size()
+ {
+ if (playerIds == null)
+ {
+ return 1;
+ }
+ return playerIds.size();
+ }
+ }
+ private final transient Map<ProtectedLocation, ProtectedBy> blocks = new HashMap<ProtectedLocation, ProtectedBy>();
+
+ public ProtectedBlockMemory(final IProtectedBlock storage, final Plugin plugin)
+ {
+ this.storage = storage;
+ this.plugin = plugin;
+ importProtections(storage.exportProtections());
+ }
+
+ public void clearProtections()
+ {
+ blocks.clear();
+ }
+
+ public final void importProtections(final List<OwnedBlock> blocks)
+ {
+ for (OwnedBlock ownedBlock : blocks)
+ {
+ final ProtectedLocation pl = new ProtectedLocation(ownedBlock, getWorldId(ownedBlock.world));
+ if (ownedBlock.playerName == null)
+ {
+ continue;
+ }
+ protectBlock(pl, ownedBlock.playerName);
+ }
+ }
+
+ public List<OwnedBlock> exportProtections()
+ {
+ final List<OwnedBlock> blockList = new ArrayList<OwnedBlock>(blocks.size());
+ for (Entry<ProtectedLocation, ProtectedBy> entry : blocks.entrySet())
+ {
+ for (String name : entry.getValue().getPlayers(playerNames))
+ {
+ final OwnedBlock ob = new OwnedBlock(
+ entry.getKey().x,
+ entry.getKey().y,
+ entry.getKey().z,
+ worlds.get(entry.getKey().w),
+ name);
+ blockList.add(ob);
+ }
+ }
+ return blockList;
+ }
+
+ public void protectBlock(final Block block, final String playerName)
+ {
+ final ProtectedLocation pl = new ProtectedLocation(block, getWorldId(block.getWorld()));
+ protectBlock(pl, playerName);
+ plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable()
+ {
+ public void run()
+ {
+ storage.protectBlock(block, playerName);
+ }
+ });
+ }
+
+ private final void protectBlock(ProtectedLocation pl, String playerName)
+ {
+ int playerId = getPlayerId(playerName);
+ ProtectedBy pb = blocks.get(pl);
+ if (pb == null)
+ {
+ pb = new ProtectedBy();
+ blocks.put(pl, pb);
+ }
+ pb.add(playerId);
+ }
+
+ public boolean isProtected(Block block, String playerName)
+ {
+ int playerId = getPlayerId(playerName);
+ ProtectedLocation pl = new ProtectedLocation(block, getWorldId(block.getWorld()));
+ ProtectedBy pb = blocks.get(pl);
+ return !pb.contains(playerId);
+ }
+
+ public List<String> getOwners(Block block)
+ {
+ ProtectedLocation pl = new ProtectedLocation(block, getWorldId(block.getWorld()));
+ ProtectedBy pb = blocks.get(pl);
+ return pb.getPlayers(playerNames);
+ }
+
+ public int unprotectBlock(final Block block)
+ {
+ ProtectedLocation pl = new ProtectedLocation(block, getWorldId(block.getWorld()));
+ ProtectedBy pb = blocks.remove(pl);
+ plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable()
+ {
+ public void run()
+ {
+ storage.unprotectBlock(block);
+ }
+ });
+ return pb.size();
+ }
+
+ private int getPlayerId(String playername)
+ {
+ int id = playerNames.indexOf(playername);
+ if (id < 0)
+ {
+ playerNames.add(playername);
+ id = playerNames.indexOf(playername);
+ }
+ return id;
+ }
+
+ private int getWorldId(World world)
+ {
+ return getWorldId(world.getName());
+ }
+
+ private int getWorldId(String name)
+ {
+ int id = worlds.indexOf(name);
+ if (id < 0)
+ {
+ worlds.add(name);
+ id = worlds.indexOf(name);
+ }
+ return id;
+ }
+}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMySQL.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMySQL.java
new file mode 100644
index 000000000..8e50ce248
--- /dev/null
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockMySQL.java
@@ -0,0 +1,140 @@
+package com.earth2me.essentials.protect.data;
+
+import java.beans.PropertyVetoException;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class ProtectedBlockMySQL extends ProtectedBlockJDBC {
+
+ public ProtectedBlockMySQL(String url, String username, String password) throws PropertyVetoException {
+ super("com.mysql.jdbc.Driver", url, username, password);
+ }
+
+ private static final String QueryCreateTable =
+ "CREATE TABLE IF NOT EXISTS `EssentialsProtect` ("
+ + "`worldName` varchar(60) NOT NULL,"
+ + "`x` int(11) NOT NULL, `y` int(11) NOT NULL, `z` int(11) NOT NULL,"
+ + "`playerName` varchar(150) DEFAULT NULL,"
+ + "KEY `pos` (`worldName`,`x`,`z`,`y`)"
+ + ") ENGINE=MyISAM DEFAULT CHARSET=utf8";
+
+ @Override
+ protected PreparedStatement getStatementCreateTable(Connection conn) throws SQLException {
+ return conn.prepareStatement(QueryCreateTable);
+ }
+
+ private static final String QueryUpdateFrom2_0TableCheck =
+ "SHOW COLUMNS FROM `EssentialsProtect` LIKE 'id';";
+ private static final String QueryUpdateFrom2_0Table =
+ "ALTER TABLE `EssentialsProtect` "
+ + "CHARACTER SET = utf8, ENGINE = MyISAM,"
+ + "DROP COLUMN `id`,"
+ + "CHANGE COLUMN `playerName` `playerName` VARCHAR(150) NULL AFTER `z`,"
+ + "CHANGE COLUMN `worldName` `worldName` VARCHAR(60) NOT NULL,"
+ + "ADD INDEX `position` (`worldName` ASC, `x` ASC, `z` ASC, `y` ASC),"
+ + "DROP PRIMARY KEY ;";
+
+ @Override
+ protected PreparedStatement getStatementUpdateFrom2_0Table(Connection conn) throws SQLException {
+ PreparedStatement testPS = null;
+ ResultSet testRS = null;
+ try {
+ testPS = conn.prepareStatement(QueryUpdateFrom2_0TableCheck);
+ testRS = testPS.executeQuery();
+ if (testRS.first()) {
+ return conn.prepareStatement(QueryUpdateFrom2_0Table);
+ } else {
+ return conn.prepareStatement("SELECT 1;");
+ }
+ } finally {
+ if (testRS != null) {
+ try
+ {
+ testRS.close();
+ }
+ catch (SQLException ex)
+ {
+ Logger.getLogger(ProtectedBlockMySQL.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
+ if (testPS != null) {
+ try
+ {
+ testPS.close();
+ }
+ catch (SQLException ex)
+ {
+ Logger.getLogger(ProtectedBlockMySQL.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
+ }
+ }
+ private static final String QueryDeleteAll = "DELETE FROM EssentialsProtect;";
+
+ @Override
+ protected PreparedStatement getStatementDeleteAll(Connection conn) throws SQLException {
+ return conn.prepareStatement(QueryDeleteAll);
+ }
+ private static final String QueryInsert =
+ "INSERT INTO EssentialsProtect (worldName, x, y, z, playerName) VALUES (?, ?, ?, ?, ?);";
+
+ @Override
+ protected PreparedStatement getStatementInsert(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException {
+ PreparedStatement ps = conn.prepareStatement(QueryInsert);
+ ps.setString(1, world);
+ ps.setInt(2, x);
+ ps.setInt(3, y);
+ ps.setInt(4, z);
+ ps.setString(5, playerName);
+ return ps;
+ }
+ private static final String QueryCountByPlayer =
+ "SELECT COUNT(playerName), SUM(playerName = ?) FROM EssentialsProtect "
+ + "WHERE worldName = ? AND x = ? AND y = ? AND z = ? GROUP BY x;";
+
+ @Override
+ protected PreparedStatement getStatementPlayerCountByLocation(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException {
+ PreparedStatement ps = conn.prepareStatement(QueryCountByPlayer);
+ ps.setString(1, playerName);
+ ps.setString(2, world);
+ ps.setInt(3, x);
+ ps.setInt(4, y);
+ ps.setInt(5, z);
+ return ps;
+ }
+ private static final String QueryPlayersByLocation =
+ "SELECT playerName FROM EssentialsProtect WHERE worldname = ? AND x = ? AND y = ? AND z = ?;";
+
+ @Override
+ protected PreparedStatement getStatementPlayersByLocation(Connection conn, String world, int x, int y, int z) throws SQLException {
+ PreparedStatement ps = conn.prepareStatement(QueryPlayersByLocation);
+ ps.setString(1, world);
+ ps.setInt(2, x);
+ ps.setInt(3, y);
+ ps.setInt(4, z);
+ return ps;
+ }
+ private static final String QueryDeleteByLocation =
+ "DELETE FROM EssentialsProtect WHERE worldName = ? AND x = ? AND y = ? AND z = ?;";
+
+ @Override
+ protected PreparedStatement getStatementDeleteByLocation(Connection conn, String world, int x, int y, int z) throws SQLException {
+ PreparedStatement ps = conn.prepareStatement(QueryDeleteByLocation);
+ ps.setString(1, world);
+ ps.setInt(2, x);
+ ps.setInt(3, y);
+ ps.setInt(4, z);
+ return ps;
+ }
+ private static final String QueryAllBlocks =
+ "SELECT worldName, x, y, z, playerName FROM EssentialsProtect;";
+
+ @Override
+ protected PreparedStatement getStatementAllBlocks(Connection conn) throws SQLException {
+ return conn.prepareStatement(QueryAllBlocks);
+ }
+}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockSQLite.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockSQLite.java
new file mode 100644
index 000000000..444c657eb
--- /dev/null
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockSQLite.java
@@ -0,0 +1,96 @@
+package com.earth2me.essentials.protect.data;
+
+import java.beans.PropertyVetoException;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class ProtectedBlockSQLite extends ProtectedBlockJDBC {
+
+ public ProtectedBlockSQLite(String url) throws PropertyVetoException {
+ super("org.sqlite.JDBC", url);
+ }
+
+ private static final String QueryCreateTable =
+ "CREATE TABLE IF NOT EXISTS EssentialsProtect ("
+ + "worldName TEXT ,playerName TEXT, "
+ + "x NUMERIC, y NUMERIC, z NUMERIC)";
+
+ @Override
+ protected PreparedStatement getStatementCreateTable(Connection conn) throws SQLException {
+ return conn.prepareStatement(QueryCreateTable);
+ }
+
+ private static final String QueryUpdateFrom2_0Table =
+ "CREATE INDEX IF NOT EXISTS position ON EssentialsProtect ("
+ + "worldName, x, z, y)";
+
+ @Override
+ protected PreparedStatement getStatementUpdateFrom2_0Table(Connection conn) throws SQLException {
+ return conn.prepareStatement(QueryUpdateFrom2_0Table);
+ }
+ private static final String QueryDeleteAll = "DELETE FROM EssentialsProtect;";
+
+ @Override
+ protected PreparedStatement getStatementDeleteAll(Connection conn) throws SQLException {
+ return conn.prepareStatement(QueryDeleteAll);
+ }
+ private static final String QueryInsert =
+ "INSERT INTO EssentialsProtect (worldName, x, y, z, playerName) VALUES (?, ?, ?, ?, ?);";
+
+ @Override
+ protected PreparedStatement getStatementInsert(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException {
+ PreparedStatement ps = conn.prepareStatement(QueryInsert);
+ ps.setString(1, world);
+ ps.setInt(2, x);
+ ps.setInt(3, y);
+ ps.setInt(4, z);
+ ps.setString(5, playerName);
+ return ps;
+ }
+ private static final String QueryPlayerCountByLocation =
+ "SELECT COUNT(playerName), SUM(playerName = ?) FROM EssentialsProtect "
+ + "WHERE worldName = ? AND x = ? AND y = ? AND z = ? GROUP BY x;";
+
+ @Override
+ protected PreparedStatement getStatementPlayerCountByLocation(Connection conn, String world, int x, int y, int z, String playerName) throws SQLException {
+ PreparedStatement ps = conn.prepareStatement(QueryPlayerCountByLocation);
+ ps.setString(1, playerName);
+ ps.setString(2, world);
+ ps.setInt(3, x);
+ ps.setInt(4, y);
+ ps.setInt(5, z);
+ return ps;
+ }
+ private static final String QueryPlayersByLocation =
+ "SELECT playerName FROM EssentialsProtect WHERE worldname = ? AND x = ? AND y = ? AND z = ?;";
+
+ @Override
+ protected PreparedStatement getStatementPlayersByLocation(Connection conn, String world, int x, int y, int z) throws SQLException {
+ PreparedStatement ps = conn.prepareStatement(QueryPlayersByLocation);
+ ps.setString(1, world);
+ ps.setInt(2, x);
+ ps.setInt(3, y);
+ ps.setInt(4, z);
+ return ps;
+ }
+ private static final String QueryDeleteByLocation =
+ "DELETE FROM EssentialsProtect WHERE worldName = ? AND x = ? AND y = ? AND z = ?;";
+
+ @Override
+ protected PreparedStatement getStatementDeleteByLocation(Connection conn, String world, int x, int y, int z) throws SQLException {
+ PreparedStatement ps = conn.prepareStatement(QueryDeleteByLocation);
+ ps.setString(1, world);
+ ps.setInt(2, x);
+ ps.setInt(3, y);
+ ps.setInt(4, z);
+ return ps;
+ }
+ private static final String QueryAllBlocks =
+ "SELECT worldName, x, y, z, playerName FROM EssentialsProtect;";
+
+ @Override
+ protected PreparedStatement getStatementAllBlocks(Connection conn) throws SQLException {
+ return conn.prepareStatement(QueryAllBlocks);
+ }
+}
diff --git a/EssentialsSpawn/nbproject/project.properties b/EssentialsSpawn/nbproject/project.properties
index 3b7354449..524c40357 100644
--- a/EssentialsSpawn/nbproject/project.properties
+++ b/EssentialsSpawn/nbproject/project.properties
@@ -26,12 +26,12 @@ dist.jar=${dist.dir}/EssentialsSpawn.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar
+file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
includes=**
jar.compress=false
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}
+ ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
@@ -58,6 +58,7 @@ javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
platform.active=default_platform
project.Essentials=../Essentials
reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
index 88a7c477b..5660c3778 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.spawn;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.IEssentials;
@@ -19,7 +19,7 @@ public class Commandspawn extends EssentialsCommand
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
final IEssentials ess = Essentials.getStatic();
- final Charge charge = new Charge(this.getName(), ess);
+ final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().respawn(ess.getSpawn(), charge);
}
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java
index d6b638d03..fb2e712b7 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java
@@ -6,7 +6,6 @@ import com.earth2me.essentials.*;
import org.bukkit.command.*;
import org.bukkit.event.Event.Priority;
import org.bukkit.event.Event.Type;
-import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.*;
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
index e1e804e58..96915bd89 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
@@ -15,7 +15,7 @@ import org.bukkit.event.player.PlayerRespawnEvent;
public class EssentialsSpawnPlayerListener extends PlayerListener
{
@Override
- public void onPlayerRespawn(PlayerRespawnEvent event)
+ public void onPlayerRespawn(final PlayerRespawnEvent event)
{
final IEssentials ess = Essentials.getStatic();
final User user = ess.getUser(event.getPlayer());
@@ -25,7 +25,8 @@ public class EssentialsSpawnPlayerListener extends PlayerListener
if (ess.getSettings().getRespawnAtHome())
{
Location home = user.getHome(user.getLocation());
- if (home == null) {
+ if (home == null)
+ {
throw new Exception();
}
event.setRespawnLocation(home);
@@ -36,28 +37,38 @@ public class EssentialsSpawnPlayerListener extends PlayerListener
{
}
Location spawn = ess.getSpawn().getSpawn(user.getGroup());
- if (spawn == null) {
+ if (spawn == null)
+ {
return;
}
event.setRespawnLocation(spawn);
}
@Override
- public void onPlayerJoin(PlayerJoinEvent event)
+ public void onPlayerJoin(final PlayerJoinEvent event)
{
final IEssentials ess = Essentials.getStatic();
final User user = ess.getUser(event.getPlayer());
-
+
if (!user.isNew())
{
return;
}
user.setNew(false);
- try {
- user.getTeleport().now(ess.getSpawn().getSpawn(ess.getSettings().getNewbieSpawn()));
- } catch (Exception ex) {
- Logger.getLogger("Minecraft").log(Level.WARNING, Util.i18n("teleportNewPlayerError"), ex);
- }
+ ess.scheduleSyncDelayedTask(new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ user.getTeleport().now(ess.getSpawn().getSpawn(ess.getSettings().getNewbieSpawn()));
+ }
+ catch (Exception ex)
+ {
+ Logger.getLogger("Minecraft").log(Level.WARNING, Util.i18n("teleportNewPlayerError"), ex);
+ }
+ }
+ });
if (ess.getSettings().getAnnounceNewPlayers())
{
diff --git a/EssentialsXMPP/build.xml b/EssentialsXMPP/build.xml
new file mode 100644
index 000000000..1edb37153
--- /dev/null
+++ b/EssentialsXMPP/build.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<!-- By default, only the Clean and Build commands use this build script. -->
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
+<!-- the Compile on Save feature is turned off for the project. -->
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+<!-- in the project's Project Properties dialog box.-->
+<project name="EssentialsXMPP" default="default" basedir=".">
+ <description>Builds, tests, and runs the project EssentialsXMPP.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-jar: called before JAR building
+ -post-jar: called after JAR building
+ -post-clean: called after cleaning build products
+
+ (Targets beginning with '-' are not intended to be called on their own.)
+
+ Example of inserting an obfuscator after compilation could look like this:
+
+ <target name="-post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Another way to customize the build is by overriding existing main targets.
+ The targets of interest are:
+
+ -init-macrodef-javac: defines macro for javac compilation
+ -init-macrodef-junit: defines macro for junit execution
+ -init-macrodef-debug: defines macro for class debugging
+ -init-macrodef-java: defines macro for class execution
+ -do-jar-with-manifest: JAR building (if you are using a manifest)
+ -do-jar-without-manifest: JAR building (if you are not using a manifest)
+ run: execution of project
+ -javadoc-build: Javadoc generation
+ test-report: JUnit report generation
+
+ An example of overriding the target for project execution could look like this:
+
+ <target name="run" depends="EssentialsXMPP-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
+ properties which you can use, check the target you are overriding in the
+ nbproject/build-impl.xml file.
+
+ -->
+ <target name="-post-jar">
+ <jar jarfile="${dist.dir}/EssentialsXMPP.jar">
+ <zipfileset src="${dist.jar}" excludes="META-INF/*" />
+ <zipfileset src="../lib/smack-3.2.0.jar" excludes="META-INF/*" />
+ <manifest>
+ <attribute name="Classpath" value="Essentials.jar"/>
+ </manifest>
+ </jar>
+ </target>
+</project>
diff --git a/EssentialsXMPP/manifest.mf b/EssentialsXMPP/manifest.mf
new file mode 100644
index 000000000..328e8e5bc
--- /dev/null
+++ b/EssentialsXMPP/manifest.mf
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
diff --git a/EssentialsXMPP/nbproject/build-impl.xml b/EssentialsXMPP/nbproject/build-impl.xml
new file mode 100644
index 000000000..76f564755
--- /dev/null
+++ b/EssentialsXMPP/nbproject/build-impl.xml
@@ -0,0 +1,1080 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+ -->
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsXMPP-impl">
+ <fail message="Please build using Ant 1.7.1 or higher.">
+ <condition>
+ <not>
+ <antversion atleast="1.7.1"/>
+ </not>
+ </condition>
+ </fail>
+ <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
+ <!--
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init" name="-init-private">
+ <property file="nbproject/private/config.properties"/>
+ <property file="nbproject/private/configs/${config}.properties"/>
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-pre-init-libraries">
+ <property location="../lib/nblibraries.properties" name="libraries.path"/>
+ <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
+ <pathconvert dirsep="/" property="libraries.dir">
+ <path path="${libraries.dir.nativedirsep}"/>
+ </pathconvert>
+ <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
+ <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
+ </target>
+ <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
+ <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
+ <filterchain>
+ <replacestring from="$${base}" to="${libraries.dir}"/>
+ <escapeunicode/>
+ </filterchain>
+ </loadproperties>
+ </target>
+ <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
+ <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
+ <filterchain>
+ <replacestring from="$${base}" to="${libraries.dir}"/>
+ <escapeunicode/>
+ </filterchain>
+ </loadproperties>
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
+ <property file="nbproject/configs/${config}.properties"/>
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="splashscreen.available">
+ <and>
+ <not>
+ <equals arg1="${application.splash}" arg2="" trim="true"/>
+ </not>
+ <available file="${application.splash}"/>
+ </and>
+ </condition>
+ <condition property="main.class.available">
+ <and>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class.available"/>
+ </and>
+ </condition>
+ <condition property="do.archive">
+ <not>
+ <istrue value="${jar.archive.disabled}"/>
+ </not>
+ </condition>
+ <condition property="do.mkdist">
+ <and>
+ <isset property="do.archive"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ <not>
+ <istrue value="${mkdist.disabled}"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="do.mkdist"/>
+ </and>
+ </condition>
+ <condition property="do.archive+manifest.available">
+ <and>
+ <isset property="manifest.available"/>
+ <istrue value="${do.archive}"/>
+ </and>
+ </condition>
+ <condition property="do.archive+main.class.available">
+ <and>
+ <isset property="main.class.available"/>
+ <istrue value="${do.archive}"/>
+ </and>
+ </condition>
+ <condition property="do.archive+splashscreen.available">
+ <and>
+ <isset property="splashscreen.available"/>
+ <istrue value="${do.archive}"/>
+ </and>
+ </condition>
+ <condition property="do.archive+manifest.available+main.class">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <istrue value="${do.archive}"/>
+ </and>
+ </condition>
+ <condition property="manifest.available-mkdist.available">
+ <or>
+ <istrue value="${manifest.available}"/>
+ <isset property="do.mkdist"/>
+ </or>
+ </condition>
+ <condition property="manifest.available+main.class-mkdist.available">
+ <or>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="do.mkdist"/>
+ </or>
+ </condition>
+ <condition property="have.tests">
+ <or>
+ <available file="${test.src.dir}"/>
+ </or>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <and>
+ <isset property="javadoc.preview"/>
+ <isfalse value="${javadoc.preview}"/>
+ </and>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ <property name="application.args" value=""/>
+ <property name="source.encoding" value="${file.encoding}"/>
+ <property name="runtime.encoding" value="${source.encoding}"/>
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
+ <and>
+ <isset property="javadoc.encoding"/>
+ <not>
+ <equals arg1="${javadoc.encoding}" arg2=""/>
+ </not>
+ </and>
+ </condition>
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>
+ <property name="includes" value="**"/>
+ <property name="excludes" value=""/>
+ <property name="do.depend" value="false"/>
+ <condition property="do.depend.true">
+ <istrue value="${do.depend}"/>
+ </condition>
+ <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
+ <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
+ <length length="0" string="${endorsed.classpath}" when="greater"/>
+ </condition>
+ <condition else="false" property="jdkBug6558476">
+ <and>
+ <matches pattern="1\.[56]" string="${java.specification.version}"/>
+ <not>
+ <os family="unix"/>
+ </not>
+ </and>
+ </condition>
+ <property name="javac.fork" value="${jdkBug6558476}"/>
+ <property name="jar.index" value="false"/>
+ <property name="jar.index.metainf" value="${jar.index}"/>
+ <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="test.src.dir">Must set test.src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <attribute default="${javac.processorpath}" name="processorpath"/>
+ <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="${javac.debug}" name="debug"/>
+ <attribute default="${empty.dir}" name="sourcepath"/>
+ <attribute default="${empty.dir}" name="gensrcdir"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property location="${build.dir}/empty" name="empty.dir"/>
+ <mkdir dir="${empty.dir}"/>
+ <mkdir dir="@{apgeneratedsrcdir}"/>
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+ <src>
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+ <include name="*"/>
+ </dirset>
+ </src>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <compilerarg line="${javac.compilerargs}"/>
+ <compilerarg value="-processorpath"/>
+ <compilerarg path="@{processorpath}:${empty.dir}"/>
+ <compilerarg line="${ap.processors.internal}"/>
+ <compilerarg line="${annotation.processing.processor.options}"/>
+ <compilerarg value="-s"/>
+ <compilerarg path="@{apgeneratedsrcdir}"/>
+ <compilerarg line="${ap.proc.none.internal}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <attribute default="${javac.processorpath}" name="processorpath"/>
+ <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="${javac.debug}" name="debug"/>
+ <attribute default="${empty.dir}" name="sourcepath"/>
+ <attribute default="${empty.dir}" name="gensrcdir"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property location="${build.dir}/empty" name="empty.dir"/>
+ <mkdir dir="${empty.dir}"/>
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+ <src>
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+ <include name="*"/>
+ </dirset>
+ </src>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <sequential>
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </depend>
+ </sequential>
+ </macrodef>
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <sequential>
+ <fail unless="javac.includes">Must set javac.includes</fail>
+ <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
+ <path>
+ <filelist dir="@{destdir}" files="${javac.includes}"/>
+ </path>
+ <globmapper from="*.java" to="*.class"/>
+ </pathconvert>
+ <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
+ <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
+ <delete>
+ <files includesfile="${javac.includesfile.binary}"/>
+ </delete>
+ <delete>
+ <fileset file="${javac.includesfile.binary}"/>
+ </delete>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="**" name="testincludes"/>
+ <sequential>
+ <property name="junit.forkmode" value="perTest"/>
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
+ <batchtest todir="${build.test.results.dir}">
+ <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+ <filename name="@{testincludes}"/>
+ </fileset>
+ </batchtest>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg value="-ea"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
+ <target name="-profile-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-profile-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-profile-init-macrodef-profile">
+ <macrodef name="resolve">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${env.@{value}}"/>
+ </sequential>
+ </macrodef>
+ <macrodef name="profile">
+ <attribute default="${main.class}" name="classname"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property environment="env"/>
+ <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
+ <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg value="${profiler.info.jvmargs.agent}"/>
+ <jvmarg line="${profiler.info.jvmargs}"/>
+ <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+ <arg line="${application.args}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
+ <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+ <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${main.class}" name="name"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <attribute default="" name="stopclassname"/>
+ <sequential>
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${build.classes.dir}" name="dir"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset dir="@{dir}" includes="${fix.classes}">
+ <include name="${fix.includes}*.class"/>
+ </fileset>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-debug-args">
+ <property name="version-output" value="java version &quot;${ant.java.version}"/>
+ <condition property="have-jdk-older-than-1.4">
+ <or>
+ <contains string="${version-output}" substring="java version &quot;1.0"/>
+ <contains string="${version-output}" substring="java version &quot;1.1"/>
+ <contains string="${version-output}" substring="java version &quot;1.2"/>
+ <contains string="${version-output}" substring="java version &quot;1.3"/>
+ </or>
+ </condition>
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
+ <istrue value="${have-jdk-older-than-1.4}"/>
+ </condition>
+ <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
+ <os family="windows"/>
+ </condition>
+ <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
+ <isset property="debug.transport"/>
+ </condition>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${main.class}" name="classname"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg line="${debug-args-line}"/>
+ <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${main.class}" name="classname"/>
+ <attribute default="${run.classpath}" name="classpath"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-copylibs">
+ <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${manifest.file}" name="manifest"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert pathsep=" " property="jar.classpath">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ <customize/>
+ </manifest>
+ </copylibs>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target name="-init-ap-cmdline-properties">
+ <property name="annotation.processing.enabled" value="true"/>
+ <property name="annotation.processing.processors.list" value=""/>
+ <property name="annotation.processing.processor.options" value=""/>
+ <property name="annotation.processing.run.all.processors" value="true"/>
+ <property name="javac.processorpath" value="${javac.classpath}"/>
+ <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
+ <condition property="ap.supported.internal" value="true">
+ <not>
+ <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
+ </not>
+ </condition>
+ </target>
+ <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
+ <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
+ <isfalse value="${annotation.processing.run.all.processors}"/>
+ </condition>
+ <condition else="" property="ap.proc.none.internal" value="-proc:none">
+ <isfalse value="${annotation.processing.enabled}"/>
+ </condition>
+ </target>
+ <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
+ <property name="ap.cmd.line.internal" value=""/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target name="-deps-jar-init" unless="built-jar.properties">
+ <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
+ <delete file="${built-jar.properties}" quiet="true"/>
+ </target>
+ <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
+ <echo level="warn" message="Cycle detected: EssentialsXMPP was already built"/>
+ </target>
+ <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
+ <mkdir dir="${build.dir}"/>
+ <touch file="${built-jar.properties}" verbose="false"/>
+ <property file="${built-jar.properties}" prefix="already.built.jar."/>
+ <antcall target="-warn-already-built-jar"/>
+ <propertyfile file="${built-jar.properties}">
+ <entry key="${basedir}" value=""/>
+ </propertyfile>
+ <antcall target="-maybe-call-dep">
+ <param name="call.built.properties" value="${built-jar.properties}"/>
+ <param location="${project.Essentials}" name="call.subproject"/>
+ <param location="${project.Essentials}/build.xml" name="call.script"/>
+ <param name="call.target" value="jar"/>
+ <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
+ </antcall>
+ </target>
+ <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
+ <target depends="init" name="-check-automatic-build">
+ <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
+ </target>
+ <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
+ <antcall target="clean"/>
+ </target>
+ <target depends="init,deps-jar" name="-pre-pre-compile">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target if="do.depend.true" name="-compile-depend">
+ <pathconvert property="build.generated.subdirs">
+ <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+ <include name="*"/>
+ </dirset>
+ </pathconvert>
+ <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
+ <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target if="has.persistence.xml" name="-copy-persistence-xml">
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy todir="${build.classes.dir}/META-INF">
+ <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:force-recompile/>
+ <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target depends="init" name="-pre-pre-jar">
+ <dirname file="${dist.jar}" property="dist.jar.dir"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
+ <j2seproject1:jar/>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo level="info">To run this application from the command line without Ant, try:</echo>
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
+ <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+ <touch file="${tmp.manifest.file}" verbose="false"/>
+ </target>
+ <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
+ <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+ <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
+ </target>
+ <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
+ <manifest file="${tmp.manifest.file}" mode="update">
+ <attribute name="Main-Class" value="${main.class}"/>
+ </manifest>
+ </target>
+ <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
+ <basename file="${application.splash}" property="splashscreen.basename"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
+ <manifest file="${tmp.manifest.file}" mode="update">
+ <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
+ </manifest>
+ </target>
+ <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
+ <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
+ <echo level="info">To run this application from the command line without Ant, try:</echo>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
+ <echo level="info">java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
+ <delete>
+ <fileset file="${tmp.manifest.file}"/>
+ </delete>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target depends="init,compile" description="Run a main class." name="run">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="-do-not-recompile">
+ <property name="javac.includes.binary" value=""/>
+ </target>
+ <target depends="init,compile-single" name="run-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <target depends="init,compile-test-single" name="run-test-with-main">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
+ </target>
+ <target depends="init,compile" name="-debug-start-debuggee">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
+ <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
+ <target depends="init" name="-pre-debug-fix">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
+ <!--
+ =================
+ PROFILING SECTION
+ =================
+ -->
+ <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
+ <nbprofiledirect>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ </nbprofiledirect>
+ <profile/>
+ </target>
+ <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
+ <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
+ <nbprofiledirect>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ </nbprofiledirect>
+ <profile classname="${profile.class}"/>
+ </target>
+ <!--
+ =========================
+ APPLET PROFILING SECTION
+ =========================
+ -->
+ <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
+ <nbprofiledirect>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ </nbprofiledirect>
+ <profile classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </profile>
+ </target>
+ <!--
+ =========================
+ TESTS PROFILING SECTION
+ =========================
+ -->
+ <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
+ <nbprofiledirect>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ </nbprofiledirect>
+ <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
+ <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+ <jvmarg value="${profiler.info.jvmargs.agent}"/>
+ <jvmarg line="${profiler.info.jvmargs}"/>
+ <test name="${profile.class}"/>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ </junit>
+ </target>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target depends="init" if="have.sources" name="-javadoc-build">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+ <filename name="**/*.java"/>
+ </fileset>
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+ <include name="**/*.java"/>
+ </fileset>
+ </javadoc>
+ <copy todir="${dist.javadoc.dir}">
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+ <filename name="**/doc-files/**"/>
+ </fileset>
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+ <include name="**/doc-files/**"/>
+ </fileset>
+ </copy>
+ </target>
+ <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target if="do.depend.true" name="-compile-test-depend">
+ <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
+ </target>
+ <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
+ <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
+ <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target depends="init" if="have.tests" name="-pre-test-run">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
+ <j2seproject3:junit testincludes="**/*Test.java"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+ </target>
+ <target depends="init" if="have.tests" name="test-report"/>
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
+ <target depends="init" if="have.tests" name="-pre-test-run-single">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit excludes="" includes="${test.includes}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
+ <delete file="${test.report.file}"/>
+ <mkdir dir="${build.test.results.dir}"/>
+ <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
+ <customize>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <arg value="${test.class}"/>
+ <arg value="showoutput=true"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
+ </target>
+ <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+ <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" name="run-applet">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target name="-deps-clean-init" unless="built-clean.properties">
+ <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
+ <delete file="${built-clean.properties}" quiet="true"/>
+ </target>
+ <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
+ <echo level="warn" message="Cycle detected: EssentialsXMPP was already built"/>
+ </target>
+ <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
+ <mkdir dir="${build.dir}"/>
+ <touch file="${built-clean.properties}" verbose="false"/>
+ <property file="${built-clean.properties}" prefix="already.built.clean."/>
+ <antcall target="-warn-already-built-clean"/>
+ <propertyfile file="${built-clean.properties}">
+ <entry key="${basedir}" value=""/>
+ </propertyfile>
+ <antcall target="-maybe-call-dep">
+ <param name="call.built.properties" value="${built-clean.properties}"/>
+ <param location="${project.Essentials}" name="call.subproject"/>
+ <param location="${project.Essentials}/build.xml" name="call.script"/>
+ <param name="call.target" value="clean"/>
+ <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
+ </antcall>
+ </target>
+ <target depends="init" name="-do-clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
+ <target name="-check-call-dep">
+ <property file="${call.built.properties}" prefix="already.built."/>
+ <condition property="should.call.dep">
+ <not>
+ <isset property="already.built.${call.subproject}"/>
+ </not>
+ </condition>
+ </target>
+ <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
+ <ant antfile="${call.script}" inheritall="false" target="${call.target}">
+ <propertyset>
+ <propertyref prefix="transfer."/>
+ <mapper from="transfer.*" to="*" type="glob"/>
+ </propertyset>
+ </ant>
+ </target>
+</project>
diff --git a/EssentialsXMPP/nbproject/genfiles.properties b/EssentialsXMPP/nbproject/genfiles.properties
new file mode 100644
index 000000000..5ccac171c
--- /dev/null
+++ b/EssentialsXMPP/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=1012a5dd
+build.xml.script.CRC32=db2fb22f
+build.xml.stylesheet.CRC32=28e38971@1.42.1.45
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=1012a5dd
+nbproject/build-impl.xml.script.CRC32=04f5fc92
+nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
diff --git a/EssentialsXMPP/nbproject/project.properties b/EssentialsXMPP/nbproject/project.properties
new file mode 100644
index 000000000..6c1b475e6
--- /dev/null
+++ b/EssentialsXMPP/nbproject/project.properties
@@ -0,0 +1,81 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=EssentialsXMPP
+application.vendor=snowleo
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/original-EssentialsXMPP.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
+excludes=
+file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
+file.reference.smack-3.2.0.jar=../lib/smack-3.2.0.jar
+includes=**
+jar.compress=false
+javac.classpath=\
+ ${reference.Essentials.jar}:\
+ ${file.reference.bukkit-0.0.1-SNAPSHOT.jar}:\
+ ${file.reference.smack-3.2.0.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=-Xlint:unchecked
+javac.deprecation=false
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=1.6
+javac.target=1.6
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}:\
+ ${libs.junit_4.classpath}
+javac.test.processorpath=\
+ ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
+platform.active=default_platform
+project.Essentials=../Essentials
+reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+source.encoding=UTF-8
+src.dir=src
+test.src.dir=test
diff --git a/EssentialsXMPP/nbproject/project.xml b/EssentialsXMPP/nbproject/project.xml
new file mode 100644
index 000000000..5c9eee1dd
--- /dev/null
+++ b/EssentialsXMPP/nbproject/project.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.java.j2seproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+ <name>EssentialsXMPP</name>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots>
+ <root id="test.src.dir"/>
+ </test-roots>
+ </data>
+ <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
+ <definitions>../lib/nblibraries.properties</definitions>
+ </libraries>
+ <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
+ <reference>
+ <foreign-project>Essentials</foreign-project>
+ <artifact-type>jar</artifact-type>
+ <script>build.xml</script>
+ <target>jar</target>
+ <clean-target>clean</clean-target>
+ <id>jar</id>
+ </reference>
+ </references>
+ </configuration>
+</project>
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java
new file mode 100644
index 000000000..4a14ef730
--- /dev/null
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java
@@ -0,0 +1,27 @@
+package com.earth2me.essentials.xmpp;
+
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+
+
+public class Commandsetxmpp extends EssentialsCommand
+{
+ public Commandsetxmpp()
+ {
+ super("setxmpp");
+ }
+
+ @Override
+ protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws NotEnoughArgumentsException
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+
+ EssentialsXMPP.getInstance().setAddress(user, args[0]);
+ user.sendMessage("XMPP address set to "+args[0]);
+ }
+}
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmpp.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmpp.java
new file mode 100644
index 000000000..84d207e8c
--- /dev/null
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmpp.java
@@ -0,0 +1,39 @@
+package com.earth2me.essentials.xmpp;
+
+import com.earth2me.essentials.Console;
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+
+public class Commandxmpp extends EssentialsCommand
+{
+ public Commandxmpp()
+ {
+ super("xmpp");
+ }
+
+ @Override
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws NotEnoughArgumentsException
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+
+ final String address = EssentialsXMPP.getInstance().getAddress(args[0]);
+ if (address == null)
+ {
+ sender.sendMessage("§cThere are no players matching that name.");
+ }
+ else
+ {
+ final String message = getFinalArg(args, 1);
+ final String senderName = sender instanceof Player ? ess.getUser(sender).getDisplayName() : Console.NAME;
+ sender.sendMessage("[" + senderName + ">" + address + "] " + message);
+ EssentialsXMPP.getInstance().sendMessage(address, "[" + senderName + "] " + message);
+ }
+ }
+}
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmppspy.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmppspy.java
new file mode 100644
index 000000000..4f276c3b9
--- /dev/null
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandxmppspy.java
@@ -0,0 +1,46 @@
+package com.earth2me.essentials.xmpp;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import java.util.List;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+
+public class Commandxmppspy extends EssentialsCommand
+{
+ public Commandxmppspy()
+ {
+ super("xmppspy");
+ }
+
+ @Override
+ protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws NotEnoughArgumentsException
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+
+ final List<Player> matches = server.matchPlayer(args[0]);
+
+ if (matches.isEmpty())
+ {
+ sender.sendMessage("§cThere are no players matching that name.");
+ }
+
+ for (Player p : matches)
+ {
+ try
+ {
+ final boolean toggle = EssentialsXMPP.getInstance().toggleSpy(p);
+ sender.sendMessage("XMPP Spy " + (toggle ? "enabled" : "disabled") + " for " + p.getDisplayName());
+ }
+ catch (Exception ex)
+ {
+ sender.sendMessage("Error: " + ex.getMessage());
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
new file mode 100644
index 000000000..a2ee7bed1
--- /dev/null
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
@@ -0,0 +1,122 @@
+package com.earth2me.essentials.xmpp;
+
+import com.earth2me.essentials.Essentials;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.Util;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Event.Priority;
+import org.bukkit.event.Event.Type;
+import org.bukkit.plugin.PluginManager;
+import org.bukkit.plugin.java.JavaPlugin;
+
+
+public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
+{
+ private static final Logger LOGGER = Logger.getLogger("Minecraft");
+ private static EssentialsXMPP instance = null;
+ private transient UserManager users;
+ private transient XMPPManager xmpp;
+
+ public static IEssentialsXMPP getInstance()
+ {
+ return instance;
+ }
+
+ @Override
+ public void onEnable()
+ {
+ instance = this;
+
+ final IEssentials ess = Essentials.getStatic();
+ if (ess == null)
+ {
+ LOGGER.log(Level.SEVERE, "Failed to load Essentials before EssentialsXMPP");
+ }
+
+ final PluginManager pluginManager = getServer().getPluginManager();
+ final EssentialsXMPPPlayerListener playerListener = new EssentialsXMPPPlayerListener(ess);
+ pluginManager.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this);
+ pluginManager.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.Monitor, this);
+ pluginManager.registerEvent(Type.PLAYER_QUIT, playerListener, Priority.Monitor, this);
+
+ users = new UserManager(this.getDataFolder());
+ xmpp = new XMPPManager(this);
+
+ ess.addReloadListener(users);
+ ess.addReloadListener(xmpp);
+
+ if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion())) {
+ LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ }
+ LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
+ }
+
+ @Override
+ public void onDisable()
+ {
+ xmpp.disconnect();
+ }
+
+ @Override
+ public boolean onCommand(final CommandSender sender, final Command command, final String commandLabel, final String[] args)
+ {
+ return Essentials.getStatic().onCommandEssentials(sender, command, commandLabel, args, EssentialsXMPP.class.getClassLoader(), "com.earth2me.essentials.xmpp.Command");
+ }
+
+ @Override
+ public void setAddress(final Player user, final String address)
+ {
+ final String username = user.getName().toLowerCase();
+ instance.users.setAddress(username, address);
+ }
+
+ @Override
+ public String getAddress(final String name)
+ {
+ return instance.users.getAddress(name);
+ }
+
+ @Override
+ public String getUserByAddress(final String address)
+ {
+ return instance.users.getUserByAddress(address);
+ }
+
+ @Override
+ public boolean toggleSpy(final Player user)
+ {
+ final String username = user.getName().toLowerCase();
+ final boolean spy = !instance.users.isSpy(username);
+ instance.users.setSpy(username, spy);
+ return spy;
+ }
+
+ @Override
+ public String getAddress(final Player user)
+ {
+ return instance.users.getAddress(user.getName());
+ }
+
+ @Override
+ public void sendMessage(final Player user, final String message)
+ {
+ instance.xmpp.sendMessage(instance.users.getAddress(user.getName()), message);
+ }
+
+ @Override
+ public void sendMessage(final String address, final String message)
+ {
+ instance.xmpp.sendMessage(address, message);
+ }
+
+ @Override
+ public List<String> getSpyUsers()
+ {
+ return instance.users.getSpyUsers();
+ }
+}
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java
new file mode 100644
index 000000000..47966aee0
--- /dev/null
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java
@@ -0,0 +1,56 @@
+package com.earth2me.essentials.xmpp;
+
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.User;
+import org.bukkit.event.player.PlayerChatEvent;
+import org.bukkit.event.player.PlayerJoinEvent;
+import org.bukkit.event.player.PlayerListener;
+import org.bukkit.event.player.PlayerQuitEvent;
+
+
+class EssentialsXMPPPlayerListener extends PlayerListener
+{
+ private final transient IEssentials ess;
+
+ EssentialsXMPPPlayerListener(final IEssentials ess)
+ {
+ super();
+ this.ess = ess;
+ }
+
+ @Override
+ public void onPlayerJoin(final PlayerJoinEvent event)
+ {
+ final User user = ess.getUser(event.getPlayer());
+ sendMessageToSpyUsers("Player " + user.getDisplayName() + " joined the game");
+ }
+
+ @Override
+ public void onPlayerChat(final PlayerChatEvent event)
+ {
+ final User user = ess.getUser(event.getPlayer());
+ sendMessageToSpyUsers(String.format(event.getFormat(), user.getDisplayName(), event.getMessage()));
+ }
+
+ @Override
+ public void onPlayerQuit(final PlayerQuitEvent event)
+ {
+ final User user = ess.getUser(event.getPlayer());
+ sendMessageToSpyUsers("Player " + user.getDisplayName() + " left the game");
+ }
+
+ private void sendMessageToSpyUsers(final String message)
+ {
+ try
+ {
+ for (String address : EssentialsXMPP.getInstance().getSpyUsers())
+ {
+ EssentialsXMPP.getInstance().sendMessage(address, message);
+ }
+ }
+ catch (Exception ex)
+ {
+ // Ignore exceptions
+ }
+ }
+}
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/IEssentialsXMPP.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/IEssentialsXMPP.java
new file mode 100644
index 000000000..c95520357
--- /dev/null
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/IEssentialsXMPP.java
@@ -0,0 +1,26 @@
+package com.earth2me.essentials.xmpp;
+
+import java.util.List;
+import org.bukkit.entity.Player;
+
+
+public interface IEssentialsXMPP
+{
+
+ String getAddress(final Player user);
+
+ String getAddress(final String name);
+
+ List<String> getSpyUsers();
+
+ String getUserByAddress(final String address);
+
+ void sendMessage(final Player user, final String message);
+
+ void sendMessage(final String address, final String message);
+
+ void setAddress(final Player user, final String address);
+
+ boolean toggleSpy(final Player user);
+
+}
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java
new file mode 100644
index 000000000..6a2a6e80a
--- /dev/null
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java
@@ -0,0 +1,91 @@
+package com.earth2me.essentials.xmpp;
+
+import com.earth2me.essentials.EssentialsConf;
+import com.earth2me.essentials.IConf;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public class UserManager implements IConf
+{
+ private final transient EssentialsConf users;
+ private final transient List<String> spyusers = new ArrayList<String>();
+ private final static String ADDRESS = "address";
+ private final static String SPY = "spy";
+
+ public UserManager(final File folder)
+ {
+ users = new EssentialsConf(new File(folder, "users.yml"));
+ reloadConfig();
+ }
+
+ public final boolean isSpy(final String username)
+ {
+ return users.getBoolean(username.toLowerCase() + "." + SPY, false);
+ }
+
+ public void setSpy(final String username, final boolean spy)
+ {
+ setUser(username.toLowerCase(), getAddress(username), spy);
+ }
+
+ public final String getAddress(final String username)
+ {
+ return users.getString(username.toLowerCase() + "." + ADDRESS, null);
+ }
+
+ public final String getUserByAddress(final String search)
+ {
+ final List<String> usernames = users.getKeys(null);
+ for (String username : usernames)
+ {
+ final String address = users.getString(username + "." + ADDRESS, null);
+ if (address != null && search.equalsIgnoreCase(address)) {
+ return username;
+ }
+ }
+ return search;
+ }
+
+ public void setAddress(final String username, final String address)
+ {
+ setUser(username.toLowerCase(), address, isSpy(username));
+ }
+
+ public List<String> getSpyUsers()
+ {
+ return spyusers;
+ }
+
+ private void setUser(final String username, final String address, final boolean spy)
+ {
+ final Map<String, Object> userdata = new HashMap<String, Object>();
+ userdata.put(ADDRESS, address);
+ userdata.put(SPY, spy);
+ users.setProperty(username, userdata);
+ users.save();
+ reloadConfig();
+ }
+
+ @Override
+ public final void reloadConfig()
+ {
+ users.load();
+ spyusers.clear();
+ final List<String> keys = users.getKeys(null);
+ for (String key : keys)
+ {
+ if (isSpy(key))
+ {
+ final String address = getAddress(key);
+ if (address != null)
+ {
+ spyusers.add(address);
+ }
+ }
+ }
+ }
+}
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
new file mode 100644
index 000000000..537a32a5e
--- /dev/null
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
@@ -0,0 +1,293 @@
+package com.earth2me.essentials.xmpp;
+
+import com.earth2me.essentials.Console;
+import com.earth2me.essentials.EssentialsConf;
+import com.earth2me.essentials.IConf;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+import org.bukkit.entity.Player;
+import org.bukkit.plugin.java.JavaPlugin;
+import org.jivesoftware.smack.Chat;
+import org.jivesoftware.smack.ChatManager;
+import org.jivesoftware.smack.ChatManagerListener;
+import org.jivesoftware.smack.ConnectionConfiguration;
+import org.jivesoftware.smack.MessageListener;
+import org.jivesoftware.smack.Roster.SubscriptionMode;
+import org.jivesoftware.smack.XMPPConnection;
+import org.jivesoftware.smack.XMPPException;
+import org.jivesoftware.smack.packet.Message;
+import org.jivesoftware.smack.packet.Presence;
+import org.jivesoftware.smack.util.StringUtils;
+
+
+public class XMPPManager extends Handler implements MessageListener, ChatManagerListener, IConf
+{
+ private static final Logger LOGGER = Logger.getLogger("Minecraft");
+ private final transient EssentialsConf config;
+ private transient XMPPConnection connection;
+ private transient ChatManager chatManager;
+ private final transient Map<String, Chat> chats = Collections.synchronizedMap(new HashMap<String, Chat>());
+ private final transient JavaPlugin parent;
+ private transient List<String> logUsers;
+ private transient Level logLevel;
+ private transient boolean ignoreLagMessages = true;
+
+ public XMPPManager(final JavaPlugin parent)
+ {
+ super();
+ this.parent = parent;
+ config = new EssentialsConf(new File(parent.getDataFolder(), "config.yml"));
+ config.setTemplateName("/config.yml", EssentialsXMPP.class);
+ reloadConfig();
+ }
+
+ public void sendMessage(final String address, final String message)
+ {
+ if (address != null && !address.isEmpty())
+ {
+ try
+ {
+ startChat(address);
+ final Chat chat = chats.get(address);
+ if (chat != null)
+ {
+ chat.sendMessage(message.replaceAll("§[0-9a-f]", ""));
+ }
+ }
+ catch (XMPPException ex)
+ {
+ disableChat(address);
+ }
+ }
+ }
+
+ @Override
+ public void processMessage(final Chat chat, final Message msg)
+ {
+ // Normally we should log the error message
+ // But we would create a loop if the connection to a log-user fails.
+ if (msg.getType() != Message.Type.error && msg.getBody().length() > 0)
+ {
+ final String message = msg.getBody();
+ switch (message.charAt(0))
+ {
+ case '@':
+ sendPrivateMessage(chat, message);
+ break;
+ case '/':
+ sendCommand(chat, message);
+ break;
+ default:
+ parent.getServer().broadcastMessage("<X:" + EssentialsXMPP.getInstance().getUserByAddress(StringUtils.parseBareAddress(chat.getParticipant())) + "> " + message);
+ }
+ }
+ }
+
+ private void connect()
+ {
+ final String server = config.getString("xmpp.server");
+ if (server == null)
+ {
+ LOGGER.log(Level.WARNING, "config broken for xmpp");
+ return;
+ }
+ final int port = config.getInt("xmpp.port", 5222);
+ final String serviceName = config.getString("xmpp.servicename", server);
+ final String xmppuser = config.getString("xmpp.user");
+ final String password = config.getString("xmpp.password");
+ final ConnectionConfiguration connConf = new ConnectionConfiguration(server, port, serviceName);
+ final StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append("Connecting to xmpp server ").append(server).append(":").append(port);
+ stringBuilder.append(" as user ").append(xmppuser).append(".");
+ LOGGER.log(Level.INFO, stringBuilder.toString());
+ connConf.setSASLAuthenticationEnabled(config.getBoolean("xmpp.sasl-enabled", false));
+ connConf.setSendPresence(true);
+ connConf.setReconnectionAllowed(true);
+ connection = new XMPPConnection(connConf);
+ try
+ {
+ connection.connect();
+ connection.login(xmppuser, password);
+ connection.getRoster().setSubscriptionMode(SubscriptionMode.accept_all);
+ chatManager = connection.getChatManager();
+ chatManager.addChatListener(this);
+ }
+ catch (XMPPException ex)
+ {
+ LOGGER.log(Level.WARNING, "Failed to connect to server: " + server, ex);
+ }
+ }
+
+ public final void disconnect()
+ {
+ if (connection != null)
+ {
+ connection.disconnect(new Presence(Presence.Type.unavailable));
+ }
+ }
+
+ @Override
+ public void chatCreated(final Chat chat, final boolean createdLocally)
+ {
+ if (!createdLocally)
+ {
+ chat.addMessageListener(this);
+ final Chat old = chats.put(StringUtils.parseBareAddress(chat.getParticipant()), chat);
+ if (old != null)
+ {
+ old.removeMessageListener(this);
+ }
+ }
+ }
+
+ @Override
+ public final void reloadConfig()
+ {
+ config.load();
+ synchronized (chats)
+ {
+ disconnect();
+ chats.clear();
+ connect();
+ }
+ LOGGER.removeHandler(this);
+ if (config.getBoolean("log-enabled", false))
+ {
+ LOGGER.addHandler(this);
+ logUsers = config.getStringList("log-users", new ArrayList<String>());
+ final String level = config.getString("log-level", "info");
+ try
+ {
+ logLevel = Level.parse(level.toUpperCase());
+ }
+ catch (IllegalArgumentException e)
+ {
+ logLevel = Level.INFO;
+ }
+ ignoreLagMessages = config.getBoolean("ignore-lag-messages", true);
+ }
+ }
+
+ @Override
+ public void publish(final LogRecord logRecord)
+ {
+ try
+ {
+ if (ignoreLagMessages && logRecord.getMessage().equals("Can't keep up! Did the system time change, or is the server overloaded?"))
+ {
+ return;
+ }
+ if (logRecord.getLevel().intValue() >= logLevel.intValue())
+ {
+ for (String user : logUsers)
+ {
+ startChat(user);
+ final Chat chat = chats.get(user);
+ if (chat != null)
+ {
+ chat.sendMessage(String.format("[" + logRecord.getLevel().getLocalizedName() + "] " + logRecord.getMessage(), logRecord.getParameters()));
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ // Ignore all exceptions
+ // Otherwise we create a loop.
+ }
+ }
+
+ @Override
+ public void flush()
+ {
+ // Ignore this
+ }
+
+ @Override
+ public void close() throws SecurityException
+ {
+ // Ignore this
+ }
+
+ private void startChat(final String address) throws XMPPException
+ {
+ if (chatManager == null)
+ {
+ return;
+ }
+ synchronized (chats)
+ {
+ if (!chats.containsKey(address))
+ {
+ final Chat chat = chatManager.createChat(address, this);
+ if (chat == null)
+ {
+ throw new XMPPException("Could not start Chat with " + address);
+ }
+ chats.put(address, chat);
+ }
+ }
+ }
+
+ private void sendPrivateMessage(final Chat chat, final String message)
+ {
+ final String[] parts = message.split(" ", 2);
+ if (parts.length == 2)
+ {
+ final List<Player> matches = parent.getServer().matchPlayer(parts[0].substring(1));
+
+ if (matches.isEmpty())
+ {
+ try
+ {
+ chat.sendMessage("User " + parts[0] + " not found");
+ }
+ catch (XMPPException ex)
+ {
+ LOGGER.log(Level.WARNING, "Failed to send xmpp message.", ex);
+ }
+ }
+ else
+ {
+ final String from = "[X:" + EssentialsXMPP.getInstance().getUserByAddress(StringUtils.parseBareAddress(chat.getParticipant())) + ">";
+ for (Player p : matches)
+ {
+ p.sendMessage(from + p.getDisplayName() + "] " + message);
+ }
+ }
+ }
+ }
+
+ private void sendCommand(final Chat chat, final String message)
+ {
+ if (config.getStringList("op-users", new ArrayList<String>()).contains(StringUtils.parseBareAddress(chat.getParticipant())))
+ {
+ try
+ {
+ parent.getServer().dispatchCommand(Console.getCommandSender(parent.getServer()), message.substring(1));
+ }
+ catch (Exception ex)
+ {
+ LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
+ }
+ }
+ }
+
+ private void disableChat(final String address)
+ {
+ final Chat chat = chats.get(address);
+ if (chat != null)
+ {
+ chat.removeMessageListener(this);
+ chats.remove(address);
+ }
+ }
+}
diff --git a/EssentialsXMPP/src/config.yml b/EssentialsXMPP/src/config.yml
new file mode 100644
index 000000000..82e2887aa
--- /dev/null
+++ b/EssentialsXMPP/src/config.yml
@@ -0,0 +1,17 @@
+xmpp:
+ server: 'example.com'
+ user: 'name@example.com'
+ password: 'password'
+# servicename: 'example.com'
+# port: 5222
+# sasl-enabled: false
+
+op-users:
+# - 'name@example.com'
+
+
+log-enabled: false
+# Level is minimum level that should be send: info, warning, severe
+log-level: warning
+log-users:
+# - 'name@example.com' \ No newline at end of file
diff --git a/EssentialsXMPP/src/plugin.yml b/EssentialsXMPP/src/plugin.yml
new file mode 100644
index 000000000..a193ba95f
--- /dev/null
+++ b/EssentialsXMPP/src/plugin.yml
@@ -0,0 +1,20 @@
+# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.)
+name: EssentialsXMPP
+main: com.earth2me.essentials.xmpp.EssentialsXMPP
+# Note to developers: This next line cannot change, or the automatic versioning system will break.
+version: TeamCity
+website: http://www.earth2me.net:8001/
+description: Provides xmpp communication.
+authors:
+ - snowleo
+depend: [Essentials]
+commands:
+ setxmpp:
+ description: set your xmpp address
+ usage: /<command> <address>
+ xmpp:
+ description: send a message to a player
+ usage: /<command> <player> <message>
+ xmppspy:
+ description: toggle xmpp spy for all messages
+ usage: /<command> <player> \ No newline at end of file
diff --git a/README.markdown b/README.markdown
new file mode 100644
index 000000000..3d21b2baf
--- /dev/null
+++ b/README.markdown
@@ -0,0 +1,16 @@
+Essentials Development Readme
+=============================
+
+The official repository is at:
+https://github.com/essentials/Essentials
+
+We use NetBeans 7 for development.
+
+Recommended NetBeans plugins:
+
+* Git
+* PMD & FindBugs ( http://kenai.com/projects/sqe/pages/Home )
+
+In the root folder of the repository is a file called settings.zip. It contains the code guidelines settings. Open the preferences of NetBeans and import the zip file. Use "Source > Format" before each commit please.
+
+To build all jars, select the BuildAll project and build that. You'll find all jars inside the dist/lib folder of the BuildAll project. \ No newline at end of file
diff --git a/lib/Permissions3.jar b/lib/Permissions3.jar
new file mode 100755
index 000000000..7e2741283
--- /dev/null
+++ b/lib/Permissions3.jar
Binary files differ
diff --git a/lib/smack-3.2.0.jar b/lib/smack-3.2.0.jar
new file mode 100644
index 000000000..22b9780dd
--- /dev/null
+++ b/lib/smack-3.2.0.jar
Binary files differ
diff --git a/settings.zip b/settings.zip
new file mode 100644
index 000000000..33660fcdc
--- /dev/null
+++ b/settings.zip
Binary files differ