1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-08 05:30:46 +02:00

Compare commits

..

106 Commits

Author SHA1 Message Date
snowleo
256c963370 Merge branch 'master' into release 2011-08-21 21:44:58 +02:00
snowleo
d818f705ad Cleanup 2011-08-21 21:30:01 +02:00
snowleo
1ac033a60e Pages for /warp command 2011-08-21 21:27:36 +02:00
snowleo
af248a1d2e Wait 1 second after deactivation of protect to allow the database to close. 2011-08-21 21:27:22 +02:00
snowleo
7b8c2a4575 Merge branch 'master' into release 2011-08-21 20:22:28 +02:00
KHobbits
040e2bee86 Fixing trade sign messages
Unifying tree/spawnmob code for block selection
Adding TL notes
2011-08-21 17:08:32 +01:00
KHobbits
5a1ea77019 Merge branch 'master' of github.com:khobbits/Essentials 2011-08-20 21:58:55 +01:00
KHobbits
83fc7de01a Fixing trade message to be more user friendly. 2011-08-20 21:58:26 +01:00
okamosy
d14f278ecf added charge command
fixed formatting
2011-08-20 21:23:44 +01:00
KHobbits
69b76b810c Merge branch 'master' of github.com:khobbits/Essentials 2011-08-20 20:55:21 +01:00
KHobbits
2c787e07ec Switching trade sign flag 2011-08-20 20:54:54 +01:00
okamosy
3e9b27e3ef Added command repair [hand|all]
fixed if statements in commandsell
2011-08-20 20:49:17 +01:00
okamosy
4bc3d5efad Merge branch 'master' of github.com:khobbits/Essentials 2011-08-20 18:11:56 +01:00
okamosy
9791dcc0bc Reformatted ptime and time messages
fixed typo in plugin
2011-08-20 18:09:55 +01:00
KHobbits
84068c18b1 Updating default permissions. 2011-08-20 18:06:43 +01:00
KHobbits
a32b55e28f Translation for tpall + tidy. 2011-08-20 16:44:42 +01:00
KHobbits
8d1262fc91 Check jail first, before setting. 2011-08-19 12:16:28 +01:00
KHobbits
a2f727bebc Success message on /spawner
Switch to use mob class.
2011-08-19 12:06:35 +01:00
snowleo
7f1ba0d6ae Merge branch 'master' into release 2011-08-19 02:32:56 +02:00
snowleo
2b48045a8f Removed unused users map 2011-08-19 02:32:34 +02:00
snowleo
7e5b79aa14 Merge branch 'master' into release 2011-08-19 02:10:36 +02:00
snowleo
a53d8ddef1 Protection signs: First check for ownership, then for allowed users. 2011-08-19 01:43:39 +02:00
snowleo
2690696712 Corrected german translation. 2011-08-19 01:30:10 +02:00
snowleo
086343ee48 Merge branch 'master' into release 2011-08-19 01:06:52 +02:00
snowleo
c79ac59bc0 Added KHobbits to authors 2011-08-19 01:06:15 +02:00
snowleo
a1ad512a80 Merge branch 'master' into release 2011-08-19 00:42:26 +02:00
KHobbits
6a9865cd67 Changing default prefix behavior to be a little smarter. 2011-08-17 17:40:11 +01:00
KHobbits
5d95d1fca6 Adding command cost for !shout and ?question. 2011-08-17 15:28:58 +01:00
KHobbits
2541efb682 Adding instructions to accept tpaall. 2011-08-17 14:27:27 +01:00
KHobbits
8ff405f2fe Adding /tpaall - Teleport here request to all players. 2011-08-17 14:19:47 +01:00
KHobbits
376d206d2b Removing advice to move to perm3 2011-08-15 22:58:50 +02:00
ementalo
6295127589 #RB 1060 Updates 2011-08-15 20:36:43 +01:00
snowleo
b93d289176 Update Permissions3.jar in lib folder to 3.1.6 2011-08-14 21:57:21 +02:00
KHobbits
81d7be4f77 Merge pull request #22 from okamosy/master
Adding hidden players to tpo/unlimited update
2011-08-11 13:01:01 -07:00
okamosy
b776362be7 Added ability to clear entire list of of unlimited items
Fixed permission bug with per item spawning
General unlimited cleanup
2011-08-11 20:47:51 +01:00
okamosy
65df249510 Added support for teleporting to hidden players
Permission: essentials.teleport.hidden
2011-08-11 15:52:34 +01:00
KHobbits
6fa2b14d65 Merge pull request #1 from okamosy/master
added error message
2011-08-11 07:08:39 -07:00
okamosy
6ec674d0a3 added error message when attempting to pay a user that isn't online 2011-08-11 15:03:08 +01:00
snowleo
93883cfc12 Catch NPE while login of new player 2011-08-11 13:43:04 +02:00
snowleo
2e565f8881 Allow the use of the world spawn in EssentialsSpawn for new players. 2011-08-11 13:32:11 +02:00
KHobbits
b851cd10f2 Fix help for plugins which miss command descriptions. 2011-08-11 06:56:33 +01:00
KHobbits
576b48c08c Todo/alias. 2011-08-11 05:20:43 +01:00
KHobbits
5ca9927987 Fix unbanning players who don't have user files. 2011-08-11 04:38:00 +01:00
KHobbits
a753f322df Updating /help for static ptime. 2011-08-11 03:34:07 +01:00
KHobbits
300ee9c729 Fix sethome/seen for invalid players. 2011-08-11 03:33:45 +01:00
KHobbits
1fbed62c1d Stop searching for tp location after a chunk. 2011-08-11 03:33:09 +01:00
KHobbits
a21d80ecd8 /ptime list output message change 2011-08-11 03:04:57 +01:00
KHobbits
1e7bf9a46c Removing hole in floor, tp cop-out.
This should force the code to find an suitable tp location.
- Not sure how well this will effect performance, but wanted to test it.
2011-08-11 02:59:40 +01:00
KHobbits
19595c5847 Add '@' prefix to time, to fix the time, rather than relative. 2011-08-10 15:06:42 +01:00
KHobbits
47c8217511 Merge diff from krnlyng:
Adjust item spawn, to allow for match native names.
2011-08-10 10:45:24 +01:00
KHobbits
db50d455df Fixing annoying text match. 2011-08-10 12:35:04 +06:00
KHobbits
ec5746dbe6 Fixing omission on last patches. 2011-08-10 12:05:05 +06:00
KHobbits
05ba5c00e6 Patch around broken bukkit method. 2011-08-10 11:36:09 +06:00
KHobbits
bb2b504d7a Trim help message to fit on 1 line.
Added old time alias.
2011-08-10 10:46:33 +06:00
KHobbits
5bb86309f6 Fixing display timezone if the server isn't running GMT+1 2011-08-10 10:41:03 +06:00
KHobbits
abbeb0a212 Added method to list users fixed time. 2011-08-10 05:25:45 +01:00
KHobbits
d9d781a33a Adjust times a little bit to be more realistic? 2011-08-10 04:54:03 +01:00
snowleo
327c15c5be Allow other plugins to use the same first line on signs as essentials. Just make sure that the player, who creates the sign does not have essentials.signs.signname.create or essentials.signs.create.signname permission. 2011-08-08 22:40:54 +02:00
snowleo
858e2a8b89 Reverting some changes to /time command 2011-08-08 18:21:38 +02:00
snowleo
33d37a2f96 Revert "Prevent closing already closed statements"
This reverts commit b9fc6a0b2b.
2011-08-08 18:14:20 +02:00
snowleo
a8f6014a42 Some fixes to the time code by me 2011-08-08 17:51:16 +02:00
snowleo
a117080b32 Some fixes to the time code by me 2011-08-08 17:49:32 +02:00
snowleo
f75390bd3f Correct code format for file DescParseTickFormat 2011-08-08 17:46:12 +02:00
snowleo
b07ba21659 Corrected permission testing a bit 2011-08-08 17:01:03 +02:00
snowleo
a109134b92 Part of oloflarsson new time command
Semi complete awesome time command. This is missing: Help text, I18N.
2011-08-08 17:00:04 +02:00
snowleo
69d3921a6a Fixes to jail 2011-08-08 16:42:56 +02:00
snowleo
ca3369938d Minor cleanup 2011-08-08 16:32:59 +02:00
snowleo
fbd9ee9453 XMPP: Let xmpp users see xmpp messages from other xmpp users. 2011-08-08 16:30:32 +02:00
snowleo
8185b05b5d XMPP: reconnect to server, if connection is broken. 2011-08-08 16:03:00 +02:00
snowleo
b9fc6a0b2b Prevent closing already closed statements 2011-08-08 15:56:23 +02:00
snowleo
62ebf3db41 Fix /spawner with PigZombie 2011-08-08 15:34:32 +02:00
snowleo
a90b16be36 Prevent muted players from using /msg 2011-08-08 15:34:10 +02:00
snowleo
d07ecde47d Fix essentials.joinfullserver 2011-08-08 15:24:38 +02:00
snowleo
5db35458e8 Limiting the length of the name on signs to 13 instead of 14 2011-08-08 15:13:27 +02:00
snowleo
cf4752dad6 Restrict sign protections to valid signs only 2011-08-08 15:07:26 +02:00
snowleo
a085503c84 Users are now loaded async, so we have a new internal structure where they are saved.
I also did some cleanup on the classes that I worked on.

This needs testing, it might break, because it does not behave 100% identical like before.

it's possible that /balancetop now needs more time to finish, if not all users are loaded into memory.
2011-08-08 14:40:40 +02:00
snowleo
9a893f65fe Changes to build-impl by Netbeans 2011-08-08 14:40:39 +02:00
KHobbits
cc273e919c Adding extra alias's to plugin.yml 2011-08-08 10:41:26 +01:00
KHobbits
65702ea0bf Updating register to latest build. 2011-08-08 10:20:04 +01:00
KHobbits
614b7b84f7 Adding new register methods. 2011-08-08 10:17:13 +01:00
KHobbits
a04e0533d6 More register libs 2011-08-08 10:02:18 +01:00
KHobbits
b85a5e9e0d Making /help <string> match the plugin name. 2011-08-08 09:23:48 +01:00
KHobbits
bb6b2c9374 Merge branch 'master' of github.com:essentials/Essentials 2011-07-28 03:49:10 +01:00
KHobbits
df47aad478 Removing failed translation. 2011-07-28 03:47:42 +01:00
KHobbits
9eb73cf854 Merge pull request #21 from khobbits/master
rainbow sheep
2011-07-27 17:20:16 -07:00
KHobbits
12777af61a adding sheep:random to /spawnmob 2011-07-28 01:15:47 +01:00
KHobbits
acb50786c4 Merge pull request #20 from khobbits/master
Ban changes
2011-07-27 06:28:57 -07:00
KHobbits
33f48eae0d Adjusting the config file to mention the help permission 2011-07-27 14:26:04 +01:00
KHobbits
7b18343e75 Adding a permission for unhiding help. 2011-07-27 14:25:41 +01:00
snowleo
9bb2ef9cbe Merge branch 'master' into release 2011-07-27 01:04:37 +02:00
snowleo
beb34a7651 Allow fractions of 1 2011-07-27 01:04:21 +02:00
snowleo
0ac26265e2 Fix for money exploit on trade signs 2011-07-27 01:00:55 +02:00
KHobbits
d6dc6d1d39 fixing lost revision. 2011-07-26 14:28:23 +01:00
KHobbits
0ab8a2760d Adding tempban/kick broadcast permissions and adding a banned by to the broadcast.
Adding tempban/kick broadcast permissions and adding a banned by to the broadcast.
Merge branch 'master' of github.com:khobbits/Essentials

Conflicts:
	Essentials/src/messages.properties
	Essentials/src/messages_da.properties
	Essentials/src/messages_en.properties
	Essentials/src/messages_fr.properties
	Essentials/src/messages_nl.properties
Merge branch 'master' of github.com:khobbits/Essentials
2011-07-26 14:23:14 +01:00
ementalo
8bb4067f06 double quoting ' 2011-07-26 10:35:55 +02:00
ementalo
fe1820134b Merge pull request #19 from khobbits/master
Xesxen's Dutch translation.
2011-07-26 01:34:32 -07:00
KHobbits
7d7c686e6a Edited Essentials/src/plugin.yml via GitHub 2011-07-25 23:25:07 -07:00
KHobbits
0b681c3654 Edited Essentials/src/messages_nl.properties via GitHub 2011-07-25 19:24:14 -07:00
KHobbits
23eeb82ac4 Edited Essentials/src/messages_nl.properties via GitHub 2011-07-25 19:20:42 -07:00
snowleo
edd6adc78f Another obsolete file 2011-07-24 23:33:48 +02:00
snowleo
c9028623ac Removed useless files 2011-07-24 23:30:11 +02:00
snowleo
dd5bcb8762 Edited README.markdown via GitHub 2011-07-24 14:25:12 -07:00
snowleo
bc1c252dca Correcting all line endings to LF 2011-07-24 23:19:12 +02:00
KHobbits
19ba6e5195 Added plural alias for kit & warp 2011-07-24 12:47:59 -07:00
snowleo
864e608582 Added code guidelines to all projects, so we don't need them globally.
Compress jar files
Don't copy lib files into dist folders
Removed vendor names
Changed all java versions to 1.6 to make it consistent.
2011-07-24 04:07:28 +02:00
snowleo
b84785cc82 If add-prefix-suffix is not set in config and EssentialsChat is installed, it will default to true now for backwards compatibility. 2011-07-24 00:41:54 +02:00
146 changed files with 7432 additions and 5257 deletions

5
.gitignore vendored
View File

@@ -25,4 +25,7 @@
/EssentialsProtect/build/
/EssentialsPermissionsCommands/nbproject/private/
/EssentialsPermissionsCommands/build/
/EssentialsPermissionsCommands/dist/
/EssentialsPermissionsCommands/dist/
/Essentials/nbproject/private/
/Essentials/dist/
/Essentials/build/

View File

@@ -931,11 +931,12 @@ is divided into following sections:
<classpath>
<path path="${javac.classpath}"/>
</classpath>
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
<fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
<include name="**/*.java"/>
<exclude name="*.java"/>
</fileset>
</javadoc>
<copy todir="${dist.javadoc.dir}">

View File

@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.43.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=2bd2dd75
nbproject/build-impl.xml.script.CRC32=769e541b
nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
nbproject/build-impl.xml.script.CRC32=89fb91fc
nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45

View File

@@ -3,7 +3,42 @@ annotation.processing.enabled.in.editor=false
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=BuildAll
application.vendor=Paul
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
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=2
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=120
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAnnotationArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineArrayInit=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAssignment=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineBinaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineCallArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineDisjunctiveCatchTypes=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineImplements=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineParenthesized=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTernaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineThrows=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader=0
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
@@ -27,7 +62,7 @@ dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
includes=**
jar.compress=false
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
${reference.EssentialsChat.jar}:\
@@ -35,16 +70,16 @@ javac.classpath=\
${reference.EssentialsPermissionsCommands.jar}:\
${reference.EssentialsSpawn.jar}:\
${reference.EssentialsGeoIP.jar}:\
${reference.EssentialsXMPP.jar}:\
${reference.EssentialsGroupBridge.jar}:\
${reference.EssentialsXMPP.jar}:\
${reference.EssentialsGroupManager.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.5
javac.target=1.5
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\

View File

@@ -1,7 +0,0 @@
# NetBeans cruft
/build
/dist
/nbproject/private
# Mac cruft
.DS_Store

View File

@@ -1,84 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="Essentials" default="default" basedir=".">
<description>Builds, tests, and runs the project Essentials.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="Essentials-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<!--target name="-post-jar">
<jar jarfile="${dist.dir}/Essentials.jar">
<zipfileset src="${dist.jar}" excludes="META-INF/*" />
<zipfileset src="${dist.dir}/lib/Register.jar" excludes="META-INF/*" />
<manifest>
<attribute name="Classpath" value="Essentials.jar"/>
</manifest>
</jar>
</target-->
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="Essentials" default="default" basedir=".">
<description>Builds, tests, and runs the project Essentials.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="Essentials-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<!--target name="-post-jar">
<jar jarfile="${dist.dir}/Essentials.jar">
<zipfileset src="${dist.jar}" excludes="META-INF/*" />
<zipfileset src="${dist.dir}/lib/Register.jar" excludes="META-INF/*" />
<manifest>
<attribute name="Classpath" value="Essentials.jar"/>
</manifest>
</jar>
</target-->
</project>

View File

@@ -868,11 +868,12 @@ is divided into following sections:
<classpath>
<path path="${javac.classpath}"/>
</classpath>
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
<fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
<include name="**/*.java"/>
<exclude name="*.java"/>
</fileset>
</javadoc>
<copy todir="${dist.javadoc.dir}">

View File

@@ -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=4b596d89
nbproject/build-impl.xml.script.CRC32=4926001b
nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
nbproject/build-impl.xml.script.CRC32=dbc81ee1
nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
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

View File

@@ -3,7 +3,42 @@ annotation.processing.enabled.in.editor=false
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=Essentials
application.vendor=Paul
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
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=2
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=120
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAnnotationArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineArrayInit=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAssignment=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineBinaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineCallArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineDisjunctiveCatchTypes=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineImplements=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineParenthesized=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTernaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineThrows=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader=0
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
@@ -30,16 +65,22 @@ file.reference.BOSEconomy7.jar=../lib/BOSEconomy7.jar
file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar
file.reference.iCo4.jar=../lib/iCo4.jar
file.reference.iCo5.jar=../lib/iCo5.jar
file.reference.iCo6.jar=../lib/iCo6.jar
file.reference.junit-4.5.jar=..\\lib\\junit_4\\junit-4.5.jar
file.reference.MultiCurrency.jar=../lib/MultiCurrency.jar
file.reference.Permissions3.jar=../lib/Permissions3.jar
file.reference.PermissionsEx.jar=../lib/PermissionsEx.jar
includes=**
jar.compress=false
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.Permissions3.jar}:\
${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\
${file.reference.iCo4.jar}:\
${file.reference.iCo5.jar}:\
${file.reference.iCo6.jar}:\
${file.reference.MultiCurrency.jar}:\
${file.reference.BOSEconomy7.jar}:\
${file.reference.PermissionsEx.jar}
# Space-separated list of extra javac options
@@ -47,8 +88,8 @@ javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.5
javac.target=1.5
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
@@ -66,8 +107,17 @@ javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jnlp.codebase.type=no.codebase
jnlp.descriptor=application
jnlp.enabled=false
jnlp.mixed.code=default
jnlp.offline-allowed=false
jnlp.signed=false
jnlp.signing=
jnlp.signing.alias=
jnlp.signing.keystore=
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
mkdist.disabled=true
platform.active=default_platform
run.classpath=\
${javac.classpath}:\

View File

@@ -0,0 +1,292 @@
package com.earth2me.essentials;
import com.earth2me.essentials.commands.Commandtime;
import java.text.SimpleDateFormat;
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.
*
* http://www.minecraftwiki.net/wiki/Day/night_cycle
*
* @author Olof Larsson
*/
public final class DescParseTickFormat
{
// ============================================
// First some information vars. TODO: Should this be in a config file?
// --------------------------------------------
public static final Map<String, Integer> nameToTicks = new LinkedHashMap<String, Integer>();
public static final Set<String> resetAliases = new HashSet<String>();
public static final int ticksAtMidnight = 18000;
public static final int ticksPerDay = 24000;
public static final int ticksPerHour = 1000;
public static final double ticksPerMinute = 1000d / 60d;
public static final double ticksPerSecond = 1000d / 60d / 60d;
private static final SimpleDateFormat SDFTwentyFour = new SimpleDateFormat("HH:mm", Locale.ENGLISH);
private static final SimpleDateFormat SDFTwelve = new SimpleDateFormat("h:mmaa", Locale.ENGLISH);
static
{
SDFTwentyFour.setTimeZone(TimeZone.getTimeZone("GMT"));
SDFTwelve.setTimeZone(TimeZone.getTimeZone("GMT"));
nameToTicks.put("sunrise", 23000);
nameToTicks.put("dawn", 23000);
nameToTicks.put("daystart", 0);
nameToTicks.put("day", 0);
nameToTicks.put("morning", 1000);
nameToTicks.put("midday", 6000);
nameToTicks.put("noon", 6000);
nameToTicks.put("afternoon", 9000);
nameToTicks.put("sunset", 12000);
nameToTicks.put("dusk", 12000);
nameToTicks.put("sundown", 12000);
nameToTicks.put("nightfall", 12000);
nameToTicks.put("nightstart", 14000);
nameToTicks.put("night", 14000);
nameToTicks.put("midnight", 18000);
resetAliases.add("reset");
resetAliases.add("normal");
resetAliases.add("default");
}
private DescParseTickFormat()
{
}
// ============================================
// PARSE. From describing String to int
// --------------------------------------------
public static long parse(String desc) throws NumberFormatException
{
// Only look at alphanumeric and lowercase and : for 24:00
desc = desc.toLowerCase().replaceAll("[^A-Za-z0-9:]", "");
// Detect ticks format
try
{
return parseTicks(desc);
}
catch (Exception e)
{
}
// Detect 24-hour format
try
{
return parse24(desc);
}
catch (Exception e)
{
}
// Detect 12-hour format
try
{
return parse12(desc);
}
catch (Exception e)
{
}
// Detect aliases
try
{
return parseAlias(desc);
}
catch (Exception e)
{
}
// Well we failed to understand...
throw new NumberFormatException();
}
public static long parseTicks(String desc) throws NumberFormatException
{
if (!desc.matches("^[0-9]+ti?c?k?s?$"))
{
throw new NumberFormatException();
}
desc = desc.replaceAll("[^0-9]", "");
return Long.parseLong(desc) % 24000;
}
public static long parse24(String desc) throws NumberFormatException
{
if (!desc.matches("^[0-9]{2}[^0-9]?[0-9]{2}$"))
{
throw new NumberFormatException();
}
desc = desc.toLowerCase().replaceAll("[^0-9]", "");
if (desc.length() != 4)
{
throw new NumberFormatException();
}
final int hours = Integer.parseInt(desc.substring(0, 2));
final int minutes = Integer.parseInt(desc.substring(2, 4));
return hoursMinutesToTicks(hours, minutes);
}
public static long parse12(String desc) throws NumberFormatException
{
if (!desc.matches("^[0-9]{1,2}([^0-9]?[0-9]{2})?(pm|am)$"))
{
throw new NumberFormatException();
}
int hours = 0;
int minutes = 0;
if (desc.endsWith("pm"))
{
hours += 12;
}
desc = desc.toLowerCase().replaceAll("[^0-9]", "");
if (desc.length() > 4)
{
throw new NumberFormatException();
}
if (desc.length() == 4)
{
hours += Integer.parseInt(desc.substring(0, 2));
minutes += Integer.parseInt(desc.substring(2, 4));
}
else if (desc.length() == 3)
{
hours += Integer.parseInt(desc.substring(0, 1));
minutes += Integer.parseInt(desc.substring(1, 3));
}
else if (desc.length() == 2)
{
hours += Integer.parseInt(desc.substring(0, 2));
}
else if (desc.length() == 1)
{
hours += Integer.parseInt(desc.substring(0, 1));
}
else
{
throw new NumberFormatException();
}
return hoursMinutesToTicks(hours, minutes);
}
public static long hoursMinutesToTicks(final int hours, final int minutes)
{
long ret = ticksAtMidnight;
ret += (hours) * ticksPerHour;
ret += (minutes / 60.0) * ticksPerHour;
ret %= ticksPerDay;
return ret;
}
public static long parseAlias(final String desc) throws NumberFormatException
{
final Integer ret = nameToTicks.get(desc);
if (ret == null)
{
throw new NumberFormatException();
}
return ret;
}
public static boolean meansReset(final String desc)
{
return resetAliases.contains(desc);
}
// ============================================
// FORMAT. From int to describing String
// --------------------------------------------
public static String format(final long ticks)
{
return Util.format("timeFormat", format24(ticks), format12(ticks), formatTicks(ticks));
}
public static String formatTicks(final long ticks)
{
return (ticks % ticksPerDay) + "ticks";
}
public static String format24(final long ticks)
{
synchronized (SDFTwentyFour)
{
return formatDateFormat(ticks, SDFTwentyFour);
}
}
public static String format12(final long ticks)
{
synchronized (SDFTwelve)
{
return formatDateFormat(ticks, SDFTwelve);
}
}
public static String formatDateFormat(final long ticks, final SimpleDateFormat format)
{
final Date date = ticksToDate(ticks);
return format.format(date);
}
public static Date ticksToDate(long ticks)
{
// Assume the server time starts at 0. It would start on a day.
// But we will simulate that the server started with 0 at midnight.
ticks = ticks - ticksAtMidnight + ticksPerDay;
// How many ingame days have passed since the server start?
final long days = ticks / ticksPerDay;
ticks = ticks - days * ticksPerDay;
// How many hours on the last day?
final long hours = ticks / ticksPerHour;
ticks = ticks - hours * ticksPerHour;
// How many minutes on the last day?
final long minutes = (long)Math.floor(ticks / ticksPerMinute);
final double dticks = ticks - minutes * ticksPerMinute;
// How many seconds on the last day?
final long seconds = (long)Math.floor(dticks / ticksPerSecond);
// Now we create an english GMT calendar (We wan't no daylight savings)
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
cal.setLenient(true);
// And we set the time to 0! And append the time that passed!
cal.set(0, Calendar.JANUARY, 1, 0, 0, 0);
cal.add(Calendar.DAY_OF_YEAR, (int)days);
cal.add(Calendar.HOUR_OF_DAY, (int)hours);
cal.add(Calendar.MINUTE, (int)minutes);
cal.add(Calendar.SECOND, (int)seconds + 1); // To solve rounding errors.
return cal.getTime();
}
}

View File

@@ -35,18 +35,18 @@ import java.math.BigInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bukkit.command.PluginCommand;
import org.bukkit.craftbukkit.scheduler.CraftScheduler;
import org.bukkit.entity.Player;
import org.bukkit.event.Event.Priority;
import org.bukkit.event.Event.Type;
import org.bukkit.event.server.ServerListener;
import org.bukkit.plugin.*;
import org.bukkit.plugin.java.*;
import org.bukkit.scheduler.BukkitScheduler;
public class Essentials extends JavaPlugin implements IEssentials
{
public static final int BUKKIT_VERSION = 1000;
public static final int BUKKIT_VERSION = 1060;
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private transient ISettings settings;
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
@@ -58,13 +58,14 @@ public class Essentials extends JavaPlugin implements IEssentials
private transient Backup backup;
private transient BanWorkaround bans;
private transient ItemDb itemDb;
private transient final Map<String, User> users = new HashMap<String, User>();
private transient EssentialsUpdateTimer updateTimer;
private transient final Methods paymentMethod = new Methods();
private transient final static boolean enableErrorLogging = false;
private transient final EssentialsErrorHandler errorHandler = new EssentialsErrorHandler();
private transient IPermissionsHandler permissionsHandler;
private transient UserMap userMap;
@Override
public ISettings getSettings()
{
return settings;
@@ -85,10 +86,12 @@ public class Essentials extends JavaPlugin implements IEssentials
LOGGER.log(Level.INFO, dataFolder.toString());
this.initialize(null, server, new PluginDescriptionFile(new FileReader(new File("src" + File.separator + "plugin.yml"))), dataFolder, null, null);
settings = new Settings(this);
userMap = new UserMap(this);
permissionsHandler = new ConfigPermissionsHandler(this);
Economy.setEss(this);
}
@Override
public void onEnable()
{
final String[] javaversion = System.getProperty("java.version").split("\\.", 3);
@@ -100,13 +103,15 @@ public class Essentials extends JavaPlugin implements IEssentials
{
LOGGER.addHandler(errorHandler);
}
EssentialsUpgrade upgrade = new EssentialsUpgrade(this.getDescription().getVersion(), this);
final EssentialsUpgrade upgrade = new EssentialsUpgrade(this);
upgrade.beforeSettings();
confList = new ArrayList<IConf>();
settings = new Settings(this);
confList.add(settings);
upgrade.afterSettings();
Util.updateLocale(settings.getLocale(), this);
userMap = new UserMap(this);
confList.add(userMap);
spawn = new Spawn(getServer(), this.getDataFolder());
confList.add(spawn);
warps = new Warps(getServer(), this.getDataFolder());
@@ -212,12 +217,14 @@ public class Essentials extends JavaPlugin implements IEssentials
LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Util.joinList(this.getDescription().getAuthors())));
}
@Override
public void onDisable()
{
Trade.closeLog();
LOGGER.removeHandler(errorHandler);
}
@Override
public void reload()
{
Trade.closeLog();
@@ -229,21 +236,18 @@ public class Essentials extends JavaPlugin implements IEssentials
Util.updateLocale(settings.getLocale(), this);
for (User user : users.values())
{
user.reloadConfig();
}
// for motd
getConfiguration().load();
}
public String[] getMotd(CommandSender sender, String def)
@Override
public String[] getMotd(final CommandSender sender, final String def)
{
return getLines(sender, "motd", def);
}
public String[] getLines(CommandSender sender, String node, String def)
@Override
public String[] getLines(final CommandSender sender, final String node, final String def)
{
List<String> lines = (List<String>)getConfiguration().getProperty(node);
if (lines == null)
@@ -304,7 +308,7 @@ public class Essentials extends JavaPlugin implements IEssentials
}
}
m = m.replace("{ONLINE}", Integer.toString(getServer().getOnlinePlayers().length - playerHidden));
m = m.replace("{UNIQUE}", Integer.toString(users.size()));
m = m.replace("{UNIQUE}", Integer.toString(userMap.getUniqueUsers()));
if (m.matches(".*\\{PLAYERLIST\\}.*"))
{
@@ -348,12 +352,13 @@ public class Essentials extends JavaPlugin implements IEssentials
}
@Override
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args)
public boolean onCommand(final CommandSender sender, final Command command, final String commandLabel, final String[] args)
{
return onCommandEssentials(sender, command, commandLabel, args, Essentials.class.getClassLoader(), "com.earth2me.essentials.commands.Command", "essentials.");
}
public boolean onCommandEssentials(CommandSender sender, Command command, String commandLabel, String[] args, ClassLoader classLoader, String commandPath, String permissionPrefix)
@Override
public boolean onCommandEssentials(final CommandSender sender, final Command command, final String commandLabel, final String[] args, final ClassLoader classLoader, final String commandPath, final String permissionPrefix)
{
// Allow plugins to override the command via onCommand
if (!getSettings().isCommandOverridden(command.getName()) && !commandLabel.startsWith("e"))
@@ -365,7 +370,7 @@ public class Essentials extends JavaPlugin implements IEssentials
continue;
}
PluginDescriptionFile desc = p.getDescription();
final PluginDescriptionFile desc = p.getDescription();
if (desc == null)
{
continue;
@@ -376,7 +381,7 @@ public class Essentials extends JavaPlugin implements IEssentials
continue;
}
PluginCommand pc = getServer().getPluginCommand(desc.getName() + ":" + commandLabel);
final PluginCommand pc = getServer().getPluginCommand(desc.getName() + ":" + commandLabel);
if (pc != null)
{
return pc.execute(sender, commandLabel, args);
@@ -462,6 +467,7 @@ public class Essentials extends JavaPlugin implements IEssentials
}
}
@Override
public void showError(final CommandSender sender, final Throwable exception, final String commandLabel)
{
sender.sendMessage(Util.format("errorWithMessage", exception.getMessage()));
@@ -481,46 +487,64 @@ public class Essentials extends JavaPlugin implements IEssentials
}
}
public CraftScheduler getScheduler()
@Override
public BukkitScheduler getScheduler()
{
return (CraftScheduler)this.getServer().getScheduler();
return this.getServer().getScheduler();
}
@Override
public Jail getJail()
{
return jail;
}
@Override
public Warps getWarps()
{
return warps;
}
@Override
public Worth getWorth()
{
return worth;
}
@Override
public Backup getBackup()
{
return backup;
}
@Override
public Spawn getSpawn()
{
return spawn;
}
public User getUser(Object base)
@Override
public User getUser(final Object base)
{
if (base instanceof Player)
{
return getUser((Player)base);
}
if (base instanceof String)
{
try
{
return userMap.getUser((String)base);
}
catch (NullPointerException ex)
{
return null;
}
}
return null;
}
private <T extends Player> User getUser(T base)
private <T extends Player> User getUser(final T base)
{
if (base == null)
{
@@ -531,71 +555,64 @@ public class Essentials extends JavaPlugin implements IEssentials
{
return (User)base;
}
if (users.containsKey(base.getName().toLowerCase()))
try
{
return users.get(base.getName().toLowerCase()).update(base);
return userMap.getUser(base.getName()).update(base);
}
User u = new User(base, this);
users.put(u.getName().toLowerCase(), u);
return u;
}
public Map<String, User> getAllUsers()
{
return users;
}
public User getOfflineUser(String name)
{
// Don't create a new offline user, if we already have that user loaded.
User u = users.get(name.toLowerCase());
if (u != null)
catch (NullPointerException ex)
{
return u;
return null;
}
File userFolder = new File(getDataFolder(), "userdata");
File userFile = new File(userFolder, Util.sanitizeFileName(name) + ".yml");
if (userFile.exists())
{ //Users do not get offline changes saved without being reproccessed as Users! ~ Xeology :)
return getUser((Player)new OfflinePlayer(name, this));
}
return null;
}
@Override
public User getOfflineUser(final String name)
{
try
{
return userMap.getUser(name);
}
catch (NullPointerException ex)
{
return null;
}
}
@Override
public World getWorld(final String name)
{
if (name.matches("[0-9]+"))
{
final int id = Integer.parseInt(name);
if (id < getServer().getWorlds().size())
final int worldId = Integer.parseInt(name);
if (worldId < getServer().getWorlds().size())
{
return getServer().getWorlds().get(id);
return getServer().getWorlds().get(worldId);
}
}
return getServer().getWorld(name);
}
@Override
public void addReloadListener(final IConf listener)
{
confList.add(listener);
}
@Override
public Methods getPaymentMethod()
{
return paymentMethod;
}
@Override
public int broadcastMessage(final String name, final String message)
{
Player[] players = getServer().getOnlinePlayers();
final Player[] players = getServer().getOnlinePlayers();
for (Player player : players)
{
User u = getUser(player);
if (!u.isIgnoredPlayer(name))
final User user = getUser(player);
if (!user.isIgnoredPlayer(name))
{
player.sendMessage(message);
}
@@ -609,48 +626,63 @@ public class Essentials extends JavaPlugin implements IEssentials
return errorHandler.getErrors();
}
@Override
public int scheduleAsyncDelayedTask(final Runnable run)
{
return this.getScheduler().scheduleAsyncDelayedTask(this, run);
}
@Override
public int scheduleSyncDelayedTask(final Runnable run)
{
return this.getScheduler().scheduleSyncDelayedTask(this, run);
}
@Override
public int scheduleSyncDelayedTask(final Runnable run, final long delay)
{
return this.getScheduler().scheduleSyncDelayedTask(this, run, delay);
}
@Override
public int scheduleSyncRepeatingTask(final Runnable run, final long delay, final long period)
{
return this.getScheduler().scheduleSyncRepeatingTask(this, run, delay, period);
}
@Override
public TNTExplodeListener getTNTListener()
{
return tntListener;
}
@Override
public IPermissionsHandler getPermissionsHandler()
{
return permissionsHandler;
}
public void setPermissionsHandler(IPermissionsHandler handler)
@Override
public void setPermissionsHandler(final IPermissionsHandler handler)
{
this.permissionsHandler = handler;
}
@Override
public BanWorkaround getBans()
{
return bans;
}
@Override
public ItemDb getItemDb()
{
return itemDb;
}
@Override
public UserMap getUserMap()
{
return userMap;
}
}

View File

@@ -1,8 +1,6 @@
package com.earth2me.essentials;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Level;
@@ -301,13 +299,21 @@ public class EssentialsPlayerListener extends PlayerListener
@Override
public void onPlayerLogin(final PlayerLoginEvent event)
{
if (event.getResult() != Result.ALLOWED)
if (event.getResult() != Result.ALLOWED && event.getResult() != Result.KICK_FULL)
{
return;
}
final User user = ess.getUser(event.getPlayer());
User user = ess.getUser(event.getPlayer());
if (user == null) {
user = new User(event.getPlayer(), ess);
}
user.setNPC(false);
final long currentTime = System.currentTimeMillis();
user.checkBanTimeout(currentTime);
user.checkMuteTimeout(currentTime);
user.checkJailTimeout(currentTime);
if (user.isBanned())
{
final String banReason = user.getBanReason();

View File

@@ -1,79 +1,44 @@
package com.earth2me.essentials;
import java.io.File;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.bukkit.entity.Player;
public class EssentialsTimer implements Runnable, IConf
public class EssentialsTimer implements Runnable
{
private final IEssentials ess;
private final Set<User> allUsers = new HashSet<User>();
EssentialsTimer(IEssentials ess)
private final transient IEssentials ess;
private final transient Set<User> onlineUsers = new HashSet<User>();
EssentialsTimer(final IEssentials ess)
{
this.ess = ess;
File userdir = new File(ess.getDataFolder(), "userdata");
if (!userdir.exists()) {
return;
}
for (String string : userdir.list())
{
if (!string.endsWith(".yml")) {
continue;
}
String name = string.substring(0, string.length()-4);
User u = ess.getUser(new OfflinePlayer(name, ess));
allUsers.add(u);
}
}
@Override
public void run()
{
long currentTime = System.currentTimeMillis();
final long currentTime = System.currentTimeMillis();
for (Player player : ess.getServer().getOnlinePlayers())
{
User u = ess.getUser(player);
allUsers.add(u);
u.setLastActivity(currentTime);
final User user = ess.getUser(player);
onlineUsers.add(user);
user.setLastActivity(currentTime);
}
for (User user: allUsers) {
if (user.getBanTimeout() > 0 && user.getBanTimeout() < currentTime) {
user.setBanTimeout(0);
ess.getBans().unbanByName(user.getName());
}
if (user.getMuteTimeout() > 0 && user.getMuteTimeout() < currentTime && user.isMuted()) {
user.setMuteTimeout(0);
user.sendMessage(Util.i18n("canTalkAgain"));
user.setMuted(false);
}
if (user.getJailTimeout() > 0 && user.getJailTimeout() < currentTime && user.isJailed()) {
user.setJailTimeout(0);
user.setJailed(false);
user.sendMessage(Util.i18n("haveBeenReleased"));
user.setJail(null);
try
{
user.getTeleport().back();
}
catch (Exception ex)
{
}
}
if (user.getLastActivity() < currentTime && user.getLastActivity() > user.getLastLogout()) {
user.setLastLogout(user.getLastActivity());
}
}
}
public void reloadConfig()
{
for (User user : allUsers)
final Iterator<User> iterator = onlineUsers.iterator();
while (iterator.hasNext())
{
user.reloadConfig();
final User user = iterator.next();
if (user.getLastActivity() < currentTime && user.getLastActivity() > user.getLastLogout())
{
user.setLastLogout(user.getLastActivity());
iterator.remove();
continue;
}
user.checkMuteTimeout(currentTime);
user.checkJailTimeout(currentTime);
}
}
}

View File

@@ -16,63 +16,70 @@ import org.bukkit.inventory.ItemStack;
public class EssentialsUpgrade
{
private static boolean alreadyRun = false;
private final static Logger logger = Logger.getLogger("Minecraft");
private final IEssentials ess;
private final static Logger LOGGER = Logger.getLogger("Minecraft");
private final transient IEssentials ess;
private final transient EssentialsConf doneFile;
EssentialsUpgrade(String version, IEssentials essentials)
EssentialsUpgrade(final IEssentials essentials)
{
ess = essentials;
if (alreadyRun)
if (!ess.getDataFolder().exists())
{
return;
ess.getDataFolder().mkdirs();
}
alreadyRun = true;
doneFile = new EssentialsConf(new File(ess.getDataFolder(), "upgrades-done.yml"));
doneFile.load();
}
private void moveWorthValuesToWorthYml()
{
if (doneFile.getBoolean("moveWorthValuesToWorthYml", false))
{
return;
}
try
{
File configFile = new File(ess.getDataFolder(), "config.yml");
final File configFile = new File(ess.getDataFolder(), "config.yml");
if (!configFile.exists())
{
return;
}
EssentialsConf conf = new EssentialsConf(configFile);
final EssentialsConf conf = new EssentialsConf(configFile);
conf.load();
Worth w = new Worth(ess.getDataFolder());
final Worth worth = new Worth(ess.getDataFolder());
boolean found = false;
for (Material mat : Material.values())
{
int id = mat.getId();
double value = conf.getDouble("worth-" + id, Double.NaN);
final int id = mat.getId();
final double value = conf.getDouble("worth-" + id, Double.NaN);
if (!Double.isNaN(value))
{
found = true;
w.setPrice(new ItemStack(mat, 1, (short)0, (byte)0), value);
worth.setPrice(new ItemStack(mat, 1, (short)0, (byte)0), value);
}
}
if (found)
{
removeLinesFromConfig(configFile, "\\s*#?\\s*worth-[0-9]+.*", "# Worth values have been moved to worth.yml");
}
doneFile.setProperty("moveWorthValuesToWorthYml", true);
doneFile.save();
}
catch (Throwable e)
{
logger.log(Level.SEVERE, Util.i18n("upgradingFilesError"), e);
LOGGER.log(Level.SEVERE, Util.i18n("upgradingFilesError"), e);
}
}
private void removeLinesFromConfig(File file, String regex, String info) throws Exception
{
boolean needUpdate = false;
BufferedReader br = new BufferedReader(new FileReader(file));
File tempFile = File.createTempFile("essentialsupgrade", ".tmp.yml", ess.getDataFolder());
BufferedWriter bw = new BufferedWriter(new FileWriter(tempFile));
final BufferedReader bReader = new BufferedReader(new FileReader(file));
final File tempFile = File.createTempFile("essentialsupgrade", ".tmp.yml", ess.getDataFolder());
final BufferedWriter bWriter = new BufferedWriter(new FileWriter(tempFile));
do
{
String line = br.readLine();
final String line = bReader.readLine();
if (line == null)
{
break;
@@ -81,8 +88,8 @@ public class EssentialsUpgrade
{
if (!needUpdate && info != null)
{
bw.write(info, 0, info.length());
bw.newLine();
bWriter.write(info, 0, info.length());
bWriter.newLine();
}
needUpdate = true;
}
@@ -90,22 +97,22 @@ public class EssentialsUpgrade
{
if (line.endsWith("\r\n"))
{
bw.write(line, 0, line.length() - 2);
bWriter.write(line, 0, line.length() - 2);
}
else if (line.endsWith("\r") || line.endsWith("\n"))
{
bw.write(line, 0, line.length() - 1);
bWriter.write(line, 0, line.length() - 1);
}
else
{
bw.write(line, 0, line.length());
bWriter.write(line, 0, line.length());
}
bw.newLine();
bWriter.newLine();
}
}
while (true);
br.close();
bw.close();
bReader.close();
bWriter.close();
if (needUpdate)
{
if (!file.renameTo(new File(file.getParentFile(), file.getName().concat("." + System.currentTimeMillis() + ".upgradebackup"))))
@@ -116,19 +123,25 @@ public class EssentialsUpgrade
{
throw new Exception(Util.i18n("configFileRenameError"));
}
} else {
}
else
{
tempFile.delete();
}
}
private void updateUsersToNewDefaultHome()
{
File userdataFolder = new File(ess.getDataFolder(), "userdata");
if (doneFile.getBoolean("updateUsersToNewDefaultHome", false))
{
return;
}
final File userdataFolder = new File(ess.getDataFolder(), "userdata");
if (!userdataFolder.exists() || !userdataFolder.isDirectory())
{
return;
}
File[] userFiles = userdataFolder.listFiles();
final File[] userFiles = userdataFolder.listFiles();
for (File file : userFiles)
{
@@ -136,15 +149,16 @@ public class EssentialsUpgrade
{
continue;
}
EssentialsConf config = new EssentialsConf(file);
final EssentialsConf config = new EssentialsConf(file);
try
{
config.load();
if (config.hasProperty("home") && !config.hasProperty("home.default"))
{
@SuppressWarnings("unchecked")
List<Object> vals = (List<Object>)config.getProperty("home");
if (vals == null) {
final List<Object> vals = (List<Object>)config.getProperty("home");
if (vals == null)
{
continue;
}
World world = ess.getServer().getWorlds().get(0);
@@ -154,7 +168,7 @@ public class EssentialsUpgrade
}
if (world != null)
{
Location loc = new Location(
final Location loc = new Location(
world,
((Number)vals.get(0)).doubleValue(),
((Number)vals.get(1)).doubleValue(),
@@ -162,7 +176,7 @@ public class EssentialsUpgrade
((Number)vals.get(3)).floatValue(),
((Number)vals.get(4)).floatValue());
String worldName = world.getName().toLowerCase();
final String worldName = world.getName().toLowerCase();
if (worldName != null && !worldName.isEmpty())
{
config.removeProperty("home");
@@ -175,30 +189,32 @@ public class EssentialsUpgrade
}
catch (RuntimeException ex)
{
logger.log(Level.INFO, "File: "+file.toString());
LOGGER.log(Level.INFO, "File: " + file.toString());
throw ex;
}
}
doneFile.setProperty("updateUsersToNewDefaultHome", true);
doneFile.save();
}
private void moveUsersDataToUserdataFolder()
{
File usersFile = new File(ess.getDataFolder(), "users.yml");
final File usersFile = new File(ess.getDataFolder(), "users.yml");
if (!usersFile.exists())
{
return;
}
EssentialsConf usersConfig = new EssentialsConf(usersFile);
final EssentialsConf usersConfig = new EssentialsConf(usersFile);
usersConfig.load();
for (String username : usersConfig.getKeys(null))
{
User user = new User(new OfflinePlayer(username, ess), ess);
String nickname = usersConfig.getString(username + ".nickname");
final User user = new User(new OfflinePlayer(username, ess), ess);
final String nickname = usersConfig.getString(username + ".nickname");
if (nickname != null && !nickname.isEmpty() && !nickname.equals(username))
{
user.setNickname(nickname);
}
List<String> mails = usersConfig.getStringList(username + ".mail", null);
final List<String> mails = usersConfig.getStringList(username + ".mail", null);
if (mails != null && !mails.isEmpty())
{
user.setMails(mails);
@@ -206,8 +222,9 @@ public class EssentialsUpgrade
if (!user.hasHome())
{
@SuppressWarnings("unchecked")
List<Object> vals = (List<Object>)usersConfig.getProperty(username + ".home");
if (vals != null) {
final List<Object> vals = (List<Object>)usersConfig.getProperty(username + ".home");
if (vals != null)
{
World world = ess.getServer().getWorlds().get(0);
if (vals.size() > 5)
{
@@ -230,40 +247,56 @@ public class EssentialsUpgrade
private void convertWarps()
{
File warpsFolder = new File(ess.getDataFolder(), "warps");
final File warpsFolder = new File(ess.getDataFolder(), "warps");
if (!warpsFolder.exists())
{
warpsFolder.mkdirs();
}
File[] listOfFiles = warpsFolder.listFiles();
final File[] listOfFiles = warpsFolder.listFiles();
if (listOfFiles.length >= 1)
{
for (int i = 0; i < listOfFiles.length; i++)
{
String filename = listOfFiles[i].getName();
final String filename = listOfFiles[i].getName();
if (listOfFiles[i].isFile() && filename.endsWith(".dat"))
{
try
{
BufferedReader rx = new BufferedReader(new FileReader(listOfFiles[i]));
final BufferedReader rx = new BufferedReader(new FileReader(listOfFiles[i]));
double x, y, z;
float yaw, pitch;
String worldName;
try
{
if (!rx.ready()) continue;
if (!rx.ready())
{
continue;
}
x = Double.parseDouble(rx.readLine().trim());
if (!rx.ready()) continue;
if (!rx.ready())
{
continue;
}
y = Double.parseDouble(rx.readLine().trim());
if (!rx.ready()) continue;
if (!rx.ready())
{
continue;
}
z = Double.parseDouble(rx.readLine().trim());
if (!rx.ready()) continue;
if (!rx.ready())
{
continue;
}
yaw = Float.parseFloat(rx.readLine().trim());
if (!rx.ready()) continue;
if (!rx.ready())
{
continue;
}
pitch = Float.parseFloat(rx.readLine().trim());
worldName = rx.readLine();
}
finally {
finally
{
rx.close();
}
World w = null;
@@ -285,7 +318,7 @@ public class EssentialsUpgrade
w = w1;
}
}
Location loc = new Location(w, x, y, z, yaw, pitch);
final Location loc = new Location(w, x, y, z, yaw, pitch);
ess.getWarps().setWarp(filename.substring(0, filename.length() - 4), loc);
if (!listOfFiles[i].renameTo(new File(warpsFolder, filename + ".old")))
{
@@ -294,52 +327,52 @@ public class EssentialsUpgrade
}
catch (Exception ex)
{
logger.log(Level.SEVERE, null, ex);
LOGGER.log(Level.SEVERE, null, ex);
}
}
}
}
File warpFile = new File(ess.getDataFolder(), "warps.txt");
final File warpFile = new File(ess.getDataFolder(), "warps.txt");
if (warpFile.exists())
{
try
{
BufferedReader rx = new BufferedReader(new FileReader(warpFile));
try
final BufferedReader rx = new BufferedReader(new FileReader(warpFile));
try
{
for (String[] parts = new String[0]; rx.ready(); parts = rx.readLine().split(":"))
{
if (parts.length < 6)
for (String[] parts = new String[0]; rx.ready(); parts = rx.readLine().split(":"))
{
continue;
}
String name = parts[0];
double x = Double.parseDouble(parts[1].trim());
double y = Double.parseDouble(parts[2].trim());
double z = Double.parseDouble(parts[3].trim());
float yaw = Float.parseFloat(parts[4].trim());
float pitch = Float.parseFloat(parts[5].trim());
if (name.isEmpty())
{
continue;
}
World w = null;
for (World world : ess.getServer().getWorlds())
{
if (world.getEnvironment() != World.Environment.NETHER)
if (parts.length < 6)
{
w = world;
break;
continue;
}
final String name = parts[0];
final double x = Double.parseDouble(parts[1].trim());
final double y = Double.parseDouble(parts[2].trim());
final double z = Double.parseDouble(parts[3].trim());
final float yaw = Float.parseFloat(parts[4].trim());
final float pitch = Float.parseFloat(parts[5].trim());
if (name.isEmpty())
{
continue;
}
World w = null;
for (World world : ess.getServer().getWorlds())
{
if (world.getEnvironment() != World.Environment.NETHER)
{
w = world;
break;
}
}
final Location loc = new Location(w, x, y, z, yaw, pitch);
ess.getWarps().setWarp(name, loc);
if (!warpFile.renameTo(new File(ess.getDataFolder(), "warps.txt.old")))
{
throw new Exception(Util.format("fileRenameError", "warps.txt"));
}
}
Location loc = new Location(w, x, y, z, yaw, pitch);
ess.getWarps().setWarp(name, loc);
if (!warpFile.renameTo(new File(ess.getDataFolder(), "warps.txt.old")))
{
throw new Exception(Util.format("fileRenameError", "warps.txt"));
}
}
}
finally
{
@@ -348,52 +381,60 @@ public class EssentialsUpgrade
}
catch (Exception ex)
{
logger.log(Level.SEVERE, null, ex);
LOGGER.log(Level.SEVERE, null, ex);
}
}
}
private void sanitizeAllUserFilenames()
{
File usersFolder = new File(ess.getDataFolder(), "userdata");
if (doneFile.getBoolean("sanitizeAllUserFilenames", false))
{
return;
}
final File usersFolder = new File(ess.getDataFolder(), "userdata");
if (!usersFolder.exists())
{
return;
}
File[] listOfFiles = usersFolder.listFiles();
final File[] listOfFiles = usersFolder.listFiles();
for (int i = 0; i < listOfFiles.length; i++)
{
String filename = listOfFiles[i].getName();
final String filename = listOfFiles[i].getName();
if (!listOfFiles[i].isFile() || !filename.endsWith(".yml"))
{
continue;
}
String sanitizedFilename = Util.sanitizeFileName(filename.substring(0, filename.length() - 4)) + ".yml";
final String sanitizedFilename = Util.sanitizeFileName(filename.substring(0, filename.length() - 4)) + ".yml";
if (sanitizedFilename.equals(filename))
{
continue;
}
File tmpFile = new File(listOfFiles[i].getParentFile(), sanitizedFilename + ".tmp");
File newFile = new File(listOfFiles[i].getParentFile(), sanitizedFilename);
if (!listOfFiles[i].renameTo(tmpFile)) {
logger.log(Level.WARNING, Util.format("userdataMoveError", filename, sanitizedFilename));
final File tmpFile = new File(listOfFiles[i].getParentFile(), sanitizedFilename + ".tmp");
final File newFile = new File(listOfFiles[i].getParentFile(), sanitizedFilename);
if (!listOfFiles[i].renameTo(tmpFile))
{
LOGGER.log(Level.WARNING, Util.format("userdataMoveError", filename, sanitizedFilename));
continue;
}
if (newFile.exists())
{
logger.log(Level.WARNING, Util.format("duplicatedUserdata", filename, sanitizedFilename));
LOGGER.log(Level.WARNING, Util.format("duplicatedUserdata", filename, sanitizedFilename));
continue;
}
if (!tmpFile.renameTo(newFile)) {
logger.log(Level.WARNING, Util.format("userdataMoveBackError", sanitizedFilename, sanitizedFilename));
if (!tmpFile.renameTo(newFile))
{
LOGGER.log(Level.WARNING, Util.format("userdataMoveBackError", sanitizedFilename, sanitizedFilename));
}
}
doneFile.setProperty("sanitizeAllUserFilenames", true);
doneFile.save();
}
private World getFakeWorld(String name)
private World getFakeWorld(final String name)
{
File bukkitDirectory = ess.getDataFolder().getParentFile().getParentFile();
File worldDirectory = new File(bukkitDirectory, name);
final File bukkitDirectory = ess.getDataFolder().getParentFile().getParentFile();
final File worldDirectory = new File(bukkitDirectory, name);
if (worldDirectory.exists() && worldDirectory.isDirectory())
{
return new FakeWorld(worldDirectory.getName(), World.Environment.NORMAL);

View File

@@ -12,16 +12,12 @@ import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.block.Block;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Boat;
import org.bukkit.entity.CreatureType;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Item;
import org.bukkit.entity.LightningStrike;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Minecart;
import org.bukkit.entity.Player;
import org.bukkit.entity.PoweredMinecart;
import org.bukkit.entity.StorageMinecart;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.inventory.ItemStack;
@@ -404,5 +400,29 @@ public class FakeWorld implements World
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean unloadChunk(Chunk chunk)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getMaxHeight()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean getKeepSpawnInMemory()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setKeepSpawnInMemory(boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
}

View File

@@ -1,12 +1,11 @@
package com.earth2me.essentials;
import com.earth2me.essentials.register.payment.Methods;
import java.util.Map;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.scheduler.CraftScheduler;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitScheduler;
public interface IEssentials extends Plugin
@@ -27,7 +26,7 @@ public interface IEssentials extends Plugin
ISettings getSettings();
CraftScheduler getScheduler();
BukkitScheduler getScheduler();
String[] getMotd(CommandSender sender, String def);
@@ -63,7 +62,7 @@ public interface IEssentials extends Plugin
void showError(final CommandSender sender, final Throwable exception, final String commandLabel);
Map<String, User> getAllUsers();
ItemDb getItemDb();
UserMap getUserMap();
}

View File

@@ -163,6 +163,11 @@ public class ItemDb implements IConf
metaData = durabilities.get(itemname);
}
}
else if(Material.getMaterial(itemname) != null)
{
itemid = Material.getMaterial(itemname).getId();
metaData = 0;
}
else
{
throw new Exception(Util.format("unknownItemName", id));

View File

@@ -31,7 +31,7 @@ public class Jail extends BlockListener implements IConf
public Location getJail(String jailName) throws Exception
{
if (config.getProperty(jailName.toLowerCase()) == null)
if (jailName == null || config.getProperty(jailName.toLowerCase()) == null)
{
throw new Exception(Util.i18n("jailNotExist"));
}

View File

@@ -86,6 +86,9 @@ public enum Mob
final protected String type;
}
public CreatureType getType () {
return bukkitType;
}
public static class MobException extends Exception
{

View File

@@ -24,6 +24,7 @@ import org.bukkit.entity.Vehicle;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.map.MapView;
import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionAttachment;
import org.bukkit.permissions.PermissionAttachmentInfo;
@@ -576,4 +577,10 @@ public class OfflinePlayer implements Player
public void setOp(boolean bln)
{
}
@Override
public void sendMap(MapView mv)
{
throw new UnsupportedOperationException("Not supported yet.");
}
}

View File

@@ -7,6 +7,7 @@ import org.bukkit.block.Block;
import org.bukkit.entity.*;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.inventory.*;
import org.bukkit.map.MapView;
import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionAttachment;
import org.bukkit.permissions.PermissionAttachmentInfo;
@@ -405,20 +406,6 @@ public class PlayerWrapper implements Player
return base.eject();
}
@Override
@Deprecated
public void teleportTo(Location lctn)
{
base.teleportTo(lctn);
}
@Override
@Deprecated
public void teleportTo(Entity entity)
{
base.teleportTo(entity);
}
public void saveData()
{
base.saveData();
@@ -624,4 +611,10 @@ public class PlayerWrapper implements Player
{
base.setOp(bln);
}
@Override
public void sendMap(MapView mv)
{
base.sendMap(mv);
}
}

View File

@@ -471,6 +471,6 @@ public class Settings implements ISettings
public boolean addPrefixSuffix()
{
return config.getBoolean("add-prefix-suffix", false);
return config.getBoolean("add-prefix-suffix", ess.getServer().getPluginManager().isPluginEnabled("EssentialsChat"));
}
}

View File

@@ -20,44 +20,44 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
private final Teleport teleport;
private long lastActivity;
private boolean hidden = false;
User(Player base, IEssentials ess)
{
super(base, ess);
teleport = new Teleport(this, ess);
}
User update(Player base)
{
setBase(base);
return this;
}
public boolean isAuthorized(IEssentialsCommand cmd)
{
return isAuthorized(cmd, "essentials.");
}
public boolean isAuthorized(IEssentialsCommand cmd, String permissionPrefix)
{
return isAuthorized(permissionPrefix + (cmd.getName().equals("r") ? "msg" : cmd.getName()));
}
public boolean isAuthorized(String node)
{
if (isOp())
{
return true;
}
if (isJailed())
{
return false;
}
return ess.getPermissionsHandler().hasPermission(this, node);
}
public void healCooldown() throws Exception
{
Calendar now = new GregorianCalendar();
@@ -75,12 +75,12 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
setLastHealTimestamp(now.getTimeInMillis());
}
public void giveMoney(double value)
{
giveMoney(value, null);
}
public void giveMoney(double value, CommandSender initiator)
{
if (value == 0)
@@ -94,7 +94,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
initiator.sendMessage((Util.format("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName())));
}
}
public void payUser(User reciever, double value) throws Exception
{
if (value == 0)
@@ -113,12 +113,12 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
reciever.sendMessage(Util.format("moneyRecievedFrom", Util.formatCurrency(value, ess), getDisplayName()));
}
}
public void takeMoney(double value)
{
takeMoney(value, null);
}
public void takeMoney(double value, CommandSender initiator)
{
if (value == 0)
@@ -132,43 +132,43 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
initiator.sendMessage((Util.format("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName())));
}
}
public boolean canAfford(double cost)
{
double mon = getMoney();
return mon >= cost || isAuthorized("essentials.eco.loan");
}
public void dispose()
{
this.base = new OfflinePlayer(getName(), ess);
}
public boolean getJustPortaled()
{
return justPortaled;
}
public void setJustPortaled(boolean value)
{
justPortaled = value;
}
public void setReplyTo(CommandSender user)
{
replyTo = user;
}
public CommandSender getReplyTo()
{
return replyTo;
}
public int compareTo(User t)
{
return ChatColor.stripColor(this.getDisplayName()).compareToIgnoreCase(ChatColor.stripColor(t.getDisplayName()));
}
@Override
public boolean equals(Object o)
{
@@ -177,51 +177,51 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
return false;
}
return ChatColor.stripColor(this.getDisplayName()).equalsIgnoreCase(ChatColor.stripColor(((User)o).getDisplayName()));
}
@Override
public int hashCode()
{
return ChatColor.stripColor(this.getDisplayName()).hashCode();
}
public Boolean canSpawnItem(int itemId)
{
return !ess.getSettings().itemSpawnBlacklist().contains(itemId);
}
public void setHome()
{
setHome(getLocation(), true);
}
public void setHome(boolean defaultHome)
{
setHome(getLocation(), defaultHome);
}
public void setLastLocation()
{
setLastLocation(getLocation());
}
public void requestTeleport(User player, boolean here)
{
teleportRequester = player;
teleportRequestHere = here;
}
public User getTeleportRequest()
{
return teleportRequester;
}
public boolean isTeleportRequestHere()
{
return teleportRequestHere;
}
public String getNick()
{
final StringBuilder nickname = new StringBuilder();
@@ -245,12 +245,12 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
}
}
if (ess.getSettings().addPrefixSuffix())
{
final String prefix = ess.getPermissionsHandler().getPrefix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
final String suffix = ess.getPermissionsHandler().getSuffix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
nickname.insert(0, prefix);
nickname.append(suffix);
if (suffix.length() < 2 || !suffix.substring(suffix.length() - 2, suffix.length() - 1).equals("§"))
@@ -258,25 +258,25 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
nickname.append("§f");
}
}
return nickname.toString();
}
public Teleport getTeleport()
{
return teleport;
}
public long getLastActivity()
{
return lastActivity;
}
public void setLastActivity(long timestamp)
{
lastActivity = timestamp;
}
@Override
public double getMoney()
{
@@ -298,7 +298,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
return super.getMoney();
}
@Override
public void setMoney(double value)
{
@@ -320,14 +320,14 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
super.setMoney(value);
}
@Override
public void setAfk(boolean set)
{
this.setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : set);
super.setAfk(set);
}
@Override
public boolean toggleAfk()
{
@@ -335,14 +335,51 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
this.setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : now);
return now;
}
public boolean isHidden()
{
return hidden;
}
public void setHidden(boolean hidden)
{
this.hidden = hidden;
}
public void checkJailTimeout(final long currentTime)
{
if (getJailTimeout() > 0 && getJailTimeout() < currentTime && isJailed())
{
setJailTimeout(0);
setJailed(false);
sendMessage(Util.i18n("haveBeenReleased"));
setJail(null);
try
{
getTeleport().back();
}
catch (Exception ex)
{
}
}
}
public void checkMuteTimeout(final long currentTime)
{
if (getMuteTimeout() > 0 && getMuteTimeout() < currentTime && isMuted())
{
setMuteTimeout(0);
sendMessage(Util.i18n("canTalkAgain"));
setMuted(false);
}
}
public void checkBanTimeout(final long currentTime)
{
if (getBanTimeout() > 0 && getBanTimeout() < currentTime && ess.getBans().isNameBanned(getName()))
{
setBanTimeout(0);
ess.getBans().unbanByName(getName());
}
}
}

View File

@@ -0,0 +1,112 @@
package com.earth2me.essentials;
import com.google.common.base.Function;
import com.google.common.collect.MapMaker;
import java.io.File;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import org.bukkit.entity.Player;
public class UserMap implements Function<String, User>, IConf
{
private final transient IEssentials ess;
private final transient ConcurrentMap<String, User> users = new MapMaker().softValues().makeComputingMap(this);
public UserMap(final IEssentials ess)
{
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;
}
for (String string : userdir.list())
{
if (!string.endsWith(".yml"))
{
continue;
}
final String name = string.substring(0, string.length() - 4);
try
{
users.get(name.toLowerCase());
}
catch (NullPointerException ex)
{
// Ignore these
}
}
}
});
}
public boolean userExists(final String name)
{
return users.containsKey(name.toLowerCase());
}
public User getUser(final String name) throws NullPointerException
{
return users.get(name.toLowerCase());
}
@Override
public User apply(final String name)
{
for (Player player : ess.getServer().getOnlinePlayers())
{
if (player.getName().equalsIgnoreCase(name))
{
return new User(player, ess);
}
}
final File userFolder = new File(ess.getDataFolder(), "userdata");
final File userFile = new File(userFolder, Util.sanitizeFileName(name) + ".yml");
if (userFile.exists())
{
return new User(new OfflinePlayer(name, ess), ess);
}
return null;
}
@Override
public void reloadConfig()
{
for (User user : users.values())
{
user.reloadConfig();
}
}
public void removeUser(final String name)
{
users.remove(name.toLowerCase());
}
public Set<User> getAllUsers()
{
final Set<User> userSet = new HashSet<User>();
for (String name : users.keySet())
{
userSet.add(users.get(name));
}
return userSet;
}
public int getUniqueUsers()
{
return users.size();
}
}

View File

@@ -226,13 +226,13 @@ public class Util
int x = loc.getBlockX();
int y = loc.getBlockY();
int z = loc.getBlockZ();
while (isBlockAboveAir(world, x, y, z))
{
y -= 1;
if (y < 0)
{
throw new Exception(Util.i18n("holeInFloor"));
break;
}
}
@@ -252,6 +252,10 @@ public class Util
{
y = 127;
x += 1;
if (x - 32 > loc.getBlockX())
{
throw new Exception(Util.i18n("holeInFloor"));
}
}
}
return new Location(world, x + 0.5D, y, z + 0.5D, loc.getYaw(), loc.getPitch());
@@ -479,4 +483,9 @@ public class Util
}
return buf.toString();
}
public static String capitalCase(String s)
{
return s.toUpperCase().charAt(0) + s.toLowerCase().substring(1);
}
}

View File

@@ -2,6 +2,7 @@ package com.earth2me.essentials;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -35,9 +36,9 @@ public class Warps implements IConf
return warpPoints.isEmpty();
}
public Iterable<String> getWarpNames()
public Collection<String> getWarpNames()
{
List<String> keys = new ArrayList<String>();
final List<String> keys = new ArrayList<String>();
for (StringIgnoreCase stringIgnoreCase : warpPoints.keySet())
{
keys.add(stringIgnoreCase.getString());

View File

@@ -60,7 +60,7 @@ public final class Economy
{
logger.log(Level.WARNING, Util.format("deleteFileError", config));
}
ess.getAllUsers().remove(name.toLowerCase());
ess.getUserMap().removeUser(name);
}
}

View File

@@ -39,7 +39,7 @@ public class Commandbalancetop extends EssentialsCommand
}
}
final Map<User, Double> balances = new HashMap<User, Double>();
for (User u : ess.getAllUsers().values())
for (User u : ess.getUserMap().getAllUsers())
{
balances.put(u, u.getMoney());
}

View File

@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
import com.earth2me.essentials.OfflinePlayer;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -53,12 +54,14 @@ public class Commandban extends EssentialsCommand
}
player.kickPlayer(banReason);
ess.getBans().banByName(player.getName());
String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
for(Player p : server.getOnlinePlayers())
{
User u = ess.getUser(p);
if(u.isAuthorized("essentials.ban.notify"))
{
p.sendMessage(Util.format("playerBanned", player.getName(), banReason));
p.sendMessage(Util.format("playerBanned", senderName, player.getName(), banReason));
}
}
}

View File

@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.TargetBlock;
import org.bukkit.Server;
import org.bukkit.TreeType;
import com.earth2me.essentials.User;
@@ -31,30 +32,12 @@ public class Commandbigtree extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
double x = user.getLocation().getX();
double y = user.getLocation().getY();
double z = user.getLocation().getZ();
// offset tree in direction player is facing
final int r = (int)user.getCorrectedYaw();
if (r < 68 || r > 292) // north
final int[] ignore =
{
x -= 3.0D;
}
else if (r > 112 && r < 248) // south
{
x += 3.0D;
}
if (r > 22 && r < 158) // east
{
z -= 3.0D;
}
else if (r > 202 && r < 338) // west
{
z += 3.0D;
}
final Location safeLocation = Util.getSafeDestination(new Location(user.getWorld(), x, y, z));
8, 9
};
final Location loc = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock().getLocation();
final Location safeLocation = Util.getSafeDestination(loc);
final boolean success = user.getWorld().generateTree(safeLocation, (TreeType)tree);
if (success)
{

View File

@@ -20,6 +20,7 @@ public class Commandclearinventory extends EssentialsCommand
{
if (args.length > 0 && user.isAuthorized("essentials.clearinventory.others"))
{
//TODO: Fix fringe user match case.
if (args[0].length() >= 3)
{
List<Player> online = server.matchPlayer(args[0]);

View File

@@ -16,6 +16,7 @@ public class Commandgive extends EssentialsCommand
super("give");
}
//TODO: move these messages to message file
@Override
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
@@ -50,7 +51,7 @@ public class Commandgive extends EssentialsCommand
}
User giveTo = getPlayer(server, args, 0);
String itemName = stack.getType().name().toLowerCase().replace('_', ' ');
String itemName = stack.getType().toString().toLowerCase().replace('_', ' ');
charge(sender);
sender.sendMessage(ChatColor.BLUE + "Giving " + stack.getAmount() + " of " + itemName + " to " + giveTo.getDisplayName() + ".");
giveTo.getInventory().addItem(stack);

View File

@@ -117,52 +117,64 @@ public class Commandhelp extends EssentialsCommand
{
final PluginDescriptionFile desc = p.getDescription();
final HashMap<String, HashMap<String, String>> cmds = (HashMap<String, HashMap<String, String>>)desc.getCommands();
pluginName = p.getDescription().getName().toLowerCase();
for (Entry<String, HashMap<String, String>> k : cmds.entrySet())
{
if ((!match.equalsIgnoreCase("")) && (!k.getKey().toLowerCase().contains(match))
&& (!k.getValue().get("description").toLowerCase().contains(match)))
try
{
if ((!match.equalsIgnoreCase(""))
&& (!k.getKey().toLowerCase().contains(match))
&& (!k.getValue().get("description").toLowerCase().contains(match))
&& (!pluginName.contains(match)))
{
continue;
}
if (pluginName.contains("essentials"))
{
final String node = "essentials." + k.getKey();
if (!ess.getSettings().isCommandDisabled(k.getKey()) && user.isAuthorized(node))
{
retval.add("§c" + k.getKey() + "§7: " + k.getValue().get("description"));
}
}
else
{
if (ess.getSettings().showNonEssCommandsInHelp())
{
final HashMap<String, String> value = k.getValue();
if (value.containsKey("permission") && value.get("permission") != null && !(value.get("permission").equals("")))
{
if (user.isAuthorized(value.get("permission")))
{
retval.add("§c" + k.getKey() + "§7: " + value.get("description"));
}
}
else if (value.containsKey("permissions") && value.get("permissions") != null && !(value.get("permissions").equals("")))
{
if (user.isAuthorized(value.get("permissions")))
{
retval.add("§c" + k.getKey() + "§7: " + value.get("description"));
}
}
else if (user.isAuthorized("essentials.help." + pluginName))
{
retval.add("§c" + k.getKey() + "§7: " + value.get("description"));
}
else
{
if (!ess.getSettings().hidePermissionlessHelp())
{
retval.add("§c" + k.getKey() + "§7: " + value.get("description"));
}
}
}
}
}
catch (NullPointerException ex)
{
continue;
}
if (p.getDescription().getName().toLowerCase().contains("essentials"))
{
final String node = "essentials." + k.getKey();
if (!ess.getSettings().isCommandDisabled(k.getKey()) && user.isAuthorized(node))
{
retval.add("§c" + k.getKey() + "§7: " + k.getValue().get("description"));
}
}
else
{
if (ess.getSettings().showNonEssCommandsInHelp())
{
pluginName = p.getDescription().getName();
final HashMap<String, String> value = k.getValue();
if (value.containsKey("permission") && value.get("permission") != null && !(value.get("permission").equals("")))
{
if (user.isAuthorized(value.get("permission")))
{
retval.add("§c" + k.getKey() + "§7: " + value.get("description"));
}
}
else if (value.containsKey("permissions") && value.get("permissions") != null && !(value.get("permissions").equals("")))
{
if (user.isAuthorized(value.get("permissions")))
{
retval.add("§c" + k.getKey() + "§7: " + value.get("description"));
}
}
else
{
if (!ess.getSettings().hidePermissionlessHelp())
{
retval.add("§c" + k.getKey() + "§7: " + value.get("description"));
}
}
}
}
}
}
catch (NullPointerException ex)

View File

@@ -46,7 +46,7 @@ public class Commanditem extends EssentialsCommand
return;
}
String itemName = stack.getType().name().toLowerCase().replace('_', ' ');
String itemName = stack.getType().toString().toLowerCase().replace('_', ' ');
charge(user);
user.sendMessage(Util.format("itemSpawn", stack.getAmount(), itemName));
user.getInventory().addItem(stack);

View File

@@ -1,9 +1,11 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.entity.Player;
public class Commandkick extends EssentialsCommand
@@ -21,15 +23,24 @@ public class Commandkick extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
User u = getPlayer(server, args, 0);
if (u.isAuthorized("essentials.kick.exempt"))
User player = getPlayer(server, args, 0);
if (player.isAuthorized("essentials.kick.exempt"))
{
sender.sendMessage(Util.i18n("kickExempt"));
return;
}
charge(sender);
final String kickReason = args.length > 1 ? getFinalArg(args, 1) : Util.i18n("kickDefault");
u.kickPlayer(kickReason);
server.broadcastMessage(Util.format("playerKicked", u.getName(), kickReason));
player.kickPlayer(kickReason);
String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
for(Player p : server.getOnlinePlayers())
{
User u = ess.getUser(p);
if(u.isAuthorized("essentials.kick.notify"))
{
p.sendMessage(Util.format("playerKicked", senderName, player.getName(), kickReason));
}
}
}
}

View File

@@ -45,6 +45,7 @@ public class Commandlist extends EssentialsCommand
}
}
charge(sender);
//TODO: move these to messages file
StringBuilder online = new StringBuilder();
online.append(ChatColor.BLUE).append("There are ").append(ChatColor.RED).append(server.getOnlinePlayers().length - playerHidden);
if (showhidden && playerHidden > 0)

View File

@@ -25,6 +25,16 @@ public class Commandmsg extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
if (sender instanceof Player)
{
User user = ess.getUser(sender);
if (user.isMuted())
{
user.sendMessage(Util.i18n("voiceSilenced"));
return;
}
}
String message = getFinalArg(args, 1);
String translatedMe = Util.i18n("me");
@@ -48,7 +58,7 @@ public class Commandmsg extends EssentialsCommand
sender.sendMessage(Util.i18n("playerNotFound"));
return;
}
int i = 0;
for (Player p : matches)
{

View File

@@ -1,52 +1,52 @@
package com.earth2me.essentials.commands;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandmute extends EssentialsCommand
{
public Commandmute()
{
super("mute");
}
@Override
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
User p = getPlayer(server, args, 0, true);
if (!p.isMuted() && p.isAuthorized("essentials.mute.exempt"))
{
sender.sendMessage(Util.i18n("muteExempt"));
return;
}
long muteTimestamp = 0;
if (args.length > 1)
{
String time = getFinalArg(args, 1);
muteTimestamp = Util.parseDateDiff(time, true);
}
p.setMuteTimeout(muteTimestamp);
charge(sender);
boolean muted = p.toggleMuted();
sender.sendMessage(
muted
? (muteTimestamp > 0
? Util.format("mutedPlayerFor", p.getDisplayName(), Util.formatDateDiff(muteTimestamp))
: Util.format("mutedPlayer", p.getDisplayName()))
: Util.format("unmutedPlayer", p.getDisplayName()));
p.sendMessage(
muted
? (muteTimestamp > 0
? Util.format("playerMutedFor", Util.formatDateDiff(muteTimestamp))
: Util.i18n("playerMuted"))
: Util.i18n("playerUnmuted"));
}
}
package com.earth2me.essentials.commands;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandmute extends EssentialsCommand
{
public Commandmute()
{
super("mute");
}
@Override
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
User p = getPlayer(server, args, 0, true);
if (!p.isMuted() && p.isAuthorized("essentials.mute.exempt"))
{
sender.sendMessage(Util.i18n("muteExempt"));
return;
}
long muteTimestamp = 0;
if (args.length > 1)
{
String time = getFinalArg(args, 1);
muteTimestamp = Util.parseDateDiff(time, true);
}
p.setMuteTimeout(muteTimestamp);
charge(sender);
boolean muted = p.toggleMuted();
sender.sendMessage(
muted
? (muteTimestamp > 0
? Util.format("mutedPlayerFor", p.getDisplayName(), Util.formatDateDiff(muteTimestamp))
: Util.format("mutedPlayer", p.getDisplayName()))
: Util.format("unmutedPlayer", p.getDisplayName()));
p.sendMessage(
muted
? (muteTimestamp > 0
? Util.format("playerMutedFor", Util.formatDateDiff(muteTimestamp))
: Util.i18n("playerMuted"))
: Util.i18n("playerUnmuted"));
}
}

View File

@@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandpay extends EssentialsCommand
@@ -22,6 +23,7 @@ public class Commandpay extends EssentialsCommand
double amount = Double.parseDouble(args[1].replaceAll("[^0-9\\.]", ""));
Boolean foundUser = false;
for (Player p : server.matchPlayer(args[0]))
{
User u = ess.getUser(p);
@@ -30,6 +32,11 @@ public class Commandpay extends EssentialsCommand
continue;
}
user.payUser(u, amount);
foundUser = true;
}
if(foundUser == false) {
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}
}
}

View File

@@ -0,0 +1,247 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.DescParseTickFormat;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.entity.Player;
public class Commandptime extends EssentialsCommand
{
public static final Set<String> getAliases = new HashSet<String>();
static
{
getAliases.add("get");
getAliases.add("list");
getAliases.add("show");
getAliases.add("display");
}
public Commandptime()
{
super("ptime");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
// Which Players(s) / Users(s) are we interested in?
String userSelector = null;
if (args.length == 2)
{
userSelector = args[1];
}
Set<User> users = getUsers(server, sender, userSelector);
// If no arguments we are reading the time
if (args.length == 0)
{
getUsersTime(sender, users);
return;
}
User user = ess.getUser(sender);
if ((!users.contains(user) || users.size() > 1) && user != null && !user.isAuthorized("essentials.ptime.others"))
{
user.sendMessage(Util.i18n("pTimeOthersPermission"));
return;
}
Long ticks;
// Parse the target time int ticks from args[0]
String timeParam = args[0];
Boolean relative = true;
if (timeParam.startsWith("@"))
{
relative = false;
timeParam = timeParam.substring(1);
}
if (getAliases.contains(timeParam))
{
getUsersTime(sender, users);
return;
}
else if (DescParseTickFormat.meansReset(timeParam))
{
ticks = null;
}
else
{
try
{
ticks = DescParseTickFormat.parse(timeParam);
}
catch (NumberFormatException e)
{
throw new NotEnoughArgumentsException();
}
}
setUsersTime(sender, users, ticks, relative);
}
/**
* Used to get the time and inform
*/
private void getUsersTime(final CommandSender sender, final Collection<User> users)
{
if (users.size() > 1)
{
sender.sendMessage(Util.format("pTimePlayers"));
}
for (User user : users)
{
if(user.getPlayerTimeOffset() == 0)
{
sender.sendMessage(Util.format("pTimeNormal", user.getName()));
}
else {
String time = DescParseTickFormat.format(user.getPlayerTime());
if(!user.isPlayerTimeRelative())
{
sender.sendMessage(Util.format("pTimeCurrentFixed", user.getName(), time));
}
else {
sender.sendMessage(Util.format("pTimeCurrent", user.getName(), time));
}
}
}
return;
}
/**
* Used to set the time and inform of the change
*/
private void setUsersTime(final CommandSender sender, final Collection<User> users, final Long ticks, Boolean relative)
{
// Update the time
if (ticks == null)
{
// Reset
for (User user : users)
{
user.resetPlayerTime();
}
}
else
{
// Set
for (User user : users)
{
final World world = user.getWorld();
long time = user.getPlayerTime();
time -= time % 24000;
time += 24000 + ticks;
if (relative)
{
time -= world.getTime();
}
user.setPlayerTime(time, relative);
}
}
final StringBuilder msg = new StringBuilder();
for (User user : users)
{
if (msg.length() > 0)
{
msg.append(", ");
}
msg.append(user.getName());
}
// Inform the sender of the change
if (ticks == null)
{
sender.sendMessage(Util.format("pTimeReset", msg.toString()));
}
else
{
String time = DescParseTickFormat.format(ticks);
if (!relative)
{
sender.sendMessage(Util.format("pTimeSetFixed", time, msg.toString()));
}
else {
sender.sendMessage(Util.format("pTimeSet", time, msg.toString()));
}
}
}
/**
* Used to parse an argument of the type "users(s) selector"
*/
private Set<User> getUsers(final Server server, final CommandSender sender, final String selector) throws Exception
{
final Set<User> users = new TreeSet<User>(new UserNameComparator());
// If there is no selector we want the sender itself. Or all users if sender isn't a user.
if (selector == null)
{
final User user = ess.getUser(sender);
if (user == null)
{
for (Player player : server.getOnlinePlayers())
{
users.add(ess.getUser(player));
}
}
else
{
users.add(user);
}
return users;
}
// Try to find the user with name = selector
User user = null;
final List<Player> matchedPlayers = server.matchPlayer(selector);
if (!matchedPlayers.isEmpty())
{
user = ess.getUser(matchedPlayers.get(0));
}
if (user != null)
{
users.add(user);
}
// If that fails, Is the argument something like "*" or "all"?
else if (selector.equalsIgnoreCase("*") || selector.equalsIgnoreCase("all"))
{
for (Player player : server.getOnlinePlayers())
{
users.add(ess.getUser(player));
}
}
// We failed to understand the world target...
else
{
throw new Exception(Util.i18n("playerNotFound"));
}
return users;
}
}
class UserNameComparator implements Comparator<User>
{
public int compare(User a, User b)
{
return a.getName().compareTo(b.getName());
}
}

View File

@@ -0,0 +1,126 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
import org.bukkit.material.MaterialData;
/**
*
* @author Seiji
*/
public class Commandrepair extends EssentialsCommand
{
public Commandrepair()
{
super("repair");
}
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
if (args[0].equalsIgnoreCase("hand"))
{
ItemStack item = user.getItemInHand();
try
{
repairItem(item);
}
catch (Exception e)
{
user.sendMessage(e.getMessage());
return;
}
String itemName = item.getType().toString().toLowerCase().replace('_', ' ');
charge(user);
user.sendMessage(Util.format("repair", itemName));
}
else if (args[0].equalsIgnoreCase("all"))
{
StringBuilder itemList = new StringBuilder();
itemList.append(repairItems(user.getInventory().getContents()));
String armor = repairItems(user.getInventory().getArmorContents());
if (armor.length() > 0)
{
if (itemList.length() > 0)
{
itemList.append(", ");
}
itemList.append(armor);
}
if (itemList.length() == 0)
{
user.sendMessage(Util.format("repairNone"));
}
else
{
charge(user);
user.sendMessage(Util.format("repair", itemList.toString()));
}
}
else
{
throw new NotEnoughArgumentsException();
}
}
private void repairItem(ItemStack item) throws Exception
{
Material material = Material.getMaterial(item.getTypeId());
String error = null;
if (material.isBlock() || material.getMaxDurability() < 0)
{
throw new Exception(Util.i18n("repairInvalidType"));
}
if (item.getDurability() == 0)
{
throw new Exception(Util.i18n("repairAlreadyFixed"));
}
item.setDurability((short)0);
}
private String repairItems(ItemStack[] items)
{
StringBuilder itemList = new StringBuilder();
for (ItemStack item : items)
{
try
{
repairItem(item);
if (itemList.length() > 0)
{
itemList.append(", ");
}
String itemName = item.getType().toString().toLowerCase().replace('_', ' ');
itemList.append(itemName);
}
catch (Exception e)
{
}
}
return itemList.toString();
}
}

View File

@@ -30,7 +30,7 @@ public class Commandseen extends EssentialsCommand
User u = ess.getOfflineUser(args[0]);
if (u == null)
{
return;
throw new Exception(Util.i18n("playerNotFound"));
}
sender.sendMessage(Util.format("seenOffline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogout())));
}

View File

@@ -29,7 +29,7 @@ public class Commandsell extends EssentialsCommand
{
is = user.getItemInHand();
}
if (args[0].equalsIgnoreCase("inventory"))
else if (args[0].equalsIgnoreCase("inventory"))
{
for (ItemStack stack : user.getInventory().getContents())
{
@@ -47,7 +47,7 @@ public class Commandsell extends EssentialsCommand
}
return;
}
if (args[0].equalsIgnoreCase("blocks"))
else if (args[0].equalsIgnoreCase("blocks"))
{
for (ItemStack stack : user.getInventory().getContents())
{

View File

@@ -30,6 +30,10 @@ public class Commandsethome extends EssentialsCommand
{
usersHome = ess.getOfflineUser(args[0]);
}
if (usersHome == null)
{
throw new Exception(Util.i18n("playerNotFound"));
}
usersHome.setHome(user.getLocation(), args[1].equalsIgnoreCase("default"));
}
}

View File

@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Mob;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Material;
@@ -22,6 +23,7 @@ public class Commandspawner extends EssentialsCommand
if (args.length < 1 || args[0].length() < 2)
{
throw new NotEnoughArgumentsException();
//TODO: user.sendMessage("§7Mobs: Zombie PigZombie Skeleton Slime Chicken Pig Monster Spider Creeper Ghast Squid Giant Cow Sheep Wolf");
}
final Block target = user.getTarget().getTargetBlock();
@@ -33,8 +35,18 @@ public class Commandspawner extends EssentialsCommand
charge(user);
try
{
final String name = args[0].substring(0, 1).toUpperCase() + args[0].substring(1).toLowerCase();
new CraftCreatureSpawner(target).setCreatureType(CreatureType.fromName(name));
String name = args[0];
name = name.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(name);
Mob mob = null;
mob = Mob.fromName(name);
if (mob == null)
{
user.sendMessage(Util.i18n("invalidMob"));
return;
}
new CraftCreatureSpawner(target).setCreatureType(mob.getType());
user.sendMessage(Util.format("setSpawner", mob.name));
}
catch (Throwable ex)
{

View File

@@ -7,6 +7,7 @@ import com.earth2me.essentials.Mob;
import com.earth2me.essentials.Mob.MobException;
import com.earth2me.essentials.TargetBlock;
import com.earth2me.essentials.Util;
import java.util.Random;
import net.minecraft.server.EntityWolf;
import net.minecraft.server.PathEntity;
import org.bukkit.DyeColor;
@@ -39,7 +40,7 @@ public class Commandspawnmob extends EssentialsCommand
String[] mountparts = args[0].split(",");
String[] parts = mountparts[0].split(":");
String mobType = parts[0];
mobType = mobType.equalsIgnoreCase("PigZombie") ? "PigZombie" : capitalCase(mobType);
mobType = mobType.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(mobType);
String mobData = null;
if (parts.length == 2)
{
@@ -51,7 +52,7 @@ public class Commandspawnmob extends EssentialsCommand
{
parts = mountparts[1].split(":");
mountType = parts[0];
mountType = mountType.equalsIgnoreCase("PigZombie") ? "PigZombie" : capitalCase(mountType);
mountType = mountType.equalsIgnoreCase("PigZombie") ? "PigZombie" : Util.capitalCase(mountType);
if (parts.length == 2)
{
mountData = parts[1];
@@ -82,17 +83,10 @@ public class Commandspawnmob extends EssentialsCommand
8, 9
};
Location loc = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock().getLocation();
Block block = user.getWorld().getBlockAt(loc);
while (!(block.getType() == Material.AIR || block.getType() == Material.WATER || block.getType() == Material.STATIONARY_WATER))
{
loc.setY(loc.getY() + 1);
block = user.getWorld().getBlockAt(loc);
}
Location sloc = Util.getSafeDestination(loc);
try
{
spawnedMob = mob.spawn(user, server, loc);
spawnedMob = mob.spawn(user, server, sloc);
}
catch (MobException e)
{
@@ -185,11 +179,6 @@ public class Commandspawnmob extends EssentialsCommand
}
}
private String capitalCase(String s)
{
return s.toUpperCase().charAt(0) + s.toLowerCase().substring(1);
}
private void changeMobData(String type, Entity spawned, String data, User user) throws Exception
{
if ("Slime".equalsIgnoreCase(type))
@@ -207,7 +196,15 @@ public class Commandspawnmob extends EssentialsCommand
{
try
{
((CraftSheep)spawned).setColor(DyeColor.valueOf(data.toUpperCase()));
if (data.equalsIgnoreCase("random"))
{
Random rand = new Random();
((CraftSheep)spawned).setColor(DyeColor.values()[rand.nextInt(DyeColor.values().length)]);
}
else
{
((CraftSheep)spawned).setColor(DyeColor.valueOf(data.toUpperCase()));
}
}
catch (Exception e)
{

View File

@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
import com.earth2me.essentials.OfflinePlayer;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -48,6 +49,15 @@ public class Commandtempban extends EssentialsCommand
player.setBanTimeout(banTimestamp);
player.kickPlayer(banReason);
ess.getBans().banByName(player.getName());
server.broadcastMessage(Util.format("playerBanned", player.getName(), banReason));
String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
for(Player p : server.getOnlinePlayers())
{
User u = ess.getUser(p);
if(u.isAuthorized("essentials.ban.notify"))
{
p.sendMessage(Util.format("playerBanned", senderName, player.getName(), banReason));
}
}
}
}

View File

@@ -1,10 +1,12 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.DescParseTickFormat;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.*;
public class Commandtime extends EssentialsCommand
@@ -15,99 +17,142 @@ public class Commandtime extends EssentialsCommand
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
// Which World(s) are we interested in?
String worldSelector = null;
if (args.length == 2)
{
worldSelector = args[1];
}
Set<World> worlds = getWorlds(server, sender, worldSelector);
// If no arguments we are reading the time
if (args.length == 0)
{
getWorldsTime(sender, worlds);
return;
}
User user = ess.getUser(sender);
if (user != null && !user.isAuthorized("essentials.time.set"))
{
user.sendMessage(Util.i18n("timeSetPermission"));
return;
}
// Parse the target time int ticks from args[0]
long ticks;
try
{
ticks = DescParseTickFormat.parse(args[0]);
}
catch (NumberFormatException e)
{
throw new NotEnoughArgumentsException();
}
if (args.length < 2)
{
if (user.isAuthorized("essentials.time.world"))
{
final World world = user.getWorld();
charge(user);
setWorldTime(world, args[0]);
setWorldsTime(sender, worlds, ticks);
}
/**
* Used to get the time and inform
*/
private void getWorldsTime(CommandSender sender, Collection<World> worlds)
{
if (worlds.size() == 1)
{
Iterator<World> iter = worlds.iterator();
sender.sendMessage(DescParseTickFormat.format(iter.next().getTime()));
return;
}
for (World world : worlds)
{
sender.sendMessage(Util.format("timeCurrentWorld", world.getName(), DescParseTickFormat.format(world.getTime())));
}
return;
}
/**
* Used to set the time and inform of the change
*/
private void setWorldsTime(CommandSender sender, Collection<World> worlds, long ticks)
{
// Update the time
for (World world : worlds)
{
long time = world.getTime();
time -= time % 24000;
world.setTime(time + 24000 + ticks);
}
// Inform the sender of the change
//sender.sendMessage("");
StringBuilder msg = new StringBuilder();
boolean first = true;
for (World world : worlds)
{
if (msg.length() > 0)
{
msg.append(", ");
}
msg.append(world.getName());
}
sender.sendMessage(Util.format("timeWorldSet", DescParseTickFormat.format(ticks), msg.toString()));
}
/**
* Used to parse an argument of the type "world(s) selector"
*/
private Set<World> getWorlds(Server server, CommandSender sender, String selector) throws Exception
{
Set<World> worlds = new TreeSet<World>(new WorldNameComparator());
// If there is no selector we want the world the user is currently in. Or all worlds if it isn't a user.
if (selector == null)
{
User user = ess.getUser(sender);
if (user == null)
{
worlds.addAll(server.getWorlds());
}
else
{
charge(user);
setPlayerTime(user, args[0]);
worlds.add(user.getWorld());
}
return worlds;
}
// Try to find the world with name = selector
World world = server.getWorld(selector);
if (world != null)
{
worlds.add(world);
}
// If that fails, Is the argument something like "*" or "all"?
else if (selector.equalsIgnoreCase("*") || selector.equalsIgnoreCase("all"))
{
worlds.addAll(server.getWorlds());
}
// We failed to understand the world target...
else
{
if (user.isAuthorized("essentials.time.others"))
{
User u = getPlayer(server, args, 1);
charge(user);
setPlayerTime(u, args[0]);
}
}
}
@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();
}
if (args.length < 2)
{
for (World world : server.getWorlds())
{
setWorldTime(world, args[0]);
}
}
else
{
User u = getPlayer(server, args, 1);
setPlayerTime(u, args[0]);
throw new Exception(Util.i18n("invalidWorld"));
}
sender.sendMessage(Util.i18n("timeSet"));
}
private void setWorldTime(final World world, final String timeString) throws Exception
{
long time = world.getTime();
time -= time % 24000;
if ("day".equalsIgnoreCase(timeString))
{
world.setTime(time + 24000);
return;
}
if ("night".equalsIgnoreCase(timeString))
{
world.setTime(time + 37700);
return;
}
throw new Exception(Util.i18n("onlyDayNight"));
}
private void setPlayerTime(final User user, final String timeString) throws Exception
{
long time = user.getPlayerTime();
time -= time % 24000;
if ("day".equalsIgnoreCase(timeString))
{
final World world = user.getWorld();
user.setPlayerTime(time + 24000 - world.getTime(), true);
return;
}
if ("night".equalsIgnoreCase(timeString))
{
final World world = user.getWorld();
user.setPlayerTime(time + 37700 - world.getTime(), true);
return;
}
if ("reset".equalsIgnoreCase(timeString))
{
user.resetPlayerTime();
return;
}
throw new Exception(Util.i18n("onlyDayNight"));
return worlds;
}
}
class WorldNameComparator implements Comparator<World>
{
public int compare(World a, World b)
{
return a.getName().compareTo(b.getName());
}
}

View File

@@ -15,6 +15,7 @@ public class Commandtogglejail extends EssentialsCommand
super("togglejail");
}
//TODO: move these to messages file
@Override
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
@@ -45,9 +46,6 @@ public class Commandtogglejail extends EssentialsCommand
}
}
charge(sender);
p.setJailed(true);
p.sendMessage(Util.i18n("userJailed"));
p.setJail(null);
if (!(p.getBase() instanceof OfflinePlayer))
{
ess.getJail().sendToJail(p, args[1]);
@@ -57,6 +55,9 @@ public class Commandtogglejail extends EssentialsCommand
// Check if jail exists
ess.getJail().getJail(args[1]);
}
p.setJailed(true);
p.sendMessage(Util.i18n("userJailed"));
p.setJail(null);
p.setJail(args[1]);
long timeDiff = 0;
if (args.length > 2)
@@ -71,7 +72,7 @@ public class Commandtogglejail extends EssentialsCommand
return;
}
if (args.length == 2 && p.isJailed() && !args[1].equalsIgnoreCase(p.getJail()))
if (args.length >= 2 && p.isJailed() && !args[1].equalsIgnoreCase(p.getJail()))
{
sender.sendMessage("§cPerson is already in jail " + p.getJail());
return;

View File

@@ -0,0 +1,62 @@
package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandtpaall extends EssentialsCommand
{
public Commandtpaall()
{
super("tpaall");
}
@Override
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
if (sender instanceof Player)
{
charge(sender);
teleportAAllPlayers(server, sender, ess.getUser(sender));
return;
}
throw new NotEnoughArgumentsException();
}
User p = getPlayer(server, args, 0);
charge(sender);
teleportAAllPlayers(server, sender, p);
}
private void teleportAAllPlayers(Server server, CommandSender sender, User p)
{
sender.sendMessage(Util.i18n("teleportAAll"));
for (Player player : server.getOnlinePlayers())
{
User u = ess.getUser(player);
if (p == u)
{
continue;
}
if (!u.isTeleportEnabled())
{
continue;
}
try
{
u.requestTeleport(p, true);
u.sendMessage(Util.format("teleportHereRequest", p.getDisplayName()));
u.sendMessage(Util.i18n("typeTpaccept"));
}
catch (Exception ex)
{
ess.showError(sender, ex, getName());
}
}
}
}

View File

@@ -33,7 +33,7 @@ public class Commandtpaccept extends EssentialsCommand
charge.isAffordableFor(p);
}
user.sendMessage(Util.i18n("requestAccepted"));
p.sendMessage(Util.i18n("requestAccepted"));
p.sendMessage(Util.format("requestAcceptedFrom", user.getDisplayName()));
if (user.isTeleportRequestHere())
{

View File

@@ -23,7 +23,7 @@ public class Commandtpdeny extends EssentialsCommand
charge(user);
user.sendMessage(Util.i18n("requestDenied"));
p.sendMessage(Util.i18n("requestDenied"));
p.sendMessage(Util.format("requestDeniedFrom", user.getDisplayName()));
user.requestTeleport(null, false);
}
}

View File

@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.OfflinePlayer;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -21,9 +22,23 @@ public class Commandtpo extends EssentialsCommand
}
//Just basically the old tp command
User p = getPlayer(server, args, 0);
charge(user);
user.getTeleport().now(p, false);
user.sendMessage(Util.i18n("teleporting"));
User p = getPlayer(server, args, 0, true);
// Check if user is offline
if (p.getBase() instanceof OfflinePlayer)
{
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}
// Verify permission
if (!p.isHidden() || user.isAuthorized("essentials.teleport.hidden"))
{
charge(user);
user.getTeleport().now(p, false);
user.sendMessage(Util.i18n("teleporting"));
}
else
{
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}
}
}

View File

@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.OfflinePlayer;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -21,9 +22,24 @@ public class Commandtpohere extends EssentialsCommand
}
//Just basically the old tphere command
User p = getPlayer(server, args, 0);
charge(user);
p.getTeleport().now(user, false);
user.sendMessage(Util.i18n("teleporting"));
User p = getPlayer(server, args, 0, true);
// Check if user is offline
if (p.getBase() instanceof OfflinePlayer)
{
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}
// Verify permission
if (!p.isHidden() || user.isAuthorized("essentials.teleport.hidden"))
{
charge(user);
p.getTeleport().now(user, false);
user.sendMessage(Util.i18n("teleporting"));
}
else
{
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}
}
}

View File

@@ -1,10 +1,13 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.TargetBlock;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.TreeType;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Material;
import org.bukkit.block.Block;
public class Commandtree extends EssentialsCommand
@@ -38,32 +41,14 @@ public class Commandtree extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
double x = user.getLocation().getX();
double y = user.getLocation().getY();
double z = user.getLocation().getZ();
// offset tree in direction player is facing
int r = (int)user.getCorrectedYaw();
if (r < 68 || r > 292) // north
final int[] ignore =
{
x -= 3.0D;
}
else if (r > 112 && r < 248) // south
{
x += 3.0D;
}
if (r > 22 && r < 158) // east
{
z -= 3.0D;
}
else if (r > 202 && r < 338) // west
{
z += 3.0D;
}
Location safeLocation = Util.getSafeDestination(new Location(user.getWorld(), x, y, z));
boolean success = user.getWorld().generateTree(safeLocation, (TreeType)tree);
8, 9
};
final Location loc = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock().getLocation();
final Location safeLocation = Util.getSafeDestination(loc);
final boolean success = user.getWorld().generateTree(safeLocation, (TreeType)tree);
if (success)
{
charge(user);

View File

@@ -20,9 +20,18 @@ public class Commandunban extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
User u = getPlayer(server, args, 0, true);
ess.getBans().unbanByName(u.getName());
String name;
try
{
User u = getPlayer(server, args, 0, true);
name = u.getName();
}
catch (NoSuchFieldException e)
{
name = args[0];
}
ess.getBans().unbanByName(name);
sender.sendMessage(Util.i18n("unbannedPlayer"));
}
}

View File

@@ -33,63 +33,90 @@ public class Commandunlimited extends EssentialsCommand
if (args[0].equalsIgnoreCase("list"))
{
StringBuilder sb = new StringBuilder();
sb.append(Util.i18n("unlimitedItems")).append(" ");
boolean first = true;
List<Integer> items = target.getUnlimited();
if (items.isEmpty())
String list = getList(target);
user.sendMessage(list);
}
else if (args[0].equalsIgnoreCase("clear"))
{
List<Integer> itemList = target.getUnlimited();
int index = 0;
while (itemList.size() > index)
{
sb.append(Util.i18n("none"));
}
for (Integer integer : items)
{
if (!first)
Integer item = itemList.get(index);
if (toggleUnlimited(user, target, item.toString()) == false)
{
sb.append(", ");
index++;
}
first = false;
String matname = Material.getMaterial(integer).toString().toLowerCase().replace("_", "");
sb.append(matname);
}
user.sendMessage(sb.toString());
return;
}
else
{
toggleUnlimited(user, target, args[0]);
}
}
private String getList(User target)
{
StringBuilder sb = new StringBuilder();
sb.append(Util.i18n("unlimitedItems")).append(" ");
boolean first = true;
List<Integer> items = target.getUnlimited();
if (items.isEmpty())
{
sb.append(Util.i18n("none"));
}
for (Integer integer : items)
{
if (!first)
{
sb.append(", ");
}
first = false;
String matname = Material.getMaterial(integer).toString().toLowerCase().replace("_", "");
sb.append(matname);
}
final ItemStack stack = ess.getItemDb().get(args[0], 1);
return sb.toString();
}
private Boolean toggleUnlimited(User user, User target, String item) throws Exception
{
ItemStack stack = ess.getItemDb().get(item, 1);
stack.setAmount(Math.min(stack.getType().getMaxStackSize(), 2));
String itemname = stack.getType().toString().toLowerCase().replace("_", "");
if (!user.isAuthorized("essentials.unlimited.item-all")
&& !user.isAuthorized("essentials.unlimited.item-" + itemname)
&& !user.isAuthorized("essentials.unlimited.item-" + stack.getTypeId())
&& !((stack.getType() == Material.WATER_BUCKET || stack.getType() == Material.LAVA_BUCKET)
&& user.isAuthorized("essentials.unlimited.item-bucket")))
if (ess.getSettings().permissionBasedItemSpawn()
&& (!user.isAuthorized("essentials.unlimited.item-all")
&& !user.isAuthorized("essentials.unlimited.item-" + itemname)
&& !user.isAuthorized("essentials.unlimited.item-" + stack.getTypeId())
&& !((stack.getType() == Material.WATER_BUCKET || stack.getType() == Material.LAVA_BUCKET)
&& user.isAuthorized("essentials.unlimited.item-bucket"))))
{
user.sendMessage(Util.format("unlimitedItemPermission", itemname));
return;
return false;
}
if (target.hasUnlimited(stack))
String message = "disableUnlimited";
Boolean enableUnlimited = false;
if (!target.hasUnlimited(stack))
{
if (user != target)
message = "enableUnlimited";
enableUnlimited = true;
charge(user);
if (!InventoryWorkaround.containsItem(target.getInventory(), true, stack))
{
user.sendMessage(Util.format("disableUnlimited", itemname, target.getDisplayName()));
target.getInventory().addItem(stack);
}
target.sendMessage(Util.format("disableUnlimited", itemname, target.getDisplayName()));
target.setUnlimited(stack, false);
return;
}
charge(user);
if (user != target)
{
user.sendMessage(Util.format("enableUnlimited", itemname, target.getDisplayName()));
user.sendMessage(Util.format(message, itemname, target.getDisplayName()));
}
target.sendMessage(Util.format("enableUnlimited", itemname, target.getDisplayName()));
if (!InventoryWorkaround.containsItem(target.getInventory(), true, stack))
{
target.getInventory().addItem(stack);
}
target.setUnlimited(stack, true);
target.sendMessage(Util.format(message, itemname, target.getDisplayName()));
target.setUnlimited(stack, enableUnlimited);
return true;
}
}

View File

@@ -5,10 +5,15 @@ import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import com.earth2me.essentials.Warps;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Commandwarp extends EssentialsCommand
{
private final static int WARPS_PER_PAGE = 20;
public Commandwarp()
{
super("warp");
@@ -17,8 +22,7 @@ public class Commandwarp extends EssentialsCommand
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
if (args.length == 0)
if (args.length == 0 || args[0].matches("[0-9]+"))
{
if (!user.isAuthorized("essentials.warp.list"))
{
@@ -31,24 +35,34 @@ public class Commandwarp extends EssentialsCommand
{
throw new Exception(Util.i18n("noWarpsDefined"));
}
StringBuilder sb = new StringBuilder();
int i = 0;
for (String warpName : warps.getWarpNames())
final List<String> warpNameList = new ArrayList<String>(warps.getWarpNames());
final Iterator<String> iterator = warpNameList.iterator();
while (iterator.hasNext())
{
if (ess.getSettings().getPerWarpPermission())
final String warpName = iterator.next();
if (ess.getSettings().getPerWarpPermission() && !user.isAuthorized("essentials.warp." + warpName))
{
if (user.isAuthorized("essentials.warp." + warpName))
{
if (i++ > 0) sb.append(", ");
sb.append(warpName);
}
iterator.remove();
}
else
}
int page = 1;
if (args.length > 0)
{
page = Integer.parseInt(args[0]);
}
if (warpNameList.size() > WARPS_PER_PAGE)
{
user.sendMessage(Util.format("warpsCount", warpNameList.size(), page, (int)Math.ceil(warpNameList.size() / (double)WARPS_PER_PAGE)));
}
final int warpPage = (page - 1) * WARPS_PER_PAGE;
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < Math.min(warpNameList.size() - warpPage, WARPS_PER_PAGE); i++)
{
if (i > 0)
{
if (i++ > 0) sb.append(", ");
sb.append(warpName);
sb.append(", ");
}
sb.append(warpNameList.get(i + warpPage));
}
user.sendMessage(sb.toString());
return;
@@ -59,7 +73,7 @@ public class Commandwarp extends EssentialsCommand
if (args.length == 2 && user.isAuthorized("essentials.warp.otherplayers"))
{
otherUser = ess.getUser(server.getPlayer(args[1]));
if(otherUser == null)
if (otherUser == null)
{
user.sendMessage(Util.i18n("playerNotFound"));
return;

View File

@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.Trade;
import java.util.List;
import org.bukkit.Server;
@@ -15,16 +16,16 @@ import java.util.logging.Logger;
public abstract class EssentialsCommand implements IEssentialsCommand
{
private final String name;
protected IEssentials ess;
private final transient String name;
protected transient IEssentials ess;
protected final static Logger logger = Logger.getLogger("Minecraft");
protected EssentialsCommand(String name)
protected EssentialsCommand(final String name)
{
this.name = name;
}
public void setEssentials(IEssentials ess)
public void setEssentials(final IEssentials ess)
{
this.ess = ess;
}
@@ -34,74 +35,72 @@ public abstract class EssentialsCommand implements IEssentialsCommand
return name;
}
protected User getPlayer(Server server, String[] args, int pos) throws NoSuchFieldException, NotEnoughArgumentsException
protected User getPlayer(final Server server, final String[] args, final int pos) throws NoSuchFieldException, NotEnoughArgumentsException
{
return getPlayer(server, args, pos, false);
}
protected User getPlayer(Server server, String[] args, int pos, boolean getOffline) throws NoSuchFieldException, NotEnoughArgumentsException
protected User getPlayer(final Server server, final String[] args, final int pos, final boolean getOffline) throws NoSuchFieldException, NotEnoughArgumentsException
{
if (args.length <= pos) throw new NotEnoughArgumentsException();
User user = ess.getAllUsers().get(args[pos].toLowerCase());
if (args.length <= pos)
{
throw new NotEnoughArgumentsException();
}
final User user = ess.getUser(args[pos]);
if (user != null)
{
if(!getOffline && (user.getBase() instanceof OfflinePlayer || user.isHidden()))
if (!getOffline && (user.getBase() instanceof OfflinePlayer || user.isHidden()))
{
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}
return user;
}
List<Player> matches = server.matchPlayer(args[pos]);
if (matches.size() < 1)
{
if (!getOffline) throw new NoSuchFieldException(Util.i18n("playerNotFound"));
User u = ess.getOfflineUser(args[pos]);
if (u == null) throw new NoSuchFieldException(Util.i18n("playerNotFound"));
return u;
}
final List<Player> matches = server.matchPlayer(args[pos]);
for (Player p : matches)
if (!matches.isEmpty())
{
final User u = ess.getUser(p);
if (u.getDisplayName().startsWith(args[pos]) && (getOffline || !u.isHidden()))
for (Player player : matches)
{
return u;
final User userMatch = ess.getUser(player);
if (userMatch.getDisplayName().startsWith(args[pos]) && (getOffline || !userMatch.isHidden()))
{
return userMatch;
}
}
final User userMatch = ess.getUser(matches.get(0));
if (getOffline || !userMatch.isHidden())
{
return userMatch;
}
}
final User u = ess.getUser(matches.get(0));
if (!getOffline && u.isHidden())
{
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}
return u;
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}
@Override
public final void run(Server server, User user, String commandLabel, Command cmd, String[] args) throws Exception
public final void run(final Server server, final User user, final String commandLabel, final Command cmd, final String[] args) throws Exception
{
run(server, user, commandLabel, args);
}
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
run(server, (CommandSender)user.getBase(), commandLabel, args);
}
@Override
public final void run(Server server, CommandSender sender, String commandLabel, Command cmd, String[] args) throws Exception
public final void run(final Server server, final CommandSender sender, final String commandLabel, final Command cmd, final String[] args) throws Exception
{
run(server, sender, commandLabel, args);
}
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
throw new Exception(Util.format("onlyPlayers", commandLabel));
}
public static String getFinalArg(String[] args, int start)
public static String getFinalArg(final String[] args, final int start)
{
StringBuilder bldr = new StringBuilder();
final StringBuilder bldr = new StringBuilder();
for (int i = start; i < args.length; i++)
{
if (i != start)
@@ -113,11 +112,11 @@ public abstract class EssentialsCommand implements IEssentialsCommand
return bldr.toString();
}
protected void charge(CommandSender sender) throws Exception
protected void charge(final CommandSender sender) throws ChargeException
{
if (sender instanceof Player)
{
Trade charge = new Trade(this.getName(), ess);
final Trade charge = new Trade(this.getName(), ess);
charge.charge(ess.getUser((Player)sender));
}
}

View File

@@ -2,61 +2,184 @@ package com.earth2me.essentials.register.payment;
import org.bukkit.plugin.Plugin;
/**
* Method.java
* Interface for all sub-methods for payment.
*
* @author: Nijikokun<nijikokun@gmail.com> (@nijikokun)
* @copyright: Copyright (C) 2011
* @license: GNUv3 Affero License <http://www.gnu.org/licenses/agpl-3.0.html>
* @author Nijikokun <nijikokun@shortmail.com> (@nijikokun)
* @copyright Copyright (C) 2011
* @license AOL license <http://aol.nexua.org>
*/
public interface Method {
public Object getPlugin();
public String getName();
public String getVersion();
public String format(double amount);
public boolean hasBanks();
public boolean hasBank(String bank);
public boolean hasAccount(String name);
public boolean hasBankAccount(String bank, String name);
public MethodAccount getAccount(String name);
public MethodBankAccount getBankAccount(String bank, String name);
public boolean isCompatible(Plugin plugin);
public void setPlugin(Plugin plugin);
public interface Method
{
/**
* Encodes the Plugin into an Object disguised as the Plugin.
* If you want the original Plugin Class you must cast it to the correct
* Plugin, to do so you have to verify the name and or version then cast.
*
* <pre>
* if(method.getName().equalsIgnoreCase("iConomy"))
* iConomy plugin = ((iConomy)method.getPlugin());</pre>
*
* @return <code>Object</code>
* @see #getName()
* @see #getVersion()
*/
public Object getPlugin();
public interface MethodAccount {
public double balance();
public boolean set(double amount);
public boolean add(double amount);
public boolean subtract(double amount);
public boolean multiply(double amount);
public boolean divide(double amount);
public boolean hasEnough(double amount);
public boolean hasOver(double amount);
public boolean hasUnder(double amount);
public boolean isNegative();
public boolean remove();
/**
* Returns the actual name of this method.
*
* @return <code>String</code> Plugin name.
*/
public String getName();
@Override
public String toString();
}
/**
* Returns the actual version of this method.
*
* @return <code>String</code> Plugin version.
*/
public String getVersion();
public interface MethodBankAccount {
public double balance();
public String getBankName();
public int getBankId();
public boolean set(double amount);
public boolean add(double amount);
public boolean subtract(double amount);
public boolean multiply(double amount);
public boolean divide(double amount);
public boolean hasEnough(double amount);
public boolean hasOver(double amount);
public boolean hasUnder(double amount);
public boolean isNegative();
public boolean remove();
/**
* Formats amounts into this payment methods style of currency display.
*
* @param amount Double
* @return <code>String</code> - Formatted Currency Display.
*/
public String format(double amount);
@Override
public String toString();
}
/**
* Allows the verification of bank API existence in this payment method.
*
* @return <code>boolean</code>
*/
public boolean hasBanks();
/**
* Determines the existence of a bank via name.
*
* @param bank Bank name
* @return <code>boolean</code>
* @see #hasBanks
*/
public boolean hasBank(String bank);
/**
* Determines the existence of an account via name.
*
* @param name Account name
* @return <code>boolean</code>
*/
public boolean hasAccount(String name);
/**
* Check to see if an account <code>name</code> is tied to a <code>bank</code>.
*
* @param bank Bank name
* @param name Account name
* @return <code>boolean</code>
*/
public boolean hasBankAccount(String bank, String name);
/**
* Returns a <code>MethodAccount</code> class for an account <code>name</code>.
*
* @param name Account name
* @return <code>MethodAccount</code> <em>or</em> <code>Null</code>
*/
public MethodAccount getAccount(String name);
/**
* Returns a <code>MethodBankAccount</code> class for an account <code>name</code>.
*
* @param bank Bank name
* @param name Account name
* @return <code>MethodBankAccount</code> <em>or</em> <code>Null</code>
*/
public MethodBankAccount getBankAccount(String bank, String name);
/**
* Checks to verify the compatibility between this Method and a plugin.
* Internal usage only, for the most part.
*
* @param plugin Plugin
* @return <code>boolean</code>
*/
public boolean isCompatible(Plugin plugin);
/**
* Set Plugin data.
*
* @param plugin Plugin
*/
public void setPlugin(Plugin plugin);
/**
* Contains Calculator and Balance functions for Accounts.
*/
public interface MethodAccount
{
public double balance();
public boolean set(double amount);
public boolean add(double amount);
public boolean subtract(double amount);
public boolean multiply(double amount);
public boolean divide(double amount);
public boolean hasEnough(double amount);
public boolean hasOver(double amount);
public boolean hasUnder(double amount);
public boolean isNegative();
public boolean remove();
@Override
public String toString();
}
/**
* Contains Calculator and Balance functions for Bank Accounts.
*/
public interface MethodBankAccount
{
public double balance();
public String getBankName();
public int getBankId();
public boolean set(double amount);
public boolean add(double amount);
public boolean subtract(double amount);
public boolean multiply(double amount);
public boolean divide(double amount);
public boolean hasEnough(double amount);
public boolean hasOver(double amount);
public boolean hasUnder(double amount);
public boolean isNegative();
public boolean remove();
@Override
public String toString();
}
}

View File

@@ -1,137 +1,271 @@
package com.earth2me.essentials.register.payment;
import java.util.HashSet;
import java.util.Set;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import java.util.HashSet;
import java.util.Set;
/**
* Methods.java
* Controls the getting / setting of methods & the method of payment used.
* The <code>Methods</code> initializes Methods that utilize the Method interface
* based on a "first come, first served" basis.
*
* @author: Nijikokun<nijikokun@gmail.com> (@nijikokun)
* Allowing you to check whether a payment method exists or not.
*
* <blockquote><pre>
* Methods methods = new Methods();
* </pre></blockquote>
*
* Methods also allows you to set a preferred method of payment before it captures
* payment plugins in the initialization process.
*
* <blockquote><pre>
* Methods methods = new Methods("iConomy");
* </pre></blockquote>
*
* @author: Nijikokun <nijikokun@shortmail.com> (@nijikokun)
* @copyright: Copyright (C) 2011
* @license: GNUv3 Affero License <http://www.gnu.org/licenses/agpl-3.0.html>
* @license: AOL license <http://aol.nexua.org>
*/
public class Methods {
private boolean self = false;
private Method Method = null;
private String preferred = "";
private Set<Method> Methods = new HashSet<Method>();
private Set<String> Dependencies = new HashSet<String>();
private Set<Method> Attachables = new HashSet<Method>();
public class Methods
{
private boolean self = false;
private Method Method = null;
private String preferred = "";
private Set<Method> Methods = new HashSet<Method>();
private Set<String> Dependencies = new HashSet<String>();
private Set<Method> Attachables = new HashSet<Method>();
public Methods() {
this._init();
}
/**
* Initialize Method class
*/
public Methods()
{
this._init();
}
/**
* Allows you to set which economy plugin is most preferred.
*
* @param preferred - preferred economy plugin
*/
public Methods(String preferred) {
this._init();
/**
* Initializes <code>Methods</code> class utilizing a "preferred" payment method check before
* returning the first method that was initialized.
*
* @param preferred Payment method that is most preferred for this setup.
*/
public Methods(String preferred)
{
this._init();
if(this.Dependencies.contains(preferred)) {
this.preferred = preferred;
}
}
if (this.Dependencies.contains(preferred))
{
this.preferred = preferred;
}
}
private void _init() {
this.addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo4());
this.addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo5());
this.addMethod("BOSEconomy", new com.earth2me.essentials.register.payment.methods.BOSE6());
this.addMethod("BOSEconomy", new com.earth2me.essentials.register.payment.methods.BOSE7());
}
/**
* Implement all methods along with their respective name & class.
*
* @see #Methods()
* @see #Methods(java.lang.String)
*/
private void _init()
{
this.addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo4());
this.addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo5());
this.addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo6());
this.addMethod("BOSEconomy", new com.earth2me.essentials.register.payment.methods.BOSE6());
this.addMethod("BOSEconomy", new com.earth2me.essentials.register.payment.methods.BOSE7());
this.addMethod("MultiCurrency", new com.earth2me.essentials.register.payment.methods.MCUR());
}
public Set<String> getDependencies() {
return Dependencies;
}
/**
* Returns an array of payment method names that have been loaded
* through the <code>_init</code> method.
*
* @return <code>Set<String></code> - Array of payment methods that are loaded.
* @see #setMethod(org.bukkit.plugin.Plugin)
*/
public Set<String> getDependencies()
{
return Dependencies;
}
public Method createMethod(Plugin plugin) {
for (Method method: Methods) {
if (method.isCompatible(plugin)) {
method.setPlugin(plugin);
return method;
}
}
/**
* Interprets Plugin class data to verify whether it is compatible with an existing payment
* method to use for payments and other various economic activity.
*
* @param plugin Plugin data from bukkit, Internal Class file.
* @return Method <em>or</em> Null
*/
public Method createMethod(Plugin plugin)
{
for (Method method : Methods)
{
if (method.isCompatible(plugin))
{
method.setPlugin(plugin);
return method;
}
}
return null;
}
return null;
}
private void addMethod(String name, Method method) {
Dependencies.add(name);
Methods.add(method);
}
private void addMethod(String name, Method method)
{
Dependencies.add(name);
Methods.add(method);
}
public boolean hasMethod() {
return (Method != null);
}
/**
* Verifies if Register has set a payment method for usage yet.
*
* @return <code>boolean</code>
* @see #setMethod(org.bukkit.plugin.Plugin)
* @see #checkDisabled(org.bukkit.plugin.Plugin)
*/
public boolean hasMethod()
{
return (Method != null);
}
public boolean setMethod(Plugin method) {
if(hasMethod()) return true;
if(self) { self = false; return false; }
/**
* Checks Plugin Class against a multitude of checks to verify it's usability
* as a payment method.
*
* @param method Plugin data from bukkit, Internal Class file.
* @return <code>boolean</code> True on success, False on failure.
*/
public boolean setMethod(Plugin method)
{
if (hasMethod())
{
return true;
}
if (self)
{
self = false;
return false;
}
int count = 0;
boolean match = false;
Plugin plugin;
PluginManager manager = method.getServer().getPluginManager();
int count = 0;
boolean match = false;
Plugin plugin = null;
PluginManager manager = method.getServer().getPluginManager();
for(String name: this.getDependencies()) {
if(hasMethod()) break;
if(method.getDescription().getName().equals(name)) plugin = method; else plugin = manager.getPlugin(name);
if(plugin == null) continue;
for (String name : this.getDependencies())
{
if (hasMethod())
{
break;
}
if (method.getDescription().getName().equals(name))
{
plugin = method;
}
else
{
plugin = manager.getPlugin(name);
}
if (plugin == null)
{
continue;
}
Method current = this.createMethod(plugin);
if(current == null) continue;
Method current = this.createMethod(plugin);
if (current == null)
{
continue;
}
if(this.preferred.isEmpty())
this.Method = current;
else {
this.Attachables.add(current);
}
}
if (this.preferred.isEmpty())
{
this.Method = current;
}
else
{
this.Attachables.add(current);
}
}
if(!this.preferred.isEmpty()) {
do {
if(hasMethod()) {
match = true;
} else {
for(Method attached: this.Attachables) {
if(attached == null) continue;
if (!this.preferred.isEmpty())
{
do
{
if (hasMethod())
{
match = true;
}
else
{
for (Method attached : this.Attachables)
{
if (attached == null)
{
continue;
}
if(hasMethod()) {
match = true;
break;
}
if (hasMethod())
{
match = true;
break;
}
if(this.preferred.isEmpty()) this.Method = attached;
if (this.preferred.isEmpty())
{
this.Method = attached;
}
if(count == 0) {
if(this.preferred.equalsIgnoreCase(attached.getName()))
this.Method = attached;
} else {
this.Method = attached;
}
}
if (count == 0)
{
if (this.preferred.equalsIgnoreCase(attached.getName()))
{
this.Method = attached;
}
}
else
{
this.Method = attached;
}
}
count++;
}
} while(!match);
}
count++;
}
}
while (!match);
}
return hasMethod();
}
return hasMethod();
}
public Method getMethod() {
return Method;
}
/**
* Grab the existing and initialized (hopefully) Method Class.
*
* @return <code>Method</code> <em>or</em> <code>Null</code>
*/
public Method getMethod()
{
return Method;
}
public boolean checkDisabled(Plugin method) {
if(!hasMethod()) return true;
if (Method.isCompatible(method)) Method = null;
return (Method == null);
}
/**
* Verify is a plugin is disabled, only does this if we there is an existing payment
* method initialized in Register.
*
* @param method Plugin data from bukkit, Internal Class file.
* @return <code>boolean</code>
*/
public boolean checkDisabled(Plugin method)
{
if (!hasMethod())
{
return true;
}
if (Method.isCompatible(method))
{
Method = null;
}
return (Method == null);
}
}

View File

@@ -4,6 +4,13 @@ import com.earth2me.essentials.register.payment.Method;
import cosine.boseconomy.BOSEconomy;
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>
*/
public class BOSE6 implements Method {
private BOSEconomy BOSEconomy;
@@ -69,7 +76,7 @@ public class BOSE6 implements Method {
}
public double balance() {
return Double.valueOf(this.BOSEconomy.getPlayerMoney(this.name));
return (double) this.BOSEconomy.getPlayerMoney(this.name);
}
public boolean set(double amount) {
@@ -122,8 +129,8 @@ public class BOSE6 implements Method {
}
public class BOSEBankAccount implements MethodBankAccount {
private String bank;
private BOSEconomy BOSEconomy;
private final String bank;
private final BOSEconomy BOSEconomy;
public BOSEBankAccount(String bank, BOSEconomy bOSEconomy) {
this.bank = bank;
@@ -139,7 +146,7 @@ public class BOSE6 implements Method {
}
public double balance() {
return Double.valueOf(this.BOSEconomy.getBankMoney(bank));
return (double) this.BOSEconomy.getBankMoney(bank);
}
public boolean set(double amount) {

View File

@@ -5,7 +5,12 @@ import cosine.boseconomy.BOSEconomy;
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>
*/
public class BOSE7 implements Method {

View File

@@ -0,0 +1,120 @@
package com.earth2me.essentials.register.payment.methods;
import com.earth2me.essentials.register.payment.Method;
import me.ashtheking.currency.Currency;
import me.ashtheking.currency.CurrencyList;
import org.bukkit.plugin.Plugin;
/**
* MultiCurrency Method implementation.
*
* @author Acrobot
* @copyright (c) 2011
* @license AOL license <http://aol.nexua.org>
*/
public class MCUR implements Method {
private Currency currencyList;
public Object getPlugin() {
return this.currencyList;
}
public String getName() {
return "MultiCurrency";
}
public String getVersion() {
return "0.09";
}
public String format(double amount) {
return amount + " Currency";
}
public boolean hasBanks() {
return false;
}
public boolean hasBank(String bank) {
return false;
}
public boolean hasAccount(String name) {
return true;
}
public boolean hasBankAccount(String bank, String name) {
return false;
}
public MethodAccount getAccount(String name) {
return new MCurrencyAccount(name);
}
public MethodBankAccount getBankAccount(String bank, String name) {
return null;
}
public boolean isCompatible(Plugin plugin) {
return plugin.getDescription().getName().equalsIgnoreCase(getName()) && plugin instanceof Currency;
}
public void setPlugin(Plugin plugin) {
currencyList = (Currency) plugin;
}
public class MCurrencyAccount implements MethodAccount{
private String name;
public MCurrencyAccount(String name) {
this.name = name;
}
public double balance() {
return CurrencyList.getValue((String) CurrencyList.maxCurrency(name)[0], name);
}
public boolean set(double amount) {
CurrencyList.setValue((String) CurrencyList.maxCurrency(name)[0], name, amount);
return true;
}
public boolean add(double amount) {
return CurrencyList.add(name, amount);
}
public boolean subtract(double amount) {
return CurrencyList.subtract(name, amount);
}
public boolean multiply(double amount) {
return CurrencyList.multiply(name, amount);
}
public boolean divide(double amount) {
return CurrencyList.divide(name, amount);
}
public boolean hasEnough(double amount) {
return CurrencyList.hasEnough(name, amount);
}
public boolean hasOver(double amount) {
return CurrencyList.hasOver(name, amount);
}
public boolean hasUnder(double amount) {
return CurrencyList.hasUnder(name, amount);
}
public boolean isNegative() {
return CurrencyList.isNegative(name);
}
public boolean remove() {
return CurrencyList.remove(name);
}
}
}

View File

@@ -7,6 +7,13 @@ import com.earth2me.essentials.register.payment.Method;
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>
*/
public class iCo4 implements Method {
private iConomy iConomy;
@@ -51,7 +58,7 @@ public class iCo4 implements Method {
}
public boolean isCompatible(Plugin plugin) {
return plugin.getDescription().getName().equalsIgnoreCase("iconomy") && !plugin.getClass().getName().equals("com.iConomy.iConomy") && plugin instanceof iConomy;
return plugin.getDescription().getName().equalsIgnoreCase("iconomy") && plugin.getClass().getName().equals("com.nijiko.coelho.iConomy.iConomy") && plugin instanceof iConomy;
}
public void setPlugin(Plugin plugin) {

View File

@@ -10,202 +10,291 @@ import com.earth2me.essentials.register.payment.Method;
import org.bukkit.plugin.Plugin;
public class iCo5 implements Method {
private iConomy iConomy;
public iConomy getPlugin() {
return this.iConomy;
}
/**
* iConomy 5 Implementation of Method
*
* @author Nijikokun <nijikokun@shortmail.com> (@nijikokun)
* @copyright (c) 2011
* @license AOL license <http://aol.nexua.org>
*/
public class iCo5 implements Method
{
private iConomy iConomy;
public String getName() {
return "iConomy";
}
public iConomy getPlugin()
{
return this.iConomy;
}
public String getVersion() {
return "5";
}
public String getName()
{
return "iConomy";
}
public String format(double amount) {
return this.iConomy.format(amount);
}
public String getVersion()
{
return "5";
}
public boolean hasBanks() {
return Constants.Banking;
}
public String format(double amount)
{
return this.iConomy.format(amount);
}
public boolean hasBank(String bank) {
return (!hasBanks()) ? false : this.iConomy.Banks.exists(bank);
}
public boolean hasBanks()
{
return Constants.Banking;
}
public boolean hasAccount(String name) {
return this.iConomy.hasAccount(name);
}
public boolean hasBank(String bank)
{
return (hasBanks()) && this.iConomy.Banks.exists(bank);
}
public boolean hasBankAccount(String bank, String name) {
return (!hasBank(bank)) ? false : this.iConomy.getBank(bank).hasAccount(name);
}
public boolean hasAccount(String name)
{
return this.iConomy.hasAccount(name);
}
public MethodAccount getAccount(String name) {
return new iCoAccount(this.iConomy.getAccount(name));
}
public boolean hasBankAccount(String bank, String name)
{
return (hasBank(bank)) && this.iConomy.getBank(bank).hasAccount(name);
}
public MethodBankAccount getBankAccount(String bank, String name) {
return new iCoBankAccount(this.iConomy.getBank(bank).getAccount(name));
}
public boolean isCompatible(Plugin plugin) {
return plugin.getDescription().getName().equalsIgnoreCase("iconomy") && plugin.getClass().getName().equals("com.iConomy.iConomy") && plugin instanceof iConomy;
}
public MethodAccount getAccount(String name)
{
return new iCoAccount(this.iConomy.getAccount(name));
}
public void setPlugin(Plugin plugin) {
iConomy = (iConomy)plugin;
}
public MethodBankAccount getBankAccount(String bank, String name)
{
return new iCoBankAccount(this.iConomy.getBank(bank).getAccount(name));
}
public class iCoAccount implements MethodAccount {
private Account account;
private Holdings holdings;
public boolean isCompatible(Plugin plugin)
{
return plugin.getDescription().getName().equalsIgnoreCase("iconomy") && plugin.getClass().getName().equals("com.iConomy.iConomy") && plugin instanceof iConomy;
}
public iCoAccount(Account account) {
this.account = account;
this.holdings = account.getHoldings();
}
public void setPlugin(Plugin plugin)
{
iConomy = (iConomy)plugin;
}
public Account getiCoAccount() {
return account;
}
public double balance() {
return this.holdings.balance();
}
public class iCoAccount implements MethodAccount
{
private Account account;
private Holdings holdings;
public boolean set(double amount) {
if(this.holdings == null) return false;
this.holdings.set(amount);
return true;
}
public iCoAccount(Account account)
{
this.account = account;
this.holdings = account.getHoldings();
}
public boolean add(double amount) {
if(this.holdings == null) return false;
this.holdings.add(amount);
return true;
}
public Account getiCoAccount()
{
return account;
}
public boolean subtract(double amount) {
if(this.holdings == null) return false;
this.holdings.subtract(amount);
return true;
}
public double balance()
{
return this.holdings.balance();
}
public boolean multiply(double amount) {
if(this.holdings == null) return false;
this.holdings.multiply(amount);
return true;
}
public boolean set(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.set(amount);
return true;
}
public boolean divide(double amount) {
if(this.holdings == null) return false;
this.holdings.divide(amount);
return true;
}
public boolean add(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.add(amount);
return true;
}
public boolean hasEnough(double amount) {
return this.holdings.hasEnough(amount);
}
public boolean subtract(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.subtract(amount);
return true;
}
public boolean hasOver(double amount) {
return this.holdings.hasOver(amount);
}
public boolean multiply(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.multiply(amount);
return true;
}
public boolean hasUnder(double amount) {
return this.holdings.hasUnder(amount);
}
public boolean divide(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.divide(amount);
return true;
}
public boolean isNegative() {
return this.holdings.isNegative();
}
public boolean hasEnough(double amount)
{
return this.holdings.hasEnough(amount);
}
public boolean remove() {
if(this.account == null) return false;
this.account.remove();
return true;
}
}
public boolean hasOver(double amount)
{
return this.holdings.hasOver(amount);
}
public class iCoBankAccount implements MethodBankAccount {
private BankAccount account;
private Holdings holdings;
public boolean hasUnder(double amount)
{
return this.holdings.hasUnder(amount);
}
public iCoBankAccount(BankAccount account) {
this.account = account;
this.holdings = account.getHoldings();
}
public boolean isNegative()
{
return this.holdings.isNegative();
}
public BankAccount getiCoBankAccount() {
return account;
}
public boolean remove()
{
if (this.account == null)
{
return false;
}
this.account.remove();
return true;
}
}
public String getBankName() {
return this.account.getBankName();
}
public int getBankId() {
return this.account.getBankId();
}
public class iCoBankAccount implements MethodBankAccount
{
private BankAccount account;
private Holdings holdings;
public double balance() {
return this.holdings.balance();
}
public iCoBankAccount(BankAccount account)
{
this.account = account;
this.holdings = account.getHoldings();
}
public boolean set(double amount) {
if(this.holdings == null) return false;
this.holdings.set(amount);
return true;
}
public BankAccount getiCoBankAccount()
{
return account;
}
public boolean add(double amount) {
if(this.holdings == null) return false;
this.holdings.add(amount);
return true;
}
public String getBankName()
{
return this.account.getBankName();
}
public boolean subtract(double amount) {
if(this.holdings == null) return false;
this.holdings.subtract(amount);
return true;
}
public int getBankId()
{
return this.account.getBankId();
}
public boolean multiply(double amount) {
if(this.holdings == null) return false;
this.holdings.multiply(amount);
return true;
}
public double balance()
{
return this.holdings.balance();
}
public boolean divide(double amount) {
if(this.holdings == null) return false;
this.holdings.divide(amount);
return true;
}
public boolean set(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.set(amount);
return true;
}
public boolean hasEnough(double amount) {
return this.holdings.hasEnough(amount);
}
public boolean add(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.add(amount);
return true;
}
public boolean hasOver(double amount) {
return this.holdings.hasOver(amount);
}
public boolean subtract(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.subtract(amount);
return true;
}
public boolean hasUnder(double amount) {
return this.holdings.hasUnder(amount);
}
public boolean multiply(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.multiply(amount);
return true;
}
public boolean isNegative() {
return this.holdings.isNegative();
}
public boolean divide(double amount)
{
if (this.holdings == null)
{
return false;
}
this.holdings.divide(amount);
return true;
}
public boolean remove() {
if(this.account == null) return false;
this.account.remove();
return true;
}
}
}
public boolean hasEnough(double amount)
{
return this.holdings.hasEnough(amount);
}
public boolean hasOver(double amount)
{
return this.holdings.hasOver(amount);
}
public boolean hasUnder(double amount)
{
return this.holdings.hasUnder(amount);
}
public boolean isNegative()
{
return this.holdings.isNegative();
}
public boolean remove()
{
if (this.account == null)
{
return false;
}
this.account.remove();
return true;
}
}
}

View File

@@ -0,0 +1,142 @@
package com.earth2me.essentials.register.payment.methods;
import com.iCo6.iConomy;
import com.iCo6.system.Account;
import com.iCo6.system.Accounts;
import com.iCo6.system.Holdings;
import com.earth2me.essentials.register.payment.Method;
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>
*/
public class iCo6 implements Method {
private iConomy iConomy;
public iConomy getPlugin() {
return this.iConomy;
}
public String getName() {
return "iConomy";
}
public String getVersion() {
return "6";
}
public String format(double amount) {
return this.iConomy.format(amount);
}
public boolean hasBanks() {
return false;
}
public boolean hasBank(String bank) {
return false;
}
public boolean hasAccount(String name) {
return (new Accounts()).exists(name);
}
public boolean hasBankAccount(String bank, String name) {
return false;
}
public MethodAccount getAccount(String name) {
return new iCoAccount((new Accounts()).get(name));
}
public MethodBankAccount getBankAccount(String bank, String name) {
return null;
}
public boolean isCompatible(Plugin plugin) {
try { Class.forName("com.iCo6.IO"); }
catch(Exception e) { return false; }
return plugin.getDescription().getName().equalsIgnoreCase("iconomy") && plugin.getClass().getName().equals("com.iCo6.iConomy") && plugin instanceof iConomy;
}
public void setPlugin(Plugin plugin) {
iConomy = (iConomy)plugin;
}
public class iCoAccount implements MethodAccount {
private Account account;
private Holdings holdings;
public iCoAccount(Account account) {
this.account = account;
this.holdings = account.getHoldings();
}
public Account getiCoAccount() {
return account;
}
public double balance() {
return this.holdings.getBalance();
}
public boolean set(double amount) {
if(this.holdings == null) return false;
this.holdings.setBalance(amount);
return true;
}
public boolean add(double amount) {
if(this.holdings == null) return false;
this.holdings.add(amount);
return true;
}
public boolean subtract(double amount) {
if(this.holdings == null) return false;
this.holdings.subtract(amount);
return true;
}
public boolean multiply(double amount) {
if(this.holdings == null) return false;
this.holdings.multiply(amount);
return true;
}
public boolean divide(double amount) {
if(this.holdings == null) return false;
this.holdings.divide(amount);
return true;
}
public boolean hasEnough(double amount) {
return this.holdings.hasEnough(amount);
}
public boolean hasOver(double amount) {
return this.holdings.hasOver(amount);
}
public boolean hasUnder(double amount) {
return this.holdings.hasUnder(amount);
}
public boolean isNegative() {
return this.holdings.isNegative();
}
public boolean remove() {
if(this.account == null) return false;
this.account.remove();
return true;
}
}
}

View File

@@ -33,13 +33,15 @@ public class EssentialsSign
public final boolean onSignCreate(final SignChangeEvent event, final IEssentials ess)
{
final ISign sign = new EventSign(event);
sign.setLine(0, String.format(FORMAT_FAIL, this.signName));
final User user = ess.getUser(event.getPlayer());
if (!(user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".create")
|| user.isAuthorized("essentials.signs.create." + signName.toLowerCase())))
{
return false;
// Return true, so other plugins can use the same sign title, just hope
// they won't change it to §1[Signname]
return true;
}
sign.setLine(0, String.format(FORMAT_FAIL, this.signName));
try
{
final boolean ret = onSignCreate(sign, user, getUsername(user), ess);
@@ -57,7 +59,8 @@ public class EssentialsSign
{
ess.showError(user, ex, signName);
}
return false;
// Return true, so the player sees the wrong sign.
return true;
}
public String getSuccessName()
@@ -72,7 +75,7 @@ public class EssentialsSign
private String getUsername(final User user)
{
return user.getName().substring(0, user.getName().length() > 14 ? 14 : user.getName().length());
return user.getName().substring(0, user.getName().length() > 13 ? 13 : user.getName().length());
}
public final boolean onSignInteract(final Block block, final Player player, final IEssentials ess)
@@ -196,7 +199,8 @@ public class EssentialsSign
public static boolean checkIfBlockBreaksSigns(final Block block)
{
if (block.getRelative(BlockFace.UP).getType() == Material.SIGN_POST)
final Block sign = block.getRelative(BlockFace.UP);
if (sign.getType() == Material.SIGN_POST && isValidSign(new BlockSign(sign)))
{
return true;
}
@@ -212,8 +216,8 @@ public class EssentialsSign
final Block signblock = block.getRelative(blockFace);
if (signblock.getType() == Material.WALL_SIGN)
{
final org.bukkit.material.Sign sign = (org.bukkit.material.Sign)signblock.getState().getData();
if (sign.getFacing() == blockFace)
final org.bukkit.material.Sign signMat = (org.bukkit.material.Sign)signblock.getState().getData();
if (signMat.getFacing() == blockFace && isValidSign(new BlockSign(signblock)))
{
return true;
}
@@ -222,6 +226,11 @@ public class EssentialsSign
return false;
}
public static boolean isValidSign(final ISign sign)
{
return sign.getLine(0).matches("§1\\[.*\\]");
}
protected boolean onBlockPlace(final Block block, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
{
return true;

View File

@@ -122,8 +122,9 @@ public class SignBlockListener extends BlockListener
}
final Block against = event.getBlockAgainst();
if (against.getType() == Material.WALL_SIGN
|| against.getType() == Material.SIGN_POST)
if ((against.getType() == Material.WALL_SIGN
|| against.getType() == Material.SIGN_POST)
&& EssentialsSign.isValidSign(new EssentialsSign.BlockSign(against)))
{
event.setCancelled(true);
return;
@@ -155,9 +156,10 @@ public class SignBlockListener extends BlockListener
}
final Block block = event.getBlock();
if ((block.getType() == Material.WALL_SIGN
|| block.getType() == Material.SIGN_POST
|| EssentialsSign.checkIfBlockBreaksSigns(block)))
if (((block.getType() == Material.WALL_SIGN
|| block.getType() == Material.SIGN_POST)
&& EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block)))
|| EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -189,13 +191,14 @@ public class SignBlockListener extends BlockListener
}
@Override
public void onBlockPistonExtend(BlockPistonExtendEvent event)
public void onBlockPistonExtend(final BlockPistonExtendEvent event)
{
for (Block block : event.getBlocks())
{
if ((block.getType() == Material.WALL_SIGN
|| block.getType() == Material.SIGN_POST
|| EssentialsSign.checkIfBlockBreaksSigns(block)))
if (((block.getType() == Material.WALL_SIGN
|| block.getType() == Material.SIGN_POST)
&& EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block)))
|| EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -214,14 +217,15 @@ public class SignBlockListener extends BlockListener
}
@Override
public void onBlockPistonRetract(BlockPistonRetractEvent event)
public void onBlockPistonRetract(final BlockPistonRetractEvent event)
{
if (event.isSticky())
{
final Block block = event.getBlock();
if ((block.getType() == Material.WALL_SIGN
|| block.getType() == Material.SIGN_POST
|| EssentialsSign.checkIfBlockBreaksSigns(block)))
if (((block.getType() == Material.WALL_SIGN
|| block.getType() == Material.SIGN_POST)
&& EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block)))
|| EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;

View File

@@ -11,20 +11,20 @@ public class SignEntityListener extends EntityListener
{
private final transient IEssentials ess;
public SignEntityListener(IEssentials ess)
public SignEntityListener(final IEssentials ess)
{
this.ess = ess;
}
@Override
public void onEntityExplode(EntityExplodeEvent event)
public void onEntityExplode(final EntityExplodeEvent event)
{
for (Block block : event.blockList())
{
if ((block.getType() == Material.WALL_SIGN
|| block.getType() == Material.SIGN_POST
|| EssentialsSign.checkIfBlockBreaksSigns(block)))
if (((block.getType() == Material.WALL_SIGN
|| block.getType() == Material.SIGN_POST)
&& EssentialsSign.isValidSign(new EssentialsSign.BlockSign(block)))
|| EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;

View File

@@ -41,6 +41,7 @@ public class SignProtection extends EssentialsSign
sign.setLine(3, "§1" + username);
return true;
}
//TODO: move to messages
player.sendMessage("§4You are not allowed to create sign here.");
return false;
}
@@ -146,6 +147,10 @@ public class SignProtection extends EssentialsSign
{
return SignProtectionState.OWNER;
}
if (ChatColor.stripColor(sign.getLine(3)).equalsIgnoreCase(username))
{
return SignProtectionState.OWNER;
}
for (int i = 1; i <= 2; i++)
{
final String line = sign.getLine(i);
@@ -158,10 +163,6 @@ public class SignProtection extends EssentialsSign
return SignProtectionState.ALLOWED;
}
}
if (ChatColor.stripColor(sign.getLine(3)).equalsIgnoreCase(username))
{
return SignProtectionState.OWNER;
}
return SignProtectionState.NOT_ALLOWED;
}

View File

@@ -10,6 +10,7 @@ import org.bukkit.inventory.ItemStack;
public class SignTrade extends EssentialsSign
{
public SignTrade()
{
super("Trade");
@@ -33,10 +34,17 @@ public class SignTrade extends EssentialsSign
{
if (sign.getLine(3).substring(2).equalsIgnoreCase(username))
{
final Trade stored = getTrade(sign, 1, true, true, ess);
substractAmount(sign, 1, stored, ess);
stored.pay(player);
Trade.log("Sign", "Trade", "OwnerInteract", username, null, username, stored, sign.getBlock().getLocation(), ess);
try
{
final Trade stored = getTrade(sign, 1, true, true, ess);
substractAmount(sign, 1, stored, ess);
stored.pay(player);
Trade.log("Sign", "Trade", "OwnerInteract", username, null, username, stored, sign.getBlock().getLocation(), ess);
}
catch (SignException e)
{
throw new SignException(Util.i18n("tradeSignEmptyOwner"));
}
}
else
{
@@ -98,9 +106,14 @@ public class SignTrade extends EssentialsSign
if (split.length == 2 && amountNeeded)
{
final Double money = getMoney(split[0]);
final Double amount = getDoublePositive(split[1]);
Double amount = getDoublePositive(split[1]);
if (money != null && amount != null)
{
amount -= amount % money;
if (amount < 0.01 || money < 0.01)
{
throw new SignException(Util.i18n("moreThanZero"));
}
sign.setLine(index, Util.formatCurrency(money, ess) + ":" + Util.formatCurrency(amount, ess).substring(1));
return;
}
@@ -136,7 +149,7 @@ public class SignTrade extends EssentialsSign
sign.setLine(index, stackamount + " " + split[1] + ":" + amount);
return;
}
throw new SignException(Util.format("invalidSignLine", index+1));
throw new SignException(Util.format("invalidSignLine", index + 1));
}
protected final Trade getTrade(final ISign sign, final int index, final boolean fullAmount, final boolean notEmpty, final IEssentials ess) throws SignException
@@ -150,11 +163,18 @@ public class SignTrade extends EssentialsSign
if (split.length == 2)
{
final Double money = getMoney(split[0]);
final Double amount = notEmpty ? getDoublePositive(split[1]) : getDouble(split[1]);
if (money != null && amount != null)
try
{
return new Trade(fullAmount ? amount : money, ess);
final Double money = getMoney(split[0]);
final Double amount = notEmpty ? getDoublePositive(split[1]) : getDouble(split[1]);
if (money != null && amount != null)
{
return new Trade(fullAmount ? amount : money, ess);
}
}
catch (SignException e)
{
throw new SignException(Util.i18n("tradeSignEmpty"));
}
}
@@ -166,12 +186,12 @@ public class SignTrade extends EssentialsSign
amount -= amount % stackamount;
if (notEmpty && (amount < 1 || stackamount < 1 || item.getTypeId() == 0))
{
throw new SignException(Util.i18n("moreThanZero"));
throw new SignException(Util.i18n("tradeSignEmpty"));
}
item.setAmount(fullAmount ? amount : stackamount);
return new Trade(item, ess);
}
throw new SignException(Util.format("invalidSignLine", index+1));
throw new SignException(Util.format("invalidSignLine", index + 1));
}
protected final void substractAmount(final ISign sign, final int index, final Trade trade, final IEssentials ess) throws SignException
@@ -230,6 +250,6 @@ public class SignTrade extends EssentialsSign
sign.setLine(index, stackamount + " " + split[1] + ":" + (amount + Math.round(value)));
return;
}
throw new SignException(Util.format("invalidSignLine", index+1));
throw new SignException(Util.format("invalidSignLine", index + 1));
}
}

View File

@@ -40,7 +40,9 @@ change-displayname: true
# Adds the prefix and suffix to the displayname of the player, so it will be displayed in messages and lists.
# The prefix/suffix can be set using Permissions, Group Manager or PermissionsEx.
# The value of change-displayname (above) has to be true.
add-prefix-suffix: false
# 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
#add-prefix-suffix: false
# The delay, in seconds, required between /home, /tp, etc.
teleport-cooldown: 0
@@ -284,6 +286,9 @@ economy-log-enabled: false
non-ess-in-help: true
#Hide plugins which dont give a permission
#You can override a true value here for a single plugin by adding a permission to a user/group.
#The indervidual 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.
hide-permissionless-help: true
############################################################
@@ -296,6 +301,7 @@ hide-permissionless-help: true
# 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."
chat:
radius: 0
@@ -481,6 +487,7 @@ newbies:
announce-format: '&dWelcome {DISPLAYNAME} to the server!'
# When we spawn for the first time, which spawnpoint do we use?
# Set to "none" if you want to use the spawn point of the world.
spawnpoint: newbies
# End of File <-- No seriously, you're done with configuration.

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,7 @@
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
# by:
addedToAccount = \u00a7a{0} has been added to your account.
addedToOthersAccount = \u00a7a{0} has been added to {1} account.
alertBroke = broke:
@@ -211,11 +212,11 @@ onlySunStorm = /weather only supports sun/storm.
parseError = Error parsing {0} on line {1}
pendingTeleportCancelled = \u00a7cPending teleportation request cancelled.
permissionsError = Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
playerBanned = \u00a7cPlayer {0} banned: {1}
playerBanned = \u00a7cPlayer {0} banned {1} for {2}
playerInJail = \u00a7cPlayer is already in jail {0}.
playerJailed = \u00a77Player {0} jailed.
playerJailedFor = \u00a77Player {0} jailed for {1}.
playerKicked = \u00a7cPlayer {0} kicked: {1}
playerKicked = \u00a7cPlayer {0} kicked {1} for {2}
playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
@@ -227,10 +228,24 @@ powerToolAir = Command can''t be attached to air.
powerToolAttach = Command assigned to {0}
powerToolRemove = Command removed from {0}
protectionOwner = \u00a76[EssentialsProtect] Protection owner: {0}
pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
pTimePlayers = These players have their own time:
pTimeReset = Player time has been reset for: \u00a7e{0}
pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
questionFormat = \u00a77[Question]\u00a7f {0}
reloadAllPlugins = \u00a77Reloaded all plugins.
repair = You have successfully repaired your: \u00a7e{0}.
repairAlreadyFixed = \u00a77This item does not need repairing.
repairInvalidType = \u00a7cThis item cannot be repaired.
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.
requestSent = \u00a77Request sent to {0}\u00a77.
returnPlayerToJailError = Error occured when trying to return player to jail.
second = second
@@ -238,6 +253,7 @@ seconds = seconds
seenOffline = Player {0} is offline since {1}
seenOnline = Player {0} is online since {1}
serverFull = Server is full
setSpawner = Changed spawner type to {0}
sheepMalformedColor = Malformed color.
shoutFormat = \u00a77[Shout]\u00a7f {0}
similarWarpExist = A warp with a similar name already exists.
@@ -249,10 +265,11 @@ suicideMessage = \u00a77Goodbye Cruel World...
suicideSuccess = \u00a77{0} took their own life
takenFromAccount = \u00a7c{0} has been taken from your account.
takenFromOthersAccount = \u00a7c{0} has been taken from {1} account.
teleportAAll = \u00a77Teleporting request sent to all players...
teleportAll = \u00a77Teleporting all players...
teleportAtoB = \u00a77{0}\u00a77 teleported you to {1}\u00a77.
teleportDisabled = {0} has teleportation disabled.
teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to him/her.
teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to them.
teleportNewPlayerError = Failed to teleport new player
teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
teleportTop = \u00a77Teleporting to top.
@@ -267,17 +284,21 @@ thunder = You {0} thunder in your world
thunderDuration = You {0} thunder in your world for {1} seconds.
timeBeforeHeal = Time before next heal: {0}
timeBeforeTeleport = Time before next teleport: {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 = 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}
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.
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.
unableToSpawnMob = Unable to spawn mob.
unableToSpawnMob = Unable to spawn mob.
unbannedIP = Unbanned IP address.
unbannedPlayer = Unbanned player.
unignorePlayer = You are not ignoring player {0} anymore.
@@ -304,6 +325,7 @@ voiceSilenced = \u00a77Your voice has been silenced
warpDeleteError = Problem deleting the warp file.
warpListPermission = \u00a7cYou do not have Permission to list that warps.
warpNotExist = That warp does not exist.
warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
warpSet = \u00a77Warp {0} set.
warpUsePermission = \u00a7cYou do not have Permission to use that warp.
warpingTo = \u00a77Warping to {0}.

View File

@@ -1,8 +1,7 @@
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
#Danish Translation by papand13, papand13@gmail.com
#Danish Translation Version: 1.0
# by: papand13, papand13@gmail.com
addedToAccount = \u00a7a{0} er tilf\u00f8jet til din konto.
addedToOthersAccount = \u00a7a{0} er blevet tilf\u00f8jet til {1} konto.
alertBroke = \u00f8delagde:
@@ -213,11 +212,11 @@ onlySunStorm = /weather only supports sun/storm.
parseError = Fejl ved parsing {0} p\u00e5 linje {1}
pendingTeleportCancelled = \u00a7cVentende teleportations anmodning aflyst.
permissionsError = Mangler Permissions/GroupManager; chat pr\u00e6fikser/suffikser vil v\u00e6re sl\u00e5et fra.
playerBanned = \u00a7cSpiller {0} bannet: {1}
playerBanned = \u00a7cPlayer {0} banned {1} for {2}
playerInJail = \u00a7cSpiller er allerede i f\u00e6ngsel {0}.
playerJailed = \u00a77Spiller {0} f\u00e6ngslet.
playerJailedFor = \u00a77Spiller {0} f\u00e6ngslet for {1}.
playerKicked = \u00a7cPlayer {0} kicked: {1}
playerKicked = \u00a7cPlayer {0} kicked {1} for {2}
playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerNeverOnServer = \u00a7cSpiller {0} var aldrig p\u00e5 denne server.
@@ -229,10 +228,24 @@ powerToolAir = Kommando kan ikke blive tildelt luft.
powerToolAttach = Kommando tildelt til {0}
powerToolRemove = Kommando fjernet fra {0}
protectionOwner = \u00a76[EssentialsProtect] Beskyttelses ejer: {0}
pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
pTimePlayers = These players have their own time:
pTimeReset = Player time has been reset for: \u00a7e{0}
pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
questionFormat = \u00a77[Sp\u00f8rgsm\u00e5l]\u00a7f {0}
reloadAllPlugins = \u00a77Genindl\u00e6ste alle tilf\u00f8jelser.
repair = You have successfully repaired your: \u00a7e{0}.
repairAlreadyFixed = \u00a77This item does not need repairing.
repairInvalidType = \u00a7cThis item cannot be repaired.
repairNone = There were no items that needing repairing.
requestAccepted = \u00a77Teleporterings anmodning n\u00e6gtet.
requestAcceptedFrom = \u00a77{0} accepted your teleport request.
requestDenied = \u00a77Teleporterings anmodning n\u00e6gtet.
requestDeniedFrom = \u00a77{0} denied your teleport request.
requestSent = \u00a77Anmodning sendt til {0}\u00a77.
returnPlayerToJailError = En fejl opstod ved fors\u00f8g p\u00e5 at returnere spiller til f\u00e6ngsel.
second = sekunde
@@ -240,6 +253,7 @@ seconds = sekunder
seenOffline = Spiller {0} er offline siden {1}
seenOnline = Spiller {0} er online siden {1}
serverFull = Server er fuld
setSpawner = Changed spawner type to {0}
sheepMalformedColor = Misdannet farve.
shoutFormat = \u00a77[R\u00e5b]\u00a7f {0}
similarWarpExist = En warp med lignende tekst eksisterer allerede.
@@ -251,6 +265,7 @@ suicideMessage = \u00a77Farvel grusomme verden...
suicideSuccess = \u00a77{0} tog sit eget liv
takenFromAccount = \u00a7c{0} er taget fra din konto.
takenFromOthersAccount = \u00a7c{0} er blevet taget fra {1} konto.
teleportAAll = \u00a77Teleporting request sent to all players...
teleportAll = \u00a77Teleportere alle spillere...
teleportAtoB = \u00a77{0}\u00a77 teleporterede dig til {1}\u00a77.
teleportDisabled = {0} har teleportation deaktiveret.
@@ -269,16 +284,20 @@ thunder = Du {0} torden i din verden
thunderDuration = Du {0} torden i din verden i {1} sekunder.
timeBeforeHeal = Tid inden n\u00e6ste helbredelse: {0}
timeBeforeTeleport = Tid f\u00f8r n\u00e6ste teleportering: {0}
timeFormat = \u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
timePattern = (?:([0-9]+)\\s*[a\u00e5y][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[wu][a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[ht][a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
timeSet = Tid er sat i alle verdener.
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}
tradeCompleted = \u00a77Forhandling fuldf\u00f8rt.
tradeSignEmpty = Forhandlings skiltet har ikke nok forsyning tilbage.
tradeSignEmptyOwner = There is nothing to collect from this trade sign.
treeFailure = \u00a7cTr\u00e6 genererings fejl. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord.
treeSpawned = \u00a77Tr\u00e6 fremkaldt.
typeTpaccept = \u00a77For at teleportere, skriv \u00a7c/tpaccept\u00a77.
typeTpdeny = \u00a77For at n\u00e6gte denne anmodning, skriv \u00a7c/tpdeny\u00a77.
typeWorldName = \u00a77Du kan ogs\u00e5 skrive nanvet p\u00e5 en specifik verden.
unableToSpawnMob = Kan ikke spawne mob.
unableToSpawnMob = Kunne ikke fremkalde mob.
unbannedIP = Tilgav IP addresse, ikke l\u00e6ngere bannet.
unbannedPlayer = Tilgav spiller, ikke l\u00e6ngere bannet.
@@ -306,6 +325,7 @@ voiceSilenced = \u00a77Din stemme er blevet d\u00e6mpet
warpDeleteError = Problem ved sletning af warp filen.
warpListPermission = \u00a7cDu har ikke tilladelse til at liste de warps.
warpNotExist = Den warp eksisterer ikke.
warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
warpSet = \u00a77Warp {0} sat.
warpUsePermission = \u00a7cDu har ikke tilladelse til at benytte den warp.
warpingTo = \u00a77Warper til {0}.

View File

@@ -1,11 +1,12 @@
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
# by:
addedToAccount = \u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt.
addedToOthersAccount = \u00a7a{0} muss {1} Konto hinzugef\u00fcgt.
addedToOthersAccount = \u00a7a{0} wurden zu {1}s Konto hinzugef\u00fcgt.
alertBroke = zerst\u00f6rt:
alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3}
alertPlaced = plaziert:
alertPlaced = platziert:
alertUsed = benutzt:
backAfterDeath = \u00a77Benutze den Befehl /back um zu deinem Todespunkt zur\u00fcck zu kehren.
backUsageMsg = \u00a77Kehre zur letzten Position zur\u00fcck.
@@ -19,12 +20,12 @@ bannedIpsFileError = Fehler beim Lesen von banned-ips.txt
bannedIpsFileNotFound = banned-ips.txt nicht gefunden
bannedPlayersFileError = Fehler beim Lesen von banned-players.txt
bannedPlayersFileNotFound = banned-players.txt nicht gefunden
bigTreeFailure = \u00a7cFehler beim Pflanzen von grossem Baum. Versuch es auf Gras oder Dreck.
bigTreeFailure = \u00a7cFehler beim Pflanzen eines grossen Baums. Versuch es auf Gras oder Dreck.
bigTreeSuccess = \u00a77Grosser Baum gepflanzt.
broadcast = [\u00a7cRundruf\u00a7f]\u00a7a {0}
buildAlert = \u00a7cDu hast keine Rechte zum Bauen.
bukkitFormatChanged = Bukkit-Versionsformat hat sich ge\u00e4ndert. Version nicht kontrolliert.
burnMsg = \u00a77Du hast {0} in Flammen gesetzt f\u00fcr {1} Sekunden.
burnMsg = \u00a77Du hast {0} f\u00fcr {1} Sekunden in Flammen gesetzt.
canTalkAgain = \u00a77Du kannst wieder sprechen.
cantFindGeoIpDB = Kann GeoIP-Datenbank nicht finden!
cantReadGeoIpDB = Fehler beim Einlesen der GeoIP-Datenbank!
@@ -33,7 +34,7 @@ commandFailed = Befehl {0} scheiterte:
commandHelpFailedForPlugin=Fehler beim Abrufen der Hilfe f\u00fcr: {0}
commandNotLoaded = \u00a7cBefehl {0} ist nicht richtig geladen.
compassBearing = \u00a77Peilung: {0} ({1} Grad).
configFileMoveError = Verschieben von config.yml zu einer Sicherheitskopie gescheitert.
configFileMoveError = Verschieben von config.yml in den Sicherheitskopien-Ordner gescheitert.
configFileRenameError = Verschieben einer tempor\u00e4ren Datei nach config.yml gescheitert.
connectedPlayers = Verbundene Spieler:
connectionFailed = Fehler beim Verbindungsaufbau.
@@ -59,9 +60,9 @@ depthBelowSea = \u00a77Du bist {0} Bl\u00f6cke unter Meeresh\u00f6he.
destinationNotSet = Ziel nicht gesetzt
disableUnlimited = \u00a77Deaktiviere unendliches Platzieren von {0} f\u00fcr {1}.
disabled = deaktiviert
dontMoveMessage = \u00a77Teleportierung startet in {0}. Beweg dich nicht.
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} and {1}
duplicatedUserdata = Doppelte Datei in userdata: {0} und {1}
emptyWorldName = /sethome: Weltname ist null oder leer.
enableUnlimited = \u00a77Gebe {1} unendliche Mengen von {0}.
enabled = aktiviert
@@ -201,13 +202,13 @@ none = keine
notAllowedToQuestion = \u00a7cDu bist nicht berechtigt zu fragen.
notAllowedToShout = \u00a7cDu bist nicht berechtigt zu schreien.
notEnoughMoney = Du hast nicht genug Geld.
notRecommendedBukkit = Die verwendete Bukkit-Version ist nicht empfohlen f\u00fcr Essentials.
notRecommendedBukkit = Die verwendete Bukkit-Version ist nicht f\u00fcr Essentials empfohlen.
notSupportedYet = Noch nicht verf\u00fcgbar.
now = jetzt
numberRequired = Ein Zahl wird ben\u00f6tigt.
onlyDayNight = /time unterst\u00fctzt nur day/night.
onlyDayNight = /time unterst\u00fctzt nur day und night.
onlyPlayers = Nur Spieler k\u00f6nnen {0} benutzen.
onlySunStorm = /weather unterst\u00fctzt nur sun/storm.
onlySunStorm = /weather unterst\u00fctzt nur sun und storm.
parseError = Fehler beim Parsen von {0} in Zeile {1}
pendingTeleportCancelled = \u00a7cLaufende Teleportierung abgebrochen.
permissionsError = Permissions/GroupManager fehlt; Chat-Prefixe/-Suffixe sind ausgeschaltet.
@@ -227,10 +228,24 @@ powerToolAir = Befehl kann nicht mit Luft verbunden werden.
powerToolAttach = Befehl verbunden mit {0}
powerToolRemove = Befehl entfernt von {0}
protectionOwner = \u00a76[EssentialsProtect] Besitzer dieses Blocks: {0}
pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
pTimePlayers = These players have their own time:
pTimeReset = Player time has been reset for: \u00a7e{0}
pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
questionFormat = \u00a77[Frage]\u00a7f {0}
reloadAllPlugins = \u00a77Alle plugins neu geladen.
repair = You have successfully repaired your: \u00a7e{0}.
repairAlreadyFixed = \u00a77This item does not need repairing.
repairInvalidType = \u00a7cThis item cannot be repaired.
repairNone = There were no items that needing repairing.
requestAccepted = \u00a77Teleportierungsanfrage akzeptiert.
requestAcceptedFrom = \u00a77{0} accepted your teleport request.
requestDenied = \u00a77Teleportierungsanfrage verweigert.
requestDeniedFrom = \u00a77{0} denied your teleport request.
requestSent = \u00a77Anfrage gesendet an {0}\u00a77.
returnPlayerToJailError = Fehler beim Versuch, den Spieler ins Gef\u00e4ngnis zu teleportieren.
second = Sekunde
@@ -238,6 +253,7 @@ seconds = Sekunden
seenOffline = Spieler {0} ist offline seit {1}
seenOnline = Spieler {0} ist online seit {1}
serverFull = Server ist voll
setSpawner = Changed spawner type to {0}
sheepMalformedColor = Ung\u00fcltige Farbe.
shoutFormat = \u00a77[Schrei]\u00a7f {0}
similarWarpExist = Ein Warp-Punkt mit einem \u00e4hnlichen Namen existiert bereits.
@@ -249,6 +265,7 @@ suicideMessage = \u00a77Lebewohl grausame Welt...
suicideSuccess = \u00a77{0} hat sich das Leben genommen.
takenFromAccount = \u00a7c{0} wurden aus deiner Geldb\u00f6rse genommen.
takenFromOthersAccount = \u00a7c{0} wurde von {1} wurde Rechnung getragen.
teleportAAll = \u00a77Teleporting request sent to all players...
teleportAll = \u00a77Teleportiere alle Spieler...
teleportAtoB = \u00a77{0}\u00a77 teleportiert dich zu {1}\u00a77.
teleportDisabled = {0} verweigert die Teleportierung.
@@ -263,21 +280,25 @@ teleporting = \u00a77Teleportiere...
teleportingPortal = \u00a77Teleportiere durch Portal.
tempBanned = Zeitlich gesperrt vom Server f\u00fcr {0}
tempbanExempt = \u00a77Du kannst diesen Spieler nicht zeitlich sperren.
thunder = Du hast Donner in deiner Welt {0}.
thunderDuration = Du hast Donner in deiner Welt {0} f\u00fcr {1} Sekunden.
thunder = Es donnert nun in deiner Welt {0}.
thunderDuration = Es donnert nun f\u00fcr {1} Sekunden in deiner Welt {0}.
timeBeforeHeal = Zeit bis zur n\u00e4chsten Heilung: {0}
timeBeforeTeleport = Zeit bis zum n\u00e4chsten 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*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[dt][a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:h|st)[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
timeSet = Zeit gesetzt in allen Welten.
timeSet = Zeit in allen Welten gesetzt.
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}
tradeCompleted = \u00a77Handel abgeschlossen.
tradeSignEmpty = Der Bestand des Trade-Schild ist aufgebraucht.
tradeSignEmptyOwner = There is nothing to collect from this trade sign.
treeFailure = \u00a7cBaumpflanzung gescheitert. Versuche es auf Gras oder Dreck.
treeSpawned = \u00a77Baum gepflanzt.
typeTpaccept = \u00a77Um zu teleportieren, schreibe \u00a7c/tpaccept\u00a77.
typeTpdeny = \u00a77Um diese Anfrage abzulehnen, schreibe \u00a7c/tpdeny\u00a77.
typeWorldName = \u00a77Du kannst auch den Namen der Welt eingeben.
unableToSpawnMob = Erzeugen von Monster gescheitert
unableToSpawnMob = Fehler beim Erzeugen von Monster.
unableToSpawnMob = Fehler beim Erzeugen eines Monster.
unbannedIP = Verbannung von IP-Adresse r\u00fcckg\u00e4ngig gemacht.
unbannedPlayer = Verbannung von Spieler r\u00fcckg\u00e4ngig gemacht.
unignorePlayer = Du ignorierst Spieler {0} nicht mehr.
@@ -304,13 +325,14 @@ voiceSilenced = \u00a77Du bist stumm
warpDeleteError = Fehler beim L\u00f6schen der Warp-Datei.
warpListPermission = \u00a7cDu hast keine Berechtigung, die Warp-Punkte anzuzeigen.
warpNotExist = Warp-Punkt existiert nicht.
warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
warpSet = \u00a77Warp-Punkt {0} wurde erstellt.
warpUsePermission = \u00a7cDu hast keinen Zugriff auf diesen Warp-Punkt.
warpUsePermission = \u00a7cDu hast keinen Zugriff f\u00fcr diesen Warp-Punkt.
warpingTo = \u00a77Teleportiere zu Warp-Punkt {0}.
weatherStorm = \u00a77Du hast das Wetter zu Sturm in deiner Welt ge\u00e4ndert.
weatherStormFor = \u00a77Du hast das Wetter zu Sturm f\u00fcr {0} Sekunden in deiner Welt ge\u00e4ndert.
weatherSun = \u00a77Du hast das Wetter zu Sonne in deiner Welt ge\u00e4ndert.
weatherSunFor = \u00a77Du hast das Wetter zu Sonne f\u00fcr {0} Sekunden in deiner Welt ge\u00e4ndert.
weatherStorm = \u00a77In deiner Welt st\u00fcrmt es nun.
weatherStormFor = \u00a77In deiner Welt st\u00fcrmt es nun f\u00fcr {0} Sekunden.
weatherSun = \u00a77In deiner Welt scheint nun die Sonne.
weatherSunFor = \u00a77In deiner Welt scheint nun f\u00fcr {0} Sekunden die Sonne.
whoisGeoLocation = \u00a79 - Herkunft: {0}
whoisHealth = \u00a79 - Gesundheit: {0}/20
whoisIPAddress = \u00a79 - IP-Adresse: {0}
@@ -326,4 +348,3 @@ year = Jahr
years = Jahre
youAreHealed = \u00a77Du wurdest geheilt.
youHaveNewMail = \u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen.
invalidCharge = \u00a7cUng\u00fcltige Verf\u00fcgung.

View File

@@ -1,6 +1,7 @@
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
# by:
addedToAccount = \u00a7a{0} has been added to your account.
addedToOthersAccount = \u00a7a{0} has been added to {1} account.
alertBroke = broke:
@@ -211,11 +212,11 @@ onlySunStorm = /weather only supports sun/storm.
parseError = Error parsing {0} on line {1}
pendingTeleportCancelled = \u00a7cPending teleportation request cancelled.
permissionsError = Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.
playerBanned = \u00a7cPlayer {0} banned: {1}
playerBanned = \u00a7cPlayer {0} banned {1} for {2}
playerInJail = \u00a7cPlayer is already in jail {0}.
playerJailed = \u00a77Player {0} jailed.
playerJailedFor = \u00a77Player {0} jailed for {1}.
playerKicked = \u00a7cPlayer {0} kicked: {1}
playerKicked = \u00a7cPlayer {0} kicked {1} for {2}
playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
@@ -227,10 +228,24 @@ powerToolAir = Command can''t be attached to air.
powerToolAttach = Command assigned to {0}
powerToolRemove = Command removed from {0}
protectionOwner = \u00a76[EssentialsProtect] Protection owner: {0}
pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
pTimePlayers = These players have their own time:
pTimeReset = Player time has been reset for: \u00a7e{0}
pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
questionFormat = \u00a77[Question]\u00a7f {0}
reloadAllPlugins = \u00a77Reloaded all plugins.
repair = You have successfully repaired your: \u00a7e{0}.
repairAlreadyFixed = \u00a77This item does not need repairing.
repairInvalidType = \u00a7cThis item cannot be repaired.
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
requestSent = \u00a77Request sent to {0}\u00a77.
returnPlayerToJailError = Error occured when trying to return player to jail.
second = second
@@ -238,6 +253,7 @@ seconds = seconds
seenOffline = Player {0} is offline since {1}
seenOnline = Player {0} is online since {1}
serverFull = Server is full
setSpawner = Changed spawner type to {0}
sheepMalformedColor = Malformed color.
shoutFormat = \u00a77[Shout]\u00a7f {0}
similarWarpExist = A warp with a similar name already exists.
@@ -249,10 +265,11 @@ suicideMessage = \u00a77Goodbye Cruel World...
suicideSuccess = \u00a77{0} took their own life
takenFromAccount = \u00a7c{0} has been taken from your account.
takenFromOthersAccount = \u00a7c{0} has been taken from {1} account.
teleportAAll = \u00a77Teleporting request sent to all players...
teleportAll = \u00a77Teleporting all players...
teleportAtoB = \u00a77{0}\u00a77 teleported you to {1}\u00a77.
teleportDisabled = {0} has teleportation disabled.
teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to him/her.
teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to them.
teleportNewPlayerError = Failed to teleport new player
teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
teleportTop = \u00a77Teleporting to top.
@@ -267,17 +284,21 @@ thunder = You {0} thunder in your world
thunderDuration = You {0} thunder in your world for {1} seconds.
timeBeforeHeal = Time before next heal: {0}
timeBeforeTeleport = Time before next teleport: {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 = 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}
tradeCompleted = \u00a77Trade completed.
tradeSignEmpty = The trade sign does not have enough supply left.
tradeSignEmptyOwner = There is nothing to collect from this trade sign.
treeFailure = \u00a7cTree generation failure. Try again on grass or dirt.
treeSpawned = \u00a77Tree spawned.
typeTpaccept = \u00a77To teleport, type \u00a7c/tpaccept\u00a77.
typeTpdeny = \u00a77To deny this request, type \u00a7c/tpdeny\u00a77.
typeWorldName = \u00a77You can also type the name of a specific world.
unableToSpawnMob = Unable to spawn mob.
unableToSpawnMob = Unable to spawn mob.
unbannedIP = Unbanned IP address.
unbannedPlayer = Unbanned player.
unignorePlayer = You are not ignoring player {0} anymore.
@@ -304,6 +325,7 @@ voiceSilenced = \u00a77Your voice has been silenced
warpDeleteError = Problem deleting the warp file.
warpListPermission = \u00a7cYou do not have Permission to list that warps.
warpNotExist = That warp does not exist.
warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
warpSet = \u00a77Warp {0} set.
warpUsePermission = \u00a7cYou do not have Permission to use that warp.
warpingTo = \u00a77Warping to {0}.

View File

@@ -1,6 +1,7 @@
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
# by:
addedToAccount = \u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 a votre compte.
addedToOthersAccount = \u00a7a{0} a \u00e9t\u00e9 ajout\u00e9 \u00e0 {1} compte.
alertBroke = a cass\u00e9:
@@ -211,11 +212,11 @@ onlySunStorm = /weather only supports sun/storm.
parseError = Erreur de conversion {0} \u00e0 la ligne {1}
pendingTeleportCancelled = \u00a7cRequete de t\u00e9l\u00e9portation annul\u00e9e.
permissionsError = Permissions/GroupManager manquant, les pr\u00e9fixes et suffixes ne seront pas affich\u00e9s.
playerBanned = \u00a7cLe joueur {0} a \u00e9t\u00e9 banni: {1}
playerBanned = \u00a7cPlayer {0} banned {1} for {2}
playerInJail = \u00a7cLe joueur est d\u00e9j\u00e0 dans la prison {0}.
playerJailed = \u00a77Le joueur {0} a \u00e9t\u00e9 emprisonn\u00e9.
playerJailedFor = \u00a77{0} a \u00e9t\u00e9 emprisonn\u00e9 pour {1}.
playerKicked = \u00a7cPlayer {0} kicked: {1}
playerKicked = \u00a7cPlayer {0} kicked {1} for {2}
playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerNeverOnServer = \u00a7cLe joueur {0} n''a jamais \u00e9t\u00e9 sur le serveur.
@@ -227,10 +228,24 @@ powerToolAir = La commande ne peut pas \u00eatre attach\u00e9e \u00e0 l''air.
powerToolAttach = Commande assign\u00e9e \u00e0 {0}
powerToolRemove = Commande enlev\u00e9e \u00e0 {0}
protectionOwner = \u00a76[EssentialsProtect] Propri\u00e9taire de la protection : {0}
pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
pTimePlayers = These players have their own time:
pTimeReset = Player time has been reset for: \u00a7e{0}
pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
questionFormat = \u00a77[Question]\u00a7f {0}
reloadAllPlugins = \u00a77Tous les plugins ont \u00e9t\u00e9 recharg\u00e9s.
repair = You have successfully repaired your: \u00a7e{0}.
repairAlreadyFixed = \u00a77This item does not need repairing.
repairInvalidType = \u00a7cThis item cannot be repaired.
repairNone = There were no items that needing repairing.
requestAccepted = \u00a77Demande de t\u00e9l\u00e9portation accept\u00e9e.
requestAcceptedFrom = \u00a77{0} accepted your teleport request.
requestDenied = \u00a77Demande de t\u00e9l\u00e9portation refus\u00e9e.
requestDeniedFrom = \u00a77{0} denied your teleport request.
requestSent = \u00a77Requ\u00eate envoy\u00e9e \u00e0 {0}\u00a77.
returnPlayerToJailError = Erreur survenue lors de la tentative d''emprisonner de nouveau un joueur.
second = seconde
@@ -238,6 +253,7 @@ seconds = secondes
seenOffline = Le joueur {0} est hors ligne depuis {1}
seenOnline = Le joueur {0} est en ligne depuis {1}
serverFull = Le serveur est plein.
setSpawner = Changed spawner type to {0}
sheepMalformedColor = Couleur mal form\u00e9e.
shoutFormat = \u00a77[Crie]\u00a7f {0}
similarWarpExist = Un warp avec un nom similaire existe d\u00e9j\u00e0.
@@ -249,6 +265,7 @@ suicideMessage = \u00a77Au revoir monde cruel...
suicideSuccess = \u00a77{0} a pris sa propre vie.
takenFromAccount = \u00a7c{0} ont \u00e9t\u00e9 pris de votre compte.
takenFromOthersAccount = \u00a7c{0} a \u00e9t\u00e9 prise de {1} compte.
teleportAAll = \u00a77Teleporting request sent to all players...
teleportAll = \u00a77T\u00e9l\u00e9poration de tous les joueurs.
teleportAtoB = \u00a77{0}\u00a77 vous a t\u00e9l\u00e9port\u00e9 \u00e0 {1}\u00a77.
teleportDisabled = {0} a la t\u00e9l\u00e9portation d\u00e9sactiv\u00e9.
@@ -267,10 +284,15 @@ thunder = Vous avez {0} la foudre dans votre monde.
thunderDuration = Vous avez {0} la foudre dans le serveur {1} secondes.
timeBeforeHeal = Temps avant le prochain soin : {0}
timeBeforeTeleport = Temps avant prochaine t\u00e9l\u00e9portation {0}
timeFormat = \u00a73{0}\u00a7f or \u00a73{1}\u00a7f or \u00a73{2}\u00a7f
timePattern = (?:([0-9]+)\\\\s*[ya][a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*mo[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*(?:sem|w)[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*[dj][a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*h[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*m[a-z]*[,\\\\s]*)?(?:([0-9]+)\\\\s*(?:s[a-z]*)?)?
timeSet = Heure modifi\u00e9e dans tous les mondes.
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}
tradeCompleted = \u00a77\u00c9change termin\u00e9.
tradeSignEmpty = Le panneau de vente n''as pas encore assez de stock.
tradeSignEmptyOwner = There is nothing to collect from this trade sign.
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.
typeTpaccept = \u00a77Pour le t\u00e9l\u00e9porter, tapez \u00a7c/tpaccept\u00a77.
@@ -303,6 +325,7 @@ voiceSilenced = \u00a77Votre voix a \u00e9t\u00e9 r\u00e9duite au silence
warpDeleteError = Probl\u00e8me concernant la suppression du fichier warp.
warpListPermission = \u00a7cVous n''avez pas la permission d''afficher la liste des warps.
warpNotExist = Ce warp n''existe pas.
warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
warpSet = \u00a77Le warp {0} a \u00e9t\u00e9 cr\u00e9\u00e9.
warpUsePermission = \u00a7cVous n''avez pas la permission d''utiliser ce warp.
warpingTo = \u00a77T\u00e9l\u00e9portation au warp {0}.

View File

@@ -1,31 +1,31 @@
#version: TeamCity
# Single quotes have to be doubled: ''
# Translations start here
# by Geertje123
addedToAccount = \u00a7a{0} is aan je bankrekening toegevoegd.
addedToOthersAccount = \u00a7a{0} is toegevoegd aan {1} rekening
# by: Geertje123
addedToAccount = \u00a7a{0} is gestort op je account.
addedToOthersAccount = \u00a7a{0} is overgemaakt naar {1}''s rekening
alertBroke = gebroken:
alertFormat = \u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3}
alertPlaced = geplaatst:
alertUsed = gebruikt:
backAfterDeath = \u00a77Gebruik de /back command om terug te keren naar het punt waar je dood ging.
backUsageMsg = \u00a77Bezig met terugkeren naar vorige locatie.
backAfterDeath = \u00a77Gebruik het /back command om terug te keren naar je sterfplaats.
backUsageMsg = \u00a77Naar de vorige locatie aan het gaan.
backupFinished = Backup voltooid
backupStarted = Backup wordt nu gemaakt
backupStarted = Backup gestart
balance = \u00a77Saldo: {0}
balanceTop = \u00a77 Top {0} saldi
banIpAddress = \u00a77Verboden IP-adres
banExempt = \u00a77Je kunt niet verbieden die speler.
banIpAddress = \u00a77Verbannen IP-adres
banExempt = \u00a77Je kunt deze speler niet verbannen.
bannedIpsFileError = Fout bij het lezen van banned-ips.txt
bannedIpsFileNotFound = banned-ips.txt werd niet gevonden
bannedPlayersFileError = Fout bij het lezen van banned-players.txt
bannedPlayersFileNotFound = banned-players.txt werd niet gevonden
bigTreeFailure = \u00a7cCre\u00ebren van grote boom fout gegaan. Probeer het opnieuw op gras of dirt.
bigTreeSuccess = \u00a77Grote boom gespawnd.
bigTreeFailure = \u00a7cMaken van een grote boom is mislukt. Probeer het opnieuw op gras of dirt.
bigTreeSuccess = \u00a77Grote boom gemaakt.
broadcast = [\u00a7cBroadcast\u00a7f]\u00a7a {0}
buildAlert = \u00a7cJe bent niet bevoegd om te bouwen
bukkitFormatChanged = Bukkit versie formaat veranderd. Versie niet nagekeken.
burnMsg = \u00a77Je hebt voor {1} seconden {0} in de fik gezet.
burnMsg = \u00a77Je hebt {0} voor {1} seconde(n) in de fik gezet.
canTalkAgain = \u00a77Je kan weer praten.
cantFindGeoIpDB = De GeoIP database kon niet gevonden worden!
cantReadGeoIpDB = Fout bij het lezen van de GeoIP database!
@@ -36,13 +36,13 @@ commandNotLoaded = \u00a7cOpdracht {0} is fout geladen.
compassBearing = \u00a77Ligging: {0} ({1} graden).
configFileMoveError = Het verplaatsen van config.yml naar de backup locatie is mislukt.
configFileRenameError = Fout bij het hernoemen van de tijdelijke map naar config.yml
connectedPlayers = Verbonden spelers:
connectedPlayers = Spelers online:
connectionFailed = Fout bij het verbinden.
cooldownWithMessage = \u00a7cAfkoeltijd: {0}
corruptNodeInConfig = \u00a74Waarschuwing: Het configuratie bestand bevat een fout {0}.
couldNotFindTemplate = Het sjabloon kon niet gevonden worden {0}
creatingConfigFromTemplate = Bezig met aanmaken van config vanaf sjabloon: {0}
creatingEmptyConfig = Bezig met lege config aanmaken: {0}
corruptNodeInConfig = \u00a74Waarschuwing: Het configuratiebestand bevat een fout {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}
creatingPortal = Bezig met cre\u00ebren van portal bij {0},{1},{2}.
day = dag
days = dagen
@@ -50,10 +50,10 @@ defaultBanReason = De Ban Hamer heeft gesproken!
deleteFileError = Het bestand kon niet verwijderd worden: {0}
deleteJail = \u00a77Gevangenis {0} is verwijderd.
deleteWarp = \u00a77Warp {0} is verwijderd.
deniedAccessCommand = {0} werd de toegang geweigerd tot de opdracht.
dependancyDownloaded = [Essentials] Dependancy {0} downloaded successfully.
dependancyException = [Essentials] An error occured when trying to download a dependacy
dependancyNotFound = [Essentials] A required dependancy was not found, downloading now.
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
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.
@@ -62,15 +62,15 @@ disableUnlimited = \u00a77Oneindig plaatsen van {0} uitgeschakeld voor {1}.
disabled = uitgeschakeld
dontMoveMessage = \u00a77Beginnen met teleporteren in {0}. Niet bewegen.
downloadingGeoIp = Bezig met downloaden van GeoIP database ... Dit kan een tijdje duren (country: 0.6 MB, city: 20MB)
duplicatedUserdata = Verdubbelde userdata: {0} en {1}.
duplicatedUserdata = Dubbele userdata: {0} en {1}.
emptyWorldName = Set Home: Naam van wereld is leeg.
enableUnlimited = \u00a77Oneindig van {0} gegeven aan {1}.
enableUnlimited = \u00a77Oneindig aantal {0} aan {1} gegeven.
enabled = ingeschakeld
errorCallingCommand = Fout bij het aanroepen van de opdracht /{0}
errorWithMessage = \u00a7cFout: {0}
essentialsReload = \u00a77Essentials herlaadde {0}
extinguish = \u00a77Je hebt jezelf uitgeblust.
extinguishOthers = \u00a77Je hebt {0} uitgeblust.
essentialsReload = \u00a77Essentials is herladen {0}
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}
@@ -79,9 +79,9 @@ foreverAlone = \u00a7cJe hebt niemand waarnaar je kan reageren.
freedMemory = {0} MB gelost.
gcchunks = chunks,
gcentities = entities
gcfree = Free memory: {0} MB
gcfree = Vrij geheugen: {0} MB
gcmax = Maximaal geheugen: {0} MB
gctotal = Allocated memory: {0} MB
gctotal = Gealloceerd geheugen: {0} MB
generatingPortal = \u00a77Uitgangs portal aan het cre\u00ebren.
geoIpUrlEmpty = GeoIP download url is leeg.
geoIpUrlInvalid = GeoIP download url is ongeldig.
@@ -90,9 +90,9 @@ godDisabledFor = uitgeschakeld voor {0}
godEnabledFor = ingeschakeld voor {0}
godMode = \u00a77God mode {0}.
haveBeenReleased = \u00a77Je bent bevrijdt
heal = \u00a77Je bent gehealed.
healOther = \u00a77Je healde {0}.
helpConsole = type ?, Om help vanaf de console te bekijken.
heal = \u00a77Je bent genezen.
healOther = \u00a77Je geneezde {0}.
helpConsole = type ? om de consolehelp weer te geven.
helpOp = \u00a7c[HelpOp]\u00a7f \u00a77{0}:\u00a7f {1}
helpPages = Pagina \u00a7c{0}\u00a7f van de \u00a7c{1}\u00a7f:
holeInFloor = Gat in de vloer
@@ -127,14 +127,14 @@ itemNotEnough3 = \u00a77/sell itemname -1 zorgt ervoor dat ze allemaal behalve 1
itemSellAir = Je wilde serieus lucht verkopen? Plaats een voorwerp in je hand.
itemSold = \u00a77Verkocht voor \u00a7c {0} \u00a77 ({1} voorwerpen voor {2} per stuk)
itemSoldConsole = {0} verkocht {1} voor \u00a77 {2} \u00a77 ({3} voorwerpen voor {4} per stuk)
itemSpawn = \u00a77Geven van {0} van de {1}
itemSpawn = \u00a77Geeft {0} {1}
itemsCsvNotLoaded = De item kunnen niet geladen worden.csv.
jailMessage = \u00a7cYou do the crime, you do the time.
jailNotExist = Die gevangenis bestaat niet.
jailSet = \u00a77Gevangenis {0} is ingesteld
jumpError = Dat zou je computers hersenen beschadigen.
kickDefault = Gekicked van de server
kickExempt = \u00a77Je kunt niet schoppen die speler.
kickExempt = \u00a77Je kunt die speler niet schoppen.
kill = \u00a77Jij doodde {0}.
kitError = \u00a7cEr zijn geen geldige kits.
kitError2 = \u00a7cDie kit bestaat niet of is verkeerde beschreven.
@@ -168,9 +168,9 @@ moneySentTo = \u00a7a{0} is verzonden naar {1}
moneyTaken = {0} van je bankrekening afgehaald.
month = maand
months = maanden
moreThanZero = Aantal moet groter zijn dan 0.
moreThanZero = Het aantal moet groter zijn dan 0.
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
muteExempt = \u00a7cYou may not mute that player.
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.
@@ -195,7 +195,7 @@ noMailSendPerm = \u00a7cJe hebt de \u00a7fessentials.mail.send\u00a7c toestemmin
noMotd = \u00a7cEr is geen bericht van de dag.
noNewMail = \u00a77Je hebt geen nieuwe berichten.
noPendingRequest = Je hebt geen aanvragen.
noPlacePermission = \u00a7cYou do not have permission to place a block near that sign.
noPlacePermission = \u00a7cJe hebt geen toestemming om een blok naast die sign te plaatsen.
noRules = \u00a7cEr zijn nog geen regels gegeven.
noWarpsDefined = Geen warps gedefinieerd
none = geen
@@ -206,32 +206,46 @@ notRecommendedBukkit = De Bukkit versie is niet de aangeraden build voor Essenti
notSupportedYet = Nog niet ondersteund.
now = nu
numberRequired = Er moet daar een nummer, grapjas.
onlyDayNight = /time oondersteund alleen day/night.
onlyDayNight = /time ondersteund alleen day/night.
onlyPlayers = Alleen in-game spelers kunnen {0} gebruiken.
onlySunStorm = /weather only supports sun/storm.
parseError = Fout bij ontleding {0} op regel {1}
pendingTeleportCancelled = \u00a7cAangevraagde teleportatie afgelast.
permissionsError = Vermisde Permissions/GroupManager; chat prefixes/suffixes worden uitgeschakeld.
playerBanned = \u00a7cSpeler {0} is geband: {1}
permissionsError = Permissions/GroupManager ontbreekt; chat prefixes/suffixes worden uitgeschakeld.
playerBanned = \u00a7cPlayer {0} banned {1} for {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}
playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerKicked = \u00a7cPlayer {0} kicked {1} for {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 = \u00a77You have been unmuted
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 de lucht.
powerToolAir = Command kan niet worden bevestigd aan lucht.
powerToolAttach = Command toegewezen aan {0}
powerToolRemove = Command verwijderd van {0}
protectionOwner = \u00a76[EssentialsProtect] Bescherming eigenaar: {0}
questionFormat = \u00a77[Question]\u00a7f {0}
protectionOwner = \u00a76[EssentialsProtect] Beschermingeigenaar: {0}
pTimeCurrent = \u00a7e{0}''s\u00a7f time is {1}.
pTimeCurrentFixed = \u00a7e{0}''s\u00a7f time is fixed to {1}.
pTimeNormal = \u00a7e{0}''s\u00a7f time is normal and matches the server.
pTimeOthersPermission = \u00a7cYou are not authorized to set other players'' time.
pTimePlayers = These players have their own time:
pTimeReset = Player time has been reset for: \u00a7e{0}
pTimeSet = Player time is set to \u00a73{0}\u00a7f for: \u00a7e{1}
pTimeSetFixed = Player time is fixed to \u00a73{0}\u00a7f for: \u00a7e{1}
questionFormat = \u00a77[Vraag]\u00a7f {0}
reloadAllPlugins = \u00a77Alle plugins zijn herladen.
repair = You have successfully repaired your: \u00a7e{0}.
repairAlreadyFixed = \u00a77This item does not need repairing.
repairInvalidType = \u00a7cThis item cannot be repaired.
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.
returnPlayerToJailError = Fout opgetreden bij terugzetten van speler in gevangenis.
second = seconde
@@ -239,6 +253,7 @@ seconds = seconde
seenOffline = Speler {0} is offline vanaf {1}
seenOnline = Speler {0} is online vanaf {1}
serverFull = Server is vol
setSpawner = Changed spawner type to {0}
sheepMalformedColor = Misvoormde kleur.
shoutFormat = \u00a77[Shout]\u00a7f {0}
similarWarpExist = Er bestaat al een warp met dezelfde naam.
@@ -250,6 +265,7 @@ suicideMessage = \u00a77Vaarwel vreedzame wereld...
suicideSuccess = \u00a77{0} pleegde zelfmoord
takenFromAccount = \u00a7c{0} is van je bank rekening afgehaald.
takenFromOthersAccount = \u00a7c{0} is overgenomen uit {1} account.
teleportAAll = \u00a77Teleporting request sent to all players...
teleportAll = \u00a77Bezig met teleporteren van alle spelers...
teleportAtoB = \u00a77{0}\u00a77 is naar {1}\u00a77 geteleporteerd.
teleportDisabled = {0} heeft teleporteren uit gezet.
@@ -263,31 +279,35 @@ teleportationEnabled = \u00a77Teleportatie ingeschakeld.
teleporting = \u00a77Bezig met teleporteren...
teleportingPortal = \u00a77Bezig met teleporteren via de portal.
tempBanned = Tijdelijk geband voor {0}
tempbanExempt = \u00a77You may not tempban that player
tempbanExempt = \u00a77Je mag deze speler niet een tempban geven
thunder = Je {0} onweert de wereld
thunderDuration = Je {0} onweert de wereld voor {1} seconde.
timeBeforeHeal = Afkoeltijd tot de volgende heal: {0}
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}
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.
typeTpaccept = \u00a77Om te teleporten, type \u00a7c/tpaccept\u00a77.
typeTpdeny = \u00a77Om te weigeren, type \u00a7c/tpdeny\u00a77.
typeWorldName = \u00a77Je kan ook de exacte naam van de wereld typen.
unableToSpawnMob = De mob kan niet gespawned worden.
unableToSpawnMob = Mob kon niet gespawnd worden.
unbannedIP = IP adres unbanned.
unbannedPlayer = Speler unbanned.
unbannedIP = IP adres ontbannen.
unbannedPlayer = Speler ontbannen.
unignorePlayer = Je negeert {0} niet meer.
unknownItemId = Onbekend voorwerp id: {0}
unknownItemInList = Onbekend voorwerp {0} in {1} lijst.
unknownItemName = Onbekende voorwerp naam: {0}
unlimitedItemPermission = \u00a7cOnbevoegd om oneindig {0} te hebben.
unlimitedItems = Oneindige voorwerpen:
unmutedPlayer = Speler {0} ge-unmute.
unmutedPlayer = Speler {0} mag weer spreken.
upgradingFilesError = Fout tijdens het upgraden van de bestanden
userCreatedPortal = {0} gebruikte een portal en maakte een uitgangs portal.
userDoesNotExist = Speler {0} bestaat niet.
@@ -305,6 +325,7 @@ voiceSilenced = \u00a77Je kan niet meer praten
warpDeleteError = Fout bij het verwijderen van het warp bestand.
warpListPermission = \u00a7cJe hebt geen toegang om die warp te maken.
warpNotExist = Die warp bestaat niet.
warpsCount = \u00a77There are {0} warps. Showing page {1} of {2}.
warpSet = \u00a77Warp {0} ingesteld.
warpUsePermission = \u00a7cOnbevoegd om die warp te gebruiken.
warpingTo = \u00a77Aan het warpen naar {0}.
@@ -325,5 +346,5 @@ worthMeta = \u00a77Stapel {0} met een metadata van {1} met waarde \u00a7c{2}\u00
worthSet = Waarde ingesteld
year = jaar
years = jaren
youAreHealed = \u00a77Je bent gehealed.
youAreHealed = \u00a77Je bent genezen.
youHaveNewMail = \u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7f om je berichten te bekijken.

View File

@@ -1,353 +1,368 @@
# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.)
name: Essentials
main: com.earth2me.essentials.Essentials
# 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 an essential, core set of commands for Bukkit.
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology]
commands:
afk:
description: Marks you as away-from-keyboard.
usage: /<command>
aliases: [eafk]
antioch:
description: 'A little surprise for operators.'
usage: /<command>
aliases: [eantioch]
back:
description: Teleports you to your location prior to tp/spawn/warp.
usage: /<command>
aliases: [eback]
backup:
description: Runs the backup command
usage: /<command>
aliases: [ebackup]
balance:
description: States the current balance of a player.
usage: /<command> <player>
aliases: [bal,emoney,ebalance,ebal]
balancetop:
description: Gets the top x balance values. (max 10)
usage: /<command> <max>
aliases: [baltop,ebaltop,ebalancetop]
ban:
description: Bans a player.
usage: /<command> [player] <reason>
aliases: [eban]
banip:
description: Bans an IP address.
usage: /<command> [address]
aliases: [ebanip]
broadcast:
description: Broadcasts a message to the entire server.
usage: /<command> [msg]
aliases: [ebroadcast,bcast]
bigtree:
description: Spawn a big tree where you are looking.
usage: /<command> [tree|redwood]
aliases: [ebigtree]
burn:
description: Set a player on fire.
usage: /<command> [player] [seconds]
aliases: [eburn]
clearinventory:
description: Clear all items in your inventory.
usage: /<command>
aliases: [ci,eci,eclearinventory]
compass:
description: Describes your current bearing.
usage: /<command>
aliases: [ecompass]
deljail:
description: Removes a jail
usage: /<command> [jailname]
aliases: [edeljail]
delwarp:
description: Deletes the specified warp.
usage: /<command> [warp]
aliases: [edelwarp,remwarp,rmwarp]
depth:
description: States current depth, relative to sea level.
usage: /depth
aliases: [edepth]
eco:
description: Manages the server economy.
usage: /<command> [give|take|reset] [player] [amount]
aliases: economy
essentials:
description: Reloads essentials.
usage: /<command>
ext:
description: Extinguish players.
usage: /<command> <player>
aliases: [extinguish,eext,eextinguish]
fireball:
description: Throw a fireball.
usage: /<command>
aliases: [efireball]
getpos:
description: Get your current coordinates.
usage: /<command>
aliases: [coords,egetpos]
gc:
description: Reports garbage collection info; useful to developers.
usage: /<command>
aliases: [mem,memory,egc]
give:
description: Give a player an item.
usage: /<command> [player] [item|numeric] <amount>
aliases: [egive]
god:
description: Enables your godly powers.
usage: /<command>
aliases: [tgm,godmode,egod]
heal:
description: Heals you or the given player.
usage: /<command> <player>
aliases: [eheal]
help:
description: Views a list of available commands.
usage: /<command> [search term] [page]
aliases: [ehelp]
helpop:
description: Request help from online operators.
usage: /<command> [message]
home:
description: Teleport to your home.
usage: /<command> <player>
aliases: [ehome]
ignore:
description: Ignore other players.
usage: /<command> <player>
aliases: [eignore]
info:
description: Shows information set by the server owner
usage: /<command> [chapter] [page]
aliases: [ifo,einfo,eabout,news]
invsee:
description: See the inventory of other players.
usage: /<command> <player>
aliases: [einvsee]
item:
description: Spawn an item.
usage: /<command> [item|numeric] <amount>
aliases: [i,eitem]
jails:
description: List all jails.
usage: /<command>
aliases: [ejails]
jump:
description: Jumps to the nearest block in the line of sight.
usage: /<command>
aliases: [j,ejump]
kick:
description: Kicks a specified player with a reason.
usage: /<command> <player> <reason>
aliases: [ekick]
kickall:
description: Kicks all players off the server except the issuer.
usage: /<command> <reason>
aliases: [ekickall]
kit:
description: Obtains the specified kit or views all available kits.
usage: /<command> <kit>
kill:
description: Kills specified player.
usage: /<command> <player>
aliases: [ekill]
list:
description: List all online players.
usage: /<command>
aliases: [playerlist,who,online,elist]
lightning:
description: The power of Thor. Strike at cursor or player.
usage: /<command> [player]
aliases: [strike,elightning,estrike]
mail:
description: Manages inter-player, intra-server mail.
usage: /<command> [read|clear|send [to] [message]]
aliases: [email]
me:
description: Describes an action in the context of the player.
usage: /<command> [description]
aliases: [eme]
motd:
description: Views the Message Of The Day.
usage: /<command>
aliases: [emotd]
msg:
description: Sends a private message to the specified player.
usage: /<command> <to> <message>
aliases: [m,t,emsg,tell]
mute:
description: Mutes or unmutes a player.
usage: /<command> [player] <datediff>
aliases: [emute]
nick:
description: Change your nickname or that of another player.
usage: /<command> <player> [nickname|off]
aliases: [enick]
nuke:
description: May death rain upon them.
usage: /<command> <player>
aliases: [enuke]
pay:
description: Pays another player from your balance
usage: /<command> [player] [amount]
aliases: [epay]
ping:
description: Pong!
usage: /<command>
aliases: [pong,eping]
powertool:
description: Assigns a command to the item in hand, {player} will be replaced by the name of the player that you click.
usage: /<command> [command] <arguments>
aliases: [pt,epowertool,ept]
r:
description: Quickly reply to the last player to message you.
usage: /<command> [message]
aliases: [er,reply,ereply]
realname:
description: Displays the username of a user based on nickname.
usage: /<command> [nickname]
aliases: [erealname]
reloadall:
description: Reloads all plugins.
usage: /<command>
aliases: [rel,ereloadall,ereload,erel]
rules:
description: Views the server rules.
usage: /<command>
aliases: [erules]
seen:
description: Shows the last logout time of a player
usage: /<command> [playername]
aliases: [eseen]
sell:
description: Sells the item currently in your hand.
usage: /<command> [itemname|id|hand|inventory|blocks] [-][amount]
aliases: [esell]
sethome:
description: Set your home to your current location.
usage: /<command>
aliases: [esethome]
setjail:
description: Creates a jail where you specified named [jailname]
usage: /<command> [jailname]
aliases: [esetjail]
setwarp:
description: Creates a new warp.
usage: /<command> [warp]
aliases: [createwarp,esetwarp]
setworth:
description: Set the sell value of an item.
usage: /<command> [itemname|id] [price]
aliases: [esetworth]
socialspy:
description: Toggles if you can see msg/mail commands in chat.
usage: /<command>
aliases: [esocialspy]
spawner:
description: Change the mob type of a spawner
usage: /<command> [mob]
aliases: [espawner]
spawnmob:
description: Spawns a mob.
usage: /<command> [mob]<:data><,mount<:data>> <amount>
aliases: [espawnmob]
suicide:
description: Causes you to perish.
usage: /<command>
aliases: [esuicide]
tempban:
description: Temporary ban a user.
usage: /<command> [playername] [datediff]
aliases: [etempban]
thunder:
description: Enable/disable thunder.
usage: /<command> <true/false> [duration]
aliases: [ethunder]
time:
description: Change the time to day or night of the player (default) or world (essentials.time.world permission).
usage: /<command> [day|night|reset] <playername>
aliases: [etime]
togglejail:
description: Prevents a player from interacting with the world and teleports him/her to the the jail specified
usage: /<command> [player] [jailname] <datediff>
aliases: [tjail,etogglejail]
top:
description: Teleport to the highest block at your current position.
usage: /<command>
aliases: [etop]
tp:
description: Teleport to a player.
usage: /<command> [player]
aliases: [etp]
tpa:
description: Request to teleport to the specified player.
usage: /<command> <player>
tpaccept:
description: Accepts a teleport request.
usage: /<command>
tpahere:
description: Request that the specified player teleport to you.
usage: /<command> <player>
tpall:
description: Teleport all online players to another player.
usage: /<command> <player>
tpdeny:
description: Reject a teleport request.
usage: /<command>
tphere:
description: Teleport a player to you.
usage: /<command> [player]
aliases: [s]
tpo:
description: Teleport override for tptoggle.
usage: /<command> <player>
tpohere:
description: Teleport here override for tptoggle.
usage: /<command> <player>
tppos:
description: Teleport to coordinates.
usage: /<command> <x> <y> <z>
tptoggle:
description: Blocks all forms of teleportation.
usage: /<command>
tree:
description: Spawn a tree where you are looking.
usage: /<command> [tree|birch|redwood]
aliases: [etree]
unban:
description: Unbans the specified player.
usage: /<command> [player]
aliases: [pardon,eunban]
unbanip:
description: Unbans the specified IP address.
usage: /<command> [address]
aliases: [eunbanip,pardonip]
unlimited:
description: Allows the unlimited placing of items.
usage: /<command> [list|item] <player>
aliases: [eunlimited]
warp:
description: List all warps or warp to the specified location.
usage: /<command> <warp> <player>
aliases: [ewarp]
weather:
description: Setting the weather.
usage: /<command> <storm/sun> [duration]
aliases: [sky,sun,storm,eweather]
whois:
description: Determine the username behind a nickname.
usage: /<command> [nickname]
aliases: [ewhois]
world:
description: Switch between worlds.
usage: /<command> [world]
aliases: [eworld]
worth:
description: Calculates the worth of items in hand or as specified.
usage: /<command> <item> <amount>
# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.)
name: Essentials
main: com.earth2me.essentials.Essentials
# 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 an essential, core set of commands for Bukkit.
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits]
commands:
afk:
description: Marks you as away-from-keyboard.
usage: /<command>
aliases: [eafk]
antioch:
description: 'A little surprise for operators.'
usage: /<command>
aliases: [eantioch]
back:
description: Teleports you to your location prior to tp/spawn/warp.
usage: /<command>
aliases: [eback]
backup:
description: Runs the backup if configured.
usage: /<command>
aliases: [ebackup]
balance:
description: States the current balance of a player.
usage: /<command> <player>
aliases: [bal,emoney,ebalance,ebal]
balancetop:
description: Gets the top x balance values. (max 10)
usage: /<command> <max>
aliases: [baltop,ebaltop,ebalancetop]
ban:
description: Bans a player.
usage: /<command> [player] <reason>
aliases: [eban]
banip:
description: Bans an IP address.
usage: /<command> [address]
aliases: [ebanip]
broadcast:
description: Broadcasts a message to the entire server.
usage: /<command> [msg]
aliases: [ebroadcast,bcast,ebcast]
bigtree:
description: Spawn a big tree where you are looking.
usage: /<command> [tree|redwood]
aliases: [ebigtree]
burn:
description: Set a player on fire.
usage: /<command> [player] [seconds]
aliases: [eburn]
clearinventory:
description: Clear all items in your inventory.
usage: /<command>
aliases: [ci,eci,eclearinventory]
compass:
description: Describes your current bearing.
usage: /<command>
aliases: [ecompass]
deljail:
description: Removes a jail
usage: /<command> [jailname]
aliases: [edeljail]
delwarp:
description: Deletes the specified warp.
usage: /<command> [warp]
aliases: [edelwarp,remwarp,rmwarp,eremwarp,ermwarp]
depth:
description: States current depth, relative to sea level.
usage: /depth
aliases: [edepth]
eco:
description: Manages the server economy.
usage: /<command> [give|take|reset] [player] [amount]
aliases: [economy,emoney]
essentials:
description: Reloads essentials.
usage: /<command>
ext:
description: Extinguish players.
usage: /<command> <player>
aliases: [extinguish,eext,eextinguish]
fireball:
description: Throw a fireball.
usage: /<command>
aliases: [efireball]
getpos:
description: Get your current coordinates.
usage: /<command>
aliases: [coords,egetpos]
gc:
description: Reports garbage collection info; useful to developers.
usage: /<command>
aliases: [mem,memory,egc,emem,ememory]
give:
description: Give a player an item.
usage: /<command> [player] [item|numeric] <amount>
aliases: [egive]
god:
description: Enables your godly powers.
usage: /<command>
aliases: [tgm,godmode,egod,egodmode,etgm]
heal:
description: Heals you or the given player.
usage: /<command> <player>
aliases: [eheal]
help:
description: Views a list of available commands.
usage: /<command> [search term] [page]
aliases: [ehelp]
helpop:
description: Request help from online operators.
usage: /<command> [message]
aliases: [ehelpop]
home:
description: Teleport to your home.
usage: /<command> <player>
aliases: [ehome]
ignore:
description: Ignore other players.
usage: /<command> <player>
aliases: [eignore]
info:
description: Shows information set by the server owner
usage: /<command> [chapter] [page]
aliases: [ifo,einfo,eabout,news,enews,eifo]
invsee:
description: See the inventory of other players.
usage: /<command> <player>
aliases: [einvsee]
item:
description: Spawn an item.
usage: /<command> [item|numeric] <amount>
aliases: [i,eitem]
jails:
description: List all jails.
usage: /<command>
aliases: [ejails]
jump:
description: Jumps to the nearest block in the line of sight.
usage: /<command>
aliases: [j,ejump]
kick:
description: Kicks a specified player with a reason.
usage: /<command> <player> <reason>
aliases: [ekick]
kickall:
description: Kicks all players off the server except the issuer.
usage: /<command> <reason>
aliases: [ekickall]
kit:
description: Obtains the specified kit or views all available kits.
usage: /<command> <kit>
aliases: [ekit,kits]
kill:
description: Kills specified player.
usage: /<command> <player>
aliases: [ekill]
list:
description: List all online players.
usage: /<command>
aliases: [playerlist,who,online,elist,ewho,eplayerlist,eonline]
lightning:
description: The power of Thor. Strike at cursor or player.
usage: /<command> [player]
aliases: [strike,smite,elightning,estrike,esmite]
mail:
description: Manages inter-player, intra-server mail.
usage: /<command> [read|clear|send [to] [message]]
aliases: [email]
me:
description: Describes an action in the context of the player.
usage: /<command> [description]
aliases: [eme]
motd:
description: Views the Message Of The Day.
usage: /<command>
aliases: [emotd]
msg:
description: Sends a private message to the specified player.
usage: /<command> <to> <message>
aliases: [m,t,emsg,tell,etell,whisper,ewhisper]
mute:
description: Mutes or unmutes a player.
usage: /<command> [player] <datediff>
aliases: [emute]
nick:
description: Change your nickname or that of another player.
usage: /<command> <player> [nickname|off]
aliases: [enick]
nuke:
description: May death rain upon them.
usage: /<command> <player>
aliases: [enuke]
pay:
description: Pays another player from your balance
usage: /<command> [player] [amount]
aliases: [epay]
ping:
description: Pong!
usage: /<command>
aliases: [pong,eping,epong]
powertool:
description: Assigns a command to the item in hand, {player} will be replaced by the name of the player that you click.
usage: /<command> [command] <arguments>
aliases: [pt,epowertool,ept]
ptime:
description: Adjust player's client time. Add @ prefix to fix.
usage: /<command> [list|reset|day|night|dawn|17:30|4pm|4000ticks] <player|*>
aliases: [playertime, eptime, eplayertime]
r:
description: Quickly reply to the last player to message you.
usage: /<command> [message]
aliases: [er,reply,ereply]
realname:
description: Displays the username of a user based on nickname.
usage: /<command> [nickname]
aliases: [erealname]
reloadall:
description: Reloads all plugins.
usage: /<command>
aliases: [rel,ereloadall,ereload,erel]
repair:
description: Repairs the item in hand, or all items in the current inventory.
usage: /<command> [hand|all]
aliases: [fix]
rules:
description: Views the server rules.
usage: /<command>
aliases: [erules]
seen:
description: Shows the last logout time of a player
usage: /<command> [playername]
aliases: [eseen]
sell:
description: Sells the item currently in your hand.
usage: /<command> [itemname|id|hand|inventory|blocks] [-][amount]
aliases: [esell]
sethome:
description: Set your home to your current location.
usage: /<command>
aliases: [esethome]
setjail:
description: Creates a jail where you specified named [jailname]
usage: /<command> [jailname]
aliases: [esetjail]
setwarp:
description: Creates a new warp.
usage: /<command> [warp]
aliases: [createwarp,esetwarp]
setworth:
description: Set the sell value of an item.
usage: /<command> [itemname|id] [price]
aliases: [esetworth]
socialspy:
description: Toggles if you can see msg/mail commands in chat.
usage: /<command>
aliases: [esocialspy]
spawner:
description: Change the mob type of a spawner
usage: /<command> [mob]
aliases: [espawner]
spawnmob:
description: Spawns a mob.
usage: /<command> [mob]<:data><,mount<:data>> <amount>
aliases: [espawnmob]
suicide:
description: Causes you to perish.
usage: /<command>
aliases: [esuicide]
tempban:
description: Temporary ban a user.
usage: /<command> [playername] [datediff]
aliases: [etempban]
thunder:
description: Enable/disable thunder.
usage: /<command> <true/false> [duration]
aliases: [ethunder]
time:
description: Change the world time. Defaults to current world.
usage: /<command> [day|night|dawn|17:30|4pm|4000ticks] [worldname|all]
aliases: [etime, day, night]
togglejail:
description: Prevents a player from interacting with the world and teleports him/her to the the jail specified
usage: /<command> [player] [jailname] <datediff>
aliases: [tjail,etogglejail]
top:
description: Teleport to the highest block at your current position.
usage: /<command>
aliases: [etop]
tp:
description: Teleport to a player.
usage: /<command> [player]
aliases: [etp]
tpa:
description: Request to teleport to the specified player.
usage: /<command> <player>
tpaall:
description: Requests all players online to teleport to you.
usage: /<command> <player>
tpaccept:
description: Accepts a teleport request.
usage: /<command>
aliases: [tpyes]
tpahere:
description: Request that the specified player teleport to you.
usage: /<command> <player>
tpall:
description: Teleport all online players to another player.
usage: /<command> <player>
tpdeny:
description: Reject a teleport request.
usage: /<command>
aliases: [tpno]
tphere:
description: Teleport a player to you.
usage: /<command> [player]
aliases: [s]
tpo:
description: Teleport override for tptoggle.
usage: /<command> <player>
tpohere:
description: Teleport here override for tptoggle.
usage: /<command> <player>
tppos:
description: Teleport to coordinates.
usage: /<command> <x> <y> <z>
tptoggle:
description: Blocks all forms of teleportation.
usage: /<command>
tree:
description: Spawn a tree where you are looking.
usage: /<command> [tree|birch|redwood]
aliases: [etree]
unban:
description: Unbans the specified player.
usage: /<command> [player]
aliases: [pardon,eunban]
unbanip:
description: Unbans the specified IP address.
usage: /<command> [address]
aliases: [eunbanip,pardonip]
unlimited:
description: Allows the unlimited placing of items.
usage: /<command> [list|item] <player>
aliases: [eunlimited,ul,unl,eul,eunl]
warp:
description: List all warps or warp to the specified location.
usage: /<command> [pagenumber|warp] <player>
aliases: [ewarp,warps]
weather:
description: Setting the weather.
usage: /<command> <storm/sun> [duration]
aliases: [sky,sun,storm,eweather,esky,esun,estorm]
whois:
description: Determine the username behind a nickname.
usage: /<command> [nickname]
aliases: [ewhois]
world:
description: Switch between worlds.
usage: /<command> [world]
aliases: [eworld]
worth:
description: Calculates the worth of items in hand or as specified.
usage: /<command> <item> <amount>
aliases: [eworth]

View File

@@ -1,199 +1,199 @@
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
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

View File

@@ -5,6 +5,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Server;
@@ -15,9 +17,13 @@ import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.inventory.Recipe;
import org.bukkit.map.MapView;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.ServicesManager;
import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.scheduler.BukkitWorker;
public class FakeServer implements Server
@@ -118,7 +124,93 @@ public class FakeServer implements Server
public BukkitScheduler getScheduler()
{
throw new UnsupportedOperationException("Not supported yet.");
return new BukkitScheduler() {
@Override
public int scheduleSyncDelayedTask(Plugin plugin, Runnable r, long l)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int scheduleSyncDelayedTask(Plugin plugin, Runnable r)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int scheduleSyncRepeatingTask(Plugin plugin, Runnable r, long l, long l1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int scheduleAsyncDelayedTask(Plugin plugin, Runnable r, long l)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int scheduleAsyncDelayedTask(Plugin plugin, Runnable r)
{
r.run();
return 0;
}
@Override
public int scheduleAsyncRepeatingTask(Plugin plugin, Runnable r, long l, long l1)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> Future<T> callSyncMethod(Plugin plugin, Callable<T> clbl)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void cancelTask(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void cancelTasks(Plugin plugin)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void cancelAllTasks()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isCurrentlyRunning(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isQueued(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<BukkitWorker> getActiveWorkers()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<BukkitTask> getPendingTasks()
{
throw new UnsupportedOperationException("Not supported yet.");
}
};
}
public ServicesManager getServicesManager()
@@ -250,4 +342,40 @@ public class FakeServer implements Server
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getViewDistance()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean getAllowNether()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean hasWhitelist()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public MapView getMap(short s)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public MapView createMap(World world)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean getAllowFlight()
{
throw new UnsupportedOperationException("Not supported yet.");
}
}

View File

@@ -33,6 +33,7 @@ public class UserTest extends TestCase
}
base1 = server.createPlayer("testPlayer1", ess);
server.addPlayer(base1);
ess.getUser(base1);
}
private void should(String what)

View File

@@ -1,264 +0,0 @@
2011-02-28 16:56:00 [INFO] Starting minecraft server version Beta 1.3
2011-02-28 16:56:00 [INFO] Loading properties
2011-02-28 16:56:00 [WARNING] server.properties does not exist
2011-02-28 16:56:00 [INFO] Generating new properties file
2011-02-28 16:56:00 [INFO] Starting Minecraft server on *:25565
2011-02-28 16:56:00 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-468-ga3bf56c-b450jnks (MC: 1.3)
2011-02-28 16:56:00 [WARNING] Failed to load ban list: java.io.FileNotFoundException: banned-players.txt (The system cannot find the file specified)
2011-02-28 16:56:00 [WARNING] Failed to load ip ban list: java.io.FileNotFoundException: banned-ips.txt (The system cannot find the file specified)
2011-02-28 16:56:00 [WARNING] Failed to load ops: java.io.FileNotFoundException: ops.txt (The system cannot find the file specified)
2011-02-28 16:56:00 [WARNING] Failed to load white-list: java.io.FileNotFoundException: white-list.txt (The system cannot find the file specified)
2011-02-28 16:56:00 [INFO] Preparing level "world"
2011-02-28 16:56:00 [INFO] Preparing start region
2011-02-28 16:56:01 [INFO] <20>eLoaded Essentials build TeamCity maintained by Zenexer, ementalo, Aelux, and Brettflan
2011-02-28 16:56:02 [INFO] Preparing spawn area: 4%
2011-02-28 16:56:03 [INFO] Preparing spawn area: 8%
2011-02-28 16:56:04 [INFO] Preparing spawn area: 20%
2011-02-28 16:56:05 [INFO] Preparing spawn area: 32%
2011-02-28 16:56:06 [INFO] Preparing spawn area: 40%
2011-02-28 16:56:07 [INFO] Preparing spawn area: 48%
2011-02-28 16:56:08 [INFO] Starting minecraft server version Beta 1.3
2011-02-28 16:56:08 [INFO] Loading properties
2011-02-28 16:56:08 [INFO] Starting Minecraft server on *:25565
2011-02-28 16:56:08 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-468-ga3bf56c-b450jnks (MC: 1.3)
2011-02-28 16:56:09 [INFO] Preparing level "world"
2011-02-28 16:56:09 [INFO] Preparing start region
2011-02-28 16:56:10 [INFO] <20>eLoaded Essentials build TeamCity maintained by Zenexer, ementalo, Aelux, and Brettflan
2011-02-28 16:56:10 [INFO] Preparing spawn area: 4%
2011-02-28 16:56:10 [INFO] Should update an existing player with the same name, rather than creating a new player
2011-02-28 16:56:11 [INFO] Starting minecraft server version Beta 1.3
2011-02-28 16:56:11 [INFO] >
2011-02-28 16:56:11 [INFO] Preparing spawn area: 8%
2011-02-28 16:57:39 [INFO] Starting minecraft server version Beta 1.3
2011-02-28 16:57:39 [INFO] Loading properties
2011-02-28 16:57:39 [INFO] Starting Minecraft server on *:25565
2011-02-28 16:57:39 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-468-ga3bf56c-b450jnks (MC: 1.3)
2011-02-28 16:57:39 [INFO] Preparing level "world"
2011-02-28 16:57:39 [INFO] Preparing start region
2011-02-28 16:57:41 [INFO] <20>eLoaded Essentials build TeamCity maintained by Zenexer, ementalo, Aelux, and Brettflan
2011-02-28 16:57:41 [INFO] Preparing spawn area: 4%
2011-02-28 16:57:42 [INFO] Preparing spawn area: 8%
2011-02-28 16:57:43 [INFO] Preparing spawn area: 16%
2011-02-28 16:57:44 [INFO] Preparing spawn area: 24%
2011-02-28 16:57:45 [INFO] Preparing spawn area: 24%
2011-02-28 16:57:48 [INFO] Starting minecraft server version Beta 1.3
2011-02-28 16:57:48 [INFO] Loading properties
2011-02-28 16:57:48 [INFO] Starting Minecraft server on *:25565
2011-02-28 16:57:48 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-468-ga3bf56c-b450jnks (MC: 1.3)
2011-02-28 16:57:49 [INFO] Preparing level "world"
2011-02-28 16:57:49 [INFO] Preparing start region
2011-02-28 16:57:50 [INFO] <20>eLoaded Essentials build TeamCity maintained by Zenexer, ementalo, Aelux, and Brettflan
2011-02-28 16:57:50 [INFO] Preparing spawn area: 8%
2011-02-28 16:57:51 [INFO] >
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO] Starting minecraft server version Beta 1.3
2011-02-28 16:57:51 [INFO] Preparing spawn area: 12%
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:51 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:52 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:53 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:54 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:55 [INFO]
2011-02-28 16:57:56 [INFO]
2011-02-28 16:57:56 [INFO]
2011-02-28 16:57:56 [INFO]
2011-02-28 16:57:56 [INFO]
2011-02-28 16:59:07 [INFO] Starting minecraft server version Beta 1.3
2011-02-28 16:59:07 [INFO] Loading properties
2011-02-28 16:59:07 [INFO] Starting Minecraft server on *:25565
2011-02-28 16:59:07 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-468-ga3bf56c-b450jnks (MC: 1.3)
2011-02-28 16:59:07 [INFO] Preparing level "world"
2011-02-28 16:59:07 [INFO] Preparing start region
2011-02-28 16:59:08 [INFO] Done (0.060s)! For help, type "help" or "?"
2011-02-28 16:59:08 [INFO] Stopping server
2011-02-28 16:59:08 [INFO] Saving chunks
2011-02-28 16:59:09 [INFO] Starting minecraft server version Beta 1.3
2011-02-28 16:59:09 [INFO] Loading properties
2011-02-28 16:59:09 [INFO] Starting Minecraft server on *:25565
2011-02-28 16:59:09 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-468-ga3bf56c-b450jnks (MC: 1.3)
2011-02-28 16:59:09 [INFO] Preparing level "world"
2011-02-28 16:59:09 [INFO] Preparing start region
2011-02-28 16:59:10 [INFO] Done (0.011s)! For help, type "help" or "?"
2011-02-28 16:59:10 [INFO] Stopping server
2011-02-28 16:59:10 [INFO] Saving chunks

View File

@@ -1,13 +0,0 @@
#Minecraft server properties
#Mon Feb 28 16:56:01 EST 2011
level-name=world
hellworld=false
spawn-monsters=true
online-mode=true
spawn-animals=true
max-players=20
server-ip=
pvp=true
server-port=25565
white-list=false
spawn-protection=16

View File

@@ -1,2 +0,0 @@
home: [1.0, 2.0, 3.0, 4.0, 5.0, world]
money: 75.5

View File

@@ -1,76 +1,76 @@
<?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.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="EssentialsChat" default="default" basedir=".">
<description>Builds, tests, and runs the project EssentialsChat.</description>
<import file="nbproject/build-impl.xml"/>
&buildinc;
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="EssentialsChat-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
<?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.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="EssentialsChat" default="default" basedir=".">
<description>Builds, tests, and runs the project EssentialsChat.</description>
<import file="nbproject/build-impl.xml"/>
&buildinc;
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="EssentialsChat-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>

View File

@@ -875,11 +875,12 @@ is divided into following sections:
<classpath>
<path path="${javac.classpath}"/>
</classpath>
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
<fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
<include name="**/*.java"/>
<exclude name="*.java"/>
</fileset>
</javadoc>
<copy todir="${dist.javadoc.dir}">

View File

@@ -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=9d5d3374
nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
nbproject/build-impl.xml.script.CRC32=2447bdf5
nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45

View File

@@ -3,7 +3,42 @@ annotation.processing.enabled.in.editor=false
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=EssentialsChat
application.vendor=Paul
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
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=2
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=120
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAnnotationArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineArrayInit=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAssignment=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineBinaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineCallArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineDisjunctiveCatchTypes=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineImplements=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineParenthesized=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTernaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineThrows=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader=0
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
@@ -28,7 +63,7 @@ endorsed.classpath=
excludes=
file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
includes=**
jar.compress=false
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
@@ -37,8 +72,8 @@ javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.5
javac.target=1.5
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
@@ -58,7 +93,7 @@ javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
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

View File

@@ -1,6 +1,8 @@
package com.earth2me.essentials.chat;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.Map;
@@ -8,6 +10,7 @@ import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerChatEvent;
import org.bukkit.event.player.PlayerListener;
@@ -59,29 +62,38 @@ public class EssentialsChatPlayerListener extends PlayerListener
}
radius *= radius;
if (event.getMessage().startsWith("!") && event.getMessage().length() > 1)
{
if (user.isAuthorized("essentials.chat.shout"))
try {
if (event.getMessage().startsWith("!") && event.getMessage().length() > 1)
{
event.setMessage(event.getMessage().substring(1));
event.setFormat(Util.format("shoutFormat", event.getFormat()));
if (user.isAuthorized("essentials.chat.shout"))
{
charge(user,"chat-shout");
event.setMessage(event.getMessage().substring(1));
event.setFormat(Util.format("shoutFormat", event.getFormat()));
return;
}
user.sendMessage(Util.i18n("notAllowedToShout"));
event.setCancelled(true);
return;
}
user.sendMessage(Util.i18n("notAllowedToShout"));
event.setCancelled(true);
return;
}
if (event.getMessage().startsWith("?") && event.getMessage().length() > 1)
{
if (user.isAuthorized("essentials.chat.question"))
if (event.getMessage().startsWith("?") && event.getMessage().length() > 1)
{
event.setMessage(event.getMessage().substring(1));
event.setFormat(Util.format("questionFormat", event.getFormat()));
if (user.isAuthorized("essentials.chat.question"))
{
charge(user,"chat-question");
event.setMessage(event.getMessage().substring(1));
event.setFormat(Util.format("questionFormat", event.getFormat()));
return;
}
user.sendMessage(Util.i18n("notAllowedToQuestion"));
event.setCancelled(true);
return;
}
user.sendMessage(Util.i18n("notAllowedToQuestion"));
event.setCancelled(true);
}
catch (ChargeException ex)
{
ess.showError(user, ex, "Shout");
return;
}
@@ -123,4 +135,12 @@ public class EssentialsChatPlayerListener extends PlayerListener
u.sendMessage(message);
}
}
protected void charge(final CommandSender sender, final String command) throws ChargeException
{
if (sender instanceof Player)
{
final Trade charge = new Trade(command, ess);
charge.charge(ess.getUser((Player)sender));
}
}
}

Some files were not shown because too many files have changed in this diff Show More