diff options
270 files changed, 13244 insertions, 10811 deletions
diff --git a/.gitignore b/.gitignore index eda2b5917..524ed1334 100644 --- a/.gitignore +++ b/.gitignore @@ -1,42 +1,45 @@ -.DS_Store -/BuildAll/nbproject/private/ -/EssentialsProtect/nbproject/private/ -/EssentialsChat/nbproject/private/ -/EssentialsGroupBridge/nbproject/private/ -/EssentialsGeoIP/nbproject/private/ -/EssentialsSpawn/nbproject/private/ -/EssentialsXMPP/nbproject/private/ -/EssentialsGroupManager/nbproject/private/ -/BuildAll/build/ -/EssentialsGroupBridge/dist/ -/EssentialsGroupBridge/build/ -/EssentialsGeoIP/dist/ -/EssentialsGeoIP/build/ -/EssentialsGroupManager/build/ -/EssentialsGroupManager/dist/ -/BuildAll/dist/ -/EssentialsChat/build/ -/EssentialsChat/dist/ -/EssentialsSpawn/build/ -/EssentialsSpawn/dist/ -/EssentialsXMPP/dist/ -/EssentialsXMPP/build/ -/EssentialsProtect/dist/ -/EssentialsProtect/build/ -/EssentialsPermissionsCommands/nbproject/private/ -/EssentialsPermissionsCommands/build/ -/EssentialsPermissionsCommands/dist/ -/Essentials/nbproject/private/ -/Essentials/dist/ -/Essentials/build/ -/YamlAnnotations/ -/EssentialsUpdate/nbproject/private/ -/EssentialsRelease/ -/EssentialsUpdate/dist/ -/EssentialsUpdate/build/ -/WebPush/apikey.php -/WebPush/nbproject/private -/.idea +.DS_Store
+/BuildAll/nbproject/private/
+/EssentialsProtect/nbproject/private/
+/EssentialsChat/nbproject/private/
+/EssentialsGroupBridge/nbproject/private/
+/EssentialsGeoIP/nbproject/private/
+/EssentialsSpawn/nbproject/private/
+/EssentialsXMPP/nbproject/private/
+/EssentialsGroupManager/nbproject/private/
+/BuildAll/build/
+/EssentialsGroupBridge/dist/
+/EssentialsGroupBridge/build/
+/EssentialsGeoIP/dist/
+/EssentialsGeoIP/build/
+/EssentialsGroupManager/build/
+/EssentialsGroupManager/dist/
+/BuildAll/dist/
+/EssentialsChat/build/
+/EssentialsChat/dist/
+/EssentialsSpawn/build/
+/EssentialsSpawn/dist/
+/EssentialsXMPP/dist/
+/EssentialsXMPP/build/
+/EssentialsProtect/dist/
+/EssentialsProtect/build/
+/EssentialsPermissionsCommands/nbproject/private/
+/EssentialsPermissionsCommands/build/
+/EssentialsPermissionsCommands/dist/
+/Essentials/nbproject/private/
+/Essentials/dist/
+/Essentials/build/
+/YamlAnnotations/
+/EssentialsUpdate/nbproject/private/
+/EssentialsRelease/
+/EssentialsUpdate/dist/
+/EssentialsUpdate/build/
+/WebPush/apikey.php
+/WebPush/nbproject/private
+/.idea
*.iml
/EssentialsGroupManager/bin
-/EssentialsGroupManager/.externalToolBuilders
\ No newline at end of file +/EssentialsGroupManager/.externalToolBuilders
+/EssentialsAntiBuild/nbproject/private/
+/EssentialsAntiBuild/dist/
+/EssentialsAntiBuild/build/
\ No newline at end of file diff --git a/BuildAll/nbproject/build-impl.xml b/BuildAll/nbproject/build-impl.xml index 1f8bcbaae..d52f998c1 100644 --- a/BuildAll/nbproject/build-impl.xml +++ b/BuildAll/nbproject/build-impl.xml @@ -640,6 +640,13 @@ is divided into following sections: </antcall> <antcall target="-maybe-call-dep"> <param name="call.built.properties" value="${built-jar.properties}"/> + <param location="${project.EssentialsAntiBuild}" name="call.subproject"/> + <param location="${project.EssentialsAntiBuild}/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"/> @@ -1142,6 +1149,13 @@ is divided into following sections: </antcall> <antcall target="-maybe-call-dep"> <param name="call.built.properties" value="${built-clean.properties}"/> + <param location="${project.EssentialsAntiBuild}" name="call.subproject"/> + <param location="${project.EssentialsAntiBuild}/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"/> diff --git a/BuildAll/nbproject/genfiles.properties b/BuildAll/nbproject/genfiles.properties index 8068c7fc0..de7702440 100644 --- a/BuildAll/nbproject/genfiles.properties +++ b/BuildAll/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=51b33957 +build.xml.data.CRC32=b4df970c build.xml.script.CRC32=7a797370 -build.xml.stylesheet.CRC32=28e38971@1.44.1.45 +build.xml.stylesheet.CRC32=28e38971@1.50.3.46 # 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=51b33957 -nbproject/build-impl.xml.script.CRC32=c5170bed -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 +nbproject/build-impl.xml.data.CRC32=b4df970c +nbproject/build-impl.xml.script.CRC32=1fd6d3cc +nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.3.46 diff --git a/BuildAll/nbproject/project.properties b/BuildAll/nbproject/project.properties index 246ea1240..2bbfdd15b 100644 --- a/BuildAll/nbproject/project.properties +++ b/BuildAll/nbproject/project.properties @@ -66,6 +66,7 @@ jar.compress=true javac.classpath=\ ${reference.Essentials.jar}:\ ${reference.EssentialsChat.jar}:\ + ${reference.EssentialsAntiBuild.jar}:\ ${reference.EssentialsProtect.jar}:\ ${reference.EssentialsSpawn.jar}:\ ${reference.EssentialsGeoIP.jar}:\ @@ -103,6 +104,7 @@ project.EssentialsChat=../EssentialsChat project.EssentialsGeoIP=../EssentialsGeoIP project.EssentialsGroupBridge=../EssentialsGroupBridge project.EssentialsGroupManager=../EssentialsGroupManager +project.EssentialsAntiBuild=../EssentialsAntiBuild project.EssentialsProtect=../EssentialsProtect project.EssentialsSpawn=../EssentialsSpawn project.EssentialsXMPP=../EssentialsXMPP @@ -111,6 +113,7 @@ 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.EssentialsAntiBuild.jar=${project.EssentialsAntiBuild}/dist/EssentialsAntiBuild.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 diff --git a/BuildAll/nbproject/project.xml b/BuildAll/nbproject/project.xml index 420233ac9..7a2d6b451 100644 --- a/BuildAll/nbproject/project.xml +++ b/BuildAll/nbproject/project.xml @@ -56,6 +56,14 @@ <id>jar</id> </reference> <reference> + <foreign-project>EssentialsAntiBuild</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> diff --git a/Essentials/nbproject/build-impl.xml b/Essentials/nbproject/build-impl.xml index f79ca7e26..8069faec8 100644 --- a/Essentials/nbproject/build-impl.xml +++ b/Essentials/nbproject/build-impl.xml @@ -12,9 +12,9 @@ is divided into following sections: - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup @@ -181,6 +181,7 @@ is divided into following sections: </and> </condition> <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> <property name="javac.compilerargs" value=""/> <property name="work.dir" value="${basedir}"/> <condition property="no.deps"> @@ -225,6 +226,27 @@ is divided into following sections: <property name="jar.index.metainf" value="${jar.index}"/> <property name="copylibs.rebase" value="true"/> <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> @@ -357,11 +379,52 @@ is divided into following sections: </sequential> </macrodef> </target> - <target name="-init-macrodef-junit"> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> <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}"> @@ -370,32 +433,270 @@ is divided into following sections: <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}"/> + <customize/> </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"> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="Essentials" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename Essentials -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> <macrodef name="resolve"> <attribute name="name"/> <attribute name="value"/> @@ -427,10 +728,13 @@ is divided into following sections: </sequential> </macrodef> </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" 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> + <!-- + end of pre NB7.2 profiling section + --> <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"/> @@ -488,6 +792,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -504,6 +809,7 @@ is divided into following sections: <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> <attribute default="${main.class}" name="classname"/> <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> <element name="customize" optional="true"/> <sequential> <java classname="@{classname}" dir="${work.dir}" fork="true"> @@ -511,6 +817,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -537,6 +844,9 @@ is divided into following sections: <path path="${run.classpath.without.build.classes.dir}"/> <chainedmapper> <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> <globmapper from="*" to="lib/*"/> </chainedmapper> </pathconvert> @@ -582,7 +892,7 @@ is divided into following sections: <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"/> + <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-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> <!-- =================== COMPILATION SECTION @@ -805,7 +1115,11 @@ is divided into following sections: PROFILING SECTION ================= --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -813,8 +1127,9 @@ is divided into following sections: </nbprofiledirect> <profile/> </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -822,12 +1137,8 @@ is divided into following sections: </nbprofiledirect> <profile classname="${profile.class}"/> </target> - <!-- - ========================= - APPLET PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -839,12 +1150,8 @@ is divided into following sections: </customize> </profile> </target> - <!-- - ========================= - TESTS PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.test.classpath}"/> @@ -867,6 +1174,42 @@ is divided into following sections: </junit> </target> <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- =============== JAVADOC SECTION =============== @@ -909,7 +1252,7 @@ is divided into following sections: <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- ========================= - JUNIT COMPILATION SECTION + TEST COMPILATION SECTION ========================= --> <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> @@ -952,14 +1295,14 @@ is divided into following sections: <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 + TEST 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"/> + <j2seproject3:test 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> @@ -972,39 +1315,40 @@ is divided into following sections: </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}"/> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${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"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <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-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> <!-- ======================= - JUNIT DEBUGGING SECTION + TEST DEBUGGING SECTION ======================= --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <target depends="init,compile-test-single,-pre-test-run-single" 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> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> </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,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> <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> @@ -1076,9 +1420,12 @@ is divided into following sections: <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> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> </condition> </target> <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> diff --git a/Essentials/nbproject/genfiles.properties b/Essentials/nbproject/genfiles.properties index 8d631fddf..4897c5ad8 100644 --- a/Essentials/nbproject/genfiles.properties +++ b/Essentials/nbproject/genfiles.properties @@ -4,8 +4,8 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.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=a830bc14 -nbproject/build-impl.xml.script.CRC32=a9f8842a -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 +nbproject/build-impl.xml.script.CRC32=7c507372 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 nbproject/profiler-build-impl.xml.data.CRC32=ab78ce15 nbproject/profiler-build-impl.xml.script.CRC32=abda56ed nbproject/profiler-build-impl.xml.stylesheet.CRC32=f10cf54c@1.11.1 diff --git a/Essentials/nbproject/project.properties b/Essentials/nbproject/project.properties index 7a5ffe7bb..a9cebbb92 100644 --- a/Essentials/nbproject/project.properties +++ b/Essentials/nbproject/project.properties @@ -1,5 +1,5 @@ annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false +annotation.processing.enabled.in.editor=true annotation.processing.processors.list=lombok.core.AnnotationProcessor annotation.processing.run.all.processors=false annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output diff --git a/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java b/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java index bf3037e59..9c40acacc 100644 --- a/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java +++ b/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java @@ -6,12 +6,11 @@ import java.util.*; /** - * This utility class is used for converting between the ingame - * time in ticks to ingame time as a friendly string. - * Note that the time is INGAME. - * + * This utility class is used for converting between the ingame time in ticks to ingame time as a friendly string. Note + * that the time is INGAME. + * * http://www.minecraftwiki.net/wiki/Day/night_cycle - * + * * @author Olof Larsson */ public final class DescParseTickFormat @@ -156,30 +155,31 @@ public final class DescParseTickFormat int hours = 0; int minutes = 0; - desc = desc.toLowerCase(Locale.ENGLISH).replaceAll("[^0-9]", ""); + desc = desc.toLowerCase(Locale.ENGLISH); + String parsetime = desc.replaceAll("[^0-9]", ""); - if (desc.length() > 4) + if (parsetime.length() > 4) { throw new NumberFormatException(); } - if (desc.length() == 4) + if (parsetime.length() == 4) { - hours += Integer.parseInt(desc.substring(0, 2)); - minutes += Integer.parseInt(desc.substring(2, 4)); + hours += Integer.parseInt(parsetime.substring(0, 2)); + minutes += Integer.parseInt(parsetime.substring(2, 4)); } - else if (desc.length() == 3) + else if (parsetime.length() == 3) { - hours += Integer.parseInt(desc.substring(0, 1)); - minutes += Integer.parseInt(desc.substring(1, 3)); + hours += Integer.parseInt(parsetime.substring(0, 1)); + minutes += Integer.parseInt(parsetime.substring(1, 3)); } - else if (desc.length() == 2) + else if (parsetime.length() == 2) { - hours += Integer.parseInt(desc.substring(0, 2)); + hours += Integer.parseInt(parsetime.substring(0, 2)); } - else if (desc.length() == 1) + else if (parsetime.length() == 1) { - hours += Integer.parseInt(desc.substring(0, 1)); + hours += Integer.parseInt(parsetime.substring(0, 1)); } else { diff --git a/Essentials/src/com/earth2me/essentials/Enchantments.java b/Essentials/src/com/earth2me/essentials/Enchantments.java index 5ce10d75d..c1fa33553 100644 --- a/Essentials/src/com/earth2me/essentials/Enchantments.java +++ b/Essentials/src/com/earth2me/essentials/Enchantments.java @@ -19,47 +19,95 @@ public class Enchantments ENCHANTMENTS.put("alldamage", Enchantment.DAMAGE_ALL); ENCHANTMENTS.put("alldmg", Enchantment.DAMAGE_ALL); ENCHANTMENTS.put("sharpness", Enchantment.DAMAGE_ALL); + ENCHANTMENTS.put("sharp", Enchantment.DAMAGE_ALL); + ENCHANTMENTS.put("arthropodsdamage", Enchantment.DAMAGE_ARTHROPODS); ENCHANTMENTS.put("ardmg", Enchantment.DAMAGE_ARTHROPODS); ENCHANTMENTS.put("baneofarthropods", Enchantment.DAMAGE_ARTHROPODS); + ENCHANTMENTS.put("baneofarthropod", Enchantment.DAMAGE_ARTHROPODS); + ENCHANTMENTS.put("arthropod", Enchantment.DAMAGE_ARTHROPODS); + ENCHANTMENTS.put("undeaddamage", Enchantment.DAMAGE_UNDEAD); ENCHANTMENTS.put("smite", Enchantment.DAMAGE_UNDEAD); + ENCHANTMENTS.put("digspeed", Enchantment.DIG_SPEED); ENCHANTMENTS.put("efficiency", Enchantment.DIG_SPEED); + ENCHANTMENTS.put("minespeed", Enchantment.DIG_SPEED); + ENCHANTMENTS.put("cutspeed", Enchantment.DIG_SPEED); + ENCHANTMENTS.put("durability", Enchantment.DURABILITY); ENCHANTMENTS.put("dura", Enchantment.DURABILITY); ENCHANTMENTS.put("unbreaking", Enchantment.DURABILITY); + ENCHANTMENTS.put("fireaspect", Enchantment.FIRE_ASPECT); ENCHANTMENTS.put("fire", Enchantment.FIRE_ASPECT); + ENCHANTMENTS.put("meleefire", Enchantment.FIRE_ASPECT); + ENCHANTMENTS.put("meleeflame", Enchantment.FIRE_ASPECT); + ENCHANTMENTS.put("knockback", Enchantment.KNOCKBACK); + ENCHANTMENTS.put("blockslootbonus", Enchantment.LOOT_BONUS_BLOCKS); ENCHANTMENTS.put("fortune", Enchantment.LOOT_BONUS_BLOCKS); + ENCHANTMENTS.put("mobslootbonus", Enchantment.LOOT_BONUS_MOBS); ENCHANTMENTS.put("mobloot", Enchantment.LOOT_BONUS_MOBS); ENCHANTMENTS.put("looting", Enchantment.LOOT_BONUS_MOBS); + ENCHANTMENTS.put("oxygen", Enchantment.OXYGEN); ENCHANTMENTS.put("respiration", Enchantment.OXYGEN); + ENCHANTMENTS.put("breathing", Enchantment.OXYGEN); + ENCHANTMENTS.put("breath", Enchantment.OXYGEN); + ENCHANTMENTS.put("protection", Enchantment.PROTECTION_ENVIRONMENTAL); ENCHANTMENTS.put("prot", Enchantment.PROTECTION_ENVIRONMENTAL); + ENCHANTMENTS.put("protect", Enchantment.PROTECTION_ENVIRONMENTAL); + ENCHANTMENTS.put("explosionsprotection", Enchantment.PROTECTION_EXPLOSIONS); + ENCHANTMENTS.put("explosionprotection", Enchantment.PROTECTION_EXPLOSIONS); ENCHANTMENTS.put("expprot", Enchantment.PROTECTION_EXPLOSIONS); ENCHANTMENTS.put("blastprotection", Enchantment.PROTECTION_EXPLOSIONS); + ENCHANTMENTS.put("blastprotect", Enchantment.PROTECTION_EXPLOSIONS); + ENCHANTMENTS.put("fallprotection", Enchantment.PROTECTION_FALL); ENCHANTMENTS.put("fallprot", Enchantment.PROTECTION_FALL); + ENCHANTMENTS.put("featherfall", Enchantment.PROTECTION_FALL); ENCHANTMENTS.put("featherfalling", Enchantment.PROTECTION_FALL); + ENCHANTMENTS.put("fireprotection", Enchantment.PROTECTION_FIRE); + ENCHANTMENTS.put("flameprotection", Enchantment.PROTECTION_FIRE); + ENCHANTMENTS.put("fireprotect", Enchantment.PROTECTION_FIRE); + ENCHANTMENTS.put("flameprotect", Enchantment.PROTECTION_FIRE); ENCHANTMENTS.put("fireprot", Enchantment.PROTECTION_FIRE); + ENCHANTMENTS.put("flameprot", Enchantment.PROTECTION_FIRE); + ENCHANTMENTS.put("projectileprotection", Enchantment.PROTECTION_PROJECTILE); ENCHANTMENTS.put("projprot", Enchantment.PROTECTION_PROJECTILE); + ENCHANTMENTS.put("silktouch", Enchantment.SILK_TOUCH); + ENCHANTMENTS.put("softtouch", Enchantment.SILK_TOUCH); + ENCHANTMENTS.put("waterworker", Enchantment.WATER_WORKER); ENCHANTMENTS.put("aquaaffinity", Enchantment.WATER_WORKER); + ENCHANTMENTS.put("firearrow", Enchantment.ARROW_FIRE); + ENCHANTMENTS.put("flame", Enchantment.ARROW_FIRE); + ENCHANTMENTS.put("flamearrow", Enchantment.ARROW_FIRE); + ENCHANTMENTS.put("arrowdamage", Enchantment.ARROW_DAMAGE); + ENCHANTMENTS.put("power", Enchantment.ARROW_DAMAGE); + ENCHANTMENTS.put("arrowpower", Enchantment.ARROW_DAMAGE); + ENCHANTMENTS.put("arrowknockback", Enchantment.ARROW_KNOCKBACK); ENCHANTMENTS.put("arrowkb", Enchantment.ARROW_KNOCKBACK); + ENCHANTMENTS.put("punch", Enchantment.ARROW_KNOCKBACK); + ENCHANTMENTS.put("arrowpunch", Enchantment.ARROW_KNOCKBACK); + ENCHANTMENTS.put("infinitearrows", Enchantment.ARROW_INFINITE); ENCHANTMENTS.put("infarrows", Enchantment.ARROW_INFINITE); + ENCHANTMENTS.put("infinity", Enchantment.ARROW_INFINITE); + ENCHANTMENTS.put("infinite", Enchantment.ARROW_INFINITE); + ENCHANTMENTS.put("unlimited", Enchantment.ARROW_INFINITE); + ENCHANTMENTS.put("unlimitedarrows", Enchantment.ARROW_INFINITE); } public static Enchantment getByName(String name) { diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index c3dac9b50..570ec65c8 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -42,6 +42,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Server; import org.bukkit.World; @@ -66,7 +67,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 2122; + public static final int BUKKIT_VERSION = 2317; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); @@ -83,6 +84,8 @@ public class Essentials extends JavaPlugin implements IEssentials private transient ExecuteTimer execTimer; private transient I18n i18n; private transient Metrics metrics; + private transient EssentialsTimer timer; + private transient List<String> vanishedPlayers = new ArrayList<String>(); @Override public ISettings getSettings() @@ -237,11 +240,12 @@ public class Essentials extends JavaPlugin implements IEssentials pm.registerEvents(tntListener, this); - final EssentialsTimer timer = new EssentialsTimer(this); - getScheduler().scheduleSyncRepeatingTask(this, timer, 1, 100); + timer = new EssentialsTimer(this); + getScheduler().scheduleSyncRepeatingTask(this, timer, 100, 100); + Economy.setEss(this); execTimer.mark("RegListeners"); - + final MetricsStarter metricsStarter = new MetricsStarter(this); if (metricsStarter.getStart() != null && metricsStarter.getStart() == true) { @@ -263,6 +267,15 @@ public class Essentials extends JavaPlugin implements IEssentials @Override public void onDisable() { + for (Player p : getServer().getOnlinePlayers()) + { + User user = getUser(p); + if (user.isVanished()) + { + user.toggleVanished(); + p.sendMessage(_("unvanishedReload")); + } + } i18n.onDisable(); Economy.setEss(null); Trade.closeLog(); @@ -304,20 +317,7 @@ public class Essentials extends JavaPlugin implements IEssentials } catch (final Exception ex) { - final ArrayList<StackTraceElement> elements = new ArrayList<StackTraceElement>(Arrays.asList(ex.getStackTrace())); - elements.remove(0); - final ArrayList<StackTraceElement> toRemove = new ArrayList<StackTraceElement>(); - for (final StackTraceElement e : elements) - { - if (e.getClassName().equals("com.earth2me.essentials.Essentials")) - { - toRemove.add(e); - } - } - elements.removeAll(toRemove); - final StackTraceElement[] trace = elements.toArray(new StackTraceElement[elements.size()]); - ex.setStackTrace(trace); - ex.printStackTrace(); + Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex); sender.sendMessage(ChatColor.RED + "An internal error occurred while attempting to perform this command"); return true; } @@ -491,6 +491,12 @@ public class Essentials extends JavaPlugin implements IEssentials { return (User)base; } + + if (userMap == null) { + LOGGER.log(Level.WARNING, "Essentials userMap not initialized"); + return null; + } + User user = userMap.getUser(base.getName()); if (user == null) @@ -557,7 +563,7 @@ public class Essentials extends JavaPlugin implements IEssentials for (Player player : players) { final User user = getUser(player); - if (!user.isIgnoredPlayer(sender.getName())) + if (!user.isIgnoredPlayer(sender)) { player.sendMessage(message); } @@ -626,6 +632,17 @@ public class Essentials extends JavaPlugin implements IEssentials return i18n; } + @Override + public EssentialsTimer getTimer() + { + return timer; + } + + @Override + public List<String> getVanishedPlayers() + { + return vanishedPlayers; + } private static class EssentialsWorldListener implements Listener, Runnable { diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java index 17f0f1778..0c6bec0fe 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java @@ -17,17 +17,17 @@ public class EssentialsBlockListener implements Listener this.ess = ess; } - @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onBlockPlace(final BlockPlaceEvent event) { - final User user = ess.getUser(event.getPlayer()); // Do not rely on getItemInHand(); - // http://leaky.bukkit.org/issues/663 + // http://leaky.bukkit.org/issues/663 final ItemStack is = Util.convertBlockToItem(event.getBlockPlaced()); if (is == null) { return; } + final User user = ess.getUser(event.getPlayer()); final boolean unlimitedForUser = user.hasUnlimited(is); if (unlimitedForUser && user.getGameMode() == GameMode.SURVIVAL) { diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java index 85c2bbd8c..0440febce 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java @@ -5,6 +5,7 @@ import com.google.common.io.Files; import java.io.*; import java.nio.ByteBuffer; import java.nio.CharBuffer; +import java.nio.channels.ClosedByInterruptException; import java.nio.channels.FileChannel; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; @@ -38,8 +39,9 @@ public class EssentialsConf extends YamlConfiguration super(); this.configFile = configFile; } + private final byte[] bytebuffer = new byte[1024]; - public void load() + public synchronized void load() { configFile = configFile.getAbsoluteFile(); if (!configFile.getParentFile().exists()) @@ -115,9 +117,12 @@ public class EssentialsConf extends YamlConfiguration final FileInputStream inputStream = new FileInputStream(configFile); try { - final FileChannel channel = inputStream.getChannel(); final ByteBuffer buffer = ByteBuffer.allocate((int)configFile.length()); - channel.read(buffer); + int length; + while ((length = inputStream.read(bytebuffer)) != -1) + { + buffer.put(bytebuffer, 0, length); + } buffer.rewind(); final CharBuffer data = CharBuffer.allocate((int)configFile.length()); CharsetDecoder decoder = UTF8.newDecoder(); @@ -356,7 +361,7 @@ public class EssentialsConf extends YamlConfiguration } @Override - public void save(final File file) throws IOException + public synchronized void save(final File file) throws IOException { if (file == null) { diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index 029288530..c7f7cf051 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -3,14 +3,14 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; import java.util.List; import org.bukkit.Material; -import org.bukkit.entity.Animals; +import org.bukkit.entity.Ageable; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.event.entity.*; +import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.inventory.ItemStack; @@ -23,7 +23,7 @@ public class EssentialsEntityListener implements Listener this.ess = ess; } - @EventHandler(priority = EventPriority.LOWEST) + @EventHandler(priority = EventPriority.LOW) public void onEntityDamage(final EntityDamageByEntityEvent event) { final Entity eAttack = event.getDamager(); @@ -32,40 +32,62 @@ public class EssentialsEntityListener implements Listener { final User defender = ess.getUser(eDefend); final User attacker = ess.getUser(eAttack); - if (attacker.hasInvulnerabilityAfterTeleport() || defender.hasInvulnerabilityAfterTeleport()) { + + if (ess.getSettings().getLoginAttackDelay() > 0 && !attacker.isAuthorized("essentials.pvpdelay.exempt") + && (System.currentTimeMillis() < (attacker.getLastLogin() + ess.getSettings().getLoginAttackDelay()))) + { event.setCancelled(true); } + + if (attacker.hasInvulnerabilityAfterTeleport() || defender.hasInvulnerabilityAfterTeleport()) + { + event.setCancelled(true); + } + attacker.updateActivity(true); final List<String> commandList = attacker.getPowertool(attacker.getItemInHand()); if (commandList != null && !commandList.isEmpty()) { - for (String command : commandList) + for (final String command : commandList) { if (command != null && !command.isEmpty()) { - attacker.getServer().dispatchCommand(attacker, command.replaceAll("\\{player\\}", defender.getName())); + ess.scheduleSyncDelayedTask( + new Runnable() + { + @Override + public void run() + { + attacker.getServer().dispatchCommand(attacker.getBase(), command.replaceAll("\\{player\\}", defender.getName())); + } + }); + event.setCancelled(true); return; } } } } - else if (eDefend instanceof Animals && eAttack instanceof Player) + else if (eAttack instanceof Player) { final User player = ess.getUser(eAttack); - final ItemStack hand = player.getItemInHand(); - if (hand != null && hand.getType() == Material.MILK_BUCKET) + player.updateActivity(true); + if (eDefend instanceof Ageable) { - ((Animals)eDefend).setAge(-24000); - hand.setType(Material.BUCKET); - player.setItemInHand(hand); - player.updateInventory(); - event.setCancelled(true); + final ItemStack hand = player.getItemInHand(); + if (hand != null && hand.getType() == Material.MILK_BUCKET) + { + ((Ageable)eDefend).setBaby(); + hand.setType(Material.BUCKET); + player.setItemInHand(hand); + player.updateInventory(); + event.setCancelled(true); + } } } } - @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onEntityDamage(final EntityDamageEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) @@ -77,7 +99,7 @@ public class EssentialsEntityListener implements Listener } } - @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onEntityCombust(final EntityCombustEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) @@ -101,7 +123,18 @@ public class EssentialsEntityListener implements Listener } } - @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) + @EventHandler(priority = EventPriority.LOW) + public void onPlayerDeathExpEvent(final PlayerDeathEvent event) + { + final User user = ess.getUser(event.getEntity()); + if (user.isAuthorized("essentials.keepxp")) + { + event.setKeepLevel(true); + event.setDroppedExp(0); + } + } + + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onFoodLevelChange(final FoodLevelChangeEvent event) { if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) @@ -110,7 +143,7 @@ public class EssentialsEntityListener implements Listener } } - @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onEntityRegainHealth(final EntityRegainHealthEvent event) { if (event.getRegainReason() == RegainReason.SATIATED && event.getEntity() instanceof Player diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 36adf37e2..c84541405 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -12,9 +12,10 @@ import java.util.List; import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; +import net.minecraft.server.InventoryEnderChest; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.Server; +import org.bukkit.entity.HumanEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -25,19 +26,21 @@ import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerLoginEvent.Result; import org.bukkit.event.player.*; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; public class EssentialsPlayerListener implements Listener { private static final Logger LOGGER = Logger.getLogger("Minecraft"); - private final transient Server server; private final transient IEssentials ess; + private static final int AIR = Material.AIR.getId(); + private static final int BED = Material.BED_BLOCK.getId(); public EssentialsPlayerListener(final IEssentials parent) { this.ess = parent; - this.server = parent.getServer(); } @EventHandler(priority = EventPriority.NORMAL) @@ -49,7 +52,7 @@ public class EssentialsPlayerListener implements Listener } @EventHandler(priority = EventPriority.LOWEST) - public void onPlayerChat(final PlayerChatEvent event) + public void onPlayerChat(final AsyncPlayerChatEvent event) { final User user = ess.getUser(event.getPlayer()); if (user.isMuted()) @@ -62,7 +65,7 @@ public class EssentialsPlayerListener implements Listener while (it.hasNext()) { final User u = ess.getUser(it.next()); - if (u.isIgnoredPlayer(user.getName())) + if (u.isIgnoredPlayer(user)) { it.remove(); } @@ -74,19 +77,24 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerMove(final PlayerMoveEvent event) { - if (event.getFrom().getBlockX() == event.getTo().getBlockX() - && event.getFrom().getBlockZ() == event.getTo().getBlockZ() - && event.getFrom().getBlockY() == event.getTo().getBlockY()) + if ((!ess.getSettings().cancelAfkOnMove() && !ess.getSettings().getFreezeAfkPlayers()) + || event.getFrom().getBlockX() == event.getTo().getBlockX() + && event.getFrom().getBlockZ() == event.getTo().getBlockZ() + && event.getFrom().getBlockY() == event.getTo().getBlockY()) { return; } final User user = ess.getUser(event.getPlayer()); - if (user.isAfk() && ess.getSettings().getFreezeAfkPlayers()) { final Location from = event.getFrom(); - final Location to = event.getTo().clone(); + final Location origTo = event.getTo(); + final Location to = origTo.clone(); + if (ess.getSettings().cancelAfkOnMove() && origTo.getY() >= from.getBlockY() + 1) { + user.updateActivity(true); + return; + } to.setX(from.getX()); to.setY(from.getY()); to.setZ(from.getZ()); @@ -100,7 +108,6 @@ public class EssentialsPlayerListener implements Listener } return; } - final Location afk = user.getAfkPosition(); if (afk == null || !event.getTo().getWorld().equals(afk.getWorld()) || afk.distanceSquared(event.getTo()) > 9) { @@ -114,7 +121,14 @@ public class EssentialsPlayerListener implements Listener final User user = ess.getUser(event.getPlayer()); if (ess.getSettings().removeGodOnDisconnect() && user.isGodModeEnabled()) { - user.toggleGodModeEnabled(); + user.setGodModeEnabled(false); + } + if (user.isVanished()) + { + user.toggleVanished(); + } + if (!user.isJailed()) { + user.setLastLocation(); } user.updateActivity(false); user.dispose(); @@ -123,14 +137,37 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event) { - ess.getBackup().onPlayerJoin(); - final User user = ess.getUser(event.getPlayer()); + ess.scheduleAsyncDelayedTask(new Runnable() + { + @Override + public void run() + { + delayedJoin(event.getPlayer()); + } + }); + } + public void delayedJoin(final Player player) + { + if (!player.isOnline()) + { + return; + } + ess.getBackup().onPlayerJoin(); + final User user = ess.getUser(player); user.setDisplayNick(); + updateCompass(user); user.setLastLogin(System.currentTimeMillis()); - user.updateActivity(false); - updateCompass(user); + + for (String p : ess.getVanishedPlayers()) + { + if (!user.isAuthorized("essentials.vanish.see")) + { + user.hidePlayer(ess.getUser(p).getBase()); + } + } + if (user.isAuthorized("essentials.sleepingignored")) { user.setSleepingIgnored(true); @@ -172,6 +209,27 @@ public class EssentialsPlayerListener implements Listener } } + private void updateCompass(final User user) + { + Location loc = user.getHome(user.getLocation()); + if (loc == null) + { + loc = user.getBedSpawnLocation(); + } + if (loc != null) + { + final Location updateLoc = loc; + ess.scheduleSyncDelayedTask(new Runnable() + { + @Override + public void run() + { + user.setCompassTarget(updateLoc); + } + }); + } + } + @EventHandler(priority = EventPriority.HIGH) public void onPlayerLogin(final PlayerLoginEvent event) { @@ -185,7 +243,7 @@ public class EssentialsPlayerListener implements Listener return; } - User user = ess.getUser(event.getPlayer()); + final User user = ess.getUser(event.getPlayer()); if (user.isNPC()) { user.setNPC(false); @@ -211,30 +269,24 @@ public class EssentialsPlayerListener implements Listener event.allow(); } - private void updateCompass(final User user) - { - Location loc = user.getHome(user.getLocation()); - if (loc == null) - { - loc = user.getBedSpawnLocation(); - } - if (loc != null) - { - user.setCompassTarget(loc); - } - } - @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerTeleport(final PlayerTeleportEvent event) { - //TODO: Don't fetch user unless one of these features are enabled. - final User user = ess.getUser(event.getPlayer()); - //There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports. - if ((event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND) && ess.getSettings().registerBackInListener()) + final boolean backListener = ess.getSettings().registerBackInListener(); + final boolean teleportInvulnerability = ess.getSettings().isTeleportInvulnerability(); + if (backListener || teleportInvulnerability) { - user.setLastLocation(); + final User user = ess.getUser(event.getPlayer()); + //There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports. + if (backListener && (event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND)) + { + user.setLastLocation(); + } + if (teleportInvulnerability) + { + user.enableInvulnerabilityAfterTeleport(); + } } - user.enableInvulnerabilityAfterTeleport(); } @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) @@ -266,26 +318,27 @@ public class EssentialsPlayerListener implements Listener }); } } + private final static List<String> COMMANDS = Arrays.asList("msg", "r", "mail", "m", "t", "whisper", "emsg", "tell", "er", "reply", "ereply", "email", "action", "describe", "eme", "eaction", "edescribe", "etell", "ewhisper", "pm"); @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event) { - final User user = ess.getUser(event.getPlayer()); + final Player player = event.getPlayer(); final String cmd = event.getMessage().toLowerCase(Locale.ENGLISH).split(" ")[0].replace("/", "").toLowerCase(Locale.ENGLISH); - final List<String> commands = Arrays.asList("msg", "r", "mail", "m", "t", "emsg", "tell", "er", "reply", "ereply", "email"); - if (commands.contains(cmd)) + if (COMMANDS.contains(cmd)) { - for (Player player : ess.getServer().getOnlinePlayers()) + for (Player onlinePlayer : ess.getServer().getOnlinePlayers()) { - final User spyer = ess.getUser(player); - if (spyer.isSocialSpyEnabled() && !user.equals(spyer)) + final User spyer = ess.getUser(onlinePlayer); + if (spyer.isSocialSpyEnabled() && !player.equals(onlinePlayer)) { - player.sendMessage(user.getDisplayName() + " : " + event.getMessage()); + onlinePlayer.sendMessage(player.getDisplayName() + " : " + event.getMessage()); } } } - if (!cmd.equalsIgnoreCase("afk")) + else if (!cmd.equalsIgnoreCase("afk")) { + final User user = ess.getUser(player); user.updateActivity(true); } } @@ -294,40 +347,42 @@ public class EssentialsPlayerListener implements Listener public void onPlayerChangedWorld(final PlayerChangedWorldEvent event) { final User user = ess.getUser(event.getPlayer()); + final String newWorld = event.getPlayer().getLocation().getWorld().getName(); user.setDisplayNick(); updateCompass(user); + if (ess.getSettings().getNoGodWorlds().contains(newWorld) && user.isGodModeEnabledRaw()) + { + user.sendMessage(_("noGodWorldWarning")); + } - if (ess.getSettings().getNoGodWorlds().contains(event.getPlayer().getLocation().getWorld().getName())) + if (!event.getPlayer().getWorld().getName().equals(newWorld)) { - if (user.isGodModeEnabledRaw()) - { - user.sendMessage(_("noGodWorldWarning")); - } + user.sendMessage(_("currentWorld", newWorld)); } } @EventHandler(priority = EventPriority.NORMAL) public void onPlayerInteract(final PlayerInteractEvent event) { - final User user = ess.getUser(event.getPlayer()); - user.updateActivity(true); switch (event.getAction()) { case RIGHT_CLICK_BLOCK: - if (event.isCancelled()) - { - return; - } - if (event.getClickedBlock().getType() == Material.BED_BLOCK && ess.getSettings().getUpdateBedAtDaytime()) + if (!event.isCancelled() && event.getClickedBlock().getTypeId() == BED && ess.getSettings().getUpdateBedAtDaytime()) { - event.getPlayer().setBedSpawnLocation(event.getClickedBlock().getLocation()); + Player player = event.getPlayer(); + player.setBedSpawnLocation(event.getClickedBlock().getLocation()); + player.sendMessage(_("homeSet", player.getLocation().getWorld().getName(), player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ())); } break; - case LEFT_CLICK_BLOCK: case LEFT_CLICK_AIR: - if (user.hasPowerTools() && user.arePowerToolsEnabled() && usePowertools(user, event.getItem())) + case LEFT_CLICK_BLOCK: + if (event.getItem() != null && event.getItem().getTypeId() != AIR) { - event.setCancelled(true); + final User user = ess.getUser(event.getPlayer()); + if (user.hasPowerTools() && user.arePowerToolsEnabled() && usePowertools(user, event.getItem().getTypeId())) + { + event.setCancelled(true); + } } break; default: @@ -335,13 +390,8 @@ public class EssentialsPlayerListener implements Listener } } - private boolean usePowertools(final User user, final ItemStack is) + private boolean usePowertools(final User user, final int id) { - int id; - if (is == null || (id = is.getTypeId()) == 0) - { - return false; - } final List<String> commandList = user.getPowertool(id); if (commandList == null || commandList.isEmpty()) { @@ -351,9 +401,8 @@ public class EssentialsPlayerListener implements Listener // We need to loop through each command and execute for (final String command : commandList) { - if (command.matches(".*\\{player\\}.*")) + if (command.contains("{player}")) { - //user.sendMessage("Click a player to use this command"); continue; } else if (command.startsWith("c:")) @@ -381,14 +430,12 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayerPickupItem(final PlayerPickupItemEvent event) { - if (!ess.getSettings().getDisableItemPickupWhileAfk()) + if (ess.getSettings().getDisableItemPickupWhileAfk()) { - return; - } - final User user = ess.getUser(event.getPlayer()); - if (user.isAfk()) - { - event.setCancelled(true); + if (ess.getUser(event.getPlayer()).isAfk()) + { + event.setCancelled(true); + } } } @@ -398,7 +445,22 @@ public class EssentialsPlayerListener implements Listener if (event.getView().getTopInventory().getType() == InventoryType.PLAYER) { final User user = ess.getUser(event.getWhoClicked()); - if (user.isInvSee() && !user.isAuthorized("essentials.invsee.modify")) + final InventoryHolder invHolder = event.getView().getTopInventory().getHolder(); + if (invHolder != null && invHolder instanceof HumanEntity) + { + final User invOwner = ess.getUser((HumanEntity)invHolder); + if (user.isInvSee() && (!user.isAuthorized("essentials.invsee.modify") + || invOwner.isAuthorized("essentials.invsee.preventmodify") + || !invOwner.isOnline())) + { + event.setCancelled(true); + } + } + } + else if (event.getView().getTopInventory().getType() == InventoryType.ENDER_CHEST) + { + final User user = ess.getUser(event.getWhoClicked()); + if (user.isEnderSee() && (!user.isAuthorized("essentials.enderchest.modify"))) { event.setCancelled(true); } @@ -413,5 +475,10 @@ public class EssentialsPlayerListener implements Listener final User user = ess.getUser(event.getPlayer()); user.setInvSee(false); } + else if (event.getView().getTopInventory().getType() == InventoryType.ENDER_CHEST) + { + final User user = ess.getUser(event.getPlayer()); + user.setEnderSee(false); + } } -} +}
\ No newline at end of file diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java index 11f42e701..2ec8538ca 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java @@ -24,7 +24,7 @@ public class EssentialsPluginListener implements Listener, IConf ess.getAlternativeCommandsHandler().addPlugin(event.getPlugin()); if (!ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().setMethod(ess.getServer().getPluginManager())) { - ess.getLogger().log(Level.INFO, "Payment method found (" + ess.getPaymentMethod().getMethod().getName() + " version: " + ess.getPaymentMethod().getMethod().getVersion() + ")"); + ess.getLogger().log(Level.INFO, "Payment method found (" + ess.getPaymentMethod().getMethod().getLongName() + " version: " + ess.getPaymentMethod().getMethod().getVersion() + ")"); } } diff --git a/Essentials/src/com/earth2me/essentials/EssentialsTimer.java b/Essentials/src/com/earth2me/essentials/EssentialsTimer.java index 18f980a62..95cf77521 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsTimer.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsTimer.java @@ -2,6 +2,7 @@ package com.earth2me.essentials; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedList; import java.util.Set; import java.util.logging.Level; import org.bukkit.entity.Player; @@ -11,6 +12,8 @@ public class EssentialsTimer implements Runnable { private final transient IEssentials ess; private final transient Set<User> onlineUsers = new HashSet<User>(); + private transient long lastPoll = System.currentTimeMillis(); + private final transient LinkedList<Float> history = new LinkedList<Float>(); EssentialsTimer(final IEssentials ess) { @@ -21,6 +24,21 @@ public class EssentialsTimer implements Runnable public void run() { final long currentTime = System.currentTimeMillis(); + long timeSpent = (currentTime - lastPoll) / 1000; + if (timeSpent == 0) + { + timeSpent = 1; + } + if (history.size() > 10) + { + history.remove(); + } + float tps = 100f / timeSpent; + if (tps <= 20) + { + history.add(tps); + } + lastPoll = currentTime; for (Player player : ess.getServer().getOnlinePlayers()) { try @@ -51,4 +69,17 @@ public class EssentialsTimer implements Runnable user.resetInvulnerabilityAfterTeleport(); } } + + public float getAverageTPS() + { + float avg = 0; + for (Float f : history) + { + if (f != null) + { + avg += f; + } + } + return avg / history.size(); + } } diff --git a/Essentials/src/com/earth2me/essentials/I18n.java b/Essentials/src/com/earth2me/essentials/I18n.java index 97d500a6a..c00180087 100644 --- a/Essentials/src/com/earth2me/essentials/I18n.java +++ b/Essentials/src/com/earth2me/essentials/I18n.java @@ -70,7 +70,8 @@ public class I18n implements II18n public static String _(final String string, final Object... objects) { - if (instance == null) { + if (instance == null) + { return ""; } if (objects.length == 0) @@ -85,11 +86,20 @@ public class I18n implements II18n public String format(final String string, final Object... objects) { - final String format = translate(string); + String format = translate(string); MessageFormat messageFormat = messageFormatCache.get(format); if (messageFormat == null) { - messageFormat = new MessageFormat(format); + try + { + messageFormat = new MessageFormat(format); + } + catch (IllegalArgumentException e) + { + ess.getLogger().log(Level.SEVERE, "Invalid Translation key for '" + string + "': " + e.getMessage()); + format = format.replaceAll("\\{(\\D*?)\\}", "\\[$1\\]"); + messageFormat = new MessageFormat(format); + } messageFormatCache.put(format, messageFormat); } return messageFormat.format(objects); diff --git a/Essentials/src/com/earth2me/essentials/IConf.java b/Essentials/src/com/earth2me/essentials/IConf.java index 580e6232f..a523f8638 100644 --- a/Essentials/src/com/earth2me/essentials/IConf.java +++ b/Essentials/src/com/earth2me/essentials/IConf.java @@ -1,9 +1,5 @@ package com.earth2me.essentials; -/** - * @deprecated New interface will be IReload in api package - */ -@Deprecated public interface IConf { public void reloadConfig(); } diff --git a/Essentials/src/com/earth2me/essentials/IEssentials.java b/Essentials/src/com/earth2me/essentials/IEssentials.java index 83c2e7325..9d61391d1 100644 --- a/Essentials/src/com/earth2me/essentials/IEssentials.java +++ b/Essentials/src/com/earth2me/essentials/IEssentials.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.api.IJails; import com.earth2me.essentials.metrics.Metrics; import com.earth2me.essentials.perm.PermissionsHandler; import com.earth2me.essentials.register.payment.Methods; +import java.util.List; import org.bukkit.World; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -11,10 +12,6 @@ import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitScheduler; -/** - * @deprecated This will be moved to the api package soon - */ -@Deprecated public interface IEssentials extends Plugin { void addReloadListener(IConf listener); @@ -71,4 +68,7 @@ public interface IEssentials extends Plugin void setMetrics(Metrics metrics); + EssentialsTimer getTimer(); + + List<String> getVanishedPlayers(); } diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index 74942640e..e1781cb46 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -127,7 +127,7 @@ public interface ISettings extends IConf boolean removeGodOnDisconnect(); boolean changeDisplayName(); - + boolean changePlayerListName(); boolean isPlayerCommand(String string); @@ -146,6 +146,8 @@ public interface ISettings extends IConf boolean getFreezeAfkPlayers(); + boolean cancelAfkOnMove(); + boolean areDeathMessagesEnabled(); public void setDebug(boolean debug); @@ -158,6 +160,8 @@ public interface ISettings extends IConf boolean isWorldTeleportPermissions(); + boolean isWorldHomePermissions(); + boolean registerBackInListener(); boolean getDisableItemPickupWhileAfk(); @@ -165,10 +169,20 @@ public interface ISettings extends IConf EventPriority getRespawnPriority(); long getTpaAcceptCancellation(); - + boolean isMetricsEnabled(); - + void setMetricsEnabled(boolean metricsEnabled); - public long getTeleportInvulnerability(); + long getTeleportInvulnerability(); + + boolean isTeleportInvulnerability(); + + long getLoginAttackDelay(); + + int getSignUsePerSecond(); + + double getMaxFlySpeed(); + + double getMaxWalkSpeed(); } diff --git a/Essentials/src/com/earth2me/essentials/IUser.java b/Essentials/src/com/earth2me/essentials/IUser.java index df5401886..8c0d6212f 100644 --- a/Essentials/src/com/earth2me/essentials/IUser.java +++ b/Essentials/src/com/earth2me/essentials/IUser.java @@ -1,16 +1,10 @@ package com.earth2me.essentials; import com.earth2me.essentials.commands.IEssentialsCommand; -import java.net.InetSocketAddress; import org.bukkit.Location; import org.bukkit.entity.Player; -import org.bukkit.inventory.PlayerInventory; -/** - * @deprecated This will be moved to the api package soon - */ -@Deprecated public interface IUser extends Player { long getLastTeleportTimestamp(); diff --git a/Essentials/src/com/earth2me/essentials/Jails.java b/Essentials/src/com/earth2me/essentials/Jails.java index 00c9d8999..0aa90e08c 100644 --- a/Essentials/src/com/earth2me/essentials/Jails.java +++ b/Essentials/src/com/earth2me/essentials/Jails.java @@ -9,12 +9,16 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.Bukkit; import org.bukkit.Location; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockDamageEvent; import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerRespawnEvent; @@ -38,10 +42,8 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett { enabled = true; final PluginManager pluginManager = ess.getServer().getPluginManager(); - final JailBlockListener blockListener = new JailBlockListener(); - final JailPlayerListener playerListener = new JailPlayerListener(); + final JailListener blockListener = new JailListener(); pluginManager.registerEvents(blockListener, ess); - pluginManager.registerEvents(playerListener, ess); } @Override @@ -179,7 +181,7 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett } - private class JailBlockListener implements Listener + private class JailListener implements Listener { @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onBlockBreak(final BlockBreakEvent event) @@ -210,11 +212,25 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett event.setCancelled(true); } } - } + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) + public void onEntityDamageByEntity(final EntityDamageByEntityEvent event) + { + if (event.getCause() != DamageCause.ENTITY_ATTACK || event.getEntity().getType() != EntityType.PLAYER) + { + return; + } + final Entity damager = event.getDamager(); + if (damager.getType() == EntityType.PLAYER) + { + final User user = ess.getUser(damager); + if (user != null && user.isJailed()) + { + event.setCancelled(true); + } + } + } - private class JailPlayerListener implements Listener - { @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayerInteract(final PlayerInteractEvent event) { diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index 36a2e60b0..8ccef0024 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -5,6 +5,7 @@ import static com.earth2me.essentials.I18n.capitalCase; import com.earth2me.essentials.commands.NoChargeException; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import java.util.*; +import java.util.logging.Level; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.enchantments.Enchantment; @@ -22,7 +23,7 @@ public class Kit final StringBuilder list = new StringBuilder(); for (String kiteItem : kits.getKeys(false)) { - if (user.isAuthorized("essentials.kit." + kiteItem.toLowerCase(Locale.ENGLISH))) + if (user == null || user.isAuthorized("essentials.kit." + kiteItem.toLowerCase(Locale.ENGLISH))) { list.append(" ").append(capitalCase(kiteItem)); } @@ -31,33 +32,46 @@ public class Kit } catch (Exception ex) { - throw new Exception(_("kitError")); + throw new Exception(_("kitError"), ex); } } public static void checkTime(final User user, final String kitName, final Map<String, Object> els) throws NoChargeException { - final double delay = els.containsKey("delay") ? ((Number)els.get("delay")).doubleValue() : 0L; - final Calendar c = new GregorianCalendar(); - c.add(Calendar.SECOND, -(int)delay); - c.add(Calendar.MILLISECOND, -(int)((delay * 1000.0) % 1000.0)); + if (user.isAuthorized("essentials.kit.exemptdelay")) { + return; + } + + final Calendar time = new GregorianCalendar(); - final long mintime = c.getTimeInMillis(); + // Take the current time, and remove the delay from it. + final double delay = els.containsKey("delay") ? ((Number)els.get("delay")).doubleValue() : 0L; + final Calendar earliestTime = new GregorianCalendar(); + earliestTime.add(Calendar.SECOND, -(int)delay); + earliestTime.add(Calendar.MILLISECOND, -(int)((delay * 1000.0) % 1000.0)); + // This value contains the most recent time a kit could have been used that would allow another use. + final long earliestLong = earliestTime.getTimeInMillis(); + // When was the last kit used? final Long lastTime = user.getKitTimestamp(kitName); - if (lastTime == null || lastTime < mintime) + + if (lastTime == null || lastTime < earliestLong) { - final Calendar now = new GregorianCalendar(); - user.setKitTimestamp(kitName, now.getTimeInMillis()); + user.setKitTimestamp(kitName, time.getTimeInMillis()); + } + else if (lastTime > time.getTimeInMillis()) + { + // This is to make sure time didn't get messed up on last kit use. + // If this happens, let's give the user the benifit of the doubt. + user.setKitTimestamp(kitName, time.getTimeInMillis()); } else { - final Calendar future = new GregorianCalendar(); - future.setTimeInMillis(lastTime); - future.add(Calendar.SECOND, (int)delay); - future.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0)); - user.sendMessage(_("kitTimed", Util.formatDateDiff(future.getTimeInMillis()))); + time.setTimeInMillis(lastTime); + time.add(Calendar.SECOND, (int)delay); + time.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0)); + user.sendMessage(_("kitTimed", Util.formatDateDiff(time.getTimeInMillis()))); throw new NoChargeException(); } } @@ -68,6 +82,7 @@ public class Kit { throw new Exception(_("kitError2")); } + try { @@ -76,7 +91,7 @@ public class Kit catch (Exception e) { user.sendMessage(_("kitError2")); - throw new Exception(_("kitErrorHelp")); + throw new Exception(_("kitErrorHelp"), e); } } @@ -104,6 +119,10 @@ public class Kit continue; } final Enchantment enchantment = Enchantments.getByName(split[0]); + if (enchantment == null) + { + throw new Exception("Enchantment not found: " + split[0]); + } int level; if (split.length > 1) { @@ -113,7 +132,14 @@ public class Kit { level = enchantment.getMaxLevel(); } - stack.addEnchantment(enchantment, level); + try + { + stack.addEnchantment(enchantment, level); + } + catch (Exception ex) + { + throw new Exception("Enchantment " + enchantment.getName() + ": " + ex.getMessage(), ex); + } } } @@ -141,7 +167,15 @@ public class Kit catch (Exception e) { user.updateInventory(); - throw new Exception(_("kitError2")); + if (ess.getSettings().isDebug()) + { + ess.getLogger().log(Level.WARNING, e.getMessage()); + } + else + { + ess.getLogger().log(Level.WARNING, e.getMessage()); + } + throw new Exception(_("kitError2"), e); } } } diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java index c6230f5e0..e861056ad 100644 --- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java +++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java @@ -1051,4 +1051,58 @@ public class OfflinePlayer implements Player { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public int getExpToLevel() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean hasLineOfSight(Entity entity) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isValid() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFlySpeed(float value) throws IllegalArgumentException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setWalkSpeed(float value) throws IllegalArgumentException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getFlySpeed() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getWalkSpeed() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Inventory getEnderChest() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void playSound(Location arg0, Sound arg1, float arg2, float arg3) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 9dee4e990..73beb1891 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -77,11 +77,17 @@ public class Settings implements ISettings { return config.getInt("sethome-multiple." + set, config.getInt("sethome-multiple.default", 3)); } + private int chatRadius = 0; + + private int _getChatRadius() + { + return config.getInt("chat.radius", config.getInt("chat-radius", 0)); + } @Override public int getChatRadius() { - return config.getInt("chat.radius", config.getInt("chat-radius", 0)); + return chatRadius; } @Override @@ -113,19 +119,29 @@ public class Settings implements ISettings { return isCommandDisabled(cmd.getName()); } + private Set<String> disabledCommands = new HashSet<String>(); @Override public boolean isCommandDisabled(String label) { + return disabledCommands.contains(label); + } + + private Set<String> getDisabledCommands() + { + Set<String> disCommands = new HashSet<String>(); for (String c : config.getStringList("disabled-commands")) { - if (!c.equalsIgnoreCase(label)) + disCommands.add(c.toLowerCase(Locale.ENGLISH)); + } + for (String c : config.getKeys(false)) + { + if (c.startsWith("disable-")) { - continue; + disCommands.add(c.substring(8).toLowerCase(Locale.ENGLISH)); } - return true; } - return config.getBoolean("disable-" + label.toLowerCase(Locale.ENGLISH), false); + return disCommands; } @Override @@ -192,11 +208,17 @@ public class Settings implements ISettings } return cost; } + private String nicknamePrefix = "~"; + + private String _getNicknamePrefix() + { + return config.getString("nickname-prefix", "~"); + } @Override public String getNicknamePrefix() { - return config.getString("nickname-prefix", "~"); + return nicknamePrefix; } @Override @@ -250,9 +272,15 @@ public class Settings implements ISettings } return null; } + private ChatColor operatorColor = null; @Override - public ChatColor getOperatorColor() throws Exception + public ChatColor getOperatorColor() + { + return operatorColor; + } + + private ChatColor _getOperatorColor() { String colorName = config.getString("ops-name-color", null); @@ -262,7 +290,7 @@ public class Settings implements ISettings } if ("none".equalsIgnoreCase(colorName) || colorName.isEmpty()) { - throw new Exception(); + return null; } try @@ -317,7 +345,7 @@ public class Settings implements ISettings { return config.getString("backup.command", null); } - private Map<String, MessageFormat> chatFormats = new HashMap<String, MessageFormat>(); + private Map<String, MessageFormat> chatFormats = Collections.synchronizedMap(new HashMap<String, MessageFormat>()); @Override public MessageFormat getChatFormat(String group) @@ -382,9 +410,28 @@ public class Settings implements ISettings config.load(); noGodWorlds = new HashSet<String>(config.getStringList("no-god-in-worlds")); enabledSigns = _getEnabledSigns(); + teleportInvulnerability = _isTeleportInvulnerability(); + disableItemPickupWhileAfk = _getDisableItemPickupWhileAfk(); + registerBackInListener = _registerBackInListener(); + cancelAfkOnMove = _cancelAfkOnMove(); + getFreezeAfkPlayers = _getFreezeAfkPlayers(); itemSpawnBl = _getItemSpawnBlacklist(); + loginAttackDelay = _getLoginAttackDelay(); + signUsePerSecond = _getSignUsePerSecond(); kits = _getKits(); chatFormats.clear(); + changeDisplayName = _changeDisplayName(); + disabledCommands = getDisabledCommands(); + nicknamePrefix = _getNicknamePrefix(); + operatorColor = _getOperatorColor(); + changePlayerListName = _changePlayerListName(); + configDebug = _isDebug(); + prefixsuffixconfigured = _isPrefixSuffixConfigured(); + addprefixsuffix = _addPrefixSuffix(); + disablePrefix = _disablePrefix(); + disableSuffix = _disableSuffix(); + chatRadius = _getChatRadius(); + warnOnBuildDisallow = _warnOnBuildDisallow(); } private List<Integer> itemSpawnBl = new ArrayList<Integer>(); @@ -465,18 +512,33 @@ public class Settings implements ISettings { return config.getBoolean("spawn-if-no-home", false); } + + private boolean warnOnBuildDisallow; + private boolean _warnOnBuildDisallow() + { + return config.getBoolean("protect.disable.warn-on-build-disallow", false); + } + @Override public boolean warnOnBuildDisallow() { - return config.getBoolean("protect.disable.warn-on-build-disallow", false); + return warnOnBuildDisallow; } + + private boolean debug = false; + private boolean configDebug = false; + + private boolean _isDebug() + { + return config.getBoolean("debug", false); + } @Override public boolean isDebug() { - return debug || config.getBoolean("debug", false); + return debug || configDebug; } @Override @@ -603,17 +665,29 @@ public class Settings implements ISettings { return config.getBoolean("remove-god-on-disconnect", false); } + private boolean changeDisplayName = true; + + private boolean _changeDisplayName() + { + return config.getBoolean("change-displayname", true); + } @Override public boolean changeDisplayName() { - return config.getBoolean("change-displayname", true); + return changeDisplayName; + } + private boolean changePlayerListName = false; + + private boolean _changePlayerListName() + { + return config.getBoolean("change-playerlist", false); } @Override public boolean changePlayerListName() { - return config.getBoolean("change-playerlist", false); + return changePlayerListName; } @Override @@ -621,23 +695,47 @@ public class Settings implements ISettings { return config.getBoolean("use-bukkit-permissions", false); } + private boolean prefixsuffixconfigured = false; + private boolean addprefixsuffix = false; + + private boolean _addPrefixSuffix() + { + return config.getBoolean("add-prefix-suffix", false); + } + + private boolean _isPrefixSuffixConfigured() + { + return config.hasProperty("add-prefix-suffix"); + } @Override public boolean addPrefixSuffix() { - return config.getBoolean("add-prefix-suffix", ess.getServer().getPluginManager().isPluginEnabled("EssentialsChat")); + return prefixsuffixconfigured ? addprefixsuffix : ess.getServer().getPluginManager().isPluginEnabled("EssentialsChat"); + } + private boolean disablePrefix = false; + + private boolean _disablePrefix() + { + return config.getBoolean("disablePrefix", false); } @Override public boolean disablePrefix() { - return config.getBoolean("disablePrefix", false); + return disablePrefix; + } + private boolean disableSuffix = false; + + private boolean _disableSuffix() + { + return config.getBoolean("disableSuffix", false); } @Override public boolean disableSuffix() { - return config.getBoolean("disableSuffix", false); + return disableSuffix; } @Override @@ -651,12 +749,30 @@ public class Settings implements ISettings { return config.getLong("auto-afk-kick", -1); } + private boolean getFreezeAfkPlayers; @Override public boolean getFreezeAfkPlayers() { + return getFreezeAfkPlayers; + } + + private boolean _getFreezeAfkPlayers() + { return config.getBoolean("freeze-afk-players", false); } + private boolean cancelAfkOnMove; + + @Override + public boolean cancelAfkOnMove() + { + return cancelAfkOnMove; + } + + private boolean _cancelAfkOnMove() + { + return config.getBoolean("cancel-afk-on-move", true); + } @Override public boolean areDeathMessagesEnabled() @@ -690,15 +806,33 @@ public class Settings implements ISettings } @Override + public boolean isWorldHomePermissions() + { + return config.getBoolean("world-home-permissions", false); + } + private boolean registerBackInListener; + + @Override public boolean registerBackInListener() { + return registerBackInListener; + } + + private boolean _registerBackInListener() + { return config.getBoolean("register-back-in-listener", false); } + private boolean disableItemPickupWhileAfk; @Override public boolean getDisableItemPickupWhileAfk() { - return config.getBoolean("disable-item-pickup-while-afk", true); + return disableItemPickupWhileAfk; + } + + private boolean _getDisableItemPickupWhileAfk() + { + return config.getBoolean("disable-item-pickup-while-afk", false); } @Override @@ -745,10 +879,61 @@ public class Settings implements ISettings { this.metricsEnabled = metricsEnabled; } + private boolean teleportInvulnerability; @Override public long getTeleportInvulnerability() { return config.getLong("teleport-invulnerability", 0) * 1000; } + + private boolean _isTeleportInvulnerability() + { + return (config.getLong("teleport-invulnerability", 0) > 0); + } + + @Override + public boolean isTeleportInvulnerability() + { + return teleportInvulnerability; + } + private long loginAttackDelay; + + private long _getLoginAttackDelay() + { + return config.getLong("login-attack-delay", 0) * 1000; + } + + @Override + public long getLoginAttackDelay() + { + return loginAttackDelay; + } + private int signUsePerSecond; + + private int _getSignUsePerSecond() + { + final int perSec = config.getInt("sign-use-per-second", 4); + return perSec > 0 ? perSec : 1; + } + + @Override + public int getSignUsePerSecond() + { + return signUsePerSecond; + } + + @Override + public double getMaxFlySpeed() + { + double maxSpeed = config.getDouble("max-fly-speed", 1.0); + return maxSpeed > 1.0 ? 1.0 : Math.abs(maxSpeed); + } + + @Override + public double getMaxWalkSpeed() + { + double maxSpeed = config.getDouble("max-walk-speed", 0.8); + return maxSpeed > 1.0 ? 1.0 : Math.abs(maxSpeed); + } } diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index 9c21ffc6d..63ff59644 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -2,7 +2,6 @@ package com.earth2me.essentials; import com.earth2me.essentials.api.ITeleport; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.commands.NotEnoughArgumentsException; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.logging.Logger; @@ -146,23 +145,39 @@ public class Teleport implements Runnable, ITeleport public void cooldown(boolean check) throws Exception { - Calendar now = new GregorianCalendar(); + final Calendar time = new GregorianCalendar(); if (user.getLastTeleportTimestamp() > 0) { - double cooldown = ess.getSettings().getTeleportCooldown(); - Calendar cooldownTime = new GregorianCalendar(); - cooldownTime.setTimeInMillis(user.getLastTeleportTimestamp()); - cooldownTime.add(Calendar.SECOND, (int)cooldown); - cooldownTime.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0)); - if (cooldownTime.after(now) && !user.isAuthorized("essentials.teleport.cooldown.bypass")) + // Take the current time, and remove the delay from it. + final double cooldown = ess.getSettings().getTeleportCooldown(); + final Calendar earliestTime = new GregorianCalendar(); + earliestTime.add(Calendar.SECOND, -(int)cooldown); + earliestTime.add(Calendar.MILLISECOND, -(int)((cooldown * 1000.0) % 1000.0)); + // This value contains the most recent time a teleport could have been used that would allow another use. + final long earliestLong = earliestTime.getTimeInMillis(); + + // When was the last teleport used? + final Long lastTime = user.getLastTeleportTimestamp(); + + if (lastTime > time.getTimeInMillis()) { - throw new Exception(_("timeBeforeTeleport", Util.formatDateDiff(cooldownTime.getTimeInMillis()))); + // This is to make sure time didn't get messed up on last kit use. + // If this happens, let's give the user the benifit of the doubt. + user.setLastTeleportTimestamp(time.getTimeInMillis()); + return; + } + else if (lastTime > earliestLong && !user.isAuthorized("essentials.teleport.cooldown.bypass")) + { + time.setTimeInMillis(lastTime); + time.add(Calendar.SECOND, (int)cooldown); + time.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0)); + throw new Exception(_("timeBeforeTeleport", Util.formatDateDiff(time.getTimeInMillis()))); } } // if justCheck is set, don't update lastTeleport; we're just checking if (!check) { - user.setLastTeleportTimestamp(now.getTimeInMillis()); + user.setLastTeleportTimestamp(time.getTimeInMillis()); } } @@ -190,7 +205,7 @@ public class Teleport implements Runnable, ITeleport { cancel(false); } - + public void teleport(Location loc, Trade chargeFor) throws Exception { teleport(new Target(loc), chargeFor, TeleportCause.PLUGIN); @@ -278,13 +293,8 @@ public class Teleport implements Runnable, ITeleport now(new Target(user.getLastLocation()), TeleportCause.COMMAND); } - public void home(IUser user, String home, Trade chargeFor) throws Exception + public void home(Location loc, Trade chargeFor) throws Exception { - final Location loc = user.getHome(home); - if (loc == null) - { - throw new NotEnoughArgumentsException(); - } teleport(new Target(loc), chargeFor, TeleportCause.COMMAND); } } diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java index 730037d9a..707665d93 100644 --- a/Essentials/src/com/earth2me/essentials/Trade.java +++ b/Essentials/src/com/earth2me/essentials/Trade.java @@ -20,6 +20,7 @@ import org.bukkit.inventory.ItemStack; public class Trade { private final transient String command; + private final transient String fallbackCommand; private final transient Double money; private final transient ItemStack itemStack; private final transient Integer exp; @@ -27,27 +28,33 @@ public class Trade public Trade(final String command, final IEssentials ess) { - this(command, null, null, null, ess); + this(command, null, null, null, null, ess); + } + + public Trade(final String command, final String fallback, final IEssentials ess) + { + this(command, fallback, null, null, null, ess); } public Trade(final double money, final IEssentials ess) { - this(null, money, null, null, ess); + this(null, null, money, null, null, ess); } public Trade(final ItemStack items, final IEssentials ess) { - this(null, null, items, null, ess); + this(null, null, null, items, null, ess); } public Trade(final int exp, final IEssentials ess) { - this(null, null, null, exp, ess); + this(null, null, null, null, exp, ess); } - private Trade(final String command, final Double money, final ItemStack item, final Integer exp, final IEssentials ess) + private Trade(final String command, final String fallback, final Double money, final ItemStack item, final Integer exp, final IEssentials ess) { this.command = command; + this.fallbackCommand = fallback; this.money = money; this.itemStack = item; this.exp = exp; @@ -56,6 +63,12 @@ public class Trade public void isAffordableFor(final IUser user) throws ChargeException { + + if (ess.getSettings().isDebug()) + { + ess.getLogger().log(Level.INFO, "checking if " + user.getName() + " can afford charge."); + } + if (getMoney() != null && getMoney() > 0 && !user.canAfford(getMoney())) @@ -197,6 +210,19 @@ public class Trade && !user.isAuthorized("essentials.nocommandcost." + command)) { cost = ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command); + if (cost == 0.0 && fallbackCommand != null && !fallbackCommand.isEmpty()) + { + if (ess.getSettings().isDebug()) + { + ess.getLogger().log(Level.INFO, "checking fallback command cost (" + fallbackCommand + ") cost for " + user.getName()); + } + cost = ess.getSettings().getCommandCost(fallbackCommand.charAt(0) == '/' ? fallbackCommand.substring(1) : fallbackCommand); + } + + if (ess.getSettings().isDebug()) + { + ess.getLogger().log(Level.INFO, "calculated command (" + command + ") cost for " + user.getName() + " as " + cost); + } } return cost; } diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index f931b07d9..a66f3dadf 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -7,9 +7,11 @@ import java.util.Calendar; import java.util.GregorianCalendar; import java.util.logging.Level; import java.util.logging.Logger; +import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; public class User extends UserData implements Comparable<User>, IReplyTo, IUser @@ -17,13 +19,16 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser private CommandSender replyTo = null; private transient User teleportRequester; private transient boolean teleportRequestHere; + private transient boolean vanished; private transient final Teleport teleport; private transient long teleportRequestTime; private transient long lastOnlineActivity; + private transient long lastThrottledAction; private transient long lastActivity = System.currentTimeMillis(); private boolean hidden = false; private transient Location afkPosition = null; private boolean invSee = false; + private boolean enderSee = false; private static final Logger logger = Logger.getLogger("Minecraft"); User(final Player base, final IEssentials ess) @@ -164,6 +169,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser } } + @Override public boolean canAfford(final double cost) { return canAfford(cost, true); @@ -171,6 +177,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser public boolean canAfford(final double cost, final boolean permcheck) { + if (cost <= 0.0) + { + return true; + } final double mon = getMoney(); if (!permcheck || isAuthorized("essentials.eco.loan")) { @@ -262,75 +272,81 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser return teleportRequestHere; } - public String getNick(final boolean addprefixsuffix) + public String getNick(final boolean longnick) { - final StringBuilder nickname = new StringBuilder(); + final StringBuilder prefix = new StringBuilder(); + String nickname; + String suffix = ""; final String nick = getNickname(); if (ess.getSettings().isCommandDisabled("nick") || nick == null || nick.isEmpty() || nick.equals(getName())) { - nickname.append(getName()); + nickname = getName(); } else { - nickname.append(ess.getSettings().getNicknamePrefix()).append(nick); + nickname = ess.getSettings().getNicknamePrefix() + nick; } - if (addprefixsuffix && isOp()) + if (isOp()) { try { - final String opPrefix = ess.getSettings().getOperatorColor().toString(); - if (opPrefix.length() > 0) + final ChatColor opPrefix = ess.getSettings().getOperatorColor(); + if (opPrefix != null && opPrefix.toString().length() > 0) { - nickname.insert(0, opPrefix); - nickname.append("ยงf"); + prefix.insert(0, opPrefix.toString()); + suffix = "ยงf"; } } catch (Exception e) { } } - if (addprefixsuffix && ess.getSettings().addPrefixSuffix()) + + if (ess.getSettings().addPrefixSuffix()) { if (!ess.getSettings().disablePrefix()) { - final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', 'ยง'); - nickname.insert(0, prefix); + final String ptext = ess.getPermissionsHandler().getPrefix(base).replace('&', 'ยง'); + prefix.insert(0, ptext); + suffix = "ยงf"; } if (!ess.getSettings().disableSuffix()) { - final String suffix = ess.getPermissionsHandler().getSuffix(base).replace('&', 'ยง'); - nickname.append(suffix); - if (suffix.length() < 2 || suffix.charAt(suffix.length() - 2) != 'ยง') - { - nickname.append("ยงf"); - } - } - else - { - nickname.append("ยงf"); + final String stext = ess.getPermissionsHandler().getSuffix(base).replace('&', 'ยง'); + suffix = stext + "ยงf"; + suffix = suffix.replace("ยงfยงf", "ยงf"); } } - - return nickname.toString(); + final String strPrefix = prefix.toString(); + String output = strPrefix + nickname + suffix; + if (!longnick && output.length() > 16) + { + output = strPrefix + nickname; + } + if (!longnick && output.length() > 16) + { + output = Util.lastCode(strPrefix) + nickname; + } + if (!longnick && output.length() > 16) + { + output = Util.lastCode(strPrefix) + nickname.substring(0, 14); + } + if (output.charAt(output.length() - 1) == 'ยง') + { + output = output.substring(0, output.length() - 1); + } + return output; } public void setDisplayNick() { if (base.isOnline() && ess.getSettings().changeDisplayName()) { - String name = getNick(true); - setDisplayName(name); - if (name.length() > 16) - { - name = getNick(false); - } - if (name.length() > 16) - { - name = Util.stripFormat(name); - } + setDisplayName(getNick(true)); if (ess.getSettings().changePlayerListName()) { + String name = getNick(false); try { setPlayerListName(name); @@ -453,6 +469,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser public void setHidden(final boolean hidden) { this.hidden = hidden; + if (hidden == true) + { + setLastLogout(getLastOnlineActivity()); + } } //Returns true if status expired during this check @@ -470,6 +490,13 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser } catch (Exception ex) { + try + { + getTeleport().respawn(null, TeleportCause.PLUGIN); + } + catch (Exception ex1) + { + } } return true; } @@ -553,16 +580,6 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser } @Override - public boolean toggleGodModeEnabled() - { - if (!isGodModeEnabled()) - { - setFoodLevel(20); - } - return super.toggleGodModeEnabled(); - } - - @Override public boolean isGodModeEnabled() { return (super.isGodModeEnabled() && !ess.getSettings().getNoGodWorlds().contains(getLocation().getWorld().getName())) @@ -574,6 +591,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser return super.isGodModeEnabled(); } + @Override public String getGroup() { return ess.getPermissionsHandler().getGroup(base); @@ -607,6 +625,16 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser { invSee = set; } + + public boolean isEnderSee() + { + return enderSee; + } + + public void setEnderSee(final boolean set) + { + enderSee = set; + } private transient long teleportInvulnerabilityTimestamp = 0; public void enableInvulnerabilityAfterTeleport() @@ -626,9 +654,67 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser teleportInvulnerabilityTimestamp = 0; } } - + public boolean hasInvulnerabilityAfterTeleport() { return teleportInvulnerabilityTimestamp != 0 && teleportInvulnerabilityTimestamp >= System.currentTimeMillis(); } + + public boolean isVanished() + { + return vanished; + } + + public void setVanished(final boolean set) + { + vanished = set; + if (set) + { + for (Player p : ess.getServer().getOnlinePlayers()) + { + if (!ess.getUser(p).isAuthorized("essentials.vanish.see")) + { + p.hidePlayer(getBase()); + } + } + setHidden(true); + ess.getVanishedPlayers().add(getName()); + } + else + { + for (Player p : ess.getServer().getOnlinePlayers()) + { + p.showPlayer(getBase()); + } + setHidden(false); + ess.getVanishedPlayers().remove(getName()); + } + } + + public void toggleVanished() + { + final boolean set = !vanished; + this.setVanished(set); + } + + public boolean checkSignThrottle() + { + if (isSignThrottled()) + { + return true; + } + updateThrottle(); + return false; + } + + public boolean isSignThrottled() + { + final long minTime = lastThrottledAction + (1000 / ess.getSettings().getSignUsePerSecond()); + return (System.currentTimeMillis() < minTime); + } + + public void updateThrottle() + { + lastThrottledAction = System.currentTimeMillis();; + } } diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index abf338470..8ae1b7a3f 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -3,9 +3,7 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; import java.io.File; import java.util.*; -import java.util.logging.Logger; import org.bukkit.Location; -import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -14,7 +12,6 @@ public abstract class UserData extends PlayerExtension implements IConf { protected final transient IEssentials ess; private final EssentialsConf config; - private static final Logger logger = Logger.getLogger("Minecraft"); protected UserData(Player base, IEssentials ess) { @@ -149,7 +146,7 @@ public abstract class UserData extends PlayerExtension implements IConf public List<String> getHomes() { - return new ArrayList(homes.keySet()); + return new ArrayList<String>(homes.keySet()); } public void setHome(String name, Location loc) @@ -254,11 +251,13 @@ public abstract class UserData extends PlayerExtension implements IConf config.save(); } + @SuppressWarnings("unchecked") public List<String> getPowertool(ItemStack stack) { return (List<String>)powertools.get("" + stack.getTypeId()); } + @SuppressWarnings("unchecked") public List<String> getPowertool(int id) { return (List<String>)powertools.get("" + id); @@ -441,14 +440,14 @@ public abstract class UserData extends PlayerExtension implements IConf public List<String> getIgnoredPlayers() { - return config.getStringList("ignore"); + return Collections.synchronizedList(config.getStringList("ignore")); } public void setIgnoredPlayers(List<String> players) { if (players == null || players.isEmpty()) { - ignoredPlayers = new ArrayList<String>(); + ignoredPlayers = Collections.synchronizedList(new ArrayList<String>()); config.removeProperty("ignore"); } else @@ -459,20 +458,31 @@ public abstract class UserData extends PlayerExtension implements IConf config.save(); } - public boolean isIgnoredPlayer(String name) + @Deprecated + public boolean isIgnoredPlayer(final String userName) { - return ignoredPlayers.contains(name.toLowerCase(Locale.ENGLISH)); + final IUser user = ess.getUser(userName); + if (user == null || !user.isOnline()) + { + return false; + } + return isIgnoredPlayer(user); } - public void setIgnoredPlayer(String name, boolean set) + public boolean isIgnoredPlayer(IUser user) + { + return (ignoredPlayers.contains(user.getName().toLowerCase(Locale.ENGLISH)) && !user.isAuthorized("essentials.chat.ignoreexempt")); + } + + public void setIgnoredPlayer(IUser user, boolean set) { if (set) { - ignoredPlayers.add(name.toLowerCase(Locale.ENGLISH)); + ignoredPlayers.add(user.getName().toLowerCase(Locale.ENGLISH)); } else { - ignoredPlayers.remove(name.toLowerCase(Locale.ENGLISH)); + ignoredPlayers.remove(user.getName().toLowerCase(Locale.ENGLISH)); } setIgnoredPlayers(ignoredPlayers); } @@ -494,16 +504,9 @@ public abstract class UserData extends PlayerExtension implements IConf config.setProperty("godmode", set); config.save(); } - - public boolean toggleGodModeEnabled() - { - boolean ret = !isGodModeEnabled(); - setGodModeEnabled(ret); - return ret; - } private boolean muted; - private boolean getMuted() + public boolean getMuted() { return config.getBoolean("muted", false); } @@ -519,13 +522,6 @@ public abstract class UserData extends PlayerExtension implements IConf config.setProperty("muted", set); config.save(); } - - public boolean toggleMuted() - { - boolean ret = !isMuted(); - setMuted(ret); - return ret; - } private long muteTimeout; private long _getMuteTimeout() @@ -595,7 +591,7 @@ public abstract class UserData extends PlayerExtension implements IConf public void setBanReason(String reason) { - config.setProperty("ban.reason", reason); + config.setProperty("ban.reason", Util.sanitizeString(reason)); config.save(); } diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 510ab8a9a..0b5c3e426 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -80,11 +80,17 @@ public class Util _("second"), _("seconds") }; + int accuracy = 0; for (int i = 0; i < types.length; i++) { + if (accuracy > 2) + { + break; + } int diff = dateDiff(types[i], fromDate, toDate, future); if (diff > 0) { + accuracy++; sb.append(" ").append(diff).append(" ").append(names[i * 2 + (diff > 1 ? 1 : 0)]); } } @@ -92,7 +98,7 @@ public class Util { return "now"; } - return sb.toString(); + return sb.toString().trim(); } private static int dateDiff(int type, Calendar fromDate, Calendar toDate, boolean future) @@ -209,6 +215,13 @@ public class Util { c.add(Calendar.SECOND, seconds * (future ? 1 : -1)); } + + Calendar max = new GregorianCalendar(); + max.add(Calendar.YEAR, 10); + if (c.after(max)) + { + return max.getTimeInMillis(); + } return c.getTimeInMillis(); } // The player can stand inside these materials @@ -242,6 +255,7 @@ public class Util AIR_MATERIALS.add(Material.REDSTONE_TORCH_OFF.getId()); AIR_MATERIALS.add(Material.REDSTONE_TORCH_ON.getId()); AIR_MATERIALS.add(Material.STONE_BUTTON.getId()); + AIR_MATERIALS.add(Material.SNOW.getId()); AIR_MATERIALS.add(Material.SUGAR_CANE_BLOCK.getId()); AIR_MATERIALS.add(Material.DIODE_BLOCK_OFF.getId()); AIR_MATERIALS.add(Material.DIODE_BLOCK_ON.getId()); @@ -249,8 +263,10 @@ public class Util AIR_MATERIALS.add(Material.PUMPKIN_STEM.getId()); AIR_MATERIALS.add(Material.MELON_STEM.getId()); AIR_MATERIALS.add(Material.VINE.getId()); - AIR_MATERIALS.add(Material.NETHER_WARTS.getId()); + AIR_MATERIALS.add(Material.FENCE_GATE.getId()); AIR_MATERIALS.add(Material.WATER_LILY.getId()); + AIR_MATERIALS.add(Material.NETHER_FENCE.getId()); + AIR_MATERIALS.add(Material.NETHER_WARTS.getId()); for (Integer integer : AIR_MATERIALS) { @@ -269,6 +285,45 @@ public class Util } return block.getLocation(); } + public final static int RADIUS = 3; + public final static Vector3D[] VOLUME; + + public static class Vector3D + { + public Vector3D(int x, int y, int z) + { + this.x = x; + this.y = y; + this.z = z; + } + public int x; + public int y; + public int z; + } + + static + { + List<Vector3D> pos = new ArrayList<Vector3D>(); + for (int x = -RADIUS; x <= RADIUS; x++) + { + for (int y = -RADIUS; y <= RADIUS; y++) + { + for (int z = -RADIUS; z <= RADIUS; z++) + { + pos.add(new Vector3D(x, y, z)); + } + } + } + Collections.sort(pos, new Comparator<Vector3D>() + { + @Override + public int compare(Vector3D a, Vector3D b) + { + return (a.x * a.x + a.y * a.y + a.z * a.z) - (b.x * b.x + b.y * b.y + b.z * b.z); + } + }); + VOLUME = pos.toArray(new Vector3D[0]); + } public static Location getSafeDestination(final Location loc) throws Exception { @@ -280,25 +335,46 @@ public class Util int x = loc.getBlockX(); int y = (int)Math.round(loc.getY()); int z = loc.getBlockZ(); + final int origX = x; + final int origY = y; + final int origZ = z; while (isBlockAboveAir(world, x, y, z)) { y -= 1; if (y < 0) { + y = origY; + break; + } + } + + int i = 0; + while (isBlockUnsafe(world, x, y, z)) + { + i++; + if (i >= VOLUME.length) + { + x = origX; + y = origY + RADIUS; + z = origZ; break; } + x = origX + VOLUME[i].x; + y = origY + VOLUME[i].y; + z = origZ + VOLUME[i].z; } while (isBlockUnsafe(world, x, y, z)) { y += 1; - if (y >= world.getHighestBlockYAt(x, z)) + if (y >= world.getMaxHeight()) { x += 1; break; } } + while (isBlockUnsafe(world, x, y, z)) { y -= 1; @@ -306,7 +382,7 @@ public class Util { x += 1; y = world.getHighestBlockYAt(x, z); - if (x - 32 > loc.getBlockX()) + if (x - 48 > loc.getBlockX()) { throw new Exception(_("holeInFloor")); } @@ -333,6 +409,11 @@ public class Util return true; } + if (below.getType() == Material.BED_BLOCK) + { + return true; + } + if ((!AIR_MATERIALS.contains(world.getBlockAt(x, y, z).getType().getId())) || (!AIR_MATERIALS.contains(world.getBlockAt(x, y + 1, z).getType().getId()))) { @@ -495,6 +576,16 @@ public class Util } return buf.toString(); } + + public static String lastCode(final String input) + { + int pos = input.lastIndexOf("ยง"); + if (pos == -1 || (pos + 1) == input.length()) + { + return ""; + } + return input.substring(pos, pos + 2); + } private static transient final Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)"); private static transient final Pattern VANILLA_PATTERN = Pattern.compile("\u00A7+[0-9A-FK-ORa-fk-or]"); private static transient final Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])"); diff --git a/Essentials/src/com/earth2me/essentials/api/IAlternativeCommandsHandler.java b/Essentials/src/com/earth2me/essentials/api/IAlternativeCommandsHandler.java deleted file mode 100644 index 11619bca4..000000000 --- a/Essentials/src/com/earth2me/essentials/api/IAlternativeCommandsHandler.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.earth2me.essentials.api; - -import java.util.Map; -import org.bukkit.command.PluginCommand; - - -public interface IAlternativeCommandsHandler -{ - Map<String, String> disabledCommands(); -} diff --git a/Essentials/src/com/earth2me/essentials/api/IEssentials.java b/Essentials/src/com/earth2me/essentials/api/IEssentials.java deleted file mode 100644 index c04bed0bd..000000000 --- a/Essentials/src/com/earth2me/essentials/api/IEssentials.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.earth2me.essentials.api; - -import com.earth2me.essentials.perm.IPermissionsHandler; -import com.earth2me.essentials.register.payment.Methods; -import org.bukkit.World; -import org.bukkit.command.CommandSender; -import org.bukkit.plugin.Plugin; - - -public interface IEssentials extends Plugin, IReload -{ - void addReloadListener(IReload listener); - - IUser getUser(Object base); - - int broadcastMessage(IUser sender, String message); - - II18n getI18n(); - - ISettings getSettings(); - - IJails getJail(); - - IWarps getWarps(); - - IWorth getWorth(); - - IItemDb getItemDb(); - - IUserMap getUserMap(); - - IEssentialsEconomy getEconomy(); - - World getWorld(String name); - - Methods getPaymentMethod(); - - int scheduleAsyncDelayedTask(Runnable run); - - int scheduleSyncDelayedTask(Runnable run); - - int scheduleSyncDelayedTask(Runnable run, long delay); - - int scheduleSyncRepeatingTask(Runnable run, long delay, long period); - - IPermissionsHandler getPermissionsHandler(); - - IAlternativeCommandsHandler getAlternativeCommandsHandler(); - - void showCommandError(CommandSender sender, String commandLabel, Throwable exception); -} diff --git a/Essentials/src/com/earth2me/essentials/api/IEssentialsEconomy.java b/Essentials/src/com/earth2me/essentials/api/IEssentialsEconomy.java deleted file mode 100644 index 72fb89d26..000000000 --- a/Essentials/src/com/earth2me/essentials/api/IEssentialsEconomy.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.earth2me.essentials.api; - - -public interface IEssentialsEconomy -{ - double getMoney(String name) throws UserDoesNotExistException; - - void setMoney(String name, double balance) throws UserDoesNotExistException, NoLoanPermittedException; - - void add(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException; - - void subtract(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException; - - void divide(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException; - - void multiply(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException; - - void resetBalance(String name) throws UserDoesNotExistException, NoLoanPermittedException; - - boolean hasEnough(String name, double amount) throws UserDoesNotExistException; - - boolean hasMore(String name, double amount) throws UserDoesNotExistException; - - boolean hasLess(String name, double amount) throws UserDoesNotExistException; - - boolean isNegative(String name) throws UserDoesNotExistException; - - String format(double amount); - - boolean playerExists(String name); - - boolean isNPC(String name) throws UserDoesNotExistException; - - boolean createNPC(String name); - - void removeNPC(String name) throws UserDoesNotExistException; -} diff --git a/Essentials/src/com/earth2me/essentials/api/ISettings.java b/Essentials/src/com/earth2me/essentials/api/ISettings.java deleted file mode 100644 index eff65ad87..000000000 --- a/Essentials/src/com/earth2me/essentials/api/ISettings.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.earth2me.essentials.api; - -import com.earth2me.essentials.settings.Settings; -import com.earth2me.essentials.storage.IStorageObjectHolder; - - -public interface ISettings extends IStorageObjectHolder<Settings> -{ - -} diff --git a/Essentials/src/com/earth2me/essentials/api/IUser.java b/Essentials/src/com/earth2me/essentials/api/IUser.java deleted file mode 100644 index 5d2f9d4b8..000000000 --- a/Essentials/src/com/earth2me/essentials/api/IUser.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.earth2me.essentials.api; - -import com.earth2me.essentials.commands.IEssentialsCommand; -import org.bukkit.Location; -import org.bukkit.entity.Player; - - -public interface IUser extends Player, IReload -{ - long getLastTeleportTimestamp(); - - boolean isAuthorized(String node); - - boolean isAuthorized(IEssentialsCommand cmd); - - boolean isAuthorized(IEssentialsCommand cmd, String permissionPrefix); - - void setLastTeleportTimestamp(long time); - - Location getLastLocation(); - - Player getBase(); - - double getMoney(); - - void takeMoney(double value); - - void giveMoney(double value); - - String getGroup(); - - void setLastLocation(); - - Location getHome(String name) throws Exception; - - Location getHome(Location loc) throws Exception; - - boolean isHidden(); - - ITeleport getTeleport(); - - void setJail(String jail); -} diff --git a/Essentials/src/com/earth2me/essentials/api/IUserMap.java b/Essentials/src/com/earth2me/essentials/api/IUserMap.java deleted file mode 100644 index 9e609ab37..000000000 --- a/Essentials/src/com/earth2me/essentials/api/IUserMap.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.earth2me.essentials.api; - -import java.io.File; -import java.util.Set; - - -public interface IUserMap -{ - boolean userExists(final String name); - - IUser getUser(final String name); - - void removeUser(final String name); - - Set<String> getAllUniqueUsers(); - - int getUniqueUsers(); - - File getUserFile(final String name); -} diff --git a/Essentials/src/com/earth2me/essentials/api/IWarps.java b/Essentials/src/com/earth2me/essentials/api/IWarps.java deleted file mode 100644 index 14779e327..000000000 --- a/Essentials/src/com/earth2me/essentials/api/IWarps.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.earth2me.essentials.api; - -import java.util.Collection; -import org.bukkit.Location; - - -public interface IWarps extends IReload -{ - Location getWarp(String warp) throws Exception; - - Collection<String> getWarps(); - - void removeWarp(String name) throws Exception; - - void setWarp(String name, Location loc) throws Exception; -} diff --git a/Essentials/src/com/earth2me/essentials/api/IWorth.java b/Essentials/src/com/earth2me/essentials/api/IWorth.java deleted file mode 100644 index 4add98771..000000000 --- a/Essentials/src/com/earth2me/essentials/api/IWorth.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.earth2me.essentials.api; - -import org.bukkit.inventory.ItemStack; - - -public interface IWorth extends IReload -{ - double getPrice(ItemStack itemStack); - - void setPrice(ItemStack itemStack, double price); -} diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandback.java b/Essentials/src/com/earth2me/essentials/commands/Commandback.java index 2ad39ceea..d2ed98e69 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandback.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandback.java @@ -16,6 +16,11 @@ public class Commandback extends EssentialsCommand @Override protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { + if (user.getWorld() != user.getLastLocation().getWorld() && ess.getSettings().isWorldTeleportPermissions() + && !user.isAuthorized("essentials.world." + user.getLastLocation().getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + user.getLastLocation().getWorld().getName())); + } final Trade charge = new Trade(this.getName(), ess); charge.isAffordableFor(user); user.sendMessage(_("backUsageMsg")); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandban.java b/Essentials/src/com/earth2me/essentials/commands/Commandban.java index bc09cbba8..f98cce98a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandban.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.Console; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import java.util.logging.Level; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -40,20 +41,23 @@ public class Commandban extends EssentialsCommand return; } } - + + final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME; String banReason; if (args.length > 1) { - banReason = getFinalArg(args, 1); - user.setBanReason(banReason); + banReason = _("banFormat", getFinalArg(args, 1), senderName); } else { - banReason = _("defaultBanReason"); + banReason = _("banFormat", _("defaultBanReason"), senderName); } + + user.setBanReason(banReason); user.setBanned(true); user.kickPlayer(banReason); - final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME; + + server.getLogger().log(Level.INFO, _("playerBanned", senderName, user.getName(), banReason)); for (Player onlinePlayer : server.getOnlinePlayers()) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java b/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java index 95bb967c6..e6eeda28b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java @@ -1,6 +1,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.Util; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -20,6 +21,6 @@ public class Commandbroadcast extends EssentialsCommand throw new NotEnoughArgumentsException(); } - ess.broadcastMessage(null, _("broadcast", getFinalArg(args, 0))); + ess.broadcastMessage(null, _("broadcast", Util.replaceFormat(getFinalArg(args, 0)))); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandenderchest.java b/Essentials/src/com/earth2me/essentials/commands/Commandenderchest.java new file mode 100644 index 000000000..bd707d392 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandenderchest.java @@ -0,0 +1,30 @@ +package com.earth2me.essentials.commands; + +import com.earth2me.essentials.User; +import org.bukkit.Server; + + +public class Commandenderchest extends EssentialsCommand +{ + public Commandenderchest() + { + super("enderchest"); + } + + @Override + protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception + { + if (args.length > 0 && user.isAuthorized("essentials.enderchest.others")) + { + final User invUser = getPlayer(server, args, 0); + user.openInventory(invUser.getEnderChest()); + user.setEnderSee(true); + } + else + { + user.openInventory(user.getEnderChest()); + user.setEnderSee(false); + } + + } +} diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java index 6b248f6d5..2a89dcd42 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java @@ -57,7 +57,7 @@ public class Commandessentials extends EssentialsCommand { sender.sendMessage("Essentials " + ess.getDescription().getVersion()); sender.sendMessage("/<command> <reload/debug>"); - sender.sendMessage(_("blockList")); + final StringBuilder disabledCommands = new StringBuilder(); for (Map.Entry<String, String> entry : ess.getAlternativeCommandsHandler().disabledCommands().entrySet()) { @@ -66,7 +66,10 @@ public class Commandessentials extends EssentialsCommand } disabledCommands.append(entry.getKey()).append(" => ").append(entry.getValue()); } - sender.sendMessage(disabledCommands.toString()); + if (disabledCommands.length() > 0) { + sender.sendMessage(_("blockList")); + sender.sendMessage(disabledCommands.toString()); + } } private void run_debug(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception @@ -125,7 +128,7 @@ public class Commandessentials extends EssentialsCommand if (loc.getBlock().getTypeId() == 0) { noteBlocks.put(player, loc.getBlock()); - player.sendBlockChange(loc, Material.NOTE_BLOCK, (byte)0); + loc.getBlock().setType(Material.NOTE_BLOCK); } } taskid = ess.scheduleSyncRepeatingTask(new Runnable() diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandexp.java b/Essentials/src/com/earth2me/essentials/commands/Commandexp.java new file mode 100644 index 000000000..f3dac79e2 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandexp.java @@ -0,0 +1,158 @@ +package com.earth2me.essentials.commands;
+
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
+import com.earth2me.essentials.craftbukkit.SetExpFix;
+import java.util.Locale;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+
+public class Commandexp extends EssentialsCommand
+{
+ public Commandexp()
+ {
+ super("exp");
+ }
+
+ @Override
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
+ {
+ if (args.length == 0)
+ {
+ showExp(user, user);
+ }
+ else if (args[0].equalsIgnoreCase("set") && user.isAuthorized("essentials.exp.set"))
+ {
+ if (args.length == 3 && user.isAuthorized("essentials.exp.set.others"))
+ {
+ expMatch(server, user, args[1], args[2], false);
+ }
+ else
+ {
+ setExp(user, user, args[1], false);
+ }
+ }
+ else if (args[0].equalsIgnoreCase("give") && user.isAuthorized("essentials.exp.give"))
+ {
+ if (args.length == 3 && user.isAuthorized("essentials.exp.give.others"))
+ {
+ expMatch(server, user, args[1], args[2], true);
+ }
+ else
+ {
+ setExp(user, user, args[1], true);
+ }
+ }
+ else
+ {
+ String match = args[0].trim();
+ if (args.length == 2)
+ {
+ match = args[1].trim();
+ }
+ if (match.equalsIgnoreCase("show") || !user.isAuthorized("essentials.exp.others"))
+ {
+ showExp(user, user);
+ }
+ else
+ {
+ showMatch(server, user, match);
+ }
+ }
+ }
+
+ @Override
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ else if (args.length > 2 && args[0].equalsIgnoreCase("set"))
+ {
+ expMatch(server, sender, args[1], args[2], false);
+ }
+ else if (args.length > 2 && args[0].equalsIgnoreCase("give"))
+ {
+ expMatch(server, sender, args[1], args[2], true);
+ }
+ else
+ {
+ String match = args[0].trim();
+ if (args.length == 2)
+ {
+ match = args[1].trim();
+ }
+ showMatch(server, sender, match);
+ }
+ }
+
+ private void showMatch(final Server server, final CommandSender sender, final String match) throws NotEnoughArgumentsException
+ {
+ boolean foundUser = false;
+ for (Player matchPlayer : server.matchPlayer(match))
+ {
+ foundUser = true;
+ final User target = ess.getUser(matchPlayer);
+ showExp(sender, target);
+ }
+ if (!foundUser)
+ {
+ throw new NotEnoughArgumentsException(_("playerNotFound"));
+ }
+ }
+
+ private void expMatch(final Server server, final CommandSender sender, final String match, String amount, final boolean toggle) throws NotEnoughArgumentsException
+ {
+ boolean foundUser = false;
+ for (Player matchPlayer : server.matchPlayer(match))
+ {
+ final User target = ess.getUser(matchPlayer);
+ setExp(sender, target, amount, toggle);
+ foundUser = true;
+ }
+ if (!foundUser)
+ {
+ throw new NotEnoughArgumentsException(_("playerNotFound"));
+ }
+ }
+
+ private void showExp(final CommandSender sender, final User target)
+ {
+ final int totalExp = SetExpFix.getTotalExperience(target);
+ sender.sendMessage(_("exp", target.getDisplayName(), SetExpFix.getTotalExperience(target), target.getLevel(), SetExpFix.getExpUntilNextLevel(target)));
+ }
+
+ private void setExp(final CommandSender sender, final User target, String strAmount, final boolean give)
+ {
+ Long amount;
+ strAmount = strAmount.toLowerCase(Locale.ENGLISH);
+ if (strAmount.startsWith("l"))
+ {
+ strAmount = strAmount.substring(1);
+ int neededLevel = Integer.parseInt(strAmount);
+ if (give)
+ {
+ neededLevel += target.getLevel();
+ }
+ amount = (long)SetExpFix.getExpToLevel(neededLevel);
+ SetExpFix.setTotalExperience(target, 0);
+ }
+ else {
+ amount = Long.parseLong(strAmount);
+ }
+
+ if (give)
+ {
+ amount += SetExpFix.getTotalExperience(target);
+ }
+ if (amount > Integer.MAX_VALUE)
+ {
+ amount = (long)Integer.MAX_VALUE;
+ }
+ SetExpFix.setTotalExperience(target, amount.intValue());
+ sender.sendMessage(_("expSet", target.getDisplayName(), amount));
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandfly.java b/Essentials/src/com/earth2me/essentials/commands/Commandfly.java index 526fc090d..86347d3e9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandfly.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandfly.java @@ -2,8 +2,6 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; -import java.util.Locale; -import org.bukkit.GameMode; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -24,15 +22,15 @@ public class Commandfly extends EssentialsCommand throw new NotEnoughArgumentsException(); } - flyOtherPlayers(server, sender, args[0]); + flyOtherPlayers(server, sender, args); } @Override protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - if (args.length > 0 && !args[0].trim().isEmpty() && user.isAuthorized("essentials.fly.others")) + if (args.length > 0 && args[0].trim().length() > 2 && user.isAuthorized("essentials.fly.others")) { - flyOtherPlayers(server, user, args[0]); + flyOtherPlayers(server, user, args); return; } user.setAllowFlight(!user.getAllowFlight()); @@ -43,16 +41,32 @@ public class Commandfly extends EssentialsCommand user.sendMessage(_("flyMode", _(user.getAllowFlight() ? "enabled" : "disabled"), user.getDisplayName())); } - private void flyOtherPlayers(final Server server, final CommandSender sender, final String name) + private void flyOtherPlayers(final Server server, final CommandSender sender, final String[] args) { - for (Player matchPlayer : server.matchPlayer(name)) + for (Player matchPlayer : server.matchPlayer(args[0])) { final User player = ess.getUser(matchPlayer); if (player.isHidden()) { continue; } - player.setAllowFlight(!player.getAllowFlight()); + + if (args.length > 1) + { + if (args[1].contains("on") || args[1].contains("ena") || args[1].equalsIgnoreCase("1")) + { + player.setAllowFlight(true); + } + else + { + player.setAllowFlight(false); + } + } + else + { + player.setAllowFlight(!player.getAllowFlight()); + } + if (!player.getAllowFlight()) { player.setFlying(false); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java b/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java index 62ace9357..af4bafc4b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java @@ -19,39 +19,90 @@ public class Commandgamemode extends EssentialsCommand @Override protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { - if (args.length < 1) + if (args.length < 2) { throw new NotEnoughArgumentsException(); } - - gamemodeOtherPlayers(server, sender, args[0]); + GameMode gameMode = matchGameMode(args[0].toLowerCase(Locale.ENGLISH)); + gamemodeOtherPlayers(server, sender, gameMode, args[1]); } @Override protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - if (args.length > 0 && !args[0].trim().isEmpty() && user.isAuthorized("essentials.gamemode.others")) + GameMode gameMode; + if (args.length == 0) + { + gameMode = matchGameMode(commandLabel); + } + else if (args.length > 1 && args[1].trim().length() > 2 && user.isAuthorized("essentials.gamemode.others")) { - gamemodeOtherPlayers(server, user, args[0]); + gameMode = matchGameMode(args[0].toLowerCase(Locale.ENGLISH)); + gamemodeOtherPlayers(server, user, gameMode, args[1]); return; } - - user.setGameMode(user.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL); + else + { + try { + gameMode = matchGameMode(args[0].toLowerCase(Locale.ENGLISH)); + } + catch (NotEnoughArgumentsException e) { + gameMode = matchGameMode(commandLabel); + gamemodeOtherPlayers(server, user, gameMode, args[0]); + return; + } + } + user.setGameMode(gameMode); user.sendMessage(_("gameMode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)), user.getDisplayName())); } - private void gamemodeOtherPlayers(final Server server, final CommandSender sender, final String name) + private void gamemodeOtherPlayers(final Server server, final CommandSender sender, final GameMode gameMode, final String player) throws NotEnoughArgumentsException { - for (Player matchPlayer : server.matchPlayer(name)) + //TODO: TL this + if (player.trim().length() < 2) + { + throw new NotEnoughArgumentsException("You need to specify a valid player/mode."); + } + + boolean foundUser = false; + for (Player matchPlayer : server.matchPlayer(player)) { - final User player = ess.getUser(matchPlayer); - if (player.isHidden()) + final User user = ess.getUser(matchPlayer); + if (user.isHidden()) { continue; } + user.setGameMode(gameMode); + sender.sendMessage(_("gameMode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)), user.getDisplayName())); + foundUser = true; + } + if (!foundUser) + { + throw new NotEnoughArgumentsException(_("playerNotFound")); + } + } - player.setGameMode(player.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL); - sender.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName())); + private GameMode matchGameMode(String modeString) throws NotEnoughArgumentsException + { + GameMode mode = null; + if (modeString.equalsIgnoreCase("gmc") || modeString.equalsIgnoreCase("egmc") + || modeString.contains("creat") || modeString.equalsIgnoreCase("1") || modeString.equalsIgnoreCase("c")) + { + mode = GameMode.CREATIVE; + } + else if (modeString.equalsIgnoreCase("gms") || modeString.equalsIgnoreCase("egms") + || modeString.contains("survi") || modeString.equalsIgnoreCase("0") || modeString.equalsIgnoreCase("s")) + { + mode = GameMode.SURVIVAL; + } + else if (modeString.equalsIgnoreCase("gma") || modeString.equalsIgnoreCase("egma") + || modeString.contains("advent") || modeString.equalsIgnoreCase("2") || modeString.equalsIgnoreCase("a")) + { + mode = GameMode.ADVENTURE; + } + else { + throw new NotEnoughArgumentsException(); } + return mode; } -} +}
\ No newline at end of file diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java index 9429bc5a8..c8d5b732e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java @@ -1,6 +1,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; +import org.bukkit.ChatColor; import org.bukkit.Server; import org.bukkit.World; import org.bukkit.command.CommandSender; @@ -16,14 +17,40 @@ public class Commandgc extends EssentialsCommand @Override protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { + float tps = ess.getTimer().getAverageTPS(); + ChatColor color; + if (tps >= 18) + { + color = ChatColor.GREEN; + } + else if (tps >= 15) + { + color = ChatColor.YELLOW; + } + else + { + color = ChatColor.RED; + } + sender.sendMessage(_("tps", "" + color + tps)); sender.sendMessage(_("gcmax", (Runtime.getRuntime().maxMemory() / 1024 / 1024))); sender.sendMessage(_("gctotal", (Runtime.getRuntime().totalMemory() / 1024 / 1024))); sender.sendMessage(_("gcfree", (Runtime.getRuntime().freeMemory() / 1024 / 1024))); for (World w : server.getWorlds()) { + String worldType = "World"; + switch (w.getEnvironment()) + { + case NETHER: + worldType = "Nether"; + break; + case THE_END: + worldType = "The End"; + break; + } + sender.sendMessage( - (w.getEnvironment() == World.Environment.NETHER ? "Nether" : "World") + " \"" + w.getName() + "\": " + worldType + " \"" + w.getName() + "\": " + w.getLoadedChunks().length + _("gcchunks") + w.getEntities().size() + _("gcentities")); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java index 701fa6577..21903e98b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import com.earth2me.essentials.User; +import com.earth2me.essentials.Util; import java.util.Locale; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -44,7 +45,12 @@ public class Commandgive extends EssentialsCommand final User giveTo = getPlayer(server, args, 0); - if (args.length > 2 && Integer.parseInt(args[2]) > 0) + if (args.length > 3 && Util.isInt(args[2]) && Util.isInt(args[3])) + { + stack.setAmount(Integer.parseInt(args[2])); + stack.setDurability(Short.parseShort(args[3])); + } + else if (args.length > 2 && Integer.parseInt(args[2]) > 0) { stack.setAmount(Integer.parseInt(args[2])); } @@ -59,7 +65,7 @@ public class Commandgive extends EssentialsCommand if (args.length > 3) { - for (int i = 3; i < args.length; i++) + for (int i = Util.isInt(args[3]) ? 4 : 3; i < args.length; i++) { final String[] split = args[i].split("[:+',;.]", 2); if (split.length < 1) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgod.java b/Essentials/src/com/earth2me/essentials/commands/Commandgod.java index 4d5bd424b..5ca2aad9a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgod.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgod.java @@ -22,31 +22,53 @@ public class Commandgod extends EssentialsCommand throw new NotEnoughArgumentsException(); } - godOtherPlayers(server, sender, args[0]); + godOtherPlayers(server, sender, args); } @Override protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - if (args.length > 0 && !args[0].trim().isEmpty() && user.isAuthorized("essentials.god.others")) + if (args.length > 0 && args[0].trim().length() > 2 && user.isAuthorized("essentials.god.others")) { - godOtherPlayers(server, user, args[0]); + godOtherPlayers(server, user, args); return; } - - user.sendMessage(_("godMode", (user.toggleGodModeEnabled() ? _("enabled") : _("disabled")))); + user.setGodModeEnabled(!user.isGodModeEnabled()); + user.sendMessage(_("godMode", (user.isGodModeEnabled() ? _("enabled") : _("disabled")))); } - private void godOtherPlayers(final Server server, final CommandSender sender, final String name) + private void godOtherPlayers(final Server server, final CommandSender sender, final String[] args) { - for (Player matchPlayer : server.matchPlayer(name)) + for (Player matchPlayer : server.matchPlayer(args[0])) { final User player = ess.getUser(matchPlayer); if (player.isHidden()) { continue; } - final boolean enabled = player.toggleGodModeEnabled(); + + if (args.length > 1) + { + if (args[1].contains("on") || args[1].contains("ena") || args[1].equalsIgnoreCase("1")) + { + player.setGodModeEnabled(true); + } + else + { + player.setGodModeEnabled(false); + } + } + else + { + player.setGodModeEnabled(!player.isGodModeEnabled()); + } + + final boolean enabled = player.isGodModeEnabled(); + if (enabled) + { + player.setFoodLevel(20); + } + player.sendMessage(_("godMode", (enabled ? _("enabled") : _("disabled")))); sender.sendMessage(_("godMode", _(enabled ? "godEnabledFor" : "godDisabledFor", matchPlayer.getDisplayName()))); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhat.java b/Essentials/src/com/earth2me/essentials/commands/Commandhat.java new file mode 100644 index 000000000..5dd0fbb74 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhat.java @@ -0,0 +1,63 @@ +package com.earth2me.essentials.commands; + +import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.User; +import com.earth2me.essentials.craftbukkit.InventoryWorkaround; +import org.bukkit.Material; +import org.bukkit.Server; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; + + +public class Commandhat extends EssentialsCommand +{ + public Commandhat() + { + super("hat"); + } + + @Override + protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception + { + if (args.length > 0 && (args[0].contains("rem") || args[0].contains("off") || args[0].equalsIgnoreCase("0"))) + { + final PlayerInventory inv = user.getInventory(); + final ItemStack head = inv.getHelmet(); + if (head == null || head.getType() == Material.AIR) + { + user.sendMessage(_("hatEmpty")); + } + else + { + final ItemStack air = new ItemStack(Material.AIR); + inv.setHelmet(air); + InventoryWorkaround.addItem(user.getInventory(), true, head); + user.sendMessage(_("hatRemoved")); + } + } + else + { + if (user.getItemInHand().getType() != Material.AIR) + { + final ItemStack hand = user.getItemInHand(); + if (hand.getType().getMaxDurability() == 0) + { + final PlayerInventory inv = user.getInventory(); + final ItemStack head = inv.getHelmet(); + inv.removeItem(hand); + inv.setHelmet(hand); + inv.setItemInHand(head); + user.sendMessage(_("hatPlaced")); + } + else + { + user.sendMessage(_("hatArmor")); + } + } + else + { + user.sendMessage(_("hatFail")); + } + } + } +}
\ No newline at end of file diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java index f14422efd..2c91a06c9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java @@ -54,7 +54,7 @@ public class Commandhome extends EssentialsCommand throw new NoChargeException(); } } - user.getTeleport().home(player, homeName.toLowerCase(Locale.ENGLISH), charge); + goHome(user, player, homeName.toLowerCase(Locale.ENGLISH), charge); } catch (NotEnoughArgumentsException e) { @@ -80,7 +80,7 @@ public class Commandhome extends EssentialsCommand } else if (homes.size() == 1 && player.equals(user)) { - user.getTeleport().home(player, homes.get(0), charge); + goHome(user, player, homes.get(0), charge); } else { @@ -93,4 +93,19 @@ public class Commandhome extends EssentialsCommand } throw new NoChargeException(); } + + private void goHome(final User user, final User player, final String home, final Trade charge) throws Exception + { + final Location loc = player.getHome(home); + if (loc == null) + { + throw new NotEnoughArgumentsException(); + } + if (user.getWorld() != loc.getWorld() && ess.getSettings().isWorldHomePermissions() + && !user.isAuthorized("essentials.world." + loc.getWorld().getName())) + { + throw new Exception(_("noPerm", "essentials.world." + loc.getWorld().getName())); + } + user.getTeleport().home(loc, charge); + } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandignore.java b/Essentials/src/com/earth2me/essentials/commands/Commandignore.java index 93dd029a8..8f160e9ba 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandignore.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandignore.java @@ -32,15 +32,14 @@ public class Commandignore extends EssentialsCommand { throw new Exception(_("playerNotFound")); } - final String name = player.getName(); - if (user.isIgnoredPlayer(name)) + if (user.isIgnoredPlayer(player)) { - user.setIgnoredPlayer(name, false); + user.setIgnoredPlayer(player, false); user.sendMessage(_("unignorePlayer", player.getName())); } else { - user.setIgnoredPlayer(name, true); + user.setIgnoredPlayer(player, true); user.sendMessage(_("ignorePlayer", player.getName())); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java index a4a659e97..3964dbe67 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java @@ -1,10 +1,7 @@ package com.earth2me.essentials.commands; -import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; -import java.util.Arrays; import org.bukkit.Server; -import org.bukkit.inventory.ItemStack; public class Commandinvsee extends EssentialsCommand @@ -21,8 +18,8 @@ public class Commandinvsee extends EssentialsCommand { throw new NotEnoughArgumentsException(); } - final User invUser = getPlayer(server, args, 0); + final User invUser = getPlayer(server, args, 0); user.setInvSee(true); - user.openInventory(invUser.getInventory()); + user.openInventory(invUser.getInventory()); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java index 405b8b799..0e35dda71 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java @@ -36,42 +36,47 @@ public class Commanditem extends EssentialsCommand { throw new Exception(_("cantSpawnItem", itemname)); } - - if (args.length > 1 && Integer.parseInt(args[1]) > 0) - { - stack.setAmount(Integer.parseInt(args[1])); - } - else if (ess.getSettings().getDefaultStackSize() > 0) + try { - stack.setAmount(ess.getSettings().getDefaultStackSize()); - } - else if (ess.getSettings().getOversizedStackSize() > 0 && user.isAuthorized("essentials.oversizedstacks")) - { - stack.setAmount(ess.getSettings().getOversizedStackSize()); - } - - if (args.length > 2) - { - for (int i = 2; i < args.length; i++) + if (args.length > 1 && Integer.parseInt(args[1]) > 0) { - final String[] split = args[i].split("[:+',;.]", 2); - if (split.length < 1) - { - continue; - } - final Enchantment enchantment = Commandenchant.getEnchantment(split[0], user); - int level; - if (split.length > 1) - { - level = Integer.parseInt(split[1]); - } - else + stack.setAmount(Integer.parseInt(args[1])); + } + else if (ess.getSettings().getDefaultStackSize() > 0) + { + stack.setAmount(ess.getSettings().getDefaultStackSize()); + } + else if (ess.getSettings().getOversizedStackSize() > 0 && user.isAuthorized("essentials.oversizedstacks")) + { + stack.setAmount(ess.getSettings().getOversizedStackSize()); + } + if (args.length > 2) + { + for (int i = 2; i < args.length; i++) { - level = enchantment.getMaxLevel(); + final String[] split = args[i].split("[:+',;.]", 2); + if (split.length < 1) + { + continue; + } + final Enchantment enchantment = Commandenchant.getEnchantment(split[0], user); + int level; + if (split.length > 1) + { + level = Integer.parseInt(split[1]); + } + else + { + level = enchantment.getMaxLevel(); + } + stack.addEnchantment(enchantment, level); } - stack.addEnchantment(enchantment, level); } } + catch (NumberFormatException e) + { + throw new NotEnoughArgumentsException(); + } if (stack.getType() == Material.AIR) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java b/Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java index c35656c72..f41c7684f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java @@ -1,5 +1,7 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; +import org.bukkit.Material; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -32,6 +34,16 @@ public class Commanditemdb extends EssentialsCommand { itemStack = ess.getItemDb().get(args[0]); } - sender.sendMessage(itemStack.getType().toString() + "- " + itemStack.getTypeId() + ":" + Integer.toString(itemStack.getData().getData())); + sender.sendMessage(itemStack.getType().toString() + "- " + itemStack.getTypeId() + ":" + Integer.toString(itemStack.getDurability())); + + if (itemStack.getType() != Material.AIR) + { + int maxuses = itemStack.getType().getMaxDurability(); + int durability = ((maxuses + 1) - itemStack.getDurability()); + if (maxuses != 0) + { + sender.sendMessage(_("durability", Integer.toString(durability))); + } + } } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java index 39ca305e3..ab73c6e01 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java @@ -37,5 +37,6 @@ public class Commandjump extends EssentialsCommand final Trade charge = new Trade(this.getName(), ess); charge.isAffordableFor(user); user.getTeleport().teleport(loc, charge, TeleportCause.COMMAND); + throw new NoChargeException(); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkick.java b/Essentials/src/com/earth2me/essentials/commands/Commandkick.java index ae5db48fb..287a3cc62 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkick.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkick.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.Console; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import java.util.logging.Level; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -24,13 +25,15 @@ public class Commandkick extends EssentialsCommand } final User user = getPlayer(server, args, 0); - if (user.isAuthorized("essentials.kick.exempt")) + if (sender instanceof Player && user.isAuthorized("essentials.kick.exempt")) { throw new Exception(_("kickExempt")); } final String kickReason = args.length > 1 ? getFinalArg(args, 1) : _("kickDefault"); user.kickPlayer(kickReason); final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME; + + server.getLogger().log(Level.INFO, _("playerKicked", senderName, user.getName(), kickReason)); for (Player onlinePlayer : server.getOnlinePlayers()) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java index 6d97b6af9..4722b7d68 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java @@ -27,5 +27,6 @@ public class Commandkickall extends EssentialsCommand onlinePlayer.kickPlayer(args.length > 0 ? getFinalArg(args, 0) : _("kickDefault")); } } + sender.sendMessage(_("kickedAll")); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java index 566cb69d5..a2e58227b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java @@ -21,18 +21,23 @@ public class Commandkill extends EssentialsCommand { throw new NotEnoughArgumentsException(); } + + //TODO: TL this + if (args[0].trim().length() < 2) + { + throw new NotEnoughArgumentsException("You need to specify a player to kill."); + } for (Player matchPlayer : server.matchPlayer(args[0])) { - final EntityDamageEvent ede = new EntityDamageEvent(matchPlayer, sender instanceof Player && ((Player)sender).getName().equals(matchPlayer.getName()) ? EntityDamageEvent.DamageCause.SUICIDE : EntityDamageEvent.DamageCause.CUSTOM, 1000); + final EntityDamageEvent ede = new EntityDamageEvent(matchPlayer, sender instanceof Player && ((Player)sender).getName().equals(matchPlayer.getName()) ? EntityDamageEvent.DamageCause.SUICIDE : EntityDamageEvent.DamageCause.CUSTOM, Short.MAX_VALUE); server.getPluginManager().callEvent(ede); if (ede.isCancelled() && !sender.hasPermission("essentials.kill.force")) { continue; } - matchPlayer.damage(1000); - matchPlayer.setHealth(0); + matchPlayer.damage(Short.MAX_VALUE); sender.sendMessage(_("kill", matchPlayer.getDisplayName())); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java index c0b47d20f..d918eeffb 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java @@ -16,6 +16,7 @@ import org.bukkit.entity.HumanEntity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Monster; import org.bukkit.entity.NPC; +import org.bukkit.entity.Ocelot; import org.bukkit.entity.Player; import org.bukkit.entity.Slime; import org.bukkit.entity.Snowman; @@ -61,7 +62,7 @@ public class Commandkillall extends EssentialsCommand } catch (NumberFormatException e) { - throw new Exception(_("numberRequired")); + throw new Exception(_("numberRequired"), e); } } } @@ -121,6 +122,13 @@ public class Commandkillall extends EssentialsCommand continue; } } + if(entity instanceof Ocelot) + { + if (((Ocelot)entity).isTamed()) + { + continue; + } + } if (animals) { if (entity instanceof Animals || entity instanceof NPC || entity instanceof Snowman || entity instanceof WaterMob) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java index 67f0fafd0..fe2f49292 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.*; import static com.earth2me.essentials.I18n._; import java.util.*; import org.bukkit.Server; +import org.bukkit.command.CommandSender; public class Commandkit extends EssentialsCommand @@ -19,38 +20,68 @@ public class Commandkit extends EssentialsCommand if (args.length < 1) { final String kitList = Kit.listKits(ess, user); - if (kitList.length() > 0) - { - user.sendMessage(_("kits", kitList)); - } - else - { - user.sendMessage(_("noKits")); - } + user.sendMessage(kitList.length() > 0 ? _("kits", kitList) : _("noKits")); throw new NoChargeException(); } + else if (args.length > 1 && user.isAuthorized("essentials.kit.others")) + { + final User userTo = getPlayer(server, args, 1, true); + final String kitName = Util.sanitizeString(args[0].toLowerCase(Locale.ENGLISH)).trim(); + giveKit(userTo, user, kitName); + } else { + final String kitName = Util.sanitizeString(args[0].toLowerCase(Locale.ENGLISH)).trim(); + giveKit(user, user, kitName); + } + } + + @Override + public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception + { + if (args.length < 2) + { + final String kitList = Kit.listKits(ess, null); + sender.sendMessage(kitList.length() > 0 ? _("kits", kitList) : _("noKits")); + throw new NoChargeException(); + } + else + { + final User userTo = getPlayer(server, args, 1, true); final String kitName = args[0].toLowerCase(Locale.ENGLISH); + final Map<String, Object> kit = ess.getSettings().getKit(kitName); + final List<String> items = Kit.getItems(userTo, kit); + Kit.expandItems(ess, userTo, items); + + sender.sendMessage(_("kitGive", kitName)); + } + } - if (!user.isAuthorized("essentials.kit." + kitName)) - { - throw new Exception(_("noKitPermission", "essentials.kit." + kitName)); - } + private void giveKit(User userTo, User userFrom, String kitName) throws Exception + { + if (kitName.isEmpty()) + { + throw new Exception(_("kitError2")); + } + + final Map<String, Object> kit = ess.getSettings().getKit(kitName); - final List<String> items = Kit.getItems(user, kit); + if (!userFrom.isAuthorized("essentials.kit." + kitName)) + { + throw new Exception(_("noKitPermission", "essentials.kit." + kitName)); + } - Kit.checkTime(user, kitName, kit); + final List<String> items = Kit.getItems(userTo, kit); - final Trade charge = new Trade("kit-" + kitName, ess); - charge.isAffordableFor(user); + Kit.checkTime(userFrom, kitName, kit); - Kit.expandItems(ess, user, items); + final Trade charge = new Trade("kit-" + kitName, ess); + charge.isAffordableFor(userFrom); - charge.charge(user); - user.sendMessage(_("kitGive", kitName)); + Kit.expandItems(ess, userTo, items); - } + charge.charge(userFrom); + userTo.sendMessage(_("kitGive", kitName)); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java index 810ef0b33..5d72d0b55 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java @@ -23,11 +23,11 @@ public class Commandlightning extends EssentialsCommand if (sender instanceof Player) { user = ess.getUser(((Player)sender)); - } - if ((args.length < 1 || !user.isAuthorized("essentials.lightning.others")) & user != null) - { - user.getWorld().strikeLightning(user.getTargetBlock(null, 600).getLocation()); - return; + if ((args.length < 1 || user != null && !user.isAuthorized("essentials.lightning.others"))) + { + user.getWorld().strikeLightning(user.getTargetBlock(null, 600).getLocation()); + return; + } } if (server.matchPlayer(args[0]).isEmpty()) @@ -35,7 +35,7 @@ public class Commandlightning extends EssentialsCommand throw new Exception(_("playerNotFound")); } - int power = 1; + int power = 5; if (args.length > 1) { try @@ -50,18 +50,12 @@ public class Commandlightning extends EssentialsCommand for (Player matchPlayer : server.matchPlayer(args[0])) { sender.sendMessage(_("lightningUse", matchPlayer.getDisplayName())); - if (power <= 0) - { - matchPlayer.getWorld().strikeLightningEffect(matchPlayer.getLocation()); - } - else - { - LightningStrike strike = matchPlayer.getWorld().strikeLightning(matchPlayer.getLocation()); - matchPlayer.damage(power - 1, strike); - } + + final LightningStrike strike = matchPlayer.getWorld().strikeLightningEffect(matchPlayer.getLocation()); + if (!ess.getUser(matchPlayer).isGodModeEnabled()) { - matchPlayer.setHealth(matchPlayer.getHealth() < 5 ? 0 : matchPlayer.getHealth() - 5); + matchPlayer.damage(power, strike); } if (ess.getSettings().warnOnSmite()) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java index fa4643875..60306c272 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java @@ -4,7 +4,6 @@ import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; import java.util.List; -import org.bukkit.ChatColor; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -57,7 +56,7 @@ public class Commandmail extends EssentialsCommand { throw new Exception(_("playerNeverOnServer", args[1])); } - if (!u.isIgnoredPlayer(user.getName())) + if (!u.isIgnoredPlayer(user)) { final String mail = Util.sanitizeString(Util.stripFormat(getFinalArg(args, 2))); u.addMail(user.getName() + ": " + mail); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java index 2e1011e3b..6b6392cdb 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmsg.java @@ -21,11 +21,11 @@ public class Commandmsg extends EssentialsCommand @Override public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception { - if (args.length < 2 || args[0].trim().isEmpty() || args[1].trim().isEmpty()) + if (args.length < 2 || args[0].trim().length() < 2 || args[1].trim().isEmpty()) { throw new NotEnoughArgumentsException(); } - + String message = getFinalArg(args, 1); if (sender instanceof Player) { @@ -81,7 +81,7 @@ public class Commandmsg extends EssentialsCommand { sender.sendMessage(_("msgFormat", translatedMe, matchedPlayer.getDisplayName(), message)); final User matchedUser = ess.getUser(matchedPlayer); - if (sender instanceof Player && (matchedUser.isIgnoredPlayer(((Player)sender).getName()) || matchedUser.isHidden())) + if (sender instanceof Player && (matchedUser.isIgnoredPlayer(ess.getUser(sender)) || matchedUser.isHidden())) { continue; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmute.java b/Essentials/src/com/earth2me/essentials/commands/Commandmute.java index 3e70cc507..fa86a8a02 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmute.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmute.java @@ -28,13 +28,19 @@ public class Commandmute extends EssentialsCommand throw new Exception(_("muteExempt")); } long muteTimestamp = 0; + if (args.length > 1) { - String time = getFinalArg(args, 1); + final String time = getFinalArg(args, 1); muteTimestamp = Util.parseDateDiff(time, true); + player.setMuted(true); + } + else + { + player.setMuted(!player.getMuted()); } player.setMuteTimeout(muteTimestamp); - final boolean muted = player.toggleMuted(); + final boolean muted = player.getMuted(); sender.sendMessage( muted ? (muteTimestamp > 0 diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandpay.java b/Essentials/src/com/earth2me/essentials/commands/Commandpay.java index 01e1fcffb..5ce131281 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandpay.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandpay.java @@ -22,14 +22,15 @@ public class Commandpay extends EssentialsCommand throw new NotEnoughArgumentsException(); } - if (args[0] == "") + //TODO: TL this + if (args[0].trim().length() < 2) { throw new NotEnoughArgumentsException("You need to specify a player to pay."); } double amount = Double.parseDouble(args[1].replaceAll("[^0-9\\.]", "")); - Boolean foundUser = false; + boolean foundUser = false; for (Player p : server.matchPlayer(args[0])) { User u = ess.getUser(p); @@ -42,9 +43,9 @@ public class Commandpay extends EssentialsCommand foundUser = true; } - if (foundUser == false) + if (!foundUser) { - throw new NoSuchFieldException(_("playerNotFound")); + throw new NotEnoughArgumentsException(_("playerNotFound")); } } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandpowertool.java b/Essentials/src/com/earth2me/essentials/commands/Commandpowertool.java index ca03364b2..d1d0fb582 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandpowertool.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandpowertool.java @@ -51,26 +51,18 @@ public class Commandpowertool extends EssentialsCommand { user.sendMessage(_("powerToolList", Util.joinList(powertools), itemName)); } - return; + throw new NoChargeException(); } if (command.startsWith("r:")) { - try + command = command.substring(2); + if (!powertools.contains(command)) { - command = command.substring(2); - if (!powertools.contains(command)) - { - throw new Exception(_("powerToolNoSuchCommandAssigned", command, itemName)); - } - - powertools.remove(command); - user.sendMessage(_("powerToolRemove", command, itemName)); - } - catch (Exception e) - { - user.sendMessage(e.getMessage()); - return; + throw new Exception(_("powerToolNoSuchCommandAssigned", command, itemName)); } + + powertools.remove(command); + user.sendMessage(_("powerToolRemove", command, itemName)); } else { @@ -85,7 +77,6 @@ public class Commandpowertool extends EssentialsCommand { throw new Exception(_("powerToolAlreadySet", command, itemName)); } - } else if (powertools != null && !powertools.isEmpty()) { @@ -110,6 +101,11 @@ public class Commandpowertool extends EssentialsCommand user.sendMessage(_("powerToolRemoveAll", itemName)); } + if (!user.arePowerToolsEnabled()) + { + user.setPowerToolsEnabled(true); + user.sendMessage(_("powerToolsEnabled")); + } user.setPowertool(itemStack, powertools); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java index b16cbdc34..866846733 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java @@ -55,7 +55,7 @@ public class Commandptime extends EssentialsCommand Long ticks; // Parse the target time int ticks from args[0] String timeParam = args[0]; - Boolean relative = true; + boolean relative = true; if (timeParam.startsWith("@")) { relative = false; @@ -79,7 +79,7 @@ public class Commandptime extends EssentialsCommand } catch (NumberFormatException e) { - throw new NotEnoughArgumentsException(); + throw new NotEnoughArgumentsException(e); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandr.java b/Essentials/src/com/earth2me/essentials/commands/Commandr.java index 9b585509d..d2dfeb78b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandr.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandr.java @@ -55,7 +55,7 @@ public class Commandr extends EssentialsCommand if (target instanceof Player) { User player = ess.getUser(target); - if (player.isIgnoredPlayer(sender instanceof Player ? ((Player)sender).getName() : Console.NAME)) + if (sender instanceof Player && player.isIgnoredPlayer(ess.getUser(sender))) { return; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandremove.java b/Essentials/src/com/earth2me/essentials/commands/Commandremove.java index d245d1239..0957a7989 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandremove.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandremove.java @@ -9,7 +9,7 @@ import org.bukkit.World; import org.bukkit.command.CommandSender; import org.bukkit.entity.*; - +//Todo: Fix this up public class Commandremove extends EssentialsCommand { public Commandremove() @@ -47,7 +47,7 @@ public class Commandremove extends EssentialsCommand } catch (NumberFormatException e) { - throw new Exception(_("numberRequired")); + throw new Exception(_("numberRequired"), e); } } @@ -57,7 +57,7 @@ public class Commandremove extends EssentialsCommand } catch (IllegalArgumentException e) { - throw new NotEnoughArgumentsException(); //TODO: translate and list types + throw new NotEnoughArgumentsException(e); //TODO: translate and list types } removeEntities(user, world, toRemove, radius); @@ -84,7 +84,7 @@ public class Commandremove extends EssentialsCommand } catch (IllegalArgumentException e) { - throw new NotEnoughArgumentsException(); //TODO: translate and list types + throw new NotEnoughArgumentsException(e); //TODO: translate and list types } removeEntities(sender, world, toRemove, 0); } @@ -92,8 +92,9 @@ public class Commandremove extends EssentialsCommand protected void removeEntities(final CommandSender sender, final World world, final ToRemove toRemove, int radius) throws Exception { int removed = 0; - if (radius > 0) { - radius*=radius; + if (radius > 0) + { + radius *= radius; } for (Chunk chunk : world.getLoadedChunks()) { @@ -130,7 +131,7 @@ public class Commandremove extends EssentialsCommand removed++; } } - else if (toRemove == ToRemove.DROPS) + else if (toRemove == ToRemove.MINECARTS) { if (e instanceof Minecart) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java index 8d1278fd0..d621109f7 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java @@ -53,6 +53,8 @@ public class Commandrepair extends EssentialsCommand } else if (args[0].equalsIgnoreCase("all")) { + final Trade charge = new Trade("repair-all", ess); + charge.isAffordableFor(user); final List<String> repaired = new ArrayList<String>(); repairItems(user.getInventory().getContents(), user, repaired); @@ -69,6 +71,7 @@ public class Commandrepair extends EssentialsCommand { user.sendMessage(_("repair", Util.joinList(repaired))); } + charge.charge(user); } else @@ -102,7 +105,7 @@ public class Commandrepair extends EssentialsCommand continue; } final String itemName = item.getType().toString().toLowerCase(Locale.ENGLISH); - final Trade charge = new Trade("repair-" + itemName.replace('_', '-'), ess); + final Trade charge = new Trade("repair-" + itemName.replace('_', '-'), "repair-item", ess); try { charge.isAffordableFor(user); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java index 38abb2dab..24f1f9c41 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; +import org.bukkit.Location; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -17,16 +18,16 @@ public class Commandseen extends EssentialsCommand @Override protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { - seen(server, sender, args, true); + seen(server, sender, args, true, true); } @Override protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - seen(server, user, args, user.isAuthorized("essentials.seen.banreason")); + seen(server, user, args, user.isAuthorized("essentials.seen.banreason"), user.isAuthorized("essentials.seen.extra")); } - protected void seen(final Server server, final CommandSender sender, final String[] args, final boolean show) throws Exception + protected void seen(final Server server, final CommandSender sender, final String[] args, final boolean showBan, final boolean extra) throws Exception { if (args.length < 1) { @@ -37,6 +38,10 @@ public class Commandseen extends EssentialsCommand User player = getPlayer(server, args, 0); player.setDisplayNick(); sender.sendMessage(_("seenOnline", player.getDisplayName(), Util.formatDateDiff(player.getLastLogin()))); + if (extra) + { + sender.sendMessage(_("whoisIPAddress", player.getAddress().getAddress().toString())); + } } catch (NoSuchFieldException e) { @@ -46,10 +51,18 @@ public class Commandseen extends EssentialsCommand throw new Exception(_("playerNotFound")); } player.setDisplayNick(); - sender.sendMessage(_("seenOffline", player.getDisplayName(), Util.formatDateDiff(player.getLastLogout()))); + sender.sendMessage(_("seenOffline", player.getName(), Util.formatDateDiff(player.getLastLogout()))); if (player.isBanned()) { - sender.sendMessage(_("whoisBanned", show ? player.getBanReason() : _("true"))); + sender.sendMessage(_("whoisBanned", showBan ? player.getBanReason() : _("true"))); + } + if (extra) + { + sender.sendMessage(_("whoisIPAddress", player.getLastLoginAddress())); + final Location loc = player.getLastLocation(); + if (loc != null) { + sender.sendMessage(_("whoisLocation", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); + } } } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java index ec19ca678..f622094d2 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java @@ -29,7 +29,8 @@ public class Commandsethome extends EssentialsCommand { if (user.isAuthorized("essentials.sethome.multiple")) { - if ("bed".equals(args[0].toLowerCase(Locale.ENGLISH))) { + if ("bed".equals(args[0].toLowerCase(Locale.ENGLISH))) + { throw new NotEnoughArgumentsException(); } if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomes().size() < ess.getSettings().getHomeLimit(user)) @@ -66,7 +67,8 @@ public class Commandsethome extends EssentialsCommand { name = "home"; } - if ("bed".equals(name.toLowerCase(Locale.ENGLISH))) { + if ("bed".equals(name.toLowerCase(Locale.ENGLISH))) + { throw new NotEnoughArgumentsException(); } usersHome.setHome(name, user.getLocation()); @@ -77,7 +79,7 @@ public class Commandsethome extends EssentialsCommand { user.setHome(); } - user.sendMessage(_("homeSet")); + user.sendMessage(_("homeSet", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ())); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetjail.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetjail.java index 8ed298303..877da4d26 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsetjail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetjail.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import com.earth2me.essentials.Util; import org.bukkit.Server; @@ -20,7 +21,7 @@ public class Commandsetjail extends EssentialsCommand throw new NotEnoughArgumentsException(); } ess.getJails().setJail(args[0], user.getLocation()); - user.sendMessage(_("jailSet", args[0])); + user.sendMessage(_("jailSet", Util.sanitizeString(args[0]))); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index fdaa0eb9e..2546a76dd 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -103,7 +103,7 @@ public class Commandspawnmob extends EssentialsCommand } catch (MobException e) { - throw new Exception(_("unableToSpawnMob")); + throw new Exception(_("unableToSpawnMob"), e); } if (mountType != null) @@ -129,7 +129,7 @@ public class Commandspawnmob extends EssentialsCommand } catch (MobException e) { - throw new Exception(_("unableToSpawnMob")); + throw new Exception(_("unableToSpawnMob"), e); } spawnedMob.setPassenger(spawnedMount); } @@ -164,7 +164,7 @@ public class Commandspawnmob extends EssentialsCommand } catch (MobException e) { - throw new Exception(_("unableToSpawnMob")); + throw new Exception(_("unableToSpawnMob"), e); } spawnedMob.setPassenger(spawnedMount); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspeed.java b/Essentials/src/com/earth2me/essentials/commands/Commandspeed.java new file mode 100644 index 000000000..8415241b1 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspeed.java @@ -0,0 +1,153 @@ +package com.earth2me.essentials.commands; + +import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.User; +import org.bukkit.Server; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + + +public class Commandspeed extends EssentialsCommand +{ + public Commandspeed() + { + super("speed"); + } + + @Override + protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception + { + if (args.length < 2) + { + throw new NotEnoughArgumentsException(); + } + final boolean isFly = isFlyMode(args[0]); + final float speed = getMoveSpeed(args[1]); + speedOtherPlayers(server, sender, isFly, true, speed, args[2]); + } + + @Override + protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception + { + if (args.length < 1) + { + throw new NotEnoughArgumentsException(); + } + + boolean isFly; + float speed; + boolean isBypass = user.isAuthorized("essentials.speed.bypass"); + if (args.length == 1) + { + //isFly = user.isFlying(); + isFly = true; + speed = getMoveSpeed(args[0]); + } + else + { + //isFly = isFlyMode(args[0]); + //speed = getMoveSpeed(args[1]); + //if (args.length > 2 && user.isAuthorized("essentials.speed.others")) + //{ + // speedOtherPlayers(server, user, isFly, isBypass, speed, args[2]); + // return; + //} + isFly = true; + speed = getMoveSpeed(args[0]); + if (user.isAuthorized("essentials.speed.others")) + { + speedOtherPlayers(server, user, isFly, isBypass, speed, args[1]); + return; + } + } + + //if (isFly) + //{ + user.setFlySpeed(getRealMoveSpeed(speed, isFly, isBypass)); + user.sendMessage(_("moveSpeed", _("flying"), speed, user.getDisplayName())); + //} + //else + //{ + // user.setWalkSpeed(getRealMoveSpeed(speed, isFly, isBypass)); + // user.sendMessage(_("moveSpeed", _("walking"), speed, user.getDisplayName())); + //} + } + + private void speedOtherPlayers(final Server server, final CommandSender sender, final boolean isFly, final boolean isBypass, final float speed, final String target) + { + for (Player matchPlayer : server.matchPlayer(target)) + { + if (isFly) + { + matchPlayer.setFlySpeed(getRealMoveSpeed(speed, isFly, isBypass)); + sender.sendMessage(_("moveSpeed", _("flying"), speed, matchPlayer.getDisplayName())); + } + else + { + matchPlayer.setWalkSpeed(getRealMoveSpeed(speed, isFly, isBypass)); + sender.sendMessage(_("moveSpeed", _("walking"), speed, matchPlayer.getDisplayName())); + } + } + } + + private boolean isFlyMode(final String modeString) throws NotEnoughArgumentsException + { + boolean isFlyMode; + if (modeString.contains("fly") || modeString.equalsIgnoreCase("f")) + { + isFlyMode = true; + } + else if (modeString.contains("walk") || modeString.contains("run") + || modeString.equalsIgnoreCase("w") || modeString.equalsIgnoreCase("r")) + { + isFlyMode = false; + } + else + { + throw new NotEnoughArgumentsException(); + } + return isFlyMode; + } + + private float getMoveSpeed(final String moveSpeed) throws NotEnoughArgumentsException + { + float userSpeed; + try + { + userSpeed = Float.parseFloat(moveSpeed); + if (userSpeed > 10f) + { + userSpeed = 10f; + } + else if (userSpeed < 0f) + { + userSpeed = 0f; + } + } + catch (NumberFormatException e) + { + throw new NotEnoughArgumentsException(); + } + return userSpeed; + } + + private float getRealMoveSpeed(final float userSpeed, final boolean isFly, final boolean isBypass) + { + final float defaultSpeed = isFly ? 0.1f : 0.2f; + float maxSpeed = 1f; + if (!isBypass) + { + maxSpeed = (float)(isFly ? ess.getSettings().getMaxFlySpeed() : ess.getSettings().getMaxWalkSpeed()); + } + + if (userSpeed < 1f) + { + return defaultSpeed * userSpeed; + } + else + { + float ratio = ((userSpeed - 1) / 9) * (maxSpeed - defaultSpeed); + return ratio + defaultSpeed; + } + } +} diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java b/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java index 50933c8f5..84c9fc489 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java @@ -16,10 +16,9 @@ public class Commandsuicide extends EssentialsCommand @Override public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - EntityDamageEvent ede = new EntityDamageEvent(user.getBase(), EntityDamageEvent.DamageCause.SUICIDE, 1000); + EntityDamageEvent ede = new EntityDamageEvent(user.getBase(), EntityDamageEvent.DamageCause.SUICIDE, Short.MAX_VALUE); server.getPluginManager().callEvent(ede); - user.damage(1000); - user.setHealth(0); + user.damage(Short.MAX_VALUE); user.sendMessage(_("suicideMessage")); user.setDisplayNick(); ess.broadcastMessage(user,_("suicideSuccess", user.getDisplayName())); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java index 25c457a20..0549e9c0d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java @@ -44,12 +44,12 @@ public class Commandtempban extends EssentialsCommand final String time = getFinalArg(args, 1); final long banTimestamp = Util.parseDateDiff(time, true); - final String banReason = _("tempBanned", Util.formatDateDiff(banTimestamp)); + final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME; + final String banReason = _("tempBanned", Util.formatDateDiff(banTimestamp), senderName); user.setBanReason(banReason); user.setBanTimeout(banTimestamp); user.setBanned(true); user.kickPlayer(banReason); - final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME; for (Player onlinePlayer : server.getOnlinePlayers()) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtime.java b/Essentials/src/com/earth2me/essentials/commands/Commandtime.java index c49f34fbd..92d564391 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtime.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtime.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.DescParseTickFormat; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import com.earth2me.essentials.Util; import java.util.*; import org.bukkit.Server; import org.bukkit.World; @@ -19,19 +20,47 @@ public class Commandtime extends EssentialsCommand @Override public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { + boolean add = false; + final List<String> argList = new ArrayList<String>(Arrays.asList(args)); + if (argList.remove("set") && !argList.isEmpty() && Util.isInt(argList.get(0))) + { + argList.set(0, argList.get(0) + "t"); + } + if (argList.remove("add") && !argList.isEmpty() && Util.isInt(argList.get(0))) + { + add = true; + argList.set(0, argList.get(0) + "t"); + } + final String[] validArgs = argList.toArray(new String[0]); + // Which World(s) are we interested in? String worldSelector = null; - if (args.length == 2) + if (validArgs.length == 2) { - worldSelector = args[1]; + worldSelector = validArgs[1]; } final Set<World> worlds = getWorlds(server, sender, worldSelector); + final String setTime; // If no arguments we are reading the time - if (args.length == 0) + if (validArgs.length == 0) { - getWorldsTime(sender, worlds); - return; + if (commandLabel.equalsIgnoreCase("day") || commandLabel.equalsIgnoreCase("eday")) + { + setTime = "day"; + } + else if (commandLabel.equalsIgnoreCase("night") || commandLabel.equalsIgnoreCase("enight")) + { + setTime = "night"; + } + else + { + getWorldsTime(sender, worlds); + return; + } + } + else { + setTime = validArgs[0]; } final User user = ess.getUser(sender); @@ -45,14 +74,14 @@ public class Commandtime extends EssentialsCommand long ticks; try { - ticks = DescParseTickFormat.parse(args[0]); + ticks = DescParseTickFormat.parse(setTime); } catch (NumberFormatException e) { - throw new NotEnoughArgumentsException(); + throw new NotEnoughArgumentsException(e); } - setWorldsTime(sender, worlds, ticks); + setWorldsTime(sender, worlds, ticks, add); } /** @@ -76,14 +105,17 @@ public class Commandtime extends EssentialsCommand /** * Used to set the time and inform of the change */ - private void setWorldsTime(final CommandSender sender, final Collection<World> worlds, final long ticks) + private void setWorldsTime(final CommandSender sender, final Collection<World> worlds, final long ticks, final boolean add) { // Update the time for (World world : worlds) { long time = world.getTime(); - time -= time % 24000; - world.setTime(time + 24000 + ticks); + if (!add) + { + time -= time % 24000; + } + world.setTime(time + (add ? 0 : 24000) + ticks); } final StringBuilder output = new StringBuilder(); @@ -151,4 +183,4 @@ class WorldNameComparator implements Comparator<World> { return a.getName().compareTo(b.getName()); } -} +}
\ No newline at end of file diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java index e91d0984a..fe7690646 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java @@ -20,8 +20,8 @@ public class Commandtop extends EssentialsCommand { final int topX = user.getLocation().getBlockX(); final int topZ = user.getLocation().getBlockZ(); - final int topY = user.getWorld().getHighestBlockYAt(topX, topZ); - user.getTeleport().teleport(new Location(user.getWorld(), user.getLocation().getX(), topY + 1, user.getLocation().getZ()), new Trade(this.getName(), ess), TeleportCause.COMMAND); + final Location location = new Location(user.getWorld(), topX, user.getWorld().getMaxHeight(), topZ); + user.getTeleport().teleport(location, new Trade(this.getName(), ess), TeleportCause.COMMAND); user.sendMessage(_("teleportTop")); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java index 95cbc58cd..d94f0aca5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpa.java @@ -30,7 +30,7 @@ public class Commandtpa extends EssentialsCommand { throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName())); } - if (!player.isIgnoredPlayer(user.getName())) + if (!player.isIgnoredPlayer(user)) { player.requestTeleport(user, false); player.sendMessage(_("teleportRequest", user.getDisplayName())); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java index 53204114e..4d7ced478 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java @@ -34,6 +34,7 @@ public class Commandtpo extends EssentialsCommand } user.sendMessage(_("teleporting")); user.getTeleport().now(player, false, TeleportCause.COMMAND); + break; default: if (!user.isAuthorized("essentials.tp.others")) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java index 226fa44e3..75910cd85 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java @@ -5,6 +5,7 @@ import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import org.bukkit.Location; import org.bukkit.Server; +import org.bukkit.command.CommandSender; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -41,4 +42,30 @@ public class Commandtppos extends EssentialsCommand user.getTeleport().teleport(location, charge, TeleportCause.COMMAND); throw new NoChargeException(); } + + @Override + public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception + { + if (args.length < 4) + { + throw new NotEnoughArgumentsException(); + } + + User user = ess.getUser(server.getPlayer(args[0])); + final int x = Integer.parseInt(args[1]); + final int y = Integer.parseInt(args[2]); + final int z = Integer.parseInt(args[3]); + final Location location = new Location(user.getWorld(), x, y, z); + if (args.length > 4) + { + location.setYaw((Float.parseFloat(args[4]) + 180 + 360) % 360); + } + if (args.length > 5) + { + location.setPitch(Float.parseFloat(args[5])); + } + sender.sendMessage(_("teleporting")); + user.sendMessage(_("teleporting")); + user.getTeleport().teleport(location, null, TeleportCause.COMMAND); + } }
\ No newline at end of file diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java index 8bc3ad068..dda1475d0 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java @@ -29,7 +29,7 @@ public class Commandunban extends EssentialsCommand } catch (NoSuchFieldException e) { - throw new Exception(_("playerNotFound")); + throw new Exception(_("playerNotFound"), e); } } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java b/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java index beff6a77b..585fec3b3 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java @@ -98,7 +98,7 @@ public class Commandunlimited extends EssentialsCommand } String message = "disableUnlimited"; - Boolean enableUnlimited = false; + boolean enableUnlimited = false; if (!target.hasUnlimited(stack)) { message = "enableUnlimited"; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandvanish.java b/Essentials/src/com/earth2me/essentials/commands/Commandvanish.java new file mode 100644 index 000000000..ea051e4be --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandvanish.java @@ -0,0 +1,43 @@ +package com.earth2me.essentials.commands; + +import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.User; +import org.bukkit.Server; + + +public class Commandvanish extends EssentialsCommand +{ + public Commandvanish() + { + super("vanish"); + } + + @Override + protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception + { + if (args.length < 1) + { + user.toggleVanished(); + if (user.isVanished()) + { + user.sendMessage(_("vanished")); + } + else + { + user.sendMessage(_("unvanished")); + } + } + else + { + if (args[0].contains("on") || args[0].contains("ena") || args[0].equalsIgnoreCase("1")) + { + user.setVanished(true); + } + else + { + user.setVanished(false); + } + user.sendMessage(user.isVanished() ? _("vanished") : _("unvanished")); + } + } +} diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java index 84df12900..f3727548f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java @@ -56,7 +56,7 @@ public class Commandwarp extends EssentialsCommand @Override public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { - if (args.length < 2 || args[0].matches("[0-9]+")) + if (args.length < 2 || Util.isInt(args[0])) { warpList(sender, args); throw new NoChargeException(); @@ -94,7 +94,7 @@ public class Commandwarp extends EssentialsCommand } } int page = 1; - if (args.length > 0) + if (args.length > 0 && Util.isInt(args[0])) { page = Integer.parseInt(args[0]); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandweather.java b/Essentials/src/com/earth2me/essentials/commands/Commandweather.java index 1229c9ee4..dc9f767d5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandweather.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandweather.java @@ -18,12 +18,27 @@ public class Commandweather extends EssentialsCommand @Override public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { + final boolean isStorm; if (args.length < 1) { - throw new NotEnoughArgumentsException(); + if (commandLabel.equalsIgnoreCase("sun") || commandLabel.equalsIgnoreCase("esun")) + { + isStorm = false; + } + else if (commandLabel.equalsIgnoreCase("storm") || commandLabel.equalsIgnoreCase("estorm") + || commandLabel.equalsIgnoreCase("rain") || commandLabel.equalsIgnoreCase("erain")) + { + isStorm = true; + } + else + { + throw new NotEnoughArgumentsException(); + } + } + else + { + isStorm = args[0].equalsIgnoreCase("storm"); } - - final boolean isStorm = args[0].equalsIgnoreCase("storm"); final World world = user.getWorld(); if (args.length > 1) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java index 6c7919163..4a6903ae4 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java @@ -38,6 +38,7 @@ public class Commandwhois extends EssentialsCommand } final String whois = args[0].toLowerCase(Locale.ENGLISH); final int prefixLength = Util.stripFormat(ess.getSettings().getNicknamePrefix()).length(); + boolean foundUser = false; for (Player onlinePlayer : server.getOnlinePlayers()) { final User user = ess.getUser(onlinePlayer); @@ -52,27 +53,17 @@ public class Commandwhois extends EssentialsCommand { continue; } - sender.sendMessage(""); + foundUser = true; + sender.sendMessage(_("whoisTop", user.getName())); user.setDisplayNick(); - sender.sendMessage(_("whoisIs", user.getDisplayName(), user.getName())); + sender.sendMessage(_("whoisNick", user.getDisplayName())); sender.sendMessage(_("whoisHealth", user.getHealth())); - sender.sendMessage(_("whoisExp", SetExpFix.getTotalExperience(user), user.getLevel())); - sender.sendMessage(_("whoisOP", (user.isOp() ? _("true") : _("false")))); - sender.sendMessage(_("whoisGod", (user.isGodModeEnabled() ? _("true") : _("false")))); - sender.sendMessage(_("whoisGamemode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)))); + sender.sendMessage(_("whoisExp", SetExpFix.getTotalExperience(user), user.getLevel())); sender.sendMessage(_("whoisLocation", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ())); if (!ess.getSettings().isEcoDisabled()) { sender.sendMessage(_("whoisMoney", Util.displayCurrency(user.getMoney(), ess))); } - sender.sendMessage(_("whoisJail", (user.isJailed() - ? user.getJailTimeout() > 0 - ? Util.formatDateDiff(user.getJailTimeout()) - : _("true") - : _("false")))); - sender.sendMessage(user.isAfk() - ? _("whoisStatusAway") - : _("whoisStatusAvailable")); sender.sendMessage(_("whoisIPAddress", user.getAddress().getAddress().toString())); final String location = user.getGeoLocation(); if (location != null @@ -80,6 +71,26 @@ public class Commandwhois extends EssentialsCommand { sender.sendMessage(_("whoisGeoLocation", location)); } + sender.sendMessage(_("whoisGamemode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)))); + sender.sendMessage(_("whoisGod", (user.isGodModeEnabled() ? _("true") : _("false")))); + sender.sendMessage(_("whoisOp", (user.isOp() ? _("true") : _("false")))); + sender.sendMessage(_("whoisFly", user.getAllowFlight() ? _("true") : _("false"), user.isFlying() ? _("flying") : _("notFlying"))); + sender.sendMessage(_("whoisAFK", (user.isAfk() ? _("true") : _("false")))); + sender.sendMessage(_("whoisJail", (user.isJailed() + ? user.getJailTimeout() > 0 + ? Util.formatDateDiff(user.getJailTimeout()) + : _("true") + : _("false")))); + sender.sendMessage(_("whoisMuted", (user.isMuted() + ? user.getMuteTimeout() > 0 + ? Util.formatDateDiff(user.getMuteTimeout()) + : _("true") + : _("false")))); + + } + if (!foundUser) + { + throw new NoSuchFieldException(_("playerNotFound")); } } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandworkbench.java b/Essentials/src/com/earth2me/essentials/commands/Commandworkbench.java new file mode 100644 index 000000000..265c519ab --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandworkbench.java @@ -0,0 +1,20 @@ +package com.earth2me.essentials.commands; + +import com.earth2me.essentials.User; +import org.bukkit.Server; + + +public class Commandworkbench extends EssentialsCommand +{ + public Commandworkbench() + { + super("workbench"); + } + + + @Override + public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception + { + user.openWorkbench(null, true); + } +}
\ No newline at end of file diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java index fee9d41e3..1ac37e459 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeWorld.java @@ -633,4 +633,70 @@ public class FakeWorld implements World { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public int getMonsterSpawnLimit() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setMonsterSpawnLimit(int arg0) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getAnimalSpawnLimit() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAnimalSpawnLimit(int arg0) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getWaterAnimalSpawnLimit() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setWaterAnimalSpawnLimit(int arg0) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Entity spawnEntity(Location lctn, EntityType et) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isChunkInUse(int x, int z) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public FallingBlock spawnFallingBlock(Location location, Material material, byte data) throws IllegalArgumentException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public FallingBlock spawnFallingBlock(Location location, int blockId, byte blockData) throws IllegalArgumentException + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void playSound(Location arg0, Sound arg1, float arg2, float arg3) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/OfflineBedLocation.java b/Essentials/src/com/earth2me/essentials/craftbukkit/OfflineBedLocation.java deleted file mode 100644 index 3ddfd20b5..000000000 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/OfflineBedLocation.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.earth2me.essentials.craftbukkit; - -import com.earth2me.essentials.IEssentials; -import java.util.logging.Level; -import java.util.logging.Logger; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.WorldNBTStorage; -import org.bukkit.Location; -import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.craftbukkit.CraftWorld; - - -public class OfflineBedLocation -{ - public static Location getBedLocation(final String playername, final IEssentials ess) - { - try - { - final CraftServer cserver = (CraftServer)ess.getServer(); - if (cserver == null) - { - return null; - } - final WorldNBTStorage wnbtStorage = (WorldNBTStorage)cserver.getHandle().playerFileData; - if (wnbtStorage == null) - { - return null; - } - final NBTTagCompound playerStorage = wnbtStorage.getPlayerData(playername); - if (playerStorage == null) - { - return null; - } - - if (playerStorage.hasKey("SpawnX") && playerStorage.hasKey("SpawnY") && playerStorage.hasKey("SpawnZ")) - { - String spawnWorld = playerStorage.getString("SpawnWorld"); - if ("".equals(spawnWorld)) - { - spawnWorld = cserver.getWorlds().get(0).getName(); - } - return new Location(cserver.getWorld(spawnWorld), playerStorage.getInt("SpawnX"), playerStorage.getInt("SpawnY"), playerStorage.getInt("SpawnZ")); - } - return null; - } - catch (Throwable ex) - { - Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex); - return null; - } - } -} diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java b/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java index 70d15b856..7ed3034c3 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java @@ -16,13 +16,13 @@ public class SetExpFix player.setExp(0); player.setLevel(0); player.setTotalExperience(0); - + //This following code is technically redundant now, as bukkit now calulcates levels more or less correctly //At larger numbers however... player.getExp(3000), only seems to give 2999, putting the below calculations off. int amount = exp; while (amount > 0) { - final int expToLevel = getExpToLevel(player); + final int expToLevel = getExpAtLevel(player); amount -= expToLevel; if (amount >= 0) { @@ -39,27 +39,56 @@ public class SetExpFix } } - private static int getExpToLevel(final Player player) - { - return getExpToLevel(player.getLevel()); + private static int getExpAtLevel(final Player player) + { + return getExpAtLevel(player.getLevel()); } - - private static int getExpToLevel(final int level) - { - return 7 + (level * 7 >> 1); + + public static int getExpAtLevel(final int level) + { + if (level > 29) + { + return 62 + (level - 30) * 7; + } + if (level > 15) + { + return 17 + (level - 15) * 3; + } + return 17; } + public static int getExpToLevel(final int level) + { + int currentLevel = 0; + int exp = 0; + + while (currentLevel < level) + { + exp += getExpAtLevel(currentLevel); + currentLevel++; + } + return exp; + } + //This method is required because the bukkit player.getTotalExperience() method, shows exp that has been 'spent'. //Without this people would be able to use exp and then still sell it. public static int getTotalExperience(final Player player) { - int exp = (int) (getExpToLevel(player) * player.getExp()); + int exp = (int)Math.round(getExpAtLevel(player) * player.getExp()); int currentLevel = player.getLevel(); - - while (currentLevel > 0) { + + while (currentLevel > 0) + { currentLevel--; - exp += getExpToLevel(currentLevel); + exp += getExpAtLevel(currentLevel); } return exp; } + + public static int getExpUntilNextLevel(final Player player) + { + int exp = (int)Math.round(getExpAtLevel(player) * player.getExp()); + int nextLevel = player.getLevel(); + return getExpAtLevel(nextLevel) - exp; + } } diff --git a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java index e009daa5d..f361e4f50 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/Metrics.java +++ b/Essentials/src/com/earth2me/essentials/metrics/Metrics.java @@ -223,7 +223,7 @@ public class Metrics } catch (IOException e) { - Bukkit.getLogger().log(Level.INFO, "[Metrics] {0}", e.getMessage()); + Bukkit.getLogger().log(Level.INFO, "[Metrics] " + e.getMessage()); } } }, 0, PING_INTERVAL * 1200); @@ -246,12 +246,12 @@ public class Metrics } catch (IOException ex) { - Bukkit.getLogger().log(Level.INFO, "[Metrics] {0}", ex.getMessage()); + Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage()); return true; } catch (InvalidConfigurationException ex) { - Bukkit.getLogger().log(Level.INFO, "[Metrics] {0}", ex.getMessage()); + Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage()); return true; } return configuration.getBoolean("opt-out", false); diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java index 6380b7f6c..9638d8d5e 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.metrics.Metrics.Graph; import com.earth2me.essentials.metrics.Metrics.Plotter; import com.earth2me.essentials.register.payment.Method; +import com.earth2me.essentials.register.payment.methods.VaultEco; import java.util.Locale; import java.util.logging.Level; @@ -17,6 +18,7 @@ public class MetricsStarter implements Runnable private enum Modules { Essentials, + EssentialsAntiBuild, EssentialsAntiCheat, EssentialsChat, EssentialsSpawn, @@ -150,11 +152,19 @@ public class MetricsStarter implements Runnable final Method method = ess.getPaymentMethod().getMethod(); if (method != null) { - String version = method.getVersion(); - final int dashPosition = version.indexOf('-'); - if (dashPosition > 0) + String version; + if (method instanceof VaultEco) { - version = version.substring(0, dashPosition); + version = ((VaultEco)method).getEconomy(); + } + else + { + version = method.getVersion(); + final int dashPosition = version.indexOf('-'); + if (dashPosition > 0) + { + version = version.substring(0, dashPosition); + } } depGraph.addPlotter(new SimplePlotter(method.getName() + " " + version)); } diff --git a/Essentials/src/com/earth2me/essentials/perm/BPermissions2Handler.java b/Essentials/src/com/earth2me/essentials/perm/BPermissions2Handler.java index f4122bf53..d8c5c9c12 100644 --- a/Essentials/src/com/earth2me/essentials/perm/BPermissions2Handler.java +++ b/Essentials/src/com/earth2me/essentials/perm/BPermissions2Handler.java @@ -44,7 +44,7 @@ public class BPermissions2Handler extends SuperpermsHandler @Override public boolean canBuild(final Player base, final String group) { - return hasPermission(base, "essentials.build") || hasPermission(base, "bPermissions.build"); + return hasPermission(base, "bPermissions.build"); } @Override diff --git a/Essentials/src/com/earth2me/essentials/perm/BPermissionsHandler.java b/Essentials/src/com/earth2me/essentials/perm/BPermissionsHandler.java index fea268f90..a542c3d66 100644 --- a/Essentials/src/com/earth2me/essentials/perm/BPermissionsHandler.java +++ b/Essentials/src/com/earth2me/essentials/perm/BPermissionsHandler.java @@ -56,7 +56,7 @@ public class BPermissionsHandler extends SuperpermsHandler @Override public boolean canBuild(final Player base, final String group) { - return hasPermission(base, "essentials.build") || hasPermission(base, "bPermissions.build"); + return hasPermission(base, "bPermissions.build"); } @Override diff --git a/Essentials/src/com/earth2me/essentials/perm/PermissionsBukkitHandler.java b/Essentials/src/com/earth2me/essentials/perm/PermissionsBukkitHandler.java index b3cc62979..315cfa363 100644 --- a/Essentials/src/com/earth2me/essentials/perm/PermissionsBukkitHandler.java +++ b/Essentials/src/com/earth2me/essentials/perm/PermissionsBukkitHandler.java @@ -78,6 +78,6 @@ public class PermissionsBukkitHandler extends SuperpermsHandler @Override public boolean canBuild(Player base, String group) { - return base.hasPermission("essentials.build") || base.hasPermission("permissions.build"); + return hasPermission(base, "permissions.build"); } } diff --git a/Essentials/src/com/earth2me/essentials/perm/PrivilegesHandler.java b/Essentials/src/com/earth2me/essentials/perm/PrivilegesHandler.java index c81f93cbc..03db3502b 100644 --- a/Essentials/src/com/earth2me/essentials/perm/PrivilegesHandler.java +++ b/Essentials/src/com/earth2me/essentials/perm/PrivilegesHandler.java @@ -55,7 +55,7 @@ public class PrivilegesHandler extends SuperpermsHandler @Override public boolean canBuild(Player base, String group) { - return base.hasPermission("essentials.build") || base.hasPermission("privileges.build"); + return hasPermission(base, "privileges.build"); } } diff --git a/Essentials/src/com/earth2me/essentials/perm/SuperpermsHandler.java b/Essentials/src/com/earth2me/essentials/perm/SuperpermsHandler.java index 2e767cb72..aedd4c5ae 100644 --- a/Essentials/src/com/earth2me/essentials/perm/SuperpermsHandler.java +++ b/Essentials/src/com/earth2me/essentials/perm/SuperpermsHandler.java @@ -21,7 +21,7 @@ public class SuperpermsHandler implements IPermissionsHandler @Override public boolean canBuild(final Player base, final String group) { - return hasPermission(base, "essentials.build"); + return false; } @Override diff --git a/Essentials/src/com/earth2me/essentials/register/payment/Method.java b/Essentials/src/com/earth2me/essentials/register/payment/Method.java index a942667e8..c4c9d401a 100644 --- a/Essentials/src/com/earth2me/essentials/register/payment/Method.java +++ b/Essentials/src/com/earth2me/essentials/register/payment/Method.java @@ -33,6 +33,13 @@ public interface Method * @return <code>String</code> Plugin name. */ public String getName(); + + /** + * Returns the reported name of this method. + * + * @return <code>String</code> Plugin name. + */ + public String getLongName(); /** * Returns the actual version of this method. diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java index c3b71d4e3..a77a1d3b0 100644 --- a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java +++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java @@ -8,9 +8,8 @@ import org.bukkit.plugin.Plugin; /** * BOSEconomy 6 Implementation of Method * - * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) - * @copyright (c) 2011 - * @license AOL license <http://aol.nexua.org> + * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license + * <http://aol.nexua.org> */ @SuppressWarnings("deprecation") public class BOSE6 implements Method @@ -30,6 +29,12 @@ public class BOSE6 implements Method } @Override + public String getLongName() + { + return getName(); + } + + @Override public String getVersion() { return "0.6.2"; diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE7.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE7.java index d21ea6244..7aab8c459 100644 --- a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE7.java +++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE7.java @@ -9,9 +9,8 @@ import org.bukkit.plugin.Plugin; * BOSEconomy 7 Implementation of Method * * @author Acrobot - * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) - * @copyright (c) 2011 - * @license AOL license <http://aol.nexua.org> + * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license + * <http://aol.nexua.org> */ public class BOSE7 implements Method { @@ -30,6 +29,12 @@ public class BOSE7 implements Method } @Override + public String getLongName() + { + return getName(); + } + + @Override public String getVersion() { return "0.7.0"; diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/MCUR.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/MCUR.java index 87d633b5c..92c4f4f19 100644 --- a/Essentials/src/com/earth2me/essentials/register/payment/methods/MCUR.java +++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/MCUR.java @@ -9,9 +9,7 @@ import org.bukkit.plugin.Plugin; /** * MultiCurrency Method implementation. * - * @author Acrobot - * @copyright (c) 2011 - * @license AOL license <http://aol.nexua.org> + * @author Acrobot @copyright (c) 2011 @license AOL license <http://aol.nexua.org> */ public class MCUR implements Method { @@ -30,6 +28,12 @@ public class MCUR implements Method } @Override + public String getLongName() + { + return getName(); + } + + @Override public String getVersion() { return "0.09"; diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/VaultEco.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/VaultEco.java index 84ce816cf..f0a8171f3 100644 --- a/Essentials/src/com/earth2me/essentials/register/payment/methods/VaultEco.java +++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/VaultEco.java @@ -34,8 +34,18 @@ public class VaultEco implements Method @Override public String getName() { - - return this.vault.getDescription().getName().concat(" - Economy: ").concat(economy == null ? "NoEco" : economy.getName()); + return this.vault.getDescription().getName(); + } + + public String getEconomy() + { + return economy == null ? "NoEco" : economy.getName(); + } + + @Override + public String getLongName() + { + return getName().concat(" - Economy: ").concat(getEconomy()); } @Override diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java index 52fb36e15..4542f6743 100644 --- a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java +++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java @@ -9,9 +9,8 @@ import org.bukkit.plugin.Plugin; /** * iConomy 4 Implementation of Method * - * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) - * @copyright (c) 2011 - * @license AOL license <http://aol.nexua.org> + * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license + * <http://aol.nexua.org> */ public class iCo4 implements Method { @@ -30,6 +29,12 @@ public class iCo4 implements Method } @Override + public String getLongName() + { + return getName(); + } + + @Override public String getVersion() { return "4"; diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo5.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo5.java index 3b2fb2f6d..87144fa34 100644 --- a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo5.java +++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo5.java @@ -12,9 +12,8 @@ import org.bukkit.plugin.Plugin; /** * iConomy 5 Implementation of Method * - * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) - * @copyright (c) 2011 - * @license AOL license <http://aol.nexua.org> + * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license + * <http://aol.nexua.org> */ public class iCo5 implements Method { @@ -33,6 +32,12 @@ public class iCo5 implements Method } @Override + public String getLongName() + { + return getName(); + } + + @Override public String getVersion() { return "5"; diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo6.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo6.java index 1a2950847..ecd1d6aae 100644 --- a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo6.java +++ b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo6.java @@ -11,9 +11,8 @@ import org.bukkit.plugin.Plugin; /** * iConomy 6 Implementation of Method * - * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) - * @copyright (c) 2011 - * @license AOL license <http://aol.nexua.org> + * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license + * <http://aol.nexua.org> */ public class iCo6 implements Method { @@ -32,6 +31,12 @@ public class iCo6 implements Method } @Override + public String getLongName() + { + return getName(); + } + + @Override public String getVersion() { return "6"; diff --git a/Essentials/src/com/earth2me/essentials/settings/Backup.java b/Essentials/src/com/earth2me/essentials/settings/Backup.java deleted file mode 100644 index f43af47c0..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/Backup.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Backup implements StorageObject -{ - @Comment("Interval in minutes") - private long interval = 60; - @Comment("Add a command that backups your data, e.g. 'rdiff-backup World1 backups/World1'") - private String command; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/Chat.java b/Essentials/src/com/earth2me/essentials/settings/Chat.java deleted file mode 100644 index 623228c4e..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/Chat.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Chat implements StorageObject -{ - @Comment("The character(s) to prefix all nicknames, so that you know they are not true usernames.") - private String nicknamePrefix = "~"; - @Comment("Disable this if you have any other plugin, that modifies the displayname of a user.") - private boolean changeDisplayname = true; - private String displaynameFormat = "{PREFIX}{NICKNAMEPREFIX}{NAME}{SUFFIX}"; - @Comment( - { - "If EssentialsChat is installed, this will define how far a player's voice travels, in blocks. Set to 0 to make all chat global.", - "Note that users with the \"essentials.chat.spy\" permission will hear everything, regardless of this setting.", - "Users with essentials.chat.shout can override this by prefixing text with an exclamation mark (!)", - "Or with essentials.chat.question can override this by prefixing text with a question mark (?)", - "You can add command costs for shout/question by adding chat-shout and chat-question to the command costs section." - }) - private int localRadius = 0; - @Comment("Set the default chat format here, it will be overwritten by group specific chat formats.") - private String defaultFormat = "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}"; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/Commands.java b/Essentials/src/com/earth2me/essentials/settings/Commands.java deleted file mode 100644 index 08efc881c..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/Commands.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.settings.commands.*; -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.ListType; -import com.earth2me.essentials.storage.StorageObject; -import java.util.ArrayList; -import java.util.List; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Commands implements StorageObject -{ - private Afk afk = new Afk(); - private God god = new God(); - private Help help = new Help(); - private Home home = new Home(); - private Kit kit = new Kit(); - private Lightning lightning = new Lightning(); - private Spawnmob spawnmob = new Spawnmob(); - @ListType - @Comment( - { - "When a command conflicts with another plugin, by default, Essentials will try to force the OTHER plugin to take", - "priority. If a command is in this list, Essentials will try to give ITSELF priority. This does not always work:", - "usually whichever plugin was updated most recently wins out. However, the full name of the command will always work.", - "For example, if WorldGuard and Essentials are both enabled, and WorldGuard takes control over /god, /essentials:god", - "will still map to Essentials, whereas it might normally get forced upon WorldGuard. Commands prefixed with an \"e\",", - "such as /egod, will always grant Essentials priority.", - "We should try to take priority over /god. If this doesn't work, use /essentials:god or /egod.", - "If god is set using WorldGuard, use /ungod to remove then use whichever you see fit." - }) - private List<String> overwritten = new ArrayList<String>(); - @ListType - @Comment("Disabled commands will be completelly unavailable on the server.") - private List<String> disabled = new ArrayList<String>(); -} diff --git a/Essentials/src/com/earth2me/essentials/settings/Economy.java b/Essentials/src/com/earth2me/essentials/settings/Economy.java deleted file mode 100644 index 5872dada9..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/Economy.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.MapValueType; -import com.earth2me.essentials.storage.StorageObject; -import java.util.HashMap; -import java.util.Map; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Economy implements StorageObject -{ - @Comment("Defines the balance with which new players begin. Defaults to 0.") - private double startingBalance = 0.0; - @MapValueType(Double.class) - @Comment("Defines the cost to use the given commands PER USE") - private Map<String, Double> commandCosts = new HashMap<String, Double>(); - @Comment("Set this to a currency symbol you want to use.") - private String currencySymbol = "$"; - - public String getCurrencySymbol() - { - return currencySymbol == null || currencySymbol.isEmpty() ? "$" : currencySymbol.substring(0, 1); - } - private final transient static double MAXMONEY = 10000000000000.0; - @Comment( - { - "Set the maximum amount of money a player can have", - "The amount is always limited to 10 trillions because of the limitations of a java double" - }) - private double maxMoney = MAXMONEY; - - public double getMaxMoney() - { - return Math.abs(maxMoney) > MAXMONEY ? MAXMONEY : Math.abs(maxMoney); - } - @Comment("Enable this to log all interactions with trade/buy/sell signs and sell command") - private boolean logEnabled = false; - private Worth worth = new Worth(); -} diff --git a/Essentials/src/com/earth2me/essentials/settings/General.java b/Essentials/src/com/earth2me/essentials/settings/General.java deleted file mode 100644 index a7cf537bb..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/General.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class General implements StorageObject -{ - @Comment("Backup runs a command while saving is disabled") - private Backup backup = new Backup(); - @Comment("You can disable the death messages of minecraft.") - private boolean deathMessages = true; - @Comment("Turn this on, if you want to see more error messages, if something goes wrong.") - private boolean debug = false; - @Comment( - { - "Set the locale here, if you want to change the language of Essentials.", - "If this is not set, Essentials will use the language of your computer.", - "Available locales: da, de, en, fr, nl" - }) - private String locale; - @Comment( - { - "Should we announce to the server when someone logs in for the first time?", - "If so, use this format, replacing {DISPLAYNAME} with the player name.", - "If not, set to ''" - }) - private String newPlayerAnnouncement = "&dWelcome {DISPLAYNAME} to the server!"; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/GroupOptions.java b/Essentials/src/com/earth2me/essentials/settings/GroupOptions.java deleted file mode 100644 index 7b16a471b..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/GroupOptions.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class GroupOptions implements StorageObject -{ - @Comment("Message format of chat messages") - private String messageFormat; - @Comment("Prefix for name") - private String prefix; - @Comment("Suffix for name") - private String suffix; - @Comment("Amount of homes a player can have") - private Integer homes; - @Comment("Cooldown between teleports") - private Integer teleportCooldown; - @Comment("Delay before teleport") - private Integer teleportDelay; - @Comment("Cooldown between heals") - private Integer healCooldown; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/Groups.java b/Essentials/src/com/earth2me/essentials/settings/Groups.java deleted file mode 100644 index 5e67db890..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/Groups.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.MapValueType; -import com.earth2me.essentials.storage.StorageObject; -import java.util.LinkedHashMap; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Groups implements StorageObject -{ - public Groups() - { - GroupOptions defaultOptions = new GroupOptions(); - groups.put("default", defaultOptions); - } - @Comment( - { - "The order of the groups matters, the groups are checked from top to bottom.", - "All group names have to be lower case.", - "The groups can be connected to users using the permission essentials.groups.groupname" - }) - @MapValueType(GroupOptions.class) - private LinkedHashMap<String, GroupOptions> groups = new LinkedHashMap<String, GroupOptions>(); -} diff --git a/Essentials/src/com/earth2me/essentials/settings/Locations.java b/Essentials/src/com/earth2me/essentials/settings/Locations.java deleted file mode 100644 index 7e7f1a63d..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/Locations.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.storage.MapValueType; -import com.earth2me.essentials.storage.StorageObject; -import java.util.HashMap; -import java.util.Map; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.bukkit.Location; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Locations implements StorageObject -{ - @MapValueType(Location.class) - Map<String, Location> jails = new HashMap<String, Location>(); - @MapValueType(Location.class) - Map<String, Location> warps = new HashMap<String, Location>(); - @MapValueType(Location.class) - Map<String, Location> spawns = new HashMap<String, Location>(); -} diff --git a/Essentials/src/com/earth2me/essentials/settings/Settings.java b/Essentials/src/com/earth2me/essentials/settings/Settings.java deleted file mode 100644 index 4c2ff2dd9..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/Settings.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Settings implements StorageObject -{ - @Comment( - { - "##########################################################", - "+------------------------------------------------------+ #", - "| General Settings | #", - "+------------------------------------------------------+ #", - "##########################################################" - }) - private General general = new General(); - @Comment( - { - "##########################################################", - "+------------------------------------------------------+ #", - "| Chat Settings | #", - "+------------------------------------------------------+ #", - "##########################################################" - }) - private Chat chat = new Chat(); - @Comment( - { - "##########################################################", - "+------------------------------------------------------+ #", - "| Economy Settings | #", - "+------------------------------------------------------+ #", - "##########################################################" - }) - private Economy economy = new Economy(); - @Comment( - { - "##########################################################", - "+------------------------------------------------------+ #", - "| Commands Settings | #", - "+------------------------------------------------------+ #", - "##########################################################" - }) - private Commands commands = new Commands(); - @Comment( - { - "##########################################################", - "+------------------------------------------------------+ #", - "| Group Settings | #", - "+------------------------------------------------------+ #", - "##########################################################" - }) - private Groups groups = new Groups(); -} diff --git a/Essentials/src/com/earth2me/essentials/settings/Worth.java b/Essentials/src/com/earth2me/essentials/settings/Worth.java deleted file mode 100644 index 707f907cf..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/Worth.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.earth2me.essentials.settings; - -import com.earth2me.essentials.storage.EnchantmentLevel; -import com.earth2me.essentials.storage.MapKeyType; -import com.earth2me.essentials.storage.MapValueType; -import com.earth2me.essentials.storage.StorageObject; -import java.util.HashMap; -import java.util.Map; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.bukkit.Material; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.material.MaterialData; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Worth implements StorageObject -{ - @MapKeyType(MaterialData.class) - @MapValueType(Double.class) - private Map<MaterialData, Double> sell = new HashMap<MaterialData, Double>(); - @MapKeyType(MaterialData.class) - @MapValueType(Double.class) - private Map<MaterialData, Double> buy = new HashMap<MaterialData, Double>(); - @MapKeyType(EnchantmentLevel.class) - @MapValueType(Double.class) - private Map<EnchantmentLevel, Double> enchantmentMultiplier = new HashMap<EnchantmentLevel, Double>(); - - public Worth() - { - sell.put(new MaterialData(Material.APPLE, (byte)0), 1.0); - } -} diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Afk.java b/Essentials/src/com/earth2me/essentials/settings/commands/Afk.java deleted file mode 100644 index 80cae7e8a..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/commands/Afk.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.earth2me.essentials.settings.commands; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Afk implements StorageObject -{ - @Comment( - { - "After this timeout in seconds, the user will be set as afk.", - "Set to -1 for no timeout." - }) - private int autoAFK = 300; - @Comment( - { - "Auto-AFK Kick", - "After this timeout in seconds, the user will be kicked from the server.", - "Set to -1 for no timeout." - }) - private int autoAFKKick = -1; - @Comment( - { - "Set this to true, if you want to freeze the player, if he is afk.", - "Other players or monsters can't push him out of afk mode then.", - "This will also enable temporary god mode for the afk player.", - "The player has to use the command /afk to leave the afk mode.", - "You have to add a message to your welcome message or help page,", - "since the player will not get a message, if he tries to move." - }) - private boolean freezeAFKPlayers = false; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/God.java b/Essentials/src/com/earth2me/essentials/settings/commands/God.java deleted file mode 100644 index a6f5dbfc3..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/commands/God.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.earth2me.essentials.settings.commands; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class God implements StorageObject -{ - @Comment("Turn off god mode when people exit") - private boolean removeOnDisconnect = false; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Help.java b/Essentials/src/com/earth2me/essentials/settings/commands/Help.java deleted file mode 100644 index 0b4787471..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/commands/Help.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.earth2me.essentials.settings.commands; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Help implements StorageObject -{ - @Comment("Show other plugins commands in help") - private boolean showNonEssCommandsInHelp = true; - @Comment( - { - "Hide plugins which don't give a permission in their plugin.yml for each command.", - "You can override a true value here for a single plugin by adding a permission to a user/group.", - "The individual permission is: essentials.help.<plugin>, anyone with essentials.* or '*' will see all help this setting reguardless.", - "You can use negative permissions to remove access to just a single plugins help if the following is enabled." - }) - private boolean hidePermissionlessCommands = true; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Home.java b/Essentials/src/com/earth2me/essentials/settings/commands/Home.java deleted file mode 100644 index 8b3a0ca82..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/commands/Home.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.earth2me.essentials.settings.commands; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Home implements StorageObject -{ - @Comment("When players die, should they respawn at their homes, instead of the spawnpoint?") - private boolean respawnAtHome = false; - @Comment( - { - "When a player interacts with a bed, should their home be set to that location?", - "If you enable this and remove default player access to the /sethome command, ", - "you can make beds the only way for players to set their home location." - }) - private boolean bedSetsHome = false; - @Comment("If no home is set, should the player be send to spawn, when /home is used.") - private boolean spawnIfNoHome = false; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Kit.java b/Essentials/src/com/earth2me/essentials/settings/commands/Kit.java deleted file mode 100644 index 87aa42d3c..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/commands/Kit.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.earth2me.essentials.settings.commands; - -import com.earth2me.essentials.storage.MapValueType; -import com.earth2me.essentials.storage.StorageObject; -import java.util.HashMap; -import java.util.Map; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.bukkit.Material; -import org.bukkit.inventory.ItemStack; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Kit implements StorageObject -{ - public Kit() - { - final KitObject kit = new KitObject(); - kit.setDelay(10.0); - kit.getItems().add(new ItemStack(Material.DIAMOND_SPADE, 1)); - kit.getItems().add(new ItemStack(Material.DIAMOND_PICKAXE, 1)); - kit.getItems().add(new ItemStack(Material.DIAMOND_AXE, 1)); - kits.put("tools", kit); - } - @MapValueType(KitObject.class) - private Map<String, KitObject> kits = new HashMap<String, KitObject>(); -} diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/KitObject.java b/Essentials/src/com/earth2me/essentials/settings/commands/KitObject.java deleted file mode 100644 index fe0353be9..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/commands/KitObject.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.earth2me.essentials.settings.commands; - -import com.earth2me.essentials.storage.ListType; -import com.earth2me.essentials.storage.StorageObject; -import java.util.ArrayList; -import java.util.List; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.bukkit.inventory.ItemStack; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class KitObject implements StorageObject -{ - @ListType(ItemStack.class) - private List<ItemStack> items = new ArrayList<ItemStack>(); - private Double delay; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Lightning.java b/Essentials/src/com/earth2me/essentials/settings/commands/Lightning.java deleted file mode 100644 index e40e645da..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/commands/Lightning.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.earth2me.essentials.settings.commands; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Lightning implements StorageObject -{ - @Comment("Shall we notify users when using /lightning") - private boolean warnPlayer = true; -} diff --git a/Essentials/src/com/earth2me/essentials/settings/commands/Spawnmob.java b/Essentials/src/com/earth2me/essentials/settings/commands/Spawnmob.java deleted file mode 100644 index 37d41c296..000000000 --- a/Essentials/src/com/earth2me/essentials/settings/commands/Spawnmob.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.earth2me.essentials.settings.commands; - -import com.earth2me.essentials.storage.Comment; -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Spawnmob implements StorageObject -{ - @Comment("The maximum amount of monsters, a player can spawn with a call of /spawnmob.") - private int limit = 10; -} diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java index 21e70516e..f3faa2de0 100644 --- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java +++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java @@ -76,6 +76,10 @@ public class EssentialsSign { final ISign sign = new BlockSign(block); final User user = ess.getUser(player); + if (user.checkSignThrottle()) + { + return false; + } try { return (user.isAuthorized("essentials.signs." + signName.toLowerCase(Locale.ENGLISH) + ".use") @@ -408,6 +412,7 @@ public class EssentialsSign if (item.equalsIgnoreCase("times")) { sign.setLine(index, (quantity - decrement) + " times"); + sign.updateSign(); return new Trade(signName.toLowerCase(Locale.ENGLISH) + "sign", ess); } else if (item.equalsIgnoreCase("exp") || item.equalsIgnoreCase("xp")) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java index 8acca9804..162457baf 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java @@ -19,16 +19,18 @@ public class SignBlockListener implements Listener { private final transient IEssentials ess; private final static Logger LOGGER = Logger.getLogger("Minecraft"); + private final static int WALL_SIGN = Material.WALL_SIGN.getId(); + private final static int SIGN_POST = Material.SIGN_POST.getId(); public SignBlockListener(IEssentials ess) { this.ess = ess; } - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockBreak(final BlockBreakEvent event) { - if (event.isCancelled() || ess.getSettings().areSignsDisabled()) + if (ess.getSettings().areSignsDisabled()) { return; } @@ -42,7 +44,7 @@ public class SignBlockListener implements Listener public boolean protectSignsAndBlocks(final Block block, final Player player) { final int mat = block.getTypeId(); - if (mat == Material.SIGN_POST.getId() || mat == Material.WALL_SIGN.getId()) + if (mat == SIGN_POST || mat == WALL_SIGN) { final Sign csign = (Sign)block.getState(); @@ -55,31 +57,28 @@ public class SignBlockListener implements Listener } } } - else + // prevent any signs be broken by destroying the block they are attached to + if (EssentialsSign.checkIfBlockBreaksSigns(block)) { - // prevent any signs be broken by destroying the block they are attached to - if (EssentialsSign.checkIfBlockBreaksSigns(block)) + LOGGER.log(Level.INFO, "Prevented that a block was broken next to a sign."); + return true; + } + for (EssentialsSign sign : ess.getSettings().enabledSigns()) + { + if (sign.getBlocks().contains(block.getType()) + && !sign.onBlockBreak(block, player, ess)) { - LOGGER.log(Level.INFO, "Prevented that a block was broken next to a sign."); + LOGGER.log(Level.INFO, "A block was protected by a sign."); return true; } - for (EssentialsSign sign : ess.getSettings().enabledSigns()) - { - if (sign.getBlocks().contains(block.getType()) - && !sign.onBlockBreak(block, player, ess)) - { - LOGGER.log(Level.INFO, "A block was protected by a sign."); - return true; - } - } } return false; } - @EventHandler(priority = EventPriority.HIGHEST) - public void onSignChange(final SignChangeEvent event) + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) + public void onSignChange2(final SignChangeEvent event) { - if (event.isCancelled() || ess.getSettings().areSignsDisabled()) + if (ess.getSettings().areSignsDisabled()) { return; } @@ -89,6 +88,15 @@ public class SignBlockListener implements Listener { event.setLine(i, Util.formatString(user, "essentials.signs", event.getLine(i))); } + } + + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + public void onSignChange(final SignChangeEvent event) + { + if (ess.getSettings().areSignsDisabled()) + { + return; + } for (Signs signs : Signs.values()) { @@ -107,25 +115,25 @@ public class SignBlockListener implements Listener } } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onBlockPlace(final BlockPlaceEvent event) { - if (event.isCancelled() || ess.getSettings().areSignsDisabled()) + if (ess.getSettings().areSignsDisabled()) { return; } final Block against = event.getBlockAgainst(); - if ((against.getType() == Material.WALL_SIGN - || against.getType() == Material.SIGN_POST) + if ((against.getTypeId() == WALL_SIGN + || against.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(new EssentialsSign.BlockSign(against))) { event.setCancelled(true); return; } final Block block = event.getBlock(); - if (block.getType() == Material.WALL_SIGN - || block.getType() == Material.SIGN_POST) + if (block.getTypeId() == WALL_SIGN + || block.getTypeId() == SIGN_POST) { return; } @@ -141,17 +149,17 @@ public class SignBlockListener implements Listener } } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onBlockBurn(final BlockBurnEvent event) { - if (event.isCancelled() || ess.getSettings().areSignsDisabled()) + if (ess.getSettings().areSignsDisabled()) { return; } final Block block = event.getBlock(); - if (((block.getType() == Material.WALL_SIGN - || block.getType() == Material.SIGN_POST) + if (((block.getTypeId() == WALL_SIGN + || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block)) { @@ -169,17 +177,17 @@ public class SignBlockListener implements Listener } } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onBlockIgnite(final BlockIgniteEvent event) { - if (event.isCancelled() || ess.getSettings().areSignsDisabled()) + if (ess.getSettings().areSignsDisabled()) { return; } final Block block = event.getBlock(); - if (((block.getType() == Material.WALL_SIGN - || block.getType() == Material.SIGN_POST) + if (((block.getTypeId() == WALL_SIGN + || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block)) { @@ -200,10 +208,15 @@ public class SignBlockListener implements Listener @EventHandler(priority = EventPriority.LOW) public void onBlockPistonExtend(final BlockPistonExtendEvent event) { + if (ess.getSettings().areSignsDisabled()) + { + return; + } + for (Block block : event.getBlocks()) { - if (((block.getType() == Material.WALL_SIGN - || block.getType() == Material.SIGN_POST) + if (((block.getTypeId() == WALL_SIGN + || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block)) { @@ -225,11 +238,16 @@ public class SignBlockListener implements Listener @EventHandler(priority = EventPriority.LOW) public void onBlockPistonRetract(final BlockPistonRetractEvent event) { + if (ess.getSettings().areSignsDisabled()) + { + return; + } + if (event.isSticky()) { final Block block = event.getBlock(); - if (((block.getType() == Material.WALL_SIGN - || block.getType() == Material.SIGN_POST) + if (((block.getTypeId() == WALL_SIGN + || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block)) { diff --git a/Essentials/src/com/earth2me/essentials/signs/SignEnchant.java b/Essentials/src/com/earth2me/essentials/signs/SignEnchant.java index 5907442d9..a50ce967a 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignEnchant.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignEnchant.java @@ -41,7 +41,7 @@ public class SignEnchant extends EssentialsSign } catch (NumberFormatException ex) { - throw new SignException(ex.getMessage()); + throw new SignException(ex.getMessage(), ex); } if (level < 1 || level > enchantment.getMaxLevel()) { @@ -57,7 +57,7 @@ public class SignEnchant extends EssentialsSign } catch (Throwable ex) { - throw new SignException(ex.getMessage()); + throw new SignException(ex.getMessage(), ex); } getTrade(sign, 3, ess); return true; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java b/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java index a0446179f..edc5b856d 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java @@ -22,10 +22,15 @@ public class SignEntityListener implements Listener @EventHandler(priority = EventPriority.LOW) public void onEntityExplode(final EntityExplodeEvent event) { + if (ess.getSettings().areSignsDisabled()) + { + return; + } + for (Block block : event.blockList()) { - if (((block.getType() == Material.WALL_SIGN - || block.getType() == Material.SIGN_POST) + if (((block.getTypeId() == Material.WALL_SIGN.getId() + || block.getTypeId() == Material.SIGN_POST.getId()) && EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block)) { @@ -43,17 +48,17 @@ public class SignEntityListener implements Listener } } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onEntityChangeBlock(final EntityChangeBlockEvent event) { - if (event.isCancelled() || ess.getSettings().areSignsDisabled()) + if (ess.getSettings().areSignsDisabled()) { return; } final Block block = event.getBlock(); - if (((block.getType() == Material.WALL_SIGN - || block.getType() == Material.SIGN_POST) + if (((block.getTypeId() == Material.WALL_SIGN.getId() + || block.getTypeId() == Material.SIGN_POST.getId()) && EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block)) { diff --git a/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java b/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java index 37a9fb1b8..e3166db78 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java @@ -7,6 +7,7 @@ import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import java.util.Locale; import org.bukkit.GameMode; +import org.bukkit.entity.Player; public class SignGameMode extends EssentialsSign @@ -19,19 +20,53 @@ public class SignGameMode extends EssentialsSign @Override protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException { - validateTrade(sign, 1, ess); + final String gamemode = sign.getLine(1); + if (gamemode.isEmpty()) + { + sign.setLine(1, "Survival"); + } + + validateTrade(sign, 2, 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); + final Trade charge = getTrade(sign, 2, ess); + final String mode = sign.getLine(1).trim(); + + if (mode.isEmpty()) + { + throw new SignException(_("invalidSignLine", 2)); + } + charge.isAffordableFor(player); - player.setGameMode(player.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL); + performSetMode(mode.toLowerCase(Locale.ENGLISH), player); player.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName())); charge.charge(player); return true; } + + private void performSetMode(String mode, Player player) throws SignException + { + if (mode.contains("survi") || mode.equalsIgnoreCase("0")) + { + player.setGameMode(GameMode.SURVIVAL); + } + else if (mode.contains("creat") || mode.equalsIgnoreCase("1")) + { + player.setGameMode(GameMode.CREATIVE); + } + else if (mode.contains("advent") || mode.equalsIgnoreCase("2")) + { + player.setGameMode(GameMode.ADVENTURE); + } + else + { + throw new SignException(_("invalidSignLine", 2)); + } + } } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignInfo.java b/Essentials/src/com/earth2me/essentials/signs/SignInfo.java new file mode 100644 index 000000000..e75b060e3 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/signs/SignInfo.java @@ -0,0 +1,54 @@ +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.textreader.IText; +import com.earth2me.essentials.textreader.KeywordReplacer; +import com.earth2me.essentials.textreader.TextInput; +import com.earth2me.essentials.textreader.TextPager; +import java.io.IOException; + + +public class SignInfo extends EssentialsSign +{ + public SignInfo() + { + super("Info"); + } + + @Override + protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException + { + 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, 3, ess); + charge.isAffordableFor(player); + + String chapter = sign.getLine(1); + String page = sign.getLine(2); + + final IText input; + try + { + input = new TextInput(player, "info", true, ess); + final IText output = new KeywordReplacer(input, player, ess); + final TextPager pager = new TextPager(output); + pager.showPage(chapter, page, null, player); + + } + catch (IOException ex) + { + throw new SignException(ex.getMessage(), ex); + } + + charge.charge(player); + return true; + } +} diff --git a/Essentials/src/com/earth2me/essentials/signs/SignKit.java b/Essentials/src/com/earth2me/essentials/signs/SignKit.java index c1a4cd0fd..aee1d7dea 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignKit.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignKit.java @@ -1,6 +1,7 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.*; +import com.earth2me.essentials.commands.NoChargeException; import java.util.List; import java.util.Locale; import java.util.Map; @@ -18,7 +19,7 @@ public class SignKit extends EssentialsSign { validateTrade(sign, 3, ess); - final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH); + final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH).trim(); if (kitName.isEmpty()) { @@ -47,7 +48,7 @@ public class SignKit extends EssentialsSign @Override protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException { - final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH); + final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH).trim(); final String group = sign.getLine(2); if ((!group.isEmpty() && ("ยง2Everyone".equals(group) || player.inGroup(group))) || (group.isEmpty() && (player.isAuthorized("essentials.kit." + kitName)))) @@ -62,6 +63,10 @@ public class SignKit extends EssentialsSign Kit.expandItems(ess, player, items); charge.charge(player); } + catch (NoChargeException ex) + { + return false; + } catch (Exception ex) { throw new SignException(ex.getMessage(), ex); diff --git a/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java b/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java index f891c0fdb..7fd563c17 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java @@ -23,23 +23,24 @@ public class SignPlayerListener implements Listener @EventHandler(priority = EventPriority.LOW) public void onPlayerInteract(final PlayerInteractEvent event) { - if (event.isCancelled() || ess.getSettings().areSignsDisabled()) + if (ess.getSettings().areSignsDisabled() || (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.RIGHT_CLICK_AIR)) { return; } - - final Block block = event.getClickedBlock(); + final Block block; + if (event.isCancelled() && event.getAction() == Action.RIGHT_CLICK_AIR) { + block = event.getPlayer().getTargetBlock(null, 5); + } else { + block = event.getClickedBlock(); + } if (block == null) { return; } + final int mat = block.getTypeId(); if (mat == Material.SIGN_POST.getId() || mat == Material.WALL_SIGN.getId()) { - if (event.getAction() != Action.RIGHT_CLICK_BLOCK) - { - return; - } final Sign csign = (Sign)block.getState(); for (EssentialsSign sign : ess.getSettings().enabledSigns()) { @@ -60,7 +61,6 @@ public class SignPlayerListener implements Listener { event.setCancelled(true); return; - } } } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignRepair.java b/Essentials/src/com/earth2me/essentials/signs/SignRepair.java new file mode 100644 index 000000000..dd1b3ae0d --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/signs/SignRepair.java @@ -0,0 +1,57 @@ +package com.earth2me.essentials.signs; + +import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.ChargeException; +import com.earth2me.essentials.IEssentials; +import com.earth2me.essentials.Trade; +import com.earth2me.essentials.User; +import com.earth2me.essentials.commands.Commandrepair; + + +public class SignRepair extends EssentialsSign +{ + public SignRepair() + { + super("Repair"); + } + + @Override + protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException + { + final String repairTarget = sign.getLine(1); + if (repairTarget.isEmpty()) + { + sign.setLine(1, "Hand"); + } + else if (!repairTarget.equalsIgnoreCase("all") && !repairTarget.equalsIgnoreCase("hand") ) + { + throw new SignException(_("invalidSignLine", 2)); + } + validateTrade(sign, 2, 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, 2, ess); + charge.isAffordableFor(player); + + Commandrepair command = new Commandrepair(); + command.setEssentials(ess); + String[] args = new String[] + { + sign.getLine(1) + }; + try + { + command.run(ess.getServer(), player, "repair", args); + } + catch (Exception ex) + { + throw new SignException(ex.getMessage(), ex); + } + charge.charge(player); + return true; + } +} diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java index 6ea4f5e80..41f9fb2a5 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java @@ -224,7 +224,7 @@ public class SignTrade extends EssentialsSign } catch (SignException e) { - throw new SignException(_("tradeSignEmpty")); + throw new SignException(_("tradeSignEmpty"), e); } } diff --git a/Essentials/src/com/earth2me/essentials/signs/Signs.java b/Essentials/src/com/earth2me/essentials/signs/Signs.java index 2cf05ee77..41de479d3 100644 --- a/Essentials/src/com/earth2me/essentials/signs/Signs.java +++ b/Essentials/src/com/earth2me/essentials/signs/Signs.java @@ -10,9 +10,11 @@ public enum Signs FREE(new SignFree()), GAMEMODE(new SignGameMode()), HEAL(new SignHeal()), + INFO(new SignInfo()), KIT(new SignKit()), MAIL(new SignMail()), PROTECTION(new SignProtection()), + REPAIR(new SignRepair()), SELL(new SignSell()), SPAWNMOB(new SignSpawnmob()), TIME(new SignTime()), diff --git a/Essentials/src/com/earth2me/essentials/storage/IStorageObjectHolder.java b/Essentials/src/com/earth2me/essentials/storage/IStorageObjectHolder.java index f48e54002..4e860bd8c 100644 --- a/Essentials/src/com/earth2me/essentials/storage/IStorageObjectHolder.java +++ b/Essentials/src/com/earth2me/essentials/storage/IStorageObjectHolder.java @@ -1,7 +1,5 @@ package com.earth2me.essentials.storage; -import com.earth2me.essentials.user.UserData; - public interface IStorageObjectHolder<T extends StorageObject> { diff --git a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java index d79483699..4c875098b 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java +++ b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java @@ -40,14 +40,14 @@ public class KeywordReplacer implements IText user.setDisplayNick(); displayName = user.getDisplayName(); userName = user.getName(); - ipAddress = user.getAddress().getAddress().toString(); - address = user.getAddress().toString(); + ipAddress = user.getAddress() == null || user.getAddress().getAddress() == null ? "" : user.getAddress().getAddress().toString(); + address = user.getAddress() == null ? "" : user.getAddress().toString(); balance = Double.toString(user.getMoney()); mails = Integer.toString(user.getMails().size()); - world = user.getLocation().getWorld().getName(); - worldTime12 = DescParseTickFormat.format12(user.getWorld().getTime()); - worldTime24 = DescParseTickFormat.format24(user.getWorld().getTime()); - worldDate = DateFormat.getDateInstance(DateFormat.MEDIUM, ess.getI18n().getCurrentLocale()).format(DescParseTickFormat.ticksToDate(user.getWorld().getFullTime())); + world = user.getLocation() == null || user.getLocation().getWorld() == null ? "" : user.getLocation().getWorld().getName(); + worldTime12 = DescParseTickFormat.format12(user.getWorld() == null ? 0 : user.getWorld().getTime()); + worldTime24 = DescParseTickFormat.format24(user.getWorld() == null ? 0 : user.getWorld().getTime()); + worldDate = DateFormat.getDateInstance(DateFormat.MEDIUM, ess.getI18n().getCurrentLocale()).format(DescParseTickFormat.ticksToDate(user.getWorld() == null ? 0 : user.getWorld().getFullTime())); } else { diff --git a/Essentials/src/com/earth2me/essentials/textreader/TextPager.java b/Essentials/src/com/earth2me/essentials/textreader/TextPager.java index cb70839dd..7b73f49ab 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/TextPager.java +++ b/Essentials/src/com/earth2me/essentials/textreader/TextPager.java @@ -48,7 +48,7 @@ public class TextPager final int start = onePage ? 0 : (page - 1) * 9; final int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0); - if (!onePage) + if (!onePage && commandName != null) { StringBuilder content = new StringBuilder(); final String[] title = commandName.split(" ", 2); @@ -72,7 +72,7 @@ public class TextPager { sender.sendMessage(lines.get(i)); } - if (!onePage && page < pages) + if (!onePage && page < pages && commandName != null) { sender.sendMessage(_("readNextPage", commandName, page + 1)); } @@ -130,7 +130,7 @@ public class TextPager } int pages = end / 9 + (end % 9 > 0 ? 1 : 0); - if (!onePage) + if (!onePage && commandName != null) { sender.sendMessage(_("infoPages", page, pages, I18n.capitalCase(commandName))); @@ -139,7 +139,7 @@ public class TextPager { sender.sendMessage(lines.get(i)); } - if (!onePage && page < pages) + if (!onePage && page < pages && commandName != null) { sender.sendMessage(_("readNextPage", commandName, page + 1)); } @@ -183,7 +183,7 @@ public class TextPager final int page = chapterpage + 1; final int pages = (chapterend - chapterstart) / 9 + ((chapterend - chapterstart) % 9 > 0 ? 1 : 0); - if (!onePage) + if (!onePage && commandName != null) { sender.sendMessage(_("infoChapterPages", pageStr, page, pages)); } @@ -191,7 +191,7 @@ public class TextPager { sender.sendMessage(lines.get(i)); } - if (!onePage && page < pages) + if (!onePage && page < pages && commandName != null) { sender.sendMessage(_("readNextPage", commandName, pageStr + " " + (page + 1))); } diff --git a/Essentials/src/com/earth2me/essentials/user/Ban.java b/Essentials/src/com/earth2me/essentials/user/Ban.java deleted file mode 100644 index ba1c22333..000000000 --- a/Essentials/src/com/earth2me/essentials/user/Ban.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.earth2me.essentials.user; - -import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Ban implements StorageObject -{ - private String reason; - private long timeout; -} diff --git a/Essentials/src/com/earth2me/essentials/user/IOfflinePlayer.java b/Essentials/src/com/earth2me/essentials/user/IOfflinePlayer.java deleted file mode 100644 index 4cdee715b..000000000 --- a/Essentials/src/com/earth2me/essentials/user/IOfflinePlayer.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.earth2me.essentials.user; - -import org.bukkit.Location; - - -public interface IOfflinePlayer -{ - String getName(); - - String getDisplayName(); - - Location getBedSpawnLocation(); - - void setBanned(boolean bln); -}
\ No newline at end of file diff --git a/Essentials/src/com/earth2me/essentials/user/IOfflineUser.java b/Essentials/src/com/earth2me/essentials/user/IOfflineUser.java deleted file mode 100644 index d6266df49..000000000 --- a/Essentials/src/com/earth2me/essentials/user/IOfflineUser.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.earth2me.essentials.user; - -import com.earth2me.essentials.storage.IStorageObjectHolder; - - -public interface IOfflineUser extends IStorageObjectHolder<UserData>, IOfflinePlayer -{ - -} diff --git a/Essentials/src/com/earth2me/essentials/user/Inventory.java b/Essentials/src/com/earth2me/essentials/user/Inventory.java deleted file mode 100644 index 0812f54a0..000000000 --- a/Essentials/src/com/earth2me/essentials/user/Inventory.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.earth2me.essentials.user; - -import com.earth2me.essentials.storage.MapKeyType; -import com.earth2me.essentials.storage.MapValueType; -import com.earth2me.essentials.storage.StorageObject; -import java.util.HashMap; -import java.util.Map; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.bukkit.Material; -import org.bukkit.inventory.ItemStack; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class Inventory implements StorageObject -{ - private int size; - @MapKeyType(Integer.class) - @MapValueType(ItemStack.class) - private Map<Integer, ItemStack> items = new HashMap<Integer, ItemStack>(); - - public Inventory() - { - items.put(1, new ItemStack(Material.APPLE, 64)); - } -} diff --git a/Essentials/src/com/earth2me/essentials/user/User.java b/Essentials/src/com/earth2me/essentials/user/User.java deleted file mode 100644 index 589e26737..000000000 --- a/Essentials/src/com/earth2me/essentials/user/User.java +++ /dev/null @@ -1,220 +0,0 @@ -package com.earth2me.essentials.user; - -import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.IUser; -import com.earth2me.essentials.Teleport; -import com.earth2me.essentials.commands.IEssentialsCommand; -import lombok.Cleanup; -import org.bukkit.Location; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; - - -public class User extends UserBase implements IUser -{ - public User(final Player base, final IEssentials ess) - { - super(base, ess); - } - - public User(final OfflinePlayer offlinePlayer, final IEssentials ess) - { - super(offlinePlayer, ess); - } - - public void example() - { - // Cleanup will call close at the end of the function - @Cleanup - final User user = this; - - // read lock allows to read data from the user - user.acquireReadLock(); - final double money = user.getData().getMoney(); - - // write lock allows only one thread to modify the data - user.acquireWriteLock(); - user.getData().setMoney(10 + money); - } - - @Override - public void finishRead() - { - } - - @Override - public void finishWrite() - { - } - - @Override - public long getLastTeleportTimestamp() - { - acquireReadLock(); - try - { - return getData().getTimestamps().get("lastteleport"); - } - finally - { - unlock(); - } - } - - @Override - public boolean isAuthorized(String node) - { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean isAuthorized(IEssentialsCommand cmd) - { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean isAuthorized(IEssentialsCommand cmd, String permissionPrefix) - { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public void setLastTeleportTimestamp(long time) - { - acquireWriteLock(); - try - { - getData().getTimestamps().put("lastteleport", time); - } - finally - { - unlock(); - } - } - - @Override - public Location getLastLocation() - { - acquireReadLock(); - try - { - return getData().getLastLocation(); - } - finally - { - unlock(); - } - } - - @Override - public double getMoney() - { - acquireReadLock(); - try - { - return getData().getMoney(); - } - finally - { - unlock(); - } - } - - @Override - public void takeMoney(double value) - { - acquireWriteLock(); - try - { - getData().setMoney(getData().getMoney() - value); - } - finally - { - unlock(); - } - } - - @Override - public void giveMoney(double value) - { - acquireWriteLock(); - try - { - getData().setMoney(getData().getMoney() + value); - } - finally - { - unlock(); - } - } - - @Override - public String getGroup() - { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public void setLastLocation() - { - acquireWriteLock(); - try - { - getData().setLastLocation(base.getLocation()); - } - finally - { - unlock(); - } - } - - @Override - public Location getHome(String name) throws Exception - { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public Location getHome(Location loc) throws Exception - { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean isHidden() - { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public Teleport getTeleport() - { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public void setJail(final String jail) - { - acquireWriteLock(); - try - { - getData().setJail(jail); - } - finally - { - unlock(); - } - } - - @Override - public boolean canAfford(final double cost) - { - final double mon = getMoney(); - if (isAuthorized("essentials.eco.loan")) - { - return (mon - cost) >= ess.getSettings().getMinMoney(); - } - return cost <= mon; - } -} diff --git a/Essentials/src/com/earth2me/essentials/user/UserBase.java b/Essentials/src/com/earth2me/essentials/user/UserBase.java deleted file mode 100644 index 9dda2f950..000000000 --- a/Essentials/src/com/earth2me/essentials/user/UserBase.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.earth2me.essentials.user; - -import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.craftbukkit.OfflineBedLocation; -import com.earth2me.essentials.storage.AsyncStorageObjectHolder; -import java.io.File; -import lombok.Delegate; -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.command.CommandSender; -import org.bukkit.configuration.serialization.ConfigurationSerializable; -import org.bukkit.entity.Entity; -import org.bukkit.entity.HumanEntity; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; -import org.bukkit.permissions.Permissible; -import org.bukkit.permissions.ServerOperator; -import org.bukkit.OfflinePlayer; - - -public abstract class UserBase extends AsyncStorageObjectHolder<UserData> implements Player, IOfflineUser -{ - - @Delegate(types = - { - Player.class, Entity.class, CommandSender.class, ServerOperator.class, - HumanEntity.class, ConfigurationSerializable.class, LivingEntity.class, - Permissible.class - },excludes=IOfflinePlayer.class) - protected Player base; - protected transient OfflinePlayer offlinePlayer; - - public UserBase(final Player base, final IEssentials ess) - { - super(ess, UserData.class); - this.base = base; - reloadConfig(); - } - - public UserBase(final OfflinePlayer offlinePlayer, final IEssentials ess) - { - super(ess, UserData.class); - this.offlinePlayer = offlinePlayer; - reloadConfig(); - } - - public final Player getBase() - { - return base; - } - - public final Player setBase(final Player base) - { - return this.base = base; - } - - public void update(final Player base) - { - setBase(base); - } - - public void update(final OfflinePlayer offlinePlayer) - { - this.offlinePlayer = offlinePlayer; - } - - public void dispose() - { - this.offlinePlayer = Bukkit.getOfflinePlayer(base.getName()); - this.base = null; - } - - public boolean isOnlineUser() { - return base != null; - } - - @Override - public String getName() - { - if (isOnlineUser()) { - return base.getName(); - } else { - return offlinePlayer.getName(); - } - } - - @Override - public String getDisplayName() - { - if (isOnlineUser()) { - return base.getDisplayName(); - } else { - return offlinePlayer.getName(); - } - } - - @Override - public Location getBedSpawnLocation() - { - if (isOnlineUser()) { - return base.getBedSpawnLocation(); - } else { - return OfflineBedLocation.getBedLocation(base.getName(), ess); - } - } - - @Override - public void setBanned(boolean bln) - { - if (isOnlineUser()) { - base.setBanned(bln); - } else { - offlinePlayer.setBanned(bln); - } - } - - @Override - public File getStorageFile() - { - return ess.getUserMap().getUserFile(getName()); - } -} diff --git a/Essentials/src/com/earth2me/essentials/user/UserData.java b/Essentials/src/com/earth2me/essentials/user/UserData.java deleted file mode 100644 index 4586d0627..000000000 --- a/Essentials/src/com/earth2me/essentials/user/UserData.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.earth2me.essentials.user; - -import com.earth2me.essentials.storage.ListType; -import com.earth2me.essentials.storage.MapKeyType; -import com.earth2me.essentials.storage.MapValueType; -import com.earth2me.essentials.storage.StorageObject; -import java.util.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.bukkit.Location; -import org.bukkit.Material; - - -@Data -@EqualsAndHashCode(callSuper = false) -public class UserData implements StorageObject -{ - private String nickname; - private double money; - @MapValueType(Location.class) - private Map<String, Location> homes = new HashMap<String, Location>(); - @ListType(Material.class) - private Set<Material> unlimited = new HashSet<Material>(); - @MapValueType(List.class) - @MapKeyType(Material.class) - private Map<Material, List<String>> powerTools = new HashMap<Material, List<String>>(); - private Location lastLocation; - @MapValueType(Long.class) - private Map<String, Long> timestamps; - private String jail; - @ListType - private List<String> mails; - private Inventory inventory; - private boolean teleportEnabled; - @ListType - private Set<String> ignore; - private boolean godmode; - private boolean muted; - private boolean jailed; - private Ban ban; - private String ipAddress; - private boolean afk; - private boolean newplayer = true; - private String geolocation; - private boolean socialspy; - private boolean npc; - private boolean powertoolsenabled; - - public UserData() - { - unlimited.add(Material.AIR); - unlimited.add(Material.ARROW); - unlimited.add(Material.APPLE); - powerTools.put(Material.DEAD_BUSH, Collections.singletonList("test")); - } -} diff --git a/Essentials/src/com/earth2me/essentials/user/UserMap.java b/Essentials/src/com/earth2me/essentials/user/UserMap.java deleted file mode 100644 index 821ee4c8f..000000000 --- a/Essentials/src/com/earth2me/essentials/user/UserMap.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.earth2me.essentials.user; - -import com.earth2me.essentials.IConf; -import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.Util; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import com.google.common.cache.CacheLoader; -import com.google.common.util.concurrent.UncheckedExecutionException; -import java.io.File; -import java.util.Collections; -import java.util.Locale; -import java.util.Set; -import java.util.concurrent.ConcurrentSkipListSet; -import java.util.concurrent.ExecutionException; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; - - -public class UserMap extends CacheLoader<String, User> implements IConf -{ - private final transient IEssentials ess; - private final transient Cache<String, User> users = CacheBuilder.newBuilder().softValues().build(this); - private final transient ConcurrentSkipListSet<String> keys = new ConcurrentSkipListSet<String>(); - - public UserMap(final IEssentials ess) - { - super(); - this.ess = ess; - loadAllUsersAsync(ess); - } - - private void loadAllUsersAsync(final IEssentials ess) - { - ess.scheduleAsyncDelayedTask(new Runnable() - { - @Override - public void run() - { - final File userdir = new File(ess.getDataFolder(), "userdata"); - if (!userdir.exists()) - { - return; - } - keys.clear(); - users.invalidateAll(); - for (String string : userdir.list()) - { - if (!string.endsWith(".yml")) - { - continue; - } - final String name = string.substring(0, string.length() - 4); - keys.add(name.toLowerCase(Locale.ENGLISH)); - } - } - }); - } - - public boolean userExists(final String name) - { - return keys.contains(name.toLowerCase(Locale.ENGLISH)); - } - - public User getUser(final String name) - { - try - { - return users.get(name.toLowerCase(Locale.ENGLISH)); - } - catch (ExecutionException ex) - { - return null; - } - catch (UncheckedExecutionException ex) - { - return null; - } - } - - @Override - public User load(final String name) throws Exception - { - for (Player player : ess.getServer().getOnlinePlayers()) - { - if (player.getName().equalsIgnoreCase(name)) - { - keys.add(name.toLowerCase(Locale.ENGLISH)); - return new User(player, ess); - } - } - final File userFile = getUserFile(name); - if (userFile.exists()) - { - keys.add(name.toLowerCase(Locale.ENGLISH)); - return new User(Bukkit.getOfflinePlayer(name), ess); - } - throw new Exception("User not found!"); - } - - @Override - public void reloadConfig() - { - loadAllUsersAsync(ess); - } - - public void removeUser(final String name) - { - keys.remove(name.toLowerCase(Locale.ENGLISH)); - users.invalidate(name.toLowerCase(Locale.ENGLISH)); - } - - public Set<String> getAllUniqueUsers() - { - return Collections.unmodifiableSet(keys); - } - - public int getUniqueUsers() - { - return keys.size(); - } - - public File getUserFile(final String name) - { - final File userFolder = new File(ess.getDataFolder(), "userdata"); - return new File(userFolder, Util.sanitizeFileName(name) + ".yml"); - } -} diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index ec1f3fc8d..cddbc1c48 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -7,7 +7,7 @@ # If you want to use special characters in this document, such as accented letters, you MUST save the file as UTF-8, not ANSI. # If you receive an error when Essentials loads, ensure that: # - No tabs are present: YAML only allows spaces -# - Indents are correct: YAML heirarchy is based entirely on indentation +# - Indents are correct: YAML hierarchy is based entirely on indentation # - You have "escaped" all apostrophes in your text: If you want to write "don't", for example, write "don''t" instead (note the doubled apostrphe) # - List items are prefixed with a hyphen and indented: # lists: @@ -41,7 +41,7 @@ change-displayname: true # The prefix/suffix can be set using Permissions, Group Manager or PermissionsEx. # The value of change-displayname (above) has to be true. # If you don't set this, it will default to true if essentials chat is installed. -# Don't forget to remove the # infront of the line +# Don't forget to remove the # in front of the line #add-prefix-suffix: false # The delay, in seconds, required between /home, /tp, etc. @@ -52,7 +52,7 @@ teleport-delay: 0 # The delay, in seconds, a player can't be attacked by other players after he has been teleported by a command # This will also prevent that the player can attack other players -teleport-invulnerability: 0 +teleport-invulnerability: 2 # The delay, in seconds, required between /heal attempts heal-cooldown: 60 @@ -107,6 +107,8 @@ player-commands: - balance - balance.others - balancetop + - chat.color + - chat.format - chat.shout - chat.question - clearinventory @@ -152,10 +154,15 @@ player-commands: - signs.use.balance - signs.use.buy - signs.use.disposal + - signs.use.enchant - signs.use.free + - signs.use.gamemode - signs.use.heal + - signs.use.info + - signs.use.kit - signs.use.mail - signs.use.protection + - signs.use.repair - signs.use.sell - signs.use.time - signs.use.trade @@ -177,7 +184,7 @@ player-commands: # Note: All items MUST be followed by a quantity! # All kit names should be lower case, and will be treated as lower in permissions/costs. # Syntax: - itemID[:DataValue] Amount [Enchantment:Level].. -# Times are measured in seconds. +# 'delay' refers to the cooldown between how often you can use each kit, measured in seconds. kits: dtools: delay: 10 @@ -189,7 +196,7 @@ kits: delay: 10 items: - 272 1 - - 273 1 + - 273 1 - 274 1 - 275 1 @@ -202,7 +209,7 @@ kits: enabledSigns: #- color #- balance - #- buy + #- buy #- sell #- trade #- free @@ -213,12 +220,20 @@ enabledSigns: #- enchant #- gamemode #- heal + #- info #- spawnmob + #- repair #- time #- weather #- protection + + +# How many times per second can Essentials signs be interacted with. +# Values should be between 1-20, 20 being virtually no lag protection.s +# Lower numbers will reduce the possibility of lag, but may annoy players. +sign-use-per-second: 4 -# Backup runs a command while saving is disabled +# Backup runs a batch/bash command while saving is disabled backup: # Interval in minutes interval: 30 @@ -265,7 +280,12 @@ freeze-afk-players: false # When the player is afk, should he be able to pickup items? # Enable this, when you don't want people idling in mob traps. -disable-item-pickup-while-afk: true +disable-item-pickup-while-afk: false + +# Should we automatically remove afk status when the player moves? +# Player will be removed from afk on chat/command reguardless of this setting. +# Disable this to reduce server lag. +cancel-afk-on-move: true # You can disable the death messages of minecraft here death-messages: true @@ -274,7 +294,8 @@ death-messages: true no-god-in-worlds: # - world_nether -# Set to true to enable per-world permissions for teleporting with /world, /tp ,/tpa and /tpo. +# Set to true to enable per-world permissions for teleporting between worlds with essentials commands +# This applies to /world, /back, /tp[a|o][here|all], but not warps. # Give someone permission to teleport to a world with essentials.world.<worldname> world-teleport-permissions: false @@ -285,7 +306,7 @@ default-stack-size: -1 # Oversized stacks are stacks that ignore the normal max stacksize. # They can be obtained using /give and /item, if the player has essentials.oversizedstacks permission. -# How many items should be in a oversized stack? +# How many items should be in an oversized stack? oversized-stacksize: 64 # Do you allow to repair enchanted weapons and armor? @@ -297,6 +318,12 @@ repair-enchanted: true #If you set this to true any plugin that uses teleport will have the previous location registered. register-back-in-listener: false +#Delay to wait before people can cause attack damage after logging in +login-attack-delay: 5 + +#Set the max fly speed, values range from 0.1 to 1.0 +max-fly-speed: 1.0 + ############################################################ # +------------------------------------------------------+ # # | EssentialsHome | # @@ -309,6 +336,11 @@ spawn-if-no-home: true # Allows people to set their bed at daytime update-bed-at-daytime: true +# Set to true to enable per-world permissions for using homes to teleport between worlds +# This applies to the /home only. +# Give someone permission to teleport to a world with essentials.world.<worldname> +world-home-permissions: false + # Allow players to have multiple homes. # Players need essentials.sethome.multiple before they can have more than 1 home, default to 'default' below. # Define different amounts of multiple homes for different permissions, e.g. essentials.sethome.multiple.vip @@ -350,7 +382,7 @@ currency-symbol: '$' # The amount is always limited to 10 trillions because of the limitations of a java double max-money: 10000000000000 -# Set the minimum amount of money a player can have (must be above the negitive of max-money). +# Set the minimum amount of money a player can have (must be above the negative of max-money). # Setting this to 0, will disable overdrafts/loans completely. Users need 'essentials.eco.loan' perm to go below 0. min-money: -10000 @@ -366,7 +398,7 @@ economy-log-enabled: false # Show other plugins commands in help non-ess-in-help: true -# Hide plugins which dont give a permission +# Hide plugins which do not give a permission # You can override a true value here for a single plugin by adding a permission to a user/group. # The individual permission is: essentials.help.<plugin>, anyone with essentials.* or '*' will see all help this setting reguardless. # You can use negitive permissions to remove access to just a single plugins help if the following is enabled. @@ -399,7 +431,7 @@ chat: # Default: '{WORLDNAME} {DISPLAYNAME}&7:&f {MESSAGE}' # Admins: '{WORLDNAME} &c[{GROUP}]&f {DISPLAYNAME}&7:&c {MESSAGE}' - # If your using group formats make sure to remove the '#' to allow the setting to be read. + # If you are using group formats make sure to remove the '#' to allow the setting to be read. ############################################################ # +------------------------------------------------------+ # @@ -421,28 +453,6 @@ protect: password: 'root' mysqlDb: 'jdbc:mysql://localhost:3306/minecraft' - # For which block types would you like to be alerted? - # You can find a list of IDs in plugins/Essentials/items.csv after loading Essentials for the first time. - # 10 = lava :: 11 = still lava :: 46 = TNT :: 327 = lava bucket - alert: - on-placement: 10,11,46,327 - on-use: 327 - on-break: - - blacklist: - - # Which blocks should people be prevented from placing - placement: 10,11,46,327 - - # Which items should people be prevented from using - usage: 327 - - # Which blocks should people be prevented from breaking - break: - - # Which blocks should not be pushed by pistons - piston: - # General physics/behavior modifications prevent: lava-flow: false @@ -485,7 +495,7 @@ protect: ender_dragon: false pig: false sheep: false - cow: false + cow: false chicken: false squid: false wolf: false @@ -503,10 +513,10 @@ protect: # Protect various blocks. protect: # Protect all signs - signs: true + signs: false # Prevent users from destroying rails - rails: true + rails: false # Blocks below rails/signs are also protected if the respective rail/sign is protected. # This makes it more difficult to circumvent protection, and should be enabled. @@ -548,6 +558,20 @@ protect: # Should the damage after hit by a lightning be disabled? lightning: false + # Disable weather options + weather: + storm: false + thunder: false + lightning: false + +############################################################ +# +------------------------------------------------------+ # +# | EssentialsAntiBuild | # +# +------------------------------------------------------+ # +############################################################ + + # Disable various default physics and behaviors + # Should people with build: false in permissions be allowed to build # Set true to disable building for those people build: true @@ -558,12 +582,28 @@ protect: # Should we tell people they are not allowed to build warn-on-build-disallow: true + + # For which block types would you like to be alerted? + # You can find a list of IDs in plugins/Essentials/items.csv after loading Essentials for the first time. + # 10 = lava :: 11 = still lava :: 46 = TNT :: 327 = lava bucket + alert: + on-placement: 10,11,46,327 + on-use: 327 + on-break: - # Disable weather options - weather: - storm: false - thunder: false - lightning: false + blacklist: + + # Which blocks should people be prevented from placing + placement: 10,11,46,327 + + # Which items should people be prevented from using + usage: 327 + + # Which blocks should people be prevented from breaking + break: + + # Which blocks should not be pushed by pistons + piston: ############################################################ # +------------------------------------------------------+ # @@ -583,7 +623,7 @@ newbies: spawnpoint: newbies # Do we want to give users anything on first join? Set to '' to disable - # This kit will be given reguardless of cost, and permissions. + # This kit will be given regardless of cost, and permissions. #kit: '' kit: tools diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv index 2e1a331de..d38b471af 100644 --- a/Essentials/src/items.csv +++ b/Essentials/src/items.csv @@ -1,12 +1,17 @@ -#version: TeamCity -# If you change this file, it will not be automatically updated after the next release. +#version: teamcity +#If you change this file, it will not be automatically updated after the next release, #item,id,metadata stone,1,0 sstone,1,0 smoothstone,1,0 rock,1,0 grass,2,0 +greendirt,2,0 +greenearth,2,0 +greenland,2,0 dirt,3,0 +earth,3,0 +land,3,0 cobblestone,4,0 cstone,4,0 cobble,4,0 @@ -17,6 +22,20 @@ wplank,5,0 plankwooden,5,0 plankwood,5,0 plankw,5,0 +oakplank,5,0 +oakwoodenplank,5,0 +oakwoodplank,5,0 +oakwplank,5,0 +oakplankwooden,5,0 +oakplankwood,5,0 +oakplankw,5,0 +oplank,5,0 +owoodenplank,5,0 +owoodplank,5,0 +owplank,5,0 +oplankwooden,5,0 +oplankwood,5,0 +oplankw,5,0 darkplank,5,1 darkwoodenplank,5,1 darkwoodplank,5,1 @@ -31,6 +50,20 @@ dwplank,5,1 dplankwooden,5,1 dplankwood,5,1 dplankw,5,1 +spruceplank,5,1 +sprucewoodenplank,5,1 +sprucewoodplank,5,1 +sprucewplank,5,1 +spruceplankwooden,5,1 +spruceplankwood,5,1 +spruceplankw,5,1 +splank,5,1 +swoodenplank,5,1 +swoodplank,5,1 +swplank,5,1 +splankwooden,5,1 +splankwood,5,1 +splankw,5,1 pineplank,5,1 pinewoodenplank,5,1 pinewoodplank,5,1 @@ -52,13 +85,13 @@ lightwplank,5,2 lightplankwooden,5,2 lightplankwood,5,2 lightplankw,5,2 -liteplank,5,2 -litewoodenplank,5,2 -litewoodplank,5,2 -litewplank,5,2 -liteplankwooden,5,2 -liteplankwood,5,2 -liteplankw,5,2 +lplank,5,2 +lwoodenplank,5,2 +lwoodplank,5,2 +lwplank,5,2 +lplankwooden,5,2 +lplankwood,5,2 +lplankw,5,2 birchplank,5,2 birchwoodenplank,5,2 birchwoodplank,5,2 @@ -73,6 +106,19 @@ bwplank,5,2 bplankwooden,5,2 bplankwood,5,2 bplankw,5,2 +whiteplank,5,2 +whitewoodenplank,5,2 +whitewoodplank,5,2 +whitewplank,5,2 +whiteplankwooden,5,2 +whiteplankwood,5,2 +whiteplankw,5,2 +wwoodenplank,5,2 +wwoodplank,5,2 +wwplank,5,2 +wplankwooden,5,2 +wplankwood,5,2 +wplankw,5,2 jungleplank,5,3 junglewoodenplank,5,3 junglewoodplank,5,3 @@ -87,6 +133,20 @@ jwplank,5,3 jplankwooden,5,3 jplankwood,5,3 jplankw,5,3 +forestplank,5,3 +forestwoodenplank,5,3 +forestwoodplank,5,3 +forestwplank,5,3 +forestplankwooden,5,3 +forestplankwood,5,3 +forestplankw,5,3 +fplank,5,3 +fwoodenplank,5,3 +fwoodplank,5,3 +fwplank,5,3 +fplankwooden,5,3 +fplankwood,5,3 +fplankw,5,3 sapling,6,0 treesapling,6,0 logsapling,6,0 @@ -96,216 +156,91 @@ oaktreesapling,6,0 oaklogsapling,6,0 oaktrunksapling,6,0 oakwoodsapling,6,0 -normaltreesapling,6,0 -normallogsapling,6,0 -normaltrunksapling,6,0 -normalwoodsapling,6,0 osapling,6,0 otreesapling,6,0 ologsapling,6,0 otrunksapling,6,0 owoodsapling,6,0 -nsapling,6,0 -ntreesapling,6,0 -nlogsapling,6,0 -ntrunksapling,6,0 -nwoodsapling,6,0 -treesap,6,0 -logsap,6,0 -trunksap,6,0 -woodsap,6,0 -oaktreesap,6,0 -oaklogsap,6,0 -oaktrunksap,6,0 -oakwoodsap,6,0 -normaltreesap,6,0 -normallogsap,6,0 -normaltrunksap,6,0 -normalwoodsap,6,0 -osap,6,0 -otreesap,6,0 -ologsap,6,0 -otrunksap,6,0 -owoodsap,6,0 -nsap,6,0 -ntreesap,6,0 -nlogsap,6,0 -ntrunksap,6,0 -nwoodsap,6,0 -redsapling,6,1 -redtreesapling,6,1 -redlogsapling,6,1 -redtrunksapling,6,1 -redwoodsapling,6,1 darksapling,6,1 darktreesapling,6,1 darklogsapling,6,1 darktrunksapling,6,1 darkwoodsapling,6,1 -blacksapling,6,1 -blacktreesapling,6,1 -blacklogsapling,6,1 -blacktrunksapling,6,1 -blackwoodsapling,6,1 -pinesapling,6,1 -pinetreesapling,6,1 -pinelogsapling,6,1 -pinetrunksapling,6,1 -pinewoodsapling,6,1 sprucesapling,6,1 sprucetreesapling,6,1 sprucelogsapling,6,1 sprucetrunksapling,6,1 sprucewoodsapling,6,1 -rsapling,6,1 -rtreesapling,6,1 -rlogsapling,6,1 -rtrunksapling,6,1 -rwoodsapling,6,1 +pinesapling,6,1 +pinetreesapling,6,1 +pinelogsapling,6,1 +pinetrunksapling,6,1 +pinewoodsapling,6,1 dsapling,6,1 dtreesapling,6,1 dlogsapling,6,1 dtrunksapling,6,1 dwoodsapling,6,1 -blsapling,6,1 -bltreesapling,6,1 -bllogsapling,6,1 -bltrunksapling,6,1 -blwoodsapling,6,1 -psapling,6,1 -ptreesapling,6,1 -plogsapling,6,1 -ptrunksapling,6,1 -pwoodsapling,6,1 ssapling,6,1 streesapling,6,1 slogsapling,6,1 strunksapling,6,1 swoodsapling,6,1 -redsap,6,1 -redtreesap,6,1 -redlogsap,6,1 -redtrunksap,6,1 -redwoodsap,6,1 -darksap,6,1 -darktreesap,6,1 -darklogsap,6,1 -darktrunksap,6,1 -darkwoodsap,6,1 -blacksap,6,1 -blacktreesap,6,1 -blacklogsap,6,1 -blacktrunksap,6,1 -blackwoodsap,6,1 -pinesap,6,1 -pinetreesap,6,1 -pinelogsap,6,1 -pinetrunksap,6,1 -pinewoodsap,6,1 -sprucesap,6,1 -sprucetreesap,6,1 -sprucelogsap,6,1 -sprucetrunksap,6,1 -sprucewoodsap,6,1 -rsap,6,1 -rtreesap,6,1 -rlogsap,6,1 -rtrunksap,6,1 -rwoodsap,6,1 -dsap,6,1 -dtreesap,6,1 -dlogsap,6,1 -dtrunksap,6,1 -dwoodsap,6,1 -blsap,6,1 -bltreesap,6,1 -bllogsap,6,1 -bltrunksap,6,1 -blwoodsap,6,1 -psap,6,1 -ptreesap,6,1 -plogsap,6,1 -ptrunksap,6,1 -pwoodsap,6,1 -ssap,6,1 -streesap,6,1 -slogsap,6,1 -strunksap,6,1 -swoodsap,6,1 +psapling,6,1 +ptreesapling,6,1 +plogsapling,6,1 +ptrunksapling,6,1 +pwoodsapling,6,1 birchsapling,6,2 birchtreesapling,6,2 birchlogsapling,6,2 birchtrunksapling,6,2 birchwoodsapling,6,2 -pandasapling,6,2 -pandatreesapling,6,2 -pandalogsapling,6,2 -pandatrunksapling,6,2 -pandawoodsapling,6,2 +lightsapling,6,2 +lighttreesapling,6,2 +lightlogsapling,6,2 +lighttrunksapling,6,2 +lightwoodsapling,6,2 whitesapling,6,2 whitetreesapling,6,2 whitelogsapling,6,2 whitetrunksapling,6,2 whitewoodsapling,6,2 -bisapling,6,2 -bitreesapling,6,2 -bilogsapling,6,2 -bitrunksapling,6,2 -biwoodsapling,6,2 bsapling,6,2 btreesapling,6,2 blogsapling,6,2 btrunksapling,6,2 bwoodsapling,6,2 -pasapling,6,2 -patreesapling,6,2 -palogsapling,6,2 -patrunksapling,6,2 -pawoodsapling,6,2 +lsapling,6,2 +ltreesapling,6,2 +llogsapling,6,2 +ltrunksapling,6,2 +lwoodsapling,6,2 wsapling,6,2 wtreesapling,6,2 wlogsapling,6,2 wtrunksapling,6,2 wwoodsapling,6,2 -birchsap,6,2 -birchtreesap,6,2 -birchlogsap,6,2 -birchtrunksap,6,2 -birchwoodsap,6,2 -pandasap,6,2 -pandatreesap,6,2 -pandalogsap,6,2 -pandatrunksap,6,2 -pandawoodsap,6,2 -whitesap,6,2 -whitetreesap,6,2 -whitelogsap,6,2 -whitetrunksap,6,2 -whitewoodsap,6,2 -bisap,6,2 -bitreesap,6,2 -bilogsap,6,2 -bitrunksap,6,2 -biwoodsap,6,2 -bsap,6,2 -btreesap,6,2 -blogsap,6,2 -btrunksap,6,2 -bwoodsap,6,2 -pasap,6,2 -patreesap,6,2 -palogsap,6,2 -patrunksap,6,2 -pawoodsap,6,2 -wsap,6,2 -wtreesap,6,2 -wlogsap,6,2 -wtrunksap,6,2 -wwoodsap,6,2 junglesapling,6,3 +jungletreesapling,6,3 +junglelogsapling,6,3 +jungletrunksapling,6,3 +junglewoodsapling,6,3 +forestsapling,6,3 +foresttreesapling,6,3 +forestlogsapling,6,3 +foresttrunksapling,6,3 +forestwoodsapling,6,3 jsapling,6,3 -junglesap,6,3 -jsap,6,3 +jtreesapling,6,3 +jlogsapling,6,3 +jtrunksapling,6,3 +jwoodsapling,6,3 +fsapling,6,3 +ftreesapling,6,3 +flogsapling,6,3 +ftrunksapling,6,3 +fwoodsapling,6,3 bedrock,7,0 oprock,7,0 opblock,7,0 @@ -347,121 +282,105 @@ tree,17,0 log,17,0 trunk,17,0 wood,17,0 +oak,17,0 oaktree,17,0 oaklog,17,0 oaktrunk,17,0 oakwood,17,0 -normaltree,17,0 -normallog,17,0 -normaltrunk,17,0 -normalwood,17,0 otree,17,0 olog,17,0 otrunk,17,0 owood,17,0 -ntree,17,0 -nlog,17,0 -ntrunk,17,0 -nwood,17,0 -redtree,17,1 -redlog,17,1 -redtrunk,17,1 -redwood,17,1 +dark,17,1 darktree,17,1 darklog,17,1 darktrunk,17,1 darkwood,17,1 -blacktree,17,1 -blacklog,17,1 -blacktrunk,17,1 -blackwood,17,1 -pine,17,1 -pinetree,17,1 -pinelog,17,1 -pinetrunk,17,1 -pinewood,17,1 spruce,17,1 sprucetree,17,1 sprucelog,17,1 sprucetrunk,17,1 sprucewood,17,1 -rtree,17,1 -rlog,17,1 -rtrunk,17,1 -rwood,17,1 +pine,17,1 +pinetree,17,1 +pinelog,17,1 +pinetrunk,17,1 +pinewood,17,1 dtree,17,1 dlog,17,1 dtrunk,17,1 dwood,17,1 -bltree,17,1 -bllog,17,1 -bltrunk,17,1 -blwood,17,1 -ptree,17,1 -plog,17,1 -ptrunk,17,1 -pwood,17,1 stree,17,1 slog,17,1 strunk,17,1 swood,17,1 +ptree,17,1 +plog,17,1 +ptrunk,17,1 +pwood,17,1 birch,17,2 birchtree,17,2 birchlog,17,2 birchtrunk,17,2 birchwood,17,2 -pandatree,17,2 -pandalog,17,2 -pandatrunk,17,2 -pandawood,17,2 +white,17,2 whitetree,17,2 whitelog,17,2 whitetrunk,17,2 whitewood,17,2 -bitree,17,2 -bilog,17,2 -bitrunk,17,2 -biwood,17,2 +light,17,2 +lighttree,17,2 +lightlog,17,2 +lighttrunk,17,2 +lightwood,17,2 btree,17,2 blog,17,2 btrunk,17,2 bwood,17,2 -patree,17,2 -palog,17,2 -patrunk,17,2 -pawood,17,2 wtree,17,2 wlog,17,2 wtrunk,17,2 wwood,17,2 -junglewood,17,3 -jwood,17,3 +ltree,17,2 +llog,17,2 +ltrunk,17,2 +lwood,17,2 +jungle,17,3 +jungletree,17,3 junglelog,17,3 +jungletrunk,17,3 +junglewood,17,3 +forest,17,3 +foresttree,17,3 +forestlog,17,3 +foresttrunk,17,3 +forestwood,17,3 +jtree,17,3 jlog,17,3 -monkeytree,17,3 -monkeylog,17,3 +jtrunk,17,3 +jwood,17,3 +ftree,17,3 +flog,17,3 +ftrunk,17,3 +fwood,17,3 leaves,18,4 leaf,18,4 treeleaves,18,4 logleaves,18,4 trunkleaves,18,4 woodleaves,18,4 +oakleaves,18,4 +oakleaf,18,4 +oleaves,18,4 +oleaf,18,4 oaktreeleaves,18,4 oaklogleaves,18,4 oaktrunkleaves,18,4 oakwoodleaves,18,4 -normaltreeleaves,18,4 -normallogleaves,18,4 -normaltrunkleaves,18,4 -normalwoodleaves,18,4 otreeleaves,18,4 ologleaves,18,4 otrunkleaves,18,4 owoodleaves,18,4 -ntreeleaves,18,4 -nlogleaves,18,4 -ntrunkleaves,18,4 -nwoodleaves,18,4 treeleaf,18,4 logleaf,18,4 trunkleaf,18,4 @@ -470,20 +389,26 @@ oaktreeleaf,18,4 oaklogleaf,18,4 oaktrunkleaf,18,4 oakwoodleaf,18,4 -normaltreeleaf,18,4 -normallogleaf,18,4 -normaltrunkleaf,18,4 -normalwoodleaf,18,4 otreeleaf,18,4 ologleaf,18,4 otrunkleaf,18,4 owoodleaf,18,4 -ntreeleaf,18,4 -nlogleaf,18,4 -ntrunkleaf,18,4 -nwoodleaf,18,4 +spruceleaves,18,5 +spruceleaf,18,5 +sleaves,18,5 +sleaf,18,5 +sprucetreeleaves,18,5 +sprucelogleaves,18,5 +sprucetrunkleaves,18,5 +sprucewoodleaves,18,5 +streeleaves,18,5 +slogleaves,18,5 +strunkleaves,18,5 +swoodleaves,18,5 pineleaves,18,5 pineleaf,18,5 +pleaves,18,5 +pleaf,18,5 pinetreeleaves,18,5 pinelogleaves,18,5 pinetrunkleaves,18,5 @@ -492,10 +417,26 @@ ptreeleaves,18,5 plogleaves,18,5 ptrunkleaves,18,5 pwoodleaves,18,5 -pitreeleaves,18,5 -pilogleaves,18,5 -pitrunkleaves,18,5 -piwoodleaves,18,5 +darkleaves,18,5 +darkleaf,18,5 +dleaves,18,5 +dleaf,18,5 +darktreeleaves,18,5 +darklogleaves,18,5 +darktrunkleaves,18,5 +darkwoodleaves,18,5 +dtreeleaves,18,5 +dlogleaves,18,5 +dtrunkleaves,18,5 +dwoodleaves,18,5 +sprucetreeleaf,18,5 +sprucelogleaf,18,5 +sprucetrunkleaf,18,5 +sprucewoodleaf,18,5 +streeleaf,18,5 +slogleaf,18,5 +strunkleaf,18,5 +swoodleaf,18,5 pinetreeleaf,18,5 pinelogleaf,18,5 pinetrunkleaf,18,5 @@ -504,12 +445,18 @@ ptreeleaf,18,5 plogleaf,18,5 ptrunkleaf,18,5 pwoodleaf,18,5 -pitreeleaf,18,5 -pilogleaf,18,5 -pitrunkleaf,18,5 -piwoodleaf,18,5 +darktreeleaf,18,5 +darklogleaf,18,5 +darktrunkleaf,18,5 +darkwoodleaf,18,5 +dtreeleaf,18,5 +dlogleaf,18,5 +dtrunkleaf,18,5 +dwoodleaf,18,5 birchleaves,18,6 birchleaf,18,6 +bleaves,18,6 +bleaf,18,6 birchtreeleaves,18,6 birchlogleaves,18,6 birchtrunkleaves,18,6 @@ -518,10 +465,30 @@ btreeleaves,18,6 blogleaves,18,6 btrunkleaves,18,6 bwoodleaves,18,6 -bitreeleaves,18,6 -bilogleaves,18,6 -bitrunkleaves,18,6 -biwoodleaves,18,6 +lightleaves,18,6 +lightleaf,18,6 +lleaves,18,6 +lleaf,18,6 +lighttreeleaves,18,6 +lightlogleaves,18,6 +lighttrunkleaves,18,6 +lightwoodleaves,18,6 +ltreeleaves,18,6 +llogleaves,18,6 +ltrunkleaves,18,6 +lwoodleaves,18,6 +whiteleaves,18,6 +whiteleaf,18,6 +wleaves,18,6 +wleaf,18,6 +whitetreeleaves,18,6 +whitelogleaves,18,6 +whitetrunkleaves,18,6 +whitewoodleaves,18,6 +wtreeleaves,18,6 +wlogleaves,18,6 +wtrunkleaves,18,6 +wwoodleaves,18,6 birchtreeleaf,18,6 birchlogleaf,18,6 birchtrunkleaf,18,6 @@ -530,16 +497,62 @@ btreeleaf,18,6 blogleaf,18,6 btrunkleaf,18,6 bwoodleaf,18,6 -bitreeleaf,18,6 -bilogleaf,18,6 -bitrunkleaf,18,6 -biwoodleaf,18,6 +lighttreeleaf,18,6 +lightlogleaf,18,6 +lighttrunkleaf,18,6 +lightwoodleaf,18,6 +ltreeleaf,18,6 +llogleaf,18,6 +ltrunkleaf,18,6 +lwoodleaf,18,6 +whitetreeleaf,18,6 +whitelogleaf,18,6 +whitetrunkleaf,18,6 +whitewoodleaf,18,6 +wtreeleaf,18,6 +wlogleaf,18,6 +wtrunkleaf,18,6 +wwoodleaf,18,6 jungleleaves,18,7 +jungleleaf,18,7 jleaves,18,7 jleaf,18,7 -jungleleaf,18,7 -monkeyleaf,18,7 -monkeyleaves,18,7 +jungletreeleaves,18,7 +junglelogleaves,18,7 +jungletrunkleaves,18,7 +junglewoodleaves,18,7 +jtreeleaves,18,7 +jlogleaves,18,7 +jtrunkleaves,18,7 +jwoodleaves,18,7 +forestleaves,18,7 +forestleaf,18,7 +fleaves,18,7 +fleaf,18,7 +foresttreeleaves,18,7 +forestlogleaves,18,7 +foresttrunkleaves,18,7 +forestwoodleaves,18,7 +ftreeleaves,18,7 +flogleaves,18,7 +ftrunkleaves,18,7 +fwoodleaves,18,7 +jungletreeleaf,18,7 +junglelogleaf,18,7 +jungletrunkleaf,18,7 +junglewoodleaf,18,7 +jtreeleaf,18,7 +jlogleaf,18,7 +jtrunkleaf,18,7 +jwoodleaf,18,7 +foresttreeleaf,18,7 +forestlogleaf,18,7 +foresttrunkleaf,18,7 +forestwoodleaf,18,7 +ftreeleaf,18,7 +flogleaf,18,7 +ftrunkleaf,18,7 +fwoodleaf,18,7 sponge,19,0 glass,20,0 lapislazuliore,21,0 @@ -564,6 +577,8 @@ sandstone,24,0 sastone,24,0 csandstone,24,1 csastone,24,1 +creepsandstone,24,1 +creepsastone,24,1 creepersandstone,24,1 creepersastone,24,1 hieroglyphicsandstone,24,1 @@ -620,6 +635,7 @@ pistonstick,29,7 pistonsbase,29,7 pistons,29,7 psticky,29,7 +pstick,29,7 spiderweb,30,0 sweb,30,0 web,30,0 @@ -632,9 +648,6 @@ 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 @@ -655,28 +668,16 @@ pistonbase,33,7 piston,33,7 pistonblock,33,7 pistonextensionnormal,34,0 -pistonextensionnorm,34,0 -pistonextensionn,34,0 pistonextension,34,0 pistonextnormal,34,0 -pistonextnorm,34,0 -pistonextn,34,0 pistonext,34,0 pistonenormal,34,0 -pistonenorm,34,0 -pistonen,34,0 pistone,34,0 extensionpistonnormal,34,0 -extensionpistonnorm,34,0 -extensionpistonn,34,0 extensionpiston,34,0 extpistonnormal,34,0 -extpistonnorm,34,0 -extpistonn,34,0 extpiston,34,0 epistonnormal,34,0 -epistonnorm,34,0 -epistonn,34,0 episton,34,0 whitecloth,35,0 whitewool,35,0 @@ -729,6 +730,12 @@ lightgrecotton,35,5 lgrecloth,35,5 lgrewool,35,5 lgrecotton,35,5 +limecloth,35,5 +limewool,35,5 +limecotton,35,5 +lcloth,35,5 +lwool,35,5 +lcotton,35,5 pinkcloth,35,6 pinkwool,35,6 pinkcotton,35,6 @@ -864,6 +871,19 @@ dstoneslab,43,0 doublesslab,43,0 doubleslab,43,0 dslab,43,0 +smoothstonedoublehalfblock,43,0 +smoothstonedhalfblock,43,0 +stonedoublehalfblock,43,0 +stonedhalfblock,43,0 +sdoublehalfblock,43,0 +sdhalfblock,43,0 +doublesmoothstonehalfblock,43,0 +dsmoothstonehalfblock,43,0 +doublestonehalfblock,43,0 +dstonehalfblock,43,0 +doubleshalfblock,43,0 +doublehalfblock,43,0 +dhalfblock,43,0 sandstonedoublestep,43,1 sandstonedstep,43,1 sstonedoublestep,43,1 @@ -888,54 +908,102 @@ doublesstoneslab,43,1 dsstoneslab,43,1 doublessslab,43,1 dsslab,43,1 -woodenplankdoublestep,43,2 -woodenplankdstep,43,2 -woodplankdoublestep,43,2 -woodplankdstep,43,2 -wplankdoublestep,43,2 -wplankdstep,43,2 -plankdoublestep,43,2 -plankdstep,43,2 -wpdoublestep,43,2 -pdoublestep,43,2 -wpdstep,43,2 -pdstep,43,2 -doublewoodenplankstep,43,2 -dwoodenplankstep,43,2 -doublewoodplankstep,43,2 -dwoodplankstep,43,2 -doublewplankstep,43,2 -dwplankstep,43,2 -doubleplankstep,43,2 -dplankstep,43,2 -doublewpstep,43,2 -dwpstep,43,2 -doublepstep,43,2 -dpstep,43,2 -woodenplankdoubleslab,43,2 -woodenplankdslab,43,2 -woodplankdoubleslab,43,2 -woodplankdslab,43,2 -wplankdoubleslab,43,2 -wplankdslab,43,2 -plankdoubleslab,43,2 -plankdslab,43,2 -wpdoubleslab,43,2 -pdoubleslab,43,2 -wpdslab,43,2 -pdslab,43,2 -doublewoodenplankslab,43,2 -dwoodenplankslab,43,2 -doublewoodplankslab,43,2 -dwoodplankslab,43,2 -doublewplankslab,43,2 -dwplankslab,43,2 -doubleplankslab,43,2 -dplankslab,43,2 -doublewpslab,43,2 -dwpslab,43,2 -doublepslab,43,2 -dpslab,43,2 +sandstonedoublehalfblock,43,1 +sandstonedhalfblock,43,1 +sstonedoublehalfblock,43,1 +sstonedhalfblock,43,1 +ssdoublehalfblock,43,1 +ssdhalfblock,43,1 +doublesandstonehalfblock,43,1 +dsandstonehalfblock,43,1 +doublesstonehalfblock,43,1 +dsstonehalfblock,43,1 +doublesshalfblock,43,1 +dsshalfblock,43,1 +woodenplankstonedoublehalfblock,43,2 +woodenplankstonedhalfblock,43,2 +woodplankstonedoublehalfblock,43,2 +woodplankstonedhalfblock,43,2 +wplankstonedoublehalfblock,43,2 +wplankstonedhalfblock,43,2 +plankstonedoublehalfblock,43,2 +planstonekdhalfblock,43,2 +woodenstonedoublehalfblock,43,2 +woodenstonedhalfblock,43,2 +woodstonedoublehalfblock,43,2 +woodstonedhalfblock,43,2 +wstonedoublehalfblock,43,2 +wstonedhalfblock,43,2 +doublewoodenplankstonehalfblock,43,2 +dwoodenplankstonehalfblock,43,2 +doublewoodplankstonehalfblock,43,2 +dwoodplankstonehalfblock,43,2 +doublewplankstonehalfblock,43,2 +dwplankstonehalfblock,43,2 +doubleplankstonehalfblock,43,2 +dplankstonehalfblock,43,2 +doublewoodenstonehalfblock,43,2 +dwoodenstonehalfblock,43,2 +doublewoodstonehalfblock,43,2 +dwoodstonehalfblock,43,2 +doublewstonehalfblock,43,2 +dwstonehalfblock,43,2 +woodenplankstonedoublestep,43,2 +woodenplankstonedstep,43,2 +woodplankstonedoublestep,43,2 +woodplankstonedstep,43,2 +wplankstonedoublestep,43,2 +wplankstonedstep,43,2 +plankstonedoublestep,43,2 +plankstonedstep,43,2 +woodenstonedoublestep,43,2 +woodenstonedstep,43,2 +woodstonedoublestep,43,2 +woodstonedstep,43,2 +wstonedoublestep,43,2 +wstonedstep,43,2 +doublewoodenplankstonestep,43,2 +dwoodenplankstonestep,43,2 +doublewoodplankstonestep,43,2 +dwoodplankstonestep,43,2 +doublewplankstonestep,43,2 +dwplankstonestep,43,2 +doubleplankstonestep,43,2 +dplankstonestep,43,2 +doublewoodenstonestep,43,2 +dwoodenstonestep,43,2 +doublewoodstonestep,43,2 +dwoodstonestep,43,2 +doublewstonestep,43,2 +dwstonestep,43,2 +woodenplankstonedoubleslab,43,2 +woodenplankstonedslab,43,2 +woodplankstonedoubleslab,43,2 +woodplankstonedslab,43,2 +wplankstonedoubleslab,43,2 +wplankstonedslab,43,2 +plankstonedoubleslab,43,2 +plankstonedslab,43,2 +woodenstonedoubleslab,43,2 +woodenstonedslab,43,2 +woodstonedoubleslab,43,2 +woodstonedslab,43,2 +wstonedoubleslab,43,2 +wstonedslab,43,2 +doublewoodenplankstoneslab,43,2 +dwoodenplankstoneslab,43,2 +doublewoodplankstoneslab,43,2 +dwoodplankstoneslab,43,2 +doublewplankstoneslab,43,2 +dwplankstoneslab,43,2 +doubleplankstoneslab,43,2 +dplankstoneslab,43,2 +doublewoodenstoneslab,43,2 +dwoodenstoneslab,43,2 +doublewoodstoneslab,43,2 +dwoodstoneslab,43,2 +doublewstoneslab,43,2 +dwstoneslab,43,2 cobblestonedoublestep,43,3 cobblestonedstep,43,3 cobbledoublestep,43,3 @@ -968,18 +1036,118 @@ doublecstoneslab,43,3 dcstoneslab,43,3 doublecsslab,43,3 dcsslab,43,3 +cobblestonedoublehalfblock,43,3 +cobblestonedhalfblock,43,3 +cobbledoublehalfblock,43,3 +cobbledhalfblock,43,3 +cstonedoublehalfblock,43,3 +cstonedhalfblock,43,3 +csdoublehalfblock,43,3 +csdhalfblock,43,3 +doublecobblestonehalfblock,43,3 +dcobblestonehalfblock,43,3 +doublecobblehalfblock,43,3 +dcobblehalfblock,43,3 +doublecstonehalfblock,43,3 +dcstonehalfblock,43,3 +doublecshalfblock,43,3 +dcshalfblock,43,3 +brickblockdoublestep,43,4 +brickblockdstep,43,4 +brickbdoublestep,43,4 +brickbdstep,43,4 brickdoublestep,43,4 brickdstep,43,4 +bdoublestep,43,4 bdstep,43,4 +brickblockdoubleslab,43,4 +brickblockdslab,43,4 +brickbdoubleslab,43,4 +brickbdslab,43,4 brickdoubleslab,43,4 brickdslab,43,4 +bdoubleslab,43,4 bdslab,43,4 +doublebrickblockstep,43,4 +dbrickblockstep,43,4 +doublebrickbstep,43,4 +dbrickbstep,43,4 +doublebrickstep,43,4 +dbrickstep,43,4 +doublebstep,43,4 +dbstep,43,4 +doublebrickblockslab,43,4 +dbrickblockslab,43,4 +doublebrickbslab,43,4 +dbrickbslab,43,4 +doublebrickslab,43,4 +dbrickslab,43,4 +doublebslab,43,4 +dbslab,43,4 +brickblockdoublehalfblock,43,4 +brickblockdhalfblock,43,4 +brickbdoublehalfblock,43,4 +brickbdhalfblock,43,4 +brickdoublehalfblock,43,4 +brickdhalfblock,43,4 +bdoublehalfblock,43,4 +bdhalfblock,43,4 +doublebrickblockhalfblock,43,4 +dbrickblockhalfblock,43,4 +doublebrickbhalfblock,43,4 +dbrickbhalfblock,43,4 +doublebrickhalfblock,43,4 +dbrickhalfblock,43,4 +doublebhalfblock,43,4 +dbhalfblock,43,4 stonebrickdoublestep,43,5 +stonebrickdstep,43,5 +stonebdoublestep,43,5 stonebdstep,43,5 +sbrickdoublestep,43,5 +sbrickdstep,43,5 +sbdoublestep,43,5 sbdstep,43,5 stonebrickdoubleslab,43,5 +stonebrickdslab,43,5 +stonebdoubleslab,43,5 stonebdslab,43,5 +sbrickdoubleslab,43,5 +sbrickdslab,43,5 +sbdoubleslab,43,5 sbdslab,43,5 +doublestonebrickstep,43,5 +dstonebrickstep,43,5 +doublestonebstep,43,5 +dstonebstep,43,5 +doublesbrickstep,43,5 +dsbrickstep,43,5 +doublesbstep,43,5 +dsbstep,43,5 +doublestonebrickslab,43,5 +dstonebrickslab,43,5 +doublestonebslab,43,5 +dstonebslab,43,5 +doublesbrickslab,43,5 +dsbrickdslab,43,5 +doublesbslab,43,5 +dsbslab,43,5 +stonebrickdoublehalfblock,43,5 +stonebrickdhalfblock,43,5 +stonebdoublehalfblock,43,5 +stonebdhalfblock,43,5 +sbrickdoublehalfblock,43,5 +sbrickdhalfblock,43,5 +sbdoublehalfblock,43,5 +sbdhalfblock,43,5 +doublestonebrickhalfblock,43,5 +dstonebrickhalfblock,43,5 +doublestonebhalfblock,43,5 +dstonebhalfblock,43,5 +doublesbrickhalfblock,43,5 +dsbrickhalfblock,43,5 +doublesbhalfblock,43,5 +dsbhalfblock,43,5 adminslab,43,6 magicslab,43,6 adslab,43,6 @@ -991,22 +1159,40 @@ smoothstoneslab,44,0 stoneslab,44,0 sslab,44,0 slab,44,0 +smoothstonehalfblock,44,0 +stonehalfblock,44,0 +shalfblock,44,0 +halfblock,44,0 sanddstonestep,44,1 sstonestep,44,1 ssstep,44,1 sanddstoneslab,44,1 sstoneslab,44,1 ssslab,44,1 -woodplankstep,44,2 -wplankstep,44,2 -plankstep,44,2 -wpstep,44,2 -pstep,44,2 -woodplankslab,44,2 -wplankslab,44,2 -plankslab,44,2 -wpslab,44,2 -pslab,44,2 +sanddstonehalfblock,44,1 +sstonehalfblock,44,1 +sshalfblock,44,1 +woodenplankstonestep,44,2 +woodplankstonestep,44,2 +wplankstonestep,44,2 +plankstonestep,44,2 +woodenstonestep,44,2 +woodstonestep,44,2 +wstonestep,44,2 +woodenplankstoneslab,44,2 +woodplankstoneslab,44,2 +wplankstoneslab,44,2 +plankstoneslab,44,2 +woodenstoneslab,44,2 +woodstoneslab,44,2 +wstoneslab,44,2 +woodenplankstonehalfblock,44,2 +woodplankstonehalfblock,44,2 +wplankstonehalfblock,44,2 +plankstonehalfblock,44,2 +woodenstonehalfblock,44,2 +woodstonehalfblock,44,2 +wstonehalfblock,44,2 cobblestonestep,44,3 cobblestep,44,3 cstonestep,44,3 @@ -1015,16 +1201,34 @@ cobblestoneslab,44,3 cobbleslab,44,3 cstoneslab,44,3 csslab,44,3 -brickstep,44,4 +cobblestonehalfblock,44,3 +cobblehalfblock,44,3 +cstonehalfblock,44,3 +cshalfblock,44,3 brickblockstep,44,4 +brickbstep,44,4 +brickstep,44,4 bstep,44,4 -brickslab,44,4 brickblockslab,44,4 +brickbslab,44,4 +brickslab,44,4 bslab,44,4 +brickblockhalfblock,44,4 +brickbhalfblock,44,4 +brickhalfblock,44,4 +bhalfblock,44,4 stonebrickstep,44,5 +stonebstep,44,5 +sbrickstep,44,5 sbstep,44,5 stonebrickslab,44,5 +stonebslab,44,5 +sbrickslab,44,5 sbslab,44,5 +stonebrickhalfblock,44,5 +stonebhalfblock,44,5 +sbrickhalfblock,44,5 +sbhalfblock,44,5 brickblock,45,0 blockbrick,45,0 bblock,45,0 @@ -1050,30 +1254,34 @@ mcobblestone,48,0 mossycobble,48,0 mosscobble,48,0 mcobble,48,0 +mossstone,48,0 +mossystone,48,0 +mstone,48,0 obsidian,49,0 obsi,49,0 obby,49,0 torch,50,0 +burningstick,50,0 +burnstick,50,0 fire,51,0 flame,51,0 flames,51,0 mobspawner,52,0 +mobcage,52,0 monsterspawner,52,0 +monstercage,52,0 mspawner,52,0 +mcage,52,0 spawner,52,0 +cage,52,0 woodenstairs,53,0 woodstairs,53,0 wstairs,53,0 woodenstair,53,0 woodstair,53,0 wstair,53,0 -stairswooden,53,0 -stairswood,53,0 -stairsw,53,0 -stairwooden,53,0 -stairwood,53,0 -stairw,53,0 chest,54,0 +container,54,0 redstonewireblock,55,0 rstonewireblock,55,0 redswireblock,55,0 @@ -1153,20 +1361,6 @@ cobblestair,67,0 csstair,67,0 sstair,67,0 cstair,67,0 -stairscobblestone,67,0 -stairscstone,67,0 -stairsstone,67,0 -stairscobble,67,0 -stairscs,67,0 -stairss,67,0 -stairsc,67,0 -staircobblestone,67,0 -staircstone,67,0 -stairstone,67,0 -staircobble,67,0 -staircs,67,0 -stairs,67,0 -stairc,67,0 wallsign,68,0 wsign,68,0 lever,69,0 @@ -1278,6 +1472,10 @@ snowcovering,78,0 snowcover,78,0 scover,78,0 ice,79,0 +frozenwater,79,0 +waterfrozen,79,0 +freezewater,79,0 +waterfreeze,79,0 snowblock,80,0 blocksnow,80,0 sblock,80,0 @@ -1302,6 +1500,12 @@ blockbamboo,83,0 jukebox,84,0 jbox,84,0 fence,85,0 +woodenfence,85,0 +woodfence,85,0 +wfence,85,0 +fencewooden,85,0 +fencewood,85,0 +fencew,85,0 pumpkin,86,0 netherrack,87,0 netherrock,87,0 @@ -1383,14 +1587,60 @@ tdoor,96,0 doort,96,0 trapd,96,0 dtrap,96,0 -silverstone,97,0 +silverfish,97,0 +monstereggsmoothstone,97,0 +monstereggsstone,97,0 +meggsmoothstone,97,0 +meggsstone,97,0 +mesmoothstone,97,0 +messtone,97,0 +silverfishsmoothstone,97,0 +silverfishsstone,97,0 silverfishstone,97,0 -silverfishs,97,0 -sfstone,97,0 -stonesilverfish,97,0 +sfishsmoothstone,97,0 +sfishsstone,97,0 +sfishstone,97,0 +fishsmoothstone,97,0 +fishsstone,97,0 fishstone,97,0 +sfsmoothstone,97,0 +sfsstone,97,0 +sfstone,97,0 +trapsmoothstone,97,0 +trapsstone,97,0 trapstone,97,0 -silverfish,97,0 +monstereggcobblestone,97,1 +monstereggcstone,97,1 +meggcobblestone,97,1 +meggcstone,97,1 +mecobblestone,97,1 +mecstone,97,1 +silverfishcobblestone,97,1 +silverfishcstone,97,1 +sfishcobblestone,97,1 +sfishcstone,97,1 +fishcobblestone,97,1 +fishcstone,97,1 +sfcobblestone,97,1 +sfcstone,97,1 +trapcobblestone,97,1 +trapcstone,97,1 +monstereggstonebrick,97,2 +monstereggsbrick,97,2 +meggstonebrick,97,2 +meggsbrick,97,2 +mestonebrick,97,2 +mesbrick,97,2 +silverfishstonebrick,97,2 +silverfishsbrick,97,2 +sfishstonebrick,97,2 +sfishsbrick,97,2 +fishstonebrick,97,2 +fishsbrick,97,2 +sfstonebrick,97,2 +sfsbrick,97,2 +trapstonebrick,97,2 +trapsbrick,97,2 stonebrick,98,0 stonebricks,98,0 stonebrickblock,98,0 @@ -1427,10 +1677,26 @@ metalbars,101,0 jailbarsblock,101,0 jailbarsb,101,0 jailbars,101,0 +mbarsblock,101,0 +mbarsb,101,0 +mbars,101,0 +jbarsblock,101,0 +jbarsb,101,0 +jbars,101,0 +ibarsb,101,0 +ibarsblock,101,0 glasspane,102,0 +glassp,102,0 +paneglass,102,0 +pglass,102,0 flatglass,102,0 +fglass,102,0 skinnyglass,102,0 +sglass,102,0 glassflat,102,0 +glassf,102,0 +glassskinny,102,0 +glasss,102,0 melon,103,0 watermelon,103,0 greenmelon,103,0 @@ -1451,34 +1717,59 @@ stemgreenmelon,105,0 vines,106,0 vine,106,0 greenvines,106,0 +greenvine,106,0 gardenvines,106,0 +gardenvine,106,0 vinesgreen,106,0 -fencegate,107,0 -woodenfence,107,0 +vinegreen,106,0 +vinesgarden,106,0 +vinegarden,106,0 +vinesg,106,0 +vineg,106,0 +gvines,106,0 +gvine,106,0 +wfencegate,107,0 +woodfencegate,107,0 woodenfencegate,107,0 -gatefence,107,0 woodengate,107,0 woodgate,107,0 +wgate,107,0 +gate,107,0 gardengate,107,0 +ggate,107,0 +fencegate,107,0 +fencegatewooden,107,0 +fencegatewood,107,0 brickstairs,108,0 redbrickstairs,108,0 +redbstairs,108,0 +rbrickstairs,108,0 bstairs,108,0 -stairsbrick,108,0 -brickstair,108,0 redstairs,108,0 +brickstair,108,0 +redbrickstair,108,0 +redbstair,108,0 +rbrickstair,108,0 +bstair,108,0 +redstair,108,0 stonebrickstairs,109,0 stonebstairs,109,0 sbstairs,109,0 -stairsstonebrick,109,0 cementbrickstairs,109,0 cementstairs,109,0 cementbstairs,109,0 +cbstairs,109,0 greybrickstairs,109,0 greybstairs,109,0 +greystairs,109,0 +purplegrass,110,0 +pinkgrass,110,0 mycel,110,0 mycelium,110,0 swampgrass,110,0 sgrass,110,0 +mushroomgrass,110,0 +mushgrass,110,0 waterlily,111,0 lilypad,111,0 lily,111,0 @@ -1502,7 +1793,37 @@ nbrickstairs,114,0 hellbrickstairs,114,0 deathbrickstairs,114,0 dbrickstairs,114,0 -hbrickstais,114,0 +hbrickstairs,114,0 +dstairs,114,0 +hstairs,114,0 +hellstairs,114,0 +deathstairs,114,0 +nstairs,114,0 +netherstairs,114,0 +dbstairs,114,0 +hbstairs,114,0 +hellbstairs,114,0 +deathbstairs,114,0 +nbstairs,114,0 +netherbstairs,114,0 +netherbrickstair,114,0 +nbrickstair,114,0 +hellbrickstair,114,0 +deathbrickstair,114,0 +dbrickstair,114,0 +hbrickstair,114,0 +dstair,114,0 +hstair,114,0 +hellstair,114,0 +deathstair,114,0 +nstair,114,0 +netherstair,114,0 +dbstair,114,0 +hbstair,114,0 +hellbstair,114,0 +deathbstair,114,0 +nbstair,114,0 +netherbstair,114,0 netherwarts,115,0 netherwart,115,0 netherplant,115,0 @@ -1534,6 +1855,7 @@ booktable,116,0 magicdesk,116,0 enchantmentdesk,116,0 edesk,116,0 +bookdesk,116,0 btable,116,0 bdesk,116,0 mtable,116,0 @@ -1564,12 +1886,16 @@ endgooframe,120,0 endergooframe,120,0 egooframe,120,0 eportalframe,120,0 +enderframe,120,0 +endframe,120,0 enderstone,121,0 endstone,121,0 endrock,121,0 enderrock,121,0 erock,121,0 estone,121,0 +enderdragonegg,122,0 +endegg,122,0 dragonegg,122,0 degg,122,0 bossegg,122,0 @@ -1583,6 +1909,1045 @@ rslampoff,123,0 redstonelampon,124,0 redlampon,124,0 rslampon,124,0 +woodenplankdoublehalfblock,125,0 +woodenplankdhalfblock,125,0 +woodplankdoublehalfblock,125,0 +woodplankdhalfblock,125,0 +wplankdoublehalfblock,125,0 +wplankdhalfblock,125,0 +plankdoublehalfblock,125,0 +plankdhalfblock,125,0 +woodendoublehalfblock,125,0 +woodendhalfblock,125,0 +wooddoublehalfblock,125,0 +wooddhalfblock,125,0 +wdoublehalfblock,125,0 +wdhalfblock,125,0 +doublewoodenplankhalfblock,125,0 +dwoodenplankhalfblock,125,0 +doublewoodplankhalfblock,125,0 +dwoodplankhalfblock,125,0 +doublewplankhalfblock,125,0 +dwplankhalfblock,125,0 +doubleplankhalfblock,125,0 +dplankhalfblock,125,0 +doublewoodenhalfblock,125,0 +dwoodenhalfblock,125,0 +doublewoodhalfblock,125,0 +dwoodhalfblock,125,0 +doublewhalfblock,125,0 +dwhalfblock,125,0 +woodenplankdoublestep,125,0 +woodenplankdstep,125,0 +woodplankdoublestep,125,0 +woodplankdstep,125,0 +wplankdoublestep,125,0 +wplankdstep,125,0 +plankdoublestep,125,0 +plankdstep,125,0 +woodendoublestep,125,0 +woodendstep,125,0 +wooddoublestep,125,0 +wooddstep,125,0 +wdoublestep,125,0 +wdstep,125,0 +doublewoodenplankstep,125,0 +dwoodenplankstep,125,0 +doublewoodplankstep,125,0 +dwoodplankstep,125,0 +doublewplankstep,125,0 +dwplankstep,125,0 +doubleplankstep,125,0 +dplankstep,125,0 +doublewoodenstep,125,0 +dwoodenstep,125,0 +doublewoodstep,125,0 +dwoodstep,125,0 +doublewstep,125,0 +dwstep,125,0 +woodenplankdoubleslab,125,0 +woodenplankdslab,125,0 +woodplankdoubleslab,125,0 +woodplankdslab,125,0 +wplankdoubleslab,125,0 +wplankdslab,125,0 +plankdoubleslab,125,0 +plankdslab,125,0 +woodendoubleslab,125,0 +woodendslab,125,0 +wooddoubleslab,125,0 +wooddslab,125,0 +wdoubleslab,125,0 +wdslab,125,0 +doublewoodenplankslab,125,0 +dwoodenplankslab,125,0 +doublewoodplankslab,125,0 +dwoodplankslab,125,0 +doublewplankslab,125,0 +dwplankslab,125,0 +doubleplankslab,125,0 +dplankslab,125,0 +doublewoodenslab,125,0 +dwoodenslab,125,0 +doublewoodslab,125,0 +dwoodslab,125,0 +doublewslab,125,0 +dwslab,125,0 +oakwoodenplankdoublehalfblock,125,0 +oakwoodenplankdhalfblock,125,0 +oakwoodplankdoublehalfblock,125,0 +oakwoodplankdhalfblock,125,0 +oakwplankdoublehalfblock,125,0 +oakwplankdhalfblock,125,0 +oakplankdoublehalfblock,125,0 +oakplankdhalfblock,125,0 +oakwoodendoublehalfblock,125,0 +oakwoodendhalfblock,125,0 +oakwooddoublehalfblock,125,0 +oakwooddhalfblock,125,0 +oakwdoublehalfblock,125,0 +oakwdhalfblock,125,0 +oakdoublewoodenplankhalfblock,125,0 +oakdwoodenplankhalfblock,125,0 +oakdoublewoodplankhalfblock,125,0 +oakdwoodplankhalfblock,125,0 +oakdoublewplankhalfblock,125,0 +oakdwplankhalfblock,125,0 +oakdoubleplankhalfblock,125,0 +oakdplankhalfblock,125,0 +oakdoublewoodenhalfblock,125,0 +oakdwoodenhalfblock,125,0 +oakdoublewoodhalfblock,125,0 +oakdwoodhalfblock,125,0 +oakdoublewhalfblock,125,0 +oakdwhalfblock,125,0 +oakdoublehalfblock,125,0 +oakdhalfblock,125,0 +oakwoodenplankdoublestep,125,0 +oakwoodenplankdstep,125,0 +oakwoodplankdoublestep,125,0 +oakwoodplankdstep,125,0 +oakwplankdoublestep,125,0 +oakwplankdstep,125,0 +oakplankdoublestep,125,0 +oakplankdstep,125,0 +oakwoodendoublestep,125,0 +oakwoodendstep,125,0 +oakwooddoublestep,125,0 +oakwooddstep,125,0 +oakwdoublestep,125,0 +oakwdstep,125,0 +oakdoublewoodenplankstep,125,0 +oakdwoodenplankstep,125,0 +oakdoublewoodplankstep,125,0 +oakdwoodplankstep,125,0 +oakdoublewplankstep,125,0 +oakdwplankstep,125,0 +oakdoubleplankstep,125,0 +oakdplankstep,125,0 +oakdoublewoodenstep,125,0 +oakdwoodenstep,125,0 +oakdoublewoodstep,125,0 +oakdwoodstep,125,0 +oakdoublewstep,125,0 +oakdwstep,125,0 +oakdoublestep,125,0 +oakdstep,125,0 +oakwoodenplankdoubleslab,125,0 +oakwoodenplankdslab,125,0 +oakwoodplankdoubleslab,125,0 +oakwoodplankdslab,125,0 +oakwplankdoubleslab,125,0 +oakwplankdslab,125,0 +oakplankdoubleslab,125,0 +oakplankdslab,125,0 +oakwoodendoubleslab,125,0 +oakwoodendslab,125,0 +oakwooddoubleslab,125,0 +oakwooddslab,125,0 +oakwdoubleslab,125,0 +oakwdslab,125,0 +oakdoublewoodenplankslab,125,0 +oakdwoodenplankslab,125,0 +oakdoublewoodplankslab,125,0 +oakdwoodplankslab,125,0 +oakdoublewplankslab,125,0 +oakdwplankslab,125,0 +oakdoubleplankslab,125,0 +oakdplankslab,125,0 +oakdoublewoodenslab,125,0 +oakdwoodenslab,125,0 +oakdoublewoodslab,125,0 +oakdwoodslab,125,0 +oakdoublewslab,125,0 +oakdwslab,125,0 +oakdoubleslab,125,0 +oakdslab,125,0 +sprucewoodenplankdoublehalfblock,125,1 +sprucewoodenplankdhalfblock,125,1 +sprucewoodplankdoublehalfblock,125,1 +sprucewoodplankdhalfblock,125,1 +sprucewplankdoublehalfblock,125,1 +sprucewplankdhalfblock,125,1 +spruceplankdoublehalfblock,125,1 +spruceplankdhalfblock,125,1 +sprucewoodendoublehalfblock,125,1 +sprucewoodendhalfblock,125,1 +sprucewooddoublehalfblock,125,1 +sprucewooddhalfblock,125,1 +sprucewdoublehalfblock,125,1 +sprucewdhalfblock,125,1 +sprucedoublewoodenplankhalfblock,125,1 +sprucedwoodenplankhalfblock,125,1 +sprucedoublewoodplankhalfblock,125,1 +sprucedwoodplankhalfblock,125,1 +sprucedoublewplankhalfblock,125,1 +sprucedwplankhalfblock,125,1 +sprucedoubleplankhalfblock,125,1 +sprucedplankhalfblock,125,1 +sprucedoublewoodenhalfblock,125,1 +sprucedwoodenhalfblock,125,1 +sprucedoublewoodhalfblock,125,1 +sprucedwoodhalfblock,125,1 +sprucedoublewhalfblock,125,1 +sprucedwhalfblock,125,1 +sprucedoublehalfblock,125,1 +sprucedhalfblock,125,1 +sprucewoodenplankdoublestep,125,1 +sprucewoodenplankdstep,125,1 +sprucewoodplankdoublestep,125,1 +sprucewoodplankdstep,125,1 +sprucewplankdoublestep,125,1 +sprucewplankdstep,125,1 +spruceplankdoublestep,125,1 +spruceplankdstep,125,1 +sprucewoodendoublestep,125,1 +sprucewoodendstep,125,1 +sprucewooddoublestep,125,1 +sprucewooddstep,125,1 +sprucewdoublestep,125,1 +sprucewdstep,125,1 +sprucedoublewoodenplankstep,125,1 +sprucedwoodenplankstep,125,1 +sprucedoublewoodplankstep,125,1 +sprucedwoodplankstep,125,1 +sprucedoublewplankstep,125,1 +sprucedwplankstep,125,1 +sprucedoubleplankstep,125,1 +sprucedplankstep,125,1 +sprucedoublewoodenstep,125,1 +sprucedwoodenstep,125,1 +sprucedoublewoodstep,125,1 +sprucedwoodstep,125,1 +sprucedoublewstep,125,1 +sprucedwstep,125,1 +sprucedoublestep,125,1 +sprucedstep,125,1 +sprucewoodenplankdoubleslab,125,1 +sprucewoodenplankdslab,125,1 +sprucewoodplankdoubleslab,125,1 +sprucewoodplankdslab,125,1 +sprucewplankdoubleslab,125,1 +sprucewplankdslab,125,1 +spruceplankdoubleslab,125,1 +spruceplankdslab,125,1 +sprucewoodendoubleslab,125,1 +sprucewoodendslab,125,1 +sprucewooddoubleslab,125,1 +sprucewooddslab,125,1 +sprucewdoubleslab,125,1 +sprucewdslab,125,1 +sprucedoublewoodenplankslab,125,1 +sprucedwoodenplankslab,125,1 +sprucedoublewoodplankslab,125,1 +sprucedwoodplankslab,125,1 +sprucedoublewplankslab,125,1 +sprucedwplankslab,125,1 +sprucedoubleplankslab,125,1 +sprucedplankslab,125,1 +sprucedoublewoodenslab,125,1 +sprucedwoodenslab,125,1 +sprucedoublewoodslab,125,1 +sprucedwoodslab,125,1 +sprucedoublewslab,125,1 +sprucedwslab,125,1 +sprucedoubleslab,125,1 +sprucedslab,125,1 +darkwoodenplankdoublehalfblock,125,1 +darkwoodenplankdhalfblock,125,1 +darkwoodplankdoublehalfblock,125,1 +darkwoodplankdhalfblock,125,1 +darkwplankdoublehalfblock,125,1 +darkwplankdhalfblock,125,1 +darkplankdoublehalfblock,125,1 +darkplankdhalfblock,125,1 +darkwoodendoublehalfblock,125,1 +darkwoodendhalfblock,125,1 +darkwooddoublehalfblock,125,1 +darkwooddhalfblock,125,1 +darkwdoublehalfblock,125,1 +darkwdhalfblock,125,1 +darkdoublewoodenplankhalfblock,125,1 +darkdwoodenplankhalfblock,125,1 +darkdoublewoodplankhalfblock,125,1 +darkdwoodplankhalfblock,125,1 +darkdoublewplankhalfblock,125,1 +darkdwplankhalfblock,125,1 +darkdoubleplankhalfblock,125,1 +darkdplankhalfblock,125,1 +darkdoublewoodenhalfblock,125,1 +darkdwoodenhalfblock,125,1 +darkdoublewoodhalfblock,125,1 +darkdwoodhalfblock,125,1 +darkdoublewhalfblock,125,1 +darkdwhalfblock,125,1 +darkdoublehalfblock,125,1 +darkdhalfblock,125,1 +darkwoodenplankdoublestep,125,1 +darkwoodenplankdstep,125,1 +darkwoodplankdoublestep,125,1 +darkwoodplankdstep,125,1 +darkwplankdoublestep,125,1 +darkwplankdstep,125,1 +darkplankdoublestep,125,1 +darkplankdstep,125,1 +darkwoodendoublestep,125,1 +darkwoodendstep,125,1 +darkwooddoublestep,125,1 +darkwooddstep,125,1 +darkwdoublestep,125,1 +darkwdstep,125,1 +darkdoublewoodenplankstep,125,1 +darkdwoodenplankstep,125,1 +darkdoublewoodplankstep,125,1 +darkdwoodplankstep,125,1 +darkdoublewplankstep,125,1 +darkdwplankstep,125,1 +darkdoubleplankstep,125,1 +darkdplankstep,125,1 +darkdoublewoodenstep,125,1 +darkdwoodenstep,125,1 +darkdoublewoodstep,125,1 +darkdwoodstep,125,1 +darkdoublewstep,125,1 +darkdwstep,125,1 +darkdoublestep,125,1 +darkdstep,125,1 +darkwoodenplankdoubleslab,125,1 +darkwoodenplankdslab,125,1 +darkwoodplankdoubleslab,125,1 +darkwoodplankdslab,125,1 +darkwplankdoubleslab,125,1 +darkwplankdslab,125,1 +darkplankdoubleslab,125,1 +darkplankdslab,125,1 +darkwoodendoubleslab,125,1 +darkwoodendslab,125,1 +darkwooddoubleslab,125,1 +darkwooddslab,125,1 +darkwdoubleslab,125,1 +darkwdslab,125,1 +darkdoublewoodenplankslab,125,1 +darkdwoodenplankslab,125,1 +darkdoublewoodplankslab,125,1 +darkdwoodplankslab,125,1 +darkdoublewplankslab,125,1 +darkdwplankslab,125,1 +darkdoubleplankslab,125,1 +darkdplankslab,125,1 +darkdoublewoodenslab,125,1 +darkdwoodenslab,125,1 +darkdoublewoodslab,125,1 +darkdwoodslab,125,1 +darkdoublewslab,125,1 +darkdwslab,125,1 +darkdoubleslab,125,1 +darkdslab,125,1 +birchwoodenplankdoublehalfblock,125,2 +birchwoodenplankdhalfblock,125,2 +birchwoodplankdoublehalfblock,125,2 +birchwoodplankdhalfblock,125,2 +birchwplankdoublehalfblock,125,2 +birchwplankdhalfblock,125,2 +birchplankdoublehalfblock,125,2 +birchplankdhalfblock,125,2 +birchwoodendoublehalfblock,125,2 +birchwoodendhalfblock,125,2 +birchwooddoublehalfblock,125,2 +birchwooddhalfblock,125,2 +birchwdoublehalfblock,125,2 +birchwdhalfblock,125,2 +birchdoublewoodenplankhalfblock,125,2 +birchdwoodenplankhalfblock,125,2 +birchdoublewoodplankhalfblock,125,2 +birchdwoodplankhalfblock,125,2 +birchdoublewplankhalfblock,125,2 +birchdwplankhalfblock,125,2 +birchdoubleplankhalfblock,125,2 +birchdplankhalfblock,125,2 +birchdoublewoodenhalfblock,125,2 +birchdwoodenhalfblock,125,2 +birchdoublewoodhalfblock,125,2 +birchdwoodhalfblock,125,2 +birchdoublewhalfblock,125,2 +birchdwhalfblock,125,2 +birchdoublehalfblock,125,2 +birchdhalfblock,125,2 +birchwoodenplankdoublestep,125,2 +birchwoodenplankdstep,125,2 +birchwoodplankdoublestep,125,2 +birchwoodplankdstep,125,2 +birchwplankdoublestep,125,2 +birchwplankdstep,125,2 +birchplankdoublestep,125,2 +birchplankdstep,125,2 +birchwoodendoublestep,125,2 +birchwoodendstep,125,2 +birchwooddoublestep,125,2 +birchwooddstep,125,2 +birchwdoublestep,125,2 +birchwdstep,125,2 +birchdoublewoodenplankstep,125,2 +birchdwoodenplankstep,125,2 +birchdoublewoodplankstep,125,2 +birchdwoodplankstep,125,2 +birchdoublewplankstep,125,2 +birchdwplankstep,125,2 +birchdoubleplankstep,125,2 +birchdplankstep,125,2 +birchdoublewoodenstep,125,2 +birchdwoodenstep,125,2 +birchdoublewoodstep,125,2 +birchdwoodstep,125,2 +birchdoublewstep,125,2 +birchdwstep,125,2 +birchdoublestep,125,2 +birchdstep,125,2 +birchwoodenplankdoubleslab,125,2 +birchwoodenplankdslab,125,2 +birchwoodplankdoubleslab,125,2 +birchwoodplankdslab,125,2 +birchwplankdoubleslab,125,2 +birchwplankdslab,125,2 +birchplankdoubleslab,125,2 +birchplankdslab,125,2 +birchwoodendoubleslab,125,2 +birchwoodendslab,125,2 +birchwooddoubleslab,125,2 +birchwooddslab,125,2 +birchwdoubleslab,125,2 +birchwdslab,125,2 +birchdoublewoodenplankslab,125,2 +birchdwoodenplankslab,125,2 +birchdoublewoodplankslab,125,2 +birchdwoodplankslab,125,2 +birchdoublewplankslab,125,2 +birchdwplankslab,125,2 +birchdoubleplankslab,125,2 +birchdplankslab,125,2 +birchdoublewoodenslab,125,2 +birchdwoodenslab,125,2 +birchdoublewoodslab,125,2 +birchdwoodslab,125,2 +birchdoublewslab,125,2 +birchdwslab,125,2 +birchdoubleslab,125,2 +birchdslab,125,2 +lightwoodenplankdoublehalfblock,125,2 +lightwoodenplankdhalfblock,125,2 +lightwoodplankdoublehalfblock,125,2 +lightwoodplankdhalfblock,125,2 +lightwplankdoublehalfblock,125,2 +lightwplankdhalfblock,125,2 +lightplankdoublehalfblock,125,2 +lightplankdhalfblock,125,2 +lightwoodendoublehalfblock,125,2 +lightwoodendhalfblock,125,2 +lightwooddoublehalfblock,125,2 +lightwooddhalfblock,125,2 +lightwdoublehalfblock,125,2 +lightwdhalfblock,125,2 +lightdoublewoodenplankhalfblock,125,2 +lightdwoodenplankhalfblock,125,2 +lightdoublewoodplankhalfblock,125,2 +lightdwoodplankhalfblock,125,2 +lightdoublewplankhalfblock,125,2 +lightdwplankhalfblock,125,2 +lightdoubleplankhalfblock,125,2 +lightdplankhalfblock,125,2 +lightdoublewoodenhalfblock,125,2 +lightdwoodenhalfblock,125,2 +lightdoublewoodhalfblock,125,2 +lightdwoodhalfblock,125,2 +lightdoublewhalfblock,125,2 +lightdwhalfblock,125,2 +lightdoublehalfblock,125,2 +lightdhalfblock,125,2 +lightwoodenplankdoublestep,125,2 +lightwoodenplankdstep,125,2 +lightwoodplankdoublestep,125,2 +lightwoodplankdstep,125,2 +lightwplankdoublestep,125,2 +lightwplankdstep,125,2 +lightplankdoublestep,125,2 +lightplankdstep,125,2 +lightwoodendoublestep,125,2 +lightwoodendstep,125,2 +lightwooddoublestep,125,2 +lightwooddstep,125,2 +lightwdoublestep,125,2 +lightwdstep,125,2 +lightdoublewoodenplankstep,125,2 +lightdwoodenplankstep,125,2 +lightdoublewoodplankstep,125,2 +lightdwoodplankstep,125,2 +lightdoublewplankstep,125,2 +lightdwplankstep,125,2 +lightdoubleplankstep,125,2 +lightdplankstep,125,2 +lightdoublewoodenstep,125,2 +lightdwoodenstep,125,2 +lightdoublewoodstep,125,2 +lightdwoodstep,125,2 +lightdoublewstep,125,2 +lightdwstep,125,2 +lightdoublestep,125,2 +lightdstep,125,2 +lightwoodenplankdoubleslab,125,2 +lightwoodenplankdslab,125,2 +lightwoodplankdoubleslab,125,2 +lightwoodplankdslab,125,2 +lightwplankdoubleslab,125,2 +lightwplankdslab,125,2 +lightplankdoubleslab,125,2 +lightplankdslab,125,2 +lightwoodendoubleslab,125,2 +lightwoodendslab,125,2 +lightwooddoubleslab,125,2 +lightwooddslab,125,2 +lightwdoubleslab,125,2 +lightwdslab,125,2 +lightdoublewoodenplankslab,125,2 +lightdwoodenplankslab,125,2 +lightdoublewoodplankslab,125,2 +lightdwoodplankslab,125,2 +lightdoublewplankslab,125,2 +lightdwplankslab,125,2 +lightdoubleplankslab,125,2 +lightdplankslab,125,2 +lightdoublewoodenslab,125,2 +lightdwoodenslab,125,2 +lightdoublewoodslab,125,2 +lightdwoodslab,125,2 +lightdoublewslab,125,2 +lightdwslab,125,2 +lightdoubleslab,125,2 +lightdslab,125,2 +junglewoodenplankdoublehalfblock,125,3 +junglewoodenplankdhalfblock,125,3 +junglewoodplankdoublehalfblock,125,3 +junglewoodplankdhalfblock,125,3 +junglewplankdoublehalfblock,125,3 +junglewplankdhalfblock,125,3 +jungleplankdoublehalfblock,125,3 +jungleplankdhalfblock,125,3 +junglewoodendoublehalfblock,125,3 +junglewoodendhalfblock,125,3 +junglewooddoublehalfblock,125,3 +junglewooddhalfblock,125,3 +junglewdoublehalfblock,125,3 +junglewdhalfblock,125,3 +jungledoublewoodenplankhalfblock,125,3 +jungledwoodenplankhalfblock,125,3 +jungledoublewoodplankhalfblock,125,3 +jungledwoodplankhalfblock,125,3 +jungledoublewplankhalfblock,125,3 +jungledwplankhalfblock,125,3 +jungledoubleplankhalfblock,125,3 +jungledplankhalfblock,125,3 +jungledoublewoodenhalfblock,125,3 +jungledwoodenhalfblock,125,3 +jungledoublewoodhalfblock,125,3 +jungledwoodhalfblock,125,3 +jungledoublewhalfblock,125,3 +jungledwhalfblock,125,3 +jungledoublehalfblock,125,3 +jungledhalfblock,125,3 +junglewoodenplankdoublestep,125,3 +junglewoodenplankdstep,125,3 +junglewoodplankdoublestep,125,3 +junglewoodplankdstep,125,3 +junglewplankdoublestep,125,3 +junglewplankdstep,125,3 +jungleplankdoublestep,125,3 +jungleplankdstep,125,3 +junglewoodendoublestep,125,3 +junglewoodendstep,125,3 +junglewooddoublestep,125,3 +junglewooddstep,125,3 +junglewdoublestep,125,3 +junglewdstep,125,3 +jungledoublewoodenplankstep,125,3 +jungledwoodenplankstep,125,3 +jungledoublewoodplankstep,125,3 +jungledwoodplankstep,125,3 +jungledoublewplankstep,125,3 +jungledwplankstep,125,3 +jungledoubleplankstep,125,3 +jungledplankstep,125,3 +jungledoublewoodenstep,125,3 +jungledwoodenstep,125,3 +jungledoublewoodstep,125,3 +jungledwoodstep,125,3 +jungledoublewstep,125,3 +jungledwstep,125,3 +jungledoublestep,125,3 +jungledstep,125,3 +junglewoodenplankdoubleslab,125,3 +junglewoodenplankdslab,125,3 +junglewoodplankdoubleslab,125,3 +junglewoodplankdslab,125,3 +junglewplankdoubleslab,125,3 +junglewplankdslab,125,3 +jungleplankdoubleslab,125,3 +jungleplankdslab,125,3 +junglewoodendoubleslab,125,3 +junglewoodendslab,125,3 +junglewooddoubleslab,125,3 +junglewooddslab,125,3 +junglewdoubleslab,125,3 +junglewdslab,125,3 +jungledoublewoodenplankslab,125,3 +jungledwoodenplankslab,125,3 +jungledoublewoodplankslab,125,3 +jungledwoodplankslab,125,3 +jungledoublewplankslab,125,3 +jungledwplankslab,125,3 +jungledoubleplankslab,125,3 +jungledplankslab,125,3 +jungledoublewoodenslab,125,3 +jungledwoodenslab,125,3 +jungledoublewoodslab,125,3 +jungledwoodslab,125,3 +jungledoublewslab,125,3 +jungledwslab,125,3 +jungledoubleslab,125,3 +jungledslab,125,3 +forestwoodenplankdoublehalfblock,125,3 +forestwoodenplankdhalfblock,125,3 +forestwoodplankdoublehalfblock,125,3 +forestwoodplankdhalfblock,125,3 +forestwplankdoublehalfblock,125,3 +forestwplankdhalfblock,125,3 +forestplankdoublehalfblock,125,3 +forestplankdhalfblock,125,3 +forestwoodendoublehalfblock,125,3 +forestwoodendhalfblock,125,3 +forestwooddoublehalfblock,125,3 +forestwooddhalfblock,125,3 +forestwdoublehalfblock,125,3 +forestwdhalfblock,125,3 +forestdoublewoodenplankhalfblock,125,3 +forestdwoodenplankhalfblock,125,3 +forestdoublewoodplankhalfblock,125,3 +forestdwoodplankhalfblock,125,3 +forestdoublewplankhalfblock,125,3 +forestdwplankhalfblock,125,3 +forestdoubleplankhalfblock,125,3 +forestdplankhalfblock,125,3 +forestdoublewoodenhalfblock,125,3 +forestdwoodenhalfblock,125,3 +forestdoublewoodhalfblock,125,3 +forestdwoodhalfblock,125,3 +forestdoublewhalfblock,125,3 +forestdwhalfblock,125,3 +forestdoublehalfblock,125,3 +forestdhalfblock,125,3 +forestwoodenplankdoublestep,125,3 +forestwoodenplankdstep,125,3 +forestwoodplankdoublestep,125,3 +forestwoodplankdstep,125,3 +forestwplankdoublestep,125,3 +forestwplankdstep,125,3 +forestplankdoublestep,125,3 +forestplankdstep,125,3 +forestwoodendoublestep,125,3 +forestwoodendstep,125,3 +forestwooddoublestep,125,3 +forestwooddstep,125,3 +forestwdoublestep,125,3 +forestwdstep,125,3 +forestdoublewoodenplankstep,125,3 +forestdwoodenplankstep,125,3 +forestdoublewoodplankstep,125,3 +forestdwoodplankstep,125,3 +forestdoublewplankstep,125,3 +forestdwplankstep,125,3 +forestdoubleplankstep,125,3 +forestdplankstep,125,3 +forestdoublewoodenstep,125,3 +forestdwoodenstep,125,3 +forestdoublewoodstep,125,3 +forestdwoodstep,125,3 +forestdoublewstep,125,3 +forestdwstep,125,3 +forestdoublestep,125,3 +forestdstep,125,3 +forestwoodenplankdoubleslab,125,3 +forestwoodenplankdslab,125,3 +forestwoodplankdoubleslab,125,3 +forestwoodplankdslab,125,3 +forestwplankdoubleslab,125,3 +forestwplankdslab,125,3 +forestplankdoubleslab,125,3 +forestplankdslab,125,3 +forestwoodendoubleslab,125,3 +forestwoodendslab,125,3 +forestwooddoubleslab,125,3 +forestwooddslab,125,3 +forestwdoubleslab,125,3 +forestwdslab,125,3 +forestdoublewoodenplankslab,125,3 +forestdwoodenplankslab,125,3 +forestdoublewoodplankslab,125,3 +forestdwoodplankslab,125,3 +forestdoublewplankslab,125,3 +forestdwplankslab,125,3 +forestdoubleplankslab,125,3 +forestdplankslab,125,3 +forestdoublewoodenslab,125,3 +forestdwoodenslab,125,3 +forestdoublewoodslab,125,3 +forestdwoodslab,125,3 +forestdoublewslab,125,3 +forestdwslab,125,3 +forestdoubleslab,125,3 +forestdslab,125,3 +woodenplankstep,126,0 +woodplankstep,126,0 +wplankstep,126,0 +plankstep,126,0 +woodenstep,126,0 +woodstep,126,0 +wstep,126,0 +woodenplankslab,126,0 +woodplankslab,126,0 +wplankslab,126,0 +plankslab,126,0 +woodenslab,126,0 +woodslab,126,0 +wslab,126,0 +woodenplankhalfblock,126,0 +woodplankhalfblock,126,0 +wplankhalfblock,126,0 +plankhalfblock,126,0 +woodenhalfblock,126,0 +woodhalfblock,126,0 +whalfblock,126,0 +oakwoodenplankstep,126,0 +oakwoodplankstep,126,0 +oakwplankstep,126,0 +oakplankstep,126,0 +oakwoodenstep,126,0 +oakwoodstep,126,0 +oakwstep,126,0 +oakstep,126,0 +oakwoodenplankslab,126,0 +oakwoodplankslab,126,0 +oakwplankslab,126,0 +oakplankslab,126,0 +oakwoodenslab,126,0 +oakwoodslab,126,0 +oakwslab,126,0 +oakslab,126,0 +oakwoodenplankhalfblock,126,0 +oakwoodplankhalfblock,126,0 +oakwplankhalfblock,126,0 +oakplankhalfblock,126,0 +oakwoodenhalfblock,126,0 +oakwoodhalfblock,126,0 +oakwhalfblock,126,0 +oakhalfblock,126,0 +sprucewoodenplankstep,126,1 +sprucewoodplankstep,126,1 +sprucewplankstep,126,1 +spruceplankstep,126,1 +sprucewoodenstep,126,1 +sprucewoodstep,126,1 +sprucewstep,126,1 +sprucestep,126,1 +sprucewoodenplankslab,126,1 +sprucewoodplankslab,126,1 +sprucewplankslab,126,1 +spruceplankslab,126,1 +sprucewoodenslab,126,1 +sprucewoodslab,126,1 +sprucewslab,126,1 +spruceslab,126,1 +sprucewoodenplankhalfblock,126,1 +sprucewoodplankhalfblock,126,1 +sprucewplankhalfblock,126,1 +spruceplankhalfblock,126,1 +sprucewoodenhalfblock,126,1 +sprucewoodhalfblock,126,1 +sprucewhalfblock,126,1 +sprucehalfblock,126,1 +darkwoodenplankstep,126,1 +darkwoodplankstep,126,1 +darkwplankstep,126,1 +darkplankstep,126,1 +darkwoodenstep,126,1 +darkwoodstep,126,1 +darkwstep,126,1 +darkstep,126,1 +darkwoodenplankslab,126,1 +darkwoodplankslab,126,1 +darkwplankslab,126,1 +darkplankslab,126,1 +darkwoodenslab,126,1 +darkwoodslab,126,1 +darkwslab,126,1 +darkslab,126,1 +darkwoodenplankhalfblock,126,1 +darkwoodplankhalfblock,126,1 +darkwplankhalfblock,126,1 +darkplankhalfblock,126,1 +darkwoodenhalfblock,126,1 +darkwoodhalfblock,126,1 +darkwhalfblock,126,1 +darkhalfblock,126,1 +birchwoodenplankstep,126,2 +birchwoodplankstep,126,2 +birchwplankstep,126,2 +birchplankstep,126,2 +birchwoodenstep,126,2 +birchwoodstep,126,2 +birchwstep,126,2 +birchstep,126,2 +birchwoodenplankslab,126,2 +birchwoodplankslab,126,2 +birchwplankslab,126,2 +birchplankslab,126,2 +birchwoodenslab,126,2 +birchwoodslab,126,2 +birchwslab,126,2 +birchslab,126,2 +birchwoodenplankhalfblock,126,2 +birchwoodplankhalfblock,126,2 +birchwplankhalfblock,126,2 +birchplankhalfblock,126,2 +birchwoodenhalfblock,126,2 +birchwoodhalfblock,126,2 +birchwhalfblock,126,2 +birchhalfblock,126,2 +lightwoodenplankstep,126,2 +lightwoodplankstep,126,2 +lightwplankstep,126,2 +lightplankstep,126,2 +lightwoodenstep,126,2 +lightwoodstep,126,2 +lightwstep,126,2 +lightstep,126,2 +lightwoodenplankslab,126,2 +lightwoodplankslab,126,2 +lightwplankslab,126,2 +lightplankslab,126,2 +lightwoodenslab,126,2 +lightwoodslab,126,2 +lightwslab,126,2 +lightslab,126,2 +lightwoodenplankhalfblock,126,2 +lightwoodplankhalfblock,126,2 +lightwplankhalfblock,126,2 +lightplankhalfblock,126,2 +lightwoodenhalfblock,126,2 +lightwoodhalfblock,126,2 +lightwhalfblock,126,2 +lighthalfblock,126,2 +junglewoodenplankstep,126,3 +junglewoodplankstep,126,3 +junglewplankstep,126,3 +jungleplankstep,126,3 +junglewoodenstep,126,3 +junglewoodstep,126,3 +junglewstep,126,3 +junglestep,126,3 +junglewoodenplankslab,126,3 +junglewoodplankslab,126,3 +junglewplankslab,126,3 +jungleplankslab,126,3 +junglewoodenslab,126,3 +junglewoodslab,126,3 +junglewslab,126,3 +jungleslab,126,3 +junglewoodenplankhalfblock,126,3 +junglewoodplankhalfblock,126,3 +junglewplankhalfblock,126,3 +jungleplankhalfblock,126,3 +junglewoodenhalfblock,126,3 +junglewoodhalfblock,126,3 +junglewhalfblock,126,3 +junglehalfblock,126,3 +forestwoodenplankstep,126,3 +forestwoodplankstep,126,3 +forestwplankstep,126,3 +forestplankstep,126,3 +forestwoodenstep,126,3 +forestwoodstep,126,3 +forestwstep,126,3 +foreststep,126,3 +forestwoodenplankslab,126,3 +forestwoodplankslab,126,3 +forestwplankslab,126,3 +forestplankslab,126,3 +forestwoodenslab,126,3 +forestwoodslab,126,3 +forestwslab,126,3 +forestslab,126,3 +forestwoodenplankhalfblock,126,3 +forestwoodplankhalfblock,126,3 +forestwplankhalfblock,126,3 +forestplankhalfblock,126,3 +forestwoodenhalfblock,126,3 +forestwoodhalfblock,126,3 +forestwhalfblock,126,3 +foresthalfblock,126,3 +cocoaplant,127,0 +cocopant,127,0 +cocoafruit,127,0 +cocofruit,127,0 +sandstairs,128,0 +sandstonestairs,128,0 +sandsstairs,128,0 +sstonestairs,128,0 +ssstairs,128,0 +sandstair,128,0 +sandstonestair,128,0 +sandsstair,128,0 +sstonestair,128,0 +ssstair,128,0 +emeraldore,129,0 +eore,129,0 +oreemerald,129,0 +oree,129,0 +enderchest,130,0 +endchest,130,0 +echest,130,0 +chestender,130,0 +chestend,130,0 +cheste,130,0 +endercontainer,130,0 +endcontainer,130,0 +econtainer,130,0 +tripwirehook,131,0 +tripwire,131,0 +trip,131,0 +tripwirelever,131,0 +triphook,131,0 +tripwireblock,132,0 +tripblock,132,0 +blocktrip,132,0 +blocktripwire,132,0 +emeraldblock,133,0 +blockemerald,133,0 +eblock,133,0 +blocke,133,0 +sprucewoodenplankstairs,134,0 +sprucewoodplankstairs,134,0 +sprucewplankstairs,134,0 +spruceplankstairs,134,0 +sprucewoodenstairs,134,0 +sprucewoodstairs,134,0 +sprucewstairs,134,0 +sprucestairs,134,0 +darkwoodenplankstairs,134,0 +darkwoodplankstairs,134,0 +darkwplankstairs,134,0 +darkplankstairs,134,0 +darkwoodenstairs,134,0 +darkwoodstairs,134,0 +darkwstairs,134,0 +darkstairs,134,0 +sprucewoodenplankstair,134,0 +sprucewoodplankstair,134,0 +sprucewplankstair,134,0 +spruceplankstair,134,0 +sprucewoodenstair,134,0 +sprucewoodstair,134,0 +sprucewstair,134,0 +sprucestair,134,0 +darkwoodenplankstair,134,0 +darkwoodplankstair,134,0 +darkwplankstair,134,0 +darkplankstair,134,0 +darkwoodenstair,134,0 +darkwoodstair,134,0 +darkwstair,134,0 +darkstair,134,0 +birchwoodenplankstairs,135,0 +birchwoodplankstairs,135,0 +birchwplankstairs,135,0 +birchplankstairs,135,0 +birchwoodenstairs,135,0 +birchwoodstairs,135,0 +birchwstairs,135,0 +birchstairs,135,0 +lightwoodenplankstairs,135,0 +lightwoodplankstairs,135,0 +lightwplankstairs,135,0 +lightplankstairs,135,0 +lightwoodenstairs,135,0 +lightwoodstairs,135,0 +lightwstairs,135,0 +lightstairs,135,0 +birchwoodenplankstair,135,0 +birchwoodplankstair,135,0 +birchwplankstair,135,0 +birchplankstair,135,0 +birchwoodenstair,135,0 +birchwoodstair,135,0 +birchwstair,135,0 +birchstair,135,0 +lightwoodenplankstair,135,0 +lightwoodplankstair,135,0 +lightwplankstair,135,0 +lightplankstair,135,0 +lightwoodenstair,135,0 +lightwoodstair,135,0 +lightwstair,135,0 +lightstair,135,0 +junglewoodenplankstairs,136,0 +junglewoodplankstairs,136,0 +junglewplankstairs,136,0 +jungleplankstairs,136,0 +junglewoodenstairs,136,0 +junglewoodstairs,136,0 +junglewstairs,136,0 +junglestairs,136,0 +forestwoodenplankstairs,136,0 +forestwoodplankstairs,136,0 +forestwplankstairs,136,0 +forestplankstairs,136,0 +forestwoodenstairs,136,0 +forestwoodstairs,136,0 +forestwstairs,136,0 +foreststairs,136,0 +junglewoodenplankstair,136,0 +junglewoodplankstair,136,0 +junglewplankstair,136,0 +jungleplankstair,136,0 +junglewoodenstair,136,0 +junglewoodstair,136,0 +junglewstair,136,0 +junglestair,136,0 +forestwoodenplankstair,136,0 +forestwoodplankstair,136,0 +forestwplankstair,136,0 +forestplankstair,136,0 +forestwoodenstair,136,0 +forestwoodstair,136,0 +forestwstair,136,0 +foreststair,136,0 ironshovel,256,0 ironspade,256,0 ishovel,256,0 @@ -1609,6 +2974,8 @@ flintiron,259,0 flinttinder,259,0 lighter,259,0 apple,260,0 +normalapple,260,0 +redapple,260,0 bow,261,0 arrow,262,0 coal,263,0 @@ -1730,6 +3097,8 @@ diamondaxe,279,0 crystalaxe,279,0 daxe,279,0 stick,280,0 +twig,280,0 +branch,280,0 bowl,281,0 mushroomsoup,282,0 mrsoup,282,0 @@ -1991,6 +3360,27 @@ picture,321,0 goldenapple,322,0 goldapple,322,0 gapple,322,0 +enchantedgoldenapple,322,1 +enchantedgoldapple,322,1 +enchantedgapple,322,1 +supergoldenapple,322,1 +supergoldapple,322,1 +supergapple,322,1 +magicalgoldenapple,322,1 +magicalgoldapple,322,1 +magicalgapple,322,1 +magicgoldenapple,322,1 +magicgoldapple,322,1 +magicgapple,322,1 +egoldenapple,322,1 +egoldapple,322,1 +egapple,322,1 +sgoldenapple,322,1 +sgoldapple,322,1 +sgapple,322,1 +mgoldenapple,322,1 +mgoldapple,322,1 +mgapple,322,1 sign,323,0 woodendoor,324,0 wooddoor,324,0 @@ -2027,6 +3417,7 @@ redsdust,331,0 reddust,331,0 rsdust,331,0 rdust,331,0 +snow,332,0 snowball,332,0 snball,332,0 boat,333,0 @@ -2211,12 +3602,16 @@ greencactusdye,351,2 greencolour,351,2 greencolor,351,2 greendye,351,2 +cocoabeans,351,3 +cocoabean,351,3 cocobeans,351,3 cocobean,351,3 cbeans,351,3 cbean,351,3 beans,351,3 bean,351,3 +browncocoabeans,351,3 +browncocoabean,351,3 browncocobeans,351,3 browncocobean,351,3 browncbeans,351,3 @@ -2224,12 +3619,16 @@ browncbean,351,3 brownbeans,351,3 brownbean,351,3 brownb,351,3 +cocoabeanscolour,351,3 +cocoabeancolour,351,3 cocobeanscolour,351,3 cocobeancolour,351,3 cbeanscolour,351,3 cbeancolour,351,3 beanscolour,351,3 beancolour,351,3 +browncocoabeanscolour,351,3 +browncocoabeancolour,351,3 browncocobeanscolour,351,3 browncocobeancolour,351,3 browncbeanscolour,351,3 @@ -2237,12 +3636,16 @@ browncbeancolour,351,3 brownbeanscolour,351,3 brownbeancolour,351,3 brownbcolour,351,3 +cocoabeanscolor,351,3 +cocoabeancolor,351,3 cocobeanscolor,351,3 cocobeancolor,351,3 cbeanscolor,351,3 cbeancolor,351,3 beanscolor,351,3 beancolor,351,3 +browncocoabeanscolor,351,3 +browncocoabeancolor,351,3 browncocobeanscolor,351,3 browncocobeancolor,351,3 browncbeanscolor,351,3 @@ -2250,12 +3653,16 @@ browncbeancolor,351,3 brownbeanscolor,351,3 brownbeancolor,351,3 brownbcolor,351,3 +cocoabeansdye,351,3 +cocoabeandye,351,3 cocobeansdye,351,3 cocobeandye,351,3 cbeansdye,351,3 cbeandye,351,3 beansdye,351,3 beandye,351,3 +browncocoabeansdye,351,3 +browncocoabeandye,351,3 browncocobeansdye,351,3 browncocobeandye,351,3 browncbeansdye,351,3 @@ -2387,6 +3794,7 @@ whitecolor,351,15 whitedye,351,15 bone,352,0 sugar,353,0 +whitedust,353,0 cake,354,0 bed,355,0 repeater,356,0 @@ -2396,12 +3804,32 @@ delay,356,0 dioder,356,0 diode,356,0 cookie,357,0 -map,358,0 chart,358,0 +map,358,0 +map_0,358,0 +map_1,358,1 +map_2,358,2 +map_3,358,3 +map_4,358,4 +map_5,358,5 +map_6,358,6 +map_7,358,7 +map_8,358,8 +map_9,358,9 +map_10,358,10 +map_11,358,11 +map_12,358,12 +map_13,358,13 +map_14,358,14 +map_15,358,15 shears,359,0 shear,359,0 sheers,359,0 sheer,359,0 +woolcutters,359,0 +woolcutter,359,0 +cutterswool,359,0 +cutterwool,359,0 melonslice,360,0 mslice,360,0 slicemelon,360,0 @@ -2427,6 +3855,8 @@ uncookedbeef,363,0 uncookedsteak,363,0 cowmeat,363,0 plainbeef,363,0 +beef,364,0 +steak,364,0 cookedbeef,364,0 grilledbeef,364,0 cookedsteak,364,0 @@ -2450,7 +3880,7 @@ zombieflesh,367,0 rottenmeat,367,0 zombiemeat,367,0 badflesh,367,0 -poisenflesh,367,0 +poisonflesh,367,0 zombieremains,367,0 enderpearl,368,0 pearl,368,0 @@ -2472,6 +3902,7 @@ ghosttear,370,0 ghostdrop,370,0 gtear,370,0 gdrop,370,0 +tear,370,0 goldnugget,371,0 gnugget,371,0 goldball,371,0 @@ -2479,8 +3910,17 @@ goldpebble,371,0 gball,371,0 gpebble,371,0 pigzombienugget,371,0 +pigznugget,371,0 +pzombienugget,371,0 +pznugget,371,0 pigzombieball,371,0 +pigzball,371,0 +pzombieball,371,0 +pzball,371,0 pigzombiepebble,371,0 +pigzpebble,371,0 +pzombiepebble,371,0 +pzpebble,371,0 netherstalk,372,0 deathstalk,372,0 hellstalk,372,0 @@ -2490,13 +3930,768 @@ hstalk,372,0 potion,373,0 mixture,373,0 potions,373,0 +waterbottle,373,0 +fullbottle,373,0 +watervase,373,0 +fullvase,373,0 +awkwardpotion,373,16 +awkwardpot,373,16 +thickpotion,373,32 +thickpot,373,32 +mundaneexpotion,373,64 +mundaneextendedpotion,373,64 +mundaneexpot,373,64 +mundaneextendedpot,373,64 +mundanepotion,373,8192 +mundanepot,373,8192 +regenerationpotion,373,8193 +regeneratepotion,373,8193 +regenpotion,373,8193 +regenerationpot,373,8193 +regeneratepot,373,8193 +regenpot,373,8193 +rpot,373,8193 +swiftnesspotion,373,8194 +swiftpotion,373,8194 +swiftnesspot,373,8194 +swiftpot,373,8194 +swpot,373,8194 +fireresistancepotion,373,8195 +fireresistpotion,373,8195 +firerespotion,373,8195 +fireresistancepot,373,8195 +fireresistpot,373,8195 +firerespot,373,8195 +fpot,373,8195 +posionpotion,373,8196 +acidpotion,373,8196 +posionpot,373,8196 +acidpot,373,8196 +ppot,373,8196 +healingpotion,373,8197 +healpotion,373,8197 +lifepotion,373,8197 +healingpot,373,8197 +healpot,373,8197 +lifepot,373,8197 +hpot,373,8197 +weaknesspotion,373,8200 +weakpotion,373,8200 +weaknesspot,373,8200 +weakpot,373,8200 +wpot,373,8200 +strengthpotion,373,8201 +strongpotion,373,8201 +strpotion,373,8201 +strengthpot,373,8201 +strongpot,373,8201 +strpot,373,8201 +spot,373,8201 +slownesspotion,373,8202 +slowpotion,373,8202 +slownesspot,373,8202 +slowpot,373,8202 +slpot,373,8202 +harmingpotion,373,8204 +damagepotion,373,8204 +dmgpotion,373,8204 +harmingpot,373,8204 +damagepot,373,8204 +dmgpot,373,8204 +dpot,373,8204 +regenerationleveliipotion,373,8225 +regenerateleveliipotion,373,8225 +regenleveliipotion,373,8225 +regenerationlevel2potion,373,8225 +regeneratelevel2potion,373,8225 +regenlevel2potion,373,8225 +regenerationiipotion,373,8225 +regenerateiipotion,373,8225 +regeniipotion,373,8225 +regenerationleveliipot,373,8225 +regenerateleveliipot,373,8225 +regenleveliipot,373,8225 +regenerationlevel2pot,373,8225 +regeneratelevel2pot,373,8225 +regenlevel2pot,373,8225 +regenerationiipot,373,8225 +regenerateiipot,373,8225 +regeniipot,373,8225 +r2pot,373,8225 +swiftnessleveliipotion,373,8226 +swiftleveliipotion,373,8226 +swiftnesslevel2potion,373,8226 +swiftlevel2potion,373,8226 +swiftnessiipotion,373,8226 +swiftiipotion,373,8226 +swiftnessleveliipot,373,8226 +swiftleveliipot,373,8226 +swiftnesslevel2pot,373,8226 +swiftlevel2pot,373,8226 +swiftnessiipot,373,8226 +swiftiipot,373,8226 +sw2pot,373,8226 +posionleveliipotion,373,8228 +acidleveliipotion,373,8228 +posionlevel2potion,373,8228 +acidlevel2potion,373,8228 +posioniipotion,373,8228 +acidiipotion,373,8228 +posionleveliipot,373,8228 +acidleveliipot,373,8228 +posionlevel2pot,373,8228 +acidlevel2pot,373,8228 +posioniipot,373,8228 +acidiipot,373,8228 +p2pot,373,8228 +healingleveliipotion,373,8229 +healleveliipotion,373,8229 +healinglevel2potion,373,8229 +heallevel2potion,373,8229 +healingiipotion,373,8229 +healiipotion,373,8229 +healingleveliipot,373,8229 +healleveliipot,373,8229 +healinglevel2pot,373,8229 +heallevel2pot,373,8229 +healingiipot,373,8229 +healiipot,373,8229 +h2potpot,373,8229 +strengthleveliipotion,373,8233 +strongleveliipotion,373,8233 +strleveliipotion,373,8233 +strengthlevel2potion,373,8233 +stronglevel2potion,373,8233 +strlevel2potion,373,8233 +strengthiipotion,373,8233 +strongiipotion,373,8233 +striipotion,373,8233 +strengthleveliipot,373,8233 +strongleveliipot,373,8233 +strleveliipot,373,8233 +strengthlevel2pot,373,8233 +stronglevel2pot,373,8233 +strlevel2pot,373,8233 +strengthiipot,373,8233 +strongiipot,373,8233 +striipot,373,8233 +s2pot,373,8233 +harmingleveliipotion,373,8236 +damageleveliipotion,373,8236 +dmgleveliipotion,373,8236 +harminglevel2potion,373,8236 +damagelevel2potion,373,8236 +dmglevel2potion,373,8236 +harmingiipotion,373,8236 +damageiipotion,373,8236 +dmgiipotion,373,8236 +harmingleveliipot,373,8236 +damageleveliipot,373,8236 +dmgleveliipot,373,8236 +harminglevel2pot,373,8236 +damagelevel2pot,373,8236 +dmglevel2pot,373,8236 +harmingiipot,373,8236 +damageiipot,373,8236 +dmgiipot,373,8236 +d2pot,373,8236 +regenerationextendedpotion,373,8257 +regenerateextendedpotion,373,8257 +regenextendepotion,373,8257 +regenerationexpotion,373,8257 +regenerateexpotion,373,8257 +regenexpotion,373,8257 +regenerationextendedpot,373,8257 +regenerateextendedpot,373,8257 +regenextendepot,373,8257 +regenerationexpot,373,8257 +regenerateexpot,373,8257 +regenexpot,373,8257 +repot,373,8257 +swiftnessextendedpotion,373,8258 +swiftextendedpotion,373,8258 +swiftnessexpotion,373,8258 +swiftexpotion,373,8258 +swiftnessextendedpot,373,8258 +swiftextendedpot,373,8258 +swiftnessexpot,373,8258 +swiftexpot,373,8258 +swepot,373,8258 +fireresistanceextendedpotion,373,8259 +fireresistextendedpotion,373,8259 +fireresextendedpotion,373,8259 +fireresistanceexpotion,373,8259 +fireresistexpotion,373,8259 +fireresexpotion,373,8259 +fireresistanceextendedpot,373,8259 +fireresistextendedpot,373,8259 +fireresextendedpot,373,8259 +fireresistanceexpot,373,8259 +fireresistexpot,373,8259 +fireresexpot,373,8259 +fepot,373,8259 +posionextendedpotion,373,8260 +acidextendedpotion,373,8260 +posionexpotion,373,8260 +acidexpotion,373,8260 +posionextendedpot,373,8260 +acidextendedpot,373,8260 +posionexpot,373,8260 +acidexpot,373,8260 +pepot,373,8260 +weaknessextendedpotion,373,8264 +weakextendedpotion,373,8264 +weaknessexpotion,373,8264 +weakexpotion,373,8264 +weaknessextendedpot,373,8264 +weakextendedpot,373,8264 +weaknessexpot,373,8264 +weakexpot,373,8264 +wepot,373,8264 +strengthextendedpotion,373,8265 +strongextendedpotion,373,8265 +strextendedpotion,373,8265 +strengthexpotion,373,8265 +strongexpotion,373,8265 +strexpotion,373,8265 +strengthextendedpot,373,8265 +strongextendedpot,373,8265 +strextendedpot,373,8265 +strengthexpot,373,8265 +strongexpot,373,8265 +strexpot,373,8265 +sepot,373,8265 +slownessextendedpotion,373,8266 +slowextenedpotion,373,8266 +slownessexpotion,373,8266 +slowexpotion,373,8266 +slownessextendedpot,373,8266 +slowextenedpot,373,8266 +slownessexpot,373,8266 +slowexpot,373,8266 +slepot,373,8266 +regenerationdualbitpotion,373,8289 +regeneratedualbitpotion,373,8289 +regendualbitpotion,373,8289 +regenerationdualbitpot,373,8289 +regeneratedualbitpot,373,8289 +regendualbitpot,373,8289 +rdbpot,373,8289 +swiftnessdualbitpotion,373,8290 +swiftdualbitpotion,373,8290 +swiftnessdualbitpot,373,8290 +swiftdualbitpot,373,8290 +swdbpot,373,8290 +poisondualbitpotion,373,8292 +aciddualbitpotion,373,8292 +poisondualbitpot,373,8292 +aciddualbitpot,373,8292 +pdbpot,373,8292 +strengthdualbitpotion,373,8297 +strongdualbitpotion,373,8297 +strdualbitpotion,373,8297 +strengthdualbitpot,373,8297 +strongdualbitpot,373,8297 +strdualbitpot,373,8297 +sdbpot,373,8297 +splashmundanepotion,373,16384 +splmundanepotion,373,16384 +splashregenerationpotion,373,16385 +splashregeneratepotion,373,16385 +splashregenpotion,373,16385 +splashregenerationpot,373,16385 +splashregeneratepot,373,16385 +splashregenpot,373,16385 +regenerationsplashpotion,373,16385 +regeneratesplashpotion,373,16385 +regensplashpotion,373,16385 +splregenerationpotion,373,16385 +splregeneratepotion,373,16385 +splregenpotion,373,16385 +splregenerationpot,373,16385 +splregeneratepot,373,16385 +splregenpot,373,16385 +sprpot,373,16385 +splashswiftnesspotion,373,16386 +splashswiftpotion,373,16386 +splashswiftnesspot,373,16386 +splashswiftpot,373,16386 +splswiftnesspotion,373,16386 +splswiftpotion,373,16386 +splswiftnesspot,373,16386 +splswiftpot,373,16386 +spswpot,373,16386 +splashfireresistancepotion,373,16387 +splashfireresistpotion,373,16387 +splashfirerespotion,373,16387 +splashfireresistancepot,373,16387 +splashfireresistpot,373,16387 +splashfirerespot,373,16387 +splfireresistancepotion,373,16387 +splfireresistpotion,373,16387 +splfirerespotion,373,16387 +splfireresistancepot,373,16387 +splfireresistpot,373,16387 +splfirerespot,373,16387 +spfpot,373,16387 +splashposionpotion,373,16388 +splashacidpotion,373,16388 +splashposionpot,373,16388 +splashacidpot,373,16388 +splposionpotion,373,16388 +splacidpotion,373,16388 +splposionpot,373,16388 +splacidpot,373,16388 +spppot,373,16388 +splashhealingpotion,373,16389 +splashhealpotion,373,16389 +splashlifepotion,373,16389 +splashhealingpot,373,16389 +splashhealpot,373,16389 +splashlifepot,373,16389 +splhealingpotion,373,16389 +splhealpotion,373,16389 +spllifepotion,373,16389 +splhealingpot,373,16389 +splhealpot,373,16389 +spllifepot,373,16389 +sphpot,373,16389 +splashweaknesspotion,373,16392 +splashweakpotion,373,16392 +splashweaknesspot,373,16392 +splashweakpot,373,16392 +splweaknesspotion,373,16392 +splweakpotion,373,16392 +splweaknesspot,373,16392 +splweakpot,373,16392 +spwpot,373,16392 +splashstrengthpotion,373,16393 +splashstrongpotion,373,16393 +splashstrpotion,373,16393 +splashstrengthpot,373,16393 +splashstrongpot,373,16393 +splashstrpot,373,16393 +splstrengthpotion,373,16393 +splstrongpotion,373,16393 +splstrpotion,373,16393 +splstrengthpot,373,16393 +splstrongpot,373,16393 +splstrpot,373,16393 +spspot,373,16393 +splashslownesspotion,373,16394 +splashslowpotion,373,16394 +splashslownesspot,373,16394 +splashslowpot,373,16394 +splslownesspotion,373,16394 +splslowpotion,373,16394 +splslownesspot,373,16394 +splslowpot,373,16394 +spslpot,373,16394 +splashharmingpotion,373,16396 +splashdamagepotion,373,16396 +splashdmgpotion,373,16396 +splashharmingpot,373,16396 +splashdamagepot,373,16396 +splashdmgpot,373,16396 +dmgsplashpot,373,16396 +splharmingpotion,373,16396 +spldamagepotion,373,16396 +spldmgpotion,373,16396 +splharmingpot,373,16396 +spldamagepot,373,16396 +spldmgpot,373,16396 +spdpot,373,16396 +splashregenerationleveliipotion,373,16417 +splashregenerateleveliipotion,373,16417 +splashregenleveliipotion,373,16417 +splashregenerationlevel2potion,373,16417 +splashregeneratelevel2potion,373,16417 +splashregenlevel2potion,373,16417 +splashregenerationiipotion,373,16417 +splashregenerateiipotion,373,16417 +splashregeniipotion,373,16417 +splashregenerationleveliipot,373,16417 +splashregenerateleveliipot,373,16417 +splashregenleveliipot,373,16417 +splashregenerationlevel2pot,373,16417 +splashregeneratelevel2pot,373,16417 +splashregenlevel2pot,373,16417 +splashregenerationiipot,373,16417 +splashregenerateiipot,373,16417 +splashregeniipot,373,16417 +splregenerationleveliipotion,373,16417 +splregenerateleveliipotion,373,16417 +splregenleveliipotion,373,16417 +splregenerationlevel2potion,373,16417 +splregeneratelevel2potion,373,16417 +splregenlevel2potion,373,16417 +splregenerationiipotion,373,16417 +splregenerateiipotion,373,16417 +splregeniipotion,373,16417 +splregenerationleveliipot,373,16417 +splregenerateleveliipot,373,16417 +splregenleveliipot,373,16417 +splregenerationlevel2pot,373,16417 +splregeneratelevel2pot,373,16417 +splregenlevel2pot,373,16417 +splregenerationiipot,373,16417 +splregenerateiipot,373,16417 +splregeniipot,373,16417 +spr2pot,373,16417 +splashswiftnessleveliipotion,373,16418 +splashswiftleveliipotion,373,16418 +splashswiftnesslevel2potion,373,16418 +splashswiftlevel2potion,373,16418 +splashswiftnessiipotion,373,16418 +splashswiftiipotion,373,16418 +splashswiftnessleveliipot,373,16418 +splashswiftleveliipot,373,16418 +splashswiftnesslevel2pot,373,16418 +splashswiftlevel2pot,373,16418 +splashswiftnessiipot,373,16418 +splashswiftiipot,373,16418 +splswiftnessleveliipotion,373,16418 +splswiftleveliipotion,373,16418 +splswiftnesslevel2potion,373,16418 +splswiftlevel2potion,373,16418 +splswiftnessiipotion,373,16418 +splswiftiipotion,373,16418 +splswiftnessleveliipot,373,16418 +splswiftleveliipot,373,16418 +splswiftnesslevel2pot,373,16418 +splswiftlevel2pot,373,16418 +splswiftnessiipot,373,16418 +splswiftiipot,373,16418 +spsw2pot,373,16418 +splashposionleveliipotion,373,16420 +splashacidleveliipotion,373,16420 +splashposionlevel2potion,373,16420 +splashacidlevel2potion,373,16420 +splashposioniipotion,373,16420 +splashacidiipotion,373,16420 +splashposionleveliipot,373,16420 +splashacidleveliipot,373,16420 +splashposionlevel2pot,373,16420 +splashacidlevel2pot,373,16420 +splashposioniipot,373,16420 +splashacidiipot,373,16420 +splposionleveliipotion,373,16420 +splacidleveliipotion,373,16420 +splposionlevel2potion,373,16420 +splcidlevel2potion,373,16420 +splposioniipotion,373,16420 +splacidiipotion,373,16420 +splposionleveliipot,373,16420 +splacidleveliipot,373,16420 +splposionlevel2pot,373,16420 +splacidlevel2pot,373,16420 +splposioniipot,373,16420 +splacidiipot,373,16420 +spp2pot,373,16420 +splashhealingleveliipotion,373,16421 +splashhealleveliipotion,373,16421 +splashhealinglevel2potion,373,16421 +splashheallevel2potion,373,16421 +splashhealingiipotion,373,16421 +splashhealiipotion,373,16421 +splashhealingleveliipot,373,16421 +splashhealleveliipot,373,16421 +splashhealinglevel2pot,373,16421 +splashheallevel2pot,373,16421 +splashhealingiipot,373,16421 +splashhealiipot,373,16421 +splhealingleveliipotion,373,16421 +splhealleveliipotion,373,16421 +splhealinglevel2potion,373,16421 +splheallevel2potion,373,16421 +splhealingiipotion,373,16421 +splhealiipotion,373,16421 +splhealingleveliipot,373,16421 +splhealleveliipot,373,16421 +splhealinglevel2pot,373,16421 +splheallevel2pot,373,16421 +splhealingiipot,373,16421 +splhealiipot,373,16421 +sph2pot,373,16421 +splashstrengthleveliipotion,373,16425 +splashstrongleveliipotion,373,16425 +splashstrleveliipotion,373,16425 +splashstrengthlevel2potion,373,16425 +splashstronglevel2potion,373,16425 +splashstrlevel2potion,373,16425 +splashstrengthiipotion,373,16425 +splashstrongiipotion,373,16425 +splashstriipotion,373,16425 +splashstrengthleveliipot,373,16425 +splashstrongleveliipot,373,16425 +splashstrleveliipot,373,16425 +splashstrengthlevel2pot,373,16425 +splashstronglevel2pot,373,16425 +splashstrlevel2pot,373,16425 +splashstrengthiipot,373,16425 +splashstrongiipot,373,16425 +splashstriipot,373,16425 +splstrengthleveliipotion,373,16425 +splstrongleveliipotion,373,16425 +splstrleveliipotion,373,16425 +splstrengthlevel2potion,373,16425 +splstronglevel2potion,373,16425 +splstrlevel2potion,373,16425 +splstrengthiipotion,373,16425 +splstrongiipotion,373,16425 +splstriipotion,373,16425 +splstrengthleveliipot,373,16425 +splstrongleveliipot,373,16425 +splstrleveliipot,373,16425 +splstrengthlevel2pot,373,16425 +splstronglevel2pot,373,16425 +splstrlevel2pot,373,16425 +splstrengthiipot,373,16425 +splstrongiipot,373,16425 +splstriipot,373,16425 +sps2pot,373,16425 +splashharmingleveliipotion,373,16428 +splashdamageleveliipotion,373,16428 +splashdmgleveliipotion,373,16428 +splashharminglevel2potion,373,16428 +splashdamagelevel2potion,373,16428 +splashdmglevel2potion,373,16428 +splashharmingiipotion,373,16428 +splashdamageiipotion,373,16428 +splashdmgiipotion,373,16428 +splashharmingleveliipot,373,16428 +splashdamageleveliipot,373,16428 +splashdmgleveliipot,373,16428 +splashharminglevel2pot,373,16428 +splashdamagelevel2pot,373,16428 +splashdmglevel2pot,373,16428 +splashharmingiipot,373,16428 +splashdamageiipot,373,16428 +splashdmgiipot,373,16428 +splharmingleveliipotion,373,16428 +spldamageleveliipotion,373,16428 +spldmgleveliipotion,373,16428 +splharminglevel2potion,373,16428 +spldamagelevel2potion,373,16428 +spldmglevel2potion,373,16428 +splharmingiipotion,373,16428 +spldamageiipotion,373,16428 +spldmgiipotion,373,16428 +splharmingleveliipot,373,16428 +spldamageleveliipot,373,16428 +spldmgleveliipot,373,16428 +splharminglevel2pot,373,16428 +spldamagelevel2pot,373,16428 +spldmglevel2pot,373,16428 +splharmingiipot,373,16428 +spldamageiipot,373,16428 +spldmgiipot,373,16428 +spd2pot,373,16428 +splashregenerationextendedpotion,373,16449 +splashregenerateextendedpotion,373,16449 +splashregenextendepotion,373,16449 +splashregenerationexpotion,373,16449 +splashregenerateexpotion,373,16449 +splashregenexpotion,373,16449 +splashregenerationextendedpot,373,16449 +splashregenerateextendedpot,373,16449 +splashregenextendepot,373,16449 +splashregenerationexpot,373,16449 +splashregenerateexpot,373,16449 +splashregenexpot,373,16449 +splregenerationextendedpotion,373,16449 +splregenerateextendedpotion,373,16449 +splregenextendepotion,373,16449 +splregenerationexpotion,373,16449 +splregenerateexpotion,373,16449 +splregenexpotion,373,16449 +splregenerationextendedpot,373,16449 +splregenerateextendedpot,373,16449 +splregenextendepot,373,16449 +splregenerationexpot,373,16449 +splregenerateexpot,373,16449 +splregenexpot,373,16449 +sprepot,373,16449 +splashswiftnessextendedpotion,373,16450 +splashswiftextendedpotion,373,16450 +splashswiftnessexpotion,373,16450 +splashswiftexpotion,373,16450 +splashswiftnessextendedpot,373,16450 +splashswiftextendedpot,373,16450 +splashswiftnessexpot,373,16450 +splashswiftexpot,373,16450 +splswiftnessextendedpotion,373,16450 +splswiftextendedpotion,373,16450 +splswiftnessexpotion,373,16450 +splswiftexpotion,373,16450 +splswiftnessextendedpot,373,16450 +splswiftextendedpot,373,16450 +splswiftnessexpot,373,16450 +splswiftexpot,373,16450 +spswepot,373,16450 +splashfireresistanceextendedpotion,373,16451 +splashfireresistextendedpotion,373,16451 +splashfireresextendedpotion,373,16451 +splashfireresistanceexpotion,373,16451 +splashfireresistexpotion,373,16451 +splashfireresexpotion,373,16451 +splashfireresistanceextendedpot,373,16451 +splashfireresistextendedpot,373,16451 +splashfireresextendedpot,373,16451 +splashfireresistanceexpot,373,16451 +splashfireresistexpot,373,16451 +splashfireresexpot,373,16451 +splfireresistanceextendedpotion,373,16451 +splfireresistextendedpotion,373,16451 +splfireresextendedpotion,373,16451 +splfireresistanceexpotion,373,16451 +splfireresistexpotion,373,16451 +splfireresexpotion,373,16451 +splfireresistanceextendedpot,373,16451 +splfireresistextendedpot,373,16451 +splfireresextendedpot,373,16451 +splfireresistanceexpot,373,16451 +splfireresistexpot,373,16451 +splfireresexpot,373,16451 +spfepot,373,16451 +splashposionextendedpotion,373,16452 +splashacidextendedpotion,373,16452 +splashposionexpotion,373,16452 +splashacidexpotion,373,16452 +splashposionextendedpot,373,16452 +splashacidextendedpot,373,16452 +splashposionexpot,373,16452 +splashacidexpot,373,16452 +splposionextendedpotion,373,16452 +splacidextendedpotion,373,16452 +splposionexpotion,373,16452 +splacidexpotion,373,16452 +splposionextendedpot,373,16452 +splacidextendedpot,373,16452 +splposionexpot,373,16452 +splacidexpot,373,16452 +sppepot,373,16452 +splashweaknessextendedpotion,373,16456 +splashweakextendedpotion,373,16456 +splashweaknessexpotion,373,16456 +splashweakexpotion,373,16456 +splashweaknessextendedpot,373,16456 +splashweakextendedpot,373,16456 +splashweaknessexpot,373,16456 +splashweakexpot,373,16456 +splweaknessextendedpotion,373,16456 +sphweakextendedpotion,373,16456 +splweaknessexpotion,373,16456 +splweakexpotion,373,16456 +splweaknessextendedpot,373,16456 +splweakextendedpot,373,16456 +splweaknessexpot,373,16456 +splweakexpot,373,16456 +spwepot,373,16456 +splashstrengthextendedpotion,373,16457 +splashstrongextendedpotion,373,16457 +splashstrextendedpotion,373,16457 +splashstrengthexpotion,373,16457 +splashstrongexpotion,373,16457 +splashstrexpotion,373,16457 +splashstrengthextendedpot,373,16457 +splashstrongextendedpot,373,16457 +splashstrextendedpot,373,16457 +splashstrengthexpot,373,16457 +splashstrongexpot,373,16457 +splashstrexpot,373,16457 +splstrengthextendedpotion,373,16457 +splstrongextendedpotion,373,16457 +splstrextendedpotion,373,16457 +splstrengthexpotion,373,16457 +splstrongexpotion,373,16457 +splstrexpotion,373,16457 +splstrengthextendedpot,373,16457 +splstrongextendedpot,373,16457 +splstrextendedpot,373,16457 +splstrengthexpot,373,16457 +splstrongexpot,373,16457 +splstrexpot,373,16457 +spsepot,373,16457 +splashslownessextendedpotion,373,16458 +splashslowextenedpotion,373,16458 +splashslownessexpotion,373,16458 +splashslowexpotion,373,16458 +splashslownessextendedpot,373,16458 +splashslowextenedpot,373,16458 +splashslownessexpot,373,16458 +splashslowexpot,373,16458 +splslownessextendedpotion,373,16458 +splslowextenedpotion,373,16458 +splslownessexpotion,373,16458 +splslowexpotion,373,16458 +splslownessextendedpot,373,16458 +splslowextenedpot,373,16458 +splslownessexpot,373,16458 +splslowexpot,373,16458 +spslepot,373,16458 +splashregenerationdualbitpotion,373,16481 +splashregeneratedualbitpotion,373,16481 +splashregendualbitpotion,373,16481 +splashregenerationdualbitpot,373,16481 +splashregeneratedualbitpot,373,16481 +splashregendualbitpot,373,16481 +splregenerationdualbitpotion,373,16481 +splregeneratedualbitpotion,373,16481 +splregendualbitpotion,373,16481 +splregenerationdualbitpot,373,16481 +splregeneratedualbitpot,373,16481 +splregendualbitpot,373,16481 +sprdbpot,373,16481 +splashswiftnessdualbitpotion,373,16482 +splashswiftdualbitpotion,373,16482 +splashswiftnessdualbitpot,373,16482 +splashswiftdualbitpot,373,16482 +splswiftnessdualbitpotion,373,16482 +splswiftdualbitpotion,373,16482 +splswiftnessdualbitpot,373,16482 +splswiftdualbitpot,373,16482 +spswdbpot,373,16482 +splashpoisondualbitpotion,373,16484 +splashaciddualbitpotion,373,16484 +splashpoisondualbitpot,373,16484 +splashaciddualbitpot,373,16484 +splpoisondualbitpotion,373,16484 +splaciddualbitpotion,373,16484 +splpoisondualbitpot,373,16484 +splaciddualbitpot,373,16484 +sppdbpot,373,16484 +splashstrengthdualbitpotion,373,16489 +splashstrongdualbitpotion,373,16489 +splashstrdualbitpotion,373,16489 +splashstrengthdualbitpot,373,16489 +splashstrongdualbitpot,373,16489 +splashstrdualbitpot,373,16489 +splstrengthdualbitpotion,373,16489 +splstrongdualbitpotion,373,16489 +splstrdualbitpotion,373,16489 +splstrengthdualbitpot,373,16489 +splstrongdualbitpot,373,16489 +splstrdualbitpot,373,16489 +spsdbpot,373,16489 glassbottle,374,0 bottle,374,0 gbottle,374,0 gvase,374,0 vase,374,0 glassvase,374,0 -emptypotion,374,0 +emptyglassbottle,374,0 +emptybottle,374,0 +emptygbottle,374,0 +emptygvase,374,0 +emptyvase,374,0 +emptyglassvase,374,0 +eglassbottle,374,0 +ebottle,374,0 +egbottle,374,0 +egvase,374,0 +evase,374,0 +eglassvase,374,0 spidereye,375,0 eyeofspider,375,0 spiderseye,375,0 @@ -2556,83 +4751,646 @@ shiningmelon,382,0 gmelon,382,0 smelon,382,0 creeperegg,383,50 +eggcreeper,383,50 skeletonegg,383,51 +eggskeleton,383,51 spideregg,383,52 +eggspider,383,52 giantegg,383,53 +egggiant,383,53 zombieegg,383,54 +eggzombie,383,54 slimeegg,383,55 +eggslime,383,55 ghastegg,383,56 +eggghast,383,56 zombiepigmanegg,383,57 +zpigmanegg,383,57 pigmanegg,383,57 +zombiepmanegg,383,57 +zpmanegg,383,57 +zombiepigmegg,383,57 +zpigmegg,383,57 +zombiepigegg,383,57 +zpigegg,383,57 +zombiepmegg,383,57 +zombiepegg,383,57 +eggzombiepigman,383,57 +eggzpigman,383,57 +eggpigman,383,57 +eggzombiepman,383,57 +eggzpman,383,57 +eggzombiepigm,383,57 +eggzpigm,383,57 +eggzombiepig,383,57 +eggzpig,383,57 +eggzombiepm,383,57 +eggzombiep,383,57 endermanegg,383,58 +eggenderman,383,58 +eggcavespider,383,59 cavespideregg,383,59 silverfishegg,383,60 +eggsilverfish,383,60 blazeegg,383,61 +eggblaze,383,61 lavaslimeegg,383,62 -magmacubeegg,383,63 +lavacubeegg,383,62 +magmacubeegg,383,62 +magmaslimeegg,383,62 +egglavaslime,383,62 +egglavacube,383,62 +eggmagmacube,383,62 +eggmagmaslime,383,62 pigegg,383,90 +eggpig,383,90 sheepegg,383,91 +eggsheep,383,91 cowegg,383,92 +eggcow,383,92 chickenegg,383,93 +eggchicken,383,93 squidegg,383,94 +eggsquid,383,94 wolfegg,383,95 +eggwolf,383,95 mooshroomegg,383,96 mushroomcowegg,383,96 +eggmooshroom,383,96 +eggmushroomcow,383,96 snowgolemegg,383,97 +sgolemegg,383,97 +eggsnowgolem,383,97 +eggsgolem,383,97 ocelotegg,383,98 +eggocelot,383,98 irongolemegg,383,99 +igolemegg,383,99 +eggirongolem,383,99 +eggigolem,383,99 villageregg,383,120 +eggvillager,383,120 bottleofenchanting,384,0 enchantingbottle,384,0 expbottle,384,0 xpbottle,384,0 +bottleexp,384,0 +bottlexp,384,0 +enchantbottle,384,0 +bottleenchanting,384,0 +bottleenchant,384,0 +bottleoenchanting,384,0 firecharge,385,0 fireball,385,0 grenade,385,0 +bookandquill,386,0 +booknquill,386,0 +bookandfeather,386,0 +booknfeather,386,0 +writeablebook,386,0 +writtenbook,387,0 +readablebook,387,0 +sealedbook,387,0 +diary,387,0 +ownedbook,387,0 +emerald,388,0 goldmusicrecord,2256,0 goldmusicdisk,2256,0 +goldmusicdisc,2256,0 goldmusiccd,2256,0 +13musicrecord,2256,0 +13musicdisk,2256,0 +13musicdisc,2256,0 +13musiccd,2256,0 gomusicrecord,2256,0 gomusicdisk,2256,0 +gomusicdisc,2256,0 gomusiccd,2256,0 goldmrecord,2256,0 goldmdisk,2256,0 +goldmdisc,2256,0 goldmcd,2256,0 +13mrecord,2256,0 +13mdisk,2256,0 +13mdisc,2256,0 +13mcd,2256,0 gomrecord,2256,0 gomdisk,2256,0 +gomdisc,2256,0 gomcd,2256,0 goldrecord,2256,0 golddisk,2256,0 +golddisc,2256,0 goldcd,2256,0 +13record,2256,0 +13disk,2256,0 +13disc,2256,0 +13cd,2256,0 gorecord,2256,0 godisk,2256,0 +godisc,2256,0 gocd,2256,0 record1,2256,0 +disk1,2256,0 +disc1,2256,0 +cd1,2256,0 +1record,2256,0 +1disk,2256,0 +1disc,2256,0 +1cd,2256,0 greenmusicrecord,2257,0 greenmusicdisk,2257,0 +greenmusicdisc,2257,0 greenmusiccd,2257,0 +catmusicrecord,2257,0 +catmusicdisk,2257,0 +catmusicdisc,2257,0 +catmusiccd,2257,0 grmusicrecord,2257,0 grmusicdisk,2257,0 +grmusicdisc,2257,0 grmusiccd,2257,0 greenmrecord,2257,0 greenmdisk,2257,0 +greenmdisc,2257,0 greenmcd,2257,0 +catmrecord,2257,0 +catmdisk,2257,0 +catmdisc,2257,0 +catmcd,2257,0 grmrecord,2257,0 grmdisk,2257,0 +grmdisc,2257,0 grmcd,2257,0 greenrecord,2257,0 greendisk,2257,0 +greendisc,2257,0 greencd,2257,0 +catrecord,2257,0 +catdisk,2257,0 +catdisc,2257,0 +catcd,2257,0 grrecord,2257,0 grdisk,2257,0 +grdisc,2257,0 grcd,2257,0 record2,2257,0 +disk2,2257,0 +disc2,2257,0 +cd2,2257,0 +2record,2257,0 +2disk,2257,0 +2disc,2257,0 +2cd,2257,0 +orangemusicrecord,2258,0 +orangemusicdisk,2258,0 +orangemusicdisc,2258,0 +orangemusiccd,2258,0 +blocksmusicrecord,2258,0 +blocksmusicdisk,2258,0 +blocksmusicdisc,2258,0 +blocksmusiccd,2258,0 +ormusicrecord,2258,0 +ormusicdisk,2258,0 +ormusicdisc,2258,0 +ormusiccd,2258,0 +orangemrecord,2258,0 +orangemdisk,2258,0 +orangemdisc,2258,0 +orangemcd,2258,0 +blocksmrecord,2258,0 +blocksmdisk,2258,0 +blocksmdisc,2258,0 +blocksmcd,2258,0 +ormrecord,2258,0 +ormdisk,2258,0 +ormdisc,2258,0 +ormcd,2258,0 +orangerecord,2258,0 +orangedisk,2258,0 +orangedisc,2258,0 +orangecd,2258,0 +blocksrecord,2258,0 +blocksdisk,2258,0 +blocksdisc,2258,0 +blockscd,2258,0 +orrecord,2258,0 +ordisk,2258,0 +ordisc,2258,0 +orcd,2258,0 record3,2258,0 +disk3,2258,0 +disc3,2258,0 +cd3,2258,0 +3record,2258,0 +3disk,2258,0 +3disc,2258,0 +3cd,2258,0 +redmusicrecord,2259,0 +redmusicdisk,2259,0 +redmusicdisc,2259,0 +redmusiccd,2259,0 +chirpmusicrecord,2259,0 +chirpmusicdisk,2259,0 +chirpmusicdisc,2259,0 +chirpmusiccd,2259,0 +remusicrecord,2259,0 +remusicdisk,2259,0 +remusicdisc,2259,0 +remusiccd,2259,0 +redmrecord,2259,0 +redmdisk,2259,0 +redmdisc,2259,0 +redmcd,2259,0 +chirpmrecord,2259,0 +chirpmdisk,2259,0 +chirpmdisc,2259,0 +chirpmcd,2259,0 +remrecord,2259,0 +remdisk,2259,0 +remdisc,2259,0 +remcd,2259,0 +redrecord,2259,0 +reddisk,2259,0 +reddisc,2259,0 +redcd,2259,0 +chirprecord,2259,0 +chirpdisk,2259,0 +chirpdisc,2259,0 +chirpcd,2259,0 +rerecord,2259,0 +redisk,2259,0 +redisc,2259,0 +recd,2259,0 record4,2259,0 +disk4,2259,0 +disc4,2259,0 +cd4,2259,0 +4record,2259,0 +4disk,2259,0 +4disc,2259,0 +4cd,2259,0 +lightgreenmusicrecord,2260,0 +lightgreenmusicdisk,2260,0 +lightgreenmusicdisc,2260,0 +lightgreenmusiccd,2260,0 +lgreenmusicrecord,2260,0 +lgreenmusicdisk,2260,0 +lgreenmusicdisc,2260,0 +lgreenmusiccd,2260,0 +lightgrmusicrecord,2260,0 +lightgrmusicdisk,2260,0 +lightgrmusicdisc,2260,0 +lightgrmusiccd,2260,0 +farmusicrecord,2260,0 +farmusicdisk,2260,0 +farmusicdisc,2260,0 +farmusiccd,2260,0 +lgrmusicrecord,2260,0 +lgrmusicdisk,2260,0 +lgrmusicdisc,2260,0 +lgrmusiccd,2260,0 +lightgreenmrecord,2260,0 +lightgreenmdisk,2260,0 +lightgreenmdisc,2260,0 +lightgreenmcd,2260,0 +lgreenmrecord,2260,0 +lgreenmdisk,2260,0 +lgreenmdisc,2260,0 +lgreenmcd,2260,0 +lightgrmrecord,2260,0 +lightgrmdisk,2260,0 +lightgrmdisc,2260,0 +lightgrmcd,2260,0 +farmrecord,2260,0 +farmdisk,2260,0 +farmdisc,2260,0 +farmcd,2260,0 +lgrmrecord,2260,0 +lgrmdisk,2260,0 +lgrmdisc,2260,0 +lgrmcd,2260,0 +lightgreenrecord,2260,0 +lightgreendisk,2260,0 +lightgreendisc,2260,0 +lightgreencd,2260,0 +lgreenrecord,2260,0 +lgreendisk,2260,0 +lgreendisc,2260,0 +lgreencd,2260,0 +lightgrrecord,2260,0 +lightgrdisk,2260,0 +lightgrdisc,2260,0 +lightgrcd,2260,0 +farrecord,2260,0 +fardisk,2260,0 +fardisc,2260,0 +farcd,2260,0 +lgrrecord,2260,0 +lgrdisk,2260,0 +lgrdisc,2260,0 +lgrcd,2260,0 record5,2260,0 +disk5,2260,0 +disc5,2260,0 +cd5,2260,0 +5record,2260,0 +5disk,2260,0 +5disc,2260,0 +5cd,2260,0 +purplemusicrecord,2261,0 +purplemusicdisk,2261,0 +purplemusicdisc,2261,0 +purplemusiccd,2261,0 +mallmusicrecord,2261,0 +mallmusicdisk,2261,0 +mallmusicdisc,2261,0 +mallmusiccd,2261,0 +pumusicrecord,2261,0 +pumusicdisk,2261,0 +pumusicdisc,2261,0 +pumusiccd,2261,0 +purplemrecord,2261,0 +purplemdisk,2261,0 +purplemdisc,2261,0 +purplemcd,2261,0 +mallmrecord,2261,0 +mallmdisk,2261,0 +mallmdisc,2261,0 +mallmcd,2261,0 +pumrecord,2261,0 +pumdisk,2261,0 +pumdisc,2261,0 +pumcd,2261,0 +purplerecord,2261,0 +purpledisk,2261,0 +purpledisc,2261,0 +purplecd,2261,0 +mallrecord,2261,0 +malldisk,2261,0 +malldisc,2261,0 +mallcd,2261,0 +purecord,2261,0 +pudisk,2261,0 +pudisc,2261,0 +pucd,2261,0 record6,2261,0 +disk6,2261,0 +disc6,2261,0 +cd6,2261,0 +6record,2261,0 +6disk,2261,0 +6disc,2261,0 +6cd,2261,0 +pinkmusicrecord,2262,0 +pinkmusicdisk,2262,0 +pinkmusicdisc,2262,0 +pinkmusiccd,2262,0 +mellohimusicrecord,2262,0 +mellohimusicdisk,2262,0 +mellohimusicdisc,2262,0 +mellohimusiccd,2262,0 +pimusicrecord,2262,0 +pimusicdisk,2262,0 +pimusicdisc,2262,0 +pimusiccd,2262,0 +pinkmrecord,2262,0 +pinkmdisk,2262,0 +pinkmdisc,2262,0 +pinkmcd,2262,0 +mellohimrecord,2262,0 +mellohimdisk,2262,0 +mellohimdisc,2262,0 +mellohimcd,2262,0 +pimrecord,2262,0 +pimdisk,2262,0 +pimdisc,2262,0 +pimcd,2262,0 +pinkrecord,2262,0 +pinkdisk,2262,0 +pinkdisc,2262,0 +pinkcd,2262,0 +mellohirecord,2262,0 +mellohidisk,2262,0 +mellohidisc,2262,0 +mellohicd,2262,0 +pirecord,2262,0 +pidisk,2262,0 +pidisc,2262,0 +picd,2262,0 record7,2262,0 +disk7,2262,0 +disc7,2262,0 +cd7,2262,0 +7record,2262,0 +7disk,2262,0 +7disc,2262,0 +7cd,2262,0 +blackmusicrecord,2263,0 +blackmusicdisk,2263,0 +blackmusicdisc,2263,0 +blackmusiccd,2263,0 +stalmusicrecord,2263,0 +stalmusicdisk,2263,0 +stalmusicdisc,2263,0 +stalmusiccd,2263,0 +blmusicrecord,2263,0 +blmusicdisk,2263,0 +blmusicdisc,2263,0 +blmusiccd,2263,0 +blackmrecord,2263,0 +blackmdisk,2263,0 +blackmdisc,2263,0 +blackmcd,2263,0 +stalmrecord,2263,0 +stalmdisk,2263,0 +stalmdisc,2263,0 +stalmcd,2263,0 +blmrecord,2263,0 +blmdisk,2263,0 +blmdisc,2263,0 +blmcd,2263,0 +blackrecord,2263,0 +blackdisk,2263,0 +blackdisc,2263,0 +blackcd,2263,0 +stalrecord,2263,0 +staldisk,2263,0 +staldisc,2263,0 +stalcd,2263,0 +blrecord,2263,0 +bldisk,2263,0 +bldisc,2263,0 +blcd,2263,0 record8,2263,0 +disk8,2263,0 +disc8,2263,0 +cd8,2263,0 +8record,2263,0 +8disk,2263,0 +8disc,2263,0 +8cd,2263,0 +whitemusicrecord,2264,0 +whitemusicdisk,2264,0 +whitemusicdisc,2264,0 +whitemusiccd,2264,0 +stradmusicrecord,2264,0 +stradmusicdisk,2264,0 +stradmusicdisc,2264,0 +stradmusiccd,2264,0 +whmusicrecord,2264,0 +whmusicdisk,2264,0 +whmusicdisc,2264,0 +whmusiccd,2264,0 +whitemrecord,2264,0 +whitemdisk,2264,0 +whitemdisc,2264,0 +whitemcd,2264,0 +stradmrecord,2264,0 +stradmdisk,2264,0 +stradmdisc,2264,0 +stradmcd,2264,0 +whmrecord,2264,0 +whmdisk,2264,0 +whmdisc,2264,0 +whmcd,2264,0 +whiterecord,2264,0 +whitedisk,2264,0 +whitedisc,2264,0 +whitecd,2264,0 +stradrecord,2264,0 +straddisk,2264,0 +straddisc,2264,0 +stradcd,2264,0 +whrecord,2264,0 +whdisk,2264,0 +whdisc,2264,0 +whcd,2264,0 record9,2264,0 +disk9,2264,0 +disc9,2264,0 +cd9,2264,0 +9record,2264,0 +9disk,2264,0 +9disc,2264,0 +9cd,2264,0 +darkgreenmusicrecord,2265,0 +darkgreenmusicdisk,2265,0 +darkgreenmusicdisc,2265,0 +darkgreenmusiccd,2265,0 +dgreenmusicrecord,2265,0 +dgreenmusicdisk,2265,0 +dgreenmusicdisc,2265,0 +dgreenmusiccd,2265,0 +darkgrmusicrecord,2265,0 +darkgrmusicdisk,2265,0 +darkgrmusicdisc,2265,0 +darkgrmusiccd,2265,0 +wardmusicrecord,2265,0 +wardmusicdisk,2265,0 +wardmusicdisc,2265,0 +wardmusiccd,2265,0 +dgrmusicrecord,2265,0 +dgrmusicdisk,2265,0 +dgrmusicdisc,2265,0 +dgrmusiccd,2265,0 +darkgreenmrecord,2265,0 +darkgreenmdisk,2265,0 +darkgreenmdisc,2265,0 +darkgreenmcd,2265,0 +dgreenmrecord,2265,0 +dgreenmdisk,2265,0 +dgreenmdisc,2265,0 +dgreenmcd,2265,0 +darkgrmrecord,2265,0 +darkgrmdisk,2265,0 +darkgrmdisc,2265,0 +darkgrmcd,2265,0 +wardmrecord,2265,0 +wardmdisk,2265,0 +wardmdisc,2265,0 +wardmcd,2265,0 +dgrmrecord,2265,0 +dgrmdisk,2265,0 +dgrmdisc,2265,0 +dgrmcd,2265,0 +darkgreenrecord,2265,0 +darkgreendisk,2265,0 +darkgreendisc,2265,0 +darkgreencd,2265,0 +dgreenrecord,2265,0 +dgreendisk,2265,0 +dgreendisc,2265,0 +dgreencd,2265,0 +darkgrrecord,2265,0 +darkgrdisk,2265,0 +darkgrdisc,2265,0 +darkgrcd,2265,0 +wardrecord,2265,0 +warddisk,2265,0 +warddisc,2265,0 +wardcd,2265,0 +dgrrecord,2265,0 +dgrdisk,2265,0 +dgrdisc,2265,0 +dgrcd,2265,0 record10,2265,0 +disk10,2265,0 +disc10,2265,0 +cd10,2265,0 +10record,2265,0 +10disk,2265,0 +10disc,2265,0 +10cd,2265,0 +crackedmusicrecord,2266,0 +crackedmusicdisk,2266,0 +crackedmusicdisc,2266,0 +crackedmusiccd,2266,0 +crackmusicrecord,2266,0 +crackmusicdisk,2266,0 +crackmusicdisc,2266,0 +crackmusiccd,2266,0 +11musicrecord,2266,0 +11musicdisk,2266,0 +11musicdisc,2266,0 +11musiccd,2266,0 +cmusicrecord,2266,0 +cmusicdisk,2266,0 +cmusicdisc,2266,0 +cmusiccd,2266,0 +crackedmrecord,2266,0 +crackedmdisk,2266,0 +crackedmdisc,2266,0 +crackedmcd,2266,0 +crackmrecord,2266,0 +crackmdisk,2266,0 +crackmdisc,2266,0 +crackmcd,2266,0 +11mrecord,2266,0 +11mdisk,2266,0 +11mdisc,2266,0 +11mcd,2266,0 +cmrecord,2266,0 +cmdisk,2266,0 +cmdisc,2266,0 +cmcd,2266,0 +crackedrecord,2266,0 +crackeddisk,2266,0 +crackeddisc,2266,0 +crackedcd,2266,0 +crackrecord,2266,0 +crackdisk,2266,0 +crackdisc,2266,0 +crackcd,2266,0 +crecord,2266,0 +cdisk,2266,0 +cdisc,2266,0 +ccd,2266,0 record11,2266,0 +disk11,2266,0 +disc11,2266,0 +cd11,2266,0 +11record,2266,0 +11disk,2266,0 +11disc,2266,0 +11cd,2266,0
\ No newline at end of file diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 7707ac09a..a00ea1e7f 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -5,6 +5,7 @@ action=* {0} {1} addedToAccount=\u00a7a{0} has been added to your account. addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} +adventure = adventure alertBroke=broke: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} alertPlaced=placed: @@ -31,10 +32,11 @@ buildAlert=\u00a7cYou are not permitted to build bukkitFormatChanged=Bukkit version format changed. Version not checked. burnMsg=\u00a77You set {0} on fire for {1} seconds. canTalkAgain=\u00a77You can talk again -cantFindGeoIpDB=Can''t find GeoIP database! +cantFindGeoIpDB=Can't find GeoIP database! cantReadGeoIpDB=Failed to read GeoIP database! cantSpawnItem=\u00a7cYou are not allowed to spawn the item {0} chatTypeLocal=[L] +chatTypeAdmin=[A] chatTypeSpy=[Spy] commandFailed=Command {0} failed: commandHelpFailedForPlugin=Error getting help for: {0} @@ -42,7 +44,7 @@ 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 -connectedPlayers=Connected players: +connectedPlayers=Connected players: connectionFailed=Failed to open connection. cooldownWithMessage=\u00a7cCooldown: {0} corruptNodeInConfig=\u00a74Notice: Your configuration file has a corrupt {0} node. @@ -51,6 +53,7 @@ creatingConfigFromTemplate=Creating config from template: {0} creatingEmptyConfig=Creating empty config: {0} creative=creative currency={0}{1} +currentWorld=Current World: {0} day=day days=days defaultBanReason=The Ban Hammer has spoken! @@ -72,6 +75,7 @@ disabledToSpawnMob=Spawning this mob was disabled in the config file. dontMoveMessage=\u00a77Teleportation will commence in {0}. Don''t move. downloadingGeoIp=Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB) duplicatedUserdata=Duplicated userdata: {0} and {1} +durability=\u00a77This tool has \u00a7c{0}\u00a77 uses left enableUnlimited=\u00a77Giving unlimited amount of {0} to {1}. enabled=enabled enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. @@ -84,16 +88,19 @@ errorWithMessage=\u00a7cError: {0} essentialsHelp1=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, go to http://tiny.cc/EssentialsChat essentialsHelp2=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, either type /essentialshelp in game or go to http://tiny.cc/EssentialsChat essentialsReload=\u00a77Essentials Reloaded {0} +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. 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} -false=false +false=\u00a74false\u00a7f feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Renaming file {0} failed flyMode=\u00a77Set fly mode {0} for {1}. +flying=flying foreverAlone=\u00a7cYou have nobody to whom you can reply. freedMemory=Freed {0} MB. gameMode=\u00a77Set game mode {0} for {1}. @@ -108,6 +115,10 @@ geoipJoinFormat=Player {0} comes from {1} godDisabledFor=disabled for {0} godEnabledFor=enabled for {0} godMode=\u00a77God mode {0}. +hatArmor=\u00a7cError, you cannot use this item as a hat! +hatEmpty=\u00a7cYou are not wearing a hat. +hatFail=\u00a7cYou must have something to wear in your hand. +hatPlaced=\u00a7eEnjoy your new hat! haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. @@ -136,8 +147,8 @@ invRestored=Your inventory has been restored. invSee=You see the inventory of {0}. invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. -invalidHome=Home {0} doesn't exist -invalidMob=Invalid mob type.& +invalidHome=Home {0} doesn''t exist +invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. invalidWorld=\u00a7cInvalid world. @@ -161,9 +172,10 @@ jailReleased=\u00a77Player \u00a7e{0}\u00a77 unjailed. jailReleasedPlayerNotify=\u00a77You have been released! jailSentenceExtended=Jail time extend to: {0) jailSet=\u00a77Jail {0} has been set -jumpError=That would hurt your computer''s brain. +jumpError=That would hurt your computer's brain. kickDefault=Kicked from server kickExempt=\u00a7cYou can not kick that person. +kickedAll=\u00a7cKicked all players from server kill=\u00a77Killed {0}. kitError2=\u00a7cThat kit does not exist or is improperly defined. kitError=\u00a7cThere are no valid kits. @@ -222,6 +234,7 @@ noAccessCommand=\u00a7cYou do not have access to that command. noAccessPermission=\u00a7cYou do not have permission to access that {0}. noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cYou do not have permission to destroy that {0}. +noDurability=\u00a7cThis item does not have a durability. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo matching commands. noHomeSet=You have not set a home. @@ -233,7 +246,7 @@ noMotd=\u00a7cThere is no message of the day. noNewMail=\u00a77You have no new mail. noPendingRequest=You do not have a pending request. noPerm=\u00a7cYou do not have the \u00a7f{0}\u00a7c permission. -noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. +noPermToSpawnMob=\u00a7cYou don't have permission to spawn this mob. noPlacePermission=\u00a7cYou do not have permission to place a block near that sign. noPowerTools=You have no power tools assigned. noRules=\u00a7cThere are no rules specified yet. @@ -243,6 +256,7 @@ notAllowedToQuestion=\u00a7cYou are not authorized to use question. notAllowedToShout=\u00a7cYou are not authorized to shout. notEnoughExperience=You do not have enough experience. notEnoughMoney=You do not have sufficient funds. +notFlying=not flying notRecommendedBukkit= * ! * Bukkit version is not the recommended build for Essentials. notSupportedYet=Not supported yet. nothingInHand = \u00a7cYou have nothing in your hand. @@ -256,7 +270,7 @@ orderBalances=Ordering balances of {0} users, please wait ... pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. -pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. +pTimeOthersPermission=\u00a7cYou are not authorized to set other players' time. pTimePlayers=These players have their own time: pTimeReset=Player time has been reset for: \u00a7e{0} pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} @@ -276,7 +290,7 @@ playerNotFound=\u00a7cPlayer not found. playerUnmuted=\u00a77You have been unmuted pong=Pong! possibleWorlds=\u00a77Possible worlds are the numbers 0 through {0}. -powerToolAir=Command can''t be attached to air. +powerToolAir=Command can't be attached to air. powerToolAlreadySet=Command \u00a7c{0}\u00a7f is already assigned to {1}. powerToolAttach=\u00a7c{0}\u00a7f command assigned to {1}. powerToolClearAll=All powertool commands have been cleared. @@ -356,12 +370,13 @@ timeSet=Time set in all worlds. timeSetPermission=\u00a7cYou are not authorized to set the time. timeWorldCurrent=The current time in {0} is \u00a73{1} timeWorldSet=The time was set to {0} in: \u00a7c{1} +tps=Current TPS = {0} tradeCompleted=\u00a77Trade completed. tradeSignEmpty=The trade sign has nothing available for you. tradeSignEmptyOwner=There is nothing to collect from this trade sign. treeFailure=\u00a7cTree generation failure. Try again on grass or dirt. treeSpawned=\u00a77Tree spawned. -true=true +true=\u00a72true\u00a7f typeTpaccept=\u00a77To teleport, type \u00a7c/tpaccept\u00a77. typeTpdeny=\u00a77To deny this request, type \u00a7c/tpdeny\u00a77. typeWorldName=\u00a77You can also type the name of a specific world. @@ -375,6 +390,8 @@ unknownItemName=Unknown item name: {0} unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}. unlimitedItems=Unlimited items: unmutedPlayer=Player {0} unmuted. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. upgradingFilesError=Error while upgrading the files userDoesNotExist=The user {0} does not exist. userIsAway={0} is now AFK @@ -384,6 +401,7 @@ userUsedPortal={0} used an existing exit portal. userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp usingTempFolderForTesting=Using temp folder for testing: +vanished=\u00a7aYou have now been vanished. 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 @@ -400,20 +418,22 @@ weatherStorm=\u00a77You set the weather to storm in {0} weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds weatherSun=\u00a77You set the weather to sun in {0} weatherSunFor=\u00a77You set the weather to sun in {0} for {1} seconds -whoisBanned=\u00a79 - Banned: {0} -whoisExp=\u00a79 - Exp: {0} (Level {1}) -whoisGamemode=\u00a79 - Gamemode: {0} -whoisGeoLocation=\u00a79 - Location: {0} -whoisGod=\u00a79 - God mode: {0} -whoisHealth=\u00a79 - Health: {0}/20 -whoisIPAddress=\u00a79 - IP Address: {0} -whoisIs={0} is {1} -whoisJail=\u00a79 - Jail: {0} -whoisLocation=\u00a79 - Location: ({0}, {1}, {2}, {3}) -whoisMoney=\u00a79 - Money: {0} -whoisOP=\u00a79 - OP: {0} -whoisStatusAvailable=\u00a79 - Status: Available -whoisStatusAway=\u00a79 - Status: \u00a7cAway\u00a7f +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Banned:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Level {1}) +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Gamemode:\u00a7f {0} +whoisGeoLocation=\u00a76 - Location:\u00a7f {0} +whoisGod=\u00a76 - God mode:\u00a7f {0} +whoisHealth=\u00a76 - Health:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP Address:\u00a7f {0} +whoisJail=\u00a76 - Jail:\u00a7f {0} +whoisLocation=\u00a76 - Location:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Money:\u00a7f {0} +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== 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) worthSet=Worth value set @@ -421,3 +441,11 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties new file mode 100644 index 000000000..4b0879747 --- /dev/null +++ b/Essentials/src/messages_cs.properties @@ -0,0 +1,454 @@ +#version: TeamCity +# Single quotes have to be doubled: '' +# Translations start here +# 0.1 version: tomasara413 - Tento preklad neni 100% presny to se opravi v dalsich verzich prekladu +# 0.2 version: optimized by mdojcar (modojcar@seznam.cz) - mirne fixy a trochu jsem preklad vylepsil +# nektere vyrazy jako "Kicknut" jsou v anglickem zneni (zni to mnohem prirozeneji) +# 0.3 tommymortago - Pro upravy kontaktujte na skype: tomasperzl/ Korektura: Sejsel +action=* {0} {1} +addedToAccount=\u00a7a{0} bylo pripsano na tvuj ucet. +addedToOthersAccount=\u00a7a{0} bylo pripsano na {1}\u00a7a ucet. Nova hodnota: {2} +adventure = adventure +alertBroke=zniceno: +alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} v: {3} +alertPlaced=polozeno: +alertUsed=pouzito: +autoAfkKickReason=Byl jsi vyhozen za neaktivitu delsi nez {0} minut. +backAfterDeath=\u00a77Pouzij /back, aby ses vratil na misto sve smrti. +backUsageMsg=\u00a77Vracis se na svou minulou pozici. +backupDisabled=Externi zalohovaci script neni nastaven. +backupFinished=Zaloha dokoncena +backupStarted=Probiha zaloha +balance=\u00a77Ucet: {0} +balanceTop=\u00a77Nejbohatsi hraci ({0}) +banExempt=\u00a7cNemuzes zabanovat tohoto hrace. +banFormat=Banned: {0} +banIpAddress=\u00a77IP Adresa byla zabanovana +bannedIpsFileError=Chyba pri nacitani banned-ips.txt +bannedIpsFileNotFound=Soubor banned-ips.txt nebyl nazen. +bannedPlayersFileError=Chyba pri nacitani banned-players.txt +bannedPlayersFileNotFound=Soubor banned-players.txt nebyl nalezen +bigTreeFailure=\u00a7cProblem pri vytvareni velkeho stromu. Zkuste znovu na trave nebo hline. +bigTreeSuccess= \u00a77Velky strom vytvoren. +blockList=Essentials prenechal nasledujici prikazy jinemu pluginu: +broadcast=[\u00a7cSdeleni\u00a7f]\u00a7a {0} +buildAlert=\u00a7cNemas dovoleno stavet. +bukkitFormatChanged=Format kontroly verze Bukkitu zmenen. Verze nebyla zkontrolovana. +burnMsg=\u00a77Zapalil jsi {0} na dobu {1} sekund. +canTalkAgain=\u00a77Muzes opet mluvit. +cantFindGeoIpDB=Nemohu najit GeoIP databazi! +cantReadGeoIpDB=Nemohu precist GeoIP databazi! +cantSpawnItem=\u00a7cNejsi dovoleny spawnout item: {0} +chatTypeLocal=[L] +chatTypeAdmin=[A] +chatTypeSpy=[Spy] +commandFailed=Prikaz {0} selhal. +commandHelpFailedForPlugin=Chyba pri ziskavani pomoci: {0} +commandNotLoaded=\u00a7cPrikaz {0} je nespravne nacteny. +compassBearing=\u00a77Zmena orientace: {0} ({1} stupnu). +configFileMoveError=Chyba pri presouvani config.yml do slozky se zalohou. +configFileRenameError=Chyba pri pokusu o prejmenovani docasneho souboru na config.yml +connectedPlayers=Pripojeni hraci: +connectionFailed=Pokus o otevreni spojeni selhal. +cooldownWithMessage=\u00a7cOdpocet: {0} +corruptNodeInConfig=\u00a74Pozor: Vas konfiguracni soubor ma chybnou {0} poznamku. +couldNotFindTemplate=Nemohu naleznout sablonu: {0} +creatingConfigFromTemplate=Vytvarim config ze sablony: {0} +creatingEmptyConfig=Vytvarim prazdny config: {0} +creative=creative +currency={0}{1} +currentWorld=Current World: {0} +day=den +days=dny +defaultBanReason=Banovaci kladivo promluvilo! +deleteFileError=Nemohu smazat soubor: {0} +deleteHome=\u00a77Domov {0} byl uspesne odstranen. +deleteJail=\u00a77Jail {0} byl uspesne odstranen. +deleteWarp=\u00a77Warp {0} byl uspesne odstranen. +deniedAccessCommand=Hraci {0} byl zablokovan prikaz. +dependancyDownloaded=[Essentials] Zavislost {0} uspesne stazena. +dependancyException=[Essentials] Nastala chyba pri pokusu o stazeni zavilosti. +dependancyNotFound=[Essentials] Pozadovana zavilost nenalezena, stahuji nyni. +depth=\u00a77Jsi na urovni more. +depthAboveSea=\u00a77Jsi {0} kostek nad urovni more. +depthBelowSea=\u00a77Jsi {0} kostek pod urovni more. +destinationNotSet=Destinace neni nastavena. +disableUnlimited=\u00a77Zablokovano neomezene pokladani {0} hraci {1}. +disabled=zablokovano +disabledToSpawnMob=Spawnuti tohoto moba je zakazno v configuracnim souboru. +dontMoveMessage=\u00a77Teleport bude zahajen za {0}. Nehybej se. +downloadingGeoIp=Stahuji GeoIP databazi ... muze to chvilku trvat (staty: 0.6 MB, mesta: 20MB) +duplicatedUserdata=Duplikovane data hrace: {0} and {1} +durability=\u00a77This tool has \u00a7c{0}\u00a77 uses left +enableUnlimited=\u00a77Davam neomezene mnozstvi {0} hraci {1}. +enabled=povoleno +enchantmentApplied = \u00a77Enchant {0} byl aplikovan na tvuj nastroj v ruce. +enchantmentNotFound = \u00a7cTento enchant neexistuje +enchantmentPerm = \u00a7cNemas opravneni na enchant: {0} +enchantmentRemoved = \u00a77Enchant {0} byl odstranen z tveho nastroje v ruce. +enchantments = \u00a77Enchantmenty: {0} +errorCallingCommand=Chyba pri volani prikazu /{0} +errorWithMessage=\u00a7cChyba: {0} +essentialsHelp1=Soubor je poskozen a Essentials jej nemuze otevrit. Essentials jsou zablokovany. Pokud nemuzete soubor opravit sami, navstivte http://tiny.cc/EssentialsChat +essentialsHelp2=Soubor je poskozen a Essentials jej nemuze otevrit. Essentials jsou zablokovany. Pokud nemuzete soubor opravit sami, pak napiste /essentialshelp ve hre nebo navstivte http://tiny.cc/EssentialsChat +essentialsReload=\u00a77Essentials znovu nacteny. {0} +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +extinguish=\u00a77Uhasil ses. +extinguishOthers=\u00a77Uhasil jsi hrace {0}. +failedToCloseConfig=Chyba pri uzavreni configu {0} +failedToCreateConfig=Chyba pri vytvoreni configu {0} +failedToWriteConfig=Chyba pri zapisovani do configu {0} +false=\u00a74false\u00a7f +feed=\u00a77Nasytil jsi se. +feedOther=\u00a77Nasytil jsi hrace {0}. +fileRenameError=Prejmenovani souboru {0} selhalo. +flyMode=\u00a77Povolil jsi letani hraci {0} na {1}. +flying=flying +foreverAlone=\u00a7cNemas komu odepsat. +freedMemory=Uvolneno {0} MB. +gameMode=\u00a77Nastavil jsi herni mod z {0} na {1}. +gcchunks= chunky, +gcentities= entity +gcfree=Volna pamet: {0} MB +gcmax=Dostupna pamet: {0} MB +gctotal=Vyuzita pamet: {0} MB +geoIpUrlEmpty=Odkaz na stazeni GeoIP je prazdny. +geoIpUrlInvalid=Odkaz na stazeni GeoIP je chybny. +geoipJoinFormat=Hrac {0} prichazi z {1} +godDisabledFor=zakazan pro {0} +godEnabledFor=povolen pro {0} +godMode=\u00a77God mode {0}. +hatArmor=\u00a7cError, you cannot use this item as a hat! +hatEmpty=\u00a7cYou are not wearing a hat. +hatFail=\u00a7cYou must have something to wear in your hand. +hatPlaced=\u00a7eEnjoy your new hat! +hatRemoved=\u00a7eYour hat has been removed. +haveBeenReleased=\u00a77Byl jsi uvolnen +heal=\u00a77Byl jsi uzdraven. +healOther=\u00a77Uzdravil jsi hrace {0}. +helpConsole=Pokud chces videt napovedu z konzole, napis ?. +helpFrom=\u00a77Prikazy od{0}: +helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Prikazy odpovidajici "{0}": +helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} +helpPages=Strana \u00a7c{0}\u00a7f z \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Napoveda pluginu: /help {1} +holeInFloor=Dira v podlaze +homeSet=\u00a77Domov nastaven. +homeSetToBed=\u00a77Tvuj domov je nastaven na tuto postel. +homes=Domovy: {0} +hour=hodina +hours=hodiny +ignorePlayer=Odted jsi zacal ignorovat hrace {0}. +illegalDate=Nespravny format data. +infoChapter=Vyberte kapitolu: +infoChapterPages=Kapitola {0}, strana \u00a7c{1}\u00a7f z \u00a7c{2}\u00a7f: +infoFileDoesNotExist=Soubor info.txt neexistuje. Vytvarim novy. +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Strana \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- +infoUnknownChapter=Neznama kapitola. +invBigger=Inventar druheho hrace je vetsi nez tvuj. +invRestored=Tvuj inventar byl obnoven. +invSee=Nyni mas inventar hrace {0}. +invSeeHelp=Pouzij znovu /invsee aby jsi mel zpatky svuj inventar. +invalidCharge=\u00a7cNeplatny poplatek. +invalidHome=Domov {0} neexistuje. +invalidMob=Nespravny typ moba. +invalidServer=Nespravny server! +invalidSignLine=Radek {0} je chybne vyplnen. +invalidWorld=\u00a7cNespravny svet! +inventoryCleared=\u00a77Inventar smazan. +inventoryClearedOthers=\u00a77Inventar hrace \u00a7c{0}\u00a77 vymazan. +is=je +itemCannotBeSold=Tento item nelze prodat serveru. +itemMustBeStacked=Itemy musi byt vymeneny ve stacku. +itemNotEnough1=\u00a7cNemas dostatek tohoto itemu, aby jsi jej mohl prodat. +itemNotEnough2=\u00a77Pokud jsi chtel prodat vsechny itemy tohoto typu, pouzij /sell nazevitemu +itemNotEnough3=\u00a77/sell nazevnitemu -1 proda vse ale pouze jeden item atd. +itemSellAir=Vazne jsi se pokusil prodat Vzduch? Vezmi si neco do ruky. +itemSold=\u00a77Prodal za \u00a7c{0} \u00a77({1} {2} za cenu {3} kus) +itemSoldConsole={0} Prodal {1} za \u00a77{2} \u00a77({3} za cenu {4} kus) +itemSpawn=\u00a77Davam {0} {1} +itemsCsvNotLoaded=Nelze nacist soubor items.csv. +jailAlreadyIncarcerated=\u00a7cTento hrace ja jiz uveznen: {0} +jailMessage=\u00a7cPorusil jsi pravidla, ted si to odsedis! +jailNotExist=Toto vezeni neexistuje. +jailReleased=\u00a77Hrac \u00a7e{0}\u00a77 byl propusten na svobodu. +jailReleasedPlayerNotify=\u00a77Byl jsi propusten na svobodu! +jailSentenceExtended=Cas ve vezeni prodlouzen na: {0) +jailSet=\u00a77Vezeni {0} bylo vytvoreno. +jumpError=Tohle by tvuj procesor nemusel rozdychat. +kickDefault=Vyhozen ze serveru +kickExempt=\u00a7cNemuzes vyhodit tuhle osobu. +kickedAll=\u00a7cKicked all players from server +kill=\u00a77Zabit {0}. +kitError2=\u00a7cTento kit neexistuje, nebo je chybne definovan. +kitError=\u00a7cNejsou zadne validni kity. +kitErrorHelp=\u00a7cPravdepodobne item nema vyplnene mnozstvi v configu? +kitGive=\u00a77Davam kit {0}. +kitInvFull=\u00a7cMel jsi plny inventar, obsah kitu je na zemi. +kitTimed=\u00a7cNemuzes pouzit tento kit po dalsich {0}. +kits=\u00a77Kity: {0} +lightningSmited=\u00a77Byl jsi zasazen bleskem. +lightningUse=\u00a77Zasadil jsi bleskem hrace {0} +listAfkTag = \u00a77[AFK]\u00a7f +listAmount = \u00a79Je tu \u00a7c{0}\u00a79 z maxima \u00a7c{1}\u00a79 hracu online. +listAmountHidden = \u00a79Je tu \u00a7c{0}\u00a77/{1}\u00a79 z maxima \u00a7c{2}\u00a79 hracu online. +listGroupTag={0}\u00a7f: +listHiddenTag = \u00a77[HIDDEN]\u00a7f +loadWarpError=Chyba pri nacitani warpu: {0} +localFormat=Jazyk: <{0}> {1} +mailClear=\u00a7cPokud chces vymazat mail, napis /mail clear. +mailCleared=\u00a77Mail vymazan! +mailSent=\u00a77Mail odeslan! +markMailAsRead=\u00a7cPokud chces mail oznacit jako precteny, napis /mail clear +markedAsAway=\u00a77Jsi oznacen jako "Pryc". +markedAsNotAway=\u00a77Jiz nejsi oznacen jako "Pryc". +maxHomes=Nemuzes si nastavit vice nez {0} domovu. +mayNotJail=\u00a7cNesmis uveznit tuto postavu +me=ja +minute=minuta +minutes=minuty +missingItems=Nemas {0}x {1}. +missingPrefixSuffix=Chybi prefix nebo suffix pro {0} +mobSpawnError=Chyba pri pokusu o zmenu mob spawneru. +mobSpawnLimit=Pocet mobu limitovan serverem. +mobSpawnTarget=Musis se divat na spawner. +mobsAvailable=\u00a77Mobove: {0} +moneyRecievedFrom=\u00a7a{0} jsi obdrzel od hrace {1} +moneySentTo=\u00a7a{0} bylo odeslano hraci: {1} +moneyTaken={0} bylo odebrano z tveho uctu. +month=mesic +months=mesice +moreThanZero=Mnozstvi musi byt vetsi nez 0. +msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cTohoto hrace nemuzes umlcet. +mutedPlayer=Hrac {0} byl umlcen. +mutedPlayerFor=Hrac {0} umlcen za {1}. +mutedUserSpeaks={0} se pokusil promluvit, ale je umlcen. +nearbyPlayers=Hraci v okoli: {0} +negativeBalanceError=Hrac nemuze mit zapornou hodnotu uctu. +nickChanged=Nickname zmenen. +nickDisplayName=\u00a77Musis nejdrive povolit change-displayname v Essentials configu. +nickInUse=\u00a7cTento nick jiz nekdo ma. +nickNamesAlpha=\u00a7cNick musi byt alfanumericky. +nickNoMore=\u00a77Uz nemas zadny nick. +nickOthersPermission=\u00a7cNemas opravneni menit ostatnim nick. +nickSet=\u00a77Nyni mas nickname: \u00a7c{0} +noAccessCommand=\u00a7cNemas povoleni na tento prikaz. +noAccessPermission=\u00a7cNemas povoleni k tomuto {0}. +noBreakBedrock=Nemas opravneni nicit bedrock. +noDestroyPermission=\u00a7cNemas povoleni nicit ten {0}. +noDurability=\u00a7cThis item does not have a durability. +noGodWorldWarning=\u00a7cVarovani! God-mode je v tomto svete zakazan. +noHelpFound=\u00a7cZadne shodujici prikazy. +noHomeSet=Nemas nastaveny zadny domov. +noHomeSetPlayer=Hrac nema nastaveny zadny domov. +noKitPermission=\u00a7cPotrebujes \u00a7c{0}\u00a7c permission, aby jsi mohl pouzit tento kit. +noKits=\u00a77Nejsou zadne dostupne kity. +noMail=Nemas zadny mail. +noMotd=\u00a7cNeni zadna zprava dne. +noNewMail=\u00a77Nemas zadny novy mail. +noPendingRequest=Nemas zadne neuzavrene zadosti. +noPerm=\u00a7cNemas \u00a7f{0}\u00a7c permici. +noPermToSpawnMob=\u00a7cNemas povoleni k spawnovani mobu. +noPlacePermission=\u00a7cNemas povoleni pokladat nebo nicit cokoliv blizko teto cedule. +noPowerTools=Nemas zadny mocny nastroj. +noRules=\u00a7cNejsou nastaveny zadne pravidla. +noWarpsDefined=Nejsou nastaveny zadne warpy. +none=zadny +notAllowedToQuestion=\u00a7cNejsi opravnen pouzit otazku. +notAllowedToShout=\u00a7cNejsi opravnen pouzit kriceni. +notEnoughExperience=Nemas dostatek zkusenosti. +notEnoughMoney=Nemas dostatecny financni obnos. +notFlying=not flying +notRecommendedBukkit=* ! * Verze bukkitu neni doporucena pro Essentials. +notSupportedYet=Jeste neni podporovano. +nothingInHand = \u00a7cNedrzis nic v ruce. +now=nyni +nuke=Prsi na tebe smrt :) +numberRequired=Hlupaku, musis vyplnit cislo. +onlyDayNight=/time podporuje pouze day/night. +onlyPlayers=Pouze hraci ve hre mohou pouzit: {0}. +onlySunStorm=/weather podporuje pouze sun/storm. +orderBalances=Usporadavam bohatstvi {0} hracu, prosim vydrz ... +pTimeCurrent=\u00a7eCas hrace u00a7f je {1}. //??? +pTimeCurrentFixed=\u00a7eCas hrace {0} u00a7f je nastaven na {1}. +pTimeNormal=\u00a7eCas hrace {0}\u00a7f je normalni a souhlasi s casem serveru. +pTimeOthersPermission=\u00a7cNejsi opravnen menit cizim hracum cas. +pTimePlayers=Tihle hraci maji nastaveny svuj cas: +pTimeReset=Cas hrace byl obnoven za: \u00a7e{0} +pTimeSet=Cas hrace je nastaven na \u00a73{0}\u00a7f za: \u00a7e{1} +pTimeSetFixed=Cas hrace je fixne nastaven na \u00a73{0}\u00a7f za: \u00a7e{1} +parseError=Chyba pri parsovani {0} na radku {1} +pendingTeleportCancelled=\u00a7cNevyresena zadost o teleportaci byla zrusena. +permissionsError=Chybi Permissions/GroupManager; prefixy/suffixy v chatu budou zablokovany. +playerBanned=\u00a7cAdmin {0} zabanoval {1} za {2} +playerInJail=\u00a7cHrac je jiz uveznen {0}. +playerJailed=\u00a77Hrac {0} byl uveznen. +playerJailedFor= \u00a77Hrac {0} uveznen za {1}. +playerKicked=\u00a7cAdmin {0} vyhodil {1} za {2} +playerMuted=\u00a77Byl jsi umlcen. +playerMutedFor=\u00a77Byl jsi umlcen za {0} +playerNeverOnServer=\u00a7cHrac {0} nebyl nikdy na serveru. +playerNotFound=\u00a7cHrac nenalezen. +playerUnmuted=\u00a77Byl jsi odmlcen. +pong=Pong! +possibleWorlds=\u00a77Mozne svety jsou cisla 0 az {0}. +powerToolAir=Prikaz nemuze byt spojen se vzduchem. +powerToolAlreadySet=Prikaz \u00a7c{0}\u00a7f je jiz spojen s {1}. +powerToolAttach=\u00a7c{0}\u00a7f prikaz pripsan k {1}. +powerToolClearAll=Vsechny mocne nastroje byli smazany. +powerToolList=Hrac {1} ma tyto prikazy: \u00a7c{0}\u00a7f. +powerToolListEmpty={0} nema pripsany zadne prikazy. +powerToolNoSuchCommandAssigned=Prikaz \u00a7c{0}\u00a7f nebyl pripsan k {1}. +powerToolRemove=Prikaz \u00a7c{0}\u00a7f odstranen z {1}. +powerToolRemoveAll=Vsechny prikazy zruseny od {0}. +powerToolsDisabled=Vsechny tve mocne nastroje byli zablokovany. +powerToolsEnabled=Vsechny tve mocne nastroje byli povoleny. +protectionOwner=\u00a76[EssentialsProtect] Majitel ochrany: {0} +questionFormat=\u00a77[Otazka]\u00a7f {0} +readNextPage=Napis /{0} {1} pro precteni dalsi stranky. +reloadAllPlugins=\u00a77Znovu nacteny vsechny pluginy. +removed=\u00a77Odstraneno {0} entitit. +repair=Uspesne jsi opravil svuj nastroj: \u00a7e{0}. +repairAlreadyFixed=\u00a77Tento item nepotrebuje opravu. +repairEnchanted=\u00a77Nemas opravneni opravovat enchantovane itemy. +repairInvalidType=\u00a7cTento item nemuze byt opraven. +repairNone=Nemas zadne itemy, ktere potrebuji opravit. +requestAccepted=\u00a77Zadost o teleport prijata. +requestAcceptedFrom=\u00a77{0} prijal tvou zadost o teleport. +requestDenied=\u00a77Zadost o teleport zamitnuta. +requestDeniedFrom=\u00a77{0} odmitl tvou zadost o teleport. +requestSent=\u00a77Zadost odeslana hraci {0}\u00a77. +requestTimedOut=\u00a7cZadost o teleportaci vyprsela. +requiredBukkit= * ! * Potrebujete minimalne verzi {0} Bukkitu, stahnete si ji z http://dl.bukkit.org/downloads/craftbukkit/ +returnPlayerToJailError=Nastala chyba pri pokusu navraceni hrace {0} do vezeni: {1} +second=sekunda +seconds=sekundy +seenOffline=Hrac {0} je offline od {1} +seenOnline=Hrac {0} je online od {1} +serverFull=Server je plny +serverTotal=Maximum serveru: {0} +setSpawner=Zmenil jsi spawner na: {0} +sheepMalformedColor=Deformovana barva. +shoutFormat=\u00a77[Shout]\u00a7f {0} +signFormatFail=\u00a74[{0}] +signFormatSuccess=\u00a71[{0}] +signFormatTemplate=[{0}] +signProtectInvalidLocation=\u00a74Nemas opravneni vytvaret zde cedule. +similarWarpExist=Warp s podobnym nebo stejnym jmenem jiz existuje. +slimeMalformedSize=Zdeformovana velikost. +soloMob=Tento mob ma rad, kdyz je sam. +spawnSet=\u00a77Spawn-lokace nastavena pro skupinu: {0}. +spawned=spawnut +sudoExempt=Nemuzes ovladat tohoto hrace +sudoRun=Nutis hrace {0} k behu: /{1} {2} +suicideMessage=\u00a77Sbohem kruty svete... +suicideSuccess= \u00a77{0} si vzal svuj zivot +survival=survival +takenFromAccount=\u00a7c{0} bylo odecteno z tveho uctu. +takenFromOthersAccount=\u00a7c{0} bylo odebrano z {1}\u00a7c uctu. Nova hodnota: {2} +teleportAAll=\u00a77Zadost o teleportaci odeslana vsem hracum... +teleportAll=\u00a77Teleportuji v\u00c5\u00a1echny hrace... +teleportAtoB=\u00a77{0}\u00a77 vas teleportoval k {1}\u00a77. +teleportDisabled={0} mas teleportaci zablokovanou. +teleportHereRequest=\u00a7c{0}\u00a7c vas pozadal aby jste se warpnul k nemu. +teleportNewPlayerError=Teleportace noveho hrace selhala +teleportRequest=\u00a7c{0}\u00a7c se chce teleportovat k tobe. +teleportRequestTimeoutInfo=\u00a77Tato zadost vyprsi za {0} sekund. +teleportTop=\u00a77Teleportuji na vrch. +teleportationCommencing=\u00a77Teleportace zahajena... +teleportationDisabled=\u00a77Teleportace zakazana. +teleportationEnabled=\u00a77Teleportace povolena. +teleporting=\u00a77Teleportuji... +teleportingPortal=\u00a77Teleportuji pres portal. +tempBanned=Docasne zabanovany na dobu {0} +tempbanExempt=\u00a77Nemel by jsi docasne zabanovat tohoto hrace. +thunder= Nastavil jsi {0} bouri ve tvem svete. +thunderDuration=Nastavil jsi {0} bouri ve svete po {1} sekund. +timeBeforeHeal=Potrebny cas pro dalsi uzdraveni: {0} +timeBeforeTeleport=Potrebny cas pro dalsi teleport: {0} +timeFormat=\u00a73{0}\u00a7f nebo \u00a73{1}\u00a7f nebo \u00a73{2}\u00a7f +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=Cas nastaven ve vsech svetech. +timeSetPermission=\u00a7cNejsi autorizovany ke zmene casu. +timeWorldCurrent=Ve svete {0} je prave \u00a73{1} +timeWorldSet=Cas byl nastaven na {0} ve: \u00a7c{1} +tps=Current TPS = {0} +tradeCompleted=\u00a77Vymena kompletni. +tradeSignEmpty=Tato cedule jiz nema dostupny material na vymenu. +tradeSignEmptyOwner=Na teto ceduli dosel material. +treeFailure=\u00a7cNepodarilo se vytvorit strom. Zkus to znovu na trave nebo hline. +treeSpawned=\u00a77Strom vytvoren. +true=\u00a72true\u00a7f +typeTpaccept=\u00a77Pro prijmuti zadosti napis \u00a7c/tpaccept\u00a77. +typeTpdeny=\u00a77Pokud chces odmitnout zadost napis \u00a7c/tpdeny\u00a77. +typeWorldName=\u00a77Muzes take napsat specificky nazev sveta. +unableToSpawnMob=Nemozne spawnout moba. +unbannedIP=Unbanovana IP adresa. +unbannedPlayer=Hrac odbanovan. +unignorePlayer=Prestal jsi ignorovat hrace {0}. +unknownItemId=Nezname ID itemu: {0} +unknownItemInList=Neznamy item {0} v {1} seznamu. +unknownItemName=Neznamy nazev itemu: {0} +unlimitedItemPermission=\u00a7cNemas opravneni pro neomezeny item: {0}. +unlimitedItems=Neomezene itemy: +unmutedPlayer=Hrac {0} byl umlcen. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +upgradingFilesError=Chyba pri updatovani souboru. +userDoesNotExist=Uzivatel {0} neexistuje. +userIsAway={0} je AFK. +userIsNotAway={0} se vratil. +userJailed=\u00a77Byl jsi uveznen. +userUsedPortal={0} pouzil portal pro vychod. +userdataMoveBackError=Chyba pri pokusu o presun userdata/{0}.tmp do userdata/{1} +userdataMoveError=Chyba pri pokusu o presun userdata/{0} do userdata/{1}.tmp +usingTempFolderForTesting=Pouzivam docasnou slozku pro testovani: +vanished=\u00a7aYou have now been vanished. +versionMismatch=Chyba verzi! Prosim updatuj {0} na stejnou verzi. +versionMismatchAll=Chyba verzi! Prosim, updatuj vsechny Essentials .jar na stejnou verzi. +voiceSilenced=\u00a77Byl jsi ztisen. +warpDeleteError=Vyskytl se problem pri mazani warpu. +warpListPermission=\u00a7cNemas opravneni listovat warpami. +warpNotExist=Tento warp neexistuje. +warpOverwrite=\u00a7cNemuzes prepsat tento warp. +warpSet=\u00a77Warp {0} vytvoren. +warpUsePermission=\u00a7cNemas opravneni pouzit tento warp. +warpingTo=\u00a77Warpuji te do {0}. +warps=Warpy: {0} +warpsCount=\u00a77Mame zde {0} warpu. Strana {1} z {2}. +weatherStorm=\u00a77Nastavil jsi bourku v {0} +weatherStormFor=\u00a77Nastavil jsi bourku v {0} na {1} sekund. +weatherSun=\u00a77Nastavil jsi slunecne pocasi v {0} +weatherSunFor=\u00a77Nastavil jsi slunecne pocasi v {0} na {1} sekund +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Zabanovan:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Uroven {1}) +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Herni mod:\u00a7f {0} +whoisGeoLocation=\u00a76 - Puvod:\u00a7f {0} +whoisGod=\u00a76 - God mode:\u00a7f {0} +whoisHealth=\u00a76 - Zdravi:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP Adresa:\u00a7f {0} +whoisJail=\u00a76 - Jail:\u00a7f {0} +whoisLocation=\u00a76 - Pozice:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Penize:\u00a7f {0} +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== +worth=\u00a77Stack {0} ceny \u00a7c{1}\u00a77 ({2} kus(u) za {3} kus) +worthMeta=\u00a77Stack {0} s metadaty {1} ceny \u00a7c{2}\u00a77 ({3} kus(u) za {4} kus) +worthSet=Hodnota ceny nastavena +year=rok +years=roky +youAreHealed=\u00a77Byl jsi uzdraven. +youHaveNewMail=\u00a7cMas {0} zprav!\u00a7f Napis \u00a77/mail read\u00a7f aby jsi si precetl sve zpravy. +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index e06985430..7a23abb8a 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -5,6 +5,7 @@ action=* {0} {1} addedToAccount=\u00a7a{0} er blevet tilf\u00f8jet til din konto. addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} +adventure = adventure alertBroke=\u00f8delagde: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3} alertPlaced=placerede: @@ -35,6 +36,7 @@ cantFindGeoIpDB=Kan ikke finde GeoIP database! cantReadGeoIpDB=Fejl ved afl\u00e6sning af GeoIP database! cantSpawnItem=\u00a7cDu har ikke tilladelse til at skabe tingen.{0} chatTypeLocal=[L] +chatTypeAdmin=[A] chatTypeSpy=[Spy] commandFailed=Kommandoen {0} fejlede: commandHelpFailedForPlugin=Fejl ved hentning af hj\u00e6lp til: {0} @@ -42,7 +44,7 @@ commandNotLoaded=\u00a7cKommando {0} er ikke indl\u00e6st korrekt. compassBearing=\u00a77B\u00e6rer: {0} ({1} grader). (Oversat korrekt?) configFileMoveError=Kunne ikke flytte config.yml til backup placering. configFileRenameError=Kunne ikke omd\u00f8be temp fil til config.yml -connectedPlayers=Tilsluttede spillere: +connectedPlayers=Tilsluttede spillere: connectionFailed=Kunne ikke \u00e5bne forbindelse. cooldownWithMessage=\u00a7cCooldown: {0} corruptNodeInConfig=\u00a74Notits: Din konfigurationsfil har en korrupt {0} linje. @@ -51,6 +53,7 @@ creatingConfigFromTemplate=Opretter config fra skabelon: {0} creatingEmptyConfig=Opretter tom config: {0} creative=creative currency={0}{1} +currentWorld=Current World: {0} day=dag days=dage defaultBanReason=Banhammeren har talt! @@ -72,6 +75,7 @@ disabledToSpawnMob=Skabelse af denne mob er deaktiveret i configfilen. dontMoveMessage=\u00a77Teleportering vil begynde om {0}. Bev\u00e6g dig ikke. downloadingGeoIp=Downloader GeoIP database... det her kan tage et stykke tid (land: 0.6 MB, by: 27MB) duplicatedUserdata=Duplikerede userdata: {0} og {1} +durability=\u00a77This tool has \u00a7c{0}\u00a77 uses left enableUnlimited=\u00a77Giver ubegr\u00e6nset m\u00e6ngde af {0} til {1}. enabled=aktiveret enchantmentApplied = \u00a77Enchantment {0} er blevet tilf\u00c3\u00b8jet til tingen i din h\u00c3\u00a5nd. @@ -84,16 +88,19 @@ errorWithMessage=\u00a7cFejl: {0} essentialsHelp1=Denne fil er \u00c3\u00b8delagt og Essentials kan ikke \u00c3\u00a5bne den. Essentials er nu deaktiveret. Kan du ikke ordne denne fil selv, kan du f\u00c3\u00a5 hj\u00c3\u00a6lp p\u00c3\u00a5 http://tiny.cc/EssentialsChat essentialsHelp2=Filen er \u00c3\u00b8delagt og Essentials kan ikke \u00c3\u00a5bne den. Essentials er nu deaktiveret. Kan du ikke ordne denne fil selv, skriv enten /essentialshelp ingame eller f\u00c3\u00a5 hj\u00c3\u00a6lp p\u00c3\u00a5 http://tiny.cc/EssentialsChat essentialsReload=\u00a77Essentials Genindl\u00e6st {0}. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. extinguish=\u00a77Du slukkede ilden i dig selv. extinguishOthers=\u00a77Du slukkede ilden i {0}. failedToCloseConfig=Fejlede i at lukke config {0} failedToCreateConfig=Fejlede i oprettelse af config {0} failedToWriteConfig=Fejlede i at skrive til config {0} -false=false +false=\u00a74false\u00a7f feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Omd\u00c3\u00b8bning af fil {0} fejlede. flyMode=\u00a77Set fly mode {0} for {1}. +flying=flying foreverAlone=\u00a7cDu har ingen til hvem du kan svare. freedMemory=Frigjorde {0} MB. gameMode=\u00a77Satte game mode {0} for {1}. @@ -108,6 +115,10 @@ geoipJoinFormat=Spilleren {0} kommer fra {1} godDisabledFor=deaktiveret for {0} godEnabledFor=aktiveret for {0} godMode=\u00a77Gud mode {0}. +hatArmor=\u00a7cError, you cannot use this item as a hat! +hatEmpty=\u00a7cYou are not wearing a hat. +hatFail=\u00a7cYou must have something to wear in your hand. +hatPlaced=\u00a7eEnjoy your new hat! haveBeenReleased=\u00a77Du er blevet l\u00f8sladt heal=\u00a77Du er blevet healed. healOther=\u00a77Healed {0}. @@ -164,6 +175,7 @@ jailSet=\u00a77F\u00e6ngsel {0} er blevet sat. jumpError=Dette vil skade din computer''s hjerne. kickDefault=Kicked fra serveren. kickExempt=\u00a77Du kan ikke kicke denne spiller. +kickedAll=\u00a7cKicked all players from server kill=\u00a77dr\u00e6bte {0}. kitError2=\u00a7cDette kit eksisterer ikke eller er forkert defineret. kitError=\u00a7cDer er ikke nogen gyldige kits. @@ -222,6 +234,7 @@ noAccessCommand=\u00a7cDu har ikke adgang til denne kommando. noAccessPermission=\u00a7cDu har ikke tilladelse til at f\u00e5 adgang til {0}. noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cDu har ikke tilladelse til at \u00f8del\u00e6gge {0}. +noDurability=\u00a7cThis item does not have a durability. noGodWorldWarning=\u00a7cAdvarsel! God mode er sl\u00c3\u00a5et fra i denne verden. noHelpFound=\u00a7cIngen matchende kommandoer. noHomeSet=Du har sat et nyt hjem. @@ -243,6 +256,7 @@ notAllowedToQuestion=\u00a7cDu har ikke tilladelse til at bruge sp\u00f8rgsm\u00 notAllowedToShout=\u00a7cDu har ikke tilladelse til at r\u00e5be. notEnoughExperience=You do not have enough experience. notEnoughMoney=Du har ikke tilstr\u00e6kkeligt med penge. +notFlying=not flying notRecommendedBukkit=* ! * Bukkit version er ikke den anbefalede build til Essentials. notSupportedYet=Ikke underst\u00f8ttet endnu. nothingInHand = \u00a7cDu har intet i din h\u00c3\u00a5nd. @@ -356,12 +370,13 @@ timeSet=Tid \u00c3\u00a6ndret i alle verdener. timeSetPermission=\u00a7cDu har ikke tilladelse til at \u00c3\u00a6ndre tiden. timeWorldCurrent=Tiden p\u00c3\u00a5 nuv\u00c3\u00a6rende tidspunkt i {0} er \u00a73{1} timeWorldSet=Tiden blev \u00c3\u00a6ndret til {0} i: \u00a7c{1} +tps=Current TPS = {0} tradeCompleted=\u00a77Handel gennemf\u00f8rt. tradeSignEmpty=Handelsskiltet har udsolgt! tradeSignEmptyOwner=Der er intet at hente ved dette handelsskilt. treeFailure=\u00a7cTr\u00e6 genereringsfejl. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord. treeSpawned=\u00a77Tr\u00e6 spawned. -true=true +true=\u00a72true\u00a7f typeTpaccept=\u00a77For at teleportere, skriv \u00a7c/tpaccept\u00a77. typeTpdeny=\u00a77For at n\u00e6gte denne anmodning om teleport, skriv \u00a7c/tpdeny\u00a77. typeWorldName=\u00a77Du kan ogs\u00e5 skrive navnet p\u00e5 en specifik verden. @@ -375,6 +390,8 @@ unknownItemName=Ukendt ting navn: {0} unlimitedItemPermission=\u00a7cIngen tilladelse til ubegr\u00e6nset ting {0}. unlimitedItems=Ubegr\u00c3\u00a6nsede ting: unmutedPlayer=Spilleren {0} unmuted. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. upgradingFilesError=Fejl under opgradering af filerne. userDoesNotExist=Brugeren {0} eksisterer ikke. userIsAway={0} er nu AFK. Skub ham i havet eller bur ham inde! @@ -384,6 +401,7 @@ userUsedPortal={0} brugte en eksisterende udgangsportal. userdataMoveBackError=Kunne ikke flytte userdata/{0}.tmp til userdata/{1} userdataMoveError=Kunne ikke flytte userdata/{0} til userdata/{1}.tmp usingTempFolderForTesting=Bruger temp-mappe til testing: +vanished=\u00a7aYou have now been vanished. versionMismatch=Versioner matcher ikke! Opdater venligst {0} til den nyeste version. versionMismatchAll=Versioner matcher ikke! Opdater venligst alle Essentials jar-filer til samme version. voiceSilenced=\u00a77Din stemme er blevet gjort stille. @@ -400,20 +418,22 @@ weatherStorm=\u00a77Du har sat vejret til ''storm'' i {0} weatherStormFor=\u00a77Du har sat vejret til ''storm'' i {0} i {1} sekunder weatherSun=\u00a77Du har sat vejret til ''sol'' i {0} weatherSunFor=\u00a77Du har sat vejret til ''sol'' i {0} i {1} sekunder -whoisBanned=\u00a79 - Banned: {0} -whoisExp=\u00a79 - Exp: {0} (Level {1}) -whoisGamemode=\u00a79 - Gamemode: {0} -whoisGeoLocation=\u00a79 - Placering: {0} -whoisGod=\u00a79 - God mode: {0} -whoisHealth=\u00a79 - Health: {0}/20 -whoisIPAddress=\u00a79 - IP-Adresse: {0} -whoisIs={0} er {1} -whoisJail=\u00a79 - Jail: {0} -whoisLocation=\u00a79 - Placering: ({0}, {1}, {2}, {3}) -whoisMoney=\u00a79 - Saldo: {0} -whoisOP=\u00a79 - OP: {0} -whoisStatusAvailable=\u00a79 - Status: Tilg\u00e6ngelig -whoisStatusAway=\u00a79 - Status: \u00a7cAFK\u00a7f +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Banned:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Level {1}) +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Gamemode:\u00a7f {0} +whoisGeoLocation=\u00a76 - Placering:\u00a7f {0} +whoisGod=\u00a76 - God mode:\u00a7f {0} +whoisHealth=\u00a76 - Health:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP-Adresse:\u00a7f {0} +whoisJail=\u00a76 - Jail:\u00a7f {0} +whoisLocation=\u00a76 - Placering:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Saldo:\u00a7f {0} +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== worth=\u00a77Stack af {0} er v\u00e6rd \u00a7c{1}\u00a77 ({2} ting for {3} pr. stk.) worthMeta=\u00a77Stack af {0} med metadata af {1} er v\u00e6rd \u00a7c{2}\u00a77 ({3} ting for {4} pr. stk.) worthSet=V\u00e6rdi \u00c3\u00a6ndret. @@ -421,3 +441,11 @@ year=\u00e5r years=\u00e5r youAreHealed=\u00a77Du er blevet healed. Halleluja! youHaveNewMail=\u00a7cDu har {0} flaskeposter!\u00a7f Type \u00a77/mail read for at se din flaskepost. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 4e4f7e78d..8048bb599 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -5,6 +5,7 @@ action=* {0} {1} addedToAccount=\u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt. addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} +adventure = adventure alertBroke=zerst\u00f6rt: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3} alertPlaced=platziert: @@ -35,6 +36,7 @@ cantFindGeoIpDB=Kann GeoIP-Datenbank nicht finden! cantReadGeoIpDB=Fehler beim Einlesen der GeoIP-Datenbank! cantSpawnItem=\u00a7cDu darfst {0} nicht erzeugen. chatTypeLocal=[L] +chatTypeAdmin=[A] chatTypeSpy=[Spy] commandFailed=Befehl {0} scheiterte: commandHelpFailedForPlugin=Fehler beim Abrufen der Hilfe f\u00fcr: {0} @@ -42,7 +44,7 @@ commandNotLoaded=\u00a7cBefehl {0} ist nicht richtig geladen. compassBearing=\u00a77Peilung: {0} ({1} Grad). configFileMoveError=Verschieben von config.yml in den Sicherheitskopien-Ordner gescheitert. configFileRenameError=Verschieben einer tempor\u00e4ren Datei nach config.yml gescheitert. -connectedPlayers=Verbundene Spieler: +connectedPlayers=Verbundene Spieler: connectionFailed=Fehler beim Verbindungsaufbau. cooldownWithMessage=\u00a7cBeschr\u00e4nkung: {0} corruptNodeInConfig=\u00a74Hinweis: Deine Konfigurationsdatei hat einen ung\u00fcltigen Knoten {0}. @@ -51,6 +53,7 @@ creatingConfigFromTemplate=Erstelle Konfiguration aus Vorlage: {0} creatingEmptyConfig=Erstelle leere Konfiguration: {0} creative=creative currency={0}{1} +currentWorld=Current World: {0} day=Tag days=Tage defaultBanReason=Der Bann-Hammer hat gesprochen! @@ -72,6 +75,7 @@ disabledToSpawnMob=Spawning this mob was disabled in the config file. dontMoveMessage=\u00a77Teleportvorgang startet in {0}. Beweg dich nicht. downloadingGeoIp=Lade GeoIP-Datenbank ... dies kann etwas dauern (country: 0.6 MB, city: 20MB) duplicatedUserdata=Doppelte Datei in userdata: {0} und {1} +durability=\u00a77This tool has \u00a7c{0}\u00a77 uses left enableUnlimited=\u00a77Gebe {1} unendliche Mengen von {0}. enabled=aktiviert enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. @@ -84,16 +88,19 @@ errorWithMessage=\u00a7cFehler: {0} essentialsHelp1=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, go to http://tiny.cc/EssentialsChat essentialsHelp2=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, either type /essentialshelp in game or go to http://tiny.cc/EssentialsChat essentialsReload=\u00a77Essentials neu geladen {0} +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. 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} -false=false +false=\u00a74false\u00a7f feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Umbenennen von {0} gescheitert. flyMode=\u00a77Set fly mode {0} for {1}. +flying=flying foreverAlone=\u00a7cDu hast niemanden, dem du antworten kannst. freedMemory={0} MB frei gemacht. gameMode=\u00a77Set game mode {0} for {1}. @@ -108,6 +115,10 @@ geoipJoinFormat=Spieler {0} kommt aus {1} godDisabledFor=deaktiviert f\u00fcr {0} godEnabledFor=aktiviert f\u00fcr {0} godMode=\u00a77Unsterblichkeit {0}. +hatArmor=\u00a7cError, you cannot use this item as a hat! +hatEmpty=\u00a7cSie tragen keinen Hut. +hatFail=\u00a7cYou must have something to wear in your hand. +hatPlaced=\u00a7eEnjoy your new hat! haveBeenReleased=\u00a77Du wurdest frei gelassen. heal=\u00a77Du wurdest geheilt. healOther=\u00a77{0} geheilt. @@ -164,6 +175,7 @@ jailSet=\u00a77Gef\u00e4ngnis {0} wurde erstellt. jumpError=Das w\u00fcrde deinen Computer \u00fcberlasten. kickDefault=Vom Server geworfen kickExempt=\u00a7cDu kannst diesen Spieler nicht rauswerfen. +kickedAll=\u00a7cKicked all players from server kill=\u00a77{0} get\u00f6tet. kitError2=\u00a7cDiese Ausr\u00fcstung existiert nicht oder ist ung\u00fcltig. kitError=\u00a7cEs gibt keine g\u00fcltigen Ausr\u00fcstungen. @@ -222,6 +234,7 @@ noAccessCommand=\u00a7cDu hast keinen Zugriff auf diesen Befehl. noAccessPermission=\u00a7cDu hast keine Rechte, den Block {0} zu \u00f6ffnen. noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cDu hast keine Rechte, den Block {0} zu zerst\u00f6ren. +noDurability=\u00a7cThis item does not have a durability. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cKeine \u00fcbereinstimmenden Kommandos. noHomeSet=Du hast kein Zuhause gesetzt. @@ -243,6 +256,7 @@ notAllowedToQuestion=\u00a7cDu bist nicht berechtigt zu fragen. notAllowedToShout=\u00a7cDu bist nicht berechtigt zu schreien. notEnoughExperience=You do not have enough experience. notEnoughMoney=Du hast nicht genug Geld. +notFlying=not flying notRecommendedBukkit=* ! * Die verwendete Bukkit-Version ist nicht f\u00fcr Essentials empfohlen. notSupportedYet=Noch nicht verf\u00fcgbar. nothingInHand = \u00a7cYou have nothing in your hand. @@ -356,12 +370,13 @@ timeSet=Zeit in allen Welten gesetzt. timeSetPermission=\u00a7cDu hast keine Berechtigung die Zeit zu \u00e4ndern. timeWorldCurrent=Die momentane Zeit in {0} ist \u00a73{1} timeWorldSet=Die Zeit in \u00a7c{1}\u00a7f wurde zu {0} gesetzt. +tps=Current TPS = {0} tradeCompleted=\u00a77Handel abgeschlossen. tradeSignEmpty=Der Bestand des Trade-Schild ist aufgebraucht. tradeSignEmptyOwner=Es gibt nichts mehr zu Sammeln von diesem Trade-Schild. treeFailure=\u00a7cBaumpflanzung gescheitert. Versuche es auf Gras oder Dreck. treeSpawned=\u00a77Baum gepflanzt. -true=true +true=\u00a72true\u00a7f typeTpaccept=\u00a77Um zu teleportieren, schreibe \u00a7c/tpaccept\u00a77. typeTpdeny=\u00a77Um diese Anfrage abzulehnen, schreibe \u00a7c/tpdeny\u00a77. typeWorldName=\u00a77Du kannst auch den Namen der Welt eingeben. @@ -375,6 +390,8 @@ unknownItemName=Unbekannter Gegenstand: {0} unlimitedItemPermission=\u00a7cDu hast keine Rechte f\u00fcr {0}. unlimitedItems=Unendliche Objekte: unmutedPlayer=Spieler {0} ist nicht mehr stumm. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. upgradingFilesError=Fehler beim Aktualisieren der Dateien userDoesNotExist=Spieler {0} existiert nicht. userIsAway={0} ist abwesend. @@ -384,6 +401,7 @@ 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. usingTempFolderForTesting=Benutze tempor\u00e4ren Ordner zum Testen: +vanished=\u00a7aYou have now been vanished. versionMismatch=Versionen nicht identisch! Bitte aktualisiere {0}. versionMismatchAll=Versionen ungleich! Bitte aktualisiere alle Essentials jars auf die gleiche Version. voiceSilenced=\u00a77Du bist stumm @@ -400,24 +418,34 @@ weatherStorm=\u00a77In {0} st\u00fcrmt es nun. weatherStormFor=\u00a77In {0} st\u00fcrmt es nun f\u00fcr {1} Sekunden. weatherSun=\u00a77In {0} scheint nun die Sonne. weatherSunFor=\u00a77In {0} scheint nun f\u00fcr {1} Sekunden die Sonne. -whoisBanned=\u00a79 - Banned: {0} -whoisExp=\u00a79 - Exp: {0} (Level {1}) -whoisGamemode=\u00a79 - Gamemode: {0} -whoisGeoLocation=\u00a79 - Herkunft: {0} -whoisGod=\u00a79 - God mode: {0} -whoisHealth=\u00a79 - Gesundheit: {0}/20 -whoisIPAddress=\u00a79 - IP-Adresse: {0} -whoisIs={0} ist {1} -whoisJail=\u00a79 - Jail: {0} -whoisLocation=\u00a79 - Position: ({0}, {1}, {2}, {3}) -whoisMoney=\u00a79 - Geldb\u00f6rse: {0} -whoisOP=\u00a79 - OP: {0} -whoisStatusAvailable=\u00a79 - Status: Anwesend -whoisStatusAway=\u00a79 - Status: \u00a7cAbwesend\u00a7f -worth=\u00a77Ein Stapel von {0} ist \u00a7c{1}\u00a77 wert ({2} Einheiten je {3}) +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Banned:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Level {1}) +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Gamemode:\u00a7f {0} +whoisGeoLocation=\u00a76 - Herkunft:\u00a7f {0} +whoisGod=\u00a76 - God mode:\u00a7f {0} +whoisHealth=\u00a76 - Gesundheit:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP-Adresse:\u00a7f {0} +whoisJail=\u00a76 - Jail:\u00a7f {0} +whoisLocation=\u00a76 - Position:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Geldb\u00f6rse:\u00a7f {0} +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== +worth=\u00a77Stack of {0} worth \u00a7c{1}\u00a77 ({2} item(s) at {3} each) worthMeta=\u00a77Ein Stapel von {0} mit Metadaten {1} ist \u00a7c{2}\u00a77 wert. ({3} Einheiten je {4}) 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. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 34367f115..a00ea1e7f 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -5,6 +5,7 @@ action=* {0} {1} addedToAccount=\u00a7a{0} has been added to your account. addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} +adventure = adventure alertBroke=broke: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} alertPlaced=placed: @@ -31,10 +32,11 @@ buildAlert=\u00a7cYou are not permitted to build bukkitFormatChanged=Bukkit version format changed. Version not checked. burnMsg=\u00a77You set {0} on fire for {1} seconds. canTalkAgain=\u00a77You can talk again -cantFindGeoIpDB=Can''t find GeoIP database! +cantFindGeoIpDB=Can't find GeoIP database! cantReadGeoIpDB=Failed to read GeoIP database! cantSpawnItem=\u00a7cYou are not allowed to spawn the item {0} chatTypeLocal=[L] +chatTypeAdmin=[A] chatTypeSpy=[Spy] commandFailed=Command {0} failed: commandHelpFailedForPlugin=Error getting help for: {0} @@ -42,7 +44,7 @@ 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 -connectedPlayers=Connected players: +connectedPlayers=Connected players: connectionFailed=Failed to open connection. cooldownWithMessage=\u00a7cCooldown: {0} corruptNodeInConfig=\u00a74Notice: Your configuration file has a corrupt {0} node. @@ -51,6 +53,7 @@ creatingConfigFromTemplate=Creating config from template: {0} creatingEmptyConfig=Creating empty config: {0} creative=creative currency={0}{1} +currentWorld=Current World: {0} day=day days=days defaultBanReason=The Ban Hammer has spoken! @@ -72,6 +75,7 @@ disabledToSpawnMob=Spawning this mob was disabled in the config file. dontMoveMessage=\u00a77Teleportation will commence in {0}. Don''t move. downloadingGeoIp=Downloading GeoIP database ... this might take a while (country: 0.6 MB, city: 20MB) duplicatedUserdata=Duplicated userdata: {0} and {1} +durability=\u00a77This tool has \u00a7c{0}\u00a77 uses left enableUnlimited=\u00a77Giving unlimited amount of {0} to {1}. enabled=enabled enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. @@ -84,16 +88,19 @@ errorWithMessage=\u00a7cError: {0} essentialsHelp1=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, go to http://tiny.cc/EssentialsChat essentialsHelp2=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, either type /essentialshelp in game or go to http://tiny.cc/EssentialsChat essentialsReload=\u00a77Essentials Reloaded {0} +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. 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} -false=false +false=\u00a74false\u00a7f feed=\u00a77Your appetite was sated. feedOther=\u00a77Satisfied {0}. fileRenameError=Renaming file {0} failed flyMode=\u00a77Set fly mode {0} for {1}. +flying=flying foreverAlone=\u00a7cYou have nobody to whom you can reply. freedMemory=Freed {0} MB. gameMode=\u00a77Set game mode {0} for {1}. @@ -108,6 +115,10 @@ geoipJoinFormat=Player {0} comes from {1} godDisabledFor=disabled for {0} godEnabledFor=enabled for {0} godMode=\u00a77God mode {0}. +hatArmor=\u00a7cError, you cannot use this item as a hat! +hatEmpty=\u00a7cYou are not wearing a hat. +hatFail=\u00a7cYou must have something to wear in your hand. +hatPlaced=\u00a7eEnjoy your new hat! haveBeenReleased=\u00a77You have been released heal=\u00a77You have been healed. healOther=\u00a77Healed {0}. @@ -136,7 +147,7 @@ invRestored=Your inventory has been restored. invSee=You see the inventory of {0}. invSeeHelp=Use /invsee to restore your inventory. invalidCharge=\u00a7cInvalid charge. -invalidHome=Home {0} doesn't exist +invalidHome=Home {0} doesn''t exist invalidMob=Invalid mob type. invalidServer=Invalid server! invalidSignLine=Line {0} on sign is invalid. @@ -161,9 +172,10 @@ jailReleased=\u00a77Player \u00a7e{0}\u00a77 unjailed. jailReleasedPlayerNotify=\u00a77You have been released! jailSentenceExtended=Jail time extend to: {0) jailSet=\u00a77Jail {0} has been set -jumpError=That would hurt your computer''s brain. +jumpError=That would hurt your computer's brain. kickDefault=Kicked from server kickExempt=\u00a7cYou can not kick that person. +kickedAll=\u00a7cKicked all players from server kill=\u00a77Killed {0}. kitError2=\u00a7cThat kit does not exist or is improperly defined. kitError=\u00a7cThere are no valid kits. @@ -222,6 +234,7 @@ noAccessCommand=\u00a7cYou do not have access to that command. noAccessPermission=\u00a7cYou do not have permission to access that {0}. noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cYou do not have permission to destroy that {0}. +noDurability=\u00a7cThis item does not have a durability. noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. noHelpFound=\u00a7cNo matching commands. noHomeSet=You have not set a home. @@ -233,7 +246,7 @@ noMotd=\u00a7cThere is no message of the day. noNewMail=\u00a77You have no new mail. noPendingRequest=You do not have a pending request. noPerm=\u00a7cYou do not have the \u00a7f{0}\u00a7c permission. -noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. +noPermToSpawnMob=\u00a7cYou don't have permission to spawn this mob. noPlacePermission=\u00a7cYou do not have permission to place a block near that sign. noPowerTools=You have no power tools assigned. noRules=\u00a7cThere are no rules specified yet. @@ -243,7 +256,8 @@ notAllowedToQuestion=\u00a7cYou are not authorized to use question. notAllowedToShout=\u00a7cYou are not authorized to shout. notEnoughExperience=You do not have enough experience. notEnoughMoney=You do not have sufficient funds. -notRecommendedBukkit=* ! * Bukkit version is not the recommended build for Essentials. +notFlying=not flying +notRecommendedBukkit= * ! * Bukkit version is not the recommended build for Essentials. notSupportedYet=Not supported yet. nothingInHand = \u00a7cYou have nothing in your hand. now=now @@ -256,7 +270,7 @@ orderBalances=Ordering balances of {0} users, please wait ... pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. -pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. +pTimeOthersPermission=\u00a7cYou are not authorized to set other players' time. pTimePlayers=These players have their own time: pTimeReset=Player time has been reset for: \u00a7e{0} pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} @@ -276,7 +290,7 @@ playerNotFound=\u00a7cPlayer not found. playerUnmuted=\u00a77You have been unmuted pong=Pong! possibleWorlds=\u00a77Possible worlds are the numbers 0 through {0}. -powerToolAir=Command can''t be attached to air. +powerToolAir=Command can't be attached to air. powerToolAlreadySet=Command \u00a7c{0}\u00a7f is already assigned to {1}. powerToolAttach=\u00a7c{0}\u00a7f command assigned to {1}. powerToolClearAll=All powertool commands have been cleared. @@ -285,7 +299,7 @@ powerToolListEmpty={0} has no commands assigned. powerToolNoSuchCommandAssigned=Command \u00a7c{0}\u00a7f has not been assigned to {1}. powerToolRemove=Command \u00a7c{0}\u00a7f removed from {1}. powerToolRemoveAll=All commands removed from {0}. -powerToolsDisabled=All of your power tools have been enabled. +powerToolsDisabled=All of your power tools have been disabled. powerToolsEnabled=All of your power tools have been enabled. protectionOwner=\u00a76[EssentialsProtect] Protection owner: {0} questionFormat=\u00a77[Question]\u00a7f {0} @@ -300,7 +314,7 @@ repairNone=There were no items that needing repairing. requestAccepted=\u00a77Teleport request accepted. requestAcceptedFrom=\u00a77{0} accepted your teleport request. requestDenied=\u00a77Teleport request denied. -requestDeniedFrom=\u00a77{0} denied your teleport request +requestDeniedFrom=\u00a77{0} denied your teleport request. requestSent=\u00a77Request sent to {0}\u00a77. requestTimedOut=\u00a7cTeleport request has timed out requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ @@ -356,12 +370,13 @@ timeSet=Time set in all worlds. timeSetPermission=\u00a7cYou are not authorized to set the time. timeWorldCurrent=The current time in {0} is \u00a73{1} timeWorldSet=The time was set to {0} in: \u00a7c{1} +tps=Current TPS = {0} tradeCompleted=\u00a77Trade completed. -tradeSignEmpty=The trade sign does not have enough supply left. +tradeSignEmpty=The trade sign has nothing available for you. tradeSignEmptyOwner=There is nothing to collect from this trade sign. treeFailure=\u00a7cTree generation failure. Try again on grass or dirt. treeSpawned=\u00a77Tree spawned. -true=true +true=\u00a72true\u00a7f typeTpaccept=\u00a77To teleport, type \u00a7c/tpaccept\u00a77. typeTpdeny=\u00a77To deny this request, type \u00a7c/tpdeny\u00a77. typeWorldName=\u00a77You can also type the name of a specific world. @@ -375,6 +390,8 @@ unknownItemName=Unknown item name: {0} unlimitedItemPermission=\u00a7cNo permission for unlimited item {0}. unlimitedItems=Unlimited items: unmutedPlayer=Player {0} unmuted. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. upgradingFilesError=Error while upgrading the files userDoesNotExist=The user {0} does not exist. userIsAway={0} is now AFK @@ -384,11 +401,12 @@ userUsedPortal={0} used an existing exit portal. userdataMoveBackError=Failed to move userdata/{0}.tmp to userdata/{1} userdataMoveError=Failed to move userdata/{0} to userdata/{1}.tmp usingTempFolderForTesting=Using temp folder for testing: +vanished=\u00a7aYou have now been vanished. 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. +warpListPermission=\u00a7cYou do not have Permission to list warps. warpNotExist=That warp does not exist. warpOverwrite=\u00a7cYou cannot overwrite that warp. warpSet=\u00a77Warp {0} set. @@ -400,20 +418,22 @@ weatherStorm=\u00a77You set the weather to storm in {0} weatherStormFor=\u00a77You set the weather to storm in {0} for {1} seconds weatherSun=\u00a77You set the weather to sun in {0} weatherSunFor=\u00a77You set the weather to sun in {0} for {1} seconds -whoisBanned=\u00a79 - Banned: {0} -whoisExp=\u00a79 - Exp: {0} (Level {1}) -whoisGamemode=\u00a79 - Gamemode: {0} -whoisGeoLocation=\u00a79 - Location: {0} -whoisGod=\u00a79 - God mode: {0} -whoisHealth=\u00a79 - Health: {0}/20 -whoisIPAddress=\u00a79 - IP Address: {0} -whoisIs={0} is {1} -whoisJail=\u00a79 - Jail: {0} -whoisLocation=\u00a79 - Location: ({0}, {1}, {2}, {3}) -whoisMoney=\u00a79 - Money: {0} -whoisOP=\u00a79 - OP: {0} -whoisStatusAvailable=\u00a79 - Status: Available -whoisStatusAway=\u00a79 - Status: \u00a7cAway\u00a7f +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Banned:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Level {1}) +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Gamemode:\u00a7f {0} +whoisGeoLocation=\u00a76 - Location:\u00a7f {0} +whoisGod=\u00a76 - God mode:\u00a7f {0} +whoisHealth=\u00a76 - Health:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP Address:\u00a7f {0} +whoisJail=\u00a76 - Jail:\u00a7f {0} +whoisLocation=\u00a76 - Location:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Money:\u00a7f {0} +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== 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) worthSet=Worth value set @@ -421,3 +441,11 @@ year=year years=years youAreHealed=\u00a77You have been healed. youHaveNewMail=\u00a7cYou have {0} messages!\u00a7f Type \u00a77/mail read\u00a7f to view your mail. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index ad1aefe6c..b4e8bd73a 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -3,57 +3,60 @@ # Translations start here # by: action=* {0} {1} -addedToAccount=\u00a7a{0} ha sido agregado a tu cuenta. -addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} -alertBroke=roto: +addedToAccount=\u00a7a{0} han sido agregados a tu cuenta. +addedToOthersAccount=\u00a7a{0} han sidos agregados a la cuenta de {1}\u00a7a. Nuevo presupuesto: {2} +adventure = Aventura +alertBroke=Roto: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} en: {3} -alertPlaced=situado: -alertUsed=usado: +alertPlaced=Situado: +alertUsed=Usado: autoAfkKickReason=Has sido echado por ausentarte mas de {0} minutos. backAfterDeath=\u00a77Usa el comando /back para volver al punto en el que moriste. backUsageMsg=\u00a77Volviendo a la localizacion anterior. -backupDisabled=An external backup script has not been configured. -backupFinished=Copia de seguridad completada -backupStarted=Comenzando copia de seguridad +backupDisabled=Un codigo externo de recuperacion no ha sido configurado. +backupFinished=Copia de seguridad completada. +backupStarted=Comenzando copia de seguridad... balance=\u00a77Cantidad: {0} -balanceTop=\u00a77Top cantidades ({0}) -banExempt=\u00a7cNo puedes banear a ese jugador -banIpAddress=\u00a77Direccion IP baneada -bannedIpsFileError=Error leyendo banned-ips.txt -bannedIpsFileNotFound=banned-ips.txt no encontrado -bannedPlayersFileError=Error leyendo banned-players.txt -bannedPlayersFileNotFound=banned-players.txt no encontrado +balanceTop=\u00a77Ranking de cantidades ({0}) +banExempt=\u00a7cNo puedes bannear a ese jugador. +banIpAddress=\u00a77Direccion IP baneada. +bannedIpsFileError=Error leyendo banned-ips.txt. +bannedIpsFileNotFound=banned-ips.txt no encontrado. +bannedPlayersFileError=Error leyendo banned-players.txt. +bannedPlayersFileNotFound=banned-players.txt no encontrado. bigTreeFailure=\u00a7cBig Generacion de arbol fallida. Prueba de nuevo en hierba o arena. bigTreeSuccess= \u00a77Big Arbol generado. -blockList=Essentials relayed the following commands to another plugin: -broadcast=[\u00a7cBroadcast\u00a7f]\u00a7a {0} -buildAlert=\u00a7cNo tienes permisos para construir +blockList=Essentials le ha cedido los siguientes comandos a otros plugins: +broadcast=[\u00a7cAnuncio\u00a7f]\u00a7a {0} +buildAlert=\u00a7cNo tienes permisos para construir. bukkitFormatChanged=Version de formato de Bukkit cambiado. Version no comprobada. burnMsg=\u00a77Has puesto {0} en fuego durante {1} segundos. -canTalkAgain=\u00a77Ya puedes hablar de nuevo -cantFindGeoIpDB=No se puede encontrar la bases de datos del Geo IP -cantReadGeoIpDB=Error al intentar leer la base de datos del Geo IP +canTalkAgain=\u00a77Ya puedes hablar de nuevo. +cantFindGeoIpDB=No se puede encontrar la base de datos del Geo IP. +cantReadGeoIpDB=Error al intentar leer la base de datos del Geo IP. cantSpawnItem=\u00a7cNo tienes acceso para producir este objeto {0} chatTypeLocal=[L] -chatTypeSpy=[Spy] -commandFailed=Command {0} fallado: +chatTypeAdmin=[A] +chatTypeSpy=[Espia] +commandFailed=Comando {0} fallado: commandHelpFailedForPlugin=Error obteniendo ayuda para: {0} commandNotLoaded=\u00a7cCommand {0} esta cargado incorrectamente. compassBearing=\u00a77Bearing: {0} ({1} grados). configFileMoveError=Error al mover config.yml para hacer una copia de seguridad de la localizacion. -configFileRenameError=Error al renombrar archivo temp a config.yml -connectedPlayers=Jugadores conectados: +configFileRenameError=Error al renombrar archivo temp a config.yml. +connectedPlayers=Jugadores conectados: connectionFailed=Error al abrir conexion. -cooldownWithMessage=\u00a7cCooldown: {0} +cooldownWithMessage=\u00a7cTiempo restante: {0} corruptNodeInConfig=\u00a74Notice: Tu archivo de configuracion tiene un nodo {0} incorrecto. couldNotFindTemplate=No se puede encontrar el template {0} creatingConfigFromTemplate=Creando configuracion desde el template: {0} creatingEmptyConfig=Creando configuracion vacia: {0} -creative=creative +creative=creativo currency={0}{1} +currentWorld=Mundo actual: {0} day=dia days=dias -defaultBanReason=Baneado por incumplir las normas! +defaultBanReason=Baneado por desobedecer las normas! deleteFileError=No se puede borrar el archivo: {0} deleteHome=\u00a77Home {0} ha sido borrado. deleteJail=\u00a77Jail {0} ha sido borrado. @@ -61,82 +64,90 @@ deleteWarp=\u00a77Warp {0} ha sido borrado. deniedAccessCommand={0} ha denegado el acceso al comando. dependancyDownloaded=[Essentials] Dependencia {0} descargada correctamente. dependancyException=[Essentials] Error al intentar descargar la dependencia. -dependancyNotFound=[Essentials] La dependencia necesitada no se encontro, descargandola... +dependancyNotFound=[Essentials] La dependencia necesitada no se encontro, descargando... depth=\u00a77Estas al nivel del mar. depthAboveSea=\u00a77Estas {0} bloque(s) por encima del mar. depthBelowSea=\u00a77Estas {0} bloque(s) por debajo del mar. destinationNotSet=Destino no establecido. disableUnlimited=\u00a77Desactivando colocacion ilimitada de {0} para {1}. disabled=desactivado -disabledToSpawnMob=Spawning this mob was disabled in the config file. +disabledToSpawnMob=El spawn de este mob esta deshabilitado en la configuracion. dontMoveMessage=\u00a77Teletransporte comenzara en {0}. No te muevas. downloadingGeoIp=Descargando base de datos de GeoIP ... puede llevar un tiempo (pais: 0.6 MB, ciudad: 20MB) duplicatedUserdata=Datos de usuario duplicados: {0} y {1} +durability=\u00a77Esta herramienta tiene \u00a7c{0}\u00a77 usos restantes. enableUnlimited=\u00a77Dando cantidad ilimitada de {0} a {1}. enabled=activado -enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. -enchantmentNotFound = \u00a7cEnchantment not found -enchantmentPerm = \u00a7cYou do not have the permission for {0} -enchantmentRemoved = \u00a77The enchantment {0} has been removed from your item in hand. -enchantments = \u00a77Enchantments: {0} +enchantmentApplied = \u00a77El encantamiento {0} fue aplicado al item en tu mano. +enchantmentNotFound = \u00a7cEncantamiento no encontrado. +enchantmentPerm = \u00a7cNo tienes permisos para {0} +enchantmentRemoved = \u00a77El encantamiento {0} fue removido del item en tu mano. +enchantments = \u00a77Encantamiento: {0} errorCallingCommand=Error al ejecutar el comando /{0} errorWithMessage=\u00a7cError: {0} -essentialsHelp1=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, go to http://tiny.cc/EssentialsChat -essentialsHelp2=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, either type /essentialshelp in game or go to http://tiny.cc/EssentialsChat +essentialsHelp1=Archivo corrompido, no es posible abrirlo. Essentials esta ahora desactivado. Si no puedes arreglar el archivo, ve a http://tiny.cc/EssentialsChat +essentialsHelp2=Archivo corrompido, no es posible abrirlo. Essentials esta ahora desactivado. Si no puedes arreglar el archivo, escribe /essentialshelp ingame o ve a http://tiny.cc/EssentialsChat essentialsReload=\u00a77Essentials Recargado {0} +exp=\u00a7c{0} \u00a77tiene\u00a7c {1} \u00a77 de exp. (nivel\u00a7c {2}\u00a77) y necesita\u00a7c {3} \u00a77de exp para subir su nivel. +expSet=\u00a7c{0} \u00a77ahora tiene\u00a7c {1} \u00a77de exp. extinguish=\u00a77Te has suicidado. extinguishOthers=\u00a77Has matado a {0}. failedToCloseConfig=Error al cerrar configuracion {0} failedToCreateConfig=Error al crear configuracion {0} failedToWriteConfig=Error al escribir configuracion {0} -false=false -feed=\u00a77Your appetite was sated. -feedOther=\u00a77Satisfied {0}. +false=\u00a74false\u00a7f +feed=\u00a77Apetito satisfecho. +feedOther=\u00a77Satisfecho {0}. fileRenameError=Error al renombrar el archivo {0} -flyMode=\u00a77Set fly mode {0} for {1}. +flyMode=\u00a77Modo de vuelo activado {0} para {1}. +flying=volando foreverAlone=\u00a7cNo tienes nadie a quien puedas responder. freedMemory= {0} MB libres. -gameMode=\u00a77Set game mode {0} for {1}. -gcchunks= pixeles, +gameMode=\u00a77Modo de juego {0} activado para {1}. +gcchunks= pixeles gcentities= entidades gcfree=Memoria libre: {0} MB gcmax=Memoria maxima: {0} MB gctotal=Memoria localizada: {0} MB -geoIpUrlEmpty=Link para descargar GeoIP esta vacio. -geoIpUrlInvalid=Link para descargar GeoIP es invalido. +geoIpUrlEmpty=El link para descargar GeoIP esta vacio. +geoIpUrlInvalid=El link para descargar GeoIP es invalido. geoipJoinFormat=El jugador {0} viene de {1} -godDisabledFor=Desactivado para {0} -godEnabledFor=Activado para {0} -godMode=\u00a77Modo Dios {0}. -haveBeenReleased=\u00a77Has sido liberado +godDisabledFor=desactivado para {0} +godEnabledFor=activado para {0} +godMode=\u00a77Modo de dios {0}. +hatArmor=\u00a7cNo puedes usar este item como sombrero! +hatEmpty=\u00a7cNo estas usando un sombrero. +hatFail=\u00a7cDebes tener un item en tu mano para usarlo de sombrero. +hatPlaced=\u00a7eDisfruta tu nuevo sombrero! +haveBeenReleased=\u00a77Has sido liberado. heal=\u00a77Has sido curado. healOther=\u00a77Has curado a {0}. helpConsole=Para obtener ayuda de la consola, escribe ?. -helpFrom=\u00a77Commands from {0}: +helpFrom=\u00a77Comandos de {0}: helpLine=\u00a76/{0}\u00a7f: {1} -helpMatching=\u00a77Commands matching "{0}": -helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} +helpMatching=\u00a77Comandos que coinciden con "{0}": +helpOp=\u00a7c[AyudaOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f de \u00a7c{1}\u00a7f: -helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} -holeInFloor=Agujero en el suelo +helpPlugin=\u00a74{0}\u00a7f: Ayuda con los plugins: /help {1} +holeInFloor=Agujero en el suelo. homeSet=\u00a77Hogar establecido. -homeSetToBed=\u00a77Tu hogar esta ahora establecido a esta cama. +homeSetToBed=\u00a77Tu hogar esta ahora establecido en esta cama. homes=Hogares: {0} hour=hora hours=horas ignorePlayer=A partir de ahora ignoras al jugador {0}. illegalDate=Forma de fecha ilegal. infoChapter=Selecciona una seccion: -infoChapterPages=Seccion {0}, pagina \u00a7c{1}\u00a7f of \u00a7c{2}\u00a7f: +infoChapterPages=Seccion {0}, pagina \u00a7c{1}\u00a7f de \u00a7c{2}\u00a7f: infoFileDoesNotExist=El archivo info.txt no existe. Creando uno para ti. infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Pagina \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- infoUnknownChapter=Seccion desconocida. -invBigger=El inventario del otro usuario es mas grande que el tuyo +invBigger=El inventario del otro usuario es mas grande que el tuyo. invRestored=Tu inventario ha sido recuperado. invSee=Estas viendo el inventario de {0}. invSeeHelp=Usa /invsee para recuperar tu inventario. invalidCharge=\u00a7cCargo invalido. -invalidHome=Home {0} doesn't exist +invalidHome=El hogar {0} no existe. invalidMob=Mob invalido. invalidServer=Servidor invalido! invalidSignLine=Linea {0} en el signo es invalida. @@ -157,48 +168,49 @@ itemsCsvNotLoaded=Error al leer items.csv. jailAlreadyIncarcerated=\u00a7cLa persona ya esta en la carcel: {0} jailMessage=\u00a7cPor hacer el mal, tiempo en la carcel estaras. jailNotExist=Esa carcel no existe. -jailReleased=\u00a77Player \u00a7e{0}\u00a77 liberado. +jailReleased=\u00a77Jugador \u00a7e{0}\u00a77 liberado. jailReleasedPlayerNotify=\u00a77 Has sido liberado!! jailSentenceExtended=El tiempo en la carcel se alarga hasta: {0) -jailSet=\u00a77Carcel {0} ha sido puesta +jailSet=\u00a77La carcel {0} ha sido activada. jumpError=Eso es demasiado para tu ordenador! kickDefault=Echado del servidor. kickExempt=\u00a7cNo puedes echar a esa persona. +kickedAll=\u00a7cTodos los jugadores fueron kickeados. kill=\u00a77ha matado a {0}. kitError2=\u00a7cEse kit no existe o esta mal escrito. kitError=\u00a7cNo hay ningun kit valido. -kitErrorHelp=\u00a7cPerhaps an item is missing a quantity in the configuration? +kitErrorHelp=\u00a7cLe falta especificar la cantidad a un item en la configuracion? kitGive=\u00a77Dando kit a {0}. -kitInvFull=\u00a7cTu inventario esta lleno, su kit se pondra en el suelo +kitInvFull=\u00a7cTu inventario esta lleno, el kit se pondra en el suelo. kitTimed=\u00a7c No puedes usar ese kit de nuevo para otro{0}. kits=\u00a77Kits: {0} -lightningSmited=\u00a77Acabas de ser golpeado +lightningSmited=\u00a77Acabas de ser golpeado. lightningUse=\u00a77Golpeando a {0} listAfkTag = \u00a77[AFK]\u00a7f -listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. -listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listAmount = \u00a79Hay \u00a7c{0}\u00a79 jugadores de un maximo de \u00a7c{1}\u00a79 jugadores online. +listAmountHidden = \u00a79Hay \u00a7c{0}\u00a79 jugadores de un maximo de \u00a7c{1}\u00a79 jugadores online. listGroupTag={0}\u00a7f: -listHiddenTag = \u00a77[HIDDEN]\u00a7f -loadWarpError=Error al cargar el tenetransporte {0} +listHiddenTag = \u00a77[ESCONDIDO]\u00a7f +loadWarpError=Error al cargar el teletransporte {0} localFormat=Local: <{0}> {1} mailClear=\u00a7cPara marcar tu email como leido, escribe /mail clear mailCleared=\u00a77Email limpiado! mailSent=\u00a77Email enviado!! markMailAsRead=\u00a7cPara marcar tu email como leido, escribe /mail clear -markedAsAway=\u00a77Has sido puesto como AFK. +markedAsAway=\u00a77Has sido anunciado como AFK. markedAsNotAway=\u00a77Ya no estas AFK. maxHomes=No puedes establecer mas de {0} hogares. -mayNotJail=\u00a7cNo puedes encarcelar a esa persona +mayNotJail=\u00a7cNo puedes encarcelar a esa persona. me=yo minute=minuto minutes=minutos missingItems=No tienes {0}x de {1}. missingPrefixSuffix=Falta un prefijo o un sufijo para {0} mobSpawnError=Error al cambiar la localizacion para el nacimiento de los mobs. -mobSpawnLimit=Cantidad de Mobs limitados al limite del server +mobSpawnLimit=Cantidad de Mobs limitados al limite del server. mobSpawnTarget=El block seleccionado sera el lugar donde van a nacer los mobs. mobsAvailable=\u00a77Mobs: {0} -moneyRecievedFrom=\u00a7a{0} ha sido recivido de {1} +moneyRecievedFrom=\u00a7a{0} ha sido recibido de {1} moneySentTo=\u00a7a{0} ha sido enviado a {1} moneyTaken={0} han sido sacados de tu cuenta bancaria. month=mes @@ -209,50 +221,52 @@ muteExempt=\u00a7cNo puedes silenciar a ese jugador. mutedPlayer=Player {0} silenciado. mutedPlayerFor=Player {0} silenciado durante {1}. mutedUserSpeaks={0} intento hablar, pero esta silenciado. -nearbyPlayers=Players nearby: {0} +nearbyPlayers=Jugadores cercanos: {0} negativeBalanceError=El usuario no tiene permitido tener un saldo negativo. nickChanged=Nombre de jugador cambiado. nickDisplayName=\u00a77Tienes que habilitar cambio de nombre de usuario en la configuracion de Essentials. nickInUse=\u00a7cEse nombre ya esta en uso. nickNamesAlpha=\u00a7cLos nombres tienen que ser alfanumericos. -nickNoMore=\u00a77Ya no tienes un nombre de usuario +nickNoMore=\u00a77Ya no tienes un nombre de usuario. nickOthersPermission=\u00a7cNo tienes permiso para cambiar el nombre de usuario de otros. -nickSet=\u00a77Tu nombre es ahora \u00a7c{0} +nickSet=\u00a77Tu nombre es ahora \u00a7c{0} . noAccessCommand=\u00a7cNo tienes acceso a ese comando. -noAccessPermission=\u00a7cNo tienes permisos para hacer eso {0}. -noBreakBedrock=You are not allowed to destroy bedrock. +noAccessPermission=\u00a7cNo tienes permisos para eso {0} . +noBreakBedrock=No puedes romper roca madre. noDestroyPermission=\u00a7cNo tienes permisos para destrozar eso {0}. -noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. +noDurability=\u00a7cEste item no tiene durabilidad. +noGodWorldWarning=\u00a7cAdvertencia! El Modo de dios ha sido desactivado en este mundo. noHelpFound=\u00a7cNo hay comandos relacionados. noHomeSet=No has establecido un hogar. noHomeSetPlayer=El jugador no ha establecido un hogar. noKitPermission=\u00a7cNecesitas los \u00a7c{0}\u00a7c permisos para usar ese kit. -noKits=\u00a77No hay kits disponibles todavia -noMail=No tienes ningun email recivido +noKits=\u00a77No hay kits disponibles aun. +noMail=No has recibido ningun email. noMotd=\u00a7cNo hay ningun mensaje del dia. noNewMail=\u00a77No tienes ningun correo nuevo. noPendingRequest=No tienes ninguna peticion pendiente. noPerm=\u00a7cNo tienes el permiso de \u00a7f{0}\u00a7c. -noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. +noPermToSpawnMob=\u00a7cNo tienes permisos para spawnear a este mob. noPlacePermission=\u00a7cNo tienes permiso para situar ese bloque en ese lugar. noPowerTools=You have no power tools assigned. noRules=\u00a7cNo hay reglas especificadas todavia. -noWarpsDefined=No hay teletransportes definidos aun +noWarpsDefined=No hay teletransportes definidos aun. none=ninguno -notAllowedToQuestion=\u00a7cYou estas autorizado para usar las preguntas. +notAllowedToQuestion=\u00a7cNo estas autorizado para usar las preguntas. notAllowedToShout=\u00a7cNo estas autorizado para gritar. -notEnoughExperience=You do not have enough experience. +notEnoughExperience=No tienes suficiente experiencia. notEnoughMoney=No tienes el dinero suficiente. +notFlying=no volando notRecommendedBukkit=* ! * La version de bukkit no es la recomendada para esta version de Essentials. -notSupportedYet=No esta soportado aun. -nothingInHand = \u00a7cYou have nothing in your hand. +notSupportedYet=No tiene soporte por el momento. +nothingInHand = \u00a7cNo tienes anda en tu mano. now=ahora -nuke=May death rain upon them -numberRequired=Un numero es necesario, amigo. -onlyDayNight=/time solo soporta day/night. (dia/noche) +nuke=Que la muerta afecte al que no despierte. +numberRequired=Un numero es necesario, amigo . +onlyDayNight=/time solo se utiliza con los valores day o night. (dia/noche) onlyPlayers=Solo los jugadores conectados pueden usar {0}. -onlySunStorm=/weather solo soporta sun/storm. (sol/tormenta) -orderBalances=Ordering balances of {0} users, please wait ... +onlySunStorm=/weather solo acepta los valores sun o storm. (sol/tormenta) +orderBalances=Creando un ranking de {0} usuarios segun su presupuesto, espera... pTimeCurrent=\u00a7e{0}''s\u00a7f la hora es {1}. pTimeCurrentFixed=\u00a7e{0}''s\u00a7f la hora ha sido cambiada a {1}. pTimeNormal=\u00a7e{0}''s\u00a7f el tiempo es normal y coincide con el servidor. @@ -274,7 +288,7 @@ playerMutedFor=\u00a77Has sido silenciado durante {0} playerNeverOnServer=\u00a7cEl jugador {0} nunca estuvo en este servidor. playerNotFound=\u00a7cJugador no encontrado. playerUnmuted=\u00a77Has sido desmuteado. -pong=Tkm mi ninio! +pong=Te quiero mucho! possibleWorlds=\u00a77Los mundos posibles son desde el numero 0 hasta el {0}. powerToolAir=El comando no se puede ejecutar en el aire. powerToolAlreadySet=El comando \u00a7c{0}\u00a7f ya esta asignado a {1}. @@ -285,33 +299,33 @@ powerToolListEmpty={0} no tiene comandos asignados. powerToolNoSuchCommandAssigned=El comando \u00a7c{0}\u00a7f no ha sido asignado a {1}. powerToolRemove=Comando \u00a7c{0}\u00a7f borrado desde {1}. powerToolRemoveAll=Todos los comandos borrados desde {0}. -powerToolsDisabled=All of your power tools have been disabled. -powerToolsEnabled=All of your power tools have been enabled. +powerToolsDisabled=Todas tus herramientas de poder han sido desactivadas. +powerToolsEnabled=Todas tus herramientas de poder han sido activadas. protectionOwner=\u00a76[EssentialsProtect] Dueño de la proteccion: {0} questionFormat=\u00a77[Pregunta]\u00a7f {0} -readNextPage=Type /{0} {1} to read the next page +readNextPage=escribe /{0} {1} para leer la prox. pagina. reloadAllPlugins=\u00a77Todos los plugins recargados. -removed=\u00a77Removed {0} entities. +removed=\u00a77{0} entidades removidas. repair=Has reparado satisfactoriamente tu: \u00a7e{0}. -repairAlreadyFixed=\u00a77Este objeto no necesita de reparado. -repairEnchanted=\u00a77You are not allowed to repair enchanted items. -repairInvalidType=\u00a7cEste objeto no puede ser reparado. -repairNone=No habia objetos que necesitasen ser reparados. +repairAlreadyFixed=\u00a77Este objeto no necesita ser reparado. +repairEnchanted=\u00a77No tienes permisos para reparar items encantados. +repairInvalidType=\u00a7cError: tipo de item invalido. +repairNone=No hay objetos que necesiten reparacion. requestAccepted=\u00a77Peticion de teletransporte aceptada. -requestAcceptedFrom=\u00a77{0} acepto tu peticion de teletransporte. +requestAcceptedFrom=\u00a77{0} ha aceptado tu peticion de teletransporte. requestDenied=\u00a77Peticion de teletransporte denegada. requestDeniedFrom=\u00a77{0} ha denegado tu peticion de teletransporte. requestSent=\u00a77Peticion enviada a {0}\u00a77. -requestTimedOut=\u00a7cTeleport request has timed out -requiredBukkit= * ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ -returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} +requestTimedOut=\u00a7cA la solicitud de teletransporte se le ha acabado el tiempo. +requiredBukkit= * ! * Necesitas al menos el build {0} de CraftBukkit, descargalo de http://dl.bukkit.org/downloads/craftbukkit/ +returnPlayerToJailError=Error al intentar regresar a un jugador {0} a la carcel: {1} second=segundo seconds=segundos seenOffline=El jugador {0} esta desconectado desde {1} -seenOnline=El jugador {0} lleva conectado desde {1} -serverFull=Servidor lleno +seenOnline=El jugador {0} esta conectado desde {1} +serverFull=Servidor lleno. serverTotal=Server Total: {0} -setSpawner=Cambiado tipo de lugar de nacimiento a {0} +setSpawner=Cambiado tipo de spawner a {0} sheepMalformedColor=Color malformado. shoutFormat=\u00a77[Shout]\u00a7f {0} signFormatFail=\u00a74[{0}] @@ -323,13 +337,13 @@ slimeMalformedSize=Medidas malformadas. soloMob=A este mob le gusta estar solo spawnSet=\u00a77El lugar de nacimiento ha sido puesto para el grupo {0}. spawned=nacido -sudoExempt=You cannot sudo this user -sudoRun=Forcing {0} to run: /{1} {2} +sudoExempt=No puedes usar el comando sudo con este user. +sudoRun=Forzando {0} a ejecutar: /{1} {2} suicideMessage=\u00a77Adios mundo cruel... -suicideSuccess= \u00a77{0} se quito su propia vida -survival=survival -takenFromAccount=\u00a7c{0} ha sido sacado de tu cuenta. -takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} +suicideSuccess= \u00a77{0} se quito su propia vida. +survival=supervivencia +takenFromAccount=\u00a7c{0} han sido sacados de tu cuenta. +takenFromOthersAccount=\u00a7c{0} han sidos sacados de la cuenta de {1}\u00a7c . Nuevo presupuesto: {2} teleportAAll=\u00a77Peticion de teletransporte enviada a todos los jugadores... teleportAll=\u00a77Teletransportando a todos los jugadores... teleportAtoB=\u00a77{0}\u00a77 te teletransporto a {1}\u00a77. @@ -337,7 +351,7 @@ teleportDisabled={0} tiene desactivado los teletransportes. teleportHereRequest=\u00a7c{0}\u00a7c ha pedido que te teletransportes con el. teleportNewPlayerError=Error al teletransportar al nuevo jugador teleportRequest=\u00a7c{0}\u00a7c te ha pedido teletransportarse contigo. -teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. +teleportRequestTimeoutInfo=\u00a77A esta solicitud se le acabara el tiempo despues de {0} segundos. teleportTop=\u00a77Teletransportandote a la cima. teleportationCommencing=\u00a77Comenzando teletransporte... teleportationDisabled=\u00a77Teletransporte desactivado. @@ -345,28 +359,29 @@ teleportationEnabled=\u00a77Teletransporte activado. teleporting=\u00a77Teletransportando... teleportingPortal=\u00a77Teletransportando via portal. tempBanned=Baneado temporalmente del servidor por {0} -tempbanExempt=\u00a77No puedes banear temporalmente a ese jugador +tempbanExempt=\u00a77No puedes banear temporalmente a ese jugador. thunder= Tu has {0} los truenos en tu mundo. thunderDuration=Tu has {0} los truenos en tu mundo durante {1} seconds. timeBeforeHeal=Tiempo antes de la siguiente curacion: {0} timeBeforeTeleport=Tiempo antes del proximo teletransporte: {0} -timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f +timeFormat=\u00a73{0}\u00a7f o \u00a73{1}\u00a7f o \u00a73{2}\u00a7f 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 establecido en todos los mundos. +timeSet=Tiempo establecido en todos los mundos. timeSetPermission=\u00a7cNo estas autorizado para establecer la hora. timeWorldCurrent=La hora actual en {0} es \u00a73{1} -timeWorldSet=La hora ha sido establecido a {0} en: \u00a7c{1} +timeWorldSet=La hora ha sido establecida a {0} en: \u00a7c{1} +tps=TPS actual = {0} tradeCompleted=\u00a77Intercambio completado. tradeSignEmpty=Esta tienda no tiene nada disponible para ti. tradeSignEmptyOwner=No hay nada que recojer de esta tienda. treeFailure=\u00a7cError al generar arbol. Prueba de nuevo en tierra o hierba. -treeSpawned=\u00a77Arbol puesto. -true=true +treeSpawned=\u00a77Arbol generado. +true=\u00a72true\u00a7f typeTpaccept=\u00a77Para teletransportarte, escribe \u00a7c/tpaccept\u00a77. typeTpdeny=\u00a77Para denegar esta peticion, escribe \u00a7c/tpdeny\u00a77. typeWorldName=\u00a77Tu tambien puedes escribir el nombre de un mundo especifico. unableToSpawnMob=No se puede generar Mobs. -unbannedIP=IP Adress desbaneada. +unbannedIP=Direccion IP desbaneada. unbannedPlayer=Jugador desbaneado. unignorePlayer=Ya no estas ignorando al jugador {0}. unknownItemId=ID de objeto desconocido: {0} @@ -375,6 +390,8 @@ unknownItemName=Nombre de objeto desconocido: {0} unlimitedItemPermission=\u00a7cNo tienes permiso para objetos ilimitados {0}. unlimitedItems=Objetos ilimitados. unmutedPlayer=Jugador {0} desmuteado. +unvanished=\u00a7aEres visible nuevamente. +unvanishedReload=\u00a7cUn reinicio te ha forzado a ser visible. upgradingFilesError=Error mientras se actualizaban los archivos userDoesNotExist=El usuario {0} no existe userIsAway={0} esta ahora ausente! @@ -384,36 +401,39 @@ userUsedPortal={0} uso un portal de salida existente. userdataMoveBackError=Error al mover userdata/{0}.tmp a userdata/{1} userdataMoveError=Error al mover userdata/{0} a userdata/{1}.tmp usingTempFolderForTesting=Usando carpeta temporal para pruebas: +vanished=\u00a7aHas desaparecido. versionMismatch=La version no coincide! Por favor actualiza {0} a la misma version. versionMismatchAll=La version no coincide! Por favor actualiza todos los jars de Essentials a la misma version. voiceSilenced=\u00a77Tu voz ha sido silenciada warpDeleteError=Problema al borrar el archivo de teletransporte. warpListPermission=\u00a7cNo tienes permiso para listar esos teletransportes. warpNotExist=Ese teletransporte no existe. -warpOverwrite=\u00a7cYou cannot overwrite that warp. -warpSet=\u00a77Teletransporte {0} establecido. +warpOverwrite=\u00a7cNo puedes sobreescribir ese atajo. +warpSet=\u00a77Atajo {0} establecido. warpUsePermission=\u00a7cNo tienes permisos para usar ese teletransporte. warpingTo=\u00a77Teletransportandote a {0}. warps=Warps: {0} warpsCount=\u00a77Hay {0} teletransportes. Mostrando pagina {1} de {2}. -weatherStorm=\u00a77Has establecido el tiempo a tormenta en este mundo. -weatherStormFor=\u00a77Has establecido el tiempo a tormenta en este {1} durante {0} segundos. -weatherSun=\u00a77Has establecido el tiempo a sol en este mundo. -weatherSunFor=\u00a77Has establecido el tiempo a sol en este {1} durante {0} segundos. -whoisBanned=\u00a79 - Banned: {0} -whoisExp=\u00a79 - Exp: {0} (Level {1}) -whoisGamemode=\u00a79 - Gamemode: {0} -whoisGeoLocation=\u00a79 - Localizacion: {0} -whoisGod=\u00a79 - God mode: {0} -whoisHealth=\u00a79 - Salud: {0}/20 -whoisIPAddress=\u00a79 - Direccion IP: {0} -whoisIs={0} es {1} -whoisJail=\u00a79 - Jail: {0} -whoisLocation=\u00a79 - Localizacion: ({0}, {1}, {2}, {3}) -whoisMoney=\u00a79 - Dinero: {0} -whoisOP=\u00a79 - OP: {0} -whoisStatusAvailable=\u00a79 - Estado: Disponible -whoisStatusAway=\u00a79 - Status: \u00a7cAusente\u00a7f +weatherStorm=\u00a77Has establecido el tiempo como tormenta en este mundo. +weatherStormFor=\u00a77Has establecido el tiempo como tormenta en este {1} durante {0} segundos. +weatherSun=\u00a77Has establecido el tiempo como sol en este mundo. +weatherSunFor=\u00a77Has establecido el tiempo como sol en este {1} durante {0} segundos. +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Banned:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Nivel {1}) +whoisFly=\u00a76 - Modo de vuelo:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Modo de juego:\u00a7f {0} +whoisGeoLocation=\u00a76 - Localizacion:\u00a7f {0} +whoisGod=\u00a76 - Modo de dios:\u00a7f {0} +whoisHealth=\u00a76 - Salud:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - Direccion IP:\u00a7f {0} +whoisJail=\u00a76 - Jail:\u00a7f {0} +whoisLocation=\u00a76 - Localizacion:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Dinero:\u00a7f {0} +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== worth=\u00a77Pila de {0} con valor de \u00a7c{1}\u00a77 ({2} objeto(s) a {3} cada uno) worthMeta=\u00a77Pila de {0} con metadata de {1} , con valor de \u00a7c{2}\u00a77 ({3} objeto(s) a {4} cada uno) worthSet=Establecer el valor de un valor @@ -421,3 +441,11 @@ year=año years=años youAreHealed=\u00a77Has sido curado. youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f para ver tus emails no leidos!. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties new file mode 100644 index 000000000..16173d6f2 --- /dev/null +++ b/Essentials/src/messages_fi.properties @@ -0,0 +1,451 @@ +#version: TeamCity +# Single quotes have to be doubled: '' +# Translations start here +# by: +action=* {0} {1} +addedToAccount=\u00a7a{0} on lis\u00e4tty sinun tilillesi. +addedToOthersAccount=\u00a7a{0} lis\u00e4tty {1}\u00a7a tilille. Uusi rahatilanne: {2} +adventure = adventure +alertBroke=rikkoi: +alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} sijainnissa: {3} +alertPlaced=laittoi: +alertUsed=k\u00e4ytti: +autoAfkKickReason=Sinut on potkittu, koska olit tekem\u00e4tt\u00e4 mit\u00e4\u00e4n {0} minuuttia. +backAfterDeath=\u00a77K\u00e4yt\u00e4 /back komentoa p\u00e4\u00e4st\u00e4ksesi takaisin sijaintiin, jossa kuolit. +backUsageMsg=\u00a77Palautetaan \u00e4skeiseen sijaintiin. +backupDisabled=Ulkoista varmuuskopio koodia ei ole konfiguroitu. +backupFinished=Varmuuskopiointi suoritettu +backupStarted=Varmuuskopiointi aloitettu +balance=\u00a77Rahatilanne: {0} +balanceTop=\u00a77Top rahatilanteet ({0}) +banExempt=\u00a7cEt voi bannia pelaajaa. +banIpAddress=\u00a77Bannattu IP osoite +bannedIpsFileError=Virhe luettaessa banned-ips.txt tiedostoa +bannedIpsFileNotFound=banned-ips.txt tiedostoa ei l\u00f6ydy +bannedPlayersFileError=Virhe luettaessa banned-players.txt tiedostoa +bannedPlayersFileNotFound=banned-players.txt ei l\u00f6ydy +bigTreeFailure=\u00a7cIson puun luominen ep\u00e4onnistui. Yrit\u00e4 uudelleen nurmikolla tai mullalla. +bigTreeSuccess= \u00a77Iso puu luotu. +blockList=Essentials siirsi seuraavat komennot muihin plugineihin: +broadcast=[\u00a7cIlmoitus\u00a7f]\u00a7a {0} +buildAlert=\u00a7cSinulla ei ole oikeuksia rakentaa +bukkitFormatChanged=Bukkitin versiomuoto muuttui. Versiota ei ole tarkistettu. +burnMsg=\u00a77Asetit pelaajan {0} tuleen {1} sekunniksi. +canTalkAgain=\u00a77Voit taas puhua +cantFindGeoIpDB=Ei l\u00f6ydetty GeoIP tietokantaa! +cantReadGeoIpDB=Ei pystytty lukemaan GeoIP tietokantaa! +cantSpawnItem=\u00a7cSinulla ei ole oikeutta luoda tavaraa {0} +chatTypeLocal=[L] +chatTypeSpy=[Spy] +commandFailed=Komento {0} ep\u00e4onnistui: +commandHelpFailedForPlugin=Virhe haettaessa apua komennoista: {0} +commandNotLoaded=\u00a7cKomento {0} on v\u00e4\u00e4rin ladattu. +compassBearing=\u00a77Osoittaa: {0} ({1} astetta). +configFileMoveError=Virhe siirrett\u00e4ess\u00e4 tiedostoa config.yml varmuuskopio sijaintiin. +configFileRenameError=Virhe nimett\u00e4ess\u00e4 tiedostoa temp tiedostoon config.yml +connectedPlayers=Liittyneet pelaajat: +connectionFailed=Virhe avattaessa yhteytt\u00e4. +cooldownWithMessage=\u00a7cJ\u00e4\u00e4htyminen: {0} +corruptNodeInConfig=\u00a74Huom: Sinun konfigurointi tiedostossa on virhe {0}. +couldNotFindTemplate=Ei l\u00f6ydetty mallia {0} +creatingConfigFromTemplate=Luodaan config tiedostoa mallista: {0} +creatingEmptyConfig=Luodaan tyhj\u00e4\u00e4 config tiedostoa: {0} +creative=luova +currency={0}{1} +currentWorld=T\u00e4m\u00e4nhetkinen maailma: {0} +day=p\u00e4iv\u00e4 +days=p\u00e4iv\u00e4\u00e4 +defaultBanReason=Ban Nuija on puhunut! +deleteFileError=Ei voida poistaa tiedostoa: {0} +deleteHome=\u00a77Koti {0} on poistettu. +deleteJail=\u00a77Vankila {0} on poistettu. +deleteWarp=\u00a77Warp {0} on poistettu. +deniedAccessCommand={0} p\u00e4\u00e4sy komentoon ev\u00e4ttiin. +dependancyDownloaded=[Essentials] Tarvittu tiedosto {0} ladattu onnistuneesti. +dependancyException=[Essentials] Virhe ladattaessa tarvittua tiedostoa +dependancyNotFound=[Essentials] Tarvittua tiedostoa ei l\u00f6ydy, ladataan nyt. +depth=\u00a77Olet merenpinnan tasolla. +depthAboveSea=\u00a77Olet {0} palikkaa meritason yl\u00e4puolella. +depthBelowSea=\u00a77Olet {0} palikkaa meritason alapuolella. +destinationNotSet=Sijaintia ei ole m\u00e4\u00e4ritetty +disableUnlimited=\u00a77Poistettu k\u00e4yt\u00f6st\u00e4 loputon laittaminen tavaralta "{0}", pelaajalta {1}. +disabled=poissa k\u00e4yt\u00f6st\u00e4 +disabledToSpawnMob=T\u00e4m\u00e4n mobin luominen on poistettu k\u00e4yt\u00f6st\u00e4 config tiedostossa. +dontMoveMessage=\u00a77Teleportataan {0} kuluttua. \u00c4l\u00e4 liiku. +downloadingGeoIp=Ladataan GeoIP tietokantaa ... t\u00e4m\u00e4 voi vied\u00e4 hetken (maa: 0.6 MB, kaupunki: 20MB) +duplicatedUserdata=Kopioitu k\u00e4ytt\u00e4j\u00e4n tiedot: {0} ja {1} +durability=\u00a77T\u00e4ll\u00e4 ty\u00f6kalulla on \u00a7c{0}\u00a77 k\u00e4ytt\u00f6kertaa j\u00e4ljell\u00e4 +enableUnlimited=\u00a77Annetaan loputon m\u00e4\u00e4r\u00e4 tavaraa "{0}" pelaajalle {1}. +enabled=k\u00e4yt\u00f6ss\u00e4 +enchantmentApplied = \u00a77Parannus "{0}" on lis\u00e4tty tavaraan k\u00e4dess\u00e4si. +enchantmentNotFound = \u00a7cParannusta ei l\u00f6ydetty +enchantmentPerm = \u00a7cSinulla ei ole oikeutta {0} +enchantmentRemoved = \u00a77Parannus {0} on poistettu tavarasta k\u00e4dess\u00e4si. +enchantments = \u00a77Parannukset: {0} +errorCallingCommand=Virhe kutsuttaessa komentoa /{0} +errorWithMessage=\u00a7cVirhe: {0} +essentialsHelp1=Tiedosto on viallinen ja Essentials ei voi avata sit\u00e4. Essentials on nyt poistettu k\u00e4yt\u00f6st\u00e4. Jos et voi korjata tiedostoa itse, mene osoitteeseen http://tiny.cc/EssentialsChat +essentialsHelp2=Tiedosto on viallinen ja Essentials ei voi avata sit\u00e4. Essentials on nyt poistettu k\u00e4yt\u00f6st\u00e4. Jos et voi korjata tiedostoa itse, kirjoita /essentialshelp peliss\u00e4 tai mene osoitteeseen http://tiny.cc/EssentialsChat +essentialsReload=\u00a77Essentials ladattu uudelleen. Versio: {0} +exp=Pelaajalla \u00a7c{0} \u00a77on\u00a7c {1} \u00a77expi\u00e4 (taso\u00a7c {2}\u00a77) ja tarvitsee\u00a7c {3} \u00a77lis\u00e4\u00e4 expi\u00e4 seuravaan tasoon. +expSet=Pelaajalla\u00a7c{0} \u00a77on nyt\u00a7c {1} \u00a77expi\u00e4. +extinguish=\u00a77Sammutit itsesi. +extinguishOthers=\u00a77Sammutit pelaajan {0}. +failedToCloseConfig=Virhe suljettaessa tiedostoa config {0} +failedToCreateConfig=Virhe luotaessa tiedostoa config {0} +failedToWriteConfig=Virhe muokattaessa tiedostoa config {0} +false=v\u00e4\u00e4r\u00e4 +feed=\u00a77Ruokahalusi on tyydytetty. +feedOther=\u00a77Tyydytit ruokahalun pelaajalta {0}. +fileRenameError={0} uudelleen nime\u00e4minen ep\u00e4onnistui +flyMode=\u00a77Lento {0} pelaajalla {1}. +foreverAlone=\u00a7cSinulla ei ole ket\u00e4\u00e4n kenelle vastata. +freedMemory=Vapaata muistia {0} MB. +gameMode=\u00a77Asetit pelimuodon "{0}" pelaajalle {1}. +gcchunks= chunkkia, +gcentities= kokonaisuutta +gcfree=Vapaa muisti: {0} MB +gcmax=Maksimi muisti: {0} MB +gctotal=Sallittu muisti: {0} MB +geoIpUrlEmpty=GeoIP latausosoite on tyhj\u00e4. +geoIpUrlInvalid=GeoIP latausosoite on viallinen. +geoipJoinFormat=Pelaaja {0} tulee maasta {1} +godDisabledFor=poistettu pelaajalta {0} +godEnabledFor=laitettu pelaajalle {0} +godMode=\u00a77God muoto {0}. +hatArmor=\u00a7cVirhe, et voi k\u00e4ytt\u00e4\u00e4 t\u00e4t\u00e4 tavaraa hattuna! +hatFail=\u00a7cSinulla tulee olla jotain k\u00e4dess\u00e4si, mit\u00e4 k\u00e4ytt\u00e4\u00e4 hattuna. +hatPlaced=\u00a7eNauti uudesta hatustasi! +haveBeenReleased=\u00a77Sinut on vapautettu +heal=\u00a77Sinut on parannettu. +healOther=\u00a77Paransit pelaajan {0}. +helpConsole=Katsoaksesi apua konsolista, kirjoita ?. +helpFrom=\u00a77Komennot {0}: +helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Komennot "{0}": +helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} +helpPages=Sivu \u00a7c{0}\u00a7f / \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Plugin apu: /help {1} +holeInFloor=Reik\u00e4 lattiassa +homeSet=\u00a77Koti asetettu. +homeSetToBed=\u00a77Sinun koti on nyt asetettu t\u00e4h\u00e4n s\u00e4nkyyn. +homes=Kodit: {0} +hour=tunti +hours=tunnit +ignorePlayer=J\u00e4tit huomiotta pelaajan {0}. +illegalDate=Laiton p\u00e4iv\u00e4m\u00e4\u00e4r\u00e4n muoto. +infoChapter=Valitse luku: +infoChapterPages=Luku {0}, sivu \u00a7c{1}\u00a7f / \u00a7c{2}\u00a7f: +infoFileDoesNotExist=Tiedostoa info.txt ei ole olemassa. Luodaan. +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Sivu \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- +infoUnknownChapter=Tuntematon luku. +invBigger=Toisen pelaajan reppu on isompi kuin sinun. +invRestored=Sinun reppusi on palautettu. +invSee=N\u00e4et pelaajan {0} repun. +invSeeHelp=K\u00e4yt\u00e4 /invsee kun haluat palauttaa oman reppusi. +invalidCharge=\u00a7cMit\u00e4t\u00f6n m\u00e4\u00e4r\u00e4ys. +invalidHome=Kotia {0} ei ole olemassa +invalidMob=Kelvoton mobin tyyppi. +invalidServer=Kelvoton palvelin! +invalidSignLine=Kyltin rivi {0} on viallinen. +invalidWorld=\u00a7cKelvoton maailma. +inventoryCleared=\u00a77Reppu tyhjennetty. +inventoryClearedOthers=\u00a77Pelaajan \u00a7c{0}\u00a77 reppu on tyhjennetty. +is=on +itemCannotBeSold=Tuota tavaraa ei voi myyd\u00e4 t\u00e4ll\u00e4 palvelimella. +itemMustBeStacked=Tavara pit\u00e4\u00e4 vaihtaa pakattuina. M\u00e4\u00e4r\u00e4 2s olisi kaksi pakettia, jne. +itemNotEnough1=\u00a7cSinulla ei ole tarpeeksi tavaraa jota myyd\u00e4. +itemNotEnough2=\u00a77Jos haluat myyd\u00e4 kaikki tuon tyypin tavarat, k\u00e4yt\u00e4 /sell tavarannimi +itemNotEnough3=\u00a77/sell itemname -1 myy kaiken paitsi yhden, jne. +itemSellAir=Yritit myyd\u00e4 ilmaa? Laita tavara k\u00e4teesi ja yrit\u00e4 uudelleen. +itemSold=\u00a77Myy \u00a7c{0} \u00a77({1} {2} hintaan {3} kpl) +itemSoldConsole={0} sold {1} for \u00a77{2} \u00a77({3} items at {4} each) +itemSpawn=\u00a77Annetaan {0} kpl {1} +itemsCsvNotLoaded=Ei voida ladata tiedostoa items.csv. +jailAlreadyIncarcerated=\u00a7cPelaaja on jo vankilassa: {0} +jailMessage=\u00a7cSin\u00e4 teet rikoksen, istut my\u00f6s sen mukaan. +jailNotExist=Tuota vankilaa ei ole olemassa. +jailReleased=\u00a77Pelaaja \u00a7e{0}\u00a77 vapautettu. +jailReleasedPlayerNotify=\u00a77Sinut on vapautettu! +jailSentenceExtended=Vankila aika pidennetty: {0) +jailSet=\u00a77Vankila {0} on asetettu +jumpError=Tuo vahingoittaisi koneesi aivoja. +kickDefault=Potkittu palvelimelta +kickExempt=\u00a7cEt voi potkia h\u00e4nt\u00e4. +kickedAll=\u00a7cPotkittu kaikki pelaajat palvelimelta +kill=\u00a77Tappoi {0}. +kitError2=\u00a7cTuota pakkausta ei ole olemassa tai se on v\u00e4\u00e4rin muokattu. +kitError=\u00a7cEi ole sopivia pakkauksia. +kitErrorHelp=\u00a7cEhk\u00e4 tavaralle ei ole m\u00e4\u00e4ritetty m\u00e4\u00e4r\u00e4\u00e4 configissa? +kitGive=\u00a77Annetaan pakkausta "{0}". +kitInvFull=\u00a7cSinun reppusi on t\u00e4ynn\u00e4, laitetaan tavarat maahan +kitTimed=\u00a7cAika, jota ennen et voi k\u00e4ytt\u00e4\u00e4 t\u00e4t\u00e4 pakkausta uudelleen: {0}. +kits=\u00a77Pakkaukset: {0} +lightningSmited=\u00a77Sinut on salamoitu +lightningUse=\u00a77Salamoidaan {0} +listAfkTag = \u00a77[AFK]\u00a7f +listAmount = \u00a79Pelaajia palvelimella \u00a7c{0}\u00a79 / \u00a7c{1}\u00a79. +listAmountHidden = \u00a79Pelaajia palvelimella \u00a7c{0}\u00a77/{1}\u00a79 / \u00a7c{2}\u00a79. +listGroupTag={0}\u00a7f: +listHiddenTag = \u00a77[HIDDEN]\u00a7f +loadWarpError=Virhe ladattaessa warppia {0} +localFormat=Paikallinen: <{0}> {1} +mailClear=\u00a7cPoistaaksesi viestisi, kirjoita /mail clear +mailCleared=\u00a77Viestit poistettu! +mailSent=\u00a77Viesti l\u00e4hetetty! +markMailAsRead=\u00a7cMerkitse viestit luetuiksi, kirjoita /mail clear +markedAsAway=\u00a77Sinut on laitettu poissaolevaksi. +markedAsNotAway=\u00a77Sinua ei ole en\u00e4\u00e4 laitettu poissaolevaksi. +maxHomes=Voit asettaa maksimissaan {0} kotia. +mayNotJail=\u00a7cEt voi laittaa tuota pelaajaa vankilaan +me=min\u00e4 +minute=minuutti +minutes=minuuttia +missingItems=Sinulla ei ole {0}kpl {1}. +missingPrefixSuffix=Puuttuu etuliite tai takaliite {0} +mobSpawnError=Virhe vaihdettaessa mob-luojan tyyppi\u00e4. +mobSpawnLimit=Mobien m\u00e4\u00e4r\u00e4 rajoitettu palvelimen maksimim\u00e4\u00e4r\u00e4\u00e4n +mobSpawnTarget=Kohteen pit\u00e4\u00e4 olla mob-luoja palikka. +mobsAvailable=\u00a77Mobit: {0} +moneyRecievedFrom=\u00a7a{0} on vastaanotettu pelaajalta {1} +moneySentTo=\u00a7a{0} on l\u00e4hetetty pelaajalle {1} +moneyTaken={0} veloitettiin sinun tililt\u00e4si. +month=kuukausi +months=kuukaudet +moreThanZero=M\u00e4\u00e4r\u00e4n pit\u00e4\u00e4 olla enemm\u00e4n kuin 0. +msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cEt voi hiljent\u00e4\u00e4 tuota pelaajaa. +mutedPlayer=Pelaaja {0} hiljennetty. +mutedPlayerFor=Pelaaja {0} hiljennetty, koska {1}. +mutedUserSpeaks={0} yritti puhua, mutta oli hiljennetty. +nearbyPlayers=Pelaajat l\u00e4hell\u00e4: {0} +negativeBalanceError=Pelaajalla ei ole mahdollista olla negatiivist\u00e4 m\u00e4\u00e4r\u00e4\u00e4 rahaa. +nickChanged=Lempinimi vaihdettu. +nickDisplayName=\u00a77Sinun tulee ottaa k\u00e4ytt\u00f6\u00f6n change-displayname Essentialsin config-tiedostosta. +nickInUse=\u00a7cSe nimi on jo k\u00e4yt\u00f6ss\u00e4. +nickNamesAlpha=\u00a7cLempinimen pit\u00e4\u00e4 olla aakkosista. +nickNoMore=\u00a77Sinulla ei ole en\u00e4\u00e4 lempinime\u00e4. +nickOthersPermission=\u00a7cSinulla ei ole oikeutta vaihtaa muiden lempinimi\u00e4 +nickSet=\u00a77Lempinimesi on nyt \u00a7c{0} +noAccessCommand=\u00a7cSinulla ei ole oikeutta tuohon komentoon. +noAccessPermission=\u00a7cSinulla ei ole oikeutta tuohon {0}. +noBreakBedrock=Sinulla ei ole lupaa tuhota bedrock-palikoita. +noDestroyPermission=\u00a7cSinulla ei ole lupaa tuhota sit\u00e4 {0}. +noDurability=\u00a7cT\u00e4ll\u00e4 tavaralla ei ole kestoa. +noGodWorldWarning=\u00a7cVaroitus! God muoto ei ole k\u00e4yt\u00f6ss\u00e4 t\u00e4ss\u00e4 maailmassa. +noHelpFound=\u00a7cEi komentoja. +noHomeSet=Et ole asettanut kotia. +noHomeSetPlayer=Pelaaja ei ole asettanut kotia. +noKitPermission=\u00a7cTarvitset \u00a7c{0}\u00a7c oikeuden, jotta voit k\u00e4ytt\u00e4\u00e4 tuota pakkausta. +noKits=\u00a77Ei pakkauksia saatavilla viel\u00e4 +noMail=Ei uusia viestej\u00e4 +noMotd=\u00a7cEi ole p\u00e4iv\u00e4n viesti\u00e4. +noNewMail=\u00a77Ei viestej\u00e4. +noPendingRequest=Sinulla ei ole odottavia pyynt\u00f6j\u00e4. +noPerm=\u00a7cSinulla ei ole \u00a7f{0}\u00a7c oikeuksia. +noPermToSpawnMob=\u00a7cSinulla ei ole lupaa luoda t\u00e4t\u00e4 mobia. +noPlacePermission=\u00a7cSinulla ei ole lupaa laittaa palikoita l\u00e4helle tuota kyltti\u00e4. +noPowerTools=Ei voimaty\u00f6kaluja laitettu. +noRules=\u00a7cEi ole s\u00e4\u00e4nt\u00f6j\u00e4 viel\u00e4. +noWarpsDefined=Ei warppeja +none=ei mit\u00e4\u00e4n +notAllowedToQuestion=\u00a7cSinulla ei ole lupaa k\u00e4ytt\u00e4\u00e4 kysymyst\u00e4. +notAllowedToShout=\u00a7cSinulla ei ole lupaa huutaa. +notEnoughExperience=Sinulla ei ole tarpeeksi kokemusta. +notEnoughMoney=Sinulla ei ole riitt\u00e4v\u00e4sti rahaa. +notRecommendedBukkit= * ! * Bukkit versio ei ole suositeltu t\u00e4m\u00e4n Essentials version kanssa. +notSupportedYet=Ei tueta viel\u00e4. +nothingInHand = \u00a7cSinulla ei ole mit\u00e4\u00e4n k\u00e4dess\u00e4si. +now=nyt +nuke=Antaa kuoleman sateen kohdata heid\u00e4t +numberRequired=Numero menee tuohon, h\u00f6lm\u00f6. +onlyDayNight=/time tukee vain day/night. +onlyPlayers=Vain peliss\u00e4 olevat pelaajat voivat k\u00e4ytt\u00e4\u00e4 {0}. +onlySunStorm=/weather tukee vain sun/storm. +orderBalances=J\u00e4rjestet\u00e4\u00e4n rahatilanteita {0}, odota... +pTimeCurrent=Pelaajan \u00a7e{0}\u00a7f aika on {1}. +pTimeCurrentFixed=Pelaajan \u00a7e{0}\u00a7f aika on korjattu {1}. +pTimeNormal=Pelaajan \u00a7e{0}\u00a7f aika on normaali ja vastaa palvelimen aikaa. +pTimeOthersPermission=\u00a7cSinulla ei ole lupaa muokata muiden pelaajien aikaa. +pTimePlayers=N\u00e4ill\u00e4 pelaajilla on k\u00e4yt\u00f6ss\u00e4 heid\u00e4n oma aika: +pTimeReset=Pelaajan aika on resetoitu: \u00a7e{0} +pTimeSet=Pelaajan aika on asetettu \u00a73{0}\u00a7f koska: \u00a7e{1} +pTimeSetFixed=Pelaajan aika on korjattu \u00a73{0}\u00a7f koska: \u00a7e{1} +parseError=Virhe tarkistettaessa {0} rivill\u00e4 {1} +pendingTeleportCancelled=\u00a7cOdottava teleporttipyynt\u00f6 peruttu. +permissionsError=Puuttuu Permissions/GroupManager; keskustelun etu- ja takaliitteet poistettu k\u00e4yt\u00f6st\u00e4. +playerBanned=\u00a7cPelaaja {0} bannasi pelaajan {1} syyst\u00e4 {2} +playerInJail=\u00a7cPelaaja on jo vankilassa {0}. +playerJailed=\u00a77Pelaaja {0} laitettu vankilaan. +playerJailedFor= \u00a77Pelaaja {0} laitettu vankilaan, koska {1}. +playerKicked=\u00a7cPelaaja {0} potki pelaajan {1} koska {2} +playerMuted=\u00a77Sinut on hiljennetty +playerMutedFor=\u00a77Sinut on hiljennetty, koska {0} +playerNeverOnServer=\u00a7cPelaaja {0} ei ole koskaan ollut t\u00e4ll\u00e4 palvelimella. +playerNotFound=\u00a7cPelaajaa ei l\u00f6ydetty. +playerUnmuted=\u00a77Sin\u00e4 voit taas puhua +pong=Pong! +possibleWorlds=\u00a77Mahdollisia maailmoja on numerot v\u00e4lilt\u00e4 0 - {0}. +powerToolAir=Komentoa ei voi liitt\u00e4\u00e4 k\u00e4teen. +powerToolAlreadySet=Komento \u00a7c{0}\u00a7f on liitetty kohteeseen {1}. +powerToolAttach=\u00a7c{0}\u00a7f komento liitetty kohteeseen {1}. +powerToolClearAll=Kaikki voimaty\u00f6kalun komennot on poistettu. +powerToolList={1} omistaa seuraavat komennot: \u00a7c{0}\u00a7f. +powerToolListEmpty={0} ei ole komentoja liitetty. +powerToolNoSuchCommandAssigned=Komentoa \u00a7c{0}\u00a7f ei ole liitetty kohteeseen {1}. +powerToolRemove=Komento \u00a7c{0}\u00a7f poistettu kohteesta {1}. +powerToolRemoveAll=Kaikki komennot poistettu kohteesta {0}. +powerToolsDisabled=Kaikki voimaty\u00f6kalut on poistettu k\u00e4yt\u00f6st\u00e4. +powerToolsEnabled=Kaikki voimaty\u00f6alut on otettu k\u00e4ytt\u00f6\u00f6n. +protectionOwner=\u00a76[EssentialsProtect] Suojauksen omistaja: {0} +questionFormat=\u00a77[Question]\u00a7f {0} +readNextPage=Kirjoita /{0} {1} lukeaksesi seuraavan sivun +reloadAllPlugins=\u00a77Kaikki pluginit uudelleen ladattu. +removed=\u00a77Poistettu {0} kokonaisuutta. +repair=Onnistuneesti korjasit ty\u00f6kalun: \u00a7e{0}. +repairAlreadyFixed=\u00a77T\u00e4m\u00e4 tavara ei kaipaa korjaamista. +repairEnchanted=\u00a77Sinulla ei ole lupaa korjata kehitettyj\u00e4 tavaroita. +repairInvalidType=\u00a7cT\u00e4t\u00e4 tavaraa ei voi korjata. +repairNone=Ei ollut tavaroita, jotka olivat korjauksen tarpeessa. +requestAccepted=\u00a77Teleporttaus pyynt\u00f6 hyv\u00e4ksytty. +requestAcceptedFrom=\u00a77{0} hyv\u00e4ksyi sinun teleportti pyynn\u00f6n. +requestDenied=\u00a77Teleporttaus pyynt\u00f6 kielletty. +requestDeniedFrom=\u00a77{0} kielt\u00e4ytyi sinun teleportti pyynn\u00f6st\u00e4. +requestSent=\u00a77Pyynt\u00f6 l\u00e4hetetty pelaajalle {0}\u00a77. +requestTimedOut=\u00a7cTeleportti pyynt\u00f6 aikakatkaistiin +requiredBukkit= * ! * Tarvitset v\u00e4hint\u00e4\u00e4n {0} version CraftBukkitista, lataa se osoitteesta http://dl.bukkit.org/downloads/craftbukkit/ +returnPlayerToJailError=Virhe laitettaessa pelaaja {0} takaisin vankilaan: {1} +second=sekunti +seconds=sekuntia +seenOffline=Pelaaja {0} on ollut offline jo {1} +seenOnline=Pelaaja {0} on ollut online jo {1} +serverFull=Palvelin on t\u00e4ynn\u00e4 +serverTotal=Palvelimen kokonaism\u00e4\u00e4r\u00e4m\u00e4\u00e4r\u00e4: {0} +setSpawner=Vaihdettu mob-luojan tyyppi {0} +sheepMalformedColor=Viallinen v\u00e4ri. +shoutFormat=\u00a77[Huuto]\u00a7f {0} +signFormatFail=\u00a74[{0}] +signFormatSuccess=\u00a71[{0}] +signFormatTemplate=[{0}] +signProtectInvalidLocation=\u00a74Sinulla ei ole lupaa laittaa kyltti\u00e4 t\u00e4h\u00e4n. +similarWarpExist=Tuon niminen warp on jo olemassa. +slimeMalformedSize=Viallinen koko. +soloMob=Tuo mob tykk\u00e4\u00e4 olevan yksin +spawnSet=\u00a77Spawn sijainti m\u00e4\u00e4ritetty ryhm\u00e4lle {0}. +spawned=luotu +sudoExempt=Et voi sudoa t\u00e4t\u00e4 pelaajaa +sudoRun=Pakotetaan {0} suorittamaan: /{1} {2} +suicideMessage=\u00a77Hyv\u00e4sti julma maailma... +suicideSuccess= \u00a77{0} riisti oman henkens\u00e4 +survival=selviytyminen +takenFromAccount=\u00a7c{0} on veloitettu tililt\u00e4si. +takenFromOthersAccount=\u00a7c{0} veloitettu pelaajan {1}\u00a7c tililt\u00e4. Uusi rahatilanne: {2} +teleportAAll=\u00a77Teleporttaus pyynt\u00f6 l\u00e4hetetty kaikille pelaajille... +teleportAll=\u00a77Teleportataan kaikki pelaajat... +teleportAtoB=\u00a77{0}\u00a77 teleporttasi sinun luokse {1}\u00a77. +teleportDisabled=Pelaajalla {0} on teleporttaus poissa k\u00e4yt\u00f6st\u00e4. +teleportHereRequest=\u00a7c{0}\u00a7c on pyyt\u00e4nyt, ett\u00e4 sin\u00e4 teleporttaat heid\u00e4n luokseen. +teleportNewPlayerError=Virhe teleportattaessa uutta pelaajaa +teleportRequest=\u00a7c{0}\u00a7c on pyyt\u00e4nyt lupaa sinun luokse teleporttaamiseen. +teleportRequestTimeoutInfo=\u00a77T\u00e4m\u00e4 pyynt\u00f6 aikakatkaistaan {0} sekunnin kuluttua. +teleportTop=\u00a77Teleportataan p\u00e4\u00e4lle. +teleportationCommencing=\u00a77Teleportataan... +teleportationDisabled=\u00a77Teleporttaus poistettu k\u00e4yt\u00f6st\u00e4. +teleportationEnabled=\u00a77Teleportation otettu k\u00e4ytt\u00f6\u00f6n. +teleporting=\u00a77Teleportataan... +teleportingPortal=\u00a77Teleportataan portaalin kautta. +tempBanned=Olet v\u00e4liaikaisesti bannattu palvelimelta, koska {0} +tempbanExempt=\u00a77Et voi bannia tuota pelaajaa +thunder= Myrsky {0} maailmassasi +thunderDuration=Myrsky {0} maailmassasi {1} sekuntia. +timeBeforeHeal=Aika ennen seuraavaa parannusta: {0} +timeBeforeTeleport=Aika ennen seuraavaa teleporttausta: {0} +timeFormat=\u00a73{0}\u00a7f tai \u00a73{1}\u00a7f tai \u00a73{2}\u00a7f +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=Aika asetettu kaikissa maailmoissa. +timeSetPermission=\u00a7cSinulla ei ole lupaa vaihtaa aikaa. +timeWorldCurrent=T\u00e4m\u00e4nhetkinen aika maailmassa {0} on \u00a73{1} +timeWorldSet=Aika vaihdettiin {0} maailmassa: \u00a7c{1} +tps=T\u00e4m\u00e4nhetkinen TPS = {0} +tradeCompleted=\u00a77Vaihto suoritettu. +tradeSignEmpty=Vaihtokyltill\u00e4 ei ole mit\u00e4\u00e4n tarjolla sinulle. +tradeSignEmptyOwner=Ei ole mit\u00e4\u00e4n mit\u00e4 ker\u00e4t\u00e4 t\u00e4st\u00e4 vaihtokyltist\u00e4. +treeFailure=\u00a7cPuun luominen ep\u00e4onnistui. Yrit\u00e4 uudelleen nurmikolla tai mullalla. +treeSpawned=\u00a77Puu luotu. +true=totta +typeTpaccept=\u00a77Hyv\u00e4ksy\u00e4ksesi, kirjoita \u00a7c/tpaccept\u00a77. +typeTpdeny=\u00a77Kielt\u00e4\u00e4ksesi, kirjoita \u00a7c/tpdeny\u00a77. +typeWorldName=\u00a77Voit my\u00f6s laittaa maailman nimen. +unableToSpawnMob=Ei voida luoda mobia. +unbannedIP=Unbanned IP osoite. +unbannedPlayer=Unbanned pelaaja. +unignorePlayer=Otat taas huomioon pelaajan {0}. +unknownItemId=Tuntematon tavaran ID: {0} +unknownItemInList=Tuntematon tavara {0} listassa {1}. +unknownItemName=Tuntematon tavaran nimi: {0} +unlimitedItemPermission=\u00a7cEi lupaa loputtomalle tavaralle {0}. +unlimitedItems=Loputtomat tavarat: +unmutedPlayer=Pelaajat {0} voi taas puhua. +unvanished=\u00a7aOlet taas n\u00e4kyvill\u00e4. +unvanishedReload=\u00a7cSinut on pakotettu taas n\u00e4kyv\u00e4ksi uudelleen latauksen vuoksi. +upgradingFilesError=Virhe p\u00e4ivitett\u00e4ess\u00e4 tiedostoja +userDoesNotExist=Pelaajaa {0} ei ole olemassa. +userIsAway={0} on nyt AFK +userIsNotAway={0} ei ole en\u00e4\u00e4 AFK +userJailed=\u00a77Sinut on laitettu vankilaan +userUsedPortal={0} k\u00e4ytti portaalia. +userdataMoveBackError=Virhe siirrett\u00e4ess\u00e4 k\u00e4ytt\u00e4j\u00e4n tietoja/{0}.tmp k\u00e4ytt\u00e4j\u00e4n tietoihin/{1} +userdataMoveError=Virhe siirrett\u00e4ess\u00e4 k\u00e4ytt\u00e4j\u00e4n tietoja/{0} k\u00e4ytt\u00e4j\u00e4n tietoihin/{1}.tmp +usingTempFolderForTesting=K\u00e4ytet\u00e4\u00e4n v\u00e4liaikaista kansiota testaukseen: +vanished=\u00a7aOlet n\u00e4kym\u00e4t\u00f6n. +versionMismatch=Versiot eiv\u00e4t t\u00e4sm\u00e4\u00e4! P\u00e4ivit\u00e4 {0} samaan versioon. +versionMismatchAll=Versiot eiv\u00e4t t\u00e4sm\u00e4\u00e4! P\u00e4ivit\u00e4 kaikki Essentialsin jar tiedostot samaan versioon. +voiceSilenced=\u00a77Sinun \u00e4\u00e4ni on hiljennetty +warpDeleteError=Virhe poistettaessa warp tiedostoa. +warpListPermission=\u00a7cSinulla ei ole oikeuksia n\u00e4hd\u00e4 warp-listaa. +warpNotExist=Tuota warppia ei ole olemassa. +warpOverwrite=\u00a7cEt voi korvata tuota warppia. +warpSet=\u00a77Warp {0} asetettu. +warpUsePermission=\u00a7cSinulla ei ole oikeutta k\u00e4ytt\u00e4\u00e4 tuota warppia. +warpingTo=\u00a77Sinut warpataan pian kohteeseen {0}. +warps=Warpit: {0} +warpsCount=\u00a77Warppeja on {0} kpl. N\u00e4ytet\u00e4\u00e4n sivu {1} / {2}. +weatherStorm=\u00a77Laitoit myrskyn maailmaan {0} +weatherStormFor=\u00a77Laitoit myrskyn maailmaan {0} {1} sekunniksi +weatherSun=\u00a77Laitoit auringon paistamaan maailmaan {0} +weatherSunFor=\u00a77Laitoit auringon paistamaan maailmaan {0} {1} sekunniksi +whoisBanned=\u00a76 - Banned:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Level {1}) +whoisGamemode=\u00a76 - Gamemode:\u00a7f {0} +whoisGeoLocation=\u00a76 - Location:\u00a7f {0} +whoisGod=\u00a76 - God mode:\u00a7f {0} +whoisHealth=\u00a76 - Health:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP Address:\u00a7f {0} +whoisJail=\u00a76 - Jail:\u00a7f {0} +whoisLocation=\u00a76 - Location:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Money:\u00a7f {0} +worth=\u00a77Pino tavaraa "{0}" on arvoltaan \u00a7c{1}\u00a77 ({2} tavara(a) = {3} kappale) +worthMeta=\u00a77Pino tavaraa "{0}" metadatan kanssa {1} on arvoltaan \u00a7c{2}\u00a77 ({3} tavara(a) = {4} kappale) +worthSet=Arvo asetettu +year=vuosi +years=vuosia +youAreHealed=\u00a77Sinut on parannettu. +youHaveNewMail=\u00a7cSinulla on {0} viesti(\u00e4)!\u00a7f Kirjoita \u00a77/mail read\u00a7f lukeaksesi viestit. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== +walking=walking +chatTypeAdmin=[A] +flying=flying +hatEmpty=\u00a7cYou are not wearing a hat. +notFlying=not flying +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 0c4b94efc..46053ad6c 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -5,6 +5,7 @@ action=* {0} {1} addedToAccount=\u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 \u00e0 votre compte. addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} +adventure = adventure alertBroke=a cass\u00e9 : alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3} alertPlaced=a plac\u00e9 : @@ -35,6 +36,7 @@ cantFindGeoIpDB=N'arrive pas \u00e0 trouver la base de donn\u00e9es GeoIP! cantReadGeoIpDB=Echec de la lecture de la base de donn\u00e9es GeoIP! cantSpawnItem=\u00a7cVous n''avez pas le droit de faire appara\u00c3\u00aetre {0} chatTypeLocal=[L] +chatTypeAdmin=[A] chatTypeSpy=[Spy] commandFailed=\u00c9chec de la commande {0} : commandHelpFailedForPlugin=Erreur d''obtention d''aide pour : {0} @@ -42,7 +44,7 @@ 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 sauvegarde. configFileRenameError=\u00c9chec du changement de nom du fichier temporaire de config.yml -connectedPlayers=Joueurs connect\u00e9s : +connectedPlayers=Joueurs connect\u00e9s : connectionFailed=\u00c9chec de l'ouverture de la connexion. cooldownWithMessage=\u00a7cR\u00e9utilisation : {0} corruptNodeInConfig=\u00a74Annonce : Votre fichier de configuration a un {0} n\u0153ud corrompu. @@ -51,6 +53,7 @@ creatingConfigFromTemplate=Cr\u00e9ation de la configuration \u00e0 partir du mo creatingEmptyConfig=Cr\u00e9ation d''une configuration vierge : {0} creative=cr\u00e9atif currency={0}{1} +currentWorld=Current World: {0} day=jour days=jours defaultBanReason=Le marteau du bannissement a frapp\u00e9 ! @@ -72,6 +75,7 @@ disabledToSpawnMob=Spawning this mob was disabled in the config file. dontMoveMessage=\u00a77La t\u00e9l\u00e9portation commence dans {0}. Ne bougez pas. downloadingGeoIp=T\u00e9l\u00e9chargement de la base de donn\u00e9es GeoIP ... Cela peut prendre un moment (Pays : 0.6 Mo, villes : 20Mo) duplicatedUserdata=Donn\u00e9e utilisateur dupliqu\u00e9e : {0} et {1} +durability=\u00a77This tool has \u00a7c{0}\u00a77 uses left enableUnlimited=\u00a77Quantit\u00e9 illimit\u00e9e de {0} \u00e0 {1}. enabled=activ\u00e9 enchantmentApplied = \u00a77L''enchantement {0} a \u00e9t\u00e9 appliqu\u00e9 \u00e0 l''objet dans votre main. @@ -84,16 +88,19 @@ errorWithMessage=\u00a7cErreur : {0} essentialsHelp1=Le fichier est corrompuet Essentials ne peut l'ouvrir. Essentials est maintenant d\u00e9sactiv\u00e9. Si vous ne pouvez corriger vous-m\u00eame, aller \u00e0 http://tiny.cc/EssentialsChat essentialsHelp2=Le fichier est corrompuet Essentials ne peut l'ouvrir. Essentials est maintenant d\u00e9sactiv\u00e9. Si vous ne pouvez corriger vous-m\u00eame, tapez /essentialshelp ou aller \u00e0 http://tiny.cc/EssentialsChat essentialsReload=\u00a77Essentials {0} a \u00e9t\u00e9 recharg\u00e9. +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. extinguish=\u00a77Vous cessez de br\u00fbler. extinguishOthers=\u00a77Vous avez \u00e9teint la combustion de {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} -false=non +false=\u00a74false\u00a7f feed=\u00a77Vous avez \u00e9t\u00e9 rassasi\u00e9. feedOther=\u00a77 est rassasi\u00e9 {0}. fileRenameError=Echec du changement de nom de {0} flyMode=\u00a77Set fly mode {0} for {1}. +flying=flying foreverAlone=\u00a7cVous n''avez personne \u00e0 qui r\u00e9pondre freedMemory=A lib\u00e9r\u00e9 {0} Mo. gameMode=\u00a77Mode de jeu {0} pour {1}. @@ -108,6 +115,10 @@ geoipJoinFormat=Joueur {0} vient de {1} godDisabledFor=d\u00e9sactiv\u00e9 pour {0} godEnabledFor=activ\u00e9 pour {0} godMode=\u00a77Mode Dieu {0}. +hatArmor=\u00a7cError, you cannot use this item as a hat! +hatEmpty=\u00a7cYou are not wearing a hat. +hatFail=\u00a7cYou must have something to wear in your hand. +hatPlaced=\u00a7eEnjoy your new hat! haveBeenReleased=\u00a77Vous avez \u00e9t\u00e9 lib\u00e9r\u00e9. heal=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9. healOther=\u00a77{0} a \u00e9t\u00e9 soign\u00e9. @@ -164,6 +175,7 @@ jailSet=\u00a77La prison {0} a \u00e9t\u00e9 cr\u00e9\u00e9. jumpError=\u00c7a aurait pu faire mal au cerveau de votre ordinateur. kickDefault=\u00c9ject\u00e9 du serveur kickExempt=\u00a77Vous ne pouvez pas \u00e9jecter ce joueur. +kickedAll=\u00a7cKicked all players from server kill=\u00a77Tu\u00e9 {0}. kitError2=\u00a7cCe kit n'existe pas ou a \u00e9t\u00e9 mal d\u00e9fini. kitError=\u00a7cIl n'y a pas de kits valides. @@ -222,6 +234,7 @@ noAccessCommand=\u00a7cVous n'avez pas acc\u00c3\u00a8s \u00e0 cette commande. noAccessPermission=\u00a7cVous n''avez pas la permissions d''acc\u00e9der \u00e0 cette {0} noBreakBedrock=You are not allowed to destroy bedrock. noDestroyPermission=\u00a7cVous n''avez pas la permission de d\u00e9truire ce {0}. +noDurability=\u00a7cThis item does not have a durability. noGodWorldWarning=\u00a7cWarning! Le mode Dieu est d\u00e9sactiv\u00e9 dans ce monde. noHelpFound=\u00a7cAucune commande correspondante. noHomeSet=Vous n'avez pas d\u00e9fini de r\u00e9sidence. @@ -243,6 +256,7 @@ notAllowedToQuestion=\u00a7cVous n'\u00eates pas autoris\u00e9 \u00e0 poser des notAllowedToShout=\u00a7cVous n'\u00eates pas autoris\u00e9 \u00e0 crier. notEnoughExperience=Vous n'avez pas assez d'exp\u00e9rience. notEnoughMoney=Vous n'avez pas les fonds n\u00e9cessaires. +notFlying=not flying notRecommendedBukkit=* ! * La version de Bukkit n'est pas celle qui est recommand\u00e9 pour cette version de Essentials. notSupportedYet=Pas encore pris en charge. nothingInHand = \u00a7cVous n'avez rien en main. @@ -356,12 +370,13 @@ timeSet=Heure r\u00e9gl\u00e9e dans tous les mondes. timeSetPermission=\u00a7cVous n'\u00eates pas autoris\u00e9 \u00e0 r\u00e9gler l'heure. timeWorldCurrent=Il est \u00a73{1}\u00a77 dans \u00a7c{0}. timeWorldSet=L''heure a \u00e9t\u00e9 r\u00e9gl\u00e9e \u00e0 {0} dans : \u00a7c{1} +tps=Current TPS = {0} tradeCompleted=\u00a77\u00c9change termin\u00e9. tradeSignEmpty=Le panneau de vente n'as pas encore assez de stock. tradeSignEmptyOwner=Il n'y a rien \u00e0 collecter de cette pancarte d'\u00e9change commercial. treeFailure=\u00a7cEchec de la g\u00e9n\u00e9ration de l'arbre. Essayez de nouveau sur de l'herbe ou de la terre. treeSpawned=\u00a77Arbre cr\u00e9\u00e9. -true=oui +true=\u00a72true\u00a7f typeTpaccept=\u00a77Pour le t\u00e9l\u00e9porter, utilisez \u00a7c/tpaccept\u00a77. typeTpdeny=\u00a77Pour d\u00e9cliner cette demande, utilisez \u00a7c/tpdeny\u00a77. typeWorldName=\u00a77Vous pouvez aussi taper le nom d'un monde sp\u00e9cifique. @@ -375,6 +390,8 @@ unknownItemName=Nom d''objet inconnu : {0} unlimitedItemPermission=\u00a7cPas de permission pour l''objet illimit\u00e9 {0}. unlimitedItems=Objets illimit\u00e9s: unmutedPlayer=Le joueur {0} n''est plus muet. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. upgradingFilesError=Erreur durant la mise \u00e0 jour des fichiers. userDoesNotExist=L''utilisateur {0} n''existe pas. userIsAway={0} s'est mis en AFK @@ -384,6 +401,7 @@ userUsedPortal={0} a utilis\u00e9 un portail existant. userdataMoveBackError=Echec du d\u00e9placement de userdata/{0}.tmp vers userdata/{1} userdataMoveError=Echec du d\u00e9placement de userdata/{0} vers userdata/{1}.tmp usingTempFolderForTesting=Utilise un fichier temporaire pour un test. +vanished=\u00a7aYou have now been vanished. versionMismatch=Versions diff\u00e9rentes ! Mettez s''il vous plait {0} \u00e0 la m\u00eame version. versionMismatchAll=Mauvaise version ! S'il vous plait mettez des jars Essentials de version identique. voiceSilenced=\u00a77Vous avez \u00e9t\u00e9 r\u00e9duit au silence. @@ -400,20 +418,22 @@ weatherStorm=\u00a77Vous avez programm\u00e9 l''orage dans {0} weatherStormFor=\u00a77Vous avez programm\u00e9 l''orage dans {0} pour {1} secondes. weatherSun=\u00a77Vous avez programm\u00e9 le beau temps dans {0} weatherSunFor=\u00a77Vous avez programm\u00e9 le beau temps dans {0} pour {1} secondes. -whoisBanned=\u00a79 - Banni : {0} -whoisExp=\u00a79 - Exp: {0} (Level {1}) -whoisGamemode=\u00a79 - Mode de jeu : {0} -whoisGeoLocation=\u00a79 - Emplacement : {0} -whoisGod=\u00a79 - Mode Dieu : {0} -whoisHealth=\u00a79 - Sant\u00e9 : {0} / 20 -whoisIPAddress=\u00a79 - Adresse IP : {0} -whoisIs={0} est {1} -whoisJail=\u00a79 - Jail: {0} -whoisLocation=\u00a79 - Emplacement : ({0}, {1}, {2}, {3}) -whoisMoney=\u00a79 - Argent : {0} -whoisOP=\u00a79 - OP : {0} -whoisStatusAvailable=\u00a79 - Statut : Disponible -whoisStatusAway=\u00a79 - Statut : \u00a7cAilleurs\u00a7f +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Banni:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Level {1}) +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Mode de jeu:\u00a7f {0} +whoisGeoLocation=\u00a76 - Emplacement:\u00a7f {0} +whoisGod=\u00a76 - Mode Dieu:\u00a7f {0} +whoisHealth=\u00a76 - Sant\u00e9:\u00a7f {0} / 20 +whoisIPAddress=\u00a76 - Adresse IP:\u00a7f {0} +whoisJail=\u00a76 - Jail:\u00a7f {0} +whoisLocation=\u00a76 - Emplacement:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Argent:\u00a7f {0} +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== worth=\u00a77Une pile de {0} vaut \u00a7c{1}\u00a77 ({2} objet(s) \u00e0 {3} chacun) worthMeta=\u00a77Une pile de {0} avec la m\u00e9tadonn\u00e9e de {1} vaut \u00a7c{2}\u00a77 ({3} objet(s) \u00e0 {4} chacun) worthSet=Valeur cr\u00e9e @@ -421,3 +441,11 @@ 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. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties new file mode 100644 index 000000000..c3634eaad --- /dev/null +++ b/Essentials/src/messages_it.properties @@ -0,0 +1,451 @@ +#version: TeamCity +# Single quotes have to be doubled: '' +# Translations start here +# by: +action=* {0} {1} +addedToAccount=\u00a7a{0} e'' stato aggiunto al tuo account. +addedToOthersAccount=\u00a7a{0} e'' stato aggiunto all''account {1}\u00a7a. Nuovo bilancio: {2} +adventure = adventure +alertBroke=fallito: +alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} a: {3} +alertPlaced=collocato: +alertUsed=usato: +autoAfkKickReason=Sei stato kickato per inattivita'' oltre i {0} minuti. +backAfterDeath=\u00a77Digita il comando /back per tornare al punto dove sei morto. +backUsageMsg=\u00a77Ritorna alla posizione precedente. +backupDisabled=Un script di backup esterno non e'' stato configurato. +backupFinished=Backup terminato +backupStarted=Backup iniziato +balance=\u00a77Bilancio: {0} +balanceTop=\u00a77Top bilanci ({0}) +banExempt=\u00a7cNon puoi bannare questo player. +banIpAddress=\u00a77IP address bannato +bannedIpsFileError=Errore di lettura banned-ips.txt +bannedIpsFileNotFound=banned-ips.txt non trovato +bannedPlayersFileError=Errore di lettura banned-players.txt +bannedPlayersFileNotFound=banned-players.txt non trovato +bigTreeFailure=\u00a7cCreazione del grande albero fallita. Riprova sull''erba o sul terreno. +bigTreeSuccess= \u00a77Grande albero creato. +blockList=Essentials ha trasmesso i seguenti comandi ad un altro plugin: +broadcast=[\u00a7cBroadcast\u00a7f]\u00a7a {0} +buildAlert=\u00a7cNon hai i permessi per costruire +bukkitFormatChanged=Il formato della versione Bukkit e'' cambiato. Versione non controllata. +burnMsg=\u00a77Hai impostato{0} infuocato per {1} secondi. +canTalkAgain=\u00a77Ora puoi parlare di nuovo +cantFindGeoIpDB=Non trovo il database GeoIP! +cantReadGeoIpDB=Lettura fallita del database GeoIP! +cantSpawnItem=\u00a7cNon sei abilitato a generare l''oggetto {0} +chatTypeLocal=[L] +chatTypeAdmin=[A] +chatTypeSpy=[Spy] +commandFailed=Comando {0} fallito: +commandHelpFailedForPlugin=Errore nella guida di: {0} +commandNotLoaded=\u00a7cIl comando {0} non e'' stato caricato correttamente. +compassBearing=\u00a77Bussola: {0} ({1} gradi). +configFileMoveError=Impossibile spostare config.yml nel backup. +configFileRenameError=Impossibile rinominare il file temporale in config.yml +connectedPlayers=Players connessi: +connectionFailed=Connessione fallita. +cooldownWithMessage=\u00a7cIn esaurimento: {0} +corruptNodeInConfig=\u00a74Avviso: errore nel tuo file di configurazione, nodo {0}. +couldNotFindTemplate=Non trovo il template {0} +creatingConfigFromTemplate=Configurazione dal template: {0} +creatingEmptyConfig=Configurazione vuota creata: {0} +creative=creativo +currency={0}{1} +currentWorld=Current World: {0} +day=giorno +days=giorni +defaultBanReason=Sei stato bannato! +deleteFileError=Impossibile eliminare il file: {0} +deleteHome=\u00a77La home {0} e'' stata rimossa. +deleteJail=\u00a77La prigione {0} e'' stata rimossa. +deleteWarp=\u00a77Il Warp {0} e'' stato rimosso. +deniedAccessCommand={0} Accesso negato al comando. +dependancyDownloaded=[Essentials] Dependancy {0} download effettuato con successo. +dependancyException=[Essentials] Errore durante il download di una dependacy +dependancyNotFound=[Essentials] Una dependancy necessaria non e'' stata trovata, sto effettuando il download.. +depth=\u00a77Sei al livello del mare. +depthAboveSea=\u00a77Sei {0} blocco(i) sopra il livello del mare. +depthBelowSea=\u00a77Sei {0} blocco(i) sotto il livello del mare. +destinationNotSet=Destinazione non impostata +disableUnlimited=\u00a77Collocazione illimitata di {0} per {1} disabilitata. +disabled=disabilitato +disabledToSpawnMob=La creazione di questo mob e'' stata disabilitata nel file config. +dontMoveMessage=\u00a77Il teletrasporto iniziera'' tra {0}. Attendi. +downloadingGeoIp=Download del database GeoIP... potrebbe richiedere del tempo (nazione: 0.6 MB, citta'': 20MB) +duplicatedUserdata=Dati dell''utente duplicati: {0} e {1} +durability=\u00a77This tool has \u00a7c{0}\u00a77 uses left +enableUnlimited=\u00a77Sto inviando una quantita'' illimitata di {0} a {1}. +enabled=abilitato +enchantmentApplied = \u00a77L''incantesimo {0} e'' stato applicato all''oggetto nelle tue mani. +enchantmentNotFound = \u00a7cIncantesimo non trovato +enchantmentPerm = \u00a7cNon hai il permesso per {0} +enchantmentRemoved = \u00a77L''incantesimo {0} e'' stato rimosso dall''oggetto nelle tue mani. +enchantments = \u00a77Incantesimi: {0} +errorCallingCommand=Errore di chiamata del comando /{0} +errorWithMessage=\u00a7cErrore: {0} +essentialsHelp1=File corrotto.. Essentials non riesce ad aprirlo. Essentials ora e'' disabilitato. Se non riesci a riparare il file, vai su http://tiny.cc/EssentialsChat +essentialsHelp2=File corrotto.. Essentials non riesce ad aprirlo. Essentials ora e'' disabilitato. Se non riesci a riparare il file, digita il comando /essentialshelp o vai su http://tiny.cc/EssentialsChat +essentialsReload=\u00a77Essentials Ricaricato {0} +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +extinguish=\u00a77Hai spento le fiamme. +extinguishOthers=\u00a77Hai spento le fiamme di {0}. +failedToCloseConfig=Chiusura fallita del config {0} +failedToCreateConfig=Creazione fallita del config {0} +failedToWriteConfig=Scrittura fallita del config {0} +false=\u00a74false\u00a7f +feed=\u00a77Ora sei sazio. +feedOther=\u00a77{0} e''stato nutrito. +fileRenameError=Rinomina del file {0} fallita +flyMode=\u00a77Modalita'' volo impostata {0} per {1}. +flying=flying +foreverAlone=\u00a7cNon c''e'' nessuno a cui rispondere. +freedMemory=Liberati {0} MB. +gameMode=\u00a77Modalita''di gioco {0} impostata per {1}. +gcchunks= blocchi, +gcentities= entita'' +gcfree=Memoria libera: {0} MB +gcmax=Memoria massima: {0} MB +gctotal=Memoria allocata: {0} MB +geoIpUrlEmpty=L''url del download di GeoIP e'' vuoto. +geoIpUrlInvalid=L''url del download di GeoIP non e'' valido. +geoipJoinFormat=Il Player {0} proviene da {1} +godDisabledFor=God disabilitato per {0} +godEnabledFor=God abilitato per {0} +godMode=\u00a77Modalita'' God {0}. +hatArmor=\u00a7cError, you cannot use this item as a hat! +hatEmpty=\u00a7cYou are not wearing a hat. +hatFail=\u00a7cYou must have something to wear in your hand. +hatPlaced=\u00a7eEnjoy your new hat! +haveBeenReleased=\u00a77Sei stato scarcerato. +heal=\u00a77Sei stato curato. +healOther=\u00a77{0} e'' stato curato. +helpConsole=Digitare ? per la guida. +helpFrom=\u00a77Comandi da {0}: +helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Corrispondenza comandi "{0}": +helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} +helpPages=Pagina \u00a7c{0}\u00a7f di \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} +holeInFloor=Buco nel terreno +homeSet=\u00a77Home impostata. +homeSetToBed=\u00a77La tua home e'' ora assegnata a questo letto. +homes=Homes: {0} +hour=ora +hours=ore +ignorePlayer=Da ora in poi ignorerai {0}. +illegalDate=Formato data/ora non riconosciuto. +infoChapter=Seleziona capitolo: +infoChapterPages=Capitolo {0}, pagina \u00a7c{1}\u00a7f di \u00a7c{2}\u00a7f: +infoFileDoesNotExist=Il file info.txt non esiste. Creane uno per te. +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Pagina \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- +infoUnknownChapter=Capitolo sconosciuto. +invBigger=L''inventario degli altri utenti e'' piu'' grande del tuo. +invRestored=l tuo inventario e'' stato ripristinato. +invSee=Stai guardando l''inventario di {0}. +invSeeHelp=Digita /invsee per ripristinare il tuo inventario. +invalidCharge=\u00a7cIIstruzione non corretta. +invalidHome=La home {0} non esiste +invalidMob=Tipo mob non valido. +invalidServer=Server non valido! +invalidSignLine=Riga {0} non corretta. +invalidWorld=\u00a7cMondo incorretto. +inventoryCleared=\u00a77Inventario cancellato. +inventoryClearedOthers=\u00a77Inventario di \u00a7c{0}\u00a77 cancellato. +is=e'' +itemCannotBeSold=L''oggetto non puo'' essere venduto. +itemMustBeStacked=L''oggetto deve essere commerciato in pile. 2 quantita'' equivalgono a 2 pile, etc. +itemNotEnough1=\u00a7cNon hai abbastanza quantita'' di questo oggetto per venderlo. +itemNotEnough2=\u00a77Se vuoi vendere tutti gli oggetti di quel tipo, digita /sell nomeoggetto +itemNotEnough3=\u00a77/sell nomeoggetto -1 vende tutto tranne quell''oggetto, etc. +itemSellAir=Stai cercando di vendere l''aria? Metti un oggetto nella tua mano. +itemSold=\u00a77Venduto per \u00a7c{0} \u00a77({1} {2} a {3} l''uno) +itemSoldConsole={0} venduto {1} per \u00a77{2} \u00a77({3} oggetti a {4} l''uno) +itemSpawn=\u00a77Inviati {0} di {1} +itemsCsvNotLoaded=Impossibile caricare items.csv. +jailAlreadyIncarcerated=\u00a7cPlayer gia'' in prigione: {0} +jailMessage=\u00a7cAvrai tempo per riflettere..in prigione. +jailNotExist=La prigione dichiarata non esiste. +jailReleased=\u00a77Player \u00a7e{0}\u00a77 scarcerato. +jailReleasedPlayerNotify=\u00a77Sei stato scarcerato! +jailSentenceExtended=Tempo di incarcerazione aumentato di: {0) +jailSet=\u00a77{0} e'' ora una prigione. +jumpError=Cosi'' facendo danneggerai la cpu. +kickDefault=Kickato dal server +kickExempt=\u00a7cNon puoi kickare questo player. +kickedAll=\u00a7cKicked all players from server +kill=\u00a77Ucciso {0}. +kitError2=\u00a7cQuesto kit non esiste o non e'' definito. +kitError=\u00a7cNon ci sono kit validi. +kitErrorHelp=\u00a7cForse una quantita'' manca in un oggetto della configurazione? +kitGive=\u00a77Kit inviato {0}. +kitInvFull=\u00a7cIl tuo inventario e'' pieno, il kit e'' ora per terra. +kitTimed=\u00a7cNon puoi usare il kit per altri {0}. +kits=\u00a77Kits: {0} +lightningSmited=\u00a77Sei stato folgorato! +lightningUse=\u00a77{0} e'' stato folgorato! +listAfkTag = \u00a77[AFK]\u00a7f +listAmount = \u00a79Ci sono \u00a7c{0}\u00a79 players online su un massimo di \u00a7c{1}. +listAmountHidden = \u00a79Ci sono \u00a7c{0}\u00a77/{1}\u00a79 players online su un massimo di \u00a7c{2}. +listGroupTag={0}\u00a7f: +listHiddenTag = \u00a77[HIDDEN]\u00a7f +loadWarpError=Impossibile caricare il warp {0} +localFormat=Formato locale: <{0}> {1} +mailClear=\u00a7cPer cancellare la tua mail, digita /mail clear +mailCleared=\u00a77Mail cancellata! +mailSent=\u00a77Mail inviata! +markMailAsRead=\u00a7cPer contrassegnare la mail come gia'' letta, digita /mail read +markedAsAway=\u00a77Il tuo stato ora e'' "Non al computer". +markedAsNotAway=\u00a77Bentornato! +maxHomes=Non puoi assegnare piu'' di {0} home. +mayNotJail=\u00a7cNon puoi imprigionare questo player. +me=mi +minute=minuto +minutes=minuti +missingItems=Non hai {0}x {1}. +missingPrefixSuffix=Manca un prefisso o un suffisso per {0} +mobSpawnError=Errore durante il cambiamento del generatore di mob. +mobSpawnLimit=Quantita'' Mob limitata dal server +mobSpawnTarget=Il blocco designato deve essere un generatore di mob. +mobsAvailable=\u00a77Mobs: {0} +moneyRecievedFrom=\u00a7a{0} sono stati ricevuti da {1} +moneySentTo=\u00a7a{0} sono stati inviati a {1} +moneyTaken={0} prelevati dal tuo conto in banca. +month=mese +months=mesi +moreThanZero=La quantita'' deve essere maggiore di 0. +msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cNon puoi mutare questo player. +mutedPlayer=Player {0} mutato. +mutedPlayerFor=Player {0} mutato per {1}. +mutedUserSpeaks={0} ha provato a parlare, ma e'' mutato. +nearbyPlayers=Players nelle vicinanze: {0} +negativeBalanceError=User is not allowed to have a negative balance. +nickChanged=Nickname modificato. +nickDisplayName=\u00a77Devi abilitare change-displayname nel config di Essentials. +nickInUse=\u00a7cNickname gia'' in uso. +nickNamesAlpha=\u00a7cI Nickname devono essere alfanumerici. +nickNoMore=\u00a77Non disponi piu'' di un nickname. +nickOthersPermission=\u00a7cNon hai il permesso di cambiare il nickname degli altri +nickSet=\u00a77Il tuo nickname e'' ora \u00a7c{0} +noAccessCommand=\u00a7cNon hai accesso a questo comando. +noAccessPermission=\u00a7cNon hai i permessi di accesso per {0}. +noBreakBedrock=Non sei abilitato a distruggere la bedrock. +noDestroyPermission=\u00a7cNon hai i permessi per distruggere {0}. +noDurability=\u00a7cThis item does not have a durability. +noGodWorldWarning=\u00a7cAttenzione! Modalita'' God disabilitata in questo mondo. +noHelpFound=\u00a7cComandi non trovati. +noHomeSet=Non hai stabilito una home. +noHomeSetPlayer=Il Player non ha stabilito una home. +noKitPermission=\u00a7cHai bisogno del permesso \u00a7c{0}\u00a7c per usare questo kit. +noKits=\u00a77Non ci sono ancora kit disponibili +noMail=Non hai ricevuto nessuna mail +noMotd=\u00a7cNon c''e'' nessun messaggio del giorno. +noNewMail=\u00a77Non hai ricevuto nuove mail. +noPendingRequest=Non hai richieste in sospeso. +noPerm=\u00a7cNon hai questo permesso: \u00a7f{0} +noPermToSpawnMob=\u00a7cNon hai i permessi per generare questo mob. +noPlacePermission=\u00a7cNon hai il permesso di collocare un blocco accanto a quest''insegna. +noPowerTools=Non hai attrezzi assegnati. +noRules=\u00a7cNon ci sono regole specifiche al momento. +noWarpsDefined=Nessun warp definito +none=nessun +notAllowedToQuestion=\u00a7cNon sei autorizzato a fare domande. +notAllowedToShout=\u00a7cNon sei autorizzato a gridare. +notEnoughExperience=Non hai abbastanza esperienza. +notEnoughMoney=Non hai abbastanza denaro. +notFlying=not flying +notRecommendedBukkit=* ! * La versione Bukkit in uso non e'' compatibile con Essentials. +notSupportedYet=Non ancora supportato. +nothingInHand = \u00a7cNon hai niente in mano. +now=adesso +nuke=Un regalino.. radioattivo +numberRequired=Che ne dici di metterci un numero?! +onlyDayNight=/time supporta solo day/night. +onlyPlayers=Solo i players durante il gioco possono usare {0}. +onlySunStorm=/weather supporta solo sun/storm. +orderBalances=Sto ordinando i bilanci di {0} utenti, attendere grazie... +pTimeCurrent=L''orario di \u00a7e{0}\u00a7f e'' {1}. +pTimeCurrentFixed=L''orario di \u00a7e{0}\u00a7f e'' fissato alle {1}. +pTimeNormal=L''orario di \u00a7e{0}\u00a7f e'' normale e corrisponde a quello del server. +pTimeOthersPermission=\u00a7cNon sei autorizzato a definre l''orario degli altri player. +pTimePlayers=Questi player hanno il loro orario: +pTimeReset=L''orario del Player e'' stato resettato alle: \u00a7e{0} +pTimeSet=L''orario del Player e'' stato regolato alle \u00a73{0}\u00a7f per le: \u00a7e{1} +pTimeSetFixed=L''orario del Player e'' stato fissato alle \u00a73{0}\u00a7f per le: \u00a7e{1} +parseError=Errore parsing {0} riga {1} +pendingTeleportCancelled=\u00a7cRichiesta in sospeso di teletrasporto cancellata. +permissionsError=Mancano i permessi per Permissions/GroupManager; i suffissi e prefissi in chat verrano disabilitati. +playerBanned=\u00a7cIl Player {0} e'' bannato {1} motivo: {2} +playerInJail=\u00a7cIl Player e'' gia'' nella prigione ({0}). +playerJailed=\u00a77Il Player {0} e'' stato messo in prigione. +playerJailedFor= \u00a77Il Player {0} e'' in prigione. motivo: {1}. +playerKicked=\u00a7cIl Player {0} e'' stato kickato {1} motivo: {2} +playerMuted=\u00a77Sei stato mutato +playerMutedFor=\u00a77Sei stato mutato per {0} +playerNeverOnServer=\u00a7cIl Player {0} non e'' mai stato su questo server. +playerNotFound=\u00a7cPlayer non trovato. +playerUnmuted=\u00a77Sei stato smutato +pong=Pong! +possibleWorlds=\u00a77I mondi sono numerati da 0 a {0}. +powerToolAir=Il comando non puo'' essere collegato all''aria. +powerToolAlreadySet=Il comando \u00a7c{0}\u00a7f e'' gia'' stato assegnato a {1}. +powerToolAttach=Il comando \u00a7c{0}\u00a7f e'' stato assegnato a {1}. +powerToolClearAll=Tutti i comandi per gli attrezzi sono stati cancellati. +powerToolList=L''attrezzo {1} ha i seguenti comandi: \u00a7c{0}\u00a7f. +powerToolListEmpty=L''attrezzo {0} non dispone di comandi assegnati. +powerToolNoSuchCommandAssigned=Il comando \u00a7c{0}\u00a7f non e'' stato assegnato a {1}. +powerToolRemove=Il comando \u00a7c{0}\u00a7f e'' stato rimosso da {1}. +powerToolRemoveAll=Tutti i comandi sono stati rimossi da {0}. +powerToolsDisabled=Tutti i tuoi attrezzi sono stati disabilitati. +powerToolsEnabled=Tutti i tuoi attrezzi sono stati abilitati. +protectionOwner=\u00a76[EssentialsProtect] Protetto dal proprietario: {0} +questionFormat=\u00a77[Domanda]\u00a7f {0} +readNextPage=Digita /{0} {1} per la pagina successiva +reloadAllPlugins=\u00a77Tutti i plugins ricaricati. +removed=\u00a77Rimosse {0} entitita''. +repair=Hai riparato con successo il tuo: \u00a7e{0}. +repairAlreadyFixed=\u00a77Questo oggetto non richiede riparazioni. +repairEnchanted=\u00a77Non sei abilitato a riparare oggetti magici. +repairInvalidType=\u00a7cQuesto oggetto non puo'' essere riparato. +repairNone=Non ci sono oggetti da riparare. +requestAccepted=\u00a77Richiesta di teletrasporto accettata. +requestAcceptedFrom=\u00a77{0} ha accettato la tua richiesta di teletrasporto. +requestDenied=\u00a77Richiesta di teletrasporto rifiutata. +requestDeniedFrom=\u00a77{0} ha rifiutato la tua richiesta di teletrasporto. +requestSent=\u00a77Richiesta inviata a {0}\u00a77. +requestTimedOut=\u00a7cRichiesta di teletrasporto scaduta. +requiredBukkit=* ! * e'' necessaria la versione {0} o superiore di CraftBukkit, scaricabile da http://dl.bukkit.org/downloads/craftbukkit/ +returnPlayerToJailError=Riscontrato errore nell''invio del player {0} alla prigione: {1} +second=secondo +seconds=secondi +seenOffline=Il Player {0} e'' offline da {1} +seenOnline=Il Player {0} e'' online da {1} +serverFull=Il Server e'' pieno +serverTotal=Totale Server: {0} +setSpawner=Tipo generatore modificato in {0} +sheepMalformedColor=Colore non valido. +shoutFormat=\u00a77[Grido!]\u00a7f {0} +signFormatFail=\u00a74[{0}] +signFormatSuccess=\u00a71[{0}] +signFormatTemplate=[{0}] +signProtectInvalidLocation=\u00a74Non hai il permesso per creare segnaposti qui. +similarWarpExist=Il nome del warp e'' stato gia'' utilizzato. +slimeMalformedSize=Dimensione non valida. +soloMob=Quel mob sembra essere solo +spawnSet=\u00a77Punto di rigenerazione creato per il gruppo {0}. +spawned=creato +sudoExempt=Impossibile applicare il sudo a questo utente +sudoRun=Sto obbligando {0} ad eseguire: /{1} {2} +suicideMessage=\u00a77Addio mondo crudele... +suicideSuccess= \u00a77{0} si e'' suicidato.. +survival=sopravvivenza +takenFromAccount=\u00a7c{0} sono stati prelevati dal tuo conto. +takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} +teleportAAll=\u00a77Richiesta di teletrasporto inviata a tutti i players... +teleportAll=\u00a77Sto teletrasportando tutti i players... +teleportAtoB=\u00a77{0}\u00a77 ti ha teletrasportato a {1}\u00a77. +teleportDisabled={0} ha il teletrasporto disabilitato. +teleportHereRequest=\u00a7c{0}\u00a7c ha richiesto di teletrasportati da loro. +teleportNewPlayerError=Teletrasporto del nuovo player fallito +teleportRequest=\u00a7c{0}\u00a7c ha richiesto di teletrasportati da te. +teleportRequestTimeoutInfo=\u00a77Questa richiesta scadra'' tra {0} secondi. +teleportTop=\u00a77Teletrasporto in cima. +teleportationCommencing=\u00a77Inizio teletrasporto... +teleportationDisabled=\u00a77Teletrasporto disabilitato. +teleportationEnabled=\u00a77Teletrasporto abilitato. +teleporting=\u00a77Teletrasporto in corso... +teleportingPortal=\u00a77Teletrasporto tramite portale. +tempBanned=Bannato temporaneamente dal server per {0} +tempbanExempt=\u00a77Non puoi bannare questo player +thunder=Abilita i filmini dal cielo: {0} +thunderDuration=Abilita i filmini dal cielo: {0} per {1} secondi. +timeBeforeHeal=Tempo rimanente alla prossima cura: {0} +timeBeforeTeleport=Tempo rimanente al prossimo teletrasporto: {0} +timeFormat=\u00a73{0}\u00a7f oppure \u00a73{1}\u00a7f oppure \u00a73{2}\u00a7f +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=Orario definito in tutti i mondi. +timeSetPermission=\u00a7cNon sei autorizzato a regolare l''orario. +timeWorldCurrent=L''orario attuale in {0} e'' \u00a73{1} +timeWorldSet=L''orario e'' stato regolato alle {0} in: \u00a7c{1} +tps=Current TPS = {0} +tradeCompleted=\u00a77Affare concluso. +tradeSignEmpty=L''insegna non dispone di forniture sufficienti. +tradeSignEmptyOwner=Non c''e'' niente da raccogliare da quest''insegna. +treeFailure=\u00a7cCreazione dell''albero fallita. Riprova sull''erba o sul terreno. +treeSpawned=\u00a77Albero generato. +true=\u00a72true\u00a7f +typeTpaccept=\u00a77Per accetare il teletrasprto, digita \u00a7c/tpaccept\u00a77. +typeTpdeny=\u00a77Per rifiutare il teletrasporto, digita \u00a7c/tpdeny\u00a77. +typeWorldName=\u00a77Puoi digitare anche il nome di un mondo. +unableToSpawnMob=Impossibile generare il mob. +unbannedIP=IP address abilitato. +unbannedPlayer=Player abilitato. +unignorePlayer=Non stai piu'' ignorando il player {0}. +unknownItemId=ID oggetto sconosciuto: {0} +unknownItemInList=Oggetto {0} sconosciuto nella lista {1}. +unknownItemName=Nome oggetto sconosciuto: {0} +unlimitedItemPermission=\u00a7cNessun permesso per l''oggetto {0} illimitato. +unlimitedItems=Oggetti illimitati: +unmutedPlayer=Player {0} smutato. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cA reload has forced you to become visible. +upgradingFilesError=Errore durante l''aggiornamento dei file +userDoesNotExist=L''utente {0} non esiste. +userIsAway={0} e'' AFK +userIsNotAway={0} non e'' piu'' AFK +userJailed=\u00a77Sei stato messo in prigione +userUsedPortal={0} ha usato un portale. +userdataMoveBackError=Errore durante lo spostamento di userdata/{0}.tmp a userdata/{1} +userdataMoveError=Errore durante lo spostamento di userdata/{0} a userdata/{1}.tmp +usingTempFolderForTesting=Sto usando la cartella temporale per il test: +vanished=\u00a7aYou have now been vanished. +versionMismatch=Versione incorretta! Aggiornare {0} alla stessa versione. +versionMismatchAll=Versione incorretta! Aggiornare tutti i jar Essentials alla stessa versione. +voiceSilenced=\u00a77La tua voce e'' stata silenziata +warpDeleteError=Problema nell''eliminazione del file warp. +warpListPermission=\u00a7cNon hai i permessi per consultare la lista warps. +warpNotExist=Questo warp non esiste. +warpOverwrite=\u00a7cNon puoi sovrascrivere il warp. +warpSet=\u00a77Warp {0} definito. +warpUsePermission=\u00a7cNon hai i permessi per usare questo warp. +warpingTo=\u00a77Warping a {0}. +warps=Warps: {0} +warpsCount=\u00a77Ci sono {0} warps. Pagina {1} of {2}. +weatherStorm=\u00a77Hai regolato il tempo in tempesta in {0} +weatherStormFor=\u00a77Hai cambiato il tempo in tempesta in {0} per {1} secondi +weatherSun=\u00a77Hai cambiato il tempo in soleggiato in {0} +weatherSunFor=\u00a77Hai cambiato il tempo in soleggiato in {0} per {1} secondi +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Bannati:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Livello {1}) +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Gamemode:\u00a7f {0} +whoisGeoLocation=\u00a76 - Posizione:\u00a7f {0} +whoisGod=\u00a76 - God mode:\u00a7f {0} +whoisHealth=\u00a76 - Health:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP Address:\u00a7f {0} +whoisJail=\u00a76 - Imprigionati:\u00a7f {0} +whoisLocation=\u00a76 - Posizione:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Denaro:\u00a7f {0} +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== +worth=\u00a77Pila di {0} valore \u00a7c{1}\u00a77 ({2} oggetto(i) a {3} l''uno) +worthMeta=\u00a77Pila di {0} con metadati di {1} valore \u00a7c{2}\u00a77 ({3} oggetto(i) a {4} l''uno) +worthSet=Valore definito +year=anno +years=anni +youAreHealed=\u00a77Sei stato curato. +youHaveNewMail=\u00a7cHai {0} messaggi!\u00a7f digita \u00a77/mail read\u00a7f per consultare la tua mail. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index d0f56752b..a56888081 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -3,102 +3,109 @@ # Translations start here # by: Geertje123 action=* {0} {1} -addedToAccount=\u00a7a{0} is gestort op je account. -addedToOthersAccount=\u00a7a{0} added to {1}\u00a7a account. New balance: {2} +addedToAccount=\u00a7a{0} is gestort op je rekening. +addedToOthersAccount=\u00a7a{0} toegevoegd aan {1}\u00a7a zijn rekening. Nieuw balans: {2} +adventure = adventure alertBroke=gebroken: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3} alertPlaced=geplaatst: alertUsed=gebruikt: -autoAfkKickReason=You have been kicked for idling more than {0} minutes. -backAfterDeath=\u00a77Gebruik het /back command om terug te keren naar je sterfplaats. +autoAfkKickReason=Je bent van de server afgeschopt omdat je niets hebt gedaan voor meer dan {0} minuten. +backAfterDeath=\u00a77Gebruik het /back commando om terug te keren naar je sterfplaats. backUsageMsg=\u00a77Naar de vorige locatie aan het gaan. -backupDisabled=An external backup script has not been configured. -backupFinished=Backup voltooid -backupStarted=Backup gestart +backupDisabled=Een extern backup script is niet geconfigureerd. +backupFinished=Backup voltooid. +backupStarted=Backup gestart. balance=\u00a77Saldo: {0} -balanceTop=\u00a77 Top saldi ({0}) +balanceTop=\u00a77 Top saldo ({0}) banExempt=\u00a77Je kunt deze speler niet verbannen. -banIpAddress=\u00a77Verbannen IP-adres +banIpAddress=\u00a77Verbannen IP-adres. bannedIpsFileError=Fout bij het lezen van banned-ips.txt -bannedIpsFileNotFound=banned-ips.txt werd niet gevonden +bannedIpsFileNotFound=banned-ips.txt werd niet gevonden. bannedPlayersFileError=Fout bij het lezen van banned-players.txt -bannedPlayersFileNotFound=banned-players.txt werd niet gevonden +bannedPlayersFileNotFound=banned-players.txt werd niet gevonden. bigTreeFailure=\u00a7cMaken van een grote boom is mislukt. Probeer het opnieuw op gras of dirt. bigTreeSuccess= \u00a77Grote boom gemaakt. -blockList=Essentials relayed the following commands to another plugin: -broadcast=[\u00a7cBroadcast\u00a7f]\u00a7a {0} -buildAlert=\u00a7cJe bent niet bevoegd om te bouwen +blockList=Essentials heeft de volgende commandos doorgegeven naar een andere plugin: +broadcast=[\u00a7Uitzending\u00a7f]\u00a7a {0} +buildAlert=\u00a7cJe bent niet bevoegd om te bouwen. bukkitFormatChanged=Bukkit versie formaat veranderd. Versie niet nagekeken. -burnMsg=\u00a77Je hebt {0} voor {1} seconde(n) in de fik gezet. +burnMsg=\u00a77Je hebt {0} voor {1} seconde(n) in brand 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. chatTypeLocal=[L] +chatTypeAdmin=[A] chatTypeSpy=[Spy] -commandFailed=Opdracht {0} mislukt: +commandFailed=Opdracht {0} is mislukt: commandHelpFailedForPlugin=Fout bij het \u200b\u200bkrijgen van hulp voor: {0} 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=Spelers online: +connectedPlayers=Spelers online: connectionFailed=Fout bij het verbinden. cooldownWithMessage=\u00a7cAfkoeltijd: {0} corruptNodeInConfig=\u00a74Waarschuwing: Het configuratiebestand bevat een fout {0}. -couldNotFindTemplate=Het sjabloon kon niet worden gevonden {0} +couldNotFindTemplate=Het sjabloon kon niet worden gevonden {0}. creatingConfigFromTemplate=Bezig met aanmaken van een config vanaf sjabloon: {0} creatingEmptyConfig=Bezig met een lege config aanmaken: {0} creative=creative currency={0}{1} +currentWorld=Actuele Wereld: {0} day=dag days=dagen -defaultBanReason=De Ban Hamer heeft gesproken! +defaultBanReason=De Verbannings Hamer heeft gesproken! deleteFileError=Het bestand kon niet verwijderd worden: {0} -deleteHome=\u00a77Home {0} has been removed. +deleteHome=\u00a77Huis {0} is verwijdered. deleteJail=\u00a77Gevangenis {0} is verwijderd. deleteWarp=\u00a77Warp {0} is verwijderd. deniedAccessCommand={0} was de toegang verboden tot het commando. dependancyDownloaded=[Essentials] Afhankelijkheid {0} succesvol gedownload. -dependancyException=[Essentials] Er is een fout opgetreden bij het downloaden van de afhankelijkheid +dependancyException=[Essentials] Er is een fout opgetreden bij het downloaden van de afhankelijkheid. dependancyNotFound=[Essentials] Een afhankelijkheid is niet gevonden. Start downloaden. 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 +destinationNotSet=Bestemming niet ingesteld. disableUnlimited=\u00a77Oneindig plaatsen van {0} uitgeschakeld voor {1}. disabled=uitgeschakeld -disabledToSpawnMob=Spawning this mob was disabled in the config file. +disabledToSpawnMob=Het voortbrengen van mobs is uitgeschakeld in het configuratie bestand. dontMoveMessage=\u00a77Beginnen met teleporteren in {0}. Niet bewegen. downloadingGeoIp=Bezig met downloaden van GeoIP database ... Dit kan een tijdje duren (country: 0.6 MB, city: 20MB) -duplicatedUserdata=Dubbele userdata: {0} en {1}. +duplicatedUserdata=Dubbele gebruikersdata: {0} en {1}. +durability=\u00a77Dit gereedschap kan nog \u00a7c{0}\u00a77 gebruikt worden. enableUnlimited=\u00a77Oneindig aantal {0} aan {1} gegeven. enabled=ingeschakeld -enchantmentApplied = \u00a77The enchantment {0} has been applied to your item in hand. -enchantmentNotFound = \u00a7cEnchantment not found -enchantmentPerm = \u00a7cYou do not have the permission for {0} -enchantmentRemoved = \u00a77The enchantment {0} has been removed from your item in hand. -enchantments = \u00a77Enchantments: {0} +enchantmentApplied = \u00a77De betovering {0} is toegepast aan het voorwerp in je hand. +enchantmentNotFound = \u00a7Betovering niet gevonden. +enchantmentPerm = \u00a7cJe hebt geen toestemming voor {0}. +enchantmentRemoved = \u00a77De betovering {0} is verwijderd van het voorwerp in je hand. +enchantments = \u00a77Betoveringen: {0} errorCallingCommand=Fout bij het aanroepen van de opdracht /{0} errorWithMessage=\u00a7cFout: {0} -essentialsHelp1=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, go to http://tiny.cc/EssentialsChat -essentialsHelp2=The file is broken and Essentials can't open it. Essentials is now disabled. If you can't fix the file yourself, either type /essentialshelp in game or go to http://tiny.cc/EssentialsChat +essentialsHelp1=Het bestand is beschadigd en Essentials kan het niet openenen. Essentials is nu uitgeschakeld. Als je dit probleem niet zelf kan oplossing ga dan naar http://tiny.cc/EssentialsChat +essentialsHelp2=Het bestand is beschadigd en Essentials kan het niet openenen. Essentials is nu uitgeschakeld. Als je dit probleem niet zelf kan oplossing ga dan naar http://tiny.cc/EssentialsChat of typ /essentialshelp in het spel. essentialsReload=\u00a77Essentials is herladen {0} +exp=\u00a7c{0} \u00a77heeft\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) en heeft nog\u00a7c {3} \u00a77exp meer nodig om een level hoger te gaan. +expSet=\u00a7c{0} \u00a77heeft nu\u00a7c {1} \u00a77exp. extinguish=\u00a77Je hebt jezelf geblust. extinguishOthers=\u00a77Je hebt {0} geblust. 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} -false=false -feed=\u00a77Your appetite was sated. -feedOther=\u00a77Satisfied {0}. +false=\u00a74Onjuist\u00a7f +feed=\u00a77Jouw honger is verzadigd. +feedOther=\u00a7Verzadigd {0}. fileRenameError=Hernoemen van {0} mislukt -flyMode=\u00a77Set fly mode {0} for {1}. +flyMode=\u00a77Zet vlieg modus {0} voor {1}. +flying=vliegen foreverAlone=\u00a7cJe hebt niemand waarnaar je kan reageren. freedMemory={0} MB gelost. -gameMode=\u00a77Set game mode {0} for {1}. +gameMode=\u00a77Zet spel modus {0} voor {1}. gcchunks= chunks, -gcentities= entities +gcentities= entiteiten gcfree=Vrij geheugen: {0} MB gcmax=Maximaal geheugen: {0} MB gctotal=Gealloceerd geheugen: {0} MB @@ -107,14 +114,18 @@ geoIpUrlInvalid=GeoIP download url is ongeldig. geoipJoinFormat=Speler {0} komt uit {1} godDisabledFor=uitgeschakeld voor {0} godEnabledFor=ingeschakeld voor {0} -godMode=\u00a77God mode {0}. +godMode=\u00a77God modus {0}. +hatArmor=\u00a7cFout, je kunt dit voorwerp niet als hoed gebruiken. +hatEmpty=\u00a7cJe draagt geen hoed. +hatFail=\u00a7cJe hebt iets nodig om te dragen als hoed. +hatPlaced=\u00a7eGeniet van je nieuwe hoed! haveBeenReleased=\u00a77Je bent bevrijdt heal=\u00a77Je bent genezen. healOther=\u00a77Je geneezde {0}. helpConsole=type ? om de consolehelp weer te geven. helpFrom=\u00a77Commands from {0}: helpLine=\u00a76/{0}\u00a7f: {1} -helpMatching=\u00a77Commands matching "{0}": +helpMatching=\u00a77Commandos overeenkomen met "{0}": helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} helpPages=Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f: helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} @@ -131,18 +142,18 @@ infoChapterPages=Hoofdstuk {0}, Pagina \u00a7c{1}\u00a7f van de \u00a7c{2}\u00a7 infoFileDoesNotExist=Bestand info.txt bestaat niet. Bezig met aanmaken. infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Pagina \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- infoUnknownChapter=Onbekend hoofdstuk. -invBigger=De inventory van de andere speler is groter dan die van jou. -invRestored=Je inventory is hersteld. +invBigger=De inventaris van de andere speler is groter dan die van jou. +invRestored=Je inventaris is hersteld. invSee=Je kijkt naar de inventory van {0}. -invSeeHelp=Type /invsee om je inventory te herstellen. +invSeeHelp=Type /invsee om je inventaris te herstellen. invalidCharge=\u00a7cOngeldig te laden. -invalidHome=Home {0} doesn't exist +invalidHome=Huis {0} Bestaat niet. 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. +inventoryCleared=\u00a7inventaris leeggemaakt. +inventoryClearedOthers=\u00a7inventaris 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. @@ -154,78 +165,80 @@ itemSold=\u00a77Verkocht voor \u00a7c{0} \u00a77({1} {2} voorwerpen voor {3} per itemSoldConsole={0} verkocht {1} voor \u00a77{2} \u00a77({3} voorwerpen voor {4} per stuk) itemSpawn=\u00a77Geeft {0} {1} itemsCsvNotLoaded=De item kunnen niet geladen worden.csv. -jailAlreadyIncarcerated=\u00a7cPerson is already in jail: {0} -jailMessage=\u00a7cYou do the crime, you do the time. +jailAlreadyIncarcerated=\u00a7cDeze persoon zit al in de gevangenis: {0} +jailMessage=\u00a7cJij begaat het misdrijf, jij zit je tijd uit. jailNotExist=Die gevangenis bestaat niet. -jailReleased=\u00a77Player \u00a7e{0}\u00a77 unjailed. -jailReleasedPlayerNotify=\u00a77You have been released! -jailSentenceExtended=Jail time extend to: {0) +jailReleased=\u00a77Speler \u00a7e{0}\u00a77 vrijgelaten. +jailReleasedPlayerNotify=\u00a77Je bent vrijgelaten! +jailSentenceExtended=Gevangenistijd verlengt tot: {0) jailSet=\u00a77Gevangenis {0} is ingesteld jumpError=Dat zou je computers hersenen beschadigen. -kickDefault=Gekicked van de server -kickExempt=\u00a77Je kunt die speler niet schoppen. +kickDefault=Je bent van de server afgeschopt. +kickExempt=\u00a77Je kunt die speler niet van de server afschoppen. +kickedAll=\u00a7cAlle spelers van de server afgeschopt. kill=\u00a77Jij doodde {0}. kitError2=\u00a7cDie kit bestaat niet of is verkeerde beschreven. kitError=\u00a7cEr zijn geen geldige kits. kitErrorHelp=\u00a7cMisschien mist er een hoeveelheid van het item in de configuratie? kitGive=\u00a77Kit {0} wordt gegeven. -kitInvFull=\u00a7cJe inventory was vol, de kit wordt op de grond geplaatst +kitInvFull=\u00a7cJe inventaris 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} listAfkTag = \u00a77[AFK]\u00a7f -listAmount = \u00a79There are \u00a7c{0}\u00a79 out of maximum \u00a7c{1}\u00a79 players online. -listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listAmount = \u00a79Er zijn \u00a7c{0}\u00a79 van het maximum \u00a7c{1}\u00a79 spelers online. +listAmountHidden = \u00a79Er zijn \u00a7c{0}\u00a77/{1}\u00a79 van het maximum \u00a7c{2}\u00a79 spelers online. listGroupTag={0}\u00a7f: -listHiddenTag = \u00a77[HIDDEN]\u00a7f +listHiddenTag = \u00a77[VERBORGEN]\u00a7f loadWarpError=Fout bij het laden van warp {0} -localFormat=Local: <{0}> {1} -mailClear=\u00a7cType /mail clear, om ej berichten als gelezen te markeren. +localFormat=Lokaal: <{0}> {1} +mailClear=\u00a7cType /mail clear, om je 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. -maxHomes=You cannot set more than {0} homes. +maxHomes=Je kunt niet meer dan {0} huizen zetten. 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} +missingPrefixSuffix=Er mist een voorvoegsel of navoegsel voor {0} mobSpawnError=Fout bij het veranderen van de mob spawner. -mobSpawnLimit=Grootte van de mob hang af van het server limiet +mobSpawnLimit=Grootte van de mob hang af van het server limiet. mobSpawnTarget=Target blok moet een mob spawner zijn. mobsAvailable=\u00a77Mobs: {0} moneyRecievedFrom=\u00a7a{0} is ontvangen van {1} moneySentTo=\u00a7a{0} is verzonden naar {1} -moneyTaken={0} van je bankrekening afgehaald. +moneyTaken={0} van je rekening afgehaald. month=maand months=maanden moreThanZero=Het aantal moet groter zijn dan 0. msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} -muteExempt=\u00a7cJe kan deze speler niet muten. -mutedPlayer=Speler {0} gemute. -mutedPlayerFor=Speler {0} is gemute voor {1}. -mutedUserSpeaks={0} probeerde te praten, maar is gemute. -nearbyPlayers=Players nearby: {0} +muteExempt=\u00a7cJe kan deze speler niet dempen. +mutedPlayer=Speler {0} gedempt. +mutedPlayerFor=Speler {0} is gedempt voor {1}. +mutedUserSpeaks={0} probeerde te praten, maar is gedempt. +nearbyPlayers=Spelers kortbij: {0} negativeBalanceError=Speler is niet toegestaan om een negatief saldo te hebben. -nickChanged=Nickname veranderd. -nickDisplayName=\u00a77You have to enable change-displayname in Essentials config. +nickChanged=Bijnaam veranderd. +nickDisplayName=\u00a77Je moet 'change-displayname' inschakelen in de Essentials configuratie. 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} +nickNamesAlpha=\u00a7cBijnamen moeten alfanumeriek zijn. +nickNoMore=\u00a7Je hebt geen bijnaam meer. +nickOthersPermission=\u00a7cJe hebt geen toestemming om de bijnaam van anderen te veranderen +nickSet=\u00a77Je bijnaam is nu \u00a7c{0} noAccessCommand=\u00a7cJe hebt geen toegang tot die opdracht. noAccessPermission=\u00a7cJe hebt hier geen toegang voor {0}. -noBreakBedrock=You are not allowed to destroy bedrock. +noBreakBedrock=Je bent niet toegestaan om grondgesteente te breken. noDestroyPermission=\u00a7cJe hebt geen toegang om dat te vernietigen {0}. -noGodWorldWarning=\u00a7cWarning! God mode in this world disabled. -noHelpFound=\u00a7cNo matching commands. -noHomeSet=Je hebt geen home gemaakt. -noHomeSetPlayer=Speler heeft geen home. +noDurability=\u00a7cDit voorwerp heeft geen durabiliteit. +noGodWorldWarning=\u00a7cWaarschuwing! God modus is uitgeschakeld in deze wereld. +noHelpFound=\u00a7cGeen overeenkomende commandos. +noHomeSet=Je hebt geen huis. +noHomeSetPlayer=Speler heeft geen huis. 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 @@ -233,30 +246,31 @@ noMotd=\u00a7cEr is geen bericht van de dag. noNewMail=\u00a77Je hebt geen nieuwe berichten. noPendingRequest=Je hebt geen aanvragen. noPerm=\u00a7cJe hebt de \u00a7f{0}\u00a7c toestemming niet. -noPermToSpawnMob=\u00a7cYou don''t have permission to spawn this mob. +noPermToSpawnMob=\u00a7cJe hebt geen toestemming om deze mob voort te brengen. noPlacePermission=\u00a7cJe hebt geen toestemming om een blok naast die sign te plaatsen. -noPowerTools=You have no power tools assigned. +noPowerTools=Je hebt geen powertools toegewezen. noRules=\u00a7cEr zijn nog geen regels gegeven. noWarpsDefined=Geen warps gedefinieerd none=geen notAllowedToQuestion=\u00a7cJe bent niet bevoegd om de vraag functie te gebruiken. notAllowedToShout=\u00a7cJe bent niet bevoegd om de roep functie te gebruiken. -notEnoughExperience=You do not have enough experience. +notEnoughExperience=Je hebt niet genoeg ervaring. notEnoughMoney=Je hebt niet voldoende middelen. +notFlying=Niet aan het vliegen. notRecommendedBukkit=* ! * De Bukkit versie is niet de aangeraden build voor Essentials. notSupportedYet=Nog niet ondersteund. -nothingInHand = \u00a7cYou have nothing in your hand. +nothingInHand = \u00a7cJe hebt niks in je hand. now=nu -nuke=May death rain upon them +nuke=Moge de dood op hen neerregenen. numberRequired=Er moet daar een nummer, grapjas. onlyDayNight=/time ondersteund alleen day/night. onlyPlayers=Alleen in-game spelers kunnen {0} gebruiken. -onlySunStorm=/weather only supports sun/storm. -orderBalances=Ordering balances of {0} users, please wait ... -pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}. -pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}. -pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server. -pTimeOthersPermission=\u00a7cYou are not authorized to set other players'' time. +onlySunStorm=/weather ondersteunt alleen sun/storm. +orderBalances=Rekeningen bestellen van {0} gebruikers, Watch A.U.B ... +pTimeCurrent=\u00a7e{0}'s\u00a7f tijd is {1}. +pTimeCurrentFixed=\u00a7e{0}'s\u00a7f tijd is vastgezet op {1}. +pTimeNormal=\u00a7e{0}'s\u00a7f tijd is normaal en komt overeen met de server. +pTimeOthersPermission=\u00a7cJe bent niet bevoegd om een andere spelers' tijd te veranderen. pTimePlayers=These players have their own time: pTimeReset=Player time has been reset for: \u00a7e{0} pTimeSet=Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1} @@ -264,45 +278,45 @@ pTimeSetFixed=Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1} parseError=Fout bij ontleding {0} op regel {1} pendingTeleportCancelled=\u00a7cAangevraagde teleportatie afgelast. permissionsError=Permissions/GroupManager ontbreekt; chat prefixes/suffixes worden uitgeschakeld. -playerBanned=\u00a7cPlayer {0} banned {1} for {2} +playerBanned=\u00a7cSpeler {0} verbant {1} voor {2} 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}. -playerKicked=\u00a7cPlayer {0} kicked {1} for {2} +playerKicked=\u00a7cSpeler {0} Schopt {1} van de server voor {2} playerMuted=\u00a77Je kreeg het zwijgen opgelegd. playerMutedFor=\u00a77Je kreeg het zwijgen opgelegd voor {0} playerNeverOnServer=\u00a7cSpeler {0} is nooit op deze server geweest. playerNotFound=\u00a7cSpeler niet gevonden. playerUnmuted=\u00a77Speler mag weer praten pong=Pong! -possibleWorlds=\u00a77Mogelijk zijn de werelden de nummer 0 tot en met {0}. -powerToolAir=Command kan niet worden bevestigd aan lucht. -powerToolAlreadySet=Command \u00a7c{0}\u00a7f is already assigned to {1}. -powerToolAttach=\u00a7c{0}\u00a7f command assigned to {1}. -powerToolClearAll=All powertool commands have been cleared. -powerToolList={1} has the following commands: \u00a7c{0}\u00a7f. -powerToolListEmpty={0} has no commands assigned. -powerToolNoSuchCommandAssigned=Command \u00a7c{0}\u00a7f has not been assigned to {1}. -powerToolRemove=Command \u00a7c{0}\u00a7f removed from {1}. -powerToolRemoveAll=All commands removed from {0}. -powerToolsDisabled=All of your power tools have been disabled. -powerToolsEnabled=All of your power tools have been enabled. +possibleWorlds=\u00a77Mogelijke werelden zijn de nummers 0 tot en met {0}. +powerToolAir=Commando kan niet worden bevestigd aan lucht. +powerToolAlreadySet=Commando \u00a7c{0}\u00a7f is al toegewezen aan {1}. +powerToolAttach=\u00a7c{0}\u00a7f commando toegewezen aan {1}. +powerToolClearAll=Alle powertool commandos zijn verwijderd. +powerToolList={1} heef de volgende commandos: \u00a7c{0}\u00a7f. +powerToolListEmpty={0} heeft geen commandos toegewezen. +powerToolNoSuchCommandAssigned=Commando \u00a7c{0}\u00a7f is niet toegewezen aan {1}. +powerToolRemove=Commando \u00a7c{0}\u00a7f verwijderd van {1}. +powerToolRemoveAll=Alle commandos verwijderd van {0}. +powerToolsDisabled=Al jouw powertools zijn uitgeschakeld. +powerToolsEnabled=Al jouw powertools zijn ingeschakeld. protectionOwner=\u00a76[EssentialsProtect] Beschermingeigenaar: {0} questionFormat=\u00a77[Vraag]\u00a7f {0} -readNextPage=Type /{0} {1} to read the next page +readNextPage=Type /{0} {1} om de volgende pagina te lezen. reloadAllPlugins=\u00a77Alle plugins zijn herladen. -removed=\u00a77Removed {0} entities. -repair=You have successfully repaired your: \u00a7e{0}. -repairAlreadyFixed=\u00a77This item does not need repairing. -repairEnchanted=\u00a77You are not allowed to repair enchanted items. -repairInvalidType=\u00a7cThis item cannot be repaired. +removed=\u00a77{0} entiteiten verwijderd. +repair=Je hebt succesvol je \u00a7e{0} \u00a7fverwijderd. +repairAlreadyFixed=\u00a77Dit voorwerp hoeft niet gerepareerd te worden. +repairEnchanted=\u00a77Je bent niet toegestaan om dit voorwerp te repareren. +repairInvalidType=\u00a7cDit voorwerp kan niet gerepareerd worden. repairNone=There were no items that needing repairing. requestAccepted=\u00a77Teleporteer aanvraag geaccepteerd. requestAcceptedFrom=\u00a77{0} accepted your teleport request. requestDenied=\u00a77Teleporteer aanvraag geweigerd. requestDeniedFrom=\u00a77{0} denied your teleport request. requestSent=\u00a77Aanvraag verstuurd naar {0}\u00a77. -requestTimedOut=\u00a7cTeleport request has timed out +requestTimedOut=\u00a7cTeleportatie verzoek is verlopen. requiredBukkit=* ! * You need atleast build {0} of CraftBukkit, download it from http://dl.bukkit.org/downloads/craftbukkit/ returnPlayerToJailError=Error occurred when trying to return player {0} to jail: {1} second=seconde @@ -310,35 +324,35 @@ seconds=seconde seenOffline=Speler {0} is offline vanaf {1} seenOnline=Speler {0} is online vanaf {1} serverFull=Server is vol -serverTotal=Server Total: {0} -setSpawner=Changed spawner type to {0} -sheepMalformedColor=Misvoormde kleur. -shoutFormat=\u00a77[Shout]\u00a7f {0} +serverTotal=Server Totaal: {0} +setSpawner=Voortbrenger type veranderd tot {0} +sheepMalformedColor=Misvormde kleur. +shoutFormat=\u00a77[Schreeuw]\u00a7f {0} signFormatFail=\u00a74[{0}] signFormatSuccess=\u00a71[{0}] signFormatTemplate=[{0}] -signProtectInvalidLocation=\u00a74You are not allowed to create sign here. +signProtectInvalidLocation=\u00a74Je bent niet bevoegd om hier een bord te plaatsen. similarWarpExist=Er bestaat al een warp met dezelfde naam. -slimeMalformedSize=Misvoormde grootte. -soloMob=Die mob is liever in zijn eentje +slimeMalformedSize=Misvormde grootte. +soloMob=Die mob is liever in zijn eentje. spawnSet=\u00a77Spawn locatie voor de groep {0} ingesteld. -spawned=gespawned -sudoExempt=You cannot sudo this user -sudoRun=Forcing {0} to run: /{1} {2} +spawned=voortgebracht +sudoExempt=Je kunt deze speler niet sudo\u00ebn +sudoRun={0} Forceren om te gebruiken: /{1} {2} suicideMessage=\u00a77Vaarwel vreedzame wereld... suicideSuccess= \u00a77{0} pleegde zelfmoord survival=survival -takenFromAccount=\u00a7c{0} is van je bank rekening afgehaald. -takenFromOthersAccount=\u00a7c{0} taken from {1}\u00a7c account. New balance: {2} -teleportAAll=\u00a77Teleporting request sent to all players... +takenFromAccount=\u00a7c{0} is van je rekening afgehaald. +takenFromOthersAccount=\u00a7c{0} is van {1}\u00a7c's rekening gehaald. Nieuw saldo: {2} +teleportAAll=\u00a77Teleportatie verzoek verzonden naar alle spelers... 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. -teleportRequestTimeoutInfo=\u00a77This request will timeout after {0} seconds. -teleportTop=\u00a77Bezig met teleporteren naar de top. +teleportRequestTimeoutInfo=\u00a77Dit verzoekt verloopt over {0} seconden. +teleportTop=\u00a77Bezig met teleporteren naar het hoogste punt. teleportationCommencing=\u00a77Aan het beginnen met teleporteren... teleportationDisabled=\u00a77Teleportatie uitgeschakeld. teleportationEnabled=\u00a77Teleportatie ingeschakeld. @@ -353,16 +367,17 @@ timeBeforeTeleport=Afkoeltijd tot de volgende teleport: {0} timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f 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. -timeSetPermission=\u00a7cYou are not authorized to set the time. -timeWorldCurrent=The current time in {0} is \u00a73{1} -timeWorldSet=The time was set to {0} in: \u00a7c{1} +timeSetPermission=\u00a7cJe bent niet bevoegd om de tijd te veranderen. +timeWorldCurrent=De actuele tijd in {0} is \u00a73{1} +timeWorldSet=De tijd was veranderd naar {0} in: \u00a7c{1} +tps=Huidige TPS = {0} tradeCompleted=\u00a77Ruil verricht. -tradeSignEmpty=Het handelsbordje heeft een te kleine voorraad. -tradeSignEmptyOwner=There is nothing to collect from this trade sign. -treeFailure=\u00a7cFout bij het genereren van boom. Pobeer het opnieuw op gras of dirt. -treeSpawned=\u00a77Boom gespawned. -true=true -typeTpaccept=\u00a77Om te teleporten, type \u00a7c/tpaccept\u00a77. +tradeSignEmpty=Dit handelsbord heeft een te kleine voorraad. +tradeSignEmptyOwner=Er is niks te verzamelen bij dit handelsbord. +treeFailure=\u00a7cFout bij het genereren van boom. Pobeer het opnieuw op gras of modder. +treeSpawned=\u00a77Boom gegenereerd. +true=\u00a72juist\u00a7f +typeTpaccept=\u00a77Om te accepteren, 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. @@ -375,45 +390,50 @@ unknownItemName=Onbekende voorwerp naam: {0} unlimitedItemPermission=\u00a7cOnbevoegd om oneindig {0} te hebben. unlimitedItems=Oneindige voorwerpen: unmutedPlayer=Speler {0} mag weer spreken. +unvanished=\u00a7aYou are once again visible. +unvanishedReload=\u00a7cEen herlading heeft je geforceerd om zichtbaar te worden. upgradingFilesError=Fout tijdens het upgraden van de bestanden userDoesNotExist=Speler {0} bestaat niet. -userIsAway={0} is nu AFK -userIsNotAway={0} is niet meer AFK +userIsAway={0} is nu afwezing. +userIsNotAway={0} is niet meer afwezig. userJailed=\u00a77Je bent in de gevangenis gezet. userUsedPortal={0} gebruikte een bestaande uitgangs portal. userdataMoveBackError=Fout bij het verplaasten van userdata/{0}.tmp naar userdata/{1} userdataMoveError=Fout bij het verplaasten van userdata/{0} naar userdata/{1}.tmp usingTempFolderForTesting=Tijdelijke map om te testen: +vanished=\u00a7aJe bent nu verborgen. 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. -warpOverwrite=\u00a7cYou cannot overwrite that warp. +warpOverwrite=\u00a7cJe kunt deze warp niet overschrijven. warpSet=\u00a77Warp {0} ingesteld. warpUsePermission=\u00a7cOnbevoegd om die warp te gebruiken. warpingTo=\u00a77Aan het warpen naar {0}. warps=Warps: {0} -warpsCount=\u00a77There are {0} warps. Showing page {1} of {2}. -weatherStorm=\u00a77Je hebt het weer naar storm gezet in de {0} -weatherStormFor=\u00a77Je hebt het weer in de {0} naar storm gezet voor {1} seconde -weatherSun=\u00a77Je hebt het weer naar zon gezet in de {0} -weatherSunFor=\u00a77Je hebt het weer in de {0} naar zon gezet voor {1} seconde -whoisBanned=\u00a79 - Banned: {0} -whoisExp=\u00a79 - Exp: {0} (Level {1}) -whoisGamemode=\u00a79 - Gamemode: {0} -whoisGeoLocation=\u00a79 - Locatie: {0} -whoisGod=\u00a79 - God mode: {0} -whoisHealth=\u00a79 - Levens: {0}/20 -whoisIPAddress=\u00a79 - IP Adres: {0} -whoisIs={0} is {1} -whoisJail=\u00a79 - Jail: {0} -whoisLocation=\u00a79 - Locatie: ({0}, {1}, {2}, {3}) -whoisMoney=\u00a79 - Geld: {0} -whoisOP=\u00a79 - OP: {0} -whoisStatusAvailable=\u00a79 - Status: Beschikbaar -whoisStatusAway=\u00a79 - Status: \u00a7cWeg\u00a7f +warpsCount=\u00a77Er zijn {0} warps. Weergegeven pagina {1} van de {2}. +weatherStorm=\u00a77Je hebt het weer naar stormachtig gezet in de {0} +weatherStormFor=\u00a77Je hebt het weer in de {0} naar stormachtig gezet voor {1} seconde +weatherSun=\u00a77Je hebt het weer naar zonnig gezet in de {0} +weatherSunFor=\u00a77Je hebt het weer in de {0} naar zonnig gezet voor {1} seconde +whoisAFK=\u00a76 - Afwezing:\u00a7f {0} +whoisBanned=\u00a76 - Verbannen:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Level {1}) +whoisFly=\u00a76 - Vlieg modus:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Spelmodus:\u00a7f {0} +whoisGeoLocation=\u00a76 - Locatie:\u00a7f {0} +whoisGod=\u00a76 - God modus:\u00a7f {0} +whoisHealth=\u00a76 - Levens:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP Adres:\u00a7f {0} +whoisJail=\u00a76 - Gevangenis:\u00a7f {0} +whoisLocation=\u00a76 - Locatie:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Geld:\u00a7f {0} +whoisMuted=\u00a76 - Gedempt:\u00a7f {0} +whoisNick=\u00a76 - Naam:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== 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 @@ -421,3 +441,11 @@ year=jaar years=jaren youAreHealed=\u00a77Je bent genezen. youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties new file mode 100644 index 000000000..9dc4d541f --- /dev/null +++ b/Essentials/src/messages_pl.properties @@ -0,0 +1,451 @@ +#version: TeamCity +# Single quotes have to be doubled: '' +# Translations start here +# by: losdamianos, edited by Rutr +action=* {0} {1} +addedToAccount=\u00a7a{0} zostalo dodane do twojego konta. +addedToOthersAccount=\u00a7a{0} dodane do konta {1}\u00a7. Nowy stan konta: {2}. +adventure = adventure +alertBroke=broke: +alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} +alertPlaced=postawil: +alertUsed=uzyl: +autoAfkKickReason=Zostales wyrzucony z serwera za nie ruszanie sie przez wiecej niz {0} minut. +backAfterDeath=\u00a77Uzyj komendy /back aby powrocic na miejsce swojej smierci. +backUsageMsg=\u00a77Transportowanie do poprzedniej lokacji. +backupDisabled=Zewnetrzny skrypt backupu nie zostal skonfigurowany. +backupFinished=Backup zakonczony. +backupStarted=Backup rozpoczety. +balance=\u00a77Stan konta: {0} +balanceTop=\u00a77Najbogatsi gracze ({0}) +banExempt=\u00a7cNie mozesz zbanowac tego gracza. +banIpAddress=\u00a77Zbanowano adress IP +bannedIpsFileError=Blad odczytu banned-ips.txt +bannedIpsFileNotFound=banned-ips.txt nie znaleziony +bannedPlayersFileError=Blad odczytu banned-players.txt +bannedPlayersFileNotFound=banned-players.txt nie znaleziony +bigTreeFailure=\u00a7cNie mozna tutaj postawic duzego drzewa. Sprobuj ponownie na ziemi lub trawie. +bigTreeSuccess= \u00a77Utworzono duze drzewo. +blockList=Essentials przekazuje nastepujace polecenie do innej wtyczki: +broadcast=[\u00a7cOgloszenie\u00a7f]\u00a7a {0} +buildAlert=\u00a7cNie mozesz tu budowac +bukkitFormatChanged=Format wersji Bukkita jest zmieniony. Wersja nie jest sprawdzana. +burnMsg=\u00a77Podpaliles {0} na {1} sekund. +canTalkAgain=\u00a77Znow mozesz mowic. +cantFindGeoIpDB=Nie mozna znalezc bazy danych GeoIP! +cantReadGeoIpDB=Odczytywanie bazy danych GeoIP zawiodlo! +cantSpawnItem=\u00a7cNie mozesz stworzyc przedmiotu {0}. +chatTypeLocal=[L] +chatTypeAdmin=[A] +chatTypeSpy=[Szpieg] +commandFailed=Komenda {0} zawiodla. +commandHelpFailedForPlugin=Blad podczas uzyskiwania pomocy dla: {0} +commandNotLoaded=\u00a7cKomenda {0} nie jest zaladowana! +compassBearing=\u00a77Bearing: {0} ({1} stopni). +configFileMoveError=Nie udalo sie przeniesc config.yml do lokalizacji backupa. +configFileRenameError=Nie udalo sie zmienic nazwy tymczasowego pliku na config.yml +connectedPlayers=Obecni gracze: +connectionFailed=Blad podczas otwierania polaczenia. +cooldownWithMessage=\u00a7cCooldown: {0} +corruptNodeInConfig=\u00a74Notice: Twoj plik konfiguracyjny ma uszkodzony wpis: {0} +couldNotFindTemplate=Nie mozna znajsc szablonu: {0} +creatingConfigFromTemplate=tworzenie konfiguracji z szablonu: {0} +creatingEmptyConfig=Stworzono pusty config: {0} +creative=Kreatywny +currency={0}{1} +currentWorld=Biezacy swiat: {0} +day=dzien +days=dnie +defaultBanReason=Admin ma zawsze racje! +deleteFileError=Nie mozna usunac pliku: {0} +deleteHome=\u00a77Posterunek {0} zostal usuniety +deleteJail=\u00a77Wiezienie {0} zostalo usuniete +deleteWarp=\u00a77Warp {0} zostal usuniety +deniedAccessCommand={0} nie ma dostepu do tego polecenia +dependancyDownloaded=[Essentials] Zaleznosci {0} pobrane prawidlowo. +dependancyException=[Essentials] Wystapil blad w trakcie pobierania zaleznosci. +dependancyNotFound=[Essentials] Wymagana zaleznosc nie zostala znaleziona, pobieranie. +depth=\u00a77Jestes na poziomie morza. +depthAboveSea=\u00a77Jestes {0} blok(ow) nad poziomem morza. +depthBelowSea=\u00a77Jestes {0} blok(ow) pod poziomem morza. +destinationNotSet=Cel nieokreslony. +disableUnlimited=\u00a77Wylaczone nieograniczone tworzenia {0} dla {1}. +disabled=wylaczone +disabledToSpawnMob=Tworzenie tego moba zostalo wylaczone w pliku config. +dontMoveMessage=\u00a77Teleportacja nastapi za {0}. Prosze sie nie ruszac. +downloadingGeoIp=Pobieranie bazy danych GeoIP... To moze zajac chwile (wioska: 0.6 MB, miasto: 20MB) +duplicatedUserdata=Kopiowanie danych uzytkownika: {0} i {1} +durability=\u00a77This tool has \u00a7c{0}\u00a77 uses left +enableUnlimited=\u00a77Przyznano nielimitowane zasoby {0} dla {1}. +enabled=wlaczone +enchantmentApplied = \u00a77Ulepszenie {0} zostalo przyznane przedmiotowi w twoim reku. +enchantmentNotFound = \u00a7cUlepszenie nie odnalezione +enchantmentPerm = \u00a7cNie masz zezwolenia na {0}. +enchantmentRemoved = \u00a77Ulepszenie {0} zostalo usuniete z przedmiotu w twoim reku.. +enchantments = \u00a77Ulepszenia: {0} +errorCallingCommand=Blad wywolywania komendy /{0} +errorWithMessage=\u00a7cBlad: {0} +essentialsHelp1=Plik jest uszkodzony i Essentials nie moze go otworzyc. Essentials jest teraz wylaczone. Jesli nie mozesz samemu naprawic pliku, idz do adresu http://tiny.cc/EssentialsChat +essentialsHelp2=Plik jest uszkodzony i Essentials nie moze go otworzyc. Essentials jest teraz wylaczone. Jesli nie mozesz samemu naprawic pliku, wpisz /essentialshelp w grze lub idz do adresu http://tiny.cc/EssentialsChat +essentialsReload=\u00a77Essentials przeladowalo {0}. +exp=\u00a7c{0} \u00a77ma\u00a7c {1} \u00a77doswiadczenia (poziom\u00a7c {2}\u00a77), potrzebuje\u00a7c {3} \u00a77wiecej doswiadczenia do nastepnego poziomu. +expSet=\u00a7c{0} \u00a77teraz ma\u00a7c {1} \u00a77doswiadczenia. +extinguish=\u00a77Zostales ugaszony. +extinguishOthers=\u00a77Ugasiles {0}. +failedToCloseConfig=Blad podczas zamykania configu {0} +failedToCreateConfig=Blad podczas tworzenia configu {0} +failedToWriteConfig=Blad podczas pisania configu {0} +false=\u00a74false\u00a7f +feed=\u00a77Twoj glod zostal zaspokojony. +feedOther=\u00a77Nakarmiono {0}. +fileRenameError=Blad podczas zmiany nazwy pliku \u0093{0}\u0094. +flyMode=\u00a77Latanie {0} dla {1}. +flying=flying +foreverAlone=\u00a7cNie masz komu odpisac. +freedMemory=Zwolniono {0} MB. +gameMode=\u00a77Ustawiono tryb gry {0} dla {1}. +gcchunks= chunki +gcentities= jednostki +gcfree=Wolna pamiec: {0} MB +gcmax=Maksymalna pamiec: {0} MB +gctotal=Alokowana pamiec: {0} MB +geoIpUrlEmpty=Url pobierania GeoIP jest puste. +geoIpUrlInvalid=Url pobierania GeoIP jest nieprawidlowe. +geoipJoinFormat=Gracz {0} przybyl z {1} +godDisabledFor=Godmode wylaczony dla {0}. +godEnabledFor=Godmode wlaczony dla {0}. +godMode=\u00a77Godmode {0}. +hatArmor=\u00a7cError, you cannot use this item as a hat! +hatEmpty=\u00a7cYou are not wearing a hat. +hatFail=\u00a7cMusisz cos trzymac w dloni. +hatPlaced=\u00a7eCiesz sie nowym kapeluszem! +haveBeenReleased=\u00a77Zostales wypuszczony. +heal=\u00a77Uleczony +healOther=\u00a77Uleczono {0}. +helpConsole=Aby uzyskac pomoc z konsoli, wpisz \u0093????. +helpFrom=\u00a77Komendy od {0}: +helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Komendy odpowiadajace "{0}": +helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} +helpPages=Strona \u00a7c{0}\u00a7f z \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Plugin Help: /help {1} +holeInFloor=Kosmos +homeSet=\u00a77Dom ustawiono +homeSetToBed=\u00a77Twoj dom znajduje sie teraz w tym lozku. +homes=Domy: {0} +hour=godzina +hours=godziny +ignorePlayer=Od tej chwili ignorujesz gracza {0}. +illegalDate=Nie prawidlowy format daty. +infoChapter=Wybierz rozdzial: +infoChapterPages=Rozdzial {0}, strona \u00a7c{1}\u00a7f z \u00a7c{2}\u00a7f: +infoFileDoesNotExist=Plik \u0093info.txt\u0094 nie istnieje. Tworzenie tego pliku. +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Strona \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- +infoUnknownChapter=Nieznany rozdzial. +invBigger=Ekwipunek innego gracza jest wiekszy niz Twoj. +invRestored=Twoj ekwipunek zostal przywrocony. +invSee=Widzisz ekwipunek {0}. +invSeeHelp=Wpisz /invsee aby przywrocic swoj ekwipunek. +invalidCharge=\u00a7cInvalid charge. +invalidHome=Dom {0} nie istnieje. +invalidMob=Niepoprawny typ moba.. +invalidServer=Niepoprawny serwer! +invalidSignLine=Linia {0} na znaku jest bledna. +invalidWorld=\u00a7cNieprawidlowy swiat. +inventoryCleared=\u00a77Ekwipunek oprozniony. +inventoryClearedOthers=\u00a77Ekwipunek \u00a7c{0}\u00a77 oprozniony. +is=jest +itemCannotBeSold=Nie mozesz sprzedac tego przedmiotu do serwera. +itemMustBeStacked=Przedmiotem handluje sie w stackach. Wielkosc 2s to dwa stacki itd. +itemNotEnough1=\u00a7cMasz za malo tego przedmiotu, aby go sprzedac. +itemNotEnough2=\u00a77Jesli chcesz sprzedac wszystkie przedmioty tego typu, wpisz /sell nazwaprzedmiotu +itemNotEnough3=\u00a77/sell nazwaprzedmiotu -1 sprzeda cala ilosc przedmiotu poza 1 sztuka itd. +itemSellAir=Serio probujesz sprzedac powietrze? Miej w reku przedmiot.. +itemSold=\u00a77Sprzedamo za \u00a7c{0} \u00a77({1} {2} po {3} kazdy) +itemSoldConsole={0} Sprzedano {1} za \u00a77{2} \u00a77({3} sztuki po {4} kazda) +itemSpawn=\u00a77Otrzymywanie {0} {1} +itemsCsvNotLoaded=Nie mozna wczytac items.csv. +jailAlreadyIncarcerated=\u00a7cTen gracz jest juz w wiezieniu \u0093{0}\u0094. +jailMessage=\u00a7cZa kazde przewinienie czeka kara. +jailNotExist=Nie ma takiego wiezienia.. +jailReleased=\u00a77Gracz \u00a7e{0}\u00a77 wypuszczony z wiezienia. +jailReleasedPlayerNotify=\u00a77Zostales zwolniony! +jailSentenceExtended=Czas pobyty w wiezieniu zwiekszony do: {0) +jailSet=\u00a77Zostalo stworzone wiezienie \u0093{0}\u0094. +jumpError=To moglo by ci cos zrobic. +kickDefault=Zostales wyrzucony z serwera. +kickExempt=\u00a7cNie mozesz wyrzucic tej osoby. +kickedAll=\u00a7cWyrzucanie wszystki graczy z serwera +kill=\u00a77Zabito {0}. +kitError2=\u00a7cTen zestaw nie istnieje lub zostal zle zdefininowany. +kitError=\u00a7cNie ma prawidlowych zestawow. +kitErrorHelp=\u00a7cByc moze przedmiotowi brakuje ilosci w konfiguracji? +kitGive=\u00a77Przydzielanie zestawu {0}. +kitInvFull=\u00a7cTwoj ekwipuek jest pelen, wyrzucanie zestawu na podloge. +kitTimed=\u00a7cNie mozesz wziasc tego zestawu przez kolejne {0}. +kits=\u00a77Zestawy: {0} +lightningSmited=\u00a77Zostales uderzony piorunem. +lightningUse=\u00a77Uderzanie piorunem {0}. +listAfkTag = \u00a77[AFK]\u00a7f +listAmount = \u00a79Na serwerze jest \u00a7c{0}\u00a79 graczy z maksimum \u00a7c{1}\u00a79 online. +listAmountHidden = \u00a79There are \u00a7c{0}\u00a77/{1}\u00a79 out of maximum \u00a7c{2}\u00a79 players online. +listGroupTag={0}\u00a7f: +listHiddenTag = \u00a77[UKRYTY]\u00a7f +loadWarpError=Blad przy wczytywaniu Warpu {0} +localFormat=Lokalny: <{0}> {1} +mailClear=\u00a7cAby oczyscic skrzynke, wpisz /mail clear +mailCleared=\u00a77Skrzynka oprozniona!! +mailSent=\u00a77Wiadomosc wyslana! +markMailAsRead=\u00a7cAby oczyscic skrzynke, wpisz /mail clear +markedAsAway=\u00a77Zostales oznaczony jako nieobecny. +markedAsNotAway=\u00a77Juz nie jestes nieobecny. +maxHomes=Nie mozesz ustawic wiecej niz {0} domow. +mayNotJail=\u00a7cNie mozesz wtracic do wiezienia tej osoby. +me=ja +minute=minuta +minutes=minuty +missingItems=Nie masz {0}x{1}. +missingPrefixSuffix=Brakuje prefixu lub suffixu dla {0} +mobSpawnError=Blad podczas zmiany spawnera. +mobSpawnLimit=Ilosc mobow ograniczona do limitu serwera. +mobSpawnTarget=Blok musi byc spawnerem. +mobsAvailable=\u00a77Moby: {0} +moneyRecievedFrom=\u00a7a{0} otrzymane od {1} +moneySentTo=\u00a7a{0} zostalo wyslane do {1} +moneyTaken={0} zostalo zabrane z Twoich funduszy.. +month=miesiac +months=miesiecy +moreThanZero=Ilosc musi byc wieksza od 0. +msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cNie mozesz wyciszyc tego gracza.. +mutedPlayer=Gracz {0} wyciszony. +mutedPlayerFor=Gracz {0} wyciszony na {1}. +mutedUserSpeaks={0} probowal sie odezwac, ale jest wyciszony. +nearbyPlayers=Gracze w poblizu: {0} +negativeBalanceError=Gracz nie moze miec ujemnego stanu konta. +nickChanged=Nick zmieniony. +nickDisplayName=\u00a77Musisz wlaczyc \u0093change-displayname\u0094 w configu Essential. +nickInUse=\u00a7cTen pseudonim jest juz w uzyciu. +nickNamesAlpha=\u00a7cPseudonimy musza byc alfanumeryczne. +nickNoMore=\u00a77Nie masz juz pseudonimu. +nickOthersPermission=\u00a7cNie masz uprawnienia do zmiany pseudonimu innym. +nickSet=\u00a77Twoj pseudonim od teraz to \u00a7c{0} +noAccessCommand=\u00a7cNie masz dostepu do tej komendy. +noAccessPermission=\u00a7cNie masz uprawnien do dostepu do {0}. +noBreakBedrock=Nie masz uprawnien do niszczenia bedrocka. +noDestroyPermission=\u00a7cNie masz uprawnien do niszczenia {0}. +noDurability=\u00a7cThis item does not have a durability. +noGodWorldWarning=\u00a7cUwaga! Godmode wylaczony w tym swiecie!. +noHelpFound=\u00a7cNie ma odpowiadajacych komend. +noHomeSet=Nie masz ustawionego domu. +noHomeSetPlayer=Gracz nie ma ustawionego domu. +noKitPermission=\u00a7cMusisz posiadac uprawnienia \u00a7c{0}\u00a7c aby uzywac tego zestawu. +noKits=\u00a77Nie ma jeszcze dostepnych zestawow. +noMail=Nie masz zadnych wiadomosci. +noMotd=\u00a7cNie ma wiadomosci dnia.. +noNewMail=\u00a77Nie masz zadnych nowych wiadomosci. +noPendingRequest=Nie masz oczekuj\u00c3\u00a1cego z\u00c3\u00a1dania. +noPerm=\u00a7cNie masz uprawnien \u00a7f{0}. +noPermToSpawnMob=\u00a7cNie masz uprawnien do tworzenia tego moba.. +noPlacePermission=\u00a7cNie masz uprawnien do stawiania bloku kolo tego znaku.. +noPowerTools=Nie masz przypisanego zadnego power tool. +noRules=\u00a7cNie ustalono jeszcze zadnych zasad. +noWarpsDefined=Nie ma zadnych warpow. +none=zaden +notAllowedToQuestion=\u00a7cNie mozesz zadac tego pytania. +notAllowedToShout=\u00a7cNie mozesz krzyczec.. +notEnoughExperience=Nie masz wystarczajaco duzo doswiadczenia. +notEnoughMoney=Nie masz tyle pieniedzy. +notFlying=not flying +notRecommendedBukkit= * ! * Wersja Bukkita nie jest rekomendowana wersja dla Essentials. +notSupportedYet=Jeszcze nie wspierane. +nothingInHand = \u00a7cNie masz nic w reku.. +now=teraz +nuke=Niech smierc pochlonie caly swiat! +numberRequired=Tutaj powinna byc liczba, gluptasie. +onlyDayNight=/time obsluguje tylko day/night. +onlyPlayers=Tylko gracze w grze moga uzywac {0}. +onlySunStorm=/weather obsluguje tylko sun/storm. +orderBalances=Ordering balances of {0} users, please wait ... +pTimeCurrent=Czas \u00a7e{0} u00a7f to {1}. +pTimeCurrentFixed=Czas \u00a7e{0}\u00a7f przywrocony do {1}. +pTimeNormal=Czas \u00a7e{0}'s\u00a7f jest normalny i odpowiada serwerowemu. +pTimeOthersPermission=\u00a7cNie masz uprawnien do zmiany czasu innym. +pTimePlayers=Ci gracze beda miec wlasny czas: +pTimeReset=Czas gracza zostal zresetowany dla \u00a7e{0} +pTimeSet=Czas gracza ustawiony na \u00a73{0}\u00a7f dla \u00a7e{1} +pTimeSetFixed=Czas gracza przywrocony do \u00a73{0}\u00a7f dla \u00a7e{1} +parseError=Blad skladniowy {0} w linii {1}. +pendingTeleportCancelled=\u00a7cOczekujace zapytanie teleportacji odrzucone. +permissionsError=Brakuje Permissions/GroupManager; prefixy/suffixy czatu zostana wylaczone. +playerBanned=\u00a7c{0} zbanowal {1} za {2}. +playerInJail=\u00a7cGracz jest juz w wiezieniu \u0093{0}\u0094. +playerJailed=\u00a77Gracz {0} wtracony do wiezienia. +playerJailedFor= \u00a77Gracz {0} wtracony do wiezienia na {1}. +playerKicked=\u00a7c{0} wyrzucil {1} za {2}. +playerMuted=\u00a77Zostales wyciszony. +playerMutedFor=\u00a77Zostales wyciszony na {0}. +playerNeverOnServer=\u00a7cGracz {0} nigdy nie byl na tym serwerze. +playerNotFound=\u00a7cNie odnaleziono gracza. +playerUnmuted=\u00a77Zostales przywrocony do glosu. +pong=Pong! +possibleWorlds=\u00a77Mozliwe swiaty maja numery od 0 do {0}. +powerToolAir=Nie zartuj, chcesz przypisac polecenie do powietrza? +powerToolAlreadySet=Polecenie \u00a7c{0}\u00a7f jest juz przypisane do {1}. +powerToolAttach=\u00a7c{0}\u00a7f polecenie przypisane do {1}. +powerToolClearAll=Wszystkie przypisane polecenia zostaly usuniete! +powerToolList={1} zawiera nastepujace polecenia: \u00a7c{0}\u00a7f. +powerToolListEmpty={0} nie ma przypisanych polecen. +powerToolNoSuchCommandAssigned=Polecenie \u00a7c{0}\u00a7f nie moze byc przypisane do {1}. +powerToolRemove=Polecenie \u00a7c{0}\u00a7f usuniete z {1}. +powerToolRemoveAll=Wszystkie polecenia zostaly usuniete z {0}. +powerToolsDisabled=Wszystkie twoje podpiecia zostaly zdezaktywowane. +powerToolsEnabled=Wszystkie twoje podpiecia zostaly aktywowane. +protectionOwner=\u00a76[EssentialsProtect] Wlasciciel zabezpieczen: {0} +questionFormat=\u00a77[Question]\u00a7f {0} +readNextPage=Wpisz /{0} {1} aby przeczytac nastepna strone +reloadAllPlugins=\u00a77Przeladowano wszystkie wtyczki +removed=\u00a77Usunieto {0} byty. +repair=Udalo sie naprawic twoj: \u00a7e{0}. +repairAlreadyFixed=\u00a77Ten przedmiot nie potrzebuje naprawy +repairEnchanted=\u00a77Nie masz zezwolenia do naprawiania ulepszonych przedmiotow. +repairInvalidType=\u00a7cTen przedmiot nie moze byc naprawiony. +repairNone=Zaden przedmiot nie wymagal naprawy. +requestAccepted=\u00a77Zadanie teleportacji - zaakceptowano. +requestAcceptedFrom=\u00a77{0} zaakceptowal Twoje z\u00c3\u00a1danie teleportacji. +requestDenied=\u00a77Zadanie teleportacji - odrzucone. +requestDeniedFrom=\u00a77{0} odrzucil Twoje z\u00c3\u00a1danie teleportacji. +requestSent=\u00a77zZ\u00c3\u00a1danie wyslania do {0}\u00a77. +requestTimedOut=\u00a7cZ\u00c3\u00a1danie teleportacji - przedawnione. +requiredBukkit= * ! * Potrzebujesz najnowszego {0} CraftBukkit-a, pobierz go z http://dl.bukkit.org/downloads/craftbukkit/ +returnPlayerToJailError=Wystapil blad podczas powrotu gracza {0} do wiezienia: {1} +second=sekunda +seconds=sekund +seenOffline=Gracz {0} jest offline od {1} +seenOnline=Gracz {0} jest online od {1} +serverFull=Serwer jest pelen graczy, sprobuj pozniej. +serverTotal=Podsumowanie serwera: {0} +setSpawner=Ustawiono spawn na {0}. +sheepMalformedColor=Niewlasciwa barwa. +shoutFormat=\u00a77[Shout]\u00a7f {0} +signFormatFail=\u00a74[{0}] +signFormatSuccess=\u00a71[{0}] +signFormatTemplate=[{0}] +signProtectInvalidLocation=\u00a74Nie masz zezwolenia do tworzenia tutaj znakow. +similarWarpExist=Warp o tej nazwie juz istnieje. +slimeMalformedSize=Niewlasciwy rozmiar. +soloMob=Ten mob lubi byc sam. +spawnSet=\u00a77Ustawiono punkt spawnu dla grupy {0}. +spawned=stworzono +sudoExempt=Nie mozesz podniesc uprawnien tego uzytkownika. +sudoRun=Probuje {0} uruchomic: /{1} {2} +suicideMessage=\u00a77Zegnaj okrutny swiecie. +suicideSuccess= \u00a77{0} dokonal zamachu na swoje zycie +survival=survival +takenFromAccount=\u00a7c{0} zostalo pobrane z konta. +takenFromOthersAccount=\u00a7c{0} zostalo pobrane z {1}\u00a7c konta. Nowy stan konta: {2} +teleportAAll=\u00a77Zadanie teleportacji - wyslano do wszystkich graczy. +teleportAll=\u00a77Teleportowanie wszystkich graczy. +teleportAtoB=\u00a77{0}\u00a77 przeteleportowal Ciebie do {1}\u00a77. +teleportDisabled={0} ma zdezaktywowana teleportacje. +teleportHereRequest=\u00a7c{0}\u00a7c ma zadanie przeteleportowac cie do nich. +teleportNewPlayerError=Blad przy teleportowniu nowego gracza. +teleportRequest=\u00a7c{0}\u00a7c zazadal teleportacji do Ciebie. +teleportRequestTimeoutInfo=\u00a77 Zadanie teleportacji przedawni sie za {0} sekund. +teleportTop=\u00a77Teleportacja na wierzch. +teleportationCommencing=\u00a77Teleport rozgrzewa sie... +teleportationDisabled=\u00a77Teleportacja - zdezaktywowana. +teleportationEnabled=\u00a77Teleportacja - aktywowana. +teleporting=\u00a77Teleportacja... +teleportingPortal=\u00a77Teleportacja przez portal. +tempBanned=Tymczasowo zbanowany na serwerze przez {0}. +tempbanExempt=\u00a77Nie mozesz tymczasowo zbanowac tego gracza. +thunder= {0} przywowlal burze. +thunderDuration={0} przywolal burze na {1} sekund. +timeBeforeHeal=Czas przed nastepnym uzdrowieniem: {0}. +timeBeforeTeleport=Czas przed nastepnym teleportem:{0}. +timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f +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=Czas ustawiono we wszystkich swiatach. +timeSetPermission=\u00a7cNie masz uprawnien do ustawiania czasu. +timeWorldCurrent=Obecny czas {0} to \u00a73{1}. +timeWorldSet=Czas ustawiono {0} w: \u00a7c{1}. +tps=Current TPS = {0} +tradeCompleted=\u00a77Handel zakonczono. +tradeSignEmpty=Tabliczka handlowa nie jest dostepna dla Ciebie. +tradeSignEmptyOwner=Nie ma nic do pobrania z tej tabliczki. +treeFailure=\u00a7cUtworzenie drzewa nie powiodlo sie, sprobuj na trawie lub ziemi. +treeSpawned=\u00a77Drzewo utworzono. +true=\u00a72true\u00a7f +typeTpaccept=\u00a77Aby zaakceptowac teleport, wpisz \u00a7c/tpaccept\u00a77. +typeTpdeny=\u00a77Aby odmowic teleportacji, wpisz \u00a7c/tpdeny\u00a77. +typeWorldName=\u00a77Mozesz rowniez wpisac nazwe danego swiata. +unableToSpawnMob=Nie udalo sie stworzyc potwora. +unbannedIP=Odbanowana gracza o danym adresie IP. +unbannedPlayer=Odbanowano gracza. +unignorePlayer=Nie ignorujesz juz gracza {0}. +unknownItemId=Nieznane id przedmiotu: {0}. +unknownItemInList=Nieznany przedmiot {0} w liscie {1} . +unknownItemName=Nieznana nazwa przedmiotu: {0}. +unlimitedItemPermission=\u00a7cBrak uprawnien dla nielimitowanego przedmiotu {0}. +unlimitedItems=Nielimitowane przedmioty: +unmutedPlayer=Gracz {0} moze znowu mowic. +unvanished=\u00a7aZn\u00c3\u00b3w jestes widoczny. +unvanishedReload=\u00a7cReload spowodowal ze cie widac. +upgradingFilesError=Wystapil blad podczas aktualizowaniu plik\u00c3\u00b3w. +userDoesNotExist=Uzytkownik {0} nie istnieje w bazie danych. +userIsAway={0} jest teraz AFK. +userIsNotAway={0} nie jest juz AFK. +userJailed=\u00a77Zostales zamkniety w wiezieniu. +userUsedPortal={0} uzyl istniejacego portalu wyjscia. +userdataMoveBackError=Nie udalo sie przeniesc userdata/{0}.tmp do userdata/{1} +userdataMoveError=Nie udalo sie przeniesc userdata/{0} do userdata/{1}.tmp +usingTempFolderForTesting=Uzywam tymczasowego folderu dla testu: +vanished=\u00a7aJuz jestes niewidoczny. +versionMismatch=Niepoprawna wersja! Prosze zaktualizowac {0} do tej samej wersji co inne pliki. +versionMismatchAll=Niepoprawna wersja! Prosze zaktualizowac wszystkie pliki Essentials do tej samej wersji. +voiceSilenced=\u00a77Twe usta zostaly zaszyte. +warpDeleteError=Wystapil problem podczas usuwania pliku z Warpami. +warpListPermission=\u00a7cNie masz pozwolenia na sprawdzenie listy Warp\u00c3\u00b3w.. +warpNotExist=Ten Warp nie istnieje. +warpOverwrite=\u00a7cNie mozesz nadpisac tego Warpa. +warpSet=\u00a77Warp {0} stworzony. +warpUsePermission=\u00a7cNie masz pozwolenie na korzystanie z tego Warpa. +warpingTo=\u00a77Teleportuje do {0}. +warps=Warpy: {0} +warpsCount=\u00a77Istnieje {0} warp\u00c3\u00b3w. Pokazuje strone {1} z {2}. +weatherStorm=\u00a77Ustawiles burze w {0}. +weatherStormFor=\u00a77Ustawiles burze w {0} na {1} sekund. +weatherSun=\u00a77Ustawiles bezchmurna pogode w {0}. +weatherSunFor=\u00a77Ustawiles bezchmurna pogode w {0} na {1} sekund. +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Zbanowany:\u00a7f {0}. +whoisExp=\u00a76 - Punkty Doswiadczenia:\u00a7f {0} (Poziom {1}). +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Tryb Gry:\u00a7f {0}. +whoisGeoLocation=\u00a76 - Lokalizacja:\u00a7f {0}. +whoisGod=\u00a76 - Godmode:\u00a7f {0}. +whoisHealth=\u00a76 - Zdrowie:\u00a7f {0}/20. +whoisIPAddress=\u00a76 - Adres IP:\u00a7f {0}. +whoisJail=\u00a76 - W wiezieniu:\u00a7f {0}. +whoisLocation=\u00a76 - Lokalizacja:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Pieniadze:\u00a7f {0}. +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== +worth=\u00a77Stack {0} jest warty \u00a7c{1}\u00a77 ({2}rzedmiot(y) po {3} kazdy) +worthMeta=\u00a77Stack {0} z metadata {1} jest warty \u00a7c{2}\u00a77 ({3} przedmiot(y) po {4} kazdy) +worthSet=Cena przedmiotu ustawiona. +year=rok +years=lat +youAreHealed=\u00a77Zostales/as uleczony/na. +youHaveNewMail=\u00a7cMasz {0} wiadomosci!\u00a7f napisz \u00a77/mail read\u00a7f aby je przeczytac. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties new file mode 100644 index 000000000..43dfa69cf --- /dev/null +++ b/Essentials/src/messages_pt.properties @@ -0,0 +1,451 @@ +#version: TeamCity +# Single quotes have to be doubled: '' +# Translations start here +# by: FurmigaHumana, completed by Iaccidentally +action=* {0} {1} +addedToAccount=\u00a7a{0} foi adicionado a sua conta. +addedToOthersAccount=\u00a7a{0} adicionado a {1}\u00a7a saldo. Novo saldo: {2} +adventure = adventure +alertBroke=Quebrou: +alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} em: {3} +alertPlaced=Colocou: +alertUsed=Usou: +autoAfkKickReason=Voc\u00ea foi kickado por estar inativo a mais de {0} minutos. +backAfterDeath=\u00a77Use o comando /back para voltar onde morreu. +backUsageMsg=\u00a77Retornando a posi\u00e7ao anterior... +backupDisabled=Um script de backup externo nao foi configurado. +backupFinished=Backup conclu\u00eddo +backupStarted=Backup iniciado +balance=\u00a77Saldo: {0} +balanceTop=\u00a77 Saldos superiores ({0}) +banExempt=\u00a7cVoc\u00ea nao pode banir este jogador. +banIpAddress=\u00a77Endere\u00e7o de IP banido +bannedIpsFileError=Erro ao ler o arquivo banned-ips.txt +bannedIpsFileNotFound=banned-ips.txt nao encontrado +bannedPlayersFileError=Erro ao ler o arquivo banned-players.txt +bannedPlayersFileNotFound=banned-players.txt nao encontrado +bigTreeFailure=\u00a7cFalha na gera\u00e7ao da \u00e1rvore grande. Tente de novo na terra ou grama. +bigTreeSuccess= \u00a77\u00c1rvore grande gerada. +blockList=Essentials passou o seguinte comando a outro plugin: +broadcast=[\u00a7cBroadcast\u00a7f]\u00a7a {0} +buildAlert=\u00a7cVoc\u00ea nao tem permissao de construir. +bukkitFormatChanged=Bukkit: formato da versao alterada. Versao nao verificada. +burnMsg=\u00a77Voc\u00ea {0} foi incendiado por {1} segundos. +canTalkAgain=\u00a77Voc\u00ea pode falar de novo +cantFindGeoIpDB=Nao foi poss\u00edvel encontrar o GeoIP database! +cantReadGeoIpDB=Falhou em ler a GeoIP database! +cantSpawnItem=\u00a7cVoc\u00ea nao tem permissao de pegar este item {0} +chatTypeLocal=[L] +chatTypeAdmin=[A] +chatTypeSpy=[Spy] +commandFailed=Comando {0} falhou: +commandHelpFailedForPlugin=Erro ao obter ajuda para: {0} +commandNotLoaded=\u00a7cCommando {0} provavelmente esta carregado. +compassBearing=\u00a77Inclina\u00e7ao: {0} ({1} graus). +configFileMoveError=Falha ao mover arquivo config.yml ao local de backup. +configFileRenameError=Falha em renomear arquivo temporario em config.yml +connectedPlayers=Jogadores conectados: +connectionFailed=Falha ao abrir conexao. +cooldownWithMessage=\u00a7cTempo de espera: {0} +corruptNodeInConfig=\u00a74Aviso: Seu arquivo de configura\u00e7ao tem uma parte {0} corrompida. +couldNotFindTemplate=Nao foi poss\u00edvel encontrar o modelo {0} +creatingConfigFromTemplate=Criando arquivo de configura\u00e7ao com o modelo: {0} +creatingEmptyConfig=Criando arquivo de configura\u00e7ao vazio: {0} +creative=creative +currency={0}{1} +currentWorld=Current World: {0} +day=dia +days=dias +defaultBanReason=O martelo proibicao falou! +deleteFileError=Nao \u00e9 poss\u00edvel deletar arquivo: {0} +deleteHome=\u00a77Casa {0} foi removida. +deleteJail=\u00a77prisao {0} foi removida. +deleteWarp=\u00a77Warp {0} foi removido. +deniedAccessCommand={0} Acesso negado ao comando. +dependancyDownloaded=[Essentials] Dependencia {0} baixada com sucesso. +dependancyException=[Essentials] Ocorreu um erro ao tentar baixar uma dependencia +dependancyNotFound=[Essentials] Uma dependencia necess\u00e1ria nao foi encontrada. Baixando agora. +depth=\u00a77Voc\u00ea esta no nivel do mar. +depthAboveSea=\u00a77Voc\u00ea esta a {0} bloco(s) acima do nivel do mar. +depthBelowSea=\u00a77Voc\u00ea esta a {0} bloco(s) abaixo do nivel do mar. +destinationNotSet=Destino nao definido. +disableUnlimited=\u00a77Desativada itens ilimitados de {0} para {1}. +disabled=desativado +disabledToSpawnMob=Desovar este mob esta desativado nas configura\u00e7\u00f5es. +dontMoveMessage=\u00a77Teleporte vai come\u00e7ar em {0}. Nao se mova. +downloadingGeoIp=Baixando GeoIP database ... pode demorar um pouco (Pais: 0.6 MB, Cidade: 20MB) +duplicatedUserdata=Dado de usu\u00e1rio duplicado: {0} e {1} +durability=\u00a77This tool has \u00a7c{0}\u00a77 uses left +enableUnlimited=\u00a77Colocando quantidade ilimitada de {0} para {1}. +enabled=ativado +enchantmentApplied = \u00a77O encantamento {0} foi aplicado ao item na sua mao. +enchantmentNotFound = \u00a7cEncantamento nao encontrado. +enchantmentPerm = \u00a7cVoc\u00ea nao tem permissao para {0} +enchantmentRemoved = \u00a77O encantamento {0} foi removido do item na sua mao. +enchantments = \u00a77Encantamentos: {0} +errorCallingCommand=Erro no comando /{0} +errorWithMessage=\u00a7cErro: {0} +essentialsHelp1=O arquivo esta quebrado e o essentials nao consegue abrilo. Essentials esta desativado agora. Se voc\u00ea nao consegue arrumar o arquivo, va para http://tiny.cc/EssentialsChat +essentialsHelp2=O arquivo esta quebrado e o essentials nao consegue abrilo. Essentials esta desativado agora. Se voc\u00ea nao consegue arrumar o arquivo, tente digitar /essentialshelp no jogo ou va para http://tiny.cc/EssentialsChat +essentialsReload=\u00a77Essentials recarregado {0} +exp=\u00a7c{0} \u00a77has\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) and needs\u00a7c {3} \u00a77more exp to level up. +expSet=\u00a7c{0} \u00a77now has\u00a7c {1} \u00a77exp. +extinguish=\u00a77Voce se extinguiu. +extinguishOthers=\u00a77Voce foi extinguido {0}. +failedToCloseConfig=Falha em fechar o arquivo de configura\u00e7ao {0} +failedToCreateConfig=Falha em criar o arquivo de configura\u00e7ao {0} +failedToWriteConfig=Falha em escrever no arquivo de configura\u00e7ao {0} +false=\u00a74false\u00a7f +feed=\u00a77Seu apetite foi saciado. +feedOther=\u00a77Satisfeito {0}. +fileRenameError=Falha ao renomear o arquivo {0}. +flyMode=\u00a77Definir o modo de voar {0} para {1}. +flying=flying +foreverAlone=\u00a7cVoc\u00ea nao tem ninguem a quem responder. +freedMemory=Livre {0} MB. +gameMode=\u00a77Gamemode {0} definido para {1}. +gcchunks= chunks, +gcentities= entidades +gcfree=Memoria livre: {0} MB +gcmax=Mem\u00f3ria Maxima: {0} MB +gctotal=Mem\u00f3ria alocada: {0} MB +geoIpUrlEmpty=GeoIP url de download esta vazia. +geoIpUrlInvalid=GeoIP url de download e invalida. +geoipJoinFormat=Jogador {0} veio do {1} +godDisabledFor=desativado para {0} +godEnabledFor=ativado para {0} +godMode=\u00a77Modo Deus {0}. +hatArmor=\u00a7cDe erro, voce nao pode usar este item como um chapeu! +hatEmpty=\u00a7cYou are not wearing a hat. +hatFail=\u00a7cVoce deve ter algo para vestir na sua mao. +hatPlaced=\u00a7eAproveite o seu novo chapeu! +haveBeenReleased=\u00a77Voc\u00ea foi liberado. +heal=\u00a77Voc\u00ea foi curado. +healOther=\u00a77Curado {0}. +helpConsole=Para ver ajuda do console, digite ?. +helpFrom=\u00a77Comandos a partir de {0}: +helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Comandos correspondentes "{0}": +helpOp=\u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1} +helpPages=P\u00e1gina \u00a7c{0}\u00a7f of \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Ajuda Plugin: /help {1} +holeInFloor=Buraco no chao +homeSet=\u00a77Casa definida. +homeSetToBed=\u00a77Sua casa agora esta definida a esta cama. +homes=Casa: {0} +hour=hora +hours=horas +ignorePlayer=Voc\u00ea esta ignorando o jogador {0} agora. +illegalDate=Formato de data \u00edlegal. +infoChapter=Selecione o cap\u00edtulo: +infoChapterPages=Cap\u00edtulo {0}, pagina \u00a7c{1}\u00a7f de \u00a7c{2}\u00a7f: +infoFileDoesNotExist=Arquivo info.txt nao existe. Criando um para voc\u00ea. +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Page \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- +infoUnknownChapter=Cap\u00edtulo desconhecido. +invBigger=O invent\u00e1rio do outro usu\u00e1rio e maior que o seu. +invRestored=Seu invent\u00e1rio foi restaurado. +invSee=Voc\u00ea v\u00ea o invent\u00e1rio de {0}. +invSeeHelp=Use /invsee para voltar ao seu invent\u00e1rio. +invalidCharge=\u00a7cCarga invalida. +invalidHome=Home {0} nao existe +invalidMob=Tipo de mob inv\u00e1lido. +invalidServer=Servidor inv\u00e1lido! +invalidSignLine=Linha {0} da placa e inv\u00e1lida. +invalidWorld=\u00a7cMundo inv\u00e1lido. +inventoryCleared=\u00a77Invent\u00e1rio limpo. +inventoryClearedOthers=\u00a77Invent\u00e1rio de \u00a7c{0}\u00a77 limpo. +is=\u00e9 +itemCannotBeSold=Este item nao pode ser vendido para o servidor. +itemMustBeStacked=O item deve ser negociado em pacotes. A qantidade de 2s seria dois pacotes, etc. +itemNotEnough1=\u00a7cVoc\u00ea nao tem esta quantidade de itens para vender. +itemNotEnough2=\u00a77Se voc\u00ea quer vender todos os itens deste tipo, use /sell NomeDoItem +itemNotEnough3=\u00a77/sell NomeDoItem -1 vai vender tudo mais um item, etc. +itemSellAir=Voc\u00ea realmente tentou vender ar? Coloque um item na sua mao. +itemSold=\u00a77Vendido para \u00a7c{0} \u00a77({1} {2} a {3} cada) +itemSoldConsole={0} vendido {1} para \u00a77{2} \u00a77({3} itens a {4} cada) +itemSpawn=\u00a77Dando {0} de {1} +itemsCsvNotLoaded=nao foi poss\u00edvel carregar items.csv. +jailAlreadyIncarcerated=\u00a7cEsta pessoa j\u00e1 esta na cadeia: {0} +jailMessage=\u00a7cVoc\u00ea faz o crime, voc\u00ea cumpre a pena. +jailNotExist=esta cadeia nao existe. +jailReleased=\u00a77Player \u00a7e{0}\u00a77 libertado. +jailReleasedPlayerNotify=\u00a77Voc\u00ea foi solto! +jailSentenceExtended=Tempo de prisao estendido para: {0) +jailSet=\u00a77Cela {0} foi definida +jumpError=Isso prejudica o c\u00e9rebro do seu computador. +kickDefault=Kickado do servidor. +kickExempt=\u00a7cVoc\u00ea nao pode kickar esta pessoa. +kickedAll=\u00a7cKicked all players from server +kill=\u00a77Assassinado {0}. +kitError2=\u00a7cEsse kit nao existe ou foi definido impropiamente. +kitError=\u00a7cNao existe kits v\u00e1lidos. +kitErrorHelp=\u00a7cTalvez um item esta faltando a quantidade nas configura\u00e7\u00f5es? +kitGive=\u00a77Dando kit {0}. +kitInvFull=\u00a7cSeu invent\u00e1rio esta cheio, colocando kit no chao +kitTimed=\u00a7cVoc\u00ea nao pode usar este kit denovo por {0}. +kits=\u00a77Kits: {0} +lightningSmited=\u00a77YVoc\u00ea acaba de ser castigado +lightningUse=\u00a77Castigando {0} +listAfkTag = \u00a77[Ausente]\u00a7f +listAmount = \u00a79Aqui tem \u00a7c{0}\u00a79 do m\u00e1ximo de \u00a7c{1}\u00a79 jogadores online. +listAmountHidden = \u00a79Aqui tem \u00a7c{0}\u00a77/{1}\u00a79 do maximo de \u00a7c{2}\u00a79 jogadores online. +listGroupTag={0}\u00a7f: +listHiddenTag = \u00a77[ESCONDIDO]\u00a7f +loadWarpError=Falha ao carregar warp {0} +localFormat=Local: <{0}> {1} +mailClear=\u00a7cPara marcar seu email como lido, use /mail clear +mailCleared=\u00a77eMail limpo! +mailSent=\u00a77eMail enviado! +markMailAsRead=\u00a7cPara marcar seu email como lido, use /mail clear +markedAsAway=\u00a77[AFK] Agora voc\u00ea esta marcado como aus\u00eante. +markedAsNotAway=\u00a77[AFK] Voc\u00ea nao esta mais marcado como aus\u00eante. +maxHomes=Voc\u00ea nao pode definir mais de {0} casas. +mayNotJail=\u00a7cVoc\u00ea nao pode prender esta pessoa +me=eu +minute=minuto +minutes=minutos +missingItems=Voc\u00ea nao tem {0}x {1}. +missingPrefixSuffix=Faltando um prefixo ou sufixo para {0} +mobSpawnError=Erro ao mudar o mob spawner. +mobSpawnLimit=Quantidade de mob limitada pelo servidor +mobSpawnTarget=Bloco de destino deve ser um mob spawner. +mobsAvailable=\u00a77Mobs: {0} +moneyRecievedFrom=\u00a7a{0} foi recebido de {1} +moneySentTo=\u00a7a{0} foi enviado para {1} +moneyTaken={0} tirado da sua conta. +month=m\u00eas +months=meses +moreThanZero=Quantidade deve ser maior que 0. +msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cVoc\u00ea nao pode mutar este jogador. +mutedPlayer=Player {0} mutado. +mutedPlayerFor=Player {0} mutado por {1}. +mutedUserSpeaks={0} tentou falar, mas esta mutado. +nearbyPlayers=Jogadores por perto: {0} +negativeBalanceError=Nao \u00e9 permitido ter um saldo negativo. +nickChanged=Apelido modificado. +nickDisplayName=\u00a77Voc\u00ea deve ativar change-displayname nas configura\u00e7\u00f5es do Essentials. +nickInUse=\u00a7cEste nome j\u00e1 esta em uso. +nickNamesAlpha=\u00a7cApelidos devem ser alfanumericos. +nickNoMore=\u00a77Voc\u00ea nao tem mais um apelido. +nickOthersPermission=\u00a7cVoc\u00ea nao tem permissao para mudar o apelido dos outros. +nickSet=\u00a77Agora seu apelido \u00e9 \u00a7c{0} +noAccessCommand=\u00a7cVoc\u00ea nao tem acesso a este comando. +noAccessPermission=\u00a7cVoc\u00ea nao tem permissao para acessar isso {0}. +noBreakBedrock=Voce nao tem permissao para destruir bedrock. +noDestroyPermission=\u00a7cVoc\u00ea nao tem permissao para destruir isso {0}. +noDurability=\u00a7cThis item does not have a durability. +noGodWorldWarning=\u00a7cAviso! Modo Deus neste mundo esta desativado. +noHelpFound=\u00a7cNenhum comando correspondente. +noHomeSet=Voc\u00ea nao definiu nenhuma casa. +noHomeSetPlayer=Jogador nao definiu nenhuma casa. +noKitPermission=\u00a7cVoc\u00ea precisa da permissao \u00a7c{0}\u00a7c para usar este kit. +noKits=\u00a77Ainda nao tem nenhum item disponivel +noMail=Voc\u00ea nao tem nenhum email +noMotd=\u00a7cNao h\u00e1 nenhuma mensagem do dia. +noNewMail=\u00a77Voc\u00ea nao tem nenhum novo email. +noPendingRequest=Voc\u00ea nao tem um pedido pendente. +noPerm=\u00a7cVoc\u00ea nao tem a permissao \u00a7f{0}\u00a7c. +noPermToSpawnMob=\u00a7cVoc\u00ea nao tem permissao para desovar este mob. +noPlacePermission=\u00a7cVoc\u00ea nao tem permissao de por um bloco perto daquela placa. +noPowerTools=Voc\u00ea nao tem nenhuma super ferramenta definida. +noRules=\u00a7cAinda nao foi definida as regras. +noWarpsDefined=Nenhum warp definido +none=nenhum +notAllowedToQuestion=\u00a7cVoc\u00ea nao esta autorizado a usar pergunta. +notAllowedToShout=\u00a7cVoc\u00ea nao esta autorizado a gritar. +notEnoughExperience=Voc\u00ea nao tem experiencia suficiente. +notEnoughMoney=Voc\u00ea nao tem dinheiro suficiente. +notFlying=not flying +notRecommendedBukkit=* ! * Versao do bukkit nao \u00e9 a recomendada para o essentials. +notSupportedYet=Ainda nao suportado. +nothingInHand = \u00a7cVoc\u00ea nao tem nada em sua mao. +now=agora +nuke=Pode chover a morte sobre eles +numberRequired=Um numero vai aqui, bobinho. +onlyDayNight=/time apenas suporta day/night. +onlyPlayers=Apenas jogadores no jogo pode usar {0}. +onlySunStorm=/weather apenas suporta sun/storm. +orderBalances=Ordenando saldos de {0} usuarios, aguarde ... +pTimeCurrent=\u00a7e{0}''s\u00a7f horario e {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f hor\u00e1rio foi fixado para {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f o tempo esta normal e sincronisado com o servidor. +pTimeOthersPermission=\u00a7cVoc\u00ea nao esta autorisado para definir o tempo dos outros jogadores. +pTimePlayers=Estes jogadores tem seus propios hor\u00e1rios: +pTimeReset=Hor\u00e1rio do jogador foi recetado para: \u00a7e{0} +pTimeSet=Hor\u00e1rio do jogador foi definido para \u00a73{0}\u00a7f por: \u00a7e{1} +pTimeSetFixed=Hor\u00e1rio do jogador foi fixado para \u00a73{0}\u00a7f por: \u00a7e{1} +parseError=Analise de erro {0} na linha {1} +pendingTeleportCancelled=\u00a7cPedido de teleporte pendente cancelado. +permissionsError=Faltando Permissions/GroupManager; chat prefixos/sufixos serao desativados. +playerBanned=\u00a7cJogador {0} banido {1} por {2} +playerInJail=\u00a7cJogador j\u00e1 esta na cadeia {0}. +playerJailed=\u00a77Jogador {0} preso. +playerJailedFor= \u00a77Player {0} condenado por {1}. +playerKicked=\u00a7cPlayer {0} kickado {1} por {2} +playerMuted=\u00a77Voce foi desmutado +playerMutedFor=\u00a77Voce foi mutado por {0} +playerNeverOnServer=\u00a7cJogador {0} nunca esteve no servidor. +playerNotFound=\u00a7cJogador nao encontrado. +playerUnmuted=\u00a77Foi desmutado +pong=Pong! +possibleWorlds=\u00a77Mundos poss\u00edveis sao 0 at\u00e9 {0}. +powerToolAir=Comando nao pode ser definido para o ar. +powerToolAlreadySet=Comando \u00a7c{0}\u00a7f j\u00e1 esta definido para {1}. +powerToolAttach=\u00a7c{0}\u00a7f comando definido para {1}. +powerToolClearAll=Todas superferramentas foram limpas. +powerToolList={1} tem os seguintes comandos: \u00a7c{0}\u00a7f. +powerToolListEmpty={0} nenhum comando definido. +powerToolNoSuchCommandAssigned=Comando \u00a7c{0}\u00a7f nao foi definido para {1}. +powerToolRemove=Comando \u00a7c{0}\u00a7f removido do {1}. +powerToolRemoveAll=Todos comandos removidos do {0}. +powerToolsDisabled=Todas suas super ferramentas foram habilitadas. +powerToolsEnabled=Todas suas super ferramentas foram desabilitadas. +protectionOwner=\u00a76[EssentialsProtect] Dono da prote\u00e7ao: {0} +questionFormat=\u00a77[Pergunta]\u00a7f {0} +readNextPage=Digite /{0} {1} para ler a pr\u00f3xima p\u00e1gina +reloadAllPlugins=\u00a77Todos plugins recarregados. +removed=\u00a77Removido {0} entidades. +repair=Voc\u00ea reparou com sucesso sua: \u00a7e{0}. +repairAlreadyFixed=\u00a77Esse item nao precisa ser reparado. +repairEnchanted=\u00a77Voc\u00ea nao pode reparar itens encantados. +repairInvalidType=\u00a7cEsse item nao pode ser reparado. +repairNone=Nao ha itens que precisam ser reparados. +requestAccepted=\u00a77Pedido de teleporte aceito. +requestAcceptedFrom=\u00a77{0} aceitou seu pedido de teleporte. +requestDenied=\u00a77Pedido de teleporte recusado. +requestDeniedFrom=\u00a77{0} recusou seu pedido de teleporte +requestSent=\u00a77Pedindo enviado para {0}\u00a77. +requestTimedOut=\u00a7cPedido de teleporte passou o limite de tempo +requiredBukkit=* ! * Voc\u00ea precisa da ultima build {0} do CraftBukkit, baixa ela em http://dl.bukkit.org/downloads/craftbukkit/ +returnPlayerToJailError=Erro ocorreu ao tentar retornar jogador {0} para a cadeia: {1} +second=segundo +seconds=segundos +seenOffline=Jogador {0} esta offline desde {1} +seenOnline=Jogador {0} esta online desde {1} +serverFull=O servidor esta cheio +serverTotal=Server Total: {0} +setSpawner=Spawner modificado para {0} +sheepMalformedColor=Cor malformada. +shoutFormat=\u00a77[GRITAR]\u00a7f {0} +signFormatFail=\u00a74[{0}] +signFormatSuccess=\u00a71[{0}] +signFormatTemplate=[{0}] +signProtectInvalidLocation=\u00a74Voc\u00ea nao pode criar placas aqui. +similarWarpExist=Um warp com um nome parecido j\u00e1 existe. +slimeMalformedSize=Tamanho malformado. +soloMob=Este mob gosta de ficar sozinho +spawnSet=\u00a77Ponto de spawn definido para o grupo {0}. +spawned=desovado +sudoExempt=voce nao pode sudo este usuario +sudoRun=Forcing {0} to run: /{1} {2} +suicideMessage=\u00a77Adeus mundo cruel... +suicideSuccess= \u00a77{0} tirou sua propia vida +survival=survival +takenFromAccount=\u00a7c{0} foi tirado da sua conta. +takenFromOthersAccount=\u00a7c{0} tirado de {1}\u00a7c conta. Novo saldo: {2} +teleportAAll=\u00a77Pedido de teleporte enviado a todos os jogadores... +teleportAll=\u00a77Teleportando todos os jogadores... +teleportAtoB=\u00a77{0}\u00a77 teleportou voc\u00ea para {1}\u00a77. +teleportDisabled={0} tem o teleporte desativado. +teleportHereRequest=\u00a7c{0}\u00a7c solicitou que voc\u00ea se teleporte para ele. +teleportNewPlayerError=Falha para teleportar novo jogador +teleportRequest=\u00a7c{0}\u00a7c solicitou para se teleportar at\u00e9 voc\u00ea. +teleportRequestTimeoutInfo=\u00a77Este pedido vai acabar em {0} segundos. +teleportTop=\u00a77Teleportando para o alto. +teleportationCommencing=\u00a77Iniciando teleporte... +teleportationDisabled=\u00a77Teleporte desativado. +teleportationEnabled=\u00a77Teleporte ativado. +teleporting=\u00a77Teleportando... +teleportingPortal=\u00a77Teleportando via portal. +tempBanned=Banido temporariamente do servidor por {0} +tempbanExempt=\u00a77Voc\u00ea nao pode banir este jogador temporariamente +thunder= Voc\u00ea {0} trovejou no seu mundo +thunderDuration=Voc\u00ea {0} trovejou no seu mundo por {1} segundos. +timeBeforeHeal=Tempo at\u00e9 a proxima cura: {0} +timeBeforeTeleport=Tempo antes do proximo teleporte: {0} +timeFormat=\u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f +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=Horario definido em todos os mundos. +timeSetPermission=\u00a7cVoc\u00ea nao tem autoriza\u00e7ao para modificar o hor\u00e1rio. +timeWorldCurrent=O hor\u00e1rio atual no mundo {0} e \u00a73{1} +timeWorldSet=O hor\u00e1rio foi definido para {0} no: \u00a7c{1} +tps=Current TPS = {0} +tradeCompleted=\u00a77Compra concluida. +tradeSignEmpty=A placa de troca nao tem abastecimento suficiente. +tradeSignEmptyOwner=Nao a nada para recolher desta placa de compra. +treeFailure=\u00a7cFalha ao gerar \u00e1rvore. Tente denovo na terra ou grama. +treeSpawned=\u00a77\u00c1rvore gerada. +true=\u00a72true\u00a7f +typeTpaccept=\u00a77Para aceitar o teleporte, digite \u00a7c/tpaccept\u00a77. +typeTpdeny=\u00a77Para recusar o teleporte, digite \u00a7c/tpdeny\u00a77. +typeWorldName=\u00a77Voc\u00ea tambem pode digitar o nome do mundo. +unableToSpawnMob=Incapaz de gerar o mob. +unbannedIP=Endereco de IP desbanido. +unbannedPlayer=Jogador desbanido. +unignorePlayer=Agora voc\u00ea nao esta mais ignorando o {0}. +unknownItemId=ID do item desconhecido: {0} +unknownItemInList=Item desconhecido {0} em {1} lista. +unknownItemName=Nome do item desconhecido: {0} +unlimitedItemPermission=\u00a7cSem permissao para item ilimitado {0}. +unlimitedItems=Item ilimitado: +unmutedPlayer=Jogador {0} desmutado. +unvanished=\u00a7aEsta mais uma vez visivel. +unvanishedReload=\u00a7cA recarga foi forcado a se tornar visivel. +upgradingFilesError=Erro ao aprimorar os arquivos +userDoesNotExist=O usu\u00e1rio {0} nao existe. +userIsAway=[AFK]: {0} esta aus\u00eante. +userIsNotAway=[AFK]: {0} nao esta mais aus\u00eante. +userJailed=\u00a77Voc\u00ea foi preso, muaha! +userUsedPortal={0} usou um portal de saida existente. +userdataMoveBackError=Falha ao mover userdata/{0}.tmp para userdata/{1} +userdataMoveError=Falha ao mover userdata/{0} para userdata/{1}.tmp +usingTempFolderForTesting=Usando pasta temporaria para teste: +vanished=\u00a7aVoce agora desapareceu. +versionMismatch=Versao incompativel! Atualise o {0} para mesma versao. +versionMismatchAll=Versao imcompativel! Atualise todos os essentials jars para mesma versao. +voiceSilenced=\u00a77Sua voz foi silenciada +warpDeleteError=Problema ao deletar o arquivo warp. +warpListPermission=\u00a7cVoc\u00ea nao tem permissao para listar os warps. +warpNotExist=Este warp nao existe. +warpOverwrite=\u00a7cVoce nao pode substituir essa warp. +warpSet=\u00a77Warp {0} definido. +warpUsePermission=\u00a7cVoc\u00ea nao tem permissao para usar este warp. +warpingTo=\u00a77Warping para {0}. +warps=Warps: {0} +warpsCount=\u00a77Aqui tem {0} warps. Exibindo p\u00e1gina {1} de {2}. +weatherStorm=\u00a77Voc\u00ea modificou o tempo para chuva em {0} +weatherStormFor=\u00a77Voc\u00ea modificou o tempo para chuva em {0} por {1} segundos +weatherSun=\u00a77Voc\u00ea modificou o tempo para sol em {0} +weatherSunFor=\u00a77Voc\u00ea modificou o tempo para sol em {0} por {1} segundos +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisBanned=\u00a76 - Banido:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Level {1}) +whoisFly=\u00a76 - Fly modo:\u00a7f {0} ({1}) +whoisGamemode=\u00a76 - Modo de Jogo:\u00a7f {0} +whoisGeoLocation=\u00a76 - Localizacao:\u00a7f {0} +whoisGod=\u00a76 - Modo Deus:\u00a7f {0} +whoisHealth=\u00a76 - Saude:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP:\u00a7f {0} +whoisJail=\u00a76 - Prisao:\u00a7f {0} +whoisLocation=\u00a76 - Localiza\u00e7ao:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Dinheiro:\u00a7f {0} +whoisMuted=\u00a76 - Silenciado:\u00a7f {0} +whoisNick=\u00a76 - Apelido:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== +worth=\u00a77Pilha de {0} vale \u00a7c{1}\u00a77 ({2} item(s) a {3} cada) +worthMeta=\u00a77Pilha de {0} com metadados de {1} vale \u00a7c{2}\u00a77 ({3} item(s) a {4} cada) +worthSet=Definir quanto vale +year=ano +years=anos +youAreHealed=\u00a77Voc\u00ea foi curado. +youHaveNewMail=\u00a7cVoc\u00ea tem {0} mensagens!\u00a7f Digite \u00a77/mail read\u00a7f para ver seu email. +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +walking=walking +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties new file mode 100644 index 000000000..2b339f037 --- /dev/null +++ b/Essentials/src/messages_se.properties @@ -0,0 +1,451 @@ +#version: TeamCity +# Single quotes have to be doubled: '' +# Translations start here +# by: oggehej, corrected by NeonMaster. +action=* {0} {1} +addedToAccount=\u00a7a{0} har blivit tillagt p\u00e5 ditt konto. +addedToOthersAccount=\u00a7a{0} har blivit tillagt p\u00e5 {1}\u00a7a konto. Ny balans: {2} +adventure = adventure +alertBroke=gjorde s\u00f6nder: +alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} +alertPlaced=placerade: +alertUsed=anv\u00e4nde: +autoAfkKickReason=Du har blivit utsparkad f\u00f6r att ha varit inaktiv i mer \u00e4n {0} minuter. +backAfterDeath=\u00a77Anv\u00e4nd /back kommandot f\u00f6r att komma tillbaka till din d\u00f6dsplats. +backUsageMsg=\u00a77Tar dig tillbaka till din f\u00f6reg\u00e5ende position. +backupDisabled=Ett externt backup-skript har inte blivit konfigurerat. +backupFinished=Backup klar +backupStarted=Backup startad +balance=\u00a77Balans: {0} +balanceTop=\u00a77Topp balans ({0}) +banExempt=\u00a7cDu kan inte banna den spelaren. +banIpAddress=\u00a77Bannade IP-adress +bannedIpsFileError=Kunde inte l\u00e4sa banned-ips.txt +bannedIpsFileNotFound=banned-ips.txt hittades inte +bannedPlayersFileError=Kunde inte l\u00e4sa banned-players.txt +bannedPlayersFileNotFound=banned-players.txt hittades inte +bigTreeFailure=\u00a7cEtt stort tr\u00e4d kunde inte genereras misslyckades. F\u00f6s\u00f6k igen p\u00e5 gr\u00e4s eller jord. +bigTreeSuccess= \u00a77Stort tr\u00e4d genererat. +blockList=Essentials vidarebefordrade f\u00f6ljande kommandon till ett annat insticksprogram: +broadcast=[\u00a7cUts\u00e4ndning\u00a7f]\u00a7a {0} +buildAlert=\u00a7cDu har inte till\u00e5telse att bygga +bukkitFormatChanged=Bukkit versionsformat bytt. Version \u00e4r inte kollad. +burnMsg=\u00a77Du satte eld p\u00e5 {0} i {1} sekunder. +canTalkAgain=\u00a77Du kan nu prata igen! +cantFindGeoIpDB=Kunde inte hitta GeoIP-databasen! +cantReadGeoIpDB=Kunde inte l\u00e4sa inneh\u00e5ll fr\u00e5n GeoIP-databasen! +cantSpawnItem=\u00a7cDu har inte beh\u00f6righet att spawna {0} +chatTypeLocal=[L] +chatTypeSpy=[Spy] +commandFailed=Kommando {0} misslyckades: +commandHelpFailedForPlugin=Kunde inte hitta hj\u00e4lp f\u00f6r: {0} +commandNotLoaded=\u00a7cKommando {0} \u00e4r felaktigt laddat. +compassBearing=\u00a77B\u00e4ring: {0} ({1} grader). +configFileMoveError=Kunde inte flytta config.yml till backup-platsen. +configFileRenameError=Kunde inte byta namn p\u00e5 temp-filen till config.yml +connectedPlayers=Anslutna spelare: +connectionFailed=Kunde inte \u00f6ppna anslutning. +cooldownWithMessage=\u00a7cNedkylning: {0} +corruptNodeInConfig=\u00a74Notice: Din konfigurationsfil har en korrupt {0} nod. +couldNotFindTemplate=Kunde inte hitta mallen {0} +creatingConfigFromTemplate=Skapar konfiguration fr\u00e5n mallen: {0} +creatingEmptyConfig=Skapar tom konfiguration: {0} +creative=kreativ +currency={0}{1} +currentWorld=Nuvarande v\u00e4rld: {0} +day=dag +days=dagar +defaultBanReason=Banhammaren har talat! +deleteFileError=Kunde inte radera filen: {0} +deleteHome=\u00a77Hemmet {0} har tagits bort. +deleteJail=\u00a77F\u00e4ngelset {0} har tagits bort. +deleteWarp=\u00a77Warpen {0} har tagits bort. +deniedAccessCommand={0} nekades \u00e5tkomst till kommandot. +dependancyDownloaded=[Essentials] Beroende {0} laddades ner framg\u00e5ngsrikt. +dependancyException=[Essentials] Ett fel uppstod n\u00e4r ett beroende laddades ner. +dependancyNotFound=[Essentials] Ett n\u00f6dv\u00e4ndigt beroende hittades inte, laddar ner nu. +depth=\u00a77Du \u00e4r p\u00e5 havsniv\u00e5n. +depthAboveSea=\u00a77Du \u00e4r {0} block ovanf\u00f6r havsni\u00e5n. +depthBelowSea=\u00a77Du \u00e4r {0} block under havsniv\u00e5n. +destinationNotSet=Ingen destination \u00e4r inst\u00e4lld. +disableUnlimited=\u00a77Inaktiverade o\u00e4ndligt placerande av {0} f\u00f6r {1}. +disabled=inaktiverad +disabledToSpawnMob=Att spawna fram den h\u00e4r moben \u00e4r inaktiverat i configurationsfilen. +dontMoveMessage=\u00a77Teleporteringen p\u00e5b\u00f6rjas om {0}. R\u00f6r dig inte. +downloadingGeoIp=Laddar ner GeoIP-databasen... det h\u00e4r kan ta en stund (land: 0.6 MB, stad: 20MB) +duplicatedUserdata=Dublicerad anv\u00e4ndardata: {0} och {1} +durability=\u00a77Det h\u00e4r verktyget har \u00a7c{0}\u00a77 anv\u00e4ndningar kvar +enableUnlimited=\u00a77Ger o\u00e4ndligt av {0} till {1}. +enabled=aktiverad +enchantmentApplied = \u00a77F\u00f6rtrollningen {0} har blivit till\u00e4mpad p\u00e5 saken du har i handen. +enchantmentNotFound = \u00a7cF\u00f6rtrollningen hittades inte +enchantmentPerm = \u00a7cDu har inte beh\u00f6righet att {0} +enchantmentRemoved = \u00a77F\u00f6rtrollningen {0} har tagits bort fr\u00e5n saken i din hand. +enchantments = \u00a77F\u00f6rtrollningar: {0} +errorCallingCommand=Kunde inte kontakta kommandot /{0} +errorWithMessage=\u00a7cFel: {0} +essentialsHelp1=Filen \u00e4r trasig och Essentials kan inte \u00f6ppna den. Essentials \u00e4r nu inaktiverat. Om du inte kan fixa problemet sj\u00e4lv, g\u00e5 till http://tiny.cc/EssentialsChat +essentialsHelp2=Filen \u00e4r trasig och Essentials kan inte \u00f6ppna den. Essentials \u00e4r nu inaktiverat. Om du inte kan fixa problemet sj\u00e4lv, skriv /essentialshelp i spelet eller g\u00e5 till http://tiny.cc/EssentialsChat +essentialsReload=\u00a77Essentials Omladdat {0} +exp=\u00a7c{0} \u00a77har\u00a7c {1} \u00a77exp (level\u00a7c {2}\u00a77) och beh\u00f6ver\u00a7c {3} \u00a77mer erfarenhet f\u00f6r att g\u00e5 upp en niv\u00e5. +expSet=\u00a7c{0} \u00a77har nu\u00a7c {1} \u00a77erfarenhet. +extinguish=\u00a77Du sl\u00e4ckte dig sj\u00e4lv. +extinguishOthers=\u00a77Du sl\u00e4ckte {0}. +failedToCloseConfig=Kunde inte st\u00e4nga konfiguration {0} +failedToCreateConfig=Kunde inte skapa konfiguration {0} +failedToWriteConfig=Kunde inte skriva konfiguration {0} +false=falskt +feed=\u00a77Din hunger \u00e4r m\u00e4ttad. +feedOther=\u00a77Matade {0}. +fileRenameError=Namnbytet av filen {0} misslyckades +flyMode=\u00a77Aktiverade flygl\u00e4ge {0} f\u00f6r {1}. +foreverAlone=\u00a7cDu har ingen att svara. +freedMemory=Befriade {0} MB. +gameMode=\u00a77Satte {0}s spell\u00e4ge till {1}. +gcchunks= bitar, +gcentities= enheter +gcfree=Ledigt minne: {0} MB +gcmax=Maximalt minne: {0} MB +gctotal=Tilldelat minne: {0} MB +geoIpUrlEmpty=Nerladdningsadressen f\u00f6r GeoIP \u00e4r tom. +geoIpUrlInvalid=Nerladdningsadressen f\u00f6r GeoIP \u00e4r ogiltig. +geoipJoinFormat=Spelaren {0} kommer fr\u00e5n {1} +godDisabledFor=inaktiverat f\u00f6r {0} +godEnabledFor=aktiverat f\u00f6r {0} +godMode=\u00a77Od\u00f6dlighet {0}. +hatArmor=\u00a7cFel, du kan inte anv\u00e4nda den h\u00e4r saken som en hatt! +hatFail=\u00a7cDu m\u00e5ste ha n\u00e5gonting att b\u00e4ra i din hand. +hatPlaced=\u00a7eNjut av din nya hatt! +haveBeenReleased=\u00a77Du har blivit friad +heal=\u00a77Du har blivit l\u00e4kt. +healOther=\u00a77L\u00e4kte {0}. +helpConsole=F\u00f6r att visa hj\u00e4lp fr\u00e5n konsolen, skriv ?. +helpFrom=\u00a77Kommandon fr\u00e5n {0}: +helpLine=\u00a76/{0}\u00a7f: {1} +helpMatching=\u00a77Kommandon matchar "{0}": +helpOp=\u00a7c[OpHj\u00e4lp]\u00a7f \u00a77{0}:\u00a7f {1} +helpPages=Sida \u00a7c{0}\u00a7f av \u00a7c{1}\u00a7f: +helpPlugin=\u00a74{0}\u00a7f: Hj\u00e4lp f\u00f6r insticksprogram: /help {1} +holeInFloor=H\u00e5l i golvet +homeSet=\u00a77Hem inst\u00e4llt. +homeSetToBed=\u00a77Ditt hem \u00e4r nu inst\u00e4llt till den h\u00e4r s\u00e4ngen. +homes=Hem: {0} +hour=timme +hours=timmar +ignorePlayer=Du ignorerar spelaren {0} fr\u00e5n och med nu. +illegalDate=Felaktigt datumformat. +infoChapter=V\u00e4lj kapitel: +infoChapterPages=Kapitel {0}, sida \u00a7c{1}\u00a7f av \u00a7c{2}\u00a7f: +infoFileDoesNotExist=Filen info.txt finns inte. Skapar en f\u00f6r dig. +infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Sida \u00a74{0}\u00a76/\u00a74{1} \u00a7e---- +infoUnknownChapter=Ok\u00e4nt kapitel. +invBigger=De andra anv\u00e4ndarnas f\u00f6rr\u00e5d \u00e4r st\u00f6rre \u00e4n ditt. +invRestored=Ditt f\u00f6rr\u00e5d har blivit \u00e5terst\u00e4llt. +invSee=Du ser nu {0}s f\u00f6rr\u00e5d. +invSeeHelp=Anv\u00e4nd /invsee f\u00f6r att \u00e5terst\u00e4lla ditt f\u00f6rr\u00e5d. +invalidCharge=\u00a7cOgiltig laddning. +invalidHome=Hemmet {0} finns inte +invalidMob=Ogiltig monster-typ. +invalidServer=Ogiltig server! +invalidSignLine=Rad {0} p\u00e5 skylten \u00e4r ogiltig. +invalidWorld=\u00a7cOgiltig v\u00e4rld. +inventoryCleared=\u00a77F\u00f6rr\u00e5d rensat. +inventoryClearedOthers=\u00a77F\u00f6rr\u00e5det av \u00a7c{0}\u00a77 \u00e4r rensat. +is=\u00e4r +itemCannotBeSold=Det objektet kan inte s\u00e4ljas till servern. +itemMustBeStacked=Objektet m\u00e5ste k\u00f6pas i staplar. En m\u00e4ngd av 2s kommer bli 2 staplar, etc. +itemNotEnough1=\u00a7cDu har inte tillr\u00e4ckligt av den saken f\u00f6r att s\u00e4lja. +itemNotEnough2=\u00a77Om du ville s\u00e4lja alla block av den typen, anv\u00e4nd /sell blocknamn +itemNotEnough3=\u00a77/sell blocknamn -1 kommer att s\u00e4lja allt av den blocktypen f\u00f6rutom 1 o.s.v. +itemSellAir=F\u00f6rs\u00f6kte du att s\u00e4lja luft? S\u00e4tt en sak i din hand. +itemSold=\u00a77S\u00e5lde f\u00f6r \u00a7c{0} \u00a77({1} {2} f\u00f6r {3} styck) +itemSoldConsole={0} s\u00e5lde {1} f\u00f6r \u00a77{2} \u00a77({3} saker f\u00f6r {4} styck) +itemSpawn=\u00a77Ger {0} stycken {1} +itemsCsvNotLoaded=Kunde inte ladda items.csv. +jailAlreadyIncarcerated=\u00a7cPersonen \u00e4r redan i f\u00e4ngelse: {0} +jailMessage=\u00a7cBryter du mot reglerna, f\u00e5r du st\u00e5 ditt kast. +jailNotExist=Det f\u00e4ngelset finns inte. +jailReleased=\u00a77Spelaren \u00a7e{0}\u00a77 \u00e4r frisl\u00e4ppt. +jailReleasedPlayerNotify=\u00a77Du har blivit frisl\u00e4ppt! +jailSentenceExtended=F\u00e4ngelsestraffet f\u00f6rl\u00e4ngt till: {0) +jailSet=\u00a77F\u00e4ngelset {0} har skapats +jumpError=Det skulle skadat din dators hj\u00e4rna. +kickDefault=Utsparkad fr\u00e5n server +kickExempt=\u00a7cDu kan inte sparka ut den spelaren. +kickedAll=\u00a7cSparkade ut alla spelare fr\u00e5n servern +kill=\u00a77D\u00f6dade {0}. +kitError2=\u00a7cDet kit:et finns inte eller har blivit felaktigt definierat. +kitError=\u00a7cDet finns inga giltiga kit. +kitErrorHelp=\u00a7cKanske en sak fattar m\u00e4ngd i konfigurationen? +kitGive=\u00a77Ger kit {0}. +kitInvFull=\u00a7cDitt F\u00f6rr\u00e5d var fullt, placerar kit p\u00e5 golvet +kitTimed=\u00a7cDu kan inte anv\u00e4nda det kit:et igen p\u00e5 {0}. +kits=\u00a77Kit: {0} +lightningSmited=\u00a77Blixten har slagit ner p\u00e5 dig +lightningUse=\u00a77En blixt kommer sl\u00e5 ner p\u00e5 {0} +listAfkTag = \u00a77[AFK]\u00a7f +listAmount = \u00a79Det \u00e4r \u00a7c{0}\u00a79 av maximalt \u00a7c{1}\u00a79 spelare online. +listAmountHidden = \u00a79Det \u00e4r \u00a7c{0}\u00a77/{1}\u00a79 Av maximalt \u00a7c{2}\u00a79 spelare online. +listGroupTag={0}\u00a7f: +listHiddenTag = \u00a77[G\u00d6MD]\u00a7f +loadWarpError=Kunde inte ladda warp {0} +localFormat=Lokal: <{0}> {1} +mailClear=\u00a7cF\u00f6r att markera dina meddelanden som l\u00e4sta, skriv /mail clear +mailCleared=\u00a77Meddelanden rensade! +mailSent=\u00a77Meddelandet skickad! +markMailAsRead=\u00a7cF\u00f6r att markera dina meddelanden som l\u00e4sta, skriv /mail clear +markedAsAway=\u00a77Du \u00e4r nu markerad som borta. +markedAsNotAway=\u00a77Du \u00e4r inte l\u00e4ngre markerad som borta. +maxHomes=Du kan inte ha fler \u00e4n {0} hem. +mayNotJail=\u00a7cDu f\u00e5r inte s\u00e4tta den personen i f\u00e4ngelse +me=jag +minute=minut +minutes=minuter +missingItems=Du har inte {0}x {1}. +missingPrefixSuffix=Saknar ett prefix eller suffix f\u00f6r {0} +mobSpawnError=Fel n\u00e4r mob-spawnaren f\u00f6rs\u00f6kte att \u00e4ndras. +mobSpawnLimit=M\u00e4ngden mobs begr\u00e4nsad till serverns maxgr\u00e4ns +mobSpawnTarget=M\u00e5lblocket m\u00e5ste vara en mob-spawnare. +mobsAvailable=\u00a77Mobs: {0} +moneyRecievedFrom=\u00a7a{0} har tagits emot fr\u00e5n {1} +moneySentTo=\u00a7a{0} har skickats till {1} +moneyTaken={0} \u00e4r taget fr\u00e5n ditt bankkonto. +month=m\u00e5nad +months=m\u00e5nader +moreThanZero=M\u00e5ngden m\u00e5ste vara st\u00f6rre \u00e4n 0. +msgFormat=\u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2} +muteExempt=\u00a7cDu kan inte tysta den spelaren. +mutedPlayer=Spelaren {0} \u00e4r tystad. +mutedPlayerFor=Spelaren {0} \u00e4r tystad i {1}. +mutedUserSpeaks={0} f\u00f6rs\u00f6kte att prata, men blev tystad. +nearbyPlayers=Spelare i n\u00e4rheten: {0} +negativeBalanceError=Anv\u00e4ndaren \u00e4r inte till\u00e5ten att ha en negativ balans. +nickChanged=Smeknamn \u00e4ndrat. +nickDisplayName=\u00a77Du m\u00e5ste aktivera change-displayname i Essentials-konfigurationen. +nickInUse=\u00a7cDet namnet anv\u00e4nds redan. +nickNamesAlpha=\u00a7cSmeknamn m\u00e5ste vara alfanumeriska. +nickNoMore=\u00a77Du har inte ett smeknamn l\u00e4ngre +nickOthersPermission=\u00a7cDu har inte tillst\u00e5nd att \u00e4ndra andras smeknamn +nickSet=\u00a77Ditt smeknamn \u00e4r nu \u00a7c{0} +noAccessCommand=\u00a7cDu har inte tillg\u00e5ng till det kommandot. +noAccessPermission=\u00a7cDu har inte tillst\u00e5nd till att komma \u00e5t det {0}. +noBreakBedrock=Du har inte till\u00e5telse att f\u00f6rst\u00f6ra berggrund. +noDestroyPermission=\u00a7Du har inte till\u00e5telse att f\u00f6rst\u00f6ra det {0}. +noDurability=\u00a7cDen saken har inte en h\u00e5llbarhet. +noGodWorldWarning=\u00a7cVarning! Od\u00f6dlighet i den h\u00e4r v\u00e4rlden \u00e4r inaktiverat. +noHelpFound=\u00a7cInga matchande kommandon. +noHomeSet=Du har inte angett ett hem. +noHomeSetPlayer=Den h\u00e4r spelaren har inte ett hem. +noKitPermission=\u00a7cDu beh\u00f6ver \u00a7c{0}\u00a7c tillst\u00e5nd f\u00f6r att anv\u00e4nda det kitet. +noKits=\u00a77Det finns inga kits tillg\u00e4ngliga \u00e4n +noMail=Du har inget meddelande +noMotd=\u00a7cDet finns inget meddelande f\u00f6r dagen. +noNewMail=\u00a77Du har inget nytt meddelande. +noPendingRequest=Du har inga v\u00e4ntande f\u00f6rfr\u00e5gan. +noPerm=\u00a7cDu har inte \u00a7f{0}\u00a7c till\u00e5telse. +noPermToSpawnMob=\u00a7cDu har inte till\u00e5telse att spawna den h\u00e4r moben. +noPlacePermission=\u00a7cDu har inte till\u00e5telse att placera ett block n\u00e4ra den skylten. +noPowerTools=Du har inga power-tools tilldelade. +noRules=\u00a7cDet finns inga specifierade regler \u00e4n. +noWarpsDefined=Inga warpar \u00e4r definerade +none=inga +notAllowedToQuestion=\u00a7cDu har inte tillst\u00e5nd att anv\u00e4nda den fr\u00e5gan. +notAllowedToShout=\u00a7cDu har inte tillst\u00e5nd att ropa. +notEnoughExperience=Du har inte nog med erfarenhet. +notEnoughMoney=Du har inte tillr\u00e4ckligt med pengar. +notRecommendedBukkit= * ! * Bukkit-versionen \u00e4r inte rekommenderad f\u00f6r den h\u00e4r versionen av Essentials. +notSupportedYet=St\u00f6ds inte \u00e4n. +nothingInHand = \u00a7cDu har inget i din hand. +now=nu +nuke=L\u00e5t d\u00f6d regna \u00f6ver dem +numberRequired=Det ska vara ett nummer d\u00e4r, dumbom. +onlyDayNight=/time st\u00f6der bara day(dag) eller night(natt). +onlyPlayers=Bara spelare som \u00e4r online kan anv\u00e4nda {0}. +onlySunStorm=/weather st\u00f6der bara sun(sol) eller storm(storm). +orderBalances=Best\u00e4ller balanser av {0} anv\u00e4ndare, v\u00e4nligen v\u00e4nta... +pTimeCurrent=\u00a7e{0}'*s\u00a7f klockan \u00e4r {1}. +pTimeCurrentFixed=\u00a7e{0}''s\u00a7f tiden \u00e4r fixerad till {1}. +pTimeNormal=\u00a7e{0}''s\u00a7f tiden \u00e4r normal och matchar servern. +pTimeOthersPermission=\u00a7cDu har inte beh\u00f6righet att st\u00e4lla in andra spelares tid. +pTimePlayers=Dessa spelare har sin egen tid: +pTimeReset=Spelarens tid har blivit \u00e5terst\u00e4lld till: \u00a7e{0} +pTimeSet=Spelarens tid \u00e4r inst\u00e4lld till \u00a73{0}\u00a7f till: \u00a7e{1} +pTimeSetFixed=Spelarens tid \u00e4r fixerad till \u00a73{0}\u00a7f f\u00f6r: \u00a7e{1} +parseError=Fel vid tolkning av {0} p\u00e5 rad {1} +pendingTeleportCancelled=\u00a7cAvvaktande teleporteringsbeg\u00e4ran \u00e4r avbruten. +permissionsError=Saknar Permissions/GroupManager; chattens prefixer/suffixer kommer vara inaktiverade. +playerBanned=\u00a7cSpelaren {0} bannad {1} f\u00f6r {2} +playerInJail=\u00a7cSpelaren \u00e4r redan i f\u00e4ngelse {0}. +playerJailed=\u00a77Spelaren {0} f\u00e4ngslad. +playerJailedFor= \u00a77Spelaren {0} f\u00e4ngslad f\u00f6r {1}. +playerKicked=\u00a7cSpelaren {0} har sparkat ut {1} f\u00f6r {2} +playerMuted=\u00a77Du har blivit tystad +playerMutedFor=\u00a77Du har blivit tystad f\u00f6r {0} +playerNeverOnServer=\u00a7cSpelaren {0} har aldrig varit p\u00e5 den h\u00e4r servern. +playerNotFound=\u00a7cSpelaren hittades inte. +playerUnmuted=\u00a77Du kan nu prata +pong=Pong! +possibleWorlds=\u00a77M\u00f6jliga v\u00e4rdar \u00e4r nummer mellan 0 och {0}. +powerToolAir=Kommandot kan inte tilldelas luft. +powerToolAlreadySet=Kommandot \u00a7c{0}\u00a7f \u00e4r redan tilldelat {1}. +powerToolAttach=\u00a7c{0}\u00a7f kommandot tilldelat {1}. +powerToolClearAll=Alla powertool-kommandon har blivit rensade. +powerToolList={1} har f\u00f6ljane kommandon: \u00a7c{0}\u00a7f. +powerToolListEmpty={0} har inga kommandon tilldelade. +powerToolNoSuchCommandAssigned=Kommandot \u00a7c{0}\u00a7f har inte blivit tilldelat {1}. +powerToolRemove=Kommandot \u00a7c{0}\u00a7f \u00e4r borttaget fr\u00e5n {1}. +powerToolRemoveAll=Alla kommandon \u00e4r borttagna fr\u00e5n {0}. +powerToolsDisabled=Alla dina powertools har blivit inaktiverade. +powerToolsEnabled=Alla dina powertools har blivit aktiverade. +protectionOwner=\u00a76[EssentialsProtect] Skydds\u00e4gare: {0} +questionFormat=\u00a77[Fr\u00e5ga]\u00a7f {0} +readNextPage=Skriv /{0} {1} f\u00f6r att l\u00e4sa n\u00e4sta sida +reloadAllPlugins=\u00a77Laddade om alla insticksprogram. +removed=\u00a77Tog bort {0} enheter. +repair=Du har reparerat din: \u00a7e{0}. +repairAlreadyFixed=\u00a77Den h\u00e4r saken beh\u00f6ver inte repareras. +repairEnchanted=\u00a77Du har inte beh\u00f6righet att reparera f\u00f6rtrollade saker. +repairInvalidType=\u00a7cDen h\u00e4r saken kan inte bli reparerad. +repairNone=Det var inga saker som beh\u00f6ver repareras. +requestAccepted=\u00a77Teleporterings-f\u00f6rfr\u00e5gan accepterad. +requestAcceptedFrom=\u00a77{0} accepterade din teleportations-f\u00f6rfr\u00e5gan. +requestDenied=\u00a77Teleportations-f\u00f6rfr\u00e5gan nekad. +requestDeniedFrom=\u00a77{0} nekade din teleportations-f\u00f6rfr\u00e5gan. +requestSent=\u00a77F\u00f6rfr\u00e5gan skickad till {0}\u00a77. +requestTimedOut=\u00a7cTeleportations-f\u00f6rfr\u00e5gan har g\u00e5tt ut +requiredBukkit= * ! * Du beh\u00f6ver minst bygge {0} av CraftBukkit, ladda ner den fr\u00e5n http://dl.bukkit.org/downloads/craftbukkit/ +returnPlayerToJailError=Ett fel uppstod n\u00e4r spelaren {0} skulle \u00e5terv\u00e4nda till f\u00e4ngelset: {1} +second=sekund +seconds=sekunder +seenOffline=Spelaren {0} \u00e4r offline sedan {1} +seenOnline=Spelaren {0} \u00e4r online sedan {1} +serverFull=Servern \u00e4r full +serverTotal=Totalt p\u00e5 servern: {0} +setSpawner=Bytte typen av spawnare till {0} +sheepMalformedColor=Felformulerad f\u00e4rg. +shoutFormat=\u00a77[Hojtning]\u00a7f {0} +signFormatFail=\u00a74[{0}] +signFormatSuccess=\u00a71[{0}] +signFormatTemplate=[{0}] +signProtectInvalidLocation=\u00a74Du har inte till\u00e5telse att g\u00f6ra skyltar h\u00e4r. +similarWarpExist=En warp med ett liknande namn finns redan. +slimeMalformedSize=Felformulerad storlek. +soloMob=Det h\u00e4r monstret gillar att vara ensam +spawnSet=\u00a77Spawnpunkten inst\u00e4lld f\u00f6r gruppen {0}. +spawned=spawnade +sudoExempt=Du kan inte g\u00f6ra en sudo p\u00e5 den h\u00e4r anv\u00e4ndaren +sudoRun=Tvingar {0} att springa: /{1} {2} +suicideMessage=\u00a77Adj\u00f6 grymma v\u00e4rld... +suicideSuccess= \u00a77{0} tog sitt eget liv +survival=\u00f6verlevnad +takenFromAccount=\u00a7c{0} har tagits fr\u00e5n ditt konto. +takenFromOthersAccount=\u00a7c{0} taget fr\u00e5n {1}\u00a7c konto. Ny balans: {2} +teleportAAll=\u00a77Teleportations-f\u00f6rfr\u00e5gan skickad till alla spelare... +teleportAll=\u00a77Teleporterar alla spelare... +teleportAtoB=\u00a77{0}\u00a77 teleporterade dig till {1}\u00a77. +teleportDisabled={0} har teleportering inaktiverat. +teleportHereRequest=\u00a7c{0}\u00a7c har fr\u00e5gat dig om du vill teleportera till dem. +teleportNewPlayerError=Messlyckades med att teleportera ny spelare +teleportRequest=\u00a7c{0}\u00a7c har beg\u00e4rt att f\u00e5 teleportera sig till dig. +teleportRequestTimeoutInfo=\u00a77Den h\u00e4r beg\u00e4ran kommer att g\u00e5 ut efter {0} sekunder. +teleportTop=\u00a77Teleporterar till toppen. +teleportationCommencing=\u00a77Teleporteringen p\u00e5b\u00f6rjas... +teleportationDisabled=\u00a77Teleportering inaktiverat. +teleportationEnabled=\u00a77Teleportering aktiverat. +teleporting=\u00a77Teleporterar... +teleportingPortal=\u00a77Teleporterar via portal. +tempBanned=Tempor\u00e4rt bannad fr\u00e5n servern f\u00f6r {0} +tempbanExempt=\u00a77Du kan inte tempor\u00e4rt banna den spelaren +thunder= Du {0} \u00e5ska i din v\u00e4rld +thunderDuration=Du {0} i din v\u00e4rld i {1} sekunder. +timeBeforeHeal=Tid f\u00f6re n\u00e4ste l\u00e4kning: {0} +timeBeforeTeleport=Tid f\u00f6re n\u00e4sta teleportering: {0} +timeFormat=\u00a73{0}\u00a7f eller \u00a73{1}\u00a7f eller \u00a73{2}\u00a7f +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=Tid inst\u00e4lld i alla v\u00e4rldar. +timeSetPermission=\u00a7cDu har inte tillst\u00e5nd att st\u00e4lla in tiden. +timeWorldCurrent=Den nuvarande tiden i {0} \u00e4r \u00a73{1} +timeWorldSet=Tiden \u00e4r nu {0} i: \u00a7c{1} +tps=Nuvarande TPS = {0} +tradeCompleted=\u00a77K\u00f6p avslutat. +tradeSignEmpty=K\u00f6pskylten har inget tillg\u00e4ngligt f\u00f6r dig. +tradeSignEmptyOwner=Det finns inget att fr\u00e5n den h\u00e4r k\u00f6pskylten. +treeFailure=\u00a7cTr\u00e4dgenereringn misslyckades. Prova igen p\u00e5 gr\u00e4s eller jord. +treeSpawned=\u00a77Tr\u00e4d genererat. +true=sant +typeTpaccept=\u00a77F\u00f6r att teleportera, skriv \u00a7c/tpaccept\u00a77. +typeTpdeny=\u00a77F\u00f6r att neka denna f\u00f6rfr\u00e5gan, skriv \u00a7c/tpdeny\u00a77. +typeWorldName=\u00a77Du kan ocks\u00e5 skriva namnet av en specifik v\u00e4rld. +unableToSpawnMob=Kunde inte spawna moben. +unbannedIP=Tog bort bannlysningen fr\u00e5n IP-adress. +unbannedPlayer=Tog bort bannlysningen fr\u00e5n spelaren. +unignorePlayer=Du ignorerar inte spelaren {0} l\u00e4ngre. +unknownItemId=Ok\u00e4nt objekt-ID: {0} +unknownItemInList=Ok\u00e4nt objekt {0} i listan {1}. +unknownItemName=Ok\u00e4nt objektnamn: {0} +unlimitedItemPermission=\u00a7cInget tillst\u00e5nd f\u00f6r obegr\u00e4nsad tillg\u00e5ng av {0}. +unlimitedItems=Obegr\u00e4nsade objekt: +unmutedPlayer=Spelaren {0} \u00e4r inte bannlyst l\u00e4ngre. +unvanished=\u00a7aDu \u00e4r synlig igen. +unvanishedReload=\u00a7cEn omladdning har tvingat dig att bli synlig. +upgradingFilesError=Fel vid uppgradering av filerna +userDoesNotExist=Anv\u00e4ndaren {0} existerar inte. +userIsAway={0} \u00e4r nu AFK +userIsNotAway={0} \u00e4r inte l\u00e4ngre AFK +userJailed=\u00a77Du har blivit f\u00e4ngslad +userUsedPortal={0} anv\u00e4nde en existerande utg\u00e5ngsportal. +userdataMoveBackError=Kunde inte flytta userdata/{0}.tmp till userdata/{1} +userdataMoveError=Kunde inte flytta userdata/{0} till userdata/{1}.tmp +usingTempFolderForTesting=Anv\u00e4nder tempor\u00e4r mapp mapp f\u00f6r testning: +vanished=\u00a7aDu \u00e4r nu osynlig. +versionMismatch=Versionerna matchar inte! V\u00e4nligen uppgradera {0} till samma version. +versionMismatchAll=Versionerna matchar inte! V\u00e4nligen uppgradera alla Essentials jars till samma version. +voiceSilenced=\u00a77Din r\u00f6st har tystats +warpDeleteError=Problem med att ta bort warp-filen. +warpListPermission=\u00a7cDu har inte tillst\u00e5nd att lista warparna. +warpNotExist=Den warpen finns inte. +warpOverwrite=\u00a7cDu kan inte skriva \u00f6ver den warpen. +warpSet=\u00a77Warpen {0} inst\u00e4lld. +warpUsePermission=\u00a7cDU har inte tillst\u00e5nd att anv\u00e4nda den warpen. +warpingTo=\u00a77Warpar till {0}. +warps=Warpar: {0} +warpsCount=\u00a77Det finns {0} warpar. Visar sida {1} av {2}. +weatherStorm=\u00a77Du har st\u00e4llt in v\u00e4dret till storm i {0} +weatherStormFor=\u00a77Du har st\u00e4llt in v\u00e4dret till storm i {0} f\u00f6r {1} sekunder +weatherSun=\u00a77Du har st\u00e4llt in v\u00e4dret till sol i {0} +weatherSunFor=\u00a77Du har st\u00e4llt in v\u00e4dret till sol i {0} f\u00f6r {1} sekunder +whoisBanned=\u00a76 - Banned:\u00a7f {0} +whoisExp=\u00a76 - Exp:\u00a7f {0} (Level {1}) +whoisGamemode=\u00a76 - Gamemode:\u00a7f {0} +whoisGeoLocation=\u00a76 - Location:\u00a7f {0} +whoisGod=\u00a76 - God mode:\u00a7f {0} +whoisHealth=\u00a76 - Health:\u00a7f {0}/20 +whoisIPAddress=\u00a76 - IP Address:\u00a7f {0} +whoisJail=\u00a76 - Jail:\u00a7f {0} +whoisLocation=\u00a76 - Location:\u00a7f ({0}, {1}, {2}, {3}) +whoisMoney=\u00a76 - Money:\u00a7f {0} +worth=\u00a77Stapeln med {0} ({2} objekt) \u00e4r v\u00e4rd \u00a7c{1}\u00a77 ({3} styck) +worthMeta=\u00a77Stapeln med {0} av typ {1} ({3} objekt) \u00e4r v\u00e4rd \u00a7c{2}\u00a77 ({4} styck) +worthSet=V\u00e4rdet inst\u00e4llt +year=\u00e5r +years=\u00e5r +youAreHealed=\u00a77Du har blivit l\u00e4kt. +youHaveNewMail=\u00a7cDu har {0} meddelanden!\u00a7f Skriv \u00a77/mail read\u00a7f f\u00f6r att l\u00e4sa dina meddelanden. +moveSpeed=\u00a77Set {0} speed to {1} for {2}. +whoisMuted=\u00a76 - Muted:\u00a7f {0} +whoisNick=\u00a76 - Nick:\u00a7f {0} +whoisOp=\u00a76 - OP:\u00a7f {0} +whoisTop=\u00a76 ====== WhoIs:\u00a7f {0} \u00a76====== +whoisAFK=\u00a76 - AFK:\u00a7f {0} +whoisFly=\u00a76 - Fly mode:\u00a7f {0} ({1}) +hatRemoved=\u00a7eYour hat has been removed. +banFormat=Banned: {0} +walking=walking +chatTypeAdmin=[A] +flying=flying +hatEmpty=\u00a7cYou are not wearing a hat. +notFlying=not flying +antiBuildPlace=\u00a74You are not permitted to place {0} here. +antiBuildBreak=\u00a74You are not permitted to break {0} blocks here. +antiBuildUse=\u00a74You are not permitted to use {0}. +antiBuildInteract=\u00a74You are not permitted to interact with {0}. diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 022143b3f..899c20de6 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -5,11 +5,11 @@ main: com.earth2me.essentials.Essentials version: TeamCity website: http://tiny.cc/EssentialsCommands description: Provides an essential, core set of commands for Bukkit. -authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5] +authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Iaccidentally] commands: afk: description: Marks you as away-from-keyboard. - usage: /<command> + usage: /<command> [player] aliases: [eafk] antioch: description: 'A little surprise for operators.' @@ -87,9 +87,18 @@ commands: description: Enchants the item the user is holding. usage: /<command> <enchantmentname> [level] aliases: [enchantment,eenchant,eenchantment] + enderchest: + description: Lets you see inside an enderchest. + usage: /<command> [player] + aliases: [endersee,echest,eenderchest,eendersee,eechest] essentials: description: Reloads essentials. usage: /<command> + aliases: [ess] + exp: + description: Give, set or look at a players exp. + usage: /<command> [show|set|give] [playername [amount]] + aliases: [eexp,xp] ext: description: Extinguish players. usage: /<command> [player] @@ -100,36 +109,40 @@ commands: aliases: [efeed,eat,eeat] fly: description: Take off, and soar! - usage: /<command> [player] + usage: /<command> [player] [on|off] aliases: [efly] itemdb: description: Searches for an item. usage: /<command> <item> - aliases: [eitemdb] + aliases: [eitemdb,itemno,eitemno,durability,dura,edura,edurability] fireball: description: Throw a fireball. usage: /<command> [small] aliases: [efireball] gamemode: description: Change player gamemode. - usage: /<command> [player] - aliases: [gm,creative,creativemode,egamemode,ecreative,ecreativemode,egm] + usage: /<command> <survival|creative|adventure> [player] + aliases: [gm,creative,creativemode,survival,survivalmode,adventure,adventuremode,gmc,gma,gms,egamemod,eecreative,ecreativemode,esurvival,esurvivalmode,eadventure,eadventuremode,egmc,egma,egms,egm] getpos: description: Get your current coordinates or those of a player. usage: /<command> [player] aliases: [coords,egetpos,position,eposition,whereami,ewhereami] gc: - description: Reports garbage collection info; useful to developers. + description: Reports garbage collection and tick info; useful to developers. usage: /<command> - aliases: [mem,memory,egc,emem,ememory] + aliases: [elag,lag,mem,memory,egc,emem,ememory] give: description: Give a player an item. usage: /<command> <player> <item|numeric> [amount <enchantmentname[:level]> ...] aliases: [egive] god: description: Enables your godly powers. - usage: /<command> [player] + usage: /<command> [player] [on|off] aliases: [tgm,godmode,egod,etgm,egodmode] + hat: + description: Get some cool new headgear + usage: /<command> [remove] + aliases: [ehat] heal: description: Heals you or the given player. usage: /<command> [player] @@ -180,7 +193,7 @@ commands: aliases: [ekickall] kit: description: Obtains the specified kit or views all available kits. - usage: /<command> [kit] + usage: /<command> [kit] [player] aliases: [ekit,kits,ekits] kill: description: Kills specified player. @@ -203,7 +216,7 @@ commands: aliases: [strike,smite,thor,shock,elightning,estrike,esmite,ethor,eshock] mail: description: Manages inter-player, intra-server mail. - usage: /<command> [read|clear|send [to] [message]] + usage: /<command> [read|clear|send [to] [message]|sendall [message]] aliases: [email] me: description: Describes an action in the context of the player. @@ -313,6 +326,10 @@ commands: description: Spawns a mob. usage: /<command> <mob>[:data][,<mount>[:data]] [amount] [player] aliases: [espawnmob,mob,emob] + speed: + description: Change your speed limits + usage: /<command> <speed> [player] + aliases: [flyspeed,walkspeed,fspeed,wspeed,eflyspeed,ewalkspeed,efspeed,ewspeed,espeed] sudo: description: Make another user perform a command. usage: /<command> <player> <command [args]> @@ -332,7 +349,7 @@ commands: time: description: Display/Change the world time. Defaults to current world. usage: /<command> [day|night|dawn|17:30|4pm|4000ticks] [worldname|all] - aliases: [etime, day, night] + aliases: [etime, day, night, eday, enight] togglejail: description: Jails/Unjails a player and tp them to the jail specified. usage: /<command> <player> <jailname> [datediff] @@ -405,18 +422,26 @@ commands: description: Allows the unlimited placing of items. usage: /<command> <list|item|clear> [player] aliases: [eunlimited,ul,unl,eul,eunl] + vanish: + description: Hide yourself from other players. + usage: /<command> [on|off] + aliases: [v,evanish,ev] warp: description: List all warps or warp to the specified location. usage: /<command> <pagenumber|warp> [player] aliases: [ewarp,warps,ewarps] weather: - description: Setting the weather. + description: Sets the weather. usage: /<command> <storm/sun> [duration] - aliases: [sky,sun,storm,eweather,esky,esun,estorm] + aliases: [sky,sun,storm,eweather,rain,erain,esky,esun,estorm] whois: description: Determine the username behind a nickname. usage: /<command> <nickname> aliases: [ewhois] + workbench: + description: Opens up a workbench + usage: /<command> + aliases: [eworkbench,wb,ewb,wbench,ewbench] world: description: Switch between worlds. usage: /<command> [world] diff --git a/Essentials/src/worth.yml b/Essentials/src/worth.yml index d0e9281b3..600795d41 100644 --- a/Essentials/src/worth.yml +++ b/Essentials/src/worth.yml @@ -1,199 +1,167 @@ worth: - stonebutton: - '0': 7.0 - wood: 1.0 - arrow: 10.0 - diamondpickaxe: 1000.0 - rawfish: 5.0 - minecart: 20.0 - leatherchestplate: 40.0 - storageminecart: 35.0 - leaves: - '0': 0.0 - feather: 3.0 - goldchestplate: 600.0 - mushroomsoup: 30.0 - bread: 20.0 - stationarywater: - '0': 1.0 - workbench: 20.0 - stonehoe: 40.0 - brownmushroom: 2.0 - wool: - '0': 8.0 - mossycobblestone: 90.0 - diamondhoe: 600.0 - woodsword: 10.0 - torch: - '0': 1.0 - grass: 1.0 - poweredminecart: 30.0 - snowball: 1.0 - goldenapple: 500.0 - leatherleggings: 20.0 - log: - '0': 2.0 - diamondaxe: 1000.0 - slimeball: 50.0 - fence: 10.0 - stonespade: 40.0 - claybrick: 10.0 - noteblock: 40.0 - ironaxe: 60.0 - coalore: 15.0 - clayball: 8.0 - fishingrod: 25.0 - ironhoe: 60.0 - goldrecord: 950.0 - ironpickaxe: 80.0 - irondoor: 35.0 - bucket: 10.0 - redrose: 2.0 - grilledpork: 6.0 - gravel: 1.0 - wooddoor: 30.0 - chainmailhelmet: 40.0 - ironchestplate: 300.0 - diamondblock: 1500.0 - diamondhelmet: 1500.0 - goldhelmet: 300.0 - redstonetorchon: - '0': 10.0 - ironspade: 40.0 - furnace: - '0': 10.0 - ironsword: 60.0 - dispenser: - '0': 9.0 - woodaxe: 10.0 - seeds: 5.0 - painting: 50.0 - woodplate: - '0': 10.0 - redstoneore: 30.0 - diamondspade: 350.0 - waterbucket: 10.0 - water: - '0': 1.0 - bedrock: 1000.0 - irondoorblock: - '0': 15.0 - goldhoe: 200.0 - sand: 1.0 - goldsword: 200.0 - stoneaxe: 40.0 - bookshelf: 20.0 - ironblock: 160.0 - jackolantern: - '0': 60.0 - boat: 5.0 - diamondchestplate: 3000.0 - redstonewire: - '0': 7.0 - redmushroom: 2.0 - string: 5.0 - stoneplate: - '0': 10.0 - wallsign: - '0': 1.0 - cactus: - '0': 10.0 - sulphur: 19.0 - rails: - '0': 40.0 - ironore: 18.0 - leatherhelmet: 20.0 - stone: 2.0 - egg: 1.0 - diamondore: 200.0 - woodhoe: 10.0 - goldleggings: 400.0 - chainmailleggings: 50.0 - yellowflower: 2.0 - ironhelmet: 120.0 - obsidian: 130.0 - dirt: 1.0 - leather: 10.0 - leatherboots: 17.0 - lever: - '0': 7.0 - cobblestone: 1.0 - cake: 100.0 - woodstairs: - '0': 8.0 - ironingot: 20.0 - goldore: 45.0 - pumpkin: - '0': 50.0 - bed: 25.0 - watch: 100.0 - ironleggings: 250.0 - sign: 10.0 - doublestep: - '0': 3.0 - woodpickaxe: 10.0 - stonepickaxe: 40.0 - chainmailboots: 30.0 - diamondleggings: 2200.0 - cookedfish: 20.0 - saddle: 100.0 - cobblestonestairs: - '0': 22.0 - tnt: 10000.0 - glowingredstoneore: 30.0 - apple: 10.0 - woodspade: 10.0 - goldingot: 50.0 - diode: 10.0 - soil: - '0': 3.0 - clay: 3.0 - goldblock: 400.0 - stick: 1.0 - paper: 30.0 - brick: 40.0 - stationarylava: - '0': 1.0 - chest: 15.0 - sandstone: 5.0 - goldpickaxe: 300.0 - compass: 50.0 - sugarcane: 10.0 - diamondsword: 700.0 - goldboots: 250.0 - sponge: 80.0 - stonesword: 40.0 - coal: - '0': 3.0 - goldaxe: 300.0 - bone: 10.0 - diamond: 230.0 - glass: 10.0 - goldspade: 220.0 - lapisblock: 500.0 - lavabucket: 30.0 - wheat: 9.0 - ladder: - '0': 10.0 - sugarcaneblock: - '0': 15.0 - bowl: 6.0 - chainmailchestplate: 40.0 - sapling: - '0': 2.0 - diamondboots: 1500.0 - lapisore: 100.0 - lava: - '0': 1.0 - milkbucket: 15.0 - redstone: 1.0 - greenrecord: 1000.0 - inksack: - '0': 10.0 - glowstonedust: 11.0 - book: 35.0 - bow: 75.0 - ironboots: 50.0 - step: - '0': 3.0 - sugar: 5.0 + stonebutton: 6.0 + wood: 0.50 + arrow: 3.50 + diamondpickaxe: 650.0 + rawfish: 5.0 + minecart: 23.0 + leatherchestplate: 85.0 + storageminecart: 30.0 + leaves: 1.0 + feather: 3.0 + goldchestplate: 6.5 + mushroomsoup: 4.5 + bread: 30.0 + stationarywater: 1.0 + workbench: 2.5 + stonehoe: 2.5 + brownmushroom: 2.0 + wool: 20.0 + mossycobblestone: 90.0 + diamondhoe: 400.0 + woodsword: 1.0 + torch: 4.0 + grass: 1.0 + poweredminecart: 32.0 + snowball: 1.0 + goldenapple: 100.0 + leatherleggings: 75.0 + log: 2.0 + diamondaxe: 650.0 + slimeball: 50.0 + fence: 1.0 + stonespade: 1.5 + claybrick: 5.0 + noteblock: 36.0 + ironaxe: 22.0 + coalore: 15.0 + clayball: 3.0 + fishingrod: 10.0 + ironhoe: 22.0 + goldrecord: 100.0 + ironpickaxe: 22.0 + irondoor: 22.0 + bucket: 22.0 + redrose: 2.0 + grilledpork: 7.0 + gravel: 1.0 + wooddoor: 3.0 + chainmailhelmet: 40.0 + ironchestplate: 22.0 + diamondblock: 2000.0 + diamondhelmet: 1000.0 + goldhelmet: 6.0 + redstonetorchon: 32.0 + ironspade: 22.0 + furnace: 8.5 + ironsword: 22.0 + dispenser: 58.0 + woodaxe: 2.0 + seeds: 2.0 + painting: 25.0 + woodplate: 1.0 + redstoneore: 30.0 + diamondspade: 210.0 + waterbucket: 40.0 + water: 1.0 + bedrock: 100.0 + irondoorblock: 15.0 + goldhoe: 6.0 + sand: 1.0 + goldsword: 6.0 + stoneaxe: 3.0 + bookshelf: 140.0 + ironblock: 190.0 + jackolantern: 56.0 + boat: 3.0 + diamondchestplate: 1750.0 + redstonewire: 30.0 + redmushroom: 2.0 + string: 5.0 + stoneplate: 6.0 + wallsign: 1.0 + cactus: 10.0 + sulphur: 20.0 + rails: 22.0 + ironore: 18.0 + leatherhelmet: 52.0 + stone: 3.00 + egg: 1.0 + diamondore: 200.0 + woodhoe: 2.0 + goldleggings: 6.0 + chainmailleggings: 50.0 + yellowflower: 2.0 + ironhelmet: 22.0 + obsidian: 130.0 + dirt: 1.0 + leather: 10.0 + leatherboots: 42.0 + lever: 1.0 + cobblestone: 1.0 + cake: 180.0 + woodstairs: 1.0 + ironingot: 22.0 + goldore: 45.0 + pumpkin: 50.0 + bed: 68.0 + watch: 6.0 + ironleggings: 22.0 + sign: 1.5 + doublestep: 1.0 + woodpickaxe: 2.0 + stonepickaxe: 4.0 + chainmailboots: 30.0 + diamondleggings: 1500.0 + cookedfish: 7.0 + saddle: 100.0 + cobblestonestairs: 1.5 + tnt: 100.0 + glowingredstoneore: 30.0 + apple: 10.0 + woodspade: 1.0 + goldingot: 105.0 + diode: 110.0 + soil: 1.0 + clay: 12.0 + goldblock: 450.0 + stick: 0.25 + paper: 10.0 + brick: 21.0 + stationarylava: 1.0 + chest: 4.0 + sandstone: 3.0 + goldpickaxe: 6.0 + compass: 22.0 + sugarcane: 10.0 + diamondsword: 420.0 + goldboots: 6.0 + sponge: 80.0 + stonesword: 2.5 + coal: 15.0 + goldaxe: 6.0 + bone: 2.0 + diamond: 200.0 + glass: 3.00 + goldspade: 6.0 + lapisblock: 950.0 + lavabucket: 40.0 + wheat: 9.0 + ladder: 0.5 + sugarcaneblock: 15.0 + bowl: 0.50 + chainmailchestplate: 40.0 + sapling: 2.0 + diamondboots: 850.0 + lapisore: 100.0 + lava: 25.0 + milkbucket: 40.0 + redstone: 32.0 + greenrecord: 100.0 + inksack: 10.0 + glowstonedust: 10.0 + book: 45.0 + bow: 15.0 + ironboots: 22.0 + step: 1.5 + sugar: 10.0 diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java index 63d03a5f9..4e0fe7a62 100644 --- a/Essentials/test/com/earth2me/essentials/FakeServer.java +++ b/Essentials/test/com/earth2me/essentials/FakeServer.java @@ -9,6 +9,7 @@ import java.util.concurrent.Future; import java.util.logging.Logger; import org.bukkit.World.Environment; import org.bukkit.*; +import org.bukkit.Warning.WarningState; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.command.PluginCommand; @@ -723,4 +724,40 @@ public class FakeServer implements Server { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public int getMonsterSpawnLimit() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getAnimalSpawnLimit() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getWaterAnimalSpawnLimit() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isPrimaryThread() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getMotd() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public WarningState getWarningState() + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/test/com/earth2me/essentials/StorageTest.java b/Essentials/test/com/earth2me/essentials/StorageTest.java index b7fe23433..d4ea07f46 100644 --- a/Essentials/test/com/earth2me/essentials/StorageTest.java +++ b/Essentials/test/com/earth2me/essentials/StorageTest.java @@ -1,10 +1,5 @@ package com.earth2me.essentials; -import com.earth2me.essentials.settings.Settings; -import com.earth2me.essentials.storage.ObjectLoadException; -import com.earth2me.essentials.storage.StorageObject; -import com.earth2me.essentials.storage.YamlStorageReader; -import com.earth2me.essentials.storage.YamlStorageWriter; import java.io.*; import junit.framework.TestCase; import org.bukkit.Location; @@ -40,100 +35,6 @@ public class StorageTest extends TestCase } @Test - public void testSettings() - { - try - { - assertTrue(StorageObject.class.isAssignableFrom(Settings.class)); - ExecuteTimer ext = new ExecuteTimer(); - ext.start(); - final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); - final Reader reader = new InputStreamReader(bais); - final Settings settings = new YamlStorageReader(reader, null).load(Settings.class); - ext.mark("load empty settings"); - final ByteArrayInputStream bais3 = new ByteArrayInputStream(new byte[0]); - final Reader reader3 = new InputStreamReader(bais3); - final Settings settings3 = new YamlStorageReader(reader3, null).load(Settings.class); - ext.mark("load empty settings (class cached)"); - final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - final PrintWriter writer = new PrintWriter(baos); - new YamlStorageWriter(writer).save(settings); - writer.close(); - ext.mark("write settings"); - byte[] written = baos.toByteArray(); - System.out.println(new String(written)); - final ByteArrayInputStream bais2 = new ByteArrayInputStream(written); - final Reader reader2 = new InputStreamReader(bais2); - final Settings settings2 = new YamlStorageReader(reader2, null).load(Settings.class); - System.out.println(settings.toString()); - System.out.println(settings2.toString()); - ext.mark("reload settings"); - System.out.println(ext.end()); - //assertEquals("Default and rewritten config should be equal", settings, settings2); - //that assertion fails, because empty list and maps return as null - } - catch (ObjectLoadException ex) - { - fail(ex.getMessage()); - } - } - - @Test - public void testUserdata() - { - try - { - FakeServer server = new FakeServer(); - World world = server.createWorld("testWorld", Environment.NORMAL); - ExecuteTimer ext = new ExecuteTimer(); - ext.start(); - final ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); - final Reader reader = new InputStreamReader(bais); - final com.earth2me.essentials.user.UserData userdata = new YamlStorageReader(reader, null).load(com.earth2me.essentials.user.UserData.class); - ext.mark("load empty user"); - final ByteArrayInputStream bais3 = new ByteArrayInputStream(new byte[0]); - final Reader reader3 = new InputStreamReader(bais3); - final com.earth2me.essentials.user.UserData userdata3 = new YamlStorageReader(reader3, null).load(com.earth2me.essentials.user.UserData.class); - ext.mark("load empty user (class cached)"); - - for (int j = 0; j < 10000; j++) - { - userdata.getHomes().put("home", new Location(world, j, j, j)); - } - ext.mark("change home 10000 times"); - final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - final PrintWriter writer = new PrintWriter(baos); - new YamlStorageWriter(writer).save(userdata); - writer.close(); - ext.mark("write user"); - final ByteArrayOutputStream baos2 = new ByteArrayOutputStream(); - final PrintWriter writer2 = new PrintWriter(baos2); - new YamlStorageWriter(writer2).save(userdata); - writer2.close(); - ext.mark("write user (cached)"); - byte[] written = baos.toByteArray(); - System.out.println(new String(written)); - ext.mark("debug output"); - final ByteArrayInputStream bais2 = new ByteArrayInputStream(written); - final Reader reader2 = new InputStreamReader(bais2); - final com.earth2me.essentials.user.UserData userdata2 = new YamlStorageReader(reader2, null).load(com.earth2me.essentials.user.UserData.class); - ext.mark("reload file"); - final ByteArrayInputStream bais4 = new ByteArrayInputStream(written); - final Reader reader4 = new InputStreamReader(bais4); - final com.earth2me.essentials.user.UserData userdata4 = new YamlStorageReader(reader4, null).load(com.earth2me.essentials.user.UserData.class); - ext.mark("reload file (cached)"); - System.out.println(userdata.toString()); - System.out.println(userdata2.toString()); - System.out.println(ext.end()); - } - catch (ObjectLoadException ex) - { - fail(ex.getMessage()); - } - - } - - @Test public void testOldUserdata() { ExecuteTimer ext = new ExecuteTimer(); diff --git a/Essentials/test/com/earth2me/essentials/UtilTest.java b/Essentials/test/com/earth2me/essentials/UtilTest.java index 71282a18f..e1edda95e 100644 --- a/Essentials/test/com/earth2me/essentials/UtilTest.java +++ b/Essentials/test/com/earth2me/essentials/UtilTest.java @@ -3,6 +3,8 @@ package com.earth2me.essentials; import java.io.IOException; import java.util.Calendar; import java.util.GregorianCalendar; +import java.util.HashSet; +import java.util.Set; import junit.framework.TestCase; import org.bukkit.World.Environment; import org.bukkit.plugin.InvalidDescriptionException; @@ -32,6 +34,33 @@ public class UtilTest extends TestCase } } + public void testSafeLocation() + { + Set<String> testSet = new HashSet<String>(); + int count = 0; + int x, y, z, origX, origY, origZ; + x = y = z = origX = origY = origZ = 0; + int i = 0; + while (true) + { + testSet.add(x + ":" + y + ":" + z); + count++; + i++; + if (i >= Util.VOLUME.length) + { + break; + } + x = origX + Util.VOLUME[i].x; + y = origY + Util.VOLUME[i].y; + z = origZ + Util.VOLUME[i].z; + } + assertTrue(testSet.contains("0:0:0")); + assertTrue(testSet.contains("3:3:3")); + assertEquals(testSet.size(), count); + int diameter = Util.RADIUS * 2 + 1; + assertEquals(diameter * diameter * diameter, count); + } + public void testFDDnow() { Calendar c = new GregorianCalendar(); @@ -44,67 +73,67 @@ public class UtilTest extends TestCase Calendar a, b; a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 10, 0, 1); - assertEquals(" 1 second", Util.formatDateDiff(a, b)); + assertEquals("1 second", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 10, 0, 2); - assertEquals(" 2 seconds", Util.formatDateDiff(a, b)); + assertEquals("2 seconds", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 10, 0, 3); - assertEquals(" 3 seconds", Util.formatDateDiff(a, b)); + assertEquals("3 seconds", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 10, 1, 0); - assertEquals(" 1 minute", Util.formatDateDiff(a, b)); + assertEquals("1 minute", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 10, 2, 0); - assertEquals(" 2 minutes", Util.formatDateDiff(a, b)); + assertEquals("2 minutes", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 10, 3, 0); - assertEquals(" 3 minutes", Util.formatDateDiff(a, b)); + assertEquals("3 minutes", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 11, 0, 0); - assertEquals(" 1 hour", Util.formatDateDiff(a, b)); + assertEquals("1 hour", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 12, 0, 0); - assertEquals(" 2 hours", Util.formatDateDiff(a, b)); + assertEquals("2 hours", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 13, 0, 0); - assertEquals(" 3 hours", Util.formatDateDiff(a, b)); + assertEquals("3 hours", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 2, 10, 0, 0); - assertEquals(" 1 day", Util.formatDateDiff(a, b)); + assertEquals("1 day", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 3, 10, 0, 0); - assertEquals(" 2 days", Util.formatDateDiff(a, b)); + assertEquals("2 days", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 4, 10, 0, 0); - assertEquals(" 3 days", Util.formatDateDiff(a, b)); + assertEquals("3 days", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 2, 1, 10, 0, 0); - assertEquals(" 1 month", Util.formatDateDiff(a, b)); + assertEquals("1 month", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 3, 1, 10, 0, 0); - assertEquals(" 2 months", Util.formatDateDiff(a, b)); + assertEquals("2 months", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 4, 1, 10, 0, 0); - assertEquals(" 3 months", Util.formatDateDiff(a, b)); + assertEquals("3 months", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2011, 1, 1, 10, 0, 0); - assertEquals(" 1 year", Util.formatDateDiff(a, b)); + assertEquals("1 year", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2012, 1, 1, 10, 0, 0); - assertEquals(" 2 years", Util.formatDateDiff(a, b)); + assertEquals("2 years", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2013, 1, 1, 10, 0, 0); - assertEquals(" 3 years", Util.formatDateDiff(a, b)); + assertEquals("3 years", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2011, 4, 5, 23, 38, 12); - assertEquals(" 1 year 3 months 4 days 13 hours 38 minutes 12 seconds", Util.formatDateDiff(a, b)); + assertEquals("1 year 3 months 4 days", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 9, 17, 23, 45, 45); b = new GregorianCalendar(2015, 3, 7, 10, 0, 0); - assertEquals(" 4 years 5 months 20 days 10 hours 14 minutes 15 seconds", Util.formatDateDiff(a, b)); + assertEquals("4 years 5 months 20 days", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2011, 4, 31, 10, 0, 0); b = new GregorianCalendar(2011, 4, 31, 10, 5, 0); - assertEquals(" 5 minutes", Util.formatDateDiff(a, b)); + assertEquals("5 minutes", Util.formatDateDiff(a, b)); } public void testFDDpast() @@ -112,63 +141,63 @@ public class UtilTest extends TestCase Calendar a, b; a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 9, 59, 59); - assertEquals(" 1 second", Util.formatDateDiff(a, b)); + assertEquals("1 second", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 9, 59, 58); - assertEquals(" 2 seconds", Util.formatDateDiff(a, b)); + assertEquals("2 seconds", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 9, 59, 57); - assertEquals(" 3 seconds", Util.formatDateDiff(a, b)); + assertEquals("3 seconds", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 9, 59, 0); - assertEquals(" 1 minute", Util.formatDateDiff(a, b)); + assertEquals("1 minute", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 9, 58, 0); - assertEquals(" 2 minutes", Util.formatDateDiff(a, b)); + assertEquals("2 minutes", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 9, 57, 0); - assertEquals(" 3 minutes", Util.formatDateDiff(a, b)); + assertEquals("3 minutes", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 9, 0, 0); - assertEquals(" 1 hour", Util.formatDateDiff(a, b)); + assertEquals("1 hour", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 8, 0, 0); - assertEquals(" 2 hours", Util.formatDateDiff(a, b)); + assertEquals("2 hours", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2010, 1, 1, 7, 0, 0); - assertEquals(" 3 hours", Util.formatDateDiff(a, b)); + assertEquals("3 hours", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 5, 10, 0, 0); b = new GregorianCalendar(2010, 1, 4, 10, 0, 0); - assertEquals(" 1 day", Util.formatDateDiff(a, b)); + assertEquals("1 day", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 5, 10, 0, 0); b = new GregorianCalendar(2010, 1, 3, 10, 0, 0); - assertEquals(" 2 days", Util.formatDateDiff(a, b)); + assertEquals("2 days", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 5, 10, 0, 0); b = new GregorianCalendar(2010, 1, 2, 10, 0, 0); - assertEquals(" 3 days", Util.formatDateDiff(a, b)); + assertEquals("3 days", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 5, 1, 10, 0, 0); b = new GregorianCalendar(2010, 4, 1, 10, 0, 0); - assertEquals(" 1 month", Util.formatDateDiff(a, b)); + assertEquals("1 month", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 5, 1, 10, 0, 0); b = new GregorianCalendar(2010, 3, 1, 10, 0, 0); - assertEquals(" 2 months", Util.formatDateDiff(a, b)); + assertEquals("2 months", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 5, 1, 10, 0, 0); b = new GregorianCalendar(2010, 2, 1, 10, 0, 0); - assertEquals(" 3 months", Util.formatDateDiff(a, b)); + assertEquals("3 months", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2009, 1, 1, 10, 0, 0); - assertEquals(" 1 year", Util.formatDateDiff(a, b)); + assertEquals("1 year", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2008, 1, 1, 10, 0, 0); - assertEquals(" 2 years", Util.formatDateDiff(a, b)); + assertEquals("2 years", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2007, 1, 1, 10, 0, 0); - assertEquals(" 3 years", Util.formatDateDiff(a, b)); + assertEquals("3 years", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 1, 1, 10, 0, 0); b = new GregorianCalendar(2009, 4, 5, 23, 38, 12); - assertEquals(" 8 months 26 days 10 hours 21 minutes 48 seconds", Util.formatDateDiff(a, b)); + assertEquals("8 months 26 days 10 hours", Util.formatDateDiff(a, b)); a = new GregorianCalendar(2010, 9, 17, 23, 45, 45); b = new GregorianCalendar(2000, 3, 7, 10, 0, 0); - assertEquals(" 10 years 6 months 10 days 13 hours 45 minutes 45 seconds", Util.formatDateDiff(a, b)); + assertEquals("10 years 6 months 10 days", Util.formatDateDiff(a, b)); } } diff --git a/EssentialsUpdate/build.xml b/EssentialsAntiBuild/build.xml index dedb62afa..8cae8a7c1 100644 --- a/EssentialsUpdate/build.xml +++ b/EssentialsAntiBuild/build.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE project [ <!ENTITY buildinc SYSTEM "../build.inc.xml"> ]> <!-- 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.) --> @@ -7,9 +8,9 @@ <!-- 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="EssentialsUpdate" default="default" basedir="."> - <description>Builds, tests, and runs the project EssentialsUpdate.</description> - <import file="nbproject/build-impl.xml"/> +<project name="EssentialsAntiBuild" default="default" basedir="."> + <description>Builds, tests, and runs the project EssentialsAntiBuild.</description> + <import file="nbproject/build-impl.xml"/> <!-- There exist several targets which are by default empty and which can be @@ -59,7 +60,7 @@ An example of overriding the target for project execution could look like this: - <target name="run" depends="EssentialsUpdate-impl.jar"> + <target name="run" depends="EssentialsProtect-impl.jar"> <exec dir="bin" executable="launcher.exe"> <arg file="${dist.jar}"/> </exec> @@ -71,4 +72,12 @@ nbproject/build-impl.xml file. --> + <target name="-post-jar"> + <jar jarfile="${dist.dir}/EssentialsAntiBuild.jar"> + <zipfileset src="${dist.jar}" excludes="META-INF/*" /> + <manifest> + <attribute name="Classpath" value="EssentialsAntiBuild.jar"/> + </manifest> + </jar> + </target> </project> diff --git a/EssentialsUpdate/nbproject/build-impl.xml b/EssentialsAntiBuild/nbproject/build-impl.xml index 2f8555c4c..fd7175255 100644 --- a/EssentialsUpdate/nbproject/build-impl.xml +++ b/EssentialsAntiBuild/nbproject/build-impl.xml @@ -19,7 +19,7 @@ is divided into following sections: - 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="EssentialsUpdate-impl"> +<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="EssentialsAntiBuild-impl"> <fail message="Please build using Ant 1.8.0 or higher."> <condition> <not> @@ -593,7 +593,7 @@ is divided into following sections: <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: EssentialsUpdate was already built"/> + <echo level="warn" message="Cycle detected: EssentialsAntiBuild was already built"/> </target> <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> <mkdir dir="${build.dir}"/> @@ -603,6 +603,13 @@ is divided into following sections: <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"> @@ -1039,7 +1046,7 @@ is divided into following sections: <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: EssentialsUpdate was already built"/> + <echo level="warn" message="Cycle detected: EssentialsAntiBuild was already built"/> </target> <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> <mkdir dir="${build.dir}"/> @@ -1049,6 +1056,13 @@ is divided into following sections: <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}"/> diff --git a/EssentialsAntiBuild/nbproject/genfiles.properties b/EssentialsAntiBuild/nbproject/genfiles.properties new file mode 100644 index 000000000..61188645c --- /dev/null +++ b/EssentialsAntiBuild/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=ff207988 +build.xml.script.CRC32=1ed11cc3 +build.xml.stylesheet.CRC32=28e38971@1.38.3.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=ddb4519c +nbproject/build-impl.xml.script.CRC32=cfb9443d +nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.3.46 diff --git a/EssentialsUpdate/nbproject/project.properties b/EssentialsAntiBuild/nbproject/project.properties index 88315dfa0..10fe0db04 100644 --- a/EssentialsUpdate/nbproject/project.properties +++ b/EssentialsAntiBuild/nbproject/project.properties @@ -1,9 +1,10 @@ annotation.processing.enabled=true annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=EssentialsUpdate -application.vendor=essentialsteam +application.title=EssentialsAntiBuild +application.vendor= auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=2 auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=2 @@ -59,14 +60,17 @@ debug.test.classpath=\ ${run.test.classpath} # This directory is removed when the project is cleaned: dist.dir=dist -dist.jar=${dist.dir}/EssentialsUpdate.jar +dist.jar=${dist.dir}/original-EssentialsAntiBuild.jar dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes= file.reference.bukkit.jar=../lib/bukkit.jar includes=** +jar.archive.disabled=${jnlp.enabled} jar.compress=true +jar.index=${jnlp.enabled} javac.classpath=\ + ${reference.Essentials.jar}:\ ${file.reference.bukkit.jar} # Space-separated list of extra javac options javac.compilerargs= @@ -92,11 +96,18 @@ javadoc.splitindex=true javadoc.use=true javadoc.version=false javadoc.windowtitle= -main.class= +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 -mkdist.disabled=false +mkdist.disabled=true platform.active=default_platform +project.Essentials=../Essentials +reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/EssentialsUpdate/nbproject/project.xml b/EssentialsAntiBuild/nbproject/project.xml index 6b0efd00f..931bed5ea 100644 --- a/EssentialsUpdate/nbproject/project.xml +++ b/EssentialsAntiBuild/nbproject/project.xml @@ -3,7 +3,7 @@ <type>org.netbeans.modules.java.j2seproject</type> <configuration> <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> - <name>EssentialsUpdate</name> + <name>EssentialsAntiBuild</name> <source-roots> <root id="src.dir"/> </source-roots> @@ -14,5 +14,15 @@ <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/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/AntiBuildConfig.java b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/AntiBuildConfig.java new file mode 100644 index 000000000..1aa33d02a --- /dev/null +++ b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/AntiBuildConfig.java @@ -0,0 +1,73 @@ +package com.earth2me.essentials.antibuild; + + +public enum AntiBuildConfig +{ + disable_build("protect.disable.build", true), + disable_use("protect.disable.use", 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"), + blacklist_piston("protect.blacklist.piston"); + private final String configName; + private final String defValueString; + private final boolean defValueBoolean; + private final boolean isList; + private final boolean isString; + + private AntiBuildConfig(final String configName) + { + this(configName, null, false, true, false); + } + + private AntiBuildConfig(final String configName, final boolean defValueBoolean) + { + this(configName, null, defValueBoolean, false, false); + } + + private AntiBuildConfig(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/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuild.java b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuild.java new file mode 100644 index 000000000..c7b2eb7dd --- /dev/null +++ b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuild.java @@ -0,0 +1,65 @@ +package com.earth2me.essentials.antibuild; + +import java.util.EnumMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Logger; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.PluginManager; +import org.bukkit.plugin.java.JavaPlugin; + + +public class EssentialsAntiBuild extends JavaPlugin implements IAntiBuild +{ + private static final Logger LOGGER = Logger.getLogger("Minecraft"); + private final transient Map<AntiBuildConfig, Boolean> settingsBoolean = new EnumMap<AntiBuildConfig, Boolean>(AntiBuildConfig.class); + private final transient Map<AntiBuildConfig, List<Integer>> settingsList = new EnumMap<AntiBuildConfig, List<Integer>>(AntiBuildConfig.class); + private transient EssentialsConnect ess = null; + + @Override + public void onEnable() + { + final PluginManager pm = this.getServer().getPluginManager(); + final Plugin essPlugin = pm.getPlugin("Essentials"); + if (essPlugin == null || !essPlugin.isEnabled()) + { + return; + } + ess = new EssentialsConnect(essPlugin, this); + + final EssentialsAntiBuildListener blockListener = new EssentialsAntiBuildListener(this); + pm.registerEvents(blockListener, this); + } + + @Override + public boolean checkProtectionItems(final AntiBuildConfig list, final int id) + { + final List<Integer> itemList = settingsList.get(list); + return itemList != null && !itemList.isEmpty() && itemList.contains(id); + } + + @Override + public EssentialsConnect getEssentialsConnect() + { + return ess; + } + + @Override + public Map<AntiBuildConfig, Boolean> getSettingsBoolean() + { + return settingsBoolean; + } + + @Override + public Map<AntiBuildConfig, List<Integer>> getSettingsList() + { + return settingsList; + } + + @Override + public boolean getSettingBool(final AntiBuildConfig protectConfig) + { + final Boolean bool = settingsBoolean.get(protectConfig); + return bool == null ? protectConfig.getDefaultValueBoolean() : bool; + } +} diff --git a/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java new file mode 100644 index 000000000..7a1052cce --- /dev/null +++ b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java @@ -0,0 +1,218 @@ +package com.earth2me.essentials.antibuild; + +import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.IEssentials; +import com.earth2me.essentials.User; +import java.util.logging.Level; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.*; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; + + +public class EssentialsAntiBuildListener implements Listener +{ + final private transient IAntiBuild prot; + final private transient IEssentials ess; + + public EssentialsAntiBuildListener(final IAntiBuild parent) + { + this.prot = parent; + this.ess = prot.getEssentialsConnect().getEssentials(); + } + + private boolean metaPermCheck(User user, String action, Block block) + { + if (block == null) + { + return false; + } + return metaPermCheck(user, action, block.getTypeId(), block.getData()); + } + + private boolean metaPermCheck(User user, String action, int blockId, byte data) + { + final String blockPerm = "essentials.build." + action + "." + blockId; + final String dataPerm = blockPerm + ":" + data; + + if (user.isPermissionSet(dataPerm)) + { + return user.isAuthorized(dataPerm); + } + else + { + if (ess.getSettings().isDebug()) + { + ess.getLogger().log(Level.INFO, "DataValue perm on " + user.getName() + " is not directly set: " + dataPerm); + } + } + + return user.isAuthorized(blockPerm); + } + + @EventHandler(priority = EventPriority.HIGHEST) + public void onBlockPlace(final BlockPlaceEvent event) + { + if (event.isCancelled()) + { + return; + } + + final User user = ess.getUser(event.getPlayer()); + final Block block = event.getBlockPlaced(); + final int typeId = block.getTypeId(); + final Material type = block.getType(); + + if (prot.getSettingBool(AntiBuildConfig.disable_build) && !user.canBuild() && !user.isAuthorized("essentials.build") + && !metaPermCheck(user, "place", block)) + { + if (ess.getSettings().warnOnBuildDisallow()) + { + user.sendMessage(_("antiBuildPlace", type.toString())); + } + event.setCancelled(true); + return; + } + + if (prot.checkProtectionItems(AntiBuildConfig.blacklist_placement, typeId) && !user.isAuthorized("essentials.protect.exemptplacement")) + { + if (ess.getSettings().warnOnBuildDisallow()) + { + user.sendMessage(_("antiBuildPlace", type.toString())); + } + event.setCancelled(true); + return; + } + + if (prot.checkProtectionItems(AntiBuildConfig.alert_on_placement, typeId) + && !user.isAuthorized("essentials.protect.alerts.notrigger")) + { + prot.getEssentialsConnect().alert(user, type.toString(), _("alertPlaced")); + } + } + + @EventHandler(priority = EventPriority.HIGHEST) + public void onBlockBreak(final BlockBreakEvent event) + { + if (event.isCancelled()) + { + return; + } + final User user = ess.getUser(event.getPlayer()); + final Block block = event.getBlock(); + final int typeId = block.getTypeId(); + final Material type = block.getType(); + + if (prot.getSettingBool(AntiBuildConfig.disable_build) && !user.canBuild() && !user.isAuthorized("essentials.build") + && !metaPermCheck(user, "break", block)) + { + if (ess.getSettings().warnOnBuildDisallow()) + { + user.sendMessage(_("antiBuildBreak", type.toString())); + } + event.setCancelled(true); + return; + } + + if (prot.checkProtectionItems(AntiBuildConfig.blacklist_break, typeId) + && !user.isAuthorized("essentials.protect.exemptbreak")) + { + if (ess.getSettings().warnOnBuildDisallow()) + { + user.sendMessage(_("antiBuildBreak", type.toString())); + } + event.setCancelled(true); + return; + } + + if (prot.checkProtectionItems(AntiBuildConfig.alert_on_break, typeId) + && !user.isAuthorized("essentials.protect.alerts.notrigger")) + { + prot.getEssentialsConnect().alert(user, type.toString(), _("alertBroke")); + } + } + + @EventHandler(priority = EventPriority.HIGHEST) + public void onBlockPistonExtend(BlockPistonExtendEvent event) + { + if (event.isCancelled()) + { + return; + } + for (Block block : event.getBlocks()) + { + if (prot.checkProtectionItems(AntiBuildConfig.blacklist_piston, block.getTypeId())) + { + event.setCancelled(true); + return; + } + } + } + + @EventHandler(priority = EventPriority.HIGHEST) + public void onBlockPistonRetract(BlockPistonRetractEvent event) + { + if (event.isCancelled() || !event.isSticky()) + { + return; + } + final Block block = event.getRetractLocation().getBlock(); + if (prot.checkProtectionItems(AntiBuildConfig.blacklist_piston, block.getTypeId())) + { + event.setCancelled(true); + return; + } + } + + @EventHandler(priority = EventPriority.LOW) + public void onPlayerInteract(final PlayerInteractEvent event) + { + // Do not return if cancelled, because the interact event has 2 cancelled states. + final User user = ess.getUser(event.getPlayer()); + final ItemStack item = event.getItem(); + + if (item != null + && prot.checkProtectionItems(AntiBuildConfig.blacklist_usage, item.getTypeId()) + && !user.isAuthorized("essentials.protect.exemptusage")) + { + if (ess.getSettings().warnOnBuildDisallow()) + { + user.sendMessage(_("antiBuildUse", item.getType().toString())); + } + event.setCancelled(true); + return; + } + + if (item != null + && prot.checkProtectionItems(AntiBuildConfig.alert_on_use, item.getTypeId()) + && !user.isAuthorized("essentials.protect.alerts.notrigger")) + { + prot.getEssentialsConnect().alert(user, item.getType().toString(), _("alertUsed")); + } + + if (prot.getSettingBool(AntiBuildConfig.disable_use) && !user.canBuild() && !user.isAuthorized("essentials.build")) + { + if (event.hasItem() && !metaPermCheck(user, "interact", item.getTypeId(), item.getData().getData())) + { + event.setCancelled(true); + if (ess.getSettings().warnOnBuildDisallow()) + { + user.sendMessage(_("antiBuildUse", item.getType().toString())); + } + return; + } + if (event.hasBlock() && !metaPermCheck(user, "interact", event.getClickedBlock())) + { + event.setCancelled(true); + if (ess.getSettings().warnOnBuildDisallow()) + { + user.sendMessage(_("antiBuildInteract", event.getClickedBlock().getType().toString())); + } + } + } + } +} diff --git a/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsConnect.java b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsConnect.java new file mode 100644 index 000000000..c25898f78 --- /dev/null +++ b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsConnect.java @@ -0,0 +1,80 @@ +package com.earth2me.essentials.antibuild; + +import com.earth2me.essentials.IConf; +import com.earth2me.essentials.IEssentials; +import com.earth2me.essentials.User; +import static com.earth2me.essentials.I18n._; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.plugin.Plugin; + + +public class EssentialsConnect +{ + private static final Logger LOGGER = Logger.getLogger("Minecraft"); + private final transient IEssentials ess; + private final transient IAntiBuild protect; + + public EssentialsConnect(Plugin essPlugin, Plugin essProtect) + { + if (!essProtect.getDescription().getVersion().equals(essPlugin.getDescription().getVersion())) + { + LOGGER.log(Level.WARNING, _("versionMismatchAll")); + } + ess = (IEssentials)essPlugin; + protect = (IAntiBuild)essProtect; + AntiBuildReloader pr = new AntiBuildReloader(); + pr.reloadConfig(); + ess.addReloadListener(pr); + } + + public void onDisable() + { + } + + public IEssentials getEssentials() + { + return ess; + } + + public void alert(final User user, final String item, final String type) + { + final Location loc = user.getLocation(); + final String warnMessage = _("alertFormat", user.getName(), type, item, + loc.getWorld().getName() + "," + loc.getBlockX() + "," + + loc.getBlockY() + "," + loc.getBlockZ()); + LOGGER.log(Level.WARNING, warnMessage); + for (Player p : ess.getServer().getOnlinePlayers()) + { + final User alertUser = ess.getUser(p); + if (alertUser.isAuthorized("essentials.protect.alerts")) + { + alertUser.sendMessage(warnMessage); + } + } + } + + + private class AntiBuildReloader implements IConf + { + @Override + public void reloadConfig() + { + for (AntiBuildConfig protectConfig : AntiBuildConfig.values()) + { + if (protectConfig.isList()) + { + protect.getSettingsList().put(protectConfig, ess.getSettings().getProtectList(protectConfig.getConfigName())); + } + else + { + protect.getSettingsBoolean().put(protectConfig, ess.getSettings().getProtectBoolean(protectConfig.getConfigName(), protectConfig.getDefaultValueBoolean())); + } + + } + + } + } +} diff --git a/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/IAntiBuild.java b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/IAntiBuild.java new file mode 100644 index 000000000..c7b370006 --- /dev/null +++ b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/IAntiBuild.java @@ -0,0 +1,19 @@ +package com.earth2me.essentials.antibuild; + +import java.util.List; +import java.util.Map; +import org.bukkit.plugin.Plugin; + + +public interface IAntiBuild extends Plugin +{ + boolean checkProtectionItems(final AntiBuildConfig list, final int id); + + boolean getSettingBool(final AntiBuildConfig protectConfig); + + EssentialsConnect getEssentialsConnect(); + + Map<AntiBuildConfig, Boolean> getSettingsBoolean(); + + Map<AntiBuildConfig, List<Integer>> getSettingsList(); +} diff --git a/EssentialsAntiBuild/src/plugin.yml b/EssentialsAntiBuild/src/plugin.yml new file mode 100644 index 000000000..ea880af14 --- /dev/null +++ b/EssentialsAntiBuild/src/plugin.yml @@ -0,0 +1,9 @@ +# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) +name: EssentialsAntiBuild +main: com.earth2me.essentials.antibuild.EssentialsAntiBuild +# 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 build protection. +authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits] +softdepend: [Essentials]
\ No newline at end of file diff --git a/EssentialsChat/nbproject/build-impl.xml b/EssentialsChat/nbproject/build-impl.xml index 80a5b5256..2718ae609 100644 --- a/EssentialsChat/nbproject/build-impl.xml +++ b/EssentialsChat/nbproject/build-impl.xml @@ -12,9 +12,9 @@ is divided into following sections: - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup @@ -181,6 +181,7 @@ is divided into following sections: </and> </condition> <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> <property name="javac.compilerargs" value=""/> <property name="work.dir" value="${basedir}"/> <condition property="no.deps"> @@ -225,6 +226,27 @@ is divided into following sections: <property name="jar.index.metainf" value="${jar.index}"/> <property name="copylibs.rebase" value="true"/> <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> @@ -357,11 +379,52 @@ is divided into following sections: </sequential> </macrodef> </target> - <target name="-init-macrodef-junit"> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> <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}"> @@ -370,32 +433,270 @@ is divided into following sections: <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}"/> + <customize/> </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"> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsChat" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename EssentialsChat -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> <macrodef name="resolve"> <attribute name="name"/> <attribute name="value"/> @@ -427,10 +728,13 @@ is divided into following sections: </sequential> </macrodef> </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" 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> + <!-- + end of pre NB7.2 profiling section + --> <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"/> @@ -488,6 +792,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -504,6 +809,7 @@ is divided into following sections: <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> <attribute default="${main.class}" name="classname"/> <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> <element name="customize" optional="true"/> <sequential> <java classname="@{classname}" dir="${work.dir}" fork="true"> @@ -511,6 +817,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -537,6 +844,9 @@ is divided into following sections: <path path="${run.classpath.without.build.classes.dir}"/> <chainedmapper> <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> <globmapper from="*" to="lib/*"/> </chainedmapper> </pathconvert> @@ -582,7 +892,7 @@ is divided into following sections: <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"/> + <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-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> <!-- =================== COMPILATION SECTION @@ -805,7 +1115,11 @@ is divided into following sections: PROFILING SECTION ================= --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -813,8 +1127,9 @@ is divided into following sections: </nbprofiledirect> <profile/> </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -822,12 +1137,8 @@ is divided into following sections: </nbprofiledirect> <profile classname="${profile.class}"/> </target> - <!-- - ========================= - APPLET PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -839,12 +1150,8 @@ is divided into following sections: </customize> </profile> </target> - <!-- - ========================= - TESTS PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.test.classpath}"/> @@ -867,6 +1174,42 @@ is divided into following sections: </junit> </target> <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- =============== JAVADOC SECTION =============== @@ -909,7 +1252,7 @@ is divided into following sections: <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- ========================= - JUNIT COMPILATION SECTION + TEST COMPILATION SECTION ========================= --> <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> @@ -952,14 +1295,14 @@ is divided into following sections: <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 + TEST 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"/> + <j2seproject3:test 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> @@ -972,39 +1315,40 @@ is divided into following sections: </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}"/> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${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"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <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-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> <!-- ======================= - JUNIT DEBUGGING SECTION + TEST DEBUGGING SECTION ======================= --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <target depends="init,compile-test-single,-pre-test-run-single" 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> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> </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,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> <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> @@ -1076,9 +1420,12 @@ is divided into following sections: <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> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> </condition> </target> <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> diff --git a/EssentialsChat/nbproject/genfiles.properties b/EssentialsChat/nbproject/genfiles.properties index 98d505913..8f6e6c76c 100644 --- a/EssentialsChat/nbproject/genfiles.properties +++ b/EssentialsChat/nbproject/genfiles.properties @@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.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=7c7f517b -nbproject/build-impl.xml.script.CRC32=52184b61 -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 +nbproject/build-impl.xml.script.CRC32=9ec3d353 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java index 436bb55e5..f16579a4d 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java @@ -2,12 +2,13 @@ package com.earth2me.essentials.chat; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentSkipListMap; import java.util.logging.Level; import java.util.logging.Logger; -import org.bukkit.event.player.PlayerChatEvent; +import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; @@ -33,7 +34,7 @@ public class EssentialsChat extends JavaPlugin } chatListener = new ConcurrentSkipListMap<String, IEssentialsChatListener>(); - final Map<PlayerChatEvent, ChatStore> chatStore = new HashMap<PlayerChatEvent, ChatStore>(); + final Map<AsyncPlayerChatEvent, ChatStore> chatStore = Collections.synchronizedMap(new HashMap<AsyncPlayerChatEvent, ChatStore>()); final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, chatListener, chatStore); diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java index ddf928725..bc6b27aea 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java @@ -6,13 +6,14 @@ import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import java.util.Map; +import java.util.logging.Level; 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.Listener; -import org.bukkit.event.player.PlayerChatEvent; +import org.bukkit.event.player.AsyncPlayerChatEvent; //TODO: Translate the local/spy tags public abstract class EssentialsChatPlayer implements Listener @@ -21,12 +22,12 @@ public abstract class EssentialsChatPlayer implements Listener protected final static Logger logger = Logger.getLogger("Minecraft"); protected final transient Map<String, IEssentialsChatListener> listeners; protected final transient Server server; - protected final transient Map<PlayerChatEvent, ChatStore> chatStorage; + protected final transient Map<AsyncPlayerChatEvent, ChatStore> chatStorage; public EssentialsChatPlayer(final Server server, final IEssentials ess, final Map<String, IEssentialsChatListener> listeners, - final Map<PlayerChatEvent, ChatStore> chatStorage) + final Map<AsyncPlayerChatEvent, ChatStore> chatStorage) { this.ess = ess; this.listeners = listeners; @@ -34,21 +35,38 @@ public abstract class EssentialsChatPlayer implements Listener this.chatStorage = chatStorage; } - public void onPlayerChat(final PlayerChatEvent event) + public void onPlayerChat(final AsyncPlayerChatEvent event) { } - public boolean isAborted(final PlayerChatEvent event) + public boolean isAborted(final AsyncPlayerChatEvent event) { if (event.isCancelled()) { return true; } - for (IEssentialsChatListener listener : listeners.values()) + synchronized (listeners) { - if (listener.shouldHandleThisChat(event)) + for (Map.Entry<String, IEssentialsChatListener> listener : listeners.entrySet()) { - return true; + try + { + if (listener.getValue().shouldHandleThisChat(event)) + { + return true; + } + } + catch (Throwable t) + { + if (ess.getSettings().isDebug()) + { + logger.log(Level.WARNING, "Error with EssentialsChat listener of " + listener.getKey() + ": " + t.getMessage(), t); + } + else + { + logger.log(Level.WARNING, "Error with EssentialsChat listener of " + listener.getKey() + ": " + t.getMessage()); + } + } } } return false; @@ -62,22 +80,24 @@ public abstract class EssentialsChatPlayer implements Listener return "shout"; case '?': return "question"; + //case '@': + //return "admin"; default: return ""; } } - public ChatStore getChatStore(final PlayerChatEvent event) + public ChatStore getChatStore(final AsyncPlayerChatEvent event) { return chatStorage.get(event); } - public void setChatStore(final PlayerChatEvent event, final ChatStore chatStore) + public void setChatStore(final AsyncPlayerChatEvent event, final ChatStore chatStore) { chatStorage.put(event, chatStore); } - public ChatStore delChatStore(final PlayerChatEvent event) + public ChatStore delChatStore(final AsyncPlayerChatEvent event) { return chatStorage.remove(event); } @@ -87,7 +107,7 @@ public abstract class EssentialsChatPlayer implements Listener charge.charge(user); } - protected boolean charge(final PlayerChatEvent event, final ChatStore chatStore) + protected boolean charge(final AsyncPlayerChatEvent event, final ChatStore chatStore) { try { @@ -102,7 +122,7 @@ public abstract class EssentialsChatPlayer implements Listener return true; } - protected void sendLocalChat(final PlayerChatEvent event, final ChatStore chatStore) + protected void sendLocalChat(final AsyncPlayerChatEvent event, final ChatStore chatStore) { event.setCancelled(true); final User sender = chatStore.getUser(); @@ -119,21 +139,27 @@ public abstract class EssentialsChatPlayer implements Listener { String type = _("chatTypeLocal"); final User onlineUser = ess.getUser(onlinePlayer); - //TODO: remove reference to op - if (onlineUser.isIgnoredPlayer(sender.getName()) && !sender.isOp()) + if (onlineUser.isIgnoredPlayer(sender)) { continue; } if (!onlineUser.equals(sender)) { + boolean abort = false; final Location playerLoc = onlineUser.getLocation(); if (playerLoc.getWorld() != world) { - continue; + abort = true; } - final double delta = playerLoc.distanceSquared(loc); - - if (delta > chatStore.getRadius()) + else + { + final double delta = playerLoc.distanceSquared(loc); + if (delta > chatStore.getRadius()) + { + abort = true; + } + } + if (abort) { if (onlineUser.isAuthorized("essentials.chat.spy")) { @@ -146,10 +172,27 @@ public abstract class EssentialsChatPlayer implements Listener } } - String message = String.format(event.getFormat(), type.concat(sender.getDisplayName()), event.getMessage()); - for (IEssentialsChatListener listener : listeners.values()) + String message = type.concat(String.format(event.getFormat(), sender.getDisplayName(), event.getMessage())); + synchronized (listeners) { - message = listener.modifyMessage(event, onlinePlayer, message); + for (Map.Entry<String, IEssentialsChatListener> listener : listeners.entrySet()) + { + try + { + message = listener.getValue().modifyMessage(event, onlinePlayer, message); + } + catch (Throwable t) + { + if (ess.getSettings().isDebug()) + { + logger.log(Level.WARNING, "Error with EssentialsChat listener of " + listener.getKey() + ": " + t.getMessage(), t); + } + else + { + logger.log(Level.WARNING, "Error with EssentialsChat listener of " + listener.getKey() + ": " + t.getMessage()); + } + } + } } onlineUser.sendMessage(message); } diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java index e8f785228..db728bd09 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java @@ -5,7 +5,7 @@ import java.util.Map; import org.bukkit.Server; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; -import org.bukkit.event.player.PlayerChatEvent; +import org.bukkit.event.player.AsyncPlayerChatEvent; public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer @@ -13,14 +13,14 @@ public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer public EssentialsChatPlayerListenerHighest(final Server server, final IEssentials ess, final Map<String, IEssentialsChatListener> listeners, - final Map<PlayerChatEvent, ChatStore> chatStorage) + final Map<AsyncPlayerChatEvent, ChatStore> chatStorage) { super(server, ess, listeners, chatStorage); } @EventHandler(priority = EventPriority.HIGHEST) @Override - public void onPlayerChat(final PlayerChatEvent event) + public void onPlayerChat(final AsyncPlayerChatEvent event) { final ChatStore chatStore = delChatStore(event); if (isAborted(event)) diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java index 599c39dda..410dc3b3b 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java @@ -3,12 +3,13 @@ package com.earth2me.essentials.chat; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; +import java.text.MessageFormat; import java.util.Locale; import java.util.Map; import org.bukkit.Server; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; -import org.bukkit.event.player.PlayerChatEvent; +import org.bukkit.event.player.AsyncPlayerChatEvent; public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer @@ -16,14 +17,14 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer public EssentialsChatPlayerListenerLowest(final Server server, final IEssentials ess, final Map<String, IEssentialsChatListener> listeners, - final Map<PlayerChatEvent, ChatStore> chatStorage) + final Map<AsyncPlayerChatEvent, ChatStore> chatStorage) { super(server, ess, listeners, chatStorage); } @EventHandler(priority = EventPriority.LOWEST) @Override - public void onPlayerChat(final PlayerChatEvent event) + public void onPlayerChat(final AsyncPlayerChatEvent event) { if (isAborted(event)) { @@ -40,9 +41,13 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer event.setMessage(Util.formatMessage(user, "essentials.chat", event.getMessage())); String group = user.getGroup(); String world = user.getWorld().getName(); - event.setFormat(ess.getSettings().getChatFormat(group).format(new Object[] - { - group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH) - })); + MessageFormat format = ess.getSettings().getChatFormat(group); + synchronized (format) + { + event.setFormat(format.format(new Object[] + { + group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH) + })); + } } } diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java index fdaccdc8d..910518302 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java @@ -8,7 +8,7 @@ import java.util.Map; import org.bukkit.Server; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; -import org.bukkit.event.player.PlayerChatEvent; +import org.bukkit.event.player.AsyncPlayerChatEvent; public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer @@ -16,14 +16,14 @@ public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer public EssentialsChatPlayerListenerNormal(final Server server, final IEssentials ess, final Map<String, IEssentialsChatListener> listeners, - final Map<PlayerChatEvent, ChatStore> chatStorage) + final Map<AsyncPlayerChatEvent, ChatStore> chatStorage) { super(server, ess, listeners, chatStorage); } @EventHandler(priority = EventPriority.NORMAL) @Override - public void onPlayerChat(final PlayerChatEvent event) + public void onPlayerChat(final AsyncPlayerChatEvent event) { if (isAborted(event)) { diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/IEssentialsChatListener.java b/EssentialsChat/src/com/earth2me/essentials/chat/IEssentialsChatListener.java index 5c9c5c219..abf5893ea 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/IEssentialsChatListener.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/IEssentialsChatListener.java @@ -1,12 +1,12 @@ package com.earth2me.essentials.chat; import org.bukkit.entity.Player; -import org.bukkit.event.player.PlayerChatEvent; +import org.bukkit.event.player.AsyncPlayerChatEvent; public interface IEssentialsChatListener { - boolean shouldHandleThisChat(PlayerChatEvent event); + boolean shouldHandleThisChat(AsyncPlayerChatEvent event); - String modifyMessage(PlayerChatEvent event, Player target, String message); + String modifyMessage(AsyncPlayerChatEvent event, Player target, String message); } diff --git a/EssentialsChat/src/plugin.yml b/EssentialsChat/src/plugin.yml index af0ed0c13..b75ab8ecc 100644 --- a/EssentialsChat/src/plugin.yml +++ b/EssentialsChat/src/plugin.yml @@ -5,6 +5,6 @@ main: com.earth2me.essentials.chat.EssentialsChat version: TeamCity website: http://tiny.cc/EssentialsCommands description: Provides chat control features for Essentials. Requires Permissions. -authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Okamosy] +authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Okamosy, Iaccidentally] depend: [Essentials] #softdepend: [Factions]
\ No newline at end of file diff --git a/EssentialsGeoIP/nbproject/build-impl.xml b/EssentialsGeoIP/nbproject/build-impl.xml index 4b4feb8d8..13f9bde1f 100644 --- a/EssentialsGeoIP/nbproject/build-impl.xml +++ b/EssentialsGeoIP/nbproject/build-impl.xml @@ -12,9 +12,9 @@ is divided into following sections: - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup @@ -181,6 +181,7 @@ is divided into following sections: </and> </condition> <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> <property name="javac.compilerargs" value=""/> <property name="work.dir" value="${basedir}"/> <condition property="no.deps"> @@ -225,6 +226,27 @@ is divided into following sections: <property name="jar.index.metainf" value="${jar.index}"/> <property name="copylibs.rebase" value="true"/> <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> @@ -357,11 +379,52 @@ is divided into following sections: </sequential> </macrodef> </target> - <target name="-init-macrodef-junit"> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> <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}"> @@ -370,32 +433,270 @@ is divided into following sections: <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}"/> + <customize/> </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"> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsGeoIP" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename EssentialsGeoIP -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> <macrodef name="resolve"> <attribute name="name"/> <attribute name="value"/> @@ -427,10 +728,13 @@ is divided into following sections: </sequential> </macrodef> </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" 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> + <!-- + end of pre NB7.2 profiling section + --> <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"/> @@ -488,6 +792,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -504,6 +809,7 @@ is divided into following sections: <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> <attribute default="${main.class}" name="classname"/> <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> <element name="customize" optional="true"/> <sequential> <java classname="@{classname}" dir="${work.dir}" fork="true"> @@ -511,6 +817,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -537,6 +844,9 @@ is divided into following sections: <path path="${run.classpath.without.build.classes.dir}"/> <chainedmapper> <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> <globmapper from="*" to="lib/*"/> </chainedmapper> </pathconvert> @@ -582,7 +892,7 @@ is divided into following sections: <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"/> + <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-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> <!-- =================== COMPILATION SECTION @@ -805,7 +1115,11 @@ is divided into following sections: PROFILING SECTION ================= --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -813,8 +1127,9 @@ is divided into following sections: </nbprofiledirect> <profile/> </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -822,12 +1137,8 @@ is divided into following sections: </nbprofiledirect> <profile classname="${profile.class}"/> </target> - <!-- - ========================= - APPLET PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -839,12 +1150,8 @@ is divided into following sections: </customize> </profile> </target> - <!-- - ========================= - TESTS PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.test.classpath}"/> @@ -867,6 +1174,42 @@ is divided into following sections: </junit> </target> <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- =============== JAVADOC SECTION =============== @@ -909,7 +1252,7 @@ is divided into following sections: <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- ========================= - JUNIT COMPILATION SECTION + TEST COMPILATION SECTION ========================= --> <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> @@ -952,14 +1295,14 @@ is divided into following sections: <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 + TEST 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"/> + <j2seproject3:test 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> @@ -972,39 +1315,40 @@ is divided into following sections: </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}"/> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${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"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <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-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> <!-- ======================= - JUNIT DEBUGGING SECTION + TEST DEBUGGING SECTION ======================= --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <target depends="init,compile-test-single,-pre-test-run-single" 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> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> </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,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> <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> @@ -1076,9 +1420,12 @@ is divided into following sections: <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> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> </condition> </target> <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> diff --git a/EssentialsGeoIP/nbproject/genfiles.properties b/EssentialsGeoIP/nbproject/genfiles.properties index 59191ffde..2aab27202 100644 --- a/EssentialsGeoIP/nbproject/genfiles.properties +++ b/EssentialsGeoIP/nbproject/genfiles.properties @@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.44.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=cbf94f59 -nbproject/build-impl.xml.script.CRC32=db2bb7a7 -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 +nbproject/build-impl.xml.script.CRC32=af872325 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java index 0018d09b4..ab72cfa9f 100644 --- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java +++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java @@ -45,7 +45,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IConf public void onPlayerJoin(PlayerJoinEvent event) { User u = ess.getUser(event.getPlayer()); - if (u.isAuthorized("essentials.geoip.hide")) + if (u.isAuthorized("essentials.geoip.hide") || event.getPlayer().getAddress() == null) { return; } diff --git a/EssentialsGroupBridge/nbproject/build-impl.xml b/EssentialsGroupBridge/nbproject/build-impl.xml index 97400aa02..052fd5da3 100644 --- a/EssentialsGroupBridge/nbproject/build-impl.xml +++ b/EssentialsGroupBridge/nbproject/build-impl.xml @@ -12,9 +12,9 @@ is divided into following sections: - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup @@ -156,6 +156,7 @@ is divided into following sections: </and> </condition> <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> <property name="javac.compilerargs" value=""/> <property name="work.dir" value="${basedir}"/> <condition property="no.deps"> @@ -200,6 +201,27 @@ is divided into following sections: <property name="jar.index.metainf" value="${jar.index}"/> <property name="copylibs.rebase" value="true"/> <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> @@ -332,11 +354,52 @@ is divided into following sections: </sequential> </macrodef> </target> - <target name="-init-macrodef-junit"> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> <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}"> @@ -345,32 +408,270 @@ is divided into following sections: <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}"/> + <customize/> </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"> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsGroupBridge" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename EssentialsGroupBridge -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> <macrodef name="resolve"> <attribute name="name"/> <attribute name="value"/> @@ -402,10 +703,13 @@ is divided into following sections: </sequential> </macrodef> </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" 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> + <!-- + end of pre NB7.2 profiling section + --> <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"/> @@ -463,6 +767,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -479,6 +784,7 @@ is divided into following sections: <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> <attribute default="${main.class}" name="classname"/> <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> <element name="customize" optional="true"/> <sequential> <java classname="@{classname}" dir="${work.dir}" fork="true"> @@ -486,6 +792,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -512,6 +819,9 @@ is divided into following sections: <path path="${run.classpath.without.build.classes.dir}"/> <chainedmapper> <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> <globmapper from="*" to="lib/*"/> </chainedmapper> </pathconvert> @@ -557,7 +867,7 @@ is divided into following sections: <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-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"/> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> <!-- =================== COMPILATION SECTION @@ -780,7 +1090,11 @@ is divided into following sections: PROFILING SECTION ================= --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -788,8 +1102,9 @@ is divided into following sections: </nbprofiledirect> <profile/> </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -797,12 +1112,8 @@ is divided into following sections: </nbprofiledirect> <profile classname="${profile.class}"/> </target> - <!-- - ========================= - APPLET PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -814,12 +1125,8 @@ is divided into following sections: </customize> </profile> </target> - <!-- - ========================= - TESTS PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.test.classpath}"/> @@ -842,6 +1149,42 @@ is divided into following sections: </junit> </target> <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- =============== JAVADOC SECTION =============== @@ -884,7 +1227,7 @@ is divided into following sections: <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- ========================= - JUNIT COMPILATION SECTION + TEST COMPILATION SECTION ========================= --> <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> @@ -927,14 +1270,14 @@ is divided into following sections: <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 + TEST 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"/> + <j2seproject3:test 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> @@ -947,39 +1290,40 @@ is divided into following sections: </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}"/> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${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"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <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-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> <!-- ======================= - JUNIT DEBUGGING SECTION + TEST DEBUGGING SECTION ======================= --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <target depends="init,compile-test-single,-pre-test-run-single" 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> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> </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,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> <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> @@ -1051,9 +1395,12 @@ is divided into following sections: <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> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> </condition> </target> <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> diff --git a/EssentialsGroupBridge/nbproject/genfiles.properties b/EssentialsGroupBridge/nbproject/genfiles.properties index d862c9b42..cf2869f9f 100644 --- a/EssentialsGroupBridge/nbproject/genfiles.properties +++ b/EssentialsGroupBridge/nbproject/genfiles.properties @@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.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=475c8f4d -nbproject/build-impl.xml.script.CRC32=c7581402 -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 +nbproject/build-impl.xml.script.CRC32=09eb9643 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/EssentialsGroupManager/nbproject/build-impl.xml b/EssentialsGroupManager/nbproject/build-impl.xml index 8939aa2fa..c0aa4cb1d 100644 --- a/EssentialsGroupManager/nbproject/build-impl.xml +++ b/EssentialsGroupManager/nbproject/build-impl.xml @@ -12,9 +12,9 @@ is divided into following sections: - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup @@ -156,6 +156,7 @@ is divided into following sections: </and> </condition> <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> <property name="javac.compilerargs" value=""/> <property name="work.dir" value="${basedir}"/> <condition property="no.deps"> @@ -200,6 +201,27 @@ is divided into following sections: <property name="jar.index.metainf" value="${jar.index}"/> <property name="copylibs.rebase" value="true"/> <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> @@ -332,11 +354,52 @@ is divided into following sections: </sequential> </macrodef> </target> - <target name="-init-macrodef-junit"> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> <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}"> @@ -345,32 +408,270 @@ is divided into following sections: <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}"/> + <customize/> </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"> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsGroupManager" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename EssentialsGroupManager -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> <macrodef name="resolve"> <attribute name="name"/> <attribute name="value"/> @@ -402,10 +703,13 @@ is divided into following sections: </sequential> </macrodef> </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" 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> + <!-- + end of pre NB7.2 profiling section + --> <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"/> @@ -463,6 +767,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -479,6 +784,7 @@ is divided into following sections: <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> <attribute default="${main.class}" name="classname"/> <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> <element name="customize" optional="true"/> <sequential> <java classname="@{classname}" dir="${work.dir}" fork="true"> @@ -486,6 +792,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -512,6 +819,9 @@ is divided into following sections: <path path="${run.classpath.without.build.classes.dir}"/> <chainedmapper> <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> <globmapper from="*" to="lib/*"/> </chainedmapper> </pathconvert> @@ -557,7 +867,7 @@ is divided into following sections: <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-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"/> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> <!-- =================== COMPILATION SECTION @@ -773,7 +1083,11 @@ is divided into following sections: PROFILING SECTION ================= --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -781,8 +1095,9 @@ is divided into following sections: </nbprofiledirect> <profile/> </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -790,12 +1105,8 @@ is divided into following sections: </nbprofiledirect> <profile classname="${profile.class}"/> </target> - <!-- - ========================= - APPLET PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -807,12 +1118,8 @@ is divided into following sections: </customize> </profile> </target> - <!-- - ========================= - TESTS PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.test.classpath}"/> @@ -835,6 +1142,42 @@ is divided into following sections: </junit> </target> <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- =============== JAVADOC SECTION =============== @@ -877,7 +1220,7 @@ is divided into following sections: <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- ========================= - JUNIT COMPILATION SECTION + TEST COMPILATION SECTION ========================= --> <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> @@ -920,14 +1263,14 @@ is divided into following sections: <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 + TEST 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"/> + <j2seproject3:test 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> @@ -940,39 +1283,40 @@ is divided into following sections: </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}"/> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${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"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <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-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> <!-- ======================= - JUNIT DEBUGGING SECTION + TEST DEBUGGING SECTION ======================= --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <target depends="init,compile-test-single,-pre-test-run-single" 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> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> </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,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> <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> @@ -1037,9 +1381,12 @@ is divided into following sections: <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> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> </condition> </target> <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> diff --git a/EssentialsGroupManager/nbproject/genfiles.properties b/EssentialsGroupManager/nbproject/genfiles.properties index d7341b85d..e05d95a66 100644 --- a/EssentialsGroupManager/nbproject/genfiles.properties +++ b/EssentialsGroupManager/nbproject/genfiles.properties @@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.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=a6709b83 -nbproject/build-impl.xml.script.CRC32=fe0fea25 -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 +nbproject/build-impl.xml.script.CRC32=3be9db7e +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/EssentialsGroupManager/src/globalgroups.yml b/EssentialsGroupManager/src/globalgroups.yml index aad503cdc..2027195e4 100644 --- a/EssentialsGroupManager/src/globalgroups.yml +++ b/EssentialsGroupManager/src/globalgroups.yml @@ -114,24 +114,35 @@ groups: - essentials.balance.others
- essentials.balancetop
- essentials.chat.color
+ - essentials.chat.format
- essentials.chat.shout
- essentials.chat.question
- essentials.compass
+ - essentials.delhome
- essentials.depth
+ - essentials.exp
+ - essentials.getpos
+ - essentials.hat
- essentials.home
- essentials.ignore
+ - essentials.itemdb
- essentials.kit
- essentials.kit.tools
- essentials.mail
- essentials.mail.send
- essentials.me
- essentials.msg
+ - essentials.msg.color
+ - essentials.msg.format
- essentials.nick
- essentials.pay
- essentials.ping
- essentials.powertool
+ - essentials.powertooltoggle
- essentials.protect
+ - essentials.seen
- essentials.sethome
+ - essentials.sethome.multiple
- essentials.signs.use.*
- essentials.signs.create.disposal
- essentials.signs.create.mail
@@ -153,15 +164,22 @@ groups: g:essentials_moderator:
permissions:
+ - -essentials.spawner.enderdragon
+ - essentials.afk.kickexempt
- essentials.ban
- essentials.ban.notify
- essentials.banip
- essentials.broadcast
+ - essentials.chat.url
+ - essentials.chat.magic
- essentials.clearinventory
- essentials.delwarp
- essentials.eco.loan
+ - essentials.exp.others
- essentials.ext
+ - essentials.fly
- essentials.getpos
+ - essentials.getpos.others
- essentials.helpop.recieve
- essentials.home.others
- essentials.invsee
@@ -170,13 +188,19 @@ groups: - essentials.kick
- essentials.kick.notify
- essentials.kill
+ - essentials.kit.*
+ - essentials.msg.magic
- essentials.mute
+ - essentials.nick.color
- essentials.nick.others
- essentials.realname
+ - essentials.seen.banreason
+ - essentials.seen.extra
- essentials.setwarp
- essentials.signs.create.*
- essentials.signs.break.*
- essentials.spawner
+ - essentials.spawner.*
- essentials.thunder
- essentials.time
- essentials.time.set
@@ -188,14 +212,19 @@ groups: - essentials.togglejail
- essentials.top
- essentials.tp
+ - essentials.tp.others
- essentials.tphere
- essentials.tppos
- essentials.tptoggle
- essentials.unban
- essentials.unbanip
+ - essentials.vanish
+ - essentials.warp.*
- essentials.weather
- essentials.whois
+ - essentials.workbench
- essentials.world
+ - essentials.world.*
g:essentials_admin:
permissions:
@@ -283,4 +312,4 @@ groups: permissions:
- vanish.silentjoin
- vanish.silentquit
- - vanish.silentchests
\ No newline at end of file + - vanish.silentchests
diff --git a/EssentialsProtect/nbproject/build-impl.xml b/EssentialsProtect/nbproject/build-impl.xml index 8cfd93877..19108f7b7 100644 --- a/EssentialsProtect/nbproject/build-impl.xml +++ b/EssentialsProtect/nbproject/build-impl.xml @@ -12,9 +12,9 @@ is divided into following sections: - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup @@ -181,6 +181,7 @@ is divided into following sections: </and> </condition> <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> <property name="javac.compilerargs" value=""/> <property name="work.dir" value="${basedir}"/> <condition property="no.deps"> @@ -225,6 +226,27 @@ is divided into following sections: <property name="jar.index.metainf" value="${jar.index}"/> <property name="copylibs.rebase" value="true"/> <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> @@ -357,11 +379,52 @@ is divided into following sections: </sequential> </macrodef> </target> - <target name="-init-macrodef-junit"> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> <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}"> @@ -370,32 +433,270 @@ is divided into following sections: <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}"/> + <customize/> </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"> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsProtect" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename EssentialsProtect -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> <macrodef name="resolve"> <attribute name="name"/> <attribute name="value"/> @@ -427,10 +728,13 @@ is divided into following sections: </sequential> </macrodef> </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" 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> + <!-- + end of pre NB7.2 profiling section + --> <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"/> @@ -488,6 +792,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -504,6 +809,7 @@ is divided into following sections: <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> <attribute default="${main.class}" name="classname"/> <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> <element name="customize" optional="true"/> <sequential> <java classname="@{classname}" dir="${work.dir}" fork="true"> @@ -511,6 +817,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -537,6 +844,9 @@ is divided into following sections: <path path="${run.classpath.without.build.classes.dir}"/> <chainedmapper> <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> <globmapper from="*" to="lib/*"/> </chainedmapper> </pathconvert> @@ -582,7 +892,7 @@ is divided into following sections: <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"/> + <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-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> <!-- =================== COMPILATION SECTION @@ -805,7 +1115,11 @@ is divided into following sections: PROFILING SECTION ================= --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -813,8 +1127,9 @@ is divided into following sections: </nbprofiledirect> <profile/> </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -822,12 +1137,8 @@ is divided into following sections: </nbprofiledirect> <profile classname="${profile.class}"/> </target> - <!-- - ========================= - APPLET PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -839,12 +1150,8 @@ is divided into following sections: </customize> </profile> </target> - <!-- - ========================= - TESTS PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.test.classpath}"/> @@ -867,6 +1174,42 @@ is divided into following sections: </junit> </target> <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- =============== JAVADOC SECTION =============== @@ -909,7 +1252,7 @@ is divided into following sections: <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- ========================= - JUNIT COMPILATION SECTION + TEST COMPILATION SECTION ========================= --> <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> @@ -952,14 +1295,14 @@ is divided into following sections: <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 + TEST 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"/> + <j2seproject3:test 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> @@ -972,39 +1315,40 @@ is divided into following sections: </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}"/> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${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"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <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-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> <!-- ======================= - JUNIT DEBUGGING SECTION + TEST DEBUGGING SECTION ======================= --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <target depends="init,compile-test-single,-pre-test-run-single" 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> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> </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,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> <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> @@ -1076,9 +1420,12 @@ is divided into following sections: <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> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> </condition> </target> <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> diff --git a/EssentialsProtect/nbproject/genfiles.properties b/EssentialsProtect/nbproject/genfiles.properties index fe9ffd1a1..94897cd6c 100644 --- a/EssentialsProtect/nbproject/genfiles.properties +++ b/EssentialsProtect/nbproject/genfiles.properties @@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.3.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=40644caa -nbproject/build-impl.xml.script.CRC32=cdb3fc6f -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 +nbproject/build-impl.xml.script.CRC32=eecff97a +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsConnect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsConnect.java index 7503c334c..e17264ca9 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsConnect.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsConnect.java @@ -2,7 +2,6 @@ package com.earth2me.essentials.protect; import com.earth2me.essentials.IConf; import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.User; import com.earth2me.essentials.protect.data.ProtectedBlockMemory; import com.earth2me.essentials.protect.data.ProtectedBlockMySQL; import com.earth2me.essentials.protect.data.ProtectedBlockSQLite; @@ -10,8 +9,6 @@ import java.beans.PropertyVetoException; import static com.earth2me.essentials.I18n._; import java.util.logging.Level; import java.util.logging.Logger; -import org.bukkit.Location; -import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; @@ -43,23 +40,6 @@ public class EssentialsConnect return ess; } - public void alert(final User user, final String item, final String type) - { - final Location loc = user.getLocation(); - final String warnMessage = _("alertFormat", user.getName(), type, item, - loc.getWorld().getName() + "," + loc.getBlockX() + "," - + loc.getBlockY() + "," + loc.getBlockZ()); - LOGGER.log(Level.WARNING, warnMessage); - for (Player p : ess.getServer().getOnlinePlayers()) - { - final User alertUser = ess.getUser(p); - if (alertUser.isAuthorized("essentials.protect.alerts")) - { - alertUser.sendMessage(warnMessage); - } - } - } - private class ProtectReloader implements IConf { diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java index 9c257662d..06dc03656 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java @@ -74,13 +74,6 @@ public class EssentialsProtect extends JavaPlugin implements IProtect } @Override - public boolean checkProtectionItems(final ProtectConfig list, final int id) - { - final List<Integer> itemList = settingsList.get(list); - return itemList != null && !itemList.isEmpty() && itemList.contains(id); - } - - @Override public IProtectedBlock getStorage() { return storage; diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java index 8e5e9cca8..bd760b0ec 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java @@ -1,6 +1,5 @@ package com.earth2me.essentials.protect; -import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; import com.earth2me.essentials.protect.data.IProtectedBlock; @@ -36,26 +35,9 @@ public class EssentialsProtectBlockListener implements Listener final User user = ess.getUser(event.getPlayer()); - if (prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild()) - { - event.setCancelled(true); - return; - } - final Block blockPlaced = event.getBlockPlaced(); final int id = blockPlaced.getTypeId(); - if (prot.checkProtectionItems(ProtectConfig.blacklist_placement, id) && !user.isAuthorized("essentials.protect.exemptplacement")) - { - event.setCancelled(true); - return; - } - - if (!user.hasPermission("essentials.protect.alerts.notrigger") - && prot.checkProtectionItems(ProtectConfig.alert_on_placement, id)) - { - prot.getEssentialsConnect().alert(user, blockPlaced.getType().toString(), _("alertPlaced")); - } final Block below = blockPlaced.getRelative(BlockFace.DOWN); if ((below.getType() == Material.RAILS || below.getType() == Material.POWERED_RAIL || below.getType() == Material.DETECTOR_RAIL) @@ -234,27 +216,11 @@ public class EssentialsProtectBlockListener implements Listener } 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 (prot.checkProtectionItems(ProtectConfig.blacklist_break, typeId) - && !user.isAuthorized("essentials.protect.exemptbreak")) - { - event.setCancelled(true); - return; - } final Material type = block.getType(); - if (!user.hasPermission("essentials.protect.alerts.notrigger") - && prot.checkProtectionItems(ProtectConfig.alert_on_break, typeId)) - { - prot.getEssentialsConnect().alert(user, type.toString(), _("alertBroke")); - } final IProtectedBlock storage = prot.getStorage(); if (user.isAuthorized("essentials.protect.admin")) @@ -333,11 +299,6 @@ public class EssentialsProtectBlockListener implements Listener } for (Block block : event.getBlocks()) { - if (prot.checkProtectionItems(ProtectConfig.blacklist_piston, block.getTypeId())) - { - event.setCancelled(true); - return; - } if ((block.getRelative(BlockFace.UP).getType() == Material.RAILS || block.getType() == Material.RAILS || block.getRelative(BlockFace.UP).getType() == Material.POWERED_RAIL @@ -385,11 +346,6 @@ public class EssentialsProtectBlockListener implements Listener return; } final Block block = event.getRetractLocation().getBlock(); - if (prot.checkProtectionItems(ProtectConfig.blacklist_piston, block.getTypeId())) - { - event.setCancelled(true); - return; - } if ((block.getRelative(BlockFace.UP).getType() == Material.RAILS || block.getType() == Material.RAILS || block.getRelative(BlockFace.UP).getType() == Material.POWERED_RAIL diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java index 1868e20c1..7e558eb81 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java @@ -194,7 +194,7 @@ public class EssentialsProtectEntityListener implements Listener @EventHandler(priority = EventPriority.HIGHEST) public void onEntityExplode(final EntityExplodeEvent event) { - if (event.isCancelled()) + if (event.isCancelled() || event.getEntity() == null) { return; } diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java index 6e515e56d..393376b6f 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java @@ -3,14 +3,12 @@ package com.earth2me.essentials.protect; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; -import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.inventory.ItemStack; public class EssentialsProtectPlayerListener implements Listener @@ -30,38 +28,6 @@ public class EssentialsProtectPlayerListener implements Listener // Do not return if cancelled, because the interact event has 2 cancelled states. final User user = ess.getUser(event.getPlayer()); - if (event.hasItem() - && (event.getItem().getType() == Material.WATER_BUCKET - || event.getItem().getType() == Material.LAVA_BUCKET) - && prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild()) - { - if (ess.getSettings().warnOnBuildDisallow()) - { - user.sendMessage(_("buildAlert")); - } - event.setCancelled(true); - return; - } - - if (prot.getSettingBool(ProtectConfig.disable_use) && !user.canBuild()) - { - if (ess.getSettings().warnOnBuildDisallow()) - { - user.sendMessage(_("buildAlert")); - } - event.setCancelled(true); - return; - } - - 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 (user.isAuthorized("essentials.protect.ownerinfo") && event.getAction() == Action.RIGHT_CLICK_BLOCK) { final StringBuilder stringBuilder = new StringBuilder(); @@ -82,11 +48,5 @@ public class EssentialsProtectPlayerListener implements Listener user.sendMessage(_("protectionOwner", ownerNames)); } } - if (item != null - && !user.hasPermission("essentials.protect.alerts.notrigger") - && prot.checkProtectionItems(ProtectConfig.alert_on_use, item.getTypeId())) - { - prot.getEssentialsConnect().alert(user, item.getType().toString(), _("alertUsed")); - } } } diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/IProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/IProtect.java index afcb6e8ce..b82481267 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/IProtect.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/IProtect.java @@ -8,8 +8,6 @@ import org.bukkit.plugin.Plugin; public interface IProtect extends Plugin { - boolean checkProtectionItems(final ProtectConfig list, final int id); - boolean getSettingBool(final ProtectConfig protectConfig); String getSettingString(final ProtectConfig protectConfig); diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java index bee8d0f4d..31141d7e7 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java @@ -10,8 +10,6 @@ public enum ProtectConfig memstore("protect.memstore", false), disable_contactdmg("protect.disable.contactdmg", false), disable_lavadmg("protect.disable.lavadmg", false), - disable_build("protect.disable.build", true), - disable_use("protect.disable.use", true), disable_pvp("protect.disable.pvp", false), disable_projectiles("protect.disable.projectiles", false), disable_fall("protect.disable.fall", false), @@ -47,14 +45,7 @@ public enum ProtectConfig protect_below_rails("protect.protect.block-below", true), protect_signs("protect.protect.signs", true), protect_against_signs("protect.protect.block-below", true), - enderdragon_fakeexplosions("protect.enderdragon-fakeexplosions", false), - 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"), - blacklist_piston("protect.blacklist.piston"); + enderdragon_fakeexplosions("protect.enderdragon-fakeexplosions", false); private final String configName; private final String defValueString; private final boolean defValueBoolean; diff --git a/EssentialsSpawn/nbproject/build-impl.xml b/EssentialsSpawn/nbproject/build-impl.xml index cf349590c..0164b4434 100644 --- a/EssentialsSpawn/nbproject/build-impl.xml +++ b/EssentialsSpawn/nbproject/build-impl.xml @@ -12,9 +12,9 @@ is divided into following sections: - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup @@ -181,6 +181,7 @@ is divided into following sections: </and> </condition> <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> <property name="javac.compilerargs" value=""/> <property name="work.dir" value="${basedir}"/> <condition property="no.deps"> @@ -225,6 +226,27 @@ is divided into following sections: <property name="jar.index.metainf" value="${jar.index}"/> <property name="copylibs.rebase" value="true"/> <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> @@ -357,11 +379,52 @@ is divided into following sections: </sequential> </macrodef> </target> - <target name="-init-macrodef-junit"> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> <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}"> @@ -370,32 +433,270 @@ is divided into following sections: <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}"/> + <customize/> </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"> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsSpawn" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename EssentialsSpawn -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> <macrodef name="resolve"> <attribute name="name"/> <attribute name="value"/> @@ -427,10 +728,13 @@ is divided into following sections: </sequential> </macrodef> </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" 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> + <!-- + end of pre NB7.2 profiling section + --> <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"/> @@ -488,6 +792,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -504,6 +809,7 @@ is divided into following sections: <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> <attribute default="${main.class}" name="classname"/> <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> <element name="customize" optional="true"/> <sequential> <java classname="@{classname}" dir="${work.dir}" fork="true"> @@ -511,6 +817,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -537,6 +844,9 @@ is divided into following sections: <path path="${run.classpath.without.build.classes.dir}"/> <chainedmapper> <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> <globmapper from="*" to="lib/*"/> </chainedmapper> </pathconvert> @@ -582,7 +892,7 @@ is divided into following sections: <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"/> + <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-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> <!-- =================== COMPILATION SECTION @@ -805,7 +1115,11 @@ is divided into following sections: PROFILING SECTION ================= --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -813,8 +1127,9 @@ is divided into following sections: </nbprofiledirect> <profile/> </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -822,12 +1137,8 @@ is divided into following sections: </nbprofiledirect> <profile classname="${profile.class}"/> </target> - <!-- - ========================= - APPLET PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -839,12 +1150,8 @@ is divided into following sections: </customize> </profile> </target> - <!-- - ========================= - TESTS PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.test.classpath}"/> @@ -867,6 +1174,42 @@ is divided into following sections: </junit> </target> <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- =============== JAVADOC SECTION =============== @@ -909,7 +1252,7 @@ is divided into following sections: <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- ========================= - JUNIT COMPILATION SECTION + TEST COMPILATION SECTION ========================= --> <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> @@ -952,14 +1295,14 @@ is divided into following sections: <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 + TEST 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"/> + <j2seproject3:test 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> @@ -972,39 +1315,40 @@ is divided into following sections: </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}"/> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${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"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <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-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> <!-- ======================= - JUNIT DEBUGGING SECTION + TEST DEBUGGING SECTION ======================= --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <target depends="init,compile-test-single,-pre-test-run-single" 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> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> </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,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> <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> @@ -1076,9 +1420,12 @@ is divided into following sections: <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> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> </condition> </target> <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> diff --git a/EssentialsSpawn/nbproject/genfiles.properties b/EssentialsSpawn/nbproject/genfiles.properties index 15d04622b..fea5f8449 100644 --- a/EssentialsSpawn/nbproject/genfiles.properties +++ b/EssentialsSpawn/nbproject/genfiles.properties @@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.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=e7b96939 -nbproject/build-impl.xml.script.CRC32=f45f4172 -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 +nbproject/build-impl.xml.script.CRC32=731b5e85 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/EssentialsSpawn/src/plugin.yml b/EssentialsSpawn/src/plugin.yml index 2c9fca434..21f77db78 100644 --- a/EssentialsSpawn/src/plugin.yml +++ b/EssentialsSpawn/src/plugin.yml @@ -11,6 +11,8 @@ commands: setspawn: description: Set the spawnpoint to your current position. usage: /<command> <group> + aliases: [esetspawn] spawn: description: Teleport to the spawnpoint. - usage: /<command> [player]
\ No newline at end of file + usage: /<command> [player] + aliases: [espawn]
\ No newline at end of file diff --git a/EssentialsUpdate/nbproject/genfiles.properties b/EssentialsUpdate/nbproject/genfiles.properties deleted file mode 100644 index 6e1d2aeac..000000000 --- a/EssentialsUpdate/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=fd4b98a9 -build.xml.script.CRC32=334f342d -build.xml.stylesheet.CRC32=28e38971@1.44.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=fd4b98a9 -nbproject/build-impl.xml.script.CRC32=94e69885 -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 diff --git a/EssentialsUpdate/nbproject/pmd.settings b/EssentialsUpdate/nbproject/pmd.settings deleted file mode 100644 index 6a34e356c..000000000 --- a/EssentialsUpdate/nbproject/pmd.settings +++ /dev/null @@ -1 +0,0 @@ -DoNotUseThreads diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/AbstractWorkListener.java b/EssentialsUpdate/src/com/earth2me/essentials/update/AbstractWorkListener.java deleted file mode 100644 index d2cbb8a64..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/AbstractWorkListener.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.earth2me.essentials.update; - -import org.bukkit.plugin.Plugin; - - -public abstract class AbstractWorkListener -{ - public AbstractWorkListener(final Plugin plugin, final VersionInfo newVersionInfo) - { - this.plugin = plugin; - this.newVersionInfo = newVersionInfo; - } - private final transient Plugin plugin; - private final transient VersionInfo newVersionInfo; - - public final void onWorkAbort() - { - onWorkAbort(null); - } - - public abstract void onWorkAbort(String message); - - public final void onWorkDone() - { - onWorkDone(null); - } - - public abstract void onWorkDone(String message); - - public VersionInfo getNewVersionInfo() - { - return newVersionInfo; - } - - public Plugin getPlugin() - { - return plugin; - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsHelp.java b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsHelp.java deleted file mode 100644 index 7dd46451a..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsHelp.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.earth2me.essentials.update; - -import com.earth2me.essentials.update.chat.*; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; -import org.bukkit.Server; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerChatEvent; -import org.bukkit.event.player.PlayerQuitEvent; -import org.bukkit.plugin.Plugin; -import org.bukkit.plugin.PluginManager; - - -public class EssentialsHelp implements Listener -{ - private transient Player chatUser; - private final transient Server server; - private final transient Plugin plugin; - private transient IrcBot ircBot; - private final transient Map<String, Command> commands = new HashMap<String, Command>(); - - public EssentialsHelp(final Plugin plugin) - { - super(); - this.plugin = plugin; - this.server = plugin.getServer(); - commands.put("!help", new HelpCommand()); - commands.put("!list", new ListCommand()); - commands.put("!startup", new StartupCommand(plugin)); - commands.put("!errors", new ErrorsCommand(plugin)); - commands.put("!config", new ConfigCommand(plugin)); - } - - public void registerEvents() - { - final PluginManager pluginManager = server.getPluginManager(); - pluginManager.registerEvents(this, plugin); - } - - public void onCommand(final CommandSender sender) - { - if (sender instanceof Player && sender.hasPermission("essentials.helpchat")) - { - if (chatUser == null) - { - chatUser = (Player)sender; - ircBot = null; - sender.sendMessage("You will be connected to the Essentials Help Chat."); - sender.sendMessage("All your chat messages will be forwarded to the channel. You can't chat with other players on your server while in help chat, but you can use commands."); - sender.sendMessage("Please be patient, if noone is available, check back later."); - sender.sendMessage("Type !help to get a list of all commands."); - sender.sendMessage("Type !quit to leave the channel."); - sender.sendMessage("Do you want to join the channel now? (yes/no)"); - } - if (!chatUser.equals(sender)) - { - sender.sendMessage("The player " + chatUser.getDisplayName() + " is already using the essentialshelp."); - } - } - else - { - sender.sendMessage("Please run the command as op from in game."); - } - } - - public void onDisable() - { - closeConnection(); - } - - private boolean sendChatMessage(final Player player, final String message) - { - final String messageCleaned = message.trim(); - if (messageCleaned.isEmpty()) - { - return false; - } - if (ircBot == null) - { - return handleAnswer(messageCleaned, player); - } - else - { - if (ircBot.isKicked()) - { - closeConnection(); - return false; - } - final String lowMessage = messageCleaned.toLowerCase(Locale.ENGLISH); - if (lowMessage.startsWith("!quit")) - { - closeConnection(); - player.sendMessage("Connection closed."); - return true; - } - if (!ircBot.isConnected() || ircBot.getChannels().length == 0) - { - return false; - } - if (handleCommands(lowMessage, player)) - { - return true; - } - ircBot.sendMessage(messageCleaned); - chatUser.sendMessage("ยง6" + ircBot.getNick() + ": ยง7" + messageCleaned); - return true; - } - } - - private void closeConnection() - { - chatUser = null; - if (ircBot != null) - { - ircBot.quit(); - ircBot = null; - } - } - - private boolean handleAnswer(final String message, final Player player) - { - if (message.equalsIgnoreCase("yes")) - { - player.sendMessage("Connecting..."); - connectToIRC(player); - return true; - } - if (message.equalsIgnoreCase("no") || message.equalsIgnoreCase("!quit")) - { - chatUser = null; - return true; - } - return false; - } - - private boolean handleCommands(final String lowMessage, final Player player) - { - final String[] parts = lowMessage.split(" "); - if (commands.containsKey(parts[0])) - { - commands.get(parts[0]).run(ircBot, player); - return true; - } - return false; - } - - private void connectToIRC(final Player player) - { - ircBot = new IrcBot(player, "Ess_" + player.getName(), UsernameUtil.createUsername(player)); - } - - @EventHandler - public void onPlayerChat(final PlayerChatEvent event) - { - if (event.getPlayer() == chatUser) - { - final boolean success = sendChatMessage(event.getPlayer(), event.getMessage()); - event.setCancelled(success); - } - } - - @EventHandler - public void onPlayerQuit(final PlayerQuitEvent event) - { - closeConnection(); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java deleted file mode 100644 index be6e42ce9..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.earth2me.essentials.update; - -import java.util.logging.Level; -import org.bukkit.Bukkit; -import org.bukkit.command.Command; -import org.bukkit.command.CommandSender; -import org.bukkit.plugin.java.JavaPlugin; - - -public class EssentialsUpdate extends JavaPlugin -{ - private transient EssentialsHelp essentialsHelp; - private transient UpdateProcess updateProcess; - - @Override - public void onEnable() - { - if (!getDataFolder().exists() && !getDataFolder().mkdirs()) - { - Bukkit.getLogger().log(Level.SEVERE, "Could not create data folder: {0}", getDataFolder().getPath()); - } - essentialsHelp = new EssentialsHelp(this); - essentialsHelp.registerEvents(); - - final UpdateCheck updateCheck = new UpdateCheck(this); - updateCheck.checkForUpdates(); - updateProcess = new UpdateProcess(this, updateCheck); - updateProcess.registerEvents(); - - Bukkit.getLogger().log(Level.INFO, "EssentialsUpdate {0} loaded.", getDescription().getVersion()); - - if (updateCheck.isEssentialsInstalled()) - { - updateCheck.scheduleUpdateTask(); - } - else - { - Bukkit.getLogger().info("Essentials is ready for installation. Join the game and follow the instructions."); - } - } - - @Override - public void onDisable() - { - essentialsHelp.onDisable(); - } - - @Override - public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) - { - if (command.getName().equalsIgnoreCase("essentialsupdate")) - { - updateProcess.onCommand(sender); - } - if (command.getName().equalsIgnoreCase("essentialshelp")) - { - essentialsHelp.onCommand(sender); - } - return true; - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/GetFile.java b/EssentialsUpdate/src/com/earth2me/essentials/update/GetFile.java deleted file mode 100644 index 06b414e93..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/GetFile.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.earth2me.essentials.update; - -import java.io.*; -import java.math.BigInteger; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.logging.Level; -import org.bukkit.Bukkit; - - -public class GetFile -{ - private transient URLConnection connection; - private transient MessageDigest digest; - - public GetFile(final String urlString) throws MalformedURLException, IOException - { - this(new URL(urlString)); - } - - public GetFile(final URL url) throws IOException - { - this.connection = url.openConnection(); - this.connection.setConnectTimeout(1000); - this.connection.setReadTimeout(5000); - this.connection.setUseCaches(false); - this.connection.connect(); - final int respCode = ((HttpURLConnection)this.connection).getResponseCode(); - if (respCode >= 300 && respCode < 400 && this.connection.getHeaderField("Location") != null) - { - connection.getInputStream().close(); - final URL redirect = new URL(this.connection.getHeaderField("Location")); - this.connection = redirect.openConnection(); - this.connection.setConnectTimeout(1000); - this.connection.setReadTimeout(5000); - this.connection.setUseCaches(false); - this.connection.connect(); - } - } - - public void saveTo(final File file) throws IOException - { - try - { - saveTo(file, null); - } - catch (NoSuchAlgorithmException ex) - { - throw new RuntimeException(ex); - } - } - - public void saveTo(final File file, final String key) throws IOException, NoSuchAlgorithmException - { - if (key != null) - { - digest = MessageDigest.getInstance("SHA256"); - } - final byte[] buffer = new byte[1024 * 8]; - boolean brokenFile = false; - final BufferedInputStream input = new BufferedInputStream(connection.getInputStream()); - try - { - final BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(file)); - try - { - int length; - do - { - length = input.read(buffer); - if (length >= 0) - { - if (key != null) - { - digest.update(buffer, 0, length); - } - output.write(buffer, 0, length); - } - } - while (length >= 0); - if (key != null) - { - final byte[] checksum = digest.digest(); - final String checksumString = new BigInteger(checksum).toString(36); - if (!checksumString.equals(key)) - { - brokenFile = true; - } - } - } - finally - { - output.close(); - } - if (brokenFile && !file.delete()) - { - Bukkit.getLogger().log(Level.SEVERE, "Could not delete file {0}", file.getPath()); - } - } - finally - { - input.close(); - } - if (brokenFile) - { - throw new IOException("Checksum check failed."); - } - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/ModuleInfo.java b/EssentialsUpdate/src/com/earth2me/essentials/update/ModuleInfo.java deleted file mode 100644 index 722fca3e1..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/ModuleInfo.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.earth2me.essentials.update; - -import java.net.MalformedURLException; -import java.net.URL; -import org.bukkit.configuration.Configuration; - - -public class ModuleInfo -{ - private final transient String url; - private final transient String version; - private final transient String hash; - - public ModuleInfo(final Configuration updateConfig, final String path) - { - url = updateConfig.getString(path + ".url", null); - version = updateConfig.getString(path + ".version", null); - hash = updateConfig.getString(path + ".hash", null); - } - - public URL getUrl() throws MalformedURLException - { - return new URL(url); - } - - public String getVersion() - { - return version; - } - - public String getHash() - { - return hash; - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/PastieUpload.java b/EssentialsUpdate/src/com/earth2me/essentials/update/PastieUpload.java deleted file mode 100644 index 6cad44e4d..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/PastieUpload.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.earth2me.essentials.update; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - - -public class PastieUpload -{ - private final transient PostToUrl connection; - - public PastieUpload() throws MalformedURLException - { - connection = new PostToUrl(new URL("http://pastie.org/pastes")); - } - - public String send(final String data) throws IOException - { - final Map<String, Object> map = new HashMap<String, Object>(); - map.put("paste[parser_id]", "19"); - map.put("paste[authorization]", "burger"); - map.put("paste[body]", data); - map.put("paste[restricted]", "1"); - final String html = connection.send(map); - final Matcher matcher = Pattern.compile("(?s).*\\?key=([a-z0-9]+).*").matcher(html); - if (matcher.matches()) - { - final String key = matcher.group(1); - return "http://pastie.org/private/" + key; - } - else - { - throw new IOException("Failed to upload to pastie.org"); - } - } -}
\ No newline at end of file diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/PostToUrl.java b/EssentialsUpdate/src/com/earth2me/essentials/update/PostToUrl.java deleted file mode 100644 index c8978961b..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/PostToUrl.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.earth2me.essentials.update; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.math.BigInteger; -import java.net.URL; -import java.net.URLConnection; -import java.nio.charset.Charset; -import java.util.Map; -import java.util.Random; - - -public class PostToUrl -{ - private final transient URL url; - private final transient String boundary; - private final transient Random random = new Random(); - private final static String CRLF = "\r\n"; - private final static Charset UTF8 = Charset.forName("utf-8"); - - public PostToUrl(final URL url) - { - this.url = url; - final byte[] bytes = new byte[32]; - random.nextBytes(bytes); - this.boundary = "----------" + new BigInteger(bytes).toString(Character.MAX_RADIX) + "_$"; - } - - public String send(final Map<String, Object> data) throws IOException - { - final URLConnection connection = url.openConnection(); - connection.setRequestProperty("content-type", "multipart/form-data; boundary=" + boundary); - final StringBuilder dataBuilder = new StringBuilder(); - for (Map.Entry<String, Object> entry : data.entrySet()) - { - if (entry.getValue() instanceof String) - { - dataBuilder.append("--").append(boundary).append(CRLF); - dataBuilder.append("Content-Disposition: form-data; name=\"").append(entry.getKey()).append('"').append(CRLF); - dataBuilder.append(CRLF); - dataBuilder.append(entry.getValue()).append(CRLF); - } - // TODO: Add support for file upload - } - dataBuilder.append("--").append(boundary).append("--").append(CRLF); - dataBuilder.append(CRLF); - connection.setDoOutput(true); - final byte[] message = dataBuilder.toString().getBytes(UTF8); - connection.setRequestProperty("content-length", Integer.toString(message.length)); - connection.connect(); - final OutputStream stream = connection.getOutputStream(); - stream.write(message); - stream.close(); - final BufferedReader page = new BufferedReader(new InputStreamReader(connection.getInputStream(), UTF8)); - final StringBuilder input = new StringBuilder(); - String line; - while ((line = page.readLine()) != null) - { - input.append(line).append("\n"); - } - page.close(); - return input.toString(); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateCheck.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateCheck.java deleted file mode 100644 index 29afc4d3f..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateCheck.java +++ /dev/null @@ -1,202 +0,0 @@ -package com.earth2me.essentials.update; - -import java.io.File; -import java.util.Map; -import java.util.Map.Entry; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.bukkit.Bukkit; -import org.bukkit.plugin.Plugin; -import org.bukkit.plugin.PluginManager; - - -public class UpdateCheck -{ - private transient CheckResult result = CheckResult.UNKNOWN; - private transient Version currentVersion; - private transient Version newVersion = null; - private transient int bukkitResult = 0; - private transient UpdateFile updateFile; - private final static int CHECK_INTERVAL = 20 * 60 * 60 * 6; - private final transient Plugin plugin; - private transient boolean essentialsInstalled; - - public UpdateCheck(final Plugin plugin) - { - this.plugin = plugin; - updateFile = new UpdateFile(plugin); - checkForEssentials(); - } - - private void checkForEssentials() - { - final PluginManager pluginManager = plugin.getServer().getPluginManager(); - final Plugin essentials = pluginManager.getPlugin("Essentials"); - essentialsInstalled = essentials != null; - if (essentialsInstalled) - { - currentVersion = new Version(essentials.getDescription().getVersion()); - } - else - { - if (new File(plugin.getDataFolder().getParentFile(), "Essentials.jar").exists()) - { - Bukkit.getLogger().severe("Essentials.jar found, but not recognized by Bukkit. Broken download?"); - } - } - } - - public void scheduleUpdateTask() - { - plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() - { - @Override - public void run() - { - updateFile = new UpdateFile(plugin); - checkForUpdates(); - } - }, CHECK_INTERVAL, CHECK_INTERVAL); - } - - public boolean isEssentialsInstalled() - { - return essentialsInstalled; - } - - public CheckResult getResult() - { - return result; - } - - public int getNewBukkitVersion() - { - return bukkitResult; - } - - public VersionInfo getNewVersionInfo() - { - return updateFile.getVersions().get(newVersion); - } - - - public enum CheckResult - { - NEW_ESS, NEW_ESS_BUKKIT, NEW_BUKKIT, OK, UNKNOWN - } - - public void checkForUpdates() - { - if (currentVersion == null) - { - return; - } - final Map<Version, VersionInfo> versions = updateFile.getVersions(); - final int bukkitVersion = getBukkitVersion(); - Version higher = null; - Version found = null; - Version lower = null; - int bukkitHigher = 0; - int bukkitLower = 0; - for (Entry<Version, VersionInfo> entry : versions.entrySet()) - { - final int minBukkit = entry.getValue().getMinBukkit(); - final int maxBukkit = entry.getValue().getMaxBukkit(); - if (minBukkit == 0 || maxBukkit == 0) - { - continue; - } - if (bukkitVersion <= maxBukkit) - { - if (bukkitVersion < minBukkit) - { - if (higher == null || higher.compareTo(entry.getKey()) < 0) - { - - higher = entry.getKey(); - bukkitHigher = minBukkit; - } - } - else - { - if (found == null || found.compareTo(entry.getKey()) < 0) - { - found = entry.getKey(); - } - } - } - else - { - if (lower == null || lower.compareTo(entry.getKey()) < 0) - { - lower = entry.getKey(); - bukkitLower = minBukkit; - } - } - } - if (found != null) - { - if (found.compareTo(currentVersion) > 0) - { - result = CheckResult.NEW_ESS; - newVersion = found; - } - else - { - result = CheckResult.OK; - } - } - else if (higher != null) - { - if (higher.compareTo(currentVersion) > 0) - { - newVersion = higher; - result = CheckResult.NEW_ESS_BUKKIT; - bukkitResult = bukkitHigher; - } - else if (higher.compareTo(currentVersion) < 0) - { - result = CheckResult.UNKNOWN; - } - else - { - result = CheckResult.NEW_BUKKIT; - bukkitResult = bukkitHigher; - } - } - else if (lower != null) - { - if (lower.compareTo(currentVersion) > 0) - { - result = CheckResult.NEW_ESS_BUKKIT; - newVersion = lower; - bukkitResult = bukkitLower; - } - else if (lower.compareTo(currentVersion) < 0) - { - result = CheckResult.UNKNOWN; - } - else - { - result = CheckResult.NEW_BUKKIT; - bukkitResult = bukkitLower; - } - } - - } - - private int getBukkitVersion() - { - final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-[0-9]+-[0-9a-z]+-b([0-9]+)jnks.*").matcher(plugin.getServer().getVersion()); - if (versionMatch.matches()) - { - return Integer.parseInt(versionMatch.group(4)); - } - throw new NumberFormatException("Bukkit Version changed!"); - } - - public Version getNewVersion() - { - return newVersion; - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java deleted file mode 100644 index 3d465e2e8..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java +++ /dev/null @@ -1,205 +0,0 @@ -package com.earth2me.essentials.update; - -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.math.BigInteger; -import java.security.KeyFactory; -import java.security.PublicKey; -import java.security.Signature; -import java.security.spec.X509EncodedKeySpec; -import java.util.Collections; -import java.util.Map; -import java.util.TreeMap; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.bukkit.Bukkit; -import org.bukkit.configuration.file.YamlConfiguration; -import org.bukkit.plugin.Plugin; - - -public class UpdateFile -{ - private final static Logger LOGGER = Bukkit.getLogger(); - private final static String UPDATE_URL = "http://goo.gl/67jev"; - private final static BigInteger PUBLIC_KEY = new BigInteger("5ha6a2d4qdy17ttkg8evh74sl5a87djojwenu12k1lvy8ui6003e6l06rntczpoh99mhc3txj8mqlxw111oyy9yl7s7qpyluyzix3j1odxrxx4u52gxvyu6qiteapczkzvi7rxgeqsozz7b19rdx73a7quo9ybwpz1cr82r7x5k0pg2a73pjjsv2j1awr13azo7klrcxp9y5xxwf5qv1s3tw4zqftli18u0ek5qkbzfbgk1v5n2f11pkwwk6p0mibrn26wnjbv11vyiqgu95o7busmt6vf5q7grpcenl637w83mbin56s3asj1131b2mscj9xep3cbj7la9tgsxl5bj87vzy8sk2d34kzwqdqgh9nry43nqqus12l1stmiv184r8r3jcy8w43e8h1u1mzklldb5eytkuhayqik8l3ns04hwt8sgacvw534be8sx26qrn5s1", 36); - private final transient File file; - private transient YamlConfiguration updateConfig; - private final transient Plugin plugin; - private final transient TreeMap<Version, VersionInfo> versions = new TreeMap<Version, VersionInfo>(); - - public UpdateFile(final Plugin plugin) - { - this.plugin = plugin; - final long lastUpdate = Long.parseLong(plugin.getConfig().getString("lastupdate", "0")); - file = new File(plugin.getDataFolder(), "update.yml"); - if (lastUpdate < System.currentTimeMillis() - 1000 * 60 * 60 * 6 || !file.exists()) - { - if (file.exists() && !file.delete()) - { - LOGGER.log(Level.SEVERE, "Could not delete file update.yml!"); - return; - } - if (!downloadFile() || !checkFile()) - { - LOGGER.log(Level.SEVERE, "Could not download and verify file update.yml!"); - return; - } - } - try - { - readVersions(); - } - catch (Exception ex) - { - LOGGER.log(Level.SEVERE, "Could not load update.yml!"); - return; - } - } - - private boolean downloadFile() - { - GetFile getFile; - try - { - getFile = new GetFile(UPDATE_URL); - getFile.saveTo(file); - plugin.getConfig().set("lastupdate", System.currentTimeMillis()); - plugin.getConfig().save(new File(plugin.getDataFolder(), "config.yml")); - return true; - } - catch (IOException ex) - { - LOGGER.log(Level.SEVERE, "Error while downloading update.yml", ex); - return false; - } - } - - private boolean checkFile() - { - BufferedInputStream bis = null; - try - { - bis = new BufferedInputStream(new FileInputStream(file)); - if (bis.read() != '#') - { - throw new IOException("File has to start with #"); - } - final StringBuilder length = new StringBuilder(); - final StringBuilder signature = new StringBuilder(); - boolean isSignature = false; - do - { - final int cur = bis.read(); - if (cur == -1) - { - break; - } - if (cur == ':') - { - isSignature = true; - } - else if (cur == '\n') - { - break; - } - else if ((cur >= '0' && cur <= '9') - || (cur >= 'a' && cur <= 'z')) - { - if (isSignature) - { - signature.append((char)cur); - } - else - { - length.append((char)cur); - } - } - else - { - throw new IOException("Illegal character in signature!"); - } - } - while (true); - if (length.length() == 0 || signature.length() == 0) - { - throw new IOException("Broken signature!"); - } - final int sigLength = new BigInteger(length.toString(), 36).intValue(); - if (sigLength < 0 || sigLength > 2048) - { - throw new IOException("Invalid signature length!"); - } - final byte[] sigBytes = new BigInteger(signature.toString(), 36).toByteArray(); - if (sigLength < sigBytes.length) - { - throw new IOException("Length is less then available bytes."); - } - byte[] realBytes; - if (sigLength == sigBytes.length) - { - realBytes = sigBytes; - } - else - { - realBytes = new byte[sigLength]; - System.arraycopy(sigBytes, 0, realBytes, sigLength - sigBytes.length, sigBytes.length); - } - final X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(PUBLIC_KEY.toByteArray()); - final KeyFactory keyFactory = KeyFactory.getInstance("RSA"); - final PublicKey pubKey = keyFactory.generatePublic(pubKeySpec); - final Signature rsa = Signature.getInstance("SHA256withRSA"); - rsa.initVerify(pubKey); - final byte[] buffer = new byte[2048]; - int readLength; - do - { - readLength = bis.read(buffer); - if (readLength >= 0) - { - rsa.update(buffer, 0, readLength); - } - } - while (readLength >= 0); - return rsa.verify(realBytes); - } - catch (Exception ex) - { - LOGGER.log(Level.SEVERE, ex.getMessage(), ex); - } - finally - { - try - { - if (bis != null) - { - bis.close(); - } - } - catch (IOException ex) - { - LOGGER.log(Level.SEVERE, ex.getMessage(), ex); - } - } - return false; - } - - private void readVersions() throws Exception - { - updateConfig = new YamlConfiguration(); - updateConfig.load(file); - versions.clear(); - for (String versionString : updateConfig.getKeys(false)) - { - final Version version = new Version(versionString); - final VersionInfo info = new VersionInfo(updateConfig, versionString); - versions.put(version, info); - } - } - - public Map<Version, VersionInfo> getVersions() - { - return Collections.unmodifiableMap(versions.descendingMap()); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java deleted file mode 100644 index 9fa587f8f..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java +++ /dev/null @@ -1,199 +0,0 @@ -package com.earth2me.essentials.update; - -import com.earth2me.essentials.update.states.InstallationFinishedEvent; -import com.earth2me.essentials.update.states.StateMachine; -import com.earth2me.essentials.update.tasks.SelfUpdate; -import java.util.logging.Level; -import org.bukkit.Bukkit; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerChatEvent; -import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.plugin.Plugin; - - -public class UpdateProcess implements Listener -{ - private transient Player currentPlayer; - private final transient Plugin plugin; - private final transient UpdateCheck updateCheck; - private transient StateMachine stateMachine; - - public UpdateProcess(final Plugin plugin, final UpdateCheck updateCheck) - { - super(); - this.plugin = plugin; - this.updateCheck = updateCheck; - } - - public void registerEvents() - { - plugin.getServer().getPluginManager().registerEvents(this, plugin); - } - - public boolean selfUpdate() - { - if (new Version(plugin.getDescription().getVersion()).compareTo(updateCheck.getNewVersion()) < 0) - { - if (currentPlayer != null) - { - currentPlayer.sendMessage("A newer version of EssentialsUpdate is found. Downloading new file and reloading server."); - } - Bukkit.getLogger().log(Level.INFO, "A newer version of EssentialsUpdate is found. Downloading new file and reloading server."); - new SelfUpdate(new AbstractWorkListener(plugin, updateCheck.getNewVersionInfo()) - { - @Override - public void onWorkAbort(final String message) - { - if (message != null && !message.isEmpty() - && UpdateProcess.this.currentPlayer != null - && UpdateProcess.this.currentPlayer.isOnline()) - { - UpdateProcess.this.currentPlayer.sendMessage(message); - } - if (message != null && !message.isEmpty()) - { - Bukkit.getLogger().log(Level.SEVERE, message); - } - UpdateProcess.this.currentPlayer = null; - } - - @Override - public void onWorkDone(final String message) - { - if (message != null && !message.isEmpty() - && UpdateProcess.this.currentPlayer != null - && UpdateProcess.this.currentPlayer.isOnline()) - { - UpdateProcess.this.currentPlayer.sendMessage(message); - } - if (message != null && !message.isEmpty()) - { - Bukkit.getLogger().log(Level.INFO, message); - } - UpdateProcess.this.currentPlayer = null; - } - }).start(); - return true; - } - if (updateCheck.getResult() == UpdateCheck.CheckResult.NEW_ESS_BUKKIT) - { - final String message = "Please update bukkit to version " + updateCheck.getNewBukkitVersion() + " before updating Essentials."; - if (currentPlayer != null) - { - currentPlayer.sendMessage(message); - } - Bukkit.getLogger().log(Level.INFO, message); - currentPlayer = null; - return true; - } - return false; - } - - @EventHandler - public void onInstallationFinished(final InstallationFinishedEvent event) - { - UpdateProcess.this.currentPlayer = null; - } - - @EventHandler(priority = EventPriority.LOWEST) - public void onPlayerChat(final PlayerChatEvent event) - { - if (event.getPlayer() == currentPlayer) - { - final StateMachine.MachineResult result = stateMachine.reactOnMessage(event.getMessage()); - if (result == StateMachine.MachineResult.ABORT) - { - currentPlayer.sendMessage("Installation wizard aborted. You can restart it using /essentialsupdate."); - currentPlayer = null; - } - if (result == StateMachine.MachineResult.DONE) - { - startWork(); - } - event.setCancelled(true); - return; - } - } - - @EventHandler - public void onPlayerJoin(final PlayerJoinEvent event) - { - final Player player = event.getPlayer(); - if (currentPlayer.getName().equals(player.getName())) - { - currentPlayer = player; - player.sendMessage("You quit the game, while the installation wizard was running."); - player.sendMessage("The installation wizard will now resume."); - player.sendMessage("You can exit the wizard by typing quit into the chat."); - stateMachine.resumeInstallation(player); - } - if (player.hasPermission("essentials.update") && !updateCheck.isEssentialsInstalled()) - { - player.sendMessage("Hello " + player.getDisplayName()); - player.sendMessage("Please type /essentialsupdate into the chat to start the installation of Essentials."); - } - if (player.hasPermission("essentials.update")) - { - final UpdateCheck.CheckResult result = updateCheck.getResult(); - switch (result) - { - case NEW_ESS: - player.sendMessage("The new version " + updateCheck.getNewVersion().toString() + " for Essentials is available. Please type /essentialsupdate to update."); - break; - case NEW_BUKKIT: - player.sendMessage("Your bukkit version is not the recommended build for Essentials, please update to version " + updateCheck.getNewBukkitVersion() + "."); - break; - case NEW_ESS_BUKKIT: - player.sendMessage("There is a new version " + updateCheck.getNewVersion().toString() + " of Essentials for Bukkit " + updateCheck.getNewBukkitVersion()); - break; - default: - } - } - } - - public void onCommand(final CommandSender sender) - { - if (sender instanceof Player && sender.hasPermission("essentials.update")) - { - if (currentPlayer == null) - { - currentPlayer = (Player)sender; - if (selfUpdate()) - { - return; - } - stateMachine = new StateMachine(plugin, currentPlayer, updateCheck); - final StateMachine.MachineResult result = stateMachine.askQuestion(); - if (result == StateMachine.MachineResult.DONE) - { - startWork(); - } - } - if (!currentPlayer.equals(sender)) - { - sender.sendMessage("The player " + currentPlayer.getDisplayName() + " is already using the wizard."); - } - } - else - { - sender.sendMessage("Please run the command as op from in game."); - } - } - - private void startWork() - { - currentPlayer.sendMessage("Installation wizard done. Starting installation."); - Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() - { - @Override - public void run() - { - stateMachine.startWork(); - } - }); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/Version.java b/EssentialsUpdate/src/com/earth2me/essentials/update/Version.java deleted file mode 100644 index a82f49abf..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/Version.java +++ /dev/null @@ -1,173 +0,0 @@ -package com.earth2me.essentials.update; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - - -public class Version implements Comparable<Version> -{ - public enum Type - { - STABLE, PREVIEW, DEVELOPER - } - - public int getMajor() - { - return major; - } - - public int getMinor() - { - return minor; - } - - public int getBuild() - { - return build; - } - - public Type getType() - { - return type; - } - private final transient int major; - private final transient int minor; - private final transient int build; - private final transient Type type; - - public Version(final String versionString) - { - final Matcher matcher = Pattern.compile("(Pre|Dev)?([0-9]+)[_\\.]([0-9]+)[_\\.]([0-9]+).*").matcher(versionString); - if (!matcher.matches() || matcher.groupCount() < 4) - { - type = Type.DEVELOPER; - major = 99; - minor = build = 0; - return; - } - if (versionString.startsWith("Pre")) - { - type = Type.PREVIEW; - } - else if (versionString.startsWith("Dev")) - { - type = Type.DEVELOPER; - } - else - { - type = Type.STABLE; - } - major = Integer.parseInt(matcher.group(2)); - minor = Integer.parseInt(matcher.group(3)); - build = Integer.parseInt(matcher.group(4)); - } - - @Override - public int compareTo(final Version other) - { - int ret = 0; - if (other.getType() == Type.DEVELOPER && getType() != Type.DEVELOPER) - { - ret = -1; - } - else if (getType() == Type.DEVELOPER && other.getType() != Type.DEVELOPER) - { - ret = 1; - } - else if (other.getMajor() > getMajor()) - { - ret = -1; - } - else if (getMajor() > other.getMajor()) - { - ret = 1; - } - else if (other.getMinor() > getMinor()) - { - ret = -1; - } - else if (getMinor() > other.getMinor()) - { - ret = 1; - } - else if (other.getBuild() > getBuild()) - { - ret = -1; - } - else if (getBuild() > other.getBuild()) - { - ret = 1; - } - else if (other.getType() == Type.STABLE && getType() == Type.PREVIEW) - { - ret = -1; - } - else if (getType() == Type.STABLE && other.getType() == Type.PREVIEW) - { - ret = 1; - } - return ret; - } - - @Override - public boolean equals(final Object obj) - { - if (obj == null) - { - return false; - } - if (getClass() != obj.getClass()) - { - return false; - } - final Version other = (Version)obj; - if (this.major != other.major) - { - return false; - } - if (this.minor != other.minor) - { - return false; - } - if (this.build != other.build) - { - return false; - } - if (this.type != other.type) - { - return false; - } - return true; - } - - @Override - public int hashCode() - { - int hash = 5; - hash = 71 * hash + this.major; - hash = 71 * hash + this.minor; - hash = 71 * hash + this.build; - hash = 71 * hash + (this.type == null ? 0 : this.type.hashCode()); - return hash; - } - - @Override - public String toString() - { - final StringBuilder builder = new StringBuilder(); - if (type == Type.DEVELOPER) - { - builder.append("Dev"); - } - if (type == Type.PREVIEW) - { - builder.append("Pre"); - } - builder.append(major); - builder.append('.'); - builder.append(minor); - builder.append('.'); - builder.append(build); - return builder.toString(); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java b/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java deleted file mode 100644 index c06aa2e64..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/VersionInfo.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.earth2me.essentials.update; - -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.bukkit.configuration.Configuration; - - -public class VersionInfo -{ - private final transient List<String> changelog; - private final transient int minBukkit; - private final transient int maxBukkit; - private final transient Map<String, ModuleInfo> modules; - - public VersionInfo(final Configuration updateConfig, final String path) - { - changelog = updateConfig.getStringList(path + ".changelog"); - minBukkit = updateConfig.getInt(path + ".min-bukkit", 0); - maxBukkit = updateConfig.getInt(path + ".max-bukkit", 0); - modules = new HashMap<String, ModuleInfo>(); - final String modulesPath = path + ".modules"; - for (String module : updateConfig.getKeys(false)) - { - modules.put(module, new ModuleInfo(updateConfig, modulesPath + module)); - } - } - - public List<String> getChangelog() - { - return Collections.unmodifiableList(changelog); - } - - public int getMinBukkit() - { - return minBukkit; - } - - public int getMaxBukkit() - { - return maxBukkit; - } - - public Map<String, ModuleInfo> getModules() - { - return Collections.unmodifiableMap(modules); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/AbstractFileCommand.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/AbstractFileCommand.java deleted file mode 100644 index 7c99d28f6..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/AbstractFileCommand.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.earth2me.essentials.update.chat; - -import com.earth2me.essentials.update.PastieUpload; -import java.io.*; -import java.nio.charset.Charset; -import org.bukkit.plugin.Plugin; - - -public abstract class AbstractFileCommand implements Command -{ - private final transient Plugin plugin; - private final static Charset UTF8 = Charset.forName("utf-8"); - - public AbstractFileCommand(final Plugin plugin) - { - this.plugin = plugin; - } - - protected BufferedReader getServerLogReader() throws IOException - { - final File bukkitFolder = plugin.getDataFolder().getAbsoluteFile().getParentFile().getParentFile(); - if (bukkitFolder == null || !bukkitFolder.exists()) - { - throw new IOException("Bukkit folder not found."); - } - final File logFile = new File(bukkitFolder, "server.log"); - if (!logFile.exists()) - { - throw new IOException("Server log not found."); - } - final FileInputStream fis = new FileInputStream(logFile); - try - { - if (logFile.length() > 1000000) - { - fis.skip(logFile.length() - 1000000); - } - return new BufferedReader(new InputStreamReader(fis)); - } - catch (IOException ex) - { - fis.close(); - throw ex; - } - } - - protected BufferedReader getPluginConfig(final String pluginName, final String fileName) throws IOException - { - final File configFolder = new File(plugin.getDataFolder().getAbsoluteFile().getParentFile(), pluginName); - if (!configFolder.exists()) - { - throw new IOException(pluginName + " plugin folder not found."); - } - final File configFile = new File(configFolder, fileName); - if (!configFile.exists()) - { - throw new IOException(pluginName + " plugin file " + fileName + " not found."); - } - return new BufferedReader(new InputStreamReader(new FileInputStream(configFile), UTF8)); - - } - - protected String uploadToPastie(final StringBuilder input) throws IOException - { - if (input.length() > 15000) - { - input.delete(0, input.length() - 15000); - input.append("## Cropped after 15000 bytes"); - } - final PastieUpload pastie = new PastieUpload(); - return pastie.send(input.toString()); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/Command.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/Command.java deleted file mode 100644 index ad4c75e43..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/Command.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.earth2me.essentials.update.chat; - -import org.bukkit.entity.Player; - - -public interface Command -{ - void run(final IrcBot ircBot, final Player player); -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ConfigCommand.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ConfigCommand.java deleted file mode 100644 index de2c6a830..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ConfigCommand.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.earth2me.essentials.update.chat; - -import java.io.BufferedReader; -import java.io.IOException; -import java.util.logging.Level; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - - -public class ConfigCommand extends AbstractFileCommand implements Command -{ - public ConfigCommand(final Plugin plugin) - { - super(plugin); - } - - @Override - public void run(final IrcBot ircBot, final Player player) - { - BufferedReader page = null; - try - { - page = getPluginConfig("Essentials", "config.yml"); - final StringBuilder input = new StringBuilder(); - do - { - final String line = page.readLine(); - if (line == null) - { - break; - } - else - { - input.append(line).append("\n"); - } - } - while (true); - page.close(); - final String message = "Essentials config.yml: " + uploadToPastie(input); - player.sendMessage("ยง6" + ircBot.getNick() + ": ยง7" + message); - ircBot.sendMessage(message); - } - catch (IOException ex) - { - Bukkit.getLogger().log(Level.SEVERE, null, ex); - player.sendMessage(ex.getMessage()); - } - finally - { - try - { - if (page != null) - { - page.close(); - } - } - catch (IOException ex) - { - Bukkit.getLogger().log(Level.SEVERE, null, ex); - player.sendMessage(ex.getMessage()); - } - } - - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ErrorsCommand.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ErrorsCommand.java deleted file mode 100644 index 41aa551c4..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ErrorsCommand.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.earth2me.essentials.update.chat; - -import java.io.BufferedReader; -import java.io.IOException; -import java.util.logging.Level; -import java.util.regex.Pattern; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - - -public class ErrorsCommand extends AbstractFileCommand implements Command -{ - private final transient Pattern pattern = Pattern.compile("^[0-9 :-]+\\[INFO\\].*"); - - public ErrorsCommand(final Plugin plugin) - { - super(plugin); - } - - @Override - public void run(final IrcBot ircBot, final Player player) - { - BufferedReader page = null; - try - { - page = getServerLogReader(); - final StringBuilder input = new StringBuilder(); - do - { - final String line = page.readLine(); - if (line == null) - { - break; - } - else - { - if (!pattern.matcher(line).matches()) - { - input.append(line).append("\n"); - } - } - } - while (true); - page.close(); - final String message = "Errors: " + uploadToPastie(input); - player.sendMessage("ยง6" + ircBot.getNick() + ": ยง7" + message); - ircBot.sendMessage(message); - } - catch (IOException ex) - { - Bukkit.getLogger().log(Level.SEVERE, null, ex); - player.sendMessage(ex.getMessage()); - } - finally - { - try - { - if (page != null) - { - page.close(); - } - } - catch (IOException ex) - { - Bukkit.getLogger().log(Level.SEVERE, null, ex); - player.sendMessage(ex.getMessage()); - } - } - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/HelpCommand.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/HelpCommand.java deleted file mode 100644 index a6f76cece..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/HelpCommand.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.earth2me.essentials.update.chat; - -import org.bukkit.entity.Player; - - -public class HelpCommand implements Command -{ - @Override - public void run(final IrcBot ircBot, final Player player) - { - player.sendMessage("Commands: (Note: Files send to the chat will be public viewable.)"); - player.sendMessage("!errors - Send the last server errors to the chat."); - player.sendMessage("!startup - Send the last startup messages to the chat."); - player.sendMessage("!config - Sends your Essentials config to the chat."); - player.sendMessage("!list - List all players in chat."); - player.sendMessage("!quit - Leave chat."); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/IrcBot.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/IrcBot.java deleted file mode 100644 index 31e9384ee..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/IrcBot.java +++ /dev/null @@ -1,198 +0,0 @@ -package com.earth2me.essentials.update.chat; - -import java.io.IOException; -import java.util.logging.Level; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.jibble.pircbot.Colors; -import org.jibble.pircbot.IrcException; -import org.jibble.pircbot.PircBot; -import org.jibble.pircbot.User; - - -public class IrcBot extends PircBot -{ - private static final String CHANNEL = "#essentials"; - private static final int PORT = 6667; - private static final String SERVER = "irc.esper.net"; - private transient boolean reconnect = true; - private final transient Player player; - private transient boolean kicked = false; - - public IrcBot(final Player player, final String nickName, final String versionString) - { - super(); - this.player = player; - setName(nickName); - setLogin("esshelp"); - setVersion(versionString); - connect(); - joinChannel(CHANNEL); - } - - private void connect() - { - try - { - connect(SERVER, PORT); - return; - } - catch (IOException ex) - { - Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex); - } - catch (IrcException ex) - { - Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex); - } - } - - public void quit() - { - reconnect = false; - disconnect(); - } - - @Override - protected void onConnect() - { - reconnect = true; - } - - @Override - protected void onDisconnect() - { - if (reconnect) - { - int tries = 10; - while (!isConnected()) - { - try - { - tries--; - reconnect(); - } - catch (Exception e) - { - Bukkit.getLogger().log(Level.WARNING, e.getMessage(), e); - try - { - Thread.sleep(10000); - } - catch (InterruptedException ex) - { - Bukkit.getLogger().log(Level.WARNING, e.getMessage(), e); - } - } - if (tries <= 0) - { - player.sendMessage("Connection lost to server."); - kicked = true; - break; - } - } - } - } - - @Override - protected void onKick(final String channel, final String kickerNick, - final String kickerLogin, final String kickerHostname, - final String recipientNick, final String reason) - { - if (recipientNick.equals(getNick())) - { - player.sendMessage("You have been kicked from the channel: " + reason); - quit(); - kicked = true; - } - } - - public boolean isKicked() - { - return kicked; - } - - @Override - protected void onMessage(final String channel, final String sender, - final String login, final String hostname, - final String message) - { - player.sendMessage(formatChatMessage(sender, message, false)); - } - - @Override - protected void onAction(final String sender, final String login, - final String hostname, final String target, - final String action) - { - player.sendMessage(formatChatMessage(sender, action, true)); - } - - @Override - protected void onNotice(final String sourceNick, final String sourceLogin, - final String sourceHostname, final String target, - final String notice) - { - player.sendMessage(formatChatMessage(sourceNick, notice, false)); - } - - @Override - protected void onTopic(final String channel, final String topic, - final String setBy, final long date, - final boolean changed) - { - player.sendMessage(formatChatMessage(channel, topic, false)); - } - - public String formatChatMessage(final String nick, final String message, final boolean action) - { - final StringBuilder builder = new StringBuilder(); - builder.append("ยง6"); - if (action) - { - builder.append('*'); - } - builder.append(nick); - if (!action) - { - builder.append(':'); - } - builder.append(" ยง7"); - builder.append(replaceColors(message)); - return builder.toString(); - } - - private String replaceColors(final String message) - { - String m = Colors.removeFormatting(message); - m = m.replaceAll("\u000310(,(0?[0-9]|1[0-5]))?", "ยงb"); - m = m.replaceAll("\u000311(,(0?[0-9]|1[0-5]))?", "ยงf"); - m = m.replaceAll("\u000312(,(0?[0-9]|1[0-5]))?", "ยง9"); - m = m.replaceAll("\u000313(,(0?[0-9]|1[0-5]))?", "ยงd"); - m = m.replaceAll("\u000314(,(0?[0-9]|1[0-5]))?", "ยง8"); - m = m.replaceAll("\u000315(,(0?[0-9]|1[0-5]))?", "ยง7"); - m = m.replaceAll("\u00030?1(,(0?[0-9]|1[0-5]))?", "ยง0"); - m = m.replaceAll("\u00030?2(,(0?[0-9]|1[0-5]))?", "ยง1"); - m = m.replaceAll("\u00030?3(,(0?[0-9]|1[0-5]))?", "ยง2"); - m = m.replaceAll("\u00030?4(,(0?[0-9]|1[0-5]))?", "ยงc"); - m = m.replaceAll("\u00030?5(,(0?[0-9]|1[0-5]))?", "ยง4"); - m = m.replaceAll("\u00030?6(,(0?[0-9]|1[0-5]))?", "ยง5"); - m = m.replaceAll("\u00030?7(,(0?[0-9]|1[0-5]))?", "ยง6"); - m = m.replaceAll("\u00030?8(,(0?[0-9]|1[0-5]))?", "ยงe"); - m = m.replaceAll("\u00030?9(,(0?[0-9]|1[0-5]))?", "ยงa"); - m = m.replaceAll("\u00030?0(,(0?[0-9]|1[0-5]))?", "ยงf"); - m = m.replace("\u000f", "ยง7"); - m = Colors.removeColors(m); - return m; - } - - public void sendMessage(final String message) - { - sendMessage(CHANNEL, message); - } - - public User[] getUsers() - { - return getUsers(CHANNEL); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ListCommand.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ListCommand.java deleted file mode 100644 index 9aa932efa..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/ListCommand.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.earth2me.essentials.update.chat; - -import org.bukkit.entity.Player; -import org.jibble.pircbot.User; - - -public class ListCommand implements Command -{ - @Override - public void run(final IrcBot ircBot, final Player player) - { - final User[] members = ircBot.getUsers(); - final StringBuilder message = new StringBuilder(); - for (User user : members) - { - if (message.length() > 0) - { - message.append("ยงf, "); - } - if (user.isOp() || user.hasVoice()) - { - message.append("ยง6"); - } - else - { - message.append("ยง7"); - } - message.append(user.getPrefix()).append(user.getNick()); - } - player.sendMessage(message.toString()); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/StartupCommand.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/StartupCommand.java deleted file mode 100644 index f244d6e3a..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/StartupCommand.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.earth2me.essentials.update.chat; - -import java.io.BufferedReader; -import java.io.IOException; -import java.util.logging.Level; -import java.util.regex.Pattern; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - - -public class StartupCommand extends AbstractFileCommand implements Command -{ - private final transient Pattern patternStart = Pattern.compile("^[0-9 :-]+\\[INFO\\] Starting minecraft server version.*"); - private final transient Pattern patternEnd = Pattern.compile("^[0-9 :-]+\\[INFO\\] Done \\([0-9.,]+s\\)! For help, type \"help\".*"); - - public StartupCommand(final Plugin plugin) - { - super(plugin); - } - - @Override - public void run(final IrcBot ircBot, final Player player) - { - BufferedReader page = null; - try - { - page = getServerLogReader(); - final StringBuilder input = new StringBuilder(); - String line; - boolean log = false; - while ((line = page.readLine()) != null) - { - if (patternStart.matcher(line).matches()) - { - if (input.length() > 0) - { - input.delete(0, input.length()); - } - log = true; - } - if (log) - { - input.append(line).append("\n"); - } - if (patternEnd.matcher(line).matches()) - { - log = false; - } - } - page.close(); - final String message = "Startup: " + uploadToPastie(input); - player.sendMessage("ยง6" + ircBot.getNick() + ": ยง7" + message); - ircBot.sendMessage(message); - } - catch (IOException ex) - { - Bukkit.getLogger().log(Level.SEVERE, null, ex); - player.sendMessage(ex.getMessage()); - } - finally - { - try - { - if (page != null) - { - page.close(); - } - } - catch (IOException ex) - { - Bukkit.getLogger().log(Level.SEVERE, null, ex); - player.sendMessage(ex.getMessage()); - } - } - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/UsernameUtil.java b/EssentialsUpdate/src/com/earth2me/essentials/update/chat/UsernameUtil.java deleted file mode 100644 index 3df615652..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/chat/UsernameUtil.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.earth2me.essentials.update.chat; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.bukkit.Bukkit; -import org.bukkit.Server; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - - -public final class UsernameUtil -{ - private static final Pattern CB_PATTERN = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-[0-9]+-[0-9a-z]+-b([0-9]+)jnks.*"); - - private UsernameUtil() - { - } - - public static String createUsername(final Player player) - { - final StringBuilder nameBuilder = new StringBuilder(); - final Server server = Bukkit.getServer(); - nameBuilder.append(player.getName()); - - addCraftBukkitVersion(server, nameBuilder); - addEssentialsVersion(server, nameBuilder); - addGroupManagerVersion(server, nameBuilder); - addPermissionsExVersion(server, nameBuilder); - addPermissionsBukkitVersion(server, nameBuilder); - addBPermissionsVersion(server, nameBuilder); - addPermissionsVersion(server, nameBuilder); - - return nameBuilder.toString(); - } - - private static void addPermissionsVersion(final Server server, final StringBuilder nameBuilder) - { - final Plugin perm = server.getPluginManager().getPlugin("Permissions"); - if (perm != null) - { - nameBuilder.append(" P"); - if (!perm.isEnabled()) - { - nameBuilder.append('!'); - } - nameBuilder.append(perm.getDescription().getVersion()); - } - } - - private static void addBPermissionsVersion(final Server server, final StringBuilder nameBuilder) - { - final Plugin bperm = server.getPluginManager().getPlugin("bPermissions"); - if (bperm != null) - { - nameBuilder.append(" BP"); - if (!bperm.isEnabled()) - { - nameBuilder.append('!'); - } - nameBuilder.append(bperm.getDescription().getVersion()); - } - } - - private static void addPermissionsBukkitVersion(final Server server, final StringBuilder nameBuilder) - { - final Plugin permb = server.getPluginManager().getPlugin("PermissionsBukkit"); - if (permb != null) - { - nameBuilder.append(" PB"); - if (!permb.isEnabled()) - { - nameBuilder.append('!'); - } - nameBuilder.append(permb.getDescription().getVersion()); - } - } - - private static void addPermissionsExVersion(final Server server, final StringBuilder nameBuilder) - { - final Plugin pex = server.getPluginManager().getPlugin("PermissionsEx"); - if (pex != null) - { - nameBuilder.append(" PEX"); - if (!pex.isEnabled()) - { - nameBuilder.append('!'); - } - nameBuilder.append(pex.getDescription().getVersion()); - } - } - - private static void addGroupManagerVersion(final Server server, final StringBuilder nameBuilder) - { - final Plugin groupManager = server.getPluginManager().getPlugin("GroupManager"); - if (groupManager != null) - { - nameBuilder.append(" GM"); - if (!groupManager.isEnabled()) - { - nameBuilder.append('!'); - } - } - } - - private static void addEssentialsVersion(final Server server, final StringBuilder nameBuilder) - { - final Plugin essentials = server.getPluginManager().getPlugin("Essentials"); - if (essentials != null) - { - nameBuilder.append(" ESS"); - nameBuilder.append(essentials.getDescription().getVersion()); - } - } - - private static void addCraftBukkitVersion(final Server server, final StringBuilder nameBuilder) - { - final Matcher versionMatch = CB_PATTERN.matcher(server.getVersion()); - if (versionMatch.matches()) - { - nameBuilder.append(" CB"); - nameBuilder.append(versionMatch.group(4)); - } - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractState.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractState.java deleted file mode 100644 index 2c85c39fd..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractState.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.earth2me.essentials.update.states; - -import com.earth2me.essentials.update.AbstractWorkListener; -import org.bukkit.entity.Player; - - -public abstract class AbstractState -{ - private transient boolean abortion = false; - private final transient StateMap stateMap; - - public AbstractState(final StateMap stateMap) - { - this.stateMap = stateMap; - } - - public <T extends AbstractState> T getState(final Class<? extends T> stateClass) - { - if (!stateMap.containsKey(stateClass)) - { - try - { - final AbstractState state = stateClass.getConstructor(StateMap.class).newInstance(stateMap); - stateMap.put(stateClass, state); - } - catch (Exception ex) - { - /* - * This should never happen. All states, that are added to the map automatically, have to have a - * Constructor that accepts the StateMap. - */ - throw new RuntimeException(ex); - } - } - return (T)stateMap.get(stateClass); - } - - public abstract AbstractState getNextState(); - - /** - * Check if we already know the answer, so the user does not have to answer the question. - * - * @return true, if the answer could be guessed. - */ - public boolean guessAnswer() - { - return false; - } - - /** - * Ask the user the question. - * @param sender - */ - public abstract void askQuestion(Player sender); - - /** - * React on the answer and set internal variables - * @param answer - * @return true, if the answer could be recognized as a valid answer - */ - public abstract boolean reactOnAnswer(String answer); - - public final AbstractState reactOnAnswer(final Player sender, final String answer) - { - final String trimmedAnswer = answer.trim(); - if (trimmedAnswer.equalsIgnoreCase("quit") - || trimmedAnswer.equalsIgnoreCase("bye") - || trimmedAnswer.equalsIgnoreCase("abort") - || trimmedAnswer.equalsIgnoreCase("cancel") - || trimmedAnswer.equalsIgnoreCase("exit")) - { - abort(); - return null; - } - try - { - final boolean found = reactOnAnswer(trimmedAnswer); - if (found) - { - return getNextState(); - } - else - { - sender.sendMessage("Answer not recognized."); - return this; - } - } - catch (RuntimeException ex) - { - sender.sendMessage(ex.toString()); - return this; - } - } - - /** - * Do something based on the answer, that the user gave. - */ - public void doWork(final AbstractWorkListener listener) - { - listener.onWorkDone(); - } - - public boolean isAbortion() - { - return abortion; - } - - protected void abort() - { - abortion = true; - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java deleted file mode 100644 index 67baf6bb6..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.earth2me.essentials.update.states; - - -public abstract class AbstractYesNoState extends AbstractState -{ - private boolean answer = false; - private final transient Class<? extends AbstractState> yesState; - private final transient Class<? extends AbstractState> noState; - - public AbstractYesNoState(final StateMap states, final Class<? extends AbstractState> nextState) - { - this(states, nextState, nextState); - } - - public AbstractYesNoState(final StateMap states, final Class<? extends AbstractState> yesState, final Class<? extends AbstractState> noState) - { - super(states); - this.yesState = yesState; - this.noState = noState; - } - - @Override - public AbstractState getNextState() - { - return answer - ? (yesState == null ? null : getState(yesState)) - : (noState == null ? null : getState(noState)); - } - - @Override - public boolean reactOnAnswer(final String answer) - { - if (answer.equalsIgnoreCase("yes") - || answer.equalsIgnoreCase("y")) - { - this.answer = true; - return true; - } - if (answer.equalsIgnoreCase("no") - || answer.equalsIgnoreCase("n")) - { - this.answer = false; - return true; - } - return false; - } - - public boolean getAnswer() - { - return answer; - } - - protected void setAnswer(final boolean answer) - { - this.answer = answer; - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AdvancedMode.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/AdvancedMode.java deleted file mode 100644 index 88d9efc4a..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AdvancedMode.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.earth2me.essentials.update.states; - -import org.bukkit.entity.Player; - - -public class AdvancedMode extends AbstractYesNoState -{ - public AdvancedMode(final StateMap states) - { - super(states, EssentialsChat.class); - } - - @Override - public void askQuestion(final Player sender) - { - sender.sendMessage("This installation mode has a lot of options."); - sender.sendMessage("Do you want use the advanced mode to see all questions?"); - sender.sendMessage("Otherwise the default values will be used."); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/Changelog.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/Changelog.java deleted file mode 100644 index 10a4f33c5..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/Changelog.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.earth2me.essentials.update.states; - -import com.earth2me.essentials.update.UpdateCheck; -import com.earth2me.essentials.update.VersionInfo; -import java.util.List; -import org.bukkit.entity.Player; - - -public class Changelog extends AbstractState -{ - private static final int CHANGES_PER_PAGE = 5; - private transient int page = 0; - private transient boolean confirmed = false; - private transient final List<String> changes; - private transient final int pages; - - public Changelog(final StateMap stateMap) - { - super(stateMap); - changes = getChanges(); - pages = changes.size() / CHANGES_PER_PAGE + (changes.size() % CHANGES_PER_PAGE > 0 ? 1 : 0); - } - - @Override - public AbstractState getNextState() - { - return confirmed ? getState(EssentialsChat.class) : this; - } - - @Override - public boolean guessAnswer() - { - if (pages == 0) - { - confirmed = true; - } - return confirmed; - } - - private List<String> getChanges() - { - final UpdateCheck updateCheck = getState(UpdateOrInstallation.class).getUpdateCheck(); - final VersionInfo versionInfo = updateCheck.getNewVersionInfo(); - return versionInfo.getChangelog(); - } - - @Override - public void askQuestion(final Player sender) - { - if (pages > 1) - { - sender.sendMessage("Changelog, page " + page + " of " + pages + ":"); - } - else - { - sender.sendMessage("Changelog:"); - } - for (int i = page * CHANGES_PER_PAGE; i < Math.min(page * CHANGES_PER_PAGE + CHANGES_PER_PAGE, changes.size()); i++) - { - sender.sendMessage(changes.get(i)); - } - if (pages > 1) - { - sender.sendMessage("Select a page by typing the numbers 1 to " + pages + " to view all changes and then type confirm or abort."); - } - else - { - sender.sendMessage("Type confirm to update Essentials or abort to cancel the update."); - } - } - - @Override - public boolean reactOnAnswer(final String answer) - { - if (answer.equalsIgnoreCase("confirm")) - { - confirmed = true; - return true; - } - if (answer.matches("[0-9]+")) - { - final int page = Integer.parseInt(answer); - if (page <= pages && page > 0) - { - this.page = page - 1; - return true; - } - } - return false; - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsChat.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsChat.java deleted file mode 100644 index 6aaed634a..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsChat.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.earth2me.essentials.update.states; - -import com.earth2me.essentials.update.AbstractWorkListener; -import com.earth2me.essentials.update.tasks.InstallModule; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - - -public class EssentialsChat extends AbstractYesNoState -{ - public EssentialsChat(final StateMap states) - { - super(states, EssentialsChatSettings.class, EssentialsSpawn.class); - } - - @Override - public boolean guessAnswer() - { - final Plugin plugin = Bukkit.getPluginManager().getPlugin("EssentialsChat"); - if (plugin != null) - { - setAnswer(true); - return true; - } - return false; - } - - @Override - public void askQuestion(final Player sender) - { - sender.sendMessage("Do you want to install EssentialsChat? (yes/no)"); - sender.sendMessage("EssentialsChat is a simple chat formatting plugin"); - sender.sendMessage("It allows you to make user prefixes and coloured text."); - } - - @Override - public void doWork(final AbstractWorkListener listener) - { - if (getAnswer()) - { - new InstallModule(listener, "EssentialsChat").start(); - return; - } - listener.onWorkDone(); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsChatSettings.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsChatSettings.java deleted file mode 100644 index 6666ff371..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsChatSettings.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.earth2me.essentials.update.states; - -import org.bukkit.entity.Player; - - -public class EssentialsChatSettings extends AbstractYesNoState -{ - public EssentialsChatSettings(final StateMap states) - { - super(states, EssentialsSpawn.class); - } - - @Override - public boolean guessAnswer() - { - if (getState(AdvancedMode.class).getAnswer()) - { - setAnswer(false); - return true; - } - return false; - } - - @Override - public void askQuestion(final Player sender) - { - sender.sendMessage("Would you like to configure EssentialsChat to prefix ingame messages with their group?"); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsGeoIP.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsGeoIP.java deleted file mode 100644 index a91a44787..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsGeoIP.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.earth2me.essentials.update.states; - -import com.earth2me.essentials.update.AbstractWorkListener; -import com.earth2me.essentials.update.tasks.InstallModule; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - - -public class EssentialsGeoIP extends AbstractYesNoState -{ - public EssentialsGeoIP(final StateMap states) - { - super(states, null); - } - - @Override - public boolean guessAnswer() - { - final Plugin plugin = Bukkit.getPluginManager().getPlugin("EssentialsGeoIP"); - if (plugin != null) - { - setAnswer(true); - return true; - } - return false; - } - - @Override - public void askQuestion(final Player sender) - { - sender.sendMessage("Do you want to install EssentialsGeoIP? (yes/no)"); - sender.sendMessage("EssentialsGeoIP performs a IP lookup on joining players"); - sender.sendMessage("It allows you get a rough idea of where a player is from."); - } - - @Override - public void doWork(final AbstractWorkListener listener) - { - if (getAnswer()) - { - new InstallModule(listener, "EssentialsGeoIP").start(); - return; - } - listener.onWorkDone(); - } -}
\ No newline at end of file diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsProtect.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsProtect.java deleted file mode 100644 index ca0337d30..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsProtect.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.earth2me.essentials.update.states; - -import com.earth2me.essentials.update.AbstractWorkListener; -import com.earth2me.essentials.update.tasks.InstallModule; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - - -public class EssentialsProtect extends AbstractYesNoState -{ - public EssentialsProtect(final StateMap states) - { - super(states, null); - } - - @Override - public boolean guessAnswer() - { - final Plugin plugin = Bukkit.getPluginManager().getPlugin("EssentialsProtect"); - if (plugin != null) - { - setAnswer(true); - return true; - } - return false; - } - - @Override - public void askQuestion(final Player sender) - { - sender.sendMessage("Do you want to install EssentialsProtect? (yes/no)"); - sender.sendMessage("EssentialsProtect is a basic world protection system"); - sender.sendMessage("It allows you to set server wide rules, such as disabling creeper explosions, and preventing fire spread."); - } - - @Override - public void doWork(final AbstractWorkListener listener) - { - if (getAnswer()) - { - new InstallModule(listener, "EssentialsProtect").start(); - return; - } - listener.onWorkDone(); - } -}
\ No newline at end of file diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsSpawn.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsSpawn.java deleted file mode 100644 index 2a87638ba..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/EssentialsSpawn.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.earth2me.essentials.update.states; - -import com.earth2me.essentials.update.AbstractWorkListener; -import com.earth2me.essentials.update.tasks.InstallModule; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - - -public class EssentialsSpawn extends AbstractYesNoState -{ - public EssentialsSpawn(final StateMap states) - { - super(states, null); - } - - @Override - public boolean guessAnswer() - { - final Plugin plugin = Bukkit.getPluginManager().getPlugin("EssentialsSpawn"); - if (plugin != null) - { - setAnswer(true); - return true; - } - return false; - } - - @Override - public void askQuestion(final Player sender) - { - sender.sendMessage("Do you want to install EssentialsSpawn? (yes/no)"); - sender.sendMessage("EssentialsSpawn lets you control player spawning"); - sender.sendMessage("It allows you to set different places where players spawn on death, new players join and allows players to return to spawn."); - } - - @Override - public void doWork(final AbstractWorkListener listener) - { - if (getAnswer()) - { - new InstallModule(listener, "EssentialsSpawn").start(); - return; - } - listener.onWorkDone(); - } -}
\ No newline at end of file diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java deleted file mode 100644 index 82d9ee627..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/InstallationFinishedEvent.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.earth2me.essentials.update.states; - -import org.bukkit.event.Event; -import org.bukkit.event.HandlerList; - - -public class InstallationFinishedEvent extends Event -{ - public InstallationFinishedEvent() - { - super(); - } - - @Override - public HandlerList getHandlers() - { - throw new UnsupportedOperationException("Not supported yet."); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java deleted file mode 100644 index 6ce926f92..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMachine.java +++ /dev/null @@ -1,183 +0,0 @@ -package com.earth2me.essentials.update.states; - -import com.earth2me.essentials.update.AbstractWorkListener; -import com.earth2me.essentials.update.UpdateCheck; -import java.util.Iterator; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - - -public class StateMachine extends AbstractWorkListener implements Runnable -{ - public enum MachineResult - { - ABORT, WAIT, DONE, NONE - } - private final transient StateMap states = new StateMap(); - private transient AbstractState current; - private transient Player player; - private transient MachineResult result = MachineResult.NONE; - - public StateMachine(final Plugin plugin, final Player player, final UpdateCheck updateCheck) - { - super(plugin, updateCheck.getNewVersionInfo()); - this.player = player; - states.clear(); - final UpdateOrInstallation state = new UpdateOrInstallation(states, updateCheck); - current = states.put(UpdateOrInstallation.class, state); - } - - public MachineResult askQuestion() - { - try - { - while (current.guessAnswer()) - { - current = current.getNextState(); - if (current == null) - { - result = MachineResult.DONE; - break; - } - } - if (current != null) - { - if (player.isOnline()) - { - current.askQuestion(player); - } - result = MachineResult.WAIT; - } - } - catch (RuntimeException ex) - { - player.sendMessage(ex.getMessage()); - finish(); - result = MachineResult.ABORT; - } - return result; - } - - public MachineResult reactOnMessage(final String message) - { - result = MachineResult.NONE; - final AbstractState next = current.reactOnAnswer(player, message); - if (next == null) - { - if (current.isAbortion()) - { - finish(); - result = MachineResult.ABORT; - } - else - { - result = MachineResult.DONE; - } - } - else - { - current = next; - askQuestion(); - } - return result; - } - private transient Iterator<AbstractState> iterator; - - public void startWork() - { - iterator = states.values().iterator(); - Bukkit.getScheduler().scheduleAsyncDelayedTask(getPlugin(), this); - } - - @Override - public void run() - { - if (!iterator.hasNext()) - { - Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), new Runnable() - { - @Override - public void run() - { - if (StateMachine.this.player.isOnline()) - { - StateMachine.this.player.sendMessage("Installation done. Reloading server."); - } - finish(); - Bukkit.getServer().reload(); - } - }); - return; - } - final AbstractState state = iterator.next(); - state.doWork(this); - } - - @Override - public void onWorkAbort(final String message) - { - finish(); - Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), new Runnable() - { - @Override - public void run() - { - if (message != null && !message.isEmpty() && StateMachine.this.player.isOnline()) - { - StateMachine.this.player.sendMessage(message); - } - } - }); - } - - @Override - public void onWorkDone(final String message) - { - Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), new Runnable() - { - @Override - public void run() - { - if (message != null && !message.isEmpty() && StateMachine.this.player.isOnline()) - { - StateMachine.this.player.sendMessage(message); - } - Bukkit.getScheduler().scheduleAsyncDelayedTask(getPlugin(), StateMachine.this); - } - }); - } - - private void finish() - { - current = null; - iterator = null; - states.clear(); - getPlugin().getServer().getPluginManager().callEvent(new InstallationFinishedEvent()); - } - - public void resumeInstallation(final Player player) - { - this.player = player; - if (result == MachineResult.WAIT) - { - if (current == null) - { - throw new RuntimeException("State is WAIT, but current state is null!"); - } - current.askQuestion(player); - } - if (result == MachineResult.DONE && iterator != null) - { - player.sendMessage("Installation is still running."); - } - if (result == MachineResult.ABORT) - { - throw new RuntimeException("Player should not be able to resume an aborted installation."); - } - if (result == MachineResult.NONE) - { - throw new RuntimeException("State machine in an undefined state."); - } - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMap.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMap.java deleted file mode 100644 index cca4223d6..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/StateMap.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.earth2me.essentials.update.states; - -import java.util.LinkedHashMap; - - -public class StateMap extends LinkedHashMap<Class<? extends AbstractState>, AbstractState> -{ - public StateMap() - { - super(50); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/UpdateOrInstallation.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/UpdateOrInstallation.java deleted file mode 100644 index 6b48f90be..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/UpdateOrInstallation.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.earth2me.essentials.update.states; - -import com.earth2me.essentials.update.UpdateCheck; -import org.bukkit.entity.Player; - - -public class UpdateOrInstallation extends AbstractState -{ - private final transient UpdateCheck updateCheck; - private transient boolean update = false; - - public UpdateOrInstallation(final StateMap stateMap, final UpdateCheck updateCheck) - { - super(stateMap); - this.updateCheck = updateCheck; - } - - @Override - public boolean guessAnswer() - { - if (getUpdateCheck().isEssentialsInstalled()) - { - update = true; - } - return update; - } - - @Override - public AbstractState getNextState() - { - return update ? getState(Changelog.class) : getState(EssentialsChat.class); - } - - @Override - public void askQuestion(final Player sender) - { - sender.sendMessage("Thank you for choosing Essentials."); - sender.sendMessage("The following installation wizard will guide you through the installation of Essentials."); - sender.sendMessage("Your answers will be saved for a later update."); - sender.sendMessage("Please answer the messages with yes or no, if not otherwise stated."); - sender.sendMessage("Write bye/exit/quit if you want to exit the wizard at anytime."); - sender.sendMessage("Type ok to continue..."); - } - - @Override - public boolean reactOnAnswer(final String answer) - { - return answer.equalsIgnoreCase("ok") || answer.equalsIgnoreCase("k") || answer.equalsIgnoreCase("continue"); - } - - public UpdateCheck getUpdateCheck() - { - return updateCheck; - } - - public boolean isUpdate() - { - return update; - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/InstallModule.java b/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/InstallModule.java deleted file mode 100644 index 778f5172f..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/InstallModule.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.earth2me.essentials.update.tasks; - -import com.earth2me.essentials.update.AbstractWorkListener; -import com.earth2me.essentials.update.GetFile; -import com.earth2me.essentials.update.ModuleInfo; -import com.earth2me.essentials.update.VersionInfo; -import java.io.File; -import java.net.URL; -import java.util.logging.Level; -import org.bukkit.Bukkit; - - -public class InstallModule implements Runnable, Task -{ - protected final transient AbstractWorkListener listener; - private final transient String moduleName; - private final transient String fileName; - - public InstallModule(final AbstractWorkListener listener, final String moduleName) - { - this(listener, moduleName, moduleName + ".jar"); - } - - public InstallModule(final AbstractWorkListener listener, final String moduleName, final String fileName) - { - this.listener = listener; - this.moduleName = moduleName; - this.fileName = fileName; - } - - @Override - public void start() - { - Bukkit.getScheduler().scheduleAsyncDelayedTask(listener.getPlugin(), this); - } - - @Override - public void run() - { - final VersionInfo info = listener.getNewVersionInfo(); - final ModuleInfo module = info.getModules().get(moduleName); - if (module == null) - { - listener.onWorkAbort("Module " + moduleName + " not found in VersionInfo."); - return; - } - try - { - final URL downloadUrl = module.getUrl(); - final GetFile getFile = new GetFile(downloadUrl); - getFile.saveTo(new File(listener.getPlugin().getServer().getUpdateFolderFile(), fileName), module.getHash()); - listener.onWorkDone("Module " + moduleName + " downloaded."); - } - catch (Exception ex) - { - Bukkit.getLogger().log(Level.SEVERE, "Failed to download module " + moduleName + " to " + fileName, ex); - listener.onWorkAbort("An error occured, please check your server log."); - return; - } - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/SelfUpdate.java b/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/SelfUpdate.java deleted file mode 100644 index 3baf86be7..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/SelfUpdate.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.earth2me.essentials.update.tasks; - -import com.earth2me.essentials.update.AbstractWorkListener; -import org.bukkit.Bukkit; - - -public class SelfUpdate extends AbstractWorkListener implements Task, Runnable -{ - private final transient AbstractWorkListener listener; - - public SelfUpdate(final AbstractWorkListener listener) - { - super(listener.getPlugin(), listener.getNewVersionInfo()); - this.listener = listener; - } - - @Override - public void onWorkAbort(final String message) - { - listener.onWorkAbort(message); - } - - @Override - public void onWorkDone(final String message) - { - listener.onWorkDone(message); - Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), new Runnable() - { - @Override - public void run() - { - Bukkit.getServer().reload(); - } - }); - } - - @Override - public void start() - { - Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), this); - } - - @Override - public void run() - { - Bukkit.getScheduler().scheduleAsyncDelayedTask(getPlugin(), new Runnable() - { - @Override - public void run() - { - new InstallModule(SelfUpdate.this, "EssentialsUpdate").start(); - } - }); - } -} diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/Task.java b/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/Task.java deleted file mode 100644 index 3f1d572ed..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/tasks/Task.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.earth2me.essentials.update.tasks; - - -public interface Task -{ - void start(); -} diff --git a/EssentialsUpdate/src/org/jibble/pircbot/Colors.java b/EssentialsUpdate/src/org/jibble/pircbot/Colors.java deleted file mode 100755 index c763cba22..000000000 --- a/EssentialsUpdate/src/org/jibble/pircbot/Colors.java +++ /dev/null @@ -1,293 +0,0 @@ -/* -Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ - -This file is part of PircBot. - -This software is dual-licensed, allowing you to choose between the GNU -General Public License (GPL) and the www.jibble.org Commercial License. -Since the GPL may be too restrictive for use in a proprietary application, -a commercial license is also provided. Full license information can be -found at http://www.jibble.org/licenses/ - -*/ - - -package org.jibble.pircbot; - -/** - * The Colors class provides several static fields and methods that you may - * find useful when writing an IRC Bot. - * <p> - * This class contains constants that are useful for formatting lines - * sent to IRC servers. These constants allow you to apply various - * formatting to the lines, such as colours, boldness, underlining - * and reverse text. - * <p> - * The class contains static methods to remove colours and formatting - * from lines of IRC text. - * <p> - * Here are some examples of how to use the contants from within a - * class that extends PircBot and imports org.jibble.pircbot.*; - * - * <pre> sendMessage("#cs", Colors.BOLD + "A bold hello!"); - * <b>A bold hello!</b> - * sendMessage("#cs", Colors.RED + "Red" + Colors.NORMAL + " text"); - * <font color="red">Red</font> text - * sendMessage("#cs", Colors.BOLD + Colors.RED + "Bold and red"); - * <b><font color="red">Bold and red</font></b></pre> - * - * Please note that some IRC channels may be configured to reject any - * messages that use colours. Also note that older IRC clients may be - * unable to correctly display lines that contain colours and other - * control characters. - * <p> - * Note that this class name has been spelt in the American style in - * order to remain consistent with the rest of the Java API. - * - * - * @since 0.9.12 - * @author Paul James Mutton, - * <a href="http://www.jibble.org/">http://www.jibble.org/</a> - * @version 1.5.0 (Build time: Mon Dec 14 20:07:17 2009) - */ -public class Colors { - - - /** - * Removes all previously applied color and formatting attributes. - */ - public static final String NORMAL = "\u000f"; - - - /** - * Bold text. - */ - public static final String BOLD = "\u0002"; - - - /** - * Underlined text. - */ - public static final String UNDERLINE = "\u001f"; - - - /** - * Reversed text (may be rendered as italic text in some clients). - */ - public static final String REVERSE = "\u0016"; - - - /** - * White coloured text. - */ - public static final String WHITE = "\u000300"; - - - /** - * Black coloured text. - */ - public static final String BLACK = "\u000301"; - - - /** - * Dark blue coloured text. - */ - public static final String DARK_BLUE = "\u000302"; - - - /** - * Dark green coloured text. - */ - public static final String DARK_GREEN = "\u000303"; - - - /** - * Red coloured text. - */ - public static final String RED = "\u000304"; - - - /** - * Brown coloured text. - */ - public static final String BROWN = "\u000305"; - - - /** - * Purple coloured text. - */ - public static final String PURPLE = "\u000306"; - - - /** - * Olive coloured text. - */ - public static final String OLIVE = "\u000307"; - - - /** - * Yellow coloured text. - */ - public static final String YELLOW = "\u000308"; - - - /** - * Green coloured text. - */ - public static final String GREEN = "\u000309"; - - - /** - * Teal coloured text. - */ - public static final String TEAL = "\u000310"; - - - /** - * Cyan coloured text. - */ - public static final String CYAN = "\u000311"; - - - /** - * Blue coloured text. - */ - public static final String BLUE = "\u000312"; - - - /** - * Magenta coloured text. - */ - public static final String MAGENTA = "\u000313"; - - - /** - * Dark gray coloured text. - */ - public static final String DARK_GRAY = "\u000314"; - - - /** - * Light gray coloured text. - */ - public static final String LIGHT_GRAY = "\u000315"; - - - /** - * This class should not be constructed. - */ - private Colors() { - - } - - - /** - * Removes all colours from a line of IRC text. - * - * @since PircBot 1.2.0 - * - * @param line the input text. - * - * @return the same text, but with all colours removed. - */ - public static String removeColors(String line) { - int length = line.length(); - StringBuffer buffer = new StringBuffer(); - int i = 0; - while (i < length) { - char ch = line.charAt(i); - if (ch == '\u0003') { - i++; - // Skip "x" or "xy" (foreground color). - if (i < length) { - ch = line.charAt(i); - if (Character.isDigit(ch)) { - i++; - if (i < length) { - ch = line.charAt(i); - if (Character.isDigit(ch)) { - i++; - } - } - // Now skip ",x" or ",xy" (background color). - if (i < length) { - ch = line.charAt(i); - if (ch == ',') { - i++; - if (i < length) { - ch = line.charAt(i); - if (Character.isDigit(ch)) { - i++; - if (i < length) { - ch = line.charAt(i); - if (Character.isDigit(ch)) { - i++; - } - } - } - else { - // Keep the comma. - i--; - } - } - else { - // Keep the comma. - i--; - } - } - } - } - } - } - else if (ch == '\u000f') { - i++; - } - else { - buffer.append(ch); - i++; - } - } - return buffer.toString(); - } - - - /** - * Remove formatting from a line of IRC text. - * - * @since PircBot 1.2.0 - * - * @param line the input text. - * - * @return the same text, but without any bold, underlining, reverse, etc. - */ - public static String removeFormatting(String line) { - int length = line.length(); - StringBuffer buffer = new StringBuffer(); - for (int i = 0; i < length; i++) { - char ch = line.charAt(i); - if (ch == '\u000f' || ch == '\u0002' || ch == '\u001f' || ch == '\u0016') { - // Don't add this character. - } - else { - buffer.append(ch); - } - } - return buffer.toString(); - } - - - /** - * Removes all formatting and colours from a line of IRC text. - * - * @since PircBot 1.2.0 - * - * @param line the input text. - * - * @return the same text, but without formatting and colour characters. - * - */ - public static String removeFormattingAndColors(String line) { - return removeFormatting(removeColors(line)); - } - -} diff --git a/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java b/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java deleted file mode 100755 index a24815210..000000000 --- a/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java +++ /dev/null @@ -1,169 +0,0 @@ -/* -Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ - -This file is part of PircBot. - -This software is dual-licensed, allowing you to choose between the GNU -General Public License (GPL) and the www.jibble.org Commercial License. -Since the GPL may be too restrictive for use in a proprietary application, -a commercial license is also provided. Full license information can be -found at http://www.jibble.org/licenses/ - -*/ - - -package org.jibble.pircbot; - -import java.io.*; -import java.net.Socket; -import java.util.StringTokenizer; - -/** - * A Thread which reads lines from the IRC server. It then - * passes these lines to the PircBot without changing them. - * This running Thread also detects disconnection from the server - * and is thus used by the OutputThread to send lines to the server. - * - * @author Paul James Mutton, - * <a href="http://www.jibble.org/">http://www.jibble.org/</a> - * @version 1.5.0 (Build time: Mon Dec 14 20:07:17 2009) - */ -public class InputThread extends Thread { - - /** - * The InputThread reads lines from the IRC server and allows the - * PircBot to handle them. - * - * @param bot An instance of the underlying PircBot. - * @param breader The BufferedReader that reads lines from the server. - * @param bwriter The BufferedWriter that sends lines to the server. - */ - InputThread(PircBot bot, Socket socket, BufferedReader breader, BufferedWriter bwriter) { - _bot = bot; - _socket = socket; - _breader = breader; - _bwriter = bwriter; - this.setName(this.getClass() + "-Thread"); - } - - - /** - * Sends a raw line to the IRC server as soon as possible, bypassing the - * outgoing message queue. - * - * @param line The raw line to send to the IRC server. - */ - void sendRawLine(String line) { - OutputThread.sendRawLine(_bot, _bwriter, line); - } - - - /** - * Returns true if this InputThread is connected to an IRC server. - * The result of this method should only act as a rough guide, - * as the result may not be valid by the time you act upon it. - * - * @return True if still connected. - */ - boolean isConnected() { - return _isConnected; - } - - - /** - * Called to start this Thread reading lines from the IRC server. - * When a line is read, this method calls the handleLine method - * in the PircBot, which may subsequently call an 'onXxx' method - * in the PircBot subclass. If any subclass of Throwable (i.e. - * any Exception or Error) is thrown by your method, then this - * method will print the stack trace to the standard output. It - * is probable that the PircBot may still be functioning normally - * after such a problem, but the existance of any uncaught exceptions - * in your code is something you should really fix. - */ - public void run() { - try { - boolean running = true; - while (running) { - try { - String line = null; - while ((line = _breader.readLine()) != null) { - try { - _bot.handleLine(line); - } - catch (Throwable t) { - // Stick the whole stack trace into a String so we can output it nicely. - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - t.printStackTrace(pw); - pw.flush(); - StringTokenizer tokenizer = new StringTokenizer(sw.toString(), "\r\n"); - synchronized (_bot) { - _bot.log("### Your implementation of PircBot is faulty and you have"); - _bot.log("### allowed an uncaught Exception or Error to propagate in your"); - _bot.log("### code. It may be possible for PircBot to continue operating"); - _bot.log("### normally. Here is the stack trace that was produced: -"); - _bot.log("### "); - while (tokenizer.hasMoreTokens()) { - _bot.log("### " + tokenizer.nextToken()); - } - } - } - } - if (line == null) { - // The server must have disconnected us. - running = false; - } - } - catch (InterruptedIOException iioe) { - // This will happen if we haven't received anything from the server for a while. - // So we shall send it a ping to check that we are still connected. - this.sendRawLine("PING " + (System.currentTimeMillis() / 1000)); - // Now we go back to listening for stuff from the server... - } - } - } - catch (Exception e) { - // Do nothing. - } - - // If we reach this point, then we must have disconnected. - try { - _socket.close(); - } - catch (Exception e) { - // Just assume the socket was already closed. - } - - if (!_disposed) { - _bot.log("*** Disconnected."); - _isConnected = false; - _bot.onDisconnect(); - } - - } - - - /** - * Closes the socket without onDisconnect being called subsequently. - */ - public void dispose () { - try { - _disposed = true; - _socket.close(); - } - catch (Exception e) { - // Do nothing. - } - } - - private PircBot _bot = null; - private Socket _socket = null; - private BufferedReader _breader = null; - private BufferedWriter _bwriter = null; - private boolean _isConnected = true; - private boolean _disposed = false; - - public static final int MAX_LINE_LENGTH = 512; - -} diff --git a/EssentialsUpdate/src/org/jibble/pircbot/IrcException.java b/EssentialsUpdate/src/org/jibble/pircbot/IrcException.java deleted file mode 100755 index d07d8a956..000000000 --- a/EssentialsUpdate/src/org/jibble/pircbot/IrcException.java +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ - -This file is part of PircBot. - -This software is dual-licensed, allowing you to choose between the GNU -General Public License (GPL) and the www.jibble.org Commercial License. -Since the GPL may be too restrictive for use in a proprietary application, -a commercial license is also provided. Full license information can be -found at http://www.jibble.org/licenses/ - -*/ - -package org.jibble.pircbot; - -/** - * An IrcException class. - * - * @since 0.9 - * @author Paul James Mutton, - * <a href="http://www.jibble.org/">http://www.jibble.org/</a> - * @version 1.5.0 (Build time: Mon Dec 14 20:07:17 2009) - */ -public class IrcException extends Exception { - - /** - * Constructs a new IrcException. - * - * @param e The error message to report. - */ - public IrcException(String e) { - super(e); - } - -} diff --git a/EssentialsUpdate/src/org/jibble/pircbot/NickAlreadyInUseException.java b/EssentialsUpdate/src/org/jibble/pircbot/NickAlreadyInUseException.java deleted file mode 100755 index 33887be34..000000000 --- a/EssentialsUpdate/src/org/jibble/pircbot/NickAlreadyInUseException.java +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ - -This file is part of PircBot. - -This software is dual-licensed, allowing you to choose between the GNU -General Public License (GPL) and the www.jibble.org Commercial License. -Since the GPL may be too restrictive for use in a proprietary application, -a commercial license is also provided. Full license information can be -found at http://www.jibble.org/licenses/ - -*/ - - -package org.jibble.pircbot; - -/** - * A NickAlreadyInUseException class. This exception is - * thrown when the PircBot attempts to join an IRC server - * with a user name that is already in use. - * - * @since 0.9 - * @author Paul James Mutton, - * <a href="http://www.jibble.org/">http://www.jibble.org/</a> - * @version 1.5.0 (Build time: Mon Dec 14 20:07:17 2009) - */ -public class NickAlreadyInUseException extends IrcException { - - /** - * Constructs a new IrcException. - * - * @param e The error message to report. - */ - public NickAlreadyInUseException(String e) { - super(e); - } - -} diff --git a/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java b/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java deleted file mode 100755 index 7eddee873..000000000 --- a/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ - -This file is part of PircBot. - -This software is dual-licensed, allowing you to choose between the GNU -General Public License (GPL) and the www.jibble.org Commercial License. -Since the GPL may be too restrictive for use in a proprietary application, -a commercial license is also provided. Full license information can be -found at http://www.jibble.org/licenses/ - -*/ - - -package org.jibble.pircbot; - -import java.io.BufferedWriter; - -/** - * A Thread which is responsible for sending messages to the IRC server. - * Messages are obtained from the outgoing message queue and sent - * immediately if possible. If there is a flood of messages, then to - * avoid getting kicked from a channel, we put a small delay between - * each one. - * - * @author Paul James Mutton, - * <a href="http://www.jibble.org/">http://www.jibble.org/</a> - * @version 1.5.0 (Build time: Mon Dec 14 20:07:17 2009) - */ -public class OutputThread extends Thread { - - - /** - * Constructs an OutputThread for the underlying PircBot. All messages - * sent to the IRC server are sent by this OutputThread to avoid hammering - * the server. Messages are sent immediately if possible. If there are - * multiple messages queued, then there is a delay imposed. - * - * @param bot The underlying PircBot instance. - * @param outQueue The Queue from which we will obtain our messages. - */ - OutputThread(PircBot bot, Queue outQueue) { - _bot = bot; - _outQueue = outQueue; - this.setName(this.getClass() + "-Thread"); - } - - - /** - * A static method to write a line to a BufferedOutputStream and then pass - * the line to the log method of the supplied PircBot instance. - * - * @param bot The underlying PircBot instance. - * @param out The BufferedOutputStream to write to. - * @param line The line to be written. "\r\n" is appended to the end. - * @param encoding The charset to use when encoing this string into a - * byte array. - */ - static void sendRawLine(PircBot bot, BufferedWriter bwriter, String line) { - if (line.length() > bot.getMaxLineLength() - 2) { - line = line.substring(0, bot.getMaxLineLength() - 2); - } - synchronized(bwriter) { - try { - bwriter.write(line + "\r\n"); - bwriter.flush(); - bot.log(">>>" + line); - } - catch (Exception e) { - // Silent response - just lose the line. - } - } - } - - - /** - * This method starts the Thread consuming from the outgoing message - * Queue and sending lines to the server. - */ - public void run() { - try { - boolean running = true; - while (running) { - // Small delay to prevent spamming of the channel - Thread.sleep(_bot.getMessageDelay()); - - String line = (String) _outQueue.next(); - if (line != null) { - _bot.sendRawLine(line); - } - else { - running = false; - } - } - } - catch (InterruptedException e) { - // Just let the method return naturally... - } - } - - private PircBot _bot = null; - private Queue _outQueue = null; - -} diff --git a/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java b/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java deleted file mode 100755 index 28148075f..000000000 --- a/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java +++ /dev/null @@ -1,2809 +0,0 @@ -/* -Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ - -This file is part of PircBot. - -This software is dual-licensed, allowing you to choose between the GNU -General Public License (GPL) and the www.jibble.org Commercial License. -Since the GPL may be too restrictive for use in a proprietary application, -a commercial license is also provided. Full license information can be -found at http://www.jibble.org/licenses/ - -*/ - - -package org.jibble.pircbot; - -import java.io.*; -import java.net.InetAddress; -import java.net.Socket; -import java.util.*; - -/** - * PircBot is a Java framework for writing IRC bots quickly and easily. - * <p> - * It provides an event-driven architecture to handle common IRC - * events, flood protection, DCC support, ident support, and more. - * The comprehensive logfile format is suitable for use with pisg to generate - * channel statistics. - * <p> - * Methods of the PircBot class can be called to send events to the IRC server - * that it connects to. For example, calling the sendMessage method will - * send a message to a channel or user on the IRC server. Multiple servers - * can be supported using multiple instances of PircBot. - * <p> - * To perform an action when the PircBot receives a normal message from the IRC - * server, you would override the onMessage method defined in the PircBot - * class. All on<i>XYZ</i> methods in the PircBot class are automatically called - * when the event <i>XYZ</i> happens, so you would override these if you wish - * to do something when it does happen. - * <p> - * Some event methods, such as onPing, should only really perform a specific - * function (i.e. respond to a PING from the server). For your convenience, such - * methods are already correctly implemented in the PircBot and should not - * normally need to be overridden. Please read the full documentation for each - * method to see which ones are already implemented by the PircBot class. - * <p> - * Please visit the PircBot homepage at - * <a href="http://www.jibble.org/pircbot.php">http://www.jibble.org/pircbot.php</a> - * for full revision history, a beginners guide to creating your first PircBot - * and a list of some existing Java IRC bots and clients that use the PircBot - * framework. - * - * @author Paul James Mutton, - * <a href="http://www.jibble.org/">http://www.jibble.org/</a> - * @version 1.5.0 (Build time: Mon Dec 14 20:07:17 2009) - */ -public abstract class PircBot implements ReplyConstants { - - - /** - * The definitive version number of this release of PircBot. - * (Note: Change this before automatically building releases) - */ - public static final String VERSION = "1.5.0"; - - - private static final int OP_ADD = 1; - private static final int OP_REMOVE = 2; - private static final int VOICE_ADD = 3; - private static final int VOICE_REMOVE = 4; - - - /** - * Constructs a PircBot with the default settings. Your own constructors - * in classes which extend the PircBot abstract class should be responsible - * for changing the default settings if required. - */ - public PircBot() {} - - - /** - * Attempt to connect to the specified IRC server. - * The onConnect method is called upon success. - * - * @param hostname The hostname of the server to connect to. - * - * @throws IOException if it was not possible to connect to the server. - * @throws IrcException if the server would not let us join it. - * @throws NickAlreadyInUseException if our nick is already in use on the server. - */ - public final synchronized void connect(String hostname) throws IOException, IrcException, NickAlreadyInUseException { - this.connect(hostname, 6667, null); - } - - - /** - * Attempt to connect to the specified IRC server and port number. - * The onConnect method is called upon success. - * - * @param hostname The hostname of the server to connect to. - * @param port The port number to connect to on the server. - * - * @throws IOException if it was not possible to connect to the server. - * @throws IrcException if the server would not let us join it. - * @throws NickAlreadyInUseException if our nick is already in use on the server. - */ - public final synchronized void connect(String hostname, int port) throws IOException, IrcException, NickAlreadyInUseException { - this.connect(hostname, port, null); - } - - - /** - * Attempt to connect to the specified IRC server using the supplied - * password. - * The onConnect method is called upon success. - * - * @param hostname The hostname of the server to connect to. - * @param port The port number to connect to on the server. - * @param password The password to use to join the server. - * - * @throws IOException if it was not possible to connect to the server. - * @throws IrcException if the server would not let us join it. - * @throws NickAlreadyInUseException if our nick is already in use on the server. - */ - public final synchronized void connect(String hostname, int port, String password) throws IOException, IrcException, NickAlreadyInUseException { - - _server = hostname; - _port = port; - _password = password; - - if (isConnected()) { - throw new IOException("The PircBot is already connected to an IRC server. Disconnect first."); - } - - // Don't clear the outqueue - there might be something important in it! - - // Clear everything we may have know about channels. - this.removeAllChannels(); - - // Connect to the server. - Socket socket = new Socket(hostname, port); - this.log("*** Connected to server."); - - _inetAddress = socket.getLocalAddress(); - - InputStreamReader inputStreamReader = null; - OutputStreamWriter outputStreamWriter = null; - if (getEncoding() != null) { - // Assume the specified encoding is valid for this JVM. - inputStreamReader = new InputStreamReader(socket.getInputStream(), getEncoding()); - outputStreamWriter = new OutputStreamWriter(socket.getOutputStream(), getEncoding()); - } - else { - // Otherwise, just use the JVM's default encoding. - inputStreamReader = new InputStreamReader(socket.getInputStream()); - outputStreamWriter = new OutputStreamWriter(socket.getOutputStream()); - } - - BufferedReader breader = new BufferedReader(inputStreamReader); - BufferedWriter bwriter = new BufferedWriter(outputStreamWriter); - - // Attempt to join the server. - if (password != null && !password.equals("")) { - OutputThread.sendRawLine(this, bwriter, "PASS " + password); - } - String nick = this.getName(); - OutputThread.sendRawLine(this, bwriter, "NICK " + nick); - OutputThread.sendRawLine(this, bwriter, "USER " + this.getLogin() + " 8 * :" + this.getVersion()); - - _inputThread = new InputThread(this, socket, breader, bwriter); - - // Read stuff back from the server to see if we connected. - String line = null; - int tries = 1; - while ((line = breader.readLine()) != null) { - - this.handleLine(line); - - int firstSpace = line.indexOf(" "); - int secondSpace = line.indexOf(" ", firstSpace + 1); - if (secondSpace >= 0) { - String code = line.substring(firstSpace + 1, secondSpace); - - if (code.equals("004")) { - // We're connected to the server. - break; - } - else if (code.equals("433")) { - if (_autoNickChange) { - tries++; - nick = getName() + tries; - OutputThread.sendRawLine(this, bwriter, "NICK " + nick); - } - else { - socket.close(); - _inputThread = null; - throw new NickAlreadyInUseException(line); - } - } - else if (code.equals("439")) { - // No action required. - } - else if (code.startsWith("5") || code.startsWith("4")) { - socket.close(); - _inputThread = null; - throw new IrcException("Could not log into the IRC server: " + line); - } - } - this.setNick(nick); - - } - - this.log("*** Logged onto server."); - - // This makes the socket timeout on read operations after 5 minutes. - // Maybe in some future version I will let the user change this at runtime. - socket.setSoTimeout(5 * 60 * 1000); - - // Now start the InputThread to read all other lines from the server. - _inputThread.start(); - - // Now start the outputThread that will be used to send all messages. - if (_outputThread == null) { - _outputThread = new OutputThread(this, _outQueue); - _outputThread.start(); - } - - this.onConnect(); - - } - - - /** - * Reconnects to the IRC server that we were previously connected to. - * If necessary, the appropriate port number and password will be used. - * This method will throw an IrcException if we have never connected - * to an IRC server previously. - * - * @since PircBot 0.9.9 - * - * @throws IOException if it was not possible to connect to the server. - * @throws IrcException if the server would not let us join it. - * @throws NickAlreadyInUseException if our nick is already in use on the server. - */ - public final synchronized void reconnect() throws IOException, IrcException, NickAlreadyInUseException{ - if (getServer() == null) { - throw new IrcException("Cannot reconnect to an IRC server because we were never connected to one previously!"); - } - connect(getServer(), getPort(), getPassword()); - } - - - /** - * This method disconnects from the server cleanly by calling the - * quitServer() method. Providing the PircBot was connected to an - * IRC server, the onDisconnect() will be called as soon as the - * disconnection is made by the server. - * - * @see #quitServer() quitServer - * @see #quitServer(String) quitServer - */ - public final synchronized void disconnect() { - this.quitServer(); - } - - - /** - * When you connect to a server and your nick is already in use and - * this is set to true, a new nick will be automatically chosen. - * This is done by adding numbers to the end of the nick until an - * available nick is found. - * - * @param autoNickChange Set to true if you want automatic nick changes - * during connection. - */ - public void setAutoNickChange(boolean autoNickChange) { - _autoNickChange = autoNickChange; - } - - /** - * Joins a channel. - * - * @param channel The name of the channel to join (eg "#cs"). - */ - public final void joinChannel(String channel) { - this.sendRawLine("JOIN " + channel); - } - - - /** - * Joins a channel with a key. - * - * @param channel The name of the channel to join (eg "#cs"). - * @param key The key that will be used to join the channel. - */ - public final void joinChannel(String channel, String key) { - this.joinChannel(channel + " " + key); - } - - - /** - * Parts a channel. - * - * @param channel The name of the channel to leave. - */ - public final void partChannel(String channel) { - this.sendRawLine("PART " + channel); - } - - - /** - * Parts a channel, giving a reason. - * - * @param channel The name of the channel to leave. - * @param reason The reason for parting the channel. - */ - public final void partChannel(String channel, String reason) { - this.sendRawLine("PART " + channel + " :" + reason); - } - - - /** - * Quits from the IRC server. - * Providing we are actually connected to an IRC server, the - * onDisconnect() method will be called as soon as the IRC server - * disconnects us. - */ - public final void quitServer() { - this.quitServer(""); - } - - - /** - * Quits from the IRC server with a reason. - * Providing we are actually connected to an IRC server, the - * onDisconnect() method will be called as soon as the IRC server - * disconnects us. - * - * @param reason The reason for quitting the server. - */ - public final void quitServer(String reason) { - this.sendRawLine("QUIT :" + reason); - } - - - /** - * Sends a raw line to the IRC server as soon as possible, bypassing the - * outgoing message queue. - * - * @param line The raw line to send to the IRC server. - */ - public final synchronized void sendRawLine(String line) { - if (isConnected()) { - _inputThread.sendRawLine(line); - } - } - - /** - * Sends a raw line through the outgoing message queue. - * - * @param line The raw line to send to the IRC server. - */ - public final synchronized void sendRawLineViaQueue(String line) { - if (line == null) { - throw new NullPointerException("Cannot send null messages to server"); - } - if (isConnected()) { - _outQueue.add(line); - } - } - - - /** - * Sends a message to a channel or a private message to a user. These - * messages are added to the outgoing message queue and sent at the - * earliest possible opportunity. - * <p> - * Some examples: - - * <pre> // Send the message "Hello!" to the channel #cs. - * sendMessage("#cs", "Hello!"); - * - * // Send a private message to Paul that says "Hi". - * sendMessage("Paul", "Hi");</pre> - * - * You may optionally apply colours, boldness, underlining, etc to - * the message by using the <code>Colors</code> class. - * - * @param target The name of the channel or user nick to send to. - * @param message The message to send. - * - * @see Colors - */ - public final void sendMessage(String target, String message) { - _outQueue.add("PRIVMSG " + target + " :" + message); - } - - - /** - * Sends an action to the channel or to a user. - * - * @param target The name of the channel or user nick to send to. - * @param action The action to send. - * - * @see Colors - */ - public final void sendAction(String target, String action) { - sendCTCPCommand(target, "ACTION " + action); - } - - - /** - * Sends a notice to the channel or to a user. - * - * @param target The name of the channel or user nick to send to. - * @param notice The notice to send. - */ - public final void sendNotice(String target, String notice) { - _outQueue.add("NOTICE " + target + " :" + notice); - } - - - /** - * Sends a CTCP command to a channel or user. (Client to client protocol). - * Examples of such commands are "PING <number>", "FINGER", "VERSION", etc. - * For example, if you wish to request the version of a user called "Dave", - * then you would call <code>sendCTCPCommand("Dave", "VERSION");</code>. - * The type of response to such commands is largely dependant on the target - * client software. - * - * @since PircBot 0.9.5 - * - * @param target The name of the channel or user to send the CTCP message to. - * @param command The CTCP command to send. - */ - public final void sendCTCPCommand(String target, String command) { - _outQueue.add("PRIVMSG " + target + " :\u0001" + command + "\u0001"); - } - - - /** - * Attempt to change the current nick (nickname) of the bot when it - * is connected to an IRC server. - * After confirmation of a successful nick change, the getNick method - * will return the new nick. - * - * @param newNick The new nick to use. - */ - public final void changeNick(String newNick) { - this.sendRawLine("NICK " + newNick); - } - - - /** - * Identify the bot with NickServ, supplying the appropriate password. - * Some IRC Networks (such as freenode) require users to <i>register</i> and - * <i>identify</i> with NickServ before they are able to send private messages - * to other users, thus reducing the amount of spam. If you are using - * an IRC network where this kind of policy is enforced, you will need - * to make your bot <i>identify</i> itself to NickServ before you can send - * private messages. Assuming you have already registered your bot's - * nick with NickServ, this method can be used to <i>identify</i> with - * the supplied password. It usually makes sense to identify with NickServ - * immediately after connecting to a server. - * <p> - * This method issues a raw NICKSERV command to the server, and is therefore - * safer than the alternative approach of sending a private message to - * NickServ. The latter approach is considered dangerous, as it may cause - * you to inadvertently transmit your password to an untrusted party if you - * connect to a network which does not run a NickServ service and where the - * untrusted party has assumed the nick "NickServ". However, if your IRC - * network is only compatible with the private message approach, you may - * typically identify like so: - * <pre>sendMessage("NickServ", "identify PASSWORD");</pre> - * - * @param password The password which will be used to identify with NickServ. - */ - public final void identify(String password) { - this.sendRawLine("NICKSERV IDENTIFY " + password); - } - - - /** - * Set the mode of a channel. - * This method attempts to set the mode of a channel. This - * may require the bot to have operator status on the channel. - * For example, if the bot has operator status, we can grant - * operator status to "Dave" on the #cs channel - * by calling setMode("#cs", "+o Dave"); - * An alternative way of doing this would be to use the op method. - * - * @param channel The channel on which to perform the mode change. - * @param mode The new mode to apply to the channel. This may include - * zero or more arguments if necessary. - * - * @see #op(String,String) op - */ - public final void setMode(String channel, String mode) { - this.sendRawLine("MODE " + channel + " " + mode); - } - - - /** - * Sends an invitation to join a channel. Some channels can be marked - * as "invite-only", so it may be useful to allow a bot to invite people - * into it. - * - * @param nick The nick of the user to invite - * @param channel The channel you are inviting the user to join. - * - */ - public final void sendInvite(String nick, String channel) { - this.sendRawLine("INVITE " + nick + " :" + channel); - } - - - /** - * Bans a user from a channel. An example of a valid hostmask is - * "*!*compu@*.18hp.net". This may be used in conjunction with the - * kick method to permanently remove a user from a channel. - * Successful use of this method may require the bot to have operator - * status itself. - * - * @param channel The channel to ban the user from. - * @param hostmask A hostmask representing the user we're banning. - */ - public final void ban(String channel, String hostmask) { - this.sendRawLine("MODE " + channel + " +b " + hostmask); - } - - - /** - * Unbans a user from a channel. An example of a valid hostmask is - * "*!*compu@*.18hp.net". - * Successful use of this method may require the bot to have operator - * status itself. - * - * @param channel The channel to unban the user from. - * @param hostmask A hostmask representing the user we're unbanning. - */ - public final void unBan(String channel, String hostmask) { - this.sendRawLine("MODE " + channel + " -b " + hostmask); - } - - - /** - * Grants operator privilidges to a user on a channel. - * Successful use of this method may require the bot to have operator - * status itself. - * - * @param channel The channel we're opping the user on. - * @param nick The nick of the user we are opping. - */ - public final void op(String channel, String nick) { - this.setMode(channel, "+o " + nick); - } - - - /** - * Removes operator privilidges from a user on a channel. - * Successful use of this method may require the bot to have operator - * status itself. - * - * @param channel The channel we're deopping the user on. - * @param nick The nick of the user we are deopping. - */ - public final void deOp(String channel, String nick) { - this.setMode(channel, "-o " + nick); - } - - - /** - * Grants voice privilidges to a user on a channel. - * Successful use of this method may require the bot to have operator - * status itself. - * - * @param channel The channel we're voicing the user on. - * @param nick The nick of the user we are voicing. - */ - public final void voice(String channel, String nick) { - this.setMode(channel, "+v " + nick); - } - - - /** - * Removes voice privilidges from a user on a channel. - * Successful use of this method may require the bot to have operator - * status itself. - * - * @param channel The channel we're devoicing the user on. - * @param nick The nick of the user we are devoicing. - */ - public final void deVoice(String channel, String nick) { - this.setMode(channel, "-v " + nick); - } - - - /** - * Set the topic for a channel. - * This method attempts to set the topic of a channel. This - * may require the bot to have operator status if the topic - * is protected. - * - * @param channel The channel on which to perform the mode change. - * @param topic The new topic for the channel. - * - */ - public final void setTopic(String channel, String topic) { - this.sendRawLine("TOPIC " + channel + " :" + topic); - } - - - /** - * Kicks a user from a channel. - * This method attempts to kick a user from a channel and - * may require the bot to have operator status in the channel. - * - * @param channel The channel to kick the user from. - * @param nick The nick of the user to kick. - */ - public final void kick(String channel, String nick) { - this.kick(channel, nick, ""); - } - - - /** - * Kicks a user from a channel, giving a reason. - * This method attempts to kick a user from a channel and - * may require the bot to have operator status in the channel. - * - * @param channel The channel to kick the user from. - * @param nick The nick of the user to kick. - * @param reason A description of the reason for kicking a user. - */ - public final void kick(String channel, String nick, String reason) { - this.sendRawLine("KICK " + channel + " " + nick + " :" + reason); - } - - - /** - * Issues a request for a list of all channels on the IRC server. - * When the PircBot receives information for each channel, it will - * call the onChannelInfo method, which you will need to override - * if you want it to do anything useful. - * - * @see #onChannelInfo(String,int,String) onChannelInfo - */ - public final void listChannels() { - this.listChannels(null); - } - - - /** - * Issues a request for a list of all channels on the IRC server. - * When the PircBot receives information for each channel, it will - * call the onChannelInfo method, which you will need to override - * if you want it to do anything useful. - * <p> - * Some IRC servers support certain parameters for LIST requests. - * One example is a parameter of ">10" to list only those channels - * that have more than 10 users in them. Whether these parameters - * are supported or not will depend on the IRC server software. - * - * @param parameters The parameters to supply when requesting the - * list. - * - * @see #onChannelInfo(String,int,String) onChannelInfo - */ - public final void listChannels(String parameters) { - if (parameters == null) { - this.sendRawLine("LIST"); - } - else { - this.sendRawLine("LIST " + parameters); - } - } - - /** - * Adds a line to the log. This log is currently output to the standard - * output and is in the correct format for use by tools such as pisg, the - * Perl IRC Statistics Generator. You may override this method if you wish - * to do something else with log entries. - * Each line in the log begins with a number which - * represents the logging time (as the number of milliseconds since the - * epoch). This timestamp and the following log entry are separated by - * a single space character, " ". Outgoing messages are distinguishable - * by a log entry that has ">>>" immediately following the space character - * after the timestamp. DCC events use "+++" and warnings about unhandled - * Exceptions and Errors use "###". - * <p> - * This implementation of the method will only cause log entries to be - * output if the PircBot has had its verbose mode turned on by calling - * setVerbose(true); - * - * @param line The line to add to the log. - */ - public void log(String line) { - if (_verbose) { - System.out.println(System.currentTimeMillis() + " " + line); - } - } - - - /** - * This method handles events when any line of text arrives from the server, - * then calling the appropriate method in the PircBot. This method is - * protected and only called by the InputThread for this instance. - * <p> - * This method may not be overridden! - * - * @param line The raw line of text from the server. - */ - protected void handleLine(String line) { - this.log(line); - - // Check for server pings. - if (line.startsWith("PING ")) { - // Respond to the ping and return immediately. - this.onServerPing(line.substring(5)); - return; - } - - String sourceNick = ""; - String sourceLogin = ""; - String sourceHostname = ""; - - StringTokenizer tokenizer = new StringTokenizer(line); - String senderInfo = tokenizer.nextToken(); - String command = tokenizer.nextToken(); - String target = null; - - int exclamation = senderInfo.indexOf("!"); - int at = senderInfo.indexOf("@"); - if (senderInfo.startsWith(":")) { - if (exclamation > 0 && at > 0 && exclamation < at) { - sourceNick = senderInfo.substring(1, exclamation); - sourceLogin = senderInfo.substring(exclamation + 1, at); - sourceHostname = senderInfo.substring(at + 1); - } - else { - - if (tokenizer.hasMoreTokens()) { - String token = command; - - int code = -1; - try { - code = Integer.parseInt(token); - } - catch (NumberFormatException e) { - // Keep the existing value. - } - - if (code != -1) { - String errorStr = token; - String response = line.substring(line.indexOf(errorStr, senderInfo.length()) + 4, line.length()); - this.processServerResponse(code, response); - // Return from the method. - return; - } - else { - // This is not a server response. - // It must be a nick without login and hostname. - // (or maybe a NOTICE or suchlike from the server) - sourceNick = senderInfo; - target = token; - } - } - else { - // We don't know what this line means. - this.onUnknown(line); - // Return from the method; - return; - } - - } - } - - command = command.toUpperCase(Locale.ENGLISH); - if (sourceNick.startsWith(":")) { - sourceNick = sourceNick.substring(1); - } - if (target == null) { - target = tokenizer.nextToken(); - } - if (target.startsWith(":")) { - target = target.substring(1); - } - - // Check for CTCP requests. - if (command.equals("PRIVMSG") && line.indexOf(":\u0001") > 0 && line.endsWith("\u0001")) { - String request = line.substring(line.indexOf(":\u0001") + 2, line.length() - 1); - if (request.equals("VERSION")) { - // VERSION request - this.onVersion(sourceNick, sourceLogin, sourceHostname, target); - } - else if (request.startsWith("ACTION ")) { - // ACTION request - this.onAction(sourceNick, sourceLogin, sourceHostname, target, request.substring(7)); - } - else if (request.startsWith("PING ")) { - // PING request - this.onPing(sourceNick, sourceLogin, sourceHostname, target, request.substring(5)); - } - else if (request.equals("TIME")) { - // TIME request - this.onTime(sourceNick, sourceLogin, sourceHostname, target); - } - else if (request.equals("FINGER")) { - // FINGER request - this.onFinger(sourceNick, sourceLogin, sourceHostname, target); - } - else { - // An unknown CTCP message - ignore it. - this.onUnknown(line); - } - } - else if (command.equals("PRIVMSG") && _channelPrefixes.indexOf(target.charAt(0)) >= 0) { - // This is a normal message to a channel. - this.onMessage(target, sourceNick, sourceLogin, sourceHostname, line.substring(line.indexOf(" :") + 2)); - } - else if (command.equals("PRIVMSG")) { - // This is a private message to us. - this.onPrivateMessage(sourceNick, sourceLogin, sourceHostname, line.substring(line.indexOf(" :") + 2)); - } - else if (command.equals("JOIN")) { - // Someone is joining a channel. - String channel = target; - this.addUser(channel, new User("", sourceNick)); - this.onJoin(channel, sourceNick, sourceLogin, sourceHostname); - } - else if (command.equals("PART")) { - // Someone is parting from a channel. - this.removeUser(target, sourceNick); - if (sourceNick.equals(this.getNick())) { - this.removeChannel(target); - } - this.onPart(target, sourceNick, sourceLogin, sourceHostname); - } - else if (command.equals("NICK")) { - // Somebody is changing their nick. - String newNick = target; - this.renameUser(sourceNick, newNick); - if (sourceNick.equals(this.getNick())) { - // Update our nick if it was us that changed nick. - this.setNick(newNick); - } - this.onNickChange(sourceNick, sourceLogin, sourceHostname, newNick); - } - else if (command.equals("NOTICE")) { - // Someone is sending a notice. - this.onNotice(sourceNick, sourceLogin, sourceHostname, target, line.substring(line.indexOf(" :") + 2)); - } - else if (command.equals("QUIT")) { - // Someone has quit from the IRC server. - if (sourceNick.equals(this.getNick())) { - this.removeAllChannels(); - } - else { - this.removeUser(sourceNick); - } - this.onQuit(sourceNick, sourceLogin, sourceHostname, line.substring(line.indexOf(" :") + 2)); - } - else if (command.equals("KICK")) { - // Somebody has been kicked from a channel. - String recipient = tokenizer.nextToken(); - if (recipient.equals(this.getNick())) { - this.removeChannel(target); - } - this.removeUser(target, recipient); - this.onKick(target, sourceNick, sourceLogin, sourceHostname, recipient, line.substring(line.indexOf(" :") + 2)); - } - else if (command.equals("MODE")) { - // Somebody is changing the mode on a channel or user. - String mode = line.substring(line.indexOf(target, 2) + target.length() + 1); - if (mode.startsWith(":")) { - mode = mode.substring(1); - } - this.processMode(target, sourceNick, sourceLogin, sourceHostname, mode); - } - else if (command.equals("TOPIC")) { - // Someone is changing the topic. - this.onTopic(target, line.substring(line.indexOf(" :") + 2), sourceNick, System.currentTimeMillis(), true); - } - else if (command.equals("INVITE")) { - // Somebody is inviting somebody else into a channel. - this.onInvite(target, sourceNick, sourceLogin, sourceHostname, line.substring(line.indexOf(" :") + 2)); - } - else { - // If we reach this point, then we've found something that the PircBot - // Doesn't currently deal with. - this.onUnknown(line); - } - - } - - - /** - * This method is called once the PircBot has successfully connected to - * the IRC server. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.6 - */ - protected void onConnect() {} - - - /** - * This method carries out the actions to be performed when the PircBot - * gets disconnected. This may happen if the PircBot quits from the - * server, or if the connection is unexpectedly lost. - * <p> - * Disconnection from the IRC server is detected immediately if either - * we or the server close the connection normally. If the connection to - * the server is lost, but neither we nor the server have explicitly closed - * the connection, then it may take a few minutes to detect (this is - * commonly referred to as a "ping timeout"). - * <p> - * If you wish to get your IRC bot to automatically rejoin a server after - * the connection has been lost, then this is probably the ideal method to - * override to implement such functionality. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - */ - protected void onDisconnect() {} - - - /** - * This method is called by the PircBot when a numeric response - * is received from the IRC server. We use this method to - * allow PircBot to process various responses from the server - * before then passing them on to the onServerResponse method. - * <p> - * Note that this method is private and should not appear in any - * of the javadoc generated documenation. - * - * @param code The three-digit numerical code for the response. - * @param response The full response from the IRC server. - */ - private final void processServerResponse(int code, String response) { - - if (code == RPL_LIST) { - // This is a bit of information about a channel. - int firstSpace = response.indexOf(' '); - int secondSpace = response.indexOf(' ', firstSpace + 1); - int thirdSpace = response.indexOf(' ', secondSpace + 1); - int colon = response.indexOf(':'); - String channel = response.substring(firstSpace + 1, secondSpace); - int userCount = 0; - try { - userCount = Integer.parseInt(response.substring(secondSpace + 1, thirdSpace)); - } - catch (NumberFormatException e) { - // Stick with the value of zero. - } - String topic = response.substring(colon + 1); - this.onChannelInfo(channel, userCount, topic); - } - else if (code == RPL_TOPIC) { - // This is topic information about a channel we've just joined. - int firstSpace = response.indexOf(' '); - int secondSpace = response.indexOf(' ', firstSpace + 1); - int colon = response.indexOf(':'); - String channel = response.substring(firstSpace + 1, secondSpace); - String topic = response.substring(colon + 1); - - _topics.put(channel, topic); - - // For backwards compatibility only - this onTopic method is deprecated. - this.onTopic(channel, topic); - } - else if (code == RPL_TOPICINFO) { - StringTokenizer tokenizer = new StringTokenizer(response); - tokenizer.nextToken(); - String channel = tokenizer.nextToken(); - String setBy = tokenizer.nextToken(); - long date = 0; - try { - date = Long.parseLong(tokenizer.nextToken()) * 1000; - } - catch (NumberFormatException e) { - // Stick with the default value of zero. - } - - String topic = (String) _topics.get(channel); - _topics.remove(channel); - - this.onTopic(channel, topic, setBy, date, false); - } - else if (code == RPL_NAMREPLY) { - // This is a list of nicks in a channel that we've just joined. - int channelEndIndex = response.indexOf(" :"); - String channel = response.substring(response.lastIndexOf(' ', channelEndIndex - 1) + 1, channelEndIndex); - - StringTokenizer tokenizer = new StringTokenizer(response.substring(response.indexOf(" :") + 2)); - while (tokenizer.hasMoreTokens()) { - String nick = tokenizer.nextToken(); - String prefix = ""; - if (nick.startsWith("@")) { - // User is an operator in this channel. - prefix = "@"; - } - else if (nick.startsWith("+")) { - // User is voiced in this channel. - prefix = "+"; - } - else if (nick.startsWith(".")) { - // Some wibbly status I've never seen before... - prefix = "."; - } - nick = nick.substring(prefix.length()); - this.addUser(channel, new User(prefix, nick)); - } - } - else if (code == RPL_ENDOFNAMES) { - // This is the end of a NAMES list, so we know that we've got - // the full list of users in the channel that we just joined. - String channel = response.substring(response.indexOf(' ') + 1, response.indexOf(" :")); - User[] users = this.getUsers(channel); - this.onUserList(channel, users); - } - - this.onServerResponse(code, response); - } - - - /** - * This method is called when we receive a numeric response from the - * IRC server. - * <p> - * Numerics in the range from 001 to 099 are used for client-server - * connections only and should never travel between servers. Replies - * generated in response to commands are found in the range from 200 - * to 399. Error replies are found in the range from 400 to 599. - * <p> - * For example, we can use this method to discover the topic of a - * channel when we join it. If we join the channel #test which - * has a topic of "I am King of Test" then the response - * will be "<code>PircBot #test :I Am King of Test</code>" - * with a code of 332 to signify that this is a topic. - * (This is just an example - note that overriding the - * <code>onTopic</code> method is an easier way of finding the - * topic for a channel). Check the IRC RFC for the full list of other - * command response codes. - * <p> - * PircBot implements the interface ReplyConstants, which contains - * contstants that you may find useful here. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param code The three-digit numerical code for the response. - * @param response The full response from the IRC server. - * - * @see ReplyConstants - */ - protected void onServerResponse(int code, String response) {} - - - /** - * This method is called when we receive a user list from the server - * after joining a channel. - * <p> - * Shortly after joining a channel, the IRC server sends a list of all - * users in that channel. The PircBot collects this information and - * calls this method as soon as it has the full list. - * <p> - * To obtain the nick of each user in the channel, call the getNick() - * method on each User object in the array. - * <p> - * At a later time, you may call the getUsers method to obtain an - * up to date list of the users in the channel. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 1.0.0 - * - * @param channel The name of the channel. - * @param users An array of User objects belonging to this channel. - * - * @see User - */ - protected void onUserList(String channel, User[] users) {} - - - /** - * This method is called whenever a message is sent to a channel. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param channel The channel to which the message was sent. - * @param sender The nick of the person who sent the message. - * @param login The login of the person who sent the message. - * @param hostname The hostname of the person who sent the message. - * @param message The actual message sent to the channel. - */ - protected void onMessage(String channel, String sender, String login, String hostname, String message) {} - - - /** - * This method is called whenever a private message is sent to the PircBot. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param sender The nick of the person who sent the private message. - * @param login The login of the person who sent the private message. - * @param hostname The hostname of the person who sent the private message. - * @param message The actual message. - */ - protected void onPrivateMessage(String sender, String login, String hostname, String message) {} - - - /** - * This method is called whenever an ACTION is sent from a user. E.g. - * such events generated by typing "/me goes shopping" in most IRC clients. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param sender The nick of the user that sent the action. - * @param login The login of the user that sent the action. - * @param hostname The hostname of the user that sent the action. - * @param target The target of the action, be it a channel or our nick. - * @param action The action carried out by the user. - */ - protected void onAction(String sender, String login, String hostname, String target, String action) {} - - - /** - * This method is called whenever we receive a notice. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param sourceNick The nick of the user that sent the notice. - * @param sourceLogin The login of the user that sent the notice. - * @param sourceHostname The hostname of the user that sent the notice. - * @param target The target of the notice, be it our nick or a channel name. - * @param notice The notice message. - */ - protected void onNotice(String sourceNick, String sourceLogin, String sourceHostname, String target, String notice) {} - - - /** - * This method is called whenever someone (possibly us) joins a channel - * which we are on. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param channel The channel which somebody joined. - * @param sender The nick of the user who joined the channel. - * @param login The login of the user who joined the channel. - * @param hostname The hostname of the user who joined the channel. - */ - protected void onJoin(String channel, String sender, String login, String hostname) {} - - - /** - * This method is called whenever someone (possibly us) parts a channel - * which we are on. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param channel The channel which somebody parted from. - * @param sender The nick of the user who parted from the channel. - * @param login The login of the user who parted from the channel. - * @param hostname The hostname of the user who parted from the channel. - */ - protected void onPart(String channel, String sender, String login, String hostname) {} - - - /** - * This method is called whenever someone (possibly us) changes nick on any - * of the channels that we are on. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param oldNick The old nick. - * @param login The login of the user. - * @param hostname The hostname of the user. - * @param newNick The new nick. - */ - protected void onNickChange(String oldNick, String login, String hostname, String newNick) {} - - - /** - * This method is called whenever someone (possibly us) is kicked from - * any of the channels that we are in. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param channel The channel from which the recipient was kicked. - * @param kickerNick The nick of the user who performed the kick. - * @param kickerLogin The login of the user who performed the kick. - * @param kickerHostname The hostname of the user who performed the kick. - * @param recipientNick The unfortunate recipient of the kick. - * @param reason The reason given by the user who performed the kick. - */ - protected void onKick(String channel, String kickerNick, String kickerLogin, String kickerHostname, String recipientNick, String reason) {} - - - /** - * This method is called whenever someone (possibly us) quits from the - * server. We will only observe this if the user was in one of the - * channels to which we are connected. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param sourceNick The nick of the user that quit from the server. - * @param sourceLogin The login of the user that quit from the server. - * @param sourceHostname The hostname of the user that quit from the server. - * @param reason The reason given for quitting the server. - */ - protected void onQuit(String sourceNick, String sourceLogin, String sourceHostname, String reason) {} - - - /** - * This method is called whenever a user sets the topic, or when - * PircBot joins a new channel and discovers its topic. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param channel The channel that the topic belongs to. - * @param topic The topic for the channel. - * - * @deprecated As of 1.2.0, replaced by {@link #onTopic(String,String,String,long,boolean)} - */ - protected void onTopic(String channel, String topic) {} - - - /** - * This method is called whenever a user sets the topic, or when - * PircBot joins a new channel and discovers its topic. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param channel The channel that the topic belongs to. - * @param topic The topic for the channel. - * @param setBy The nick of the user that set the topic. - * @param date When the topic was set (milliseconds since the epoch). - * @param changed True if the topic has just been changed, false if - * the topic was already there. - * - */ - protected void onTopic(String channel, String topic, String setBy, long date, boolean changed) {} - - - /** - * After calling the listChannels() method in PircBot, the server - * will start to send us information about each channel on the - * server. You may override this method in order to receive the - * information about each channel as soon as it is received. - * <p> - * Note that certain channels, such as those marked as hidden, - * may not appear in channel listings. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param channel The name of the channel. - * @param userCount The number of users visible in this channel. - * @param topic The topic for this channel. - * - * @see #listChannels() listChannels - */ - protected void onChannelInfo(String channel, int userCount, String topic) {} - - - /** - * Called when the mode of a channel is set. We process this in - * order to call the appropriate onOp, onDeop, etc method before - * finally calling the override-able onMode method. - * <p> - * Note that this method is private and is not intended to appear - * in the javadoc generated documentation. - * - * @param target The channel or nick that the mode operation applies to. - * @param sourceNick The nick of the user that set the mode. - * @param sourceLogin The login of the user that set the mode. - * @param sourceHostname The hostname of the user that set the mode. - * @param mode The mode that has been set. - */ - private final void processMode(String target, String sourceNick, String sourceLogin, String sourceHostname, String mode) { - - if (_channelPrefixes.indexOf(target.charAt(0)) >= 0) { - // The mode of a channel is being changed. - String channel = target; - StringTokenizer tok = new StringTokenizer(mode); - String[] params = new String[tok.countTokens()]; - - int t = 0; - while (tok.hasMoreTokens()) { - params[t] = tok.nextToken(); - t++; - } - - char pn = ' '; - int p = 1; - - // All of this is very large and ugly, but it's the only way of providing - // what the users want :-/ - for (int i = 0; i < params[0].length(); i++) { - char atPos = params[0].charAt(i); - - if (atPos == '+' || atPos == '-') { - pn = atPos; - } - else if (atPos == 'o') { - if (pn == '+') { - this.updateUser(channel, OP_ADD, params[p]); - onOp(channel, sourceNick, sourceLogin, sourceHostname, params[p]); - } - else { - this.updateUser(channel, OP_REMOVE, params[p]); - onDeop(channel, sourceNick, sourceLogin, sourceHostname, params[p]); - } - p++; - } - else if (atPos == 'v') { - if (pn == '+') { - this.updateUser(channel, VOICE_ADD, params[p]); - onVoice(channel, sourceNick, sourceLogin, sourceHostname, params[p]); - } - else { - this.updateUser(channel, VOICE_REMOVE, params[p]); - onDeVoice(channel, sourceNick, sourceLogin, sourceHostname, params[p]); - } - p++; - } - else if (atPos == 'k') { - if (pn == '+') { - onSetChannelKey(channel, sourceNick, sourceLogin, sourceHostname, params[p]); - } - else { - onRemoveChannelKey(channel, sourceNick, sourceLogin, sourceHostname, params[p]); - } - p++; - } - else if (atPos == 'l') { - if (pn == '+') { - onSetChannelLimit(channel, sourceNick, sourceLogin, sourceHostname, Integer.parseInt(params[p])); - p++; - } - else { - onRemoveChannelLimit(channel, sourceNick, sourceLogin, sourceHostname); - } - } - else if (atPos == 'b') { - if (pn == '+') { - onSetChannelBan(channel, sourceNick, sourceLogin, sourceHostname,params[p]); - } - else { - onRemoveChannelBan(channel, sourceNick, sourceLogin, sourceHostname, params[p]); - } - p++; - } - else if (atPos == 't') { - if (pn == '+') { - onSetTopicProtection(channel, sourceNick, sourceLogin, sourceHostname); - } - else { - onRemoveTopicProtection(channel, sourceNick, sourceLogin, sourceHostname); - } - } - else if (atPos == 'n') { - if (pn == '+') { - onSetNoExternalMessages(channel, sourceNick, sourceLogin, sourceHostname); - } - else { - onRemoveNoExternalMessages(channel, sourceNick, sourceLogin, sourceHostname); - } - } - else if (atPos == 'i') { - if (pn == '+') { - onSetInviteOnly(channel, sourceNick, sourceLogin, sourceHostname); - } - else { - onRemoveInviteOnly(channel, sourceNick, sourceLogin, sourceHostname); - } - } - else if (atPos == 'm') { - if (pn == '+') { - onSetModerated(channel, sourceNick, sourceLogin, sourceHostname); - } - else { - onRemoveModerated(channel, sourceNick, sourceLogin, sourceHostname); - } - } - else if (atPos == 'p') { - if (pn == '+') { - onSetPrivate(channel, sourceNick, sourceLogin, sourceHostname); - } - else { - onRemovePrivate(channel, sourceNick, sourceLogin, sourceHostname); - } - } - else if (atPos == 's') { - if (pn == '+') { - onSetSecret(channel, sourceNick, sourceLogin, sourceHostname); - } - else { - onRemoveSecret(channel, sourceNick, sourceLogin, sourceHostname); - } - } - } - - this.onMode(channel, sourceNick, sourceLogin, sourceHostname, mode); - } - else { - // The mode of a user is being changed. - String nick = target; - this.onUserMode(nick, sourceNick, sourceLogin, sourceHostname, mode); - } - } - - - /** - * Called when the mode of a channel is set. - * <p> - * You may find it more convenient to decode the meaning of the mode - * string by overriding the onOp, onDeOp, onVoice, onDeVoice, - * onChannelKey, onDeChannelKey, onChannelLimit, onDeChannelLimit, - * onChannelBan or onDeChannelBan methods as appropriate. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param channel The channel that the mode operation applies to. - * @param sourceNick The nick of the user that set the mode. - * @param sourceLogin The login of the user that set the mode. - * @param sourceHostname The hostname of the user that set the mode. - * @param mode The mode that has been set. - * - */ - protected void onMode(String channel, String sourceNick, String sourceLogin, String sourceHostname, String mode) {} - - - /** - * Called when the mode of a user is set. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 1.2.0 - * - * @param targetNick The nick that the mode operation applies to. - * @param sourceNick The nick of the user that set the mode. - * @param sourceLogin The login of the user that set the mode. - * @param sourceHostname The hostname of the user that set the mode. - * @param mode The mode that has been set. - * - */ - protected void onUserMode(String targetNick, String sourceNick, String sourceLogin, String sourceHostname, String mode) {} - - - - /** - * Called when a user (possibly us) gets granted operator status for a channel. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - * @param recipient The nick of the user that got 'opped'. - */ - protected void onOp(String channel, String sourceNick, String sourceLogin, String sourceHostname, String recipient) {} - - - /** - * Called when a user (possibly us) gets operator status taken away. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - * @param recipient The nick of the user that got 'deopped'. - */ - protected void onDeop(String channel, String sourceNick, String sourceLogin, String sourceHostname, String recipient) {} - - - /** - * Called when a user (possibly us) gets voice status granted in a channel. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - * @param recipient The nick of the user that got 'voiced'. - */ - protected void onVoice(String channel, String sourceNick, String sourceLogin, String sourceHostname, String recipient) {} - - - /** - * Called when a user (possibly us) gets voice status removed. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - * @param recipient The nick of the user that got 'devoiced'. - */ - protected void onDeVoice(String channel, String sourceNick, String sourceLogin, String sourceHostname, String recipient) {} - - - /** - * Called when a channel key is set. When the channel key has been set, - * other users may only join that channel if they know the key. Channel keys - * are sometimes referred to as passwords. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - * @param key The new key for the channel. - */ - protected void onSetChannelKey(String channel, String sourceNick, String sourceLogin, String sourceHostname, String key) {} - - - /** - * Called when a channel key is removed. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - * @param key The key that was in use before the channel key was removed. - */ - protected void onRemoveChannelKey(String channel, String sourceNick, String sourceLogin, String sourceHostname, String key) {} - - - /** - * Called when a user limit is set for a channel. The number of users in - * the channel cannot exceed this limit. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - * @param limit The maximum number of users that may be in this channel at the same time. - */ - protected void onSetChannelLimit(String channel, String sourceNick, String sourceLogin, String sourceHostname, int limit) {} - - - /** - * Called when the user limit is removed for a channel. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onRemoveChannelLimit(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a user (possibly us) gets banned from a channel. Being - * banned from a channel prevents any user with a matching hostmask from - * joining the channel. For this reason, most bans are usually directly - * followed by the user being kicked :-) - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - * @param hostmask The hostmask of the user that has been banned. - */ - protected void onSetChannelBan(String channel, String sourceNick, String sourceLogin, String sourceHostname, String hostmask) {} - - - /** - * Called when a hostmask ban is removed from a channel. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - * @param hostmask - */ - protected void onRemoveChannelBan(String channel, String sourceNick, String sourceLogin, String sourceHostname, String hostmask) {} - - - /** - * Called when topic protection is enabled for a channel. Topic protection - * means that only operators in a channel may change the topic. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onSetTopicProtection(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when topic protection is removed for a channel. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onRemoveTopicProtection(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel is set to only allow messages from users that - * are in the channel. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onSetNoExternalMessages(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel is set to allow messages from any user, even - * if they are not actually in the channel. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onRemoveNoExternalMessages(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel is set to 'invite only' mode. A user may only - * join the channel if they are invited by someone who is already in the - * channel. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onSetInviteOnly(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel has 'invite only' removed. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onRemoveInviteOnly(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel is set to 'moderated' mode. If a channel is - * moderated, then only users who have been 'voiced' or 'opped' may speak - * or change their nicks. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onSetModerated(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel has moderated mode removed. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onRemoveModerated(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel is marked as being in private mode. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onSetPrivate(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel is marked as not being in private mode. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onRemovePrivate(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel is set to be in 'secret' mode. Such channels - * typically do not appear on a server's channel listing. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onSetSecret(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when a channel has 'secret' mode removed. - * <p> - * This is a type of mode change and is also passed to the onMode - * method in the PircBot class. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param channel The channel in which the mode change took place. - * @param sourceNick The nick of the user that performed the mode change. - * @param sourceLogin The login of the user that performed the mode change. - * @param sourceHostname The hostname of the user that performed the mode change. - */ - protected void onRemoveSecret(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} - - - /** - * Called when we are invited to a channel by a user. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @since PircBot 0.9.5 - * - * @param targetNick The nick of the user being invited - should be us! - * @param sourceNick The nick of the user that sent the invitation. - * @param sourceLogin The login of the user that sent the invitation. - * @param sourceHostname The hostname of the user that sent the invitation. - * @param channel The channel that we're being invited to. - */ - protected void onInvite(String targetNick, String sourceNick, String sourceLogin, String sourceHostname, String channel) {} - - - /** - * This method used to be called when a DCC SEND request was sent to the PircBot. - * Please use the onIncomingFileTransfer method to receive files, as it - * has better functionality and supports resuming. - * - * @deprecated As of PircBot 1.2.0, use {@link #onIncomingFileTransfer(DccFileTransfer)} - */ - protected void onDccSendRequest(String sourceNick, String sourceLogin, String sourceHostname, String filename, long address, int port, int size) {} - - - /** - * This method used to be called when a DCC CHAT request was sent to the PircBot. - * Please use the onIncomingChatRequest method to accept chats, as it - * has better functionality. - * - * @deprecated As of PircBot 1.2.0, use {@link #onIncomingChatRequest(DccChat)} - */ - protected void onDccChatRequest(String sourceNick, String sourceLogin, String sourceHostname, long address, int port) {} - - - /** - * This method is called whenever we receive a VERSION request. - * This abstract implementation responds with the PircBot's _version string, - * so if you override this method, be sure to either mimic its functionality - * or to call super.onVersion(...); - * - * @param sourceNick The nick of the user that sent the VERSION request. - * @param sourceLogin The login of the user that sent the VERSION request. - * @param sourceHostname The hostname of the user that sent the VERSION request. - * @param target The target of the VERSION request, be it our nick or a channel name. - */ - protected void onVersion(String sourceNick, String sourceLogin, String sourceHostname, String target) { - this.sendRawLine("NOTICE " + sourceNick + " :\u0001VERSION " + _version + "\u0001"); - } - - - /** - * This method is called whenever we receive a PING request from another - * user. - * <p> - * This abstract implementation responds correctly, so if you override this - * method, be sure to either mimic its functionality or to call - * super.onPing(...); - * - * @param sourceNick The nick of the user that sent the PING request. - * @param sourceLogin The login of the user that sent the PING request. - * @param sourceHostname The hostname of the user that sent the PING request. - * @param target The target of the PING request, be it our nick or a channel name. - * @param pingValue The value that was supplied as an argument to the PING command. - */ - protected void onPing(String sourceNick, String sourceLogin, String sourceHostname, String target, String pingValue) { - this.sendRawLine("NOTICE " + sourceNick + " :\u0001PING " + pingValue + "\u0001"); - } - - - /** - * The actions to perform when a PING request comes from the server. - * <p> - * This sends back a correct response, so if you override this method, - * be sure to either mimic its functionality or to call - * super.onServerPing(response); - * - * @param response The response that should be given back in your PONG. - */ - protected void onServerPing(String response) { - this.sendRawLine("PONG " + response); - } - - - /** - * This method is called whenever we receive a TIME request. - * <p> - * This abstract implementation responds correctly, so if you override this - * method, be sure to either mimic its functionality or to call - * super.onTime(...); - * - * @param sourceNick The nick of the user that sent the TIME request. - * @param sourceLogin The login of the user that sent the TIME request. - * @param sourceHostname The hostname of the user that sent the TIME request. - * @param target The target of the TIME request, be it our nick or a channel name. - */ - protected void onTime(String sourceNick, String sourceLogin, String sourceHostname, String target) { - this.sendRawLine("NOTICE " + sourceNick + " :\u0001TIME " + new Date().toString() + "\u0001"); - } - - - /** - * This method is called whenever we receive a FINGER request. - * <p> - * This abstract implementation responds correctly, so if you override this - * method, be sure to either mimic its functionality or to call - * super.onFinger(...); - * - * @param sourceNick The nick of the user that sent the FINGER request. - * @param sourceLogin The login of the user that sent the FINGER request. - * @param sourceHostname The hostname of the user that sent the FINGER request. - * @param target The target of the FINGER request, be it our nick or a channel name. - */ - protected void onFinger(String sourceNick, String sourceLogin, String sourceHostname, String target) { - this.sendRawLine("NOTICE " + sourceNick + " :\u0001FINGER " + _finger + "\u0001"); - } - - - /** - * This method is called whenever we receive a line from the server that - * the PircBot has not been programmed to recognise. - * <p> - * The implementation of this method in the PircBot abstract class - * performs no actions and may be overridden as required. - * - * @param line The raw line that was received from the server. - */ - protected void onUnknown(String line) { - // And then there were none :) - } - - - /** - * Sets the verbose mode. If verbose mode is set to true, then log entries - * will be printed to the standard output. The default value is false and - * will result in no output. For general development, we strongly recommend - * setting the verbose mode to true. - * - * @param verbose true if verbose mode is to be used. Default is false. - */ - public final void setVerbose(boolean verbose) { - _verbose = verbose; - } - - - /** - * Sets the name of the bot, which will be used as its nick when it - * tries to join an IRC server. This should be set before joining - * any servers, otherwise the default nick will be used. You would - * typically call this method from the constructor of the class that - * extends PircBot. - * <p> - * The changeNick method should be used if you wish to change your nick - * when you are connected to a server. - * - * @param name The new name of the Bot. - */ - protected final void setName(String name) { - _name = name; - } - - - /** - * Sets the internal nick of the bot. This is only to be called by the - * PircBot class in response to notification of nick changes that apply - * to us. - * - * @param nick The new nick. - */ - private final void setNick(String nick) { - _nick = nick; - } - - - /** - * Sets the internal login of the Bot. This should be set before joining - * any servers. - * - * @param login The new login of the Bot. - */ - protected final void setLogin(String login) { - _login = login; - } - - - /** - * Sets the internal version of the Bot. This should be set before joining - * any servers. - * - * @param version The new version of the Bot. - */ - protected final void setVersion(String version) { - _version = version; - } - - - /** - * Sets the interal finger message. This should be set before joining - * any servers. - * - * @param finger The new finger message for the Bot. - */ - protected final void setFinger(String finger) { - _finger = finger; - } - - - /** - * Gets the name of the PircBot. This is the name that will be used as - * as a nick when we try to join servers. - * - * @return The name of the PircBot. - */ - public final String getName() { - return _name; - } - - - /** - * Returns the current nick of the bot. Note that if you have just changed - * your nick, this method will still return the old nick until confirmation - * of the nick change is received from the server. - * <p> - * The nick returned by this method is maintained only by the PircBot - * class and is guaranteed to be correct in the context of the IRC server. - * - * @since PircBot 1.0.0 - * - * @return The current nick of the bot. - */ - public String getNick() { - return _nick; - } - - - /** - * Gets the internal login of the PircBot. - * - * @return The login of the PircBot. - */ - public final String getLogin() { - return _login; - } - - - /** - * Gets the internal version of the PircBot. - * - * @return The version of the PircBot. - */ - public final String getVersion() { - return _version; - } - - - /** - * Gets the internal finger message of the PircBot. - * - * @return The finger message of the PircBot. - */ - public final String getFinger() { - return _finger; - } - - - /** - * Returns whether or not the PircBot is currently connected to a server. - * The result of this method should only act as a rough guide, - * as the result may not be valid by the time you act upon it. - * - * @return True if and only if the PircBot is currently connected to a server. - */ - public final synchronized boolean isConnected() { - return _inputThread != null && _inputThread.isConnected(); - } - - - /** - * Sets the number of milliseconds to delay between consecutive - * messages when there are multiple messages waiting in the - * outgoing message queue. This has a default value of 1000ms. - * It is a good idea to stick to this default value, as it will - * prevent your bot from spamming servers and facing the subsequent - * wrath! However, if you do need to change this delay value (<b>not - * recommended</b>), then this is the method to use. - * - * @param delay The number of milliseconds between each outgoing message. - * - */ - public final void setMessageDelay(long delay) { - if (delay < 0) { - throw new IllegalArgumentException("Cannot have a negative time."); - } - _messageDelay = delay; - } - - - /** - * Returns the number of milliseconds that will be used to separate - * consecutive messages to the server from the outgoing message queue. - * - * @return Number of milliseconds. - */ - public final long getMessageDelay() { - return _messageDelay; - } - - - /** - * Gets the maximum length of any line that is sent via the IRC protocol. - * The IRC RFC specifies that line lengths, including the trailing \r\n - * must not exceed 512 bytes. Hence, there is currently no option to - * change this value in PircBot. All lines greater than this length - * will be truncated before being sent to the IRC server. - * - * @return The maximum line length (currently fixed at 512) - */ - public final int getMaxLineLength() { - return InputThread.MAX_LINE_LENGTH; - } - - - /** - * Gets the number of lines currently waiting in the outgoing message Queue. - * If this returns 0, then the Queue is empty and any new message is likely - * to be sent to the IRC server immediately. - * - * @since PircBot 0.9.9 - * - * @return The number of lines in the outgoing message Queue. - */ - public final int getOutgoingQueueSize() { - return _outQueue.size(); - } - - - /** - * Returns the name of the last IRC server the PircBot tried to connect to. - * This does not imply that the connection attempt to the server was - * successful (we suggest you look at the onConnect method). - * A value of null is returned if the PircBot has never tried to connect - * to a server. - * - * @return The name of the last machine we tried to connect to. Returns - * null if no connection attempts have ever been made. - */ - public final String getServer() { - return _server; - } - - - /** - * Returns the port number of the last IRC server that the PircBot tried - * to connect to. - * This does not imply that the connection attempt to the server was - * successful (we suggest you look at the onConnect method). - * A value of -1 is returned if the PircBot has never tried to connect - * to a server. - * - * @since PircBot 0.9.9 - * - * @return The port number of the last IRC server we connected to. - * Returns -1 if no connection attempts have ever been made. - */ - public final int getPort() { - return _port; - } - - - /** - * Returns the last password that we used when connecting to an IRC server. - * This does not imply that the connection attempt to the server was - * successful (we suggest you look at the onConnect method). - * A value of null is returned if the PircBot has never tried to connect - * to a server using a password. - * - * @since PircBot 0.9.9 - * - * @return The last password that we used when connecting to an IRC server. - * Returns null if we have not previously connected using a password. - */ - public final String getPassword() { - return _password; - } - - - /** - * A convenient method that accepts an IP address represented as a - * long and returns an integer array of size 4 representing the same - * IP address. - * - * @since PircBot 0.9.4 - * - * @param address the long value representing the IP address. - * - * @return An int[] of size 4. - */ - public int[] longToIp(long address) { - int[] ip = new int[4]; - for (int i = 3; i >= 0; i--) { - ip[i] = (int) (address % 256); - address = address / 256; - } - return ip; - } - - - /** - * A convenient method that accepts an IP address represented by a byte[] - * of size 4 and returns this as a long representation of the same IP - * address. - * - * @since PircBot 0.9.4 - * - * @param address the byte[] of size 4 representing the IP address. - * - * @return a long representation of the IP address. - */ - public long ipToLong(byte[] address) { - if (address.length != 4) { - throw new IllegalArgumentException("byte array must be of length 4"); - } - long ipNum = 0; - long multiplier = 1; - for (int i = 3; i >= 0; i--) { - int byteVal = (address[i] + 256) % 256; - ipNum += byteVal*multiplier; - multiplier *= 256; - } - return ipNum; - } - - - /** - * Sets the encoding charset to be used when sending or receiving lines - * from the IRC server. If set to null, then the platform's default - * charset is used. You should only use this method if you are - * trying to send text to an IRC server in a different charset, e.g. - * "GB2312" for Chinese encoding. If a PircBot is currently connected - * to a server, then it must reconnect before this change takes effect. - * - * @since PircBot 1.0.4 - * - * @param charset The new encoding charset to be used by PircBot. - * - * @throws UnsupportedEncodingException If the named charset is not - * supported. - */ - public void setEncoding(String charset) throws UnsupportedEncodingException { - // Just try to see if the charset is supported first... - "".getBytes(charset); - - _charset = charset; - } - - - /** - * Returns the encoding used to send and receive lines from - * the IRC server, or null if not set. Use the setEncoding - * method to change the encoding charset. - * - * @since PircBot 1.0.4 - * - * @return The encoding used to send outgoing messages, or - * null if not set. - */ - public String getEncoding() { - return _charset; - } - - /** - * Returns the InetAddress used by the PircBot. - * This can be used to find the I.P. address from which the PircBot is - * connected to a server. - * - * @since PircBot 1.4.4 - * - * @return The current local InetAddress, or null if never connected. - */ - public InetAddress getInetAddress() { - return _inetAddress; - } - - - /** - * Sets the InetAddress to be used when sending DCC chat or file transfers. - * This can be very useful when you are running a bot on a machine which - * is behind a firewall and you need to tell receiving clients to connect - * to a NAT/router, which then forwards the connection. - * - * @since PircBot 1.4.4 - * - * @param dccInetAddress The new InetAddress, or null to use the default. - */ - public void setDccInetAddress(InetAddress dccInetAddress) { - _dccInetAddress = dccInetAddress; - } - - - /** - * Returns the InetAddress used when sending DCC chat or file transfers. - * If this is null, the default InetAddress will be used. - * - * @since PircBot 1.4.4 - * - * @return The current DCC InetAddress, or null if left as default. - */ - public InetAddress getDccInetAddress() { - return _dccInetAddress; - } - - - /** - * Returns the set of port numbers to be used when sending a DCC chat - * or file transfer. This is useful when you are behind a firewall and - * need to set up port forwarding. The array of port numbers is traversed - * in sequence until a free port is found to listen on. A DCC tranfer will - * fail if all ports are already in use. - * If set to null, <i>any</i> free port number will be used. - * - * @since PircBot 1.4.4 - * - * @return An array of port numbers that PircBot can use to send DCC - * transfers, or null if any port is allowed. - */ - public int[] getDccPorts() { - if (_dccPorts == null || _dccPorts.length == 0) { - return null; - } - // Clone the array to prevent external modification. - return (int[]) _dccPorts.clone(); - } - - - /** - * Sets the choice of port numbers that can be used when sending a DCC chat - * or file transfer. This is useful when you are behind a firewall and - * need to set up port forwarding. The array of port numbers is traversed - * in sequence until a free port is found to listen on. A DCC tranfer will - * fail if all ports are already in use. - * If set to null, <i>any</i> free port number will be used. - * - * @since PircBot 1.4.4 - * - * @param ports The set of port numbers that PircBot may use for DCC - * transfers, or null to let it use any free port (default). - * - */ - public void setDccPorts(int[] ports) { - if (ports == null || ports.length == 0) { - _dccPorts = null; - } - else { - // Clone the array to prevent external modification. - _dccPorts = (int[]) ports.clone(); - } - } - - - /** - * Returns true if and only if the object being compared is the exact - * same instance as this PircBot. This may be useful if you are writing - * a multiple server IRC bot that uses more than one instance of PircBot. - * - * @since PircBot 0.9.9 - * - * @return true if and only if Object o is a PircBot and equal to this. - */ - public boolean equals(Object o) { - // This probably has the same effect as Object.equals, but that may change... - if (o instanceof PircBot) { - PircBot other = (PircBot) o; - return other == this; - } - return false; - } - - - /** - * Returns the hashCode of this PircBot. This method can be called by hashed - * collection classes and is useful for managing multiple instances of - * PircBots in such collections. - * - * @since PircBot 0.9.9 - * - * @return the hash code for this instance of PircBot. - */ - public int hashCode() { - return super.hashCode(); - } - - - /** - * Returns a String representation of this object. - * You may find this useful for debugging purposes, particularly - * if you are using more than one PircBot instance to achieve - * multiple server connectivity. The format of - * this String may change between different versions of PircBot - * but is currently something of the form - * <code> - * Version{PircBot x.y.z Java IRC Bot - www.jibble.org} - * Connected{true} - * Server{irc.dal.net} - * Port{6667} - * Password{} - * </code> - * - * @since PircBot 0.9.10 - * - * @return a String representation of this object. - */ - public String toString() { - return "Version{" + _version + "}" + - " Connected{" + isConnected() + "}" + - " Server{" + _server + "}" + - " Port{" + _port + "}" + - " Password{" + _password + "}"; - } - - - /** - * Returns an array of all users in the specified channel. - * <p> - * There are some important things to note about this method:- - * <ul> - * <li>This method may not return a full list of users if you call it - * before the complete nick list has arrived from the IRC server. - * </li> - * <li>If you wish to find out which users are in a channel as soon - * as you join it, then you should override the onUserList method - * instead of calling this method, as the onUserList method is only - * called as soon as the full user list has been received. - * </li> - * <li>This method will return immediately, as it does not require any - * interaction with the IRC server. - * </li> - * <li>The bot must be in a channel to be able to know which users are - * in it. - * </li> - * </ul> - * - * @since PircBot 1.0.0 - * - * @param channel The name of the channel to list. - * - * @return An array of User objects. This array is empty if we are not - * in the channel. - * - * @see #onUserList(String,User[]) onUserList - */ - public final User[] getUsers(String channel) { - channel = channel.toLowerCase(Locale.ENGLISH); - User[] userArray = new User[0]; - synchronized (_channels) { - Hashtable users = (Hashtable) _channels.get(channel); - if (users != null) { - userArray = new User[users.size()]; - Enumeration enumeration = users.elements(); - for (int i = 0; i < userArray.length; i++) { - User user = (User) enumeration.nextElement(); - userArray[i] = user; - } - } - } - return userArray; - } - - - /** - * Returns an array of all channels that we are in. Note that if you - * call this method immediately after joining a new channel, the new - * channel may not appear in this array as it is not possible to tell - * if the join was successful until a response is received from the - * IRC server. - * - * @since PircBot 1.0.0 - * - * @return A String array containing the names of all channels that we - * are in. - */ - public final String[] getChannels() { - String[] channels = new String[0]; - synchronized (_channels) { - channels = new String[_channels.size()]; - Enumeration enumeration = _channels.keys(); - for (int i = 0; i < channels.length; i++) { - channels[i] = (String) enumeration.nextElement(); - } - } - return channels; - } - - - /** - * Disposes of all thread resources used by this PircBot. This may be - * useful when writing bots or clients that use multiple servers (and - * therefore multiple PircBot instances) or when integrating a PircBot - * with an existing program. - * <p> - * Each PircBot runs its own threads for dispatching messages from its - * outgoing message queue and receiving messages from the server. - * Calling dispose() ensures that these threads are - * stopped, thus freeing up system resources and allowing the PircBot - * object to be garbage collected if there are no other references to - * it. - * <p> - * Once a PircBot object has been disposed, it should not be used again. - * Attempting to use a PircBot that has been disposed may result in - * unpredictable behaviour. - * - * @since 1.2.2 - */ - public synchronized void dispose() { - //System.out.println("disposing..."); - _outputThread.interrupt(); - _inputThread.dispose(); - } - - - /** - * Add a user to the specified channel in our memory. - * Overwrite the existing entry if it exists. - */ - private final void addUser(String channel, User user) { - channel = channel.toLowerCase(Locale.ENGLISH); - synchronized (_channels) { - Hashtable users = (Hashtable) _channels.get(channel); - if (users == null) { - users = new Hashtable(); - _channels.put(channel, users); - } - users.put(user, user); - } - } - - - /** - * Remove a user from the specified channel in our memory. - */ - private final User removeUser(String channel, String nick) { - channel = channel.toLowerCase(Locale.ENGLISH); - User user = new User("", nick); - synchronized (_channels) { - Hashtable users = (Hashtable) _channels.get(channel); - if (users != null) { - return (User) users.remove(user); - } - } - return null; - } - - - /** - * Remove a user from all channels in our memory. - */ - private final void removeUser(String nick) { - synchronized (_channels) { - Enumeration enumeration = _channels.keys(); - while (enumeration.hasMoreElements()) { - String channel = (String) enumeration.nextElement(); - this.removeUser(channel, nick); - } - } - } - - - /** - * Rename a user if they appear in any of the channels we know about. - */ - private final void renameUser(String oldNick, String newNick) { - synchronized (_channels) { - Enumeration enumeration = _channels.keys(); - while (enumeration.hasMoreElements()) { - String channel = (String) enumeration.nextElement(); - User user = this.removeUser(channel, oldNick); - if (user != null) { - user = new User(user.getPrefix(), newNick); - this.addUser(channel, user); - } - } - } - } - - - /** - * Removes an entire channel from our memory of users. - */ - private final void removeChannel(String channel) { - channel = channel.toLowerCase(Locale.ENGLISH); - synchronized (_channels) { - _channels.remove(channel); - } - } - - - /** - * Removes all channels from our memory of users. - */ - private final void removeAllChannels() { - synchronized(_channels) { - _channels = new Hashtable(); - } - } - - - private final void updateUser(String channel, int userMode, String nick) { - channel = channel.toLowerCase(Locale.ENGLISH); - synchronized (_channels) { - Hashtable users = (Hashtable) _channels.get(channel); - User newUser = null; - if (users != null) { - Enumeration enumeration = users.elements(); - while(enumeration.hasMoreElements()) { - User userObj = (User) enumeration.nextElement(); - if (userObj.getNick().equalsIgnoreCase(nick)) { - if (userMode == OP_ADD) { - if (userObj.hasVoice()) { - newUser = new User("@+", nick); - } - else { - newUser = new User("@", nick); - } - } - else if (userMode == OP_REMOVE) { - if(userObj.hasVoice()) { - newUser = new User("+", nick); - } - else { - newUser = new User("", nick); - } - } - else if (userMode == VOICE_ADD) { - if(userObj.isOp()) { - newUser = new User("@+", nick); - } - else { - newUser = new User("+", nick); - } - } - else if (userMode == VOICE_REMOVE) { - if(userObj.isOp()) { - newUser = new User("@", nick); - } - else { - newUser = new User("", nick); - } - } - } - } - } - if (newUser != null) { - users.put(newUser, newUser); - } - else { - // just in case ... - newUser = new User("", nick); - users.put(newUser, newUser); - } - } - } - - - // Connection stuff. - private InputThread _inputThread = null; - private OutputThread _outputThread = null; - private String _charset = null; - private InetAddress _inetAddress = null; - - // Details about the last server that we connected to. - private String _server = null; - private int _port = -1; - private String _password = null; - - // Outgoing message stuff. - private Queue _outQueue = new Queue(); - private long _messageDelay = 1000; - - // A Hashtable of channels that points to a selfreferential Hashtable of - // User objects (used to remember which users are in which channels). - private Hashtable _channels = new Hashtable(); - - // A Hashtable to temporarily store channel topics when we join them - // until we find out who set that topic. - private Hashtable _topics = new Hashtable(); - - private int[] _dccPorts = null; - private InetAddress _dccInetAddress = null; - - // Default settings for the PircBot. - private boolean _autoNickChange = false; - private boolean _verbose = false; - private String _name = "PircBot"; - private String _nick = _name; - private String _login = "PircBot"; - private String _version = "PircBot " + VERSION + " Java IRC Bot - www.jibble.org"; - private String _finger = "You ought to be arrested for fingering a bot!"; - - private String _channelPrefixes = "#&+!"; -} diff --git a/EssentialsUpdate/src/org/jibble/pircbot/Queue.java b/EssentialsUpdate/src/org/jibble/pircbot/Queue.java deleted file mode 100755 index fd8d47781..000000000 --- a/EssentialsUpdate/src/org/jibble/pircbot/Queue.java +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ - -This file is part of PircBot. - -This software is dual-licensed, allowing you to choose between the GNU -General Public License (GPL) and the www.jibble.org Commercial License. -Since the GPL may be too restrictive for use in a proprietary application, -a commercial license is also provided. Full license information can be -found at http://www.jibble.org/licenses/ - -*/ - - -package org.jibble.pircbot; - -import java.util.Vector; - -/** - * Queue is a definition of a data structure that may - * act as a queue - that is, data can be added to one end of the - * queue and data can be requested from the head end of the queue. - * This class is thread safe for multiple producers and a single - * consumer. The next() method will block until there is data in - * the queue. - * - * This has now been modified so that it is compatible with - * the earlier JDK1.1 in order to be suitable for running on - * mobile appliances. This means replacing the LinkedList with - * a Vector, which is hardly ideal, but this Queue is typically - * only polled every second before dispatching messages. - * - * @author Paul James Mutton, - * <a href="http://www.jibble.org/">http://www.jibble.org/</a> - * @version 1.5.0 (Build time: Mon Dec 14 20:07:17 2009) - */ -public class Queue { - - - /** - * Constructs a Queue object of unlimited size. - */ - public Queue() { - - } - - - /** - * Adds an Object to the end of the Queue. - * - * @param o The Object to be added to the Queue. - */ - public void add(Object o) { - synchronized(_queue) { - _queue.addElement(o); - _queue.notify(); - } - } - - - /** - * Adds an Object to the front of the Queue. - * - * @param o The Object to be added to the Queue. - */ - public void addFront(Object o) { - synchronized(_queue) { - _queue.insertElementAt(o, 0); - _queue.notify(); - } - } - - - /** - * Returns the Object at the front of the Queue. This - * Object is then removed from the Queue. If the Queue - * is empty, then this method shall block until there - * is an Object in the Queue to return. - * - * @return The next item from the front of the queue. - */ - public Object next() { - - Object o = null; - - // Block if the Queue is empty. - synchronized(_queue) { - if (_queue.size() == 0) { - try { - _queue.wait(); - } - catch (InterruptedException e) { - return null; - } - } - - // Return the Object. - try { - o = _queue.firstElement(); - _queue.removeElementAt(0); - } - catch (ArrayIndexOutOfBoundsException e) { - throw new InternalError("Race hazard in Queue object."); - } - } - - return o; - } - - - /** - * Returns true if the Queue is not empty. If another - * Thread empties the Queue before <b>next()</b> is - * called, then the call to <b>next()</b> shall block - * until the Queue has been populated again. - * - * @return True only if the Queue not empty. - */ - public boolean hasNext() { - return (this.size() != 0); - } - - - /** - * Clears the contents of the Queue. - */ - public void clear() { - synchronized(_queue) { - _queue.removeAllElements(); - } - } - - - /** - * Returns the size of the Queue. - * - * @return The current size of the queue. - */ - public int size() { - return _queue.size(); - } - - - private Vector _queue = new Vector(); - -} diff --git a/EssentialsUpdate/src/org/jibble/pircbot/ReplyConstants.java b/EssentialsUpdate/src/org/jibble/pircbot/ReplyConstants.java deleted file mode 100755 index 2d8e696d5..000000000 --- a/EssentialsUpdate/src/org/jibble/pircbot/ReplyConstants.java +++ /dev/null @@ -1,176 +0,0 @@ -/* -Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ - -This file is part of PircBot. - -This software is dual-licensed, allowing you to choose between the GNU -General Public License (GPL) and the www.jibble.org Commercial License. -Since the GPL may be too restrictive for use in a proprietary application, -a commercial license is also provided. Full license information can be -found at http://www.jibble.org/licenses/ - -*/ - - -package org.jibble.pircbot; - -/** - * This interface contains the values of all numeric replies specified - * in section 6 of RFC 1459. Refer to RFC 1459 for further information. - * <p> - * If you override the onServerResponse method in the PircBot class, - * you may find these constants useful when comparing the numeric - * value of a given code. - * - * @since 1.0.0 - * @author Paul James Mutton, - * <a href="http://www.jibble.org/">http://www.jibble.org/</a> - * @version 1.5.0 (Build time: Mon Dec 14 20:07:17 2009) - */ -public interface ReplyConstants { - - - // Error Replies. - public static final int ERR_NOSUCHNICK = 401; - public static final int ERR_NOSUCHSERVER = 402; - public static final int ERR_NOSUCHCHANNEL = 403; - public static final int ERR_CANNOTSENDTOCHAN = 404; - public static final int ERR_TOOMANYCHANNELS = 405; - public static final int ERR_WASNOSUCHNICK = 406; - public static final int ERR_TOOMANYTARGETS = 407; - public static final int ERR_NOORIGIN = 409; - public static final int ERR_NORECIPIENT = 411; - public static final int ERR_NOTEXTTOSEND = 412; - public static final int ERR_NOTOPLEVEL = 413; - public static final int ERR_WILDTOPLEVEL = 414; - public static final int ERR_UNKNOWNCOMMAND = 421; - public static final int ERR_NOMOTD = 422; - public static final int ERR_NOADMININFO = 423; - public static final int ERR_FILEERROR = 424; - public static final int ERR_NONICKNAMEGIVEN = 431; - public static final int ERR_ERRONEUSNICKNAME = 432; - public static final int ERR_NICKNAMEINUSE = 433; - public static final int ERR_NICKCOLLISION = 436; - public static final int ERR_USERNOTINCHANNEL = 441; - public static final int ERR_NOTONCHANNEL = 442; - public static final int ERR_USERONCHANNEL = 443; - public static final int ERR_NOLOGIN = 444; - public static final int ERR_SUMMONDISABLED = 445; - public static final int ERR_USERSDISABLED = 446; - public static final int ERR_NOTREGISTERED = 451; - public static final int ERR_NEEDMOREPARAMS = 461; - public static final int ERR_ALREADYREGISTRED = 462; - public static final int ERR_NOPERMFORHOST = 463; - public static final int ERR_PASSWDMISMATCH = 464; - public static final int ERR_YOUREBANNEDCREEP = 465; - public static final int ERR_KEYSET = 467; - public static final int ERR_CHANNELISFULL = 471; - public static final int ERR_UNKNOWNMODE = 472; - public static final int ERR_INVITEONLYCHAN = 473; - public static final int ERR_BANNEDFROMCHAN = 474; - public static final int ERR_BADCHANNELKEY = 475; - public static final int ERR_NOPRIVILEGES = 481; - public static final int ERR_CHANOPRIVSNEEDED = 482; - public static final int ERR_CANTKILLSERVER = 483; - public static final int ERR_NOOPERHOST = 491; - public static final int ERR_UMODEUNKNOWNFLAG = 501; - public static final int ERR_USERSDONTMATCH = 502; - - - // Command Responses. - public static final int RPL_TRACELINK = 200; - public static final int RPL_TRACECONNECTING = 201; - public static final int RPL_TRACEHANDSHAKE = 202; - public static final int RPL_TRACEUNKNOWN = 203; - public static final int RPL_TRACEOPERATOR = 204; - public static final int RPL_TRACEUSER = 205; - public static final int RPL_TRACESERVER = 206; - public static final int RPL_TRACENEWTYPE = 208; - public static final int RPL_STATSLINKINFO = 211; - public static final int RPL_STATSCOMMANDS = 212; - public static final int RPL_STATSCLINE = 213; - public static final int RPL_STATSNLINE = 214; - public static final int RPL_STATSILINE = 215; - public static final int RPL_STATSKLINE = 216; - public static final int RPL_STATSYLINE = 218; - public static final int RPL_ENDOFSTATS = 219; - public static final int RPL_UMODEIS = 221; - public static final int RPL_STATSLLINE = 241; - public static final int RPL_STATSUPTIME = 242; - public static final int RPL_STATSOLINE = 243; - public static final int RPL_STATSHLINE = 244; - public static final int RPL_LUSERCLIENT = 251; - public static final int RPL_LUSEROP = 252; - public static final int RPL_LUSERUNKNOWN = 253; - public static final int RPL_LUSERCHANNELS = 254; - public static final int RPL_LUSERME = 255; - public static final int RPL_ADMINME = 256; - public static final int RPL_ADMINLOC1 = 257; - public static final int RPL_ADMINLOC2 = 258; - public static final int RPL_ADMINEMAIL = 259; - public static final int RPL_TRACELOG = 261; - public static final int RPL_NONE = 300; - public static final int RPL_AWAY = 301; - public static final int RPL_USERHOST = 302; - public static final int RPL_ISON = 303; - public static final int RPL_UNAWAY = 305; - public static final int RPL_NOWAWAY = 306; - public static final int RPL_WHOISUSER = 311; - public static final int RPL_WHOISSERVER = 312; - public static final int RPL_WHOISOPERATOR = 313; - public static final int RPL_WHOWASUSER = 314; - public static final int RPL_ENDOFWHO = 315; - public static final int RPL_WHOISIDLE = 317; - public static final int RPL_ENDOFWHOIS = 318; - public static final int RPL_WHOISCHANNELS = 319; - public static final int RPL_LISTSTART = 321; - public static final int RPL_LIST = 322; - public static final int RPL_LISTEND = 323; - public static final int RPL_CHANNELMODEIS = 324; - public static final int RPL_NOTOPIC = 331; - public static final int RPL_TOPIC = 332; - public static final int RPL_TOPICINFO = 333; - public static final int RPL_INVITING = 341; - public static final int RPL_SUMMONING = 342; - public static final int RPL_VERSION = 351; - public static final int RPL_WHOREPLY = 352; - public static final int RPL_NAMREPLY = 353; - public static final int RPL_LINKS = 364; - public static final int RPL_ENDOFLINKS = 365; - public static final int RPL_ENDOFNAMES = 366; - public static final int RPL_BANLIST = 367; - public static final int RPL_ENDOFBANLIST = 368; - public static final int RPL_ENDOFWHOWAS = 369; - public static final int RPL_INFO = 371; - public static final int RPL_MOTD = 372; - public static final int RPL_ENDOFINFO = 374; - public static final int RPL_MOTDSTART = 375; - public static final int RPL_ENDOFMOTD = 376; - public static final int RPL_YOUREOPER = 381; - public static final int RPL_REHASHING = 382; - public static final int RPL_TIME = 391; - public static final int RPL_USERSSTART = 392; - public static final int RPL_USERS = 393; - public static final int RPL_ENDOFUSERS = 394; - public static final int RPL_NOUSERS = 395; - - - // Reserved Numerics. - public static final int RPL_TRACECLASS = 209; - public static final int RPL_STATSQLINE = 217; - public static final int RPL_SERVICEINFO = 231; - public static final int RPL_ENDOFSERVICES = 232; - public static final int RPL_SERVICE = 233; - public static final int RPL_SERVLIST = 234; - public static final int RPL_SERVLISTEND = 235; - public static final int RPL_WHOISCHANOP = 316; - public static final int RPL_KILLDONE = 361; - public static final int RPL_CLOSING = 362; - public static final int RPL_CLOSEEND = 363; - public static final int RPL_INFOSTART = 373; - public static final int RPL_MYPORTIS = 384; - public static final int ERR_YOUWILLBEBANNED = 466; - public static final int ERR_BADCHANMASK = 476; - public static final int ERR_NOSERVICEHOST = 492; - -} diff --git a/EssentialsUpdate/src/org/jibble/pircbot/User.java b/EssentialsUpdate/src/org/jibble/pircbot/User.java deleted file mode 100755 index 37f981b19..000000000 --- a/EssentialsUpdate/src/org/jibble/pircbot/User.java +++ /dev/null @@ -1,163 +0,0 @@ -/* -Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ - -This file is part of PircBot. - -This software is dual-licensed, allowing you to choose between the GNU -General Public License (GPL) and the www.jibble.org Commercial License. -Since the GPL may be too restrictive for use in a proprietary application, -a commercial license is also provided. Full license information can be -found at http://www.jibble.org/licenses/ - -*/ - -package org.jibble.pircbot; - -import java.util.Locale; - -/** - * This class is used to represent a user on an IRC server. - * Instances of this class are returned by the getUsers method - * in the PircBot class. - * <p> - * Note that this class no longer implements the Comparable interface - * for Java 1.1 compatibility reasons. - * - * @since 1.0.0 - * @author Paul James Mutton, - * <a href="http://www.jibble.org/">http://www.jibble.org/</a> - * @version 1.5.0 (Build time: Mon Dec 14 20:07:17 2009) - */ -public class User { - - - /** - * Constructs a User object with a known prefix and nick. - * - * @param prefix The status of the user, for example, "@". - * @param nick The nick of the user. - */ - User(String prefix, String nick) { - _prefix = prefix; - _nick = nick; - _lowerNick = nick.toLowerCase(Locale.ENGLISH); - } - - - /** - * Returns the prefix of the user. If the User object has been obtained - * from a list of users in a channel, then this will reflect the user's - * status in that channel. - * - * @return The prefix of the user. If there is no prefix, then an empty - * String is returned. - */ - public String getPrefix() { - return _prefix; - } - - - /** - * Returns whether or not the user represented by this object is an - * operator. If the User object has been obtained from a list of users - * in a channel, then this will reflect the user's operator status in - * that channel. - * - * @return true if the user is an operator in the channel. - */ - public boolean isOp() { - return _prefix.indexOf('@') >= 0; - } - - - /** - * Returns whether or not the user represented by this object has - * voice. If the User object has been obtained from a list of users - * in a channel, then this will reflect the user's voice status in - * that channel. - * - * @return true if the user has voice in the channel. - */ - public boolean hasVoice() { - return _prefix.indexOf('+') >= 0; - } - - - /** - * Returns the nick of the user. - * - * @return The user's nick. - */ - public String getNick() { - return _nick; - } - - - /** - * Returns the nick of the user complete with their prefix if they - * have one, e.g. "@Dave". - * - * @return The user's prefix and nick. - */ - public String toString() { - return this.getPrefix() + this.getNick(); - } - - - /** - * Returns true if the nick represented by this User object is the same - * as the argument. A case insensitive comparison is made. - * - * @return true if the nicks are identical (case insensitive). - */ - public boolean equals(String nick) { - return nick.toLowerCase(Locale.ENGLISH).equals(_lowerNick); - } - - - /** - * Returns true if the nick represented by this User object is the same - * as the nick of the User object given as an argument. - * A case insensitive comparison is made. - * - * @return true if o is a User object with a matching lowercase nick. - */ - public boolean equals(Object o) { - if (o instanceof User) { - User other = (User) o; - return other._lowerNick.equals(_lowerNick); - } - return false; - } - - - /** - * Returns the hash code of this User object. - * - * @return the hash code of the User object. - */ - public int hashCode() { - return _lowerNick.hashCode(); - } - - - /** - * Returns the result of calling the compareTo method on lowercased - * nicks. This is useful for sorting lists of User objects. - * - * @return the result of calling compareTo on lowercased nicks. - */ - public int compareTo(Object o) { - if (o instanceof User) { - User other = (User) o; - return other._lowerNick.compareTo(_lowerNick); - } - return -1; - } - - - private String _prefix; - private String _nick; - private String _lowerNick; - -} diff --git a/EssentialsUpdate/src/plugin.yml b/EssentialsUpdate/src/plugin.yml deleted file mode 100644 index b8dbe8e25..000000000 --- a/EssentialsUpdate/src/plugin.yml +++ /dev/null @@ -1,21 +0,0 @@ -# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) -name: EssentialsUpdate -main: com.earth2me.essentials.update.EssentialsUpdate -# Note to developers: This next line cannot change, or the automatic versioning system will break. -version: TeamCity -description: This plugin allows to install or update all Essentials plugins -authors: [snowleo] -commands: - essentialsupdate: - description: Install or update the Essentials plugins. - usage: /<command> - essentialshelp: - description: Get help from the Essentials support chat. - usage: /<command> -permissions: - essentials.update: - description: Allows you to update Essentials - default: op - essentials.helpchat: - description: Allows you to join Essentials help chat - default: op
\ No newline at end of file diff --git a/EssentialsUpdate/test/com/earth2me/essentials/update/UploadTest.java b/EssentialsUpdate/test/com/earth2me/essentials/update/UploadTest.java deleted file mode 100644 index a51f03bd7..000000000 --- a/EssentialsUpdate/test/com/earth2me/essentials/update/UploadTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.earth2me.essentials.update; - -import java.io.IOException; -import java.util.logging.Level; -import java.util.logging.Logger; -import junit.framework.TestCase; -import org.junit.Test; - - -public class UploadTest extends TestCase -{ - @Test - public void testPastieUpload() - { - try - { - final PastieUpload pastie = new PastieUpload(); - assertNotNull(pastie); - //final String url = pastie.send("test"); - //System.out.println(url); - } - catch (IOException ex) - { - Logger.getLogger(UploadTest.class.getName()).log(Level.SEVERE, null, ex); - } - } -} diff --git a/EssentialsUpdate/test/com/earth2me/essentials/update/VersionTest.java b/EssentialsUpdate/test/com/earth2me/essentials/update/VersionTest.java deleted file mode 100644 index 024f2248b..000000000 --- a/EssentialsUpdate/test/com/earth2me/essentials/update/VersionTest.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.earth2me.essentials.update; - -import com.earth2me.essentials.update.Version.Type; -import java.util.TreeSet; -import junit.framework.TestCase; -import org.junit.Test; - - -public class VersionTest extends TestCase -{ - @Test - public void testStable() - { - final Version instance = new Version("1.2.3"); - assertEquals("Testing Major", 1, instance.getMajor()); - assertEquals("Testing Minor", 2, instance.getMinor()); - assertEquals("Testing Build", 3, instance.getBuild()); - assertEquals("Testing Type", Type.STABLE, instance.getType()); - } - - @Test - public void testDev() - { - final Version instance = new Version("Dev2.3.4"); - assertEquals("Testing Major", 2, instance.getMajor()); - assertEquals("Testing Minor", 3, instance.getMinor()); - assertEquals("Testing Build", 4, instance.getBuild()); - assertEquals("Testing Type", Type.DEVELOPER, instance.getType()); - } - - @Test - public void testTeamCity() - { - final Version instance = new Version("Teamcity"); - assertEquals("Testing Type", Type.DEVELOPER, instance.getType()); - } - - @Test - public void testPre() - { - final Version instance = new Version("Pre5.7.400.2"); - assertEquals("Testing Major", 5, instance.getMajor()); - assertEquals("Testing Minor", 7, instance.getMinor()); - assertEquals("Testing Build", 400, instance.getBuild()); - assertEquals("Testing Type", Type.PREVIEW, instance.getType()); - } - - @Test - public void testCompareTo() - { - final Version verA = new Version("1.1.1"); - final Version verB = new Version("Dev1.1.2"); - final Version verC = new Version("1.1.2"); - final Version verD = new Version("1.2.0"); - final Version verE = new Version("2.0.0"); - final Version verF = new Version("Pre1.1.1.1"); - final Version verG = new Version("Dev1.2.2"); - assertTrue("Testing dev", verA.compareTo(verB) < 0); - assertTrue("Testing dev", verB.compareTo(verA) > 0); - assertTrue("Testing build", verA.compareTo(verC) < 0); - assertTrue("Testing build", verC.compareTo(verA) > 0); - assertTrue("Testing minor", verA.compareTo(verD) < 0); - assertTrue("Testing minor", verD.compareTo(verA) > 0); - assertTrue("Testing major", verA.compareTo(verE) < 0); - assertTrue("Testing major", verE.compareTo(verA) > 0); - assertTrue("Testing pre", verF.compareTo(verA) < 0); - assertTrue("Testing pre", verA.compareTo(verF) > 0); - assertTrue("Testing dev vs dev", verB.compareTo(verG) < 0); - assertTrue("Testing dev vs dev", verG.compareTo(verB) > 0); - final TreeSet<Version> set = new TreeSet<Version>(); - set.add(verA); - set.add(verB); - set.add(verC); - set.add(verD); - set.add(verE); - set.add(verF); - set.add(verG); - assertEquals("Testing sorting", verF, set.pollFirst()); - assertEquals("Testing sorting", verA, set.pollFirst()); - assertEquals("Testing sorting", verC, set.pollFirst()); - assertEquals("Testing sorting", verD, set.pollFirst()); - assertEquals("Testing sorting", verE, set.pollFirst()); - assertEquals("Testing sorting", verB, set.pollFirst()); - assertEquals("Testing sorting", verG, set.pollFirst()); - } -} diff --git a/EssentialsXMPP/nbproject/build-impl.xml b/EssentialsXMPP/nbproject/build-impl.xml index 3293bd709..7e2958bc2 100644 --- a/EssentialsXMPP/nbproject/build-impl.xml +++ b/EssentialsXMPP/nbproject/build-impl.xml @@ -12,9 +12,9 @@ is divided into following sections: - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup @@ -181,6 +181,7 @@ is divided into following sections: </and> </condition> <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> <property name="javac.compilerargs" value=""/> <property name="work.dir" value="${basedir}"/> <condition property="no.deps"> @@ -225,6 +226,27 @@ is divided into following sections: <property name="jar.index.metainf" value="${jar.index}"/> <property name="copylibs.rebase" value="true"/> <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> @@ -357,11 +379,52 @@ is divided into following sections: </sequential> </macrodef> </target> - <target name="-init-macrodef-junit"> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> <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"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> <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}"> @@ -370,32 +433,270 @@ is divided into following sections: <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}"/> + <customize/> </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"> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="EssentialsXMPP" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <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> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename EssentialsXMPP -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" 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"> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> <macrodef name="resolve"> <attribute name="name"/> <attribute name="value"/> @@ -427,10 +728,13 @@ is divided into following sections: </sequential> </macrodef> </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" 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> + <!-- + end of pre NB7.2 profiling section + --> <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"/> @@ -488,6 +792,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -504,6 +809,7 @@ is divided into following sections: <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> <attribute default="${main.class}" name="classname"/> <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> <element name="customize" optional="true"/> <sequential> <java classname="@{classname}" dir="${work.dir}" fork="true"> @@ -511,6 +817,7 @@ is divided into following sections: <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> <classpath> <path path="@{classpath}"/> </classpath> @@ -537,6 +844,9 @@ is divided into following sections: <path path="${run.classpath.without.build.classes.dir}"/> <chainedmapper> <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> <globmapper from="*" to="lib/*"/> </chainedmapper> </pathconvert> @@ -582,7 +892,7 @@ is divided into following sections: <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"/> + <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-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> <!-- =================== COMPILATION SECTION @@ -805,7 +1115,11 @@ is divided into following sections: PROFILING SECTION ================= --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -813,8 +1127,9 @@ is divided into following sections: </nbprofiledirect> <profile/> </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -822,12 +1137,8 @@ is divided into following sections: </nbprofiledirect> <profile classname="${profile.class}"/> </target> - <!-- - ========================= - APPLET PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.classpath}"/> @@ -839,12 +1150,8 @@ is divided into following sections: </customize> </profile> </target> - <!-- - ========================= - TESTS PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path path="${run.test.classpath}"/> @@ -867,6 +1174,42 @@ is divided into following sections: </junit> </target> <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- =============== JAVADOC SECTION =============== @@ -909,7 +1252,7 @@ is divided into following sections: <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- ========================= - JUNIT COMPILATION SECTION + TEST COMPILATION SECTION ========================= --> <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> @@ -952,14 +1295,14 @@ is divided into following sections: <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 + TEST 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"/> + <j2seproject3:test 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> @@ -972,39 +1315,40 @@ is divided into following sections: </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}"/> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${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"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <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-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> <!-- ======================= - JUNIT DEBUGGING SECTION + TEST DEBUGGING SECTION ======================= --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <target depends="init,compile-test-single,-pre-test-run-single" 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> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> </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,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> <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> @@ -1076,9 +1420,12 @@ is divided into following sections: <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> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> </condition> </target> <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> diff --git a/EssentialsXMPP/nbproject/genfiles.properties b/EssentialsXMPP/nbproject/genfiles.properties index ae2a6f962..744ffaed2 100644 --- a/EssentialsXMPP/nbproject/genfiles.properties +++ b/EssentialsXMPP/nbproject/genfiles.properties @@ -4,5 +4,5 @@ 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=8cccbe45 -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 +nbproject/build-impl.xml.script.CRC32=db083724 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java index 1fa5a243c..17827c3c7 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java @@ -2,10 +2,11 @@ package com.earth2me.essentials.xmpp; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; +import java.util.List; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerChatEvent; +import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; @@ -20,21 +21,21 @@ class EssentialsXMPPPlayerListener implements Listener this.ess = ess; } - @EventHandler(priority= EventPriority.MONITOR) + @EventHandler(priority = EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event) { final User user = ess.getUser(event.getPlayer()); sendMessageToSpyUsers("Player " + user.getDisplayName() + " joined the game"); } - @EventHandler(priority= EventPriority.MONITOR) - public void onPlayerChat(final PlayerChatEvent event) + @EventHandler(priority = EventPriority.MONITOR) + public void onPlayerChat(final AsyncPlayerChatEvent event) { final User user = ess.getUser(event.getPlayer()); sendMessageToSpyUsers(String.format(event.getFormat(), user.getDisplayName(), event.getMessage())); } - @EventHandler(priority= EventPriority.MONITOR) + @EventHandler(priority = EventPriority.MONITOR) public void onPlayerQuit(final PlayerQuitEvent event) { final User user = ess.getUser(event.getPlayer()); @@ -45,9 +46,13 @@ class EssentialsXMPPPlayerListener implements Listener { try { - for (String address : EssentialsXMPP.getInstance().getSpyUsers()) + List<String> users = EssentialsXMPP.getInstance().getSpyUsers(); + synchronized (users) { - EssentialsXMPP.getInstance().sendMessage(address, message); + for (String address : users) + { + EssentialsXMPP.getInstance().sendMessage(address, message); + } } } catch (Exception ex) diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java index a35312129..6439c9b9d 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/UserManager.java @@ -9,7 +9,7 @@ import java.util.*; public class UserManager implements IConf { private final transient EssentialsConf users; - private final transient List<String> spyusers = new ArrayList<String>(); + private final transient List<String> spyusers = Collections.synchronizedList(new ArrayList<String>()); private final static String ADDRESS = "address"; private final static String SPY = "spy"; diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java index bb44d3127..164f40c2a 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.Console; import com.earth2me.essentials.EssentialsConf; import com.earth2me.essentials.IConf; import com.earth2me.essentials.IUser; +import com.earth2me.essentials.Util; import java.io.File; import java.util.*; import java.util.logging.Handler; @@ -61,7 +62,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager disconnect(); connect(); } - chat.sendMessage(message.replaceAll("ยง[0-9a-f]", "")); + chat.sendMessage(Util.stripFormat(message)); return true; } } @@ -16,6 +16,7 @@ <target name="buildRest" depends="buildEss"> <ant dir="EssentialsChat" antfile="build.xml"/> <ant dir="EssentialsSpawn" antfile="build.xml"/> + <ant dir="EssentialsAntiBuild" antfile="build.xml"/> <ant dir="EssentialsProtect" antfile="build.xml"/> <ant dir="EssentialsGeoIP" antfile="build.xml"/> <ant dir="EssentialsXMPP" antfile="build.xml"/> diff --git a/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar Binary files differindex 01aed63a2..38246fd27 100644 --- a/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar +++ b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar diff --git a/lib/bukkit.jar b/lib/bukkit.jar Binary files differindex 912400ba3..543daac0f 100644 --- a/lib/bukkit.jar +++ b/lib/bukkit.jar diff --git a/lib/craftbukkit.jar b/lib/craftbukkit.jar Binary files differindex 815d0a929..5911ae805 100644 --- a/lib/craftbukkit.jar +++ b/lib/craftbukkit.jar diff --git a/lib/nblibraries.properties b/lib/nblibraries.properties index 0380a6c75..dfbfc5e2e 100644 --- a/lib/nblibraries.properties +++ b/lib/nblibraries.properties @@ -1,5 +1,7 @@ libs.CopyLibs.classpath=\ ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar +libs.CopyLibs.displayName=CopyLibs Task +libs.CopyLibs.prop-version=1.0 libs.junit_4.10.classpath=\ ${base}/junit_4.10/junit-4.10.jar libs.junit_4.10.src=\ |