1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-06 20:50:46 +02:00

Compare commits

...

644 Commits

Author SHA1 Message Date
Chris Ward
891f595706 Typo 2013-12-01 18:07:40 +11:00
Chris Ward
b42b5eadc9 Add optional 2nd arg to broadcast format.
50dca9abf5
2013-12-01 17:33:44 +11:00
Chris Ward
e49b2c5508 BuildAll -> EssentialsParent 2013-12-01 17:08:32 +11:00
Chris Ward
f8e100f5b7 Trim long /gc output, add /gc all
63ce4a99b9
2013-12-01 17:04:42 +11:00
Chris Ward
74dcb8e47a TODO <3 2013-12-01 16:58:28 +11:00
Chris Ward
03e9a0d290 Adds essentials.mute.notify
78e6da9504
2013-12-01 16:29:17 +11:00
Chris Ward
88ed9f5d41 Couple of extra /helpop aliases.
4807fb39e5
2013-12-01 15:20:20 +11:00
Chris Ward
2bd28952e2 Update items.csv 2013-12-01 14:58:32 +11:00
Chris Ward
25635d5abf New permission: essentials.sethome.bed
Players with this permission will force a bed home updating if daytime beds are enabled.
2d4a07b95
2013-12-01 14:51:16 +11:00
Chris Ward
fa50a3302b Update POM to Bukkit 1.7 2013-12-01 14:49:45 +11:00
Chris Ward
a458096123 Fix compilation 2013-12-01 14:49:14 +11:00
Iaccidentally
2af5229d4a Disregard women, acquire currency. 2013-06-09 16:49:02 -04:00
Iaccidentally
fc0b005ae1 Merge branch 'master' of https://github.com/essentials/Essentials 2013-05-26 10:51:22 -04:00
Iaccidentally
f81688b25f Cleanup and more API work 2013-05-26 10:50:58 -04:00
snowleo
43e7a6938b Update language files 2013-05-26 14:35:07 +02:00
Iaccidentally
cf3ab408b4 More work on the API 2013-05-25 18:52:17 -04:00
Iaccidentally
bc29f9d4b1 More API work 2013-05-25 15:40:44 -04:00
Iaccidentally
1129a6af88 Lets get this API party started. I invited the JavaDucks. (In all seriousness this is mostly just adding blank javadocs and a few small refactorings) 2013-05-25 15:09:18 -04:00
GunfighterJ
03c47f1f8a [Port] Check initial direction when looking for a safe teleport spot 2013-05-10 11:29:37 -05:00
Iaccidentally
b55b358cce Merge pull request #454 from Riaku/master
move commandAntioch to extras
2013-05-04 14:03:40 -07:00
Iaccidentally
59f91be43a Merge pull request #470 from drtshock/master
More logging!
2013-05-02 20:24:20 -07:00
drtshock
3ff12f6bf5 More logging! 2013-05-02 22:19:28 -05:00
Iaccidentally
c16b09a9ea Merge pull request #469 from drtshock/master
[Fixed] Use proper logging
2013-05-02 13:04:20 -07:00
drtshock
f326d0ad0c Use proper logging. 2013-05-02 14:21:30 -05:00
Iaccidentally
6807f878ad Update pom for 1.5.2 2013-05-02 11:51:00 -04:00
Riaku
27eb723fa0 change itemdb output to use locale
added ItemDatabaseResponse to messages.properties
2013-04-19 16:35:48 -05:00
Riaku
8c5620667a moving commandAntioch to extras 2013-04-19 14:59:39 -05:00
Riaku
f89306c42c adding /antioch command to stop error
http://pastebin.com/gJBJTVPd
no new permission nodes.
no new locales.
this is an easter egg for OPs so the messages probably shouldn't be in locale.
2013-04-19 14:48:46 -05:00
snowleo
fa7d89a5e9 Update pom.xml 2013-04-19 22:31:16 +03:00
Iaccidentally
4cf0843dd6 [3.0] Port kill exempt to 3.0 2013-04-19 14:48:45 -04:00
Iaccidentally
a60573a8ac [3.0] Port dispenser blacklist 2013-04-16 18:06:27 -04:00
Iaccidentally
45d19e18f3 [3.0] Update pom.xml for bukkit 1.5.1-r0.2 2013-04-16 18:05:52 -04:00
Iaccidentally
dc61159009 [PORT] port "update user activity on firing a bow" to 3.x 2013-04-16 16:18:06 -04:00
Iaccidentally
1b8b6e2d0b [3.0] We won't be needing these anymore 2013-04-08 20:04:48 -04:00
Chris Ward
59f3ec2519 Remove newline 2013-04-08 00:17:36 +10:00
snowleo
dbf0125eec Format everything using Netbeans 2013-04-07 15:00:40 +02:00
Chris Ward
ee98136fc5 Fix file modes, indents 2013-04-07 20:36:45 +10:00
Chris Ward
bf3e03fdaf Code Cleanup 2013-04-07 20:35:57 +10:00
snowleo
4d8543bb3a Fixing spacing again, and updating keys.pot 2013-04-06 16:23:20 +02:00
snowleo
0387d18ce2 Use correct translations with color 2013-04-06 16:09:02 +02:00
Chris Ward
96342bc6ce Whoops, breaking the file modes again 2013-04-07 01:00:57 +11:00
Chris Ward
0a892ade1d Update Bukkit to Beta build. 2013-04-06 23:45:52 +11:00
Chris Ward
4cf954d90b Fix spelling mistakes 2013-04-06 23:43:09 +11:00
snowleo
5826366dd2 Overload _( ) method to prevent creation of empty array. 2013-04-06 13:45:31 +02:00
snowleo
fd8ec9da7c Fix some spacing 2013-04-06 13:32:36 +02:00
snowleo
96ce631836 Update default messages to latest from 2.9 branch 2013-04-06 05:45:36 +02:00
snowleo
2754da89cb Let it compile again 2013-04-06 04:20:05 +02:00
snowleo
fd1c7f4fcc Moving all default messages back to the code, where they should be
Also tweaking I18n class and YamlStorageWriter a bit
2013-04-06 04:05:37 +02:00
snowleo
d17d7153dc Update README.markdown 2013-04-06 01:52:13 +03:00
snowleo
914b49a1d8 Update README.markdown 2013-04-06 01:51:40 +03:00
snowleo
78ecf273e7 Update README.markdown 2013-04-06 01:33:48 +03:00
Paul A.
4a3d496602 Merge pull request #430 from JamieSinn/master
[Feature]Healing other players extinguishes fire
2013-04-04 13:54:07 -07:00
Paul A.
39652d9985 Merge pull request #437 from Riaku/master
regex Check on banip
essentials.repair.all permission node
2013-04-04 13:52:12 -07:00
ementalo
d377c5cae7 [Fix] Switch around the if statement for enabling metrics 2013-04-04 21:45:07 +01:00
ementalo
3d2106e198 Remove GroupBridge from 3.0 2013-04-04 20:58:17 +01:00
Riaku
d646211613 adding new permission node:
essentials.repair.all
2013-04-04 12:18:22 -05:00
Riaku
d20aa0504e regex check on banip command format if player name is not found 2013-04-04 08:03:06 -05:00
Paul A.
c78ec4fed2 Merge pull request #436 from GunfighterJ/master
[Fix] NPE on ptime from console
2013-04-02 08:34:08 -07:00
GunfighterJ
fe51c55d0a [Fix]NPE on ptime from console 2013-04-02 10:26:49 -05:00
snowleo
5601cb7e28 Sorted pot is better for git 2013-04-02 00:01:08 +02:00
snowleo
29e430baa4 We don't need these files 2013-04-01 23:25:26 +02:00
snowleo
e669fdc4ee So you like pot? 2013-04-01 23:24:18 +02:00
Iaccidentally
4131a36765 Merge pull request #433 from GunfighterJ/master
More tab fixes
2013-04-01 14:23:06 -07:00
GunfighterJ
e78db0963c More tab fixes 2013-04-01 16:19:50 -05:00
Iaccidentally
cd50ee2732 Merge pull request #432 from GunfighterJ/master
Fix spaces into tabs.
2013-04-01 14:18:16 -07:00
GunfighterJ
9288daec8d Fix spaces into tabs.
Because no one told me
2013-04-01 16:16:48 -05:00
JamieSinn
e4e07cfc3d Healing others puts them out
Extinguishes the fire on another player if you do /heal <player>
2013-04-01 17:50:34 -03:00
snowleo
d91b174f96 Actually fix stuff and not break it 2013-04-01 20:33:23 +02:00
snowleo
7e92c35500 Make this test actually work 2013-04-01 20:33:22 +02:00
Iaccidentally
3447bdf0ad Merge pull request #429 from GunfighterJ/master
[Fix] Update Essentials Protect
2013-04-01 10:54:25 -07:00
snowleo
9494e94f7b Fix Travis builds of master branch 2013-04-01 19:48:54 +02:00
GunfighterJ
9a81b905a1 [Fix] Update protection settings
Removed unnecessary return statements
Waiting on bukkit bug for item frames and paintings
2013-04-01 11:59:05 -05:00
snowleo
3a4f7ae42c Fix reloading of AntiBuild 2013-03-31 11:24:18 +03:00
snowleo
726d659afc Fix reloading of Protect 2013-03-31 11:22:11 +03:00
Iaccidentally
774dd1c186 Merge pull request #410 from GunfighterJ/master
Port spawnmob changes to 3.x
2013-03-23 19:18:01 -07:00
GunfighterJ
a903cb5323 Port spawnmob changes to 3.x 2013-03-23 09:24:09 -05:00
Paul A.
1e8a29c064 Restore GM in pom 2013-03-22 10:52:43 +00:00
Paul A.
4dc1931f7e Rename travis.yml to .travis.yml 2013-03-22 10:43:27 +00:00
Paul A.
976ddaa487 Create travis.yml 2013-03-22 10:34:48 +00:00
Iaccidentally
2a64605fb9 Merge pull request #405 from GunfighterJ/master
Book with a lowercase b
2013-03-21 18:50:01 -07:00
GunfighterJ
bdaef6e2cf Book with a lowercase b 2013-03-21 19:57:13 -05:00
ementalo
e761967ebf Add firework command.
Add missing book.txt.
Update permissions.
2013-03-22 00:39:43 +00:00
ementalo
210c898dd6 Add Book command
Update pom
2013-03-21 23:49:58 +00:00
ementalo
91653847f5 port 7337b86 - pipe for linebreak 2013-03-21 23:21:07 +00:00
KHobbits
2711bdacf4 Merge pull request #386 from gmfreaky/patch-1
Keep player orientation when teleporting
2013-03-16 05:14:11 -07:00
gmfreaky
7901f6e9b9 Keep player orientation when teleporting
When no pitch/yaw was specified, take the current pitch/yaw of the player.
2013-03-15 17:31:54 +01:00
snowleo
e5b26fc061 Fixing some bugs in 3.0 2013-03-03 14:48:57 +01:00
KHobbits
af93487eef Merge pull request #306 from Riaku/master
per-group permissions attempt#2
2013-02-28 05:25:24 -08:00
ementalo
46b721c2a7 [Protect] Prevent creepers from breaking paintings if their explosions are disabled. 2013-02-25 22:43:05 +00:00
Riaku
6e13eb7070 adding per-group teleport permissions
node: essentials.teleport.groups.<groupname>
config: per-group-teleport: false
2013-02-08 04:53:12 -06:00
Iaccidentally
b2ff27cde2 Revert "adding per-group teleport permissions" 2013-02-06 18:53:14 -05:00
Iaccidentally
770830140d Merge pull request #305 from Riaku/master
Adding per-group teleport permissions :: will clean up later if needed.
2013-02-06 15:46:32 -08:00
Riaku
fbc8167ea9 adding per-group teleport permissions 2013-02-07 16:41:26 -06:00
Chris Ward
fa20d24957 Revert "PircBotX"
This reverts commit bb1710bb15.
2013-02-02 19:11:12 +11:00
Chris Ward
bb1710bb15 PircBotX 2013-02-02 18:51:22 +11:00
Chris Ward
7816916a8e Add tempban limit config option with matching exempt node. Console override to tempban.exempt 2013-02-02 18:45:32 +11:00
md_5
5996d645f4 Normalize file modes, please do not change without reason. 2013-02-02 18:08:22 +11:00
Chris Ward
2a87c4fe60 Fix maven shade 2013-02-02 17:16:56 +11:00
Chris Ward
0cb6d90bb3 Typo 2013-02-02 16:38:51 +11:00
Iaccidentally
5f480a5da5 Update pom.xml for 1.4.7 R1 :: Replace deprecated scheduleAsyncDelayedTask 2013-01-31 19:12:04 -05:00
Iaccidentally
d8657b3e00 Update heal in 3.0 2013-01-26 17:14:38 -05:00
Iaccidentally
2af3a234ad Update pom for bukkit 1.4.7-R0.1 2013-01-17 14:20:19 -05:00
Iaccidentally
fa3f4f92f4 Remove all instances of transient. (properly formatted this time!) 2013-01-14 20:38:11 -05:00
Iaccidentally
2a097530e5 Revert "Remove Transient :: Formatting Cleanup" 2013-01-14 20:06:28 -05:00
Iaccidentally
8e54bf13b2 Remove Transient :: Formatting Cleanup 2013-01-14 20:02:22 -05:00
Iaccidentally
232052b7d2 More Cleanup :: add TODO comments 2013-01-14 18:18:24 -05:00
md_5
4818bec0d8 Update the build system slightly to use embedded libraries. 2013-01-13 09:51:23 +11:00
md_5
2a26e46034 While we are at it, lets remove a file that never should have been added. 2013-01-12 15:12:56 +11:00
Chris Ward
ca863b8332 Fix GM line endings 2013-01-12 15:05:50 +11:00
Iaccidentally
eb7cedd6fd Revert "Remove GM from 3.0"
This reverts commit a4c93fef05.
2013-01-11 19:59:22 -05:00
Iaccidentally
859ca6e919 Cleanup :: Standardize import organization :: lots of comments :: remove unused eco systems 2013-01-11 19:56:02 -05:00
Iaccidentally
72ab21ac19 Lots of cleanup :: remove some unused variables :: add comments for future reference 2013-01-11 14:24:04 -05:00
Iaccidentally
d7c29ff0fd Merge pull request #255 from GunfighterJ/patch-1
Fixes link between Item Frames and Paintings when breaking :: Note: Does not currently work, needs later testing when 3.0 is more complete
2013-01-11 11:03:05 -08:00
GunfighterJ
502d0197c6 Fixes link between Item Frames and Paintings when breaking 2013-01-11 12:34:17 -06:00
Chris Ward
a4c93fef05 Remove GM from 3.0 2013-01-11 21:31:51 +11:00
Iaccidentally
cb819f37e9 porting e73983649f :: Ban cleanup 2013-01-09 16:41:05 -05:00
Iaccidentally
00237ae74f porting 341cb89bb7 :: Multiline kick messages and tempban countdown. 2013-01-09 16:31:24 -05:00
Chris Ward
4d4a3142f7 Add more items to Fireball command. Add /delay option to spawner
b04fa82be2
2988db08ca
2013-01-10 03:51:09 +11:00
Chris Ward
7381ec79d8 Expand plugin.yml fireball aliases.
368c33a843
2013-01-10 00:41:46 +11:00
Chris Ward
0d0c007c85 Fire a few extra entities from /fireball
c210e8730b
2013-01-10 00:41:32 +11:00
Chris Ward
4bcbd7350a Fix an import 2013-01-10 00:41:12 +11:00
Chris Ward
e86adc48e6 Unnecessary RegEx is unnecessary. Also storing Patterns in their classes for reuse.
437b01e371
c4e10da646
2013-01-10 00:40:54 +11:00
Chris Ward
f47c504202 Throw an error if user doesn't have permission to use kit sign.
f930ff48a2
2013-01-09 23:15:19 +11:00
Chris Ward
d0237a7fb4 Fix sign break bug
0937a35470
2013-01-09 22:53:55 +11:00
Chris Ward
e9e3d3b578 New permission: essentials.fly.safelogin - Players with this command automatically switch to fly mode if they login whilst floating in the air.
c6dd921f0c
2013-01-09 22:47:27 +11:00
Chris Ward
70aad4a954 New perm: essentials.vanish.effect - People with this effect will get the potion effect applied while vanished.
63e622374d
2013-01-09 22:29:39 +11:00
Chris Ward
1ccbf8dd68 Use the right formatter in XMPP
9ecb501e00
2013-01-09 22:05:12 +11:00
Chris Ward
dca47a117d Set default tpa timeout to 2 minutes.
3725a5e6d4
2013-01-09 20:25:54 +11:00
Chris Ward
688cfca625 Make /enchant only show valid enchantments for the item.
d551e8c6d2
2013-01-09 20:22:37 +11:00
Chris Ward
9a0b3d0db1 Add tpdeny message to /tpahere
e5fc579071
2013-01-09 20:15:03 +11:00
Chris Ward
bef0ed7cad Make seen statuses only show when true
c97763c3c8
2013-01-09 20:13:44 +11:00
Chris Ward
9222be9145 Log target plugin in debug mode for altcmd
617959a11b
2013-01-09 20:10:22 +11:00
Chris Ward
0177eca6e0 Final all the things - Recipe
a480091617
2013-01-09 20:07:36 +11:00
Chris Ward
556f218cbd Add a little bit of extra information to /seen, this will show when user is online.
ce78125028
2013-01-09 19:17:11 +11:00
Chris Ward
d19ffc6cc0 Warn other party when teleport fails after tpaccept
10b972bd07
2013-01-09 18:47:35 +11:00
Chris Ward
530dfd9129 Missed a spot 2013-01-09 01:11:14 +11:00
Chris Ward
9f5ea1bd39 Fix compilation. Finish InventoryWorkaround update. 2013-01-09 01:07:14 +11:00
Chris Ward
9b58760bb4 Revert "Fix Spawns/Jail loading"
This reverts commit 55877e1d1a.
2013-01-09 00:48:04 +11:00
Chris Ward
a8ecedab08 Redundant tpaccept cost check
b2d68fe213
2013-01-09 00:24:26 +11:00
Chris Ward
740c5dc712 Don't use broken CB methods
f125ac3b4a
2013-01-09 00:20:24 +11:00
Chris Ward
8a666d2467 Fix currency display in MOTD
b28db7e435
2013-01-09 00:17:27 +11:00
Chris Ward
b4ea7e66b1 Force people to use latest CB version
3ea3d18922
2013-01-09 00:06:12 +11:00
Chris Ward
55877e1d1a Fix Spawns/Jail loading
3faedec602
2013-01-09 00:00:12 +11:00
Chris Ward
bd4247b342 Update Inventory Workaround to latest version
2a88a314ce
2013-01-08 23:56:23 +11:00
Chris Ward
a50eb2c2c4 Update Recipe command 2013-01-08 23:16:15 +11:00
Chris Ward
02a0fb4f81 Fix deprecation nag exception 2013-01-08 22:57:48 +11:00
Iaccidentally
d328dcd901 Update pom.xml to 1.4.6 R0.3 :: Update Antibuild to use HangingBreakByEntityEvent instead of deprecated PaintingBreakByEntityEvent 2013-01-02 18:37:11 -05:00
snowleo
279e3f6f47 Cleanup 2013-01-01 23:54:22 +01:00
snowleo
bca953a96e Cleanup 2013-01-01 23:17:34 +01:00
snowleo
3c39ee58e0 clean EnumConverter 2013-01-01 23:00:35 +01:00
snowleo
32c4950059 WIP Converters
Only Integer and Enum for now, open for comments
2013-01-01 22:53:03 +01:00
Alexander Schepp
72c5ab8fd3 Merge pull request #238 from gravypod/patch-3
Fixing snowleo's comments on my last PR
2013-01-01 08:28:27 -08:00
gravypod
755b494e10 Fix copying block data 2013-01-01 11:24:16 -05:00
gravypod
2725a5960f Fixing snowleo's comments on my last PR 2013-01-01 11:17:04 -05:00
Alexander Schepp
b827aa1a00 Merge pull request #237 from gravypod/patch-3
Fix an NPE
2013-01-01 06:48:07 -08:00
gravypod
45679c755e Update Essentials/src/net/ess3/listener/EssentialsPlayerListener.java 2012-12-31 11:14:01 -05:00
gravypod
b35ec5ad2d Fix an NPE
Player dies, clicks title screen, logs in, respawns, NPE thrown.
2012-12-31 11:10:38 -05:00
KHobbits
8661927599 Merge gravy's pull and reformat code 2012-12-31 02:28:52 +00:00
gravypod
a6b83ca260 Updates, fixes, speedups and more 2012-12-30 20:29:37 -05:00
Chris Ward
67a6971e5b Fix missing import @gravypod 2012-12-30 14:18:01 +11:00
Chris Ward
72b1b90be4 Merge pull request #231 from gravypod/patch-4
Less objects and moar finals
2012-12-29 19:07:20 -08:00
Chris Ward
1e2d52a5fe Merge pull request #232 from gravypod/patch-5
Create less objects, store a copy of player
2012-12-29 19:07:11 -08:00
gravypod
2a3b5983e7 Create less objects, store a copy of player 2012-12-29 20:27:38 -05:00
gravypod
7c9c79a9ed Less objects and moar finals 2012-12-29 20:23:35 -05:00
Iaccidentally
2c1414e706 Merge pull request #230 from keybordpiano459/master
Fixed a typo in the config.yml
2012-12-29 16:37:50 -08:00
keybordpiano459
0bd3542f5b Another typo fix 2012-12-29 08:16:02 -05:00
Chris Ward
7df0802e88 Fix indents, file perms (sorry! XD) 2012-12-19 22:36:37 +11:00
Chris Ward
9b69334eea Add /recipe command 2012-12-19 22:06:03 +11:00
KHobbits
85adc3df14 Merge pull request #211 from chrisgward/patch-1
i18n
2012-12-14 05:34:34 -08:00
KHobbits
c947de2830 Merge pull request #213 from chrisgward/patch-2
Fix bans, add console override to exempt node
2012-12-14 05:33:40 -08:00
Chris Ward
69fca5c251 Fix bans, add console override to exempt node 2012-12-14 20:55:54 +11:00
Chris Ward
7a33087cba i18n 2012-12-14 12:26:08 +11:00
KHobbits
c5dccc5229 General cleanup 2012-12-02 02:54:32 +00:00
KHobbits
ce25abc3d8 Make abstract methods abstract 2012-12-02 02:26:50 +00:00
KHobbits
517fafab4e Support new game modes
Add gamemode to settings abstract
2012-12-02 02:20:05 +00:00
KHobbits
49fe260f8d Split settings abstract to allow more complex matches 2012-12-02 01:20:41 +00:00
KHobbits
032c35c90d Don't allow toggling offline players with /fly and /vanish 2012-12-02 00:59:04 +00:00
KHobbits
f79fe70a86 Fix queue save in god/tptoggle
Use settings abstract for socialspy
2012-12-01 23:44:09 +00:00
snowleo
bb8b15785d Missed one 2012-11-27 12:28:56 +01:00
snowleo
cf0386be7a Essentials Team instead of Essentialsteam 2012-11-27 12:26:04 +01:00
snowleo
00df93b709 Update authors fields of all plugins to a link instead of an outdated list of developers 2012-11-27 12:19:36 +01:00
snowleo
a59283b53a Cleanup 2012-11-18 12:56:33 +01:00
Iaccidentally
bcc4bb39fa Merge pull request #199 from evonuts/master
Clean PR for /eco reset broadcast messages.
2012-11-16 00:25:00 -08:00
evonuts
4e0a221dfe Clean commit for eco reset broadcast. 2012-11-16 21:21:42 +13:00
Iaccidentally
9551cc0cd2 Tl todo cleanup round 1 2012-11-15 22:26:49 -05:00
KHobbits
e6fad00926 Some TL cleanup 2012-11-16 02:58:04 +00:00
KHobbits
7eab8aa6f8 Add vanish toggle to abstract 2012-11-16 02:52:19 +00:00
KHobbits
e382a6c923 Abstract Settings Command class 2012-11-16 02:37:13 +00:00
KHobbits
6b332957c8 TL Move 2012-11-16 02:37:08 +00:00
Iaccidentally
0916f871a9 Add option to clear powertools on world change :: messages cleanup 2012-11-15 16:03:31 -05:00
Iaccidentally
e983cdf14d Add feed sign 2012-11-14 15:16:39 -05:00
Iaccidentally
9af7ab52ea Fix format stripping in max nick length 2012-11-14 03:27:23 -05:00
Iaccidentally
cdde047229 Add a configurable max nick length. 2012-11-13 23:29:35 -05:00
ementalo
cef5af0de3 AntiBuild config file defaults on first creation 2012-11-13 15:44:20 +00:00
KHobbits
8fbd8f0266 Let's have a sorted mob list. 2012-11-12 22:57:02 +00:00
KHobbits
74ff3cbbd4 Switch the signs to use the new spawnmob class. 2012-11-12 22:24:04 +00:00
KHobbits
c33a45dfbc Spawnmob cleanup 2012-11-12 22:06:57 +00:00
Iaccidentally
3fee4bc5ca cleanup powertool remove on quit 2012-11-12 16:06:29 -05:00
Iaccidentally
cd23fc957a add option to clear a players powertools on disconnect. test #1369 2012-11-12 14:57:14 -05:00
Iaccidentally
0ca7537440 update tptoggle to allow toggling other players :: new permission: essentials.tptoggle.others 2012-11-11 14:40:41 -05:00
Iaccidentally
1685ef4f55 make PlayerFishEvent cancel afk 2012-11-11 11:58:36 -05:00
snowleo
3983381fcd Fix build 2012-11-03 16:01:17 +01:00
snowleo
319a3e4def Ess2Compat: Settings part 1 2012-11-03 12:44:38 +01:00
snowleo
488096c1fd Cleanup imports 2012-11-03 02:57:01 +01:00
snowleo
83fefefb43 Ess2Compat: Convert user files 2012-11-03 02:36:17 +01:00
snowleo
59878a94e4 Make Timestamps more flexible 2012-11-03 02:06:21 +01:00
snowleo
aba2540bcd Store filename as key in zippedFiles 2012-11-03 00:30:45 +01:00
snowleo
c60beda40f Add support for zipped User / Warp files 2012-11-03 00:24:54 +01:00
Alexander Schepp
3ce525f032 Don't confuse gravypod 2012-11-01 22:56:47 +01:00
Iaccidentally
74b494cea4 typo fix 2012-10-28 15:03:14 -03:00
Iaccidentally
0f418fc348 Update Essentials/src/net/ess3/commands/Commandtppos.java
copy-paste fail :<
2012-10-28 15:00:30 -03:00
Iaccidentally
9038036abf cleanup 2012-10-28 13:50:30 -04:00
Iaccidentally
df275fc237 Prevent changes (wither support) 2012-10-28 13:41:13 -04:00
Iaccidentally
2338a4ef26 Update tppos to not accept coords over 30000000 2012-10-28 11:14:14 -04:00
Iaccidentally
689b9ebf22 Merge branch 'master' of https://github.com/essentials/Essentials 2012-10-28 10:54:50 -04:00
Iaccidentally
6be807e30d 1.4 update :: protect updates :: update config.yml 2012-10-28 10:53:26 -04:00
md_5
811f20d254 Cleanup usages of split. 2012-10-27 12:51:18 +11:00
ementalo
10c8540fa0 Porting 2.9 teleport changes 2012-10-25 15:42:11 +01:00
snowleo
f6f49f4f1e Removed empty methods. 2012-10-24 22:45:16 +02:00
snowleo
deae46fa73 Allow to fill data with defaults on newly created configs 2012-10-24 22:35:08 +02:00
ementalo
f03361b0c6 "When IDE's attack" 2012-10-24 14:49:40 +01:00
ementalo
96d76f46fc Null handling in AntiBuild 2012-10-24 14:48:12 +01:00
ementalo
bb838c3369 Fix metrics NPE 2012-10-24 14:36:49 +01:00
ementalo
a12706f88d Cleanup Entity Listener 2012-10-19 12:17:54 +01:00
ementalo
e0d3b9cfcf Fix command handlers 2012-10-19 10:33:10 +01:00
md_5
215e093c3f Clean up use of libraries 2012-10-19 19:54:56 +11:00
Iaccidentally
b41f3bdef6 Porting changes to 3.0: Volume 2 :: The Code Strikes Back 2012-10-18 21:40:26 -04:00
snowleo
9d486ac638 Add tabComplete support to Essentials commands 2012-10-18 23:17:19 +02:00
Iaccidentally
afa47c176b Porting changes to 3.0: volume 1 :: lots of cleanup 2012-10-18 16:00:25 -04:00
snowleo
3dd98f1048 Always teleport in sync thread 2012-10-16 22:21:48 +02:00
snowleo
ef289cb309 Added exempt/offline permissions to fly, god, gamemode and socialspy command. Added more options to socialspy 2012-10-16 22:04:56 +02:00
snowleo
3b32012a67 Remember kids, don't copy & paste while coding 2012-10-16 21:26:14 +02:00
snowleo
c644eb1ee2 Allow unsafe enchantments in /item /give /enchant with permissions. 2012-10-16 21:24:00 +02:00
snowleo
d056b9e436 Fix /seen for offline users 2012-10-16 21:12:29 +02:00
snowleo
c412a22502 Add command option /ignore list 2012-10-16 01:09:10 +02:00
snowleo
c70caf8001 Allow at least one home by default. 2012-10-16 00:23:27 +02:00
snowleo
4f4f9d8702 Cleanup of ranks and make it more resistant against exceptions from external code 2012-10-16 00:15:38 +02:00
snowleo
80bdae2cc9 Add config option for /near default radius 2012-10-15 23:34:13 +02:00
snowleo
d82899ebd6 Correctly implement charges in /more all 2012-10-15 23:28:53 +02:00
snowleo
c74545d614 Add command option /more all 2012-10-15 23:12:02 +02:00
snowleo
6f34f208b0 Add more options to /balancetop and fix access to getPlayer() on offline user 2012-10-15 23:00:55 +02:00
snowleo
10f47ed7a5 World permissions for /time command 2012-10-15 22:42:48 +02:00
snowleo
7c8f7ba3ed Fix changeDisplayname and related code 2012-10-15 21:02:02 +02:00
ementalo
b86ca14295 Fix chat colours 2012-10-15 00:47:36 +01:00
ementalo
9867af51a9 Remove [PLAYER_COMMAND] output, cleanup 2012-10-14 23:29:11 +01:00
snowleo
93fe12f433 New permissions: essentials.give.enchanted essentials.item.enchanted 2012-10-14 23:01:34 +02:00
snowleo
cb528935de Fix instanceof Player 2012-10-14 21:27:38 +02:00
snowleo
9ca4f53c1a replace user.isHidden() with player.canSee() 2012-10-14 00:35:24 +02:00
ementalo
eca8b54ef5 entity target bypass protect permission split out to essentials.protect.entity.bypass.entityname for per entity settings 2012-10-13 19:40:55 +01:00
ementalo
590430fcec Fix usermap player matching 2012-10-11 16:59:07 +01:00
ementalo
448e718085 Remove user assignment in anti build listeners. 2012-10-11 16:46:23 +01:00
ementalo
a00ca1fd52 Fix /god
Use assigned variable in protect BlockListener
Cleanup imports
2012-10-11 15:06:25 +01:00
ementalo
5e663508ce Anti Build 3.0 update 2012-10-11 13:40:26 +01:00
ementalo
3d2870cc4e Esschat clean up
Re-implement sign throttle Test #2331
2012-10-10 14:01:22 +01:00
snowleo
62d5f63ab1 Get Player objects of players, that are not in the game yet. 2012-10-09 20:39:58 +02:00
ementalo
2c72a6bc95 Updated items.csv and translations
Fixes missing whois tl key
2012-10-09 14:06:50 +01:00
ementalo
b6e7daa036 Move social spy command definition to config file.
Fix the loading of some values from the config.
2012-10-09 13:47:55 +01:00
ementalo
4fac9f95de Fix time set permissions 2012-10-09 11:11:51 +01:00
md_5
24ea8fe410 Golden rule of commiting, don't make formatting worse in a cleanup commit. 2012-10-09 20:26:53 +11:00
Iaccidentally
4aba49ce30 cleanup 2012-10-09 04:56:44 -04:00
ementalo
8412b6682f Null checks on join / quit variables 2012-10-09 00:38:55 +01:00
ementalo
4d1cdaa7f0 Adding join / quit messages in the config test #1697
PlayerChatEvent -> AsyncPlayerChatEvent
2012-10-08 22:22:06 +01:00
snowleo
b1103726cb Temporary fix for javadoc bug 2012-10-08 22:59:28 +02:00
snowleo
591d4af167 Show write queue size on /gc 2012-10-08 22:48:52 +02:00
snowleo
524531a090 Queued writing of the files to reduce disk io 2012-10-07 22:18:53 +02:00
md_5
7a36150f3c Use correct classloader to load 2012-10-07 21:47:14 +11:00
md_5
6d3119dfe6 Shift fields around so they are actually set. 2012-10-07 21:33:44 +11:00
md_5
41946a2da9 Don't name each command Commandxxx 2012-10-07 21:30:06 +11:00
md_5
7be9114d1a Helps to include the annotation 2012-10-07 21:26:56 +11:00
md_5
846668594c Use annotations to register commands 2012-10-07 21:24:03 +11:00
md_5
8215d7be9b Move ess init to onenable. 2012-10-07 20:58:45 +11:00
md_5
2c478072a2 Save commands that are in the jar by default, print commands on load. Should work, havent tested. 2012-10-07 15:37:27 +11:00
md_5
df1007baff Add Essentials extra and KittyCannon as a demo. 2012-10-07 15:22:23 +11:00
snowleo
ae10bcdffe Cleanup 2012-10-06 17:02:58 +02:00
snowleo
bb798a1051 Organize Imports 2012-10-06 16:58:46 +02:00
snowleo
8ccc16822f Cleanup 2012-10-06 16:55:17 +02:00
snowleo
fabd88dc25 Less locks please 2012-10-06 16:49:40 +02:00
snowleo
463c4ff62d Getting rid of locks, part one 2012-10-06 15:31:59 +02:00
snowleo
f2e31e56c5 Fix startup errors 2012-10-06 11:06:52 +02:00
snowleo
21b2e4b072 Removed Protection signs, use other plugins for this. 2012-10-03 22:08:59 +02:00
snowleo
a43207d395 Comment AntiBuild until latest version is ported from 2.9 2012-10-03 18:18:10 +02:00
snowleo
4a1e26697e Cleanup 2012-10-03 18:16:01 +02:00
snowleo
58821791ff Make ItemStackDotStarPermission more general 2012-10-03 18:10:10 +02:00
snowleo
a8c8e493b9 Better .* Permission classes 2012-10-03 17:52:01 +02:00
snowleo
b677dbfb25 New permission checks, now only registers the parent nodes and needs two checks. This combines the 2.9 and 3.0 permission check methods. 2012-10-03 15:57:37 +02:00
snowleo
53b512415e Fix Spawns commands 2012-10-03 13:54:35 +02:00
snowleo
cef10a5755 Check amount in /pay 2012-10-03 13:49:12 +02:00
snowleo
79b28a4441 Fix removing of item in /hat 2012-10-03 13:42:42 +02:00
snowleo
3d02713b0e Added link to /essentialshelp command for console 2012-10-03 13:38:16 +02:00
snowleo
3ad14f8fa8 Reenable Metrics 2012-10-03 13:32:56 +02:00
snowleo
4105ea4878 Fix NPE in /seen 2012-10-03 13:32:42 +02:00
snowleo
4341aac086 Cleanup 2012-10-03 13:16:46 +02:00
Iaccidentally
f317070c95 Merge pull request #127 from XwartX/patch-1
Update Essentials/src/messages_nl.properties
2012-09-27 14:12:28 -07:00
ementalo
94ea3ffd35 Remove IDE spam 2012-09-27 15:30:23 +01:00
ementalo
0283adb8c5 Updating antibuild to use 3.0 configs and perms.
AntiBuild listener still has some conversions to do
2012-09-27 15:27:25 +01:00
ementalo
622877dabe Protect pom update 2012-09-27 12:59:25 +01:00
ementalo
73eaadd8b5 Removing the signs and rails protection from protect
Remove the antibuild functionality from protect
2012-09-27 12:16:15 +01:00
Iaccidentally
476b5820bd Add EssentialsAntiBuild to 3.x :: still needs a little work 2012-09-26 19:27:21 -04:00
md_5
858350c344 Instructions on how to build. 2012-09-16 13:56:42 +10:00
Iaccidentally
cfdbd5360e Update Essentials/src/plugin.yml
more SKYNET updates
2012-09-15 21:09:56 -03:00
KHobbits
ce0fc35b3d Merge pull request #142 from xGhOsTkiLLeRx/master
Fixed jail extend message.
2012-09-13 17:11:52 -07:00
xGhOsTkiLLeRx
36e67a7f1d Fixed jail extend message 2012-09-13 20:25:50 +02:00
Iaccidentally
42710eb76c Merge pull request #137 from mbax/simoleon
Consistency in simoleon usage.
2012-09-06 19:16:36 -07:00
mbax
6d58ec8cc1 Consistency in simoleon usage.
Does not fix problem of char replace stuff being EVERYWHERE
2012-09-06 21:46:55 -04:00
snowleo
10b161ce09 Move format methods from Util to FormatUtil 2012-09-02 19:41:30 +02:00
snowleo
3676881efd Update LocationUtil to updated 2.9 code 2012-09-02 19:37:40 +02:00
snowleo
288604f673 Remove unused files 2012-09-02 19:17:00 +02:00
snowleo
dbe9d57f88 Fix tests 2012-08-30 23:58:34 +02:00
ementalo
bfc4b9b2a3 Change Util.registerPermission to PermissionFactory, remove registerPermissions from Util 2012-08-30 13:35:22 +01:00
ementalo
bbcf3ee352 Updates to protect and geoip 2012-08-29 15:11:29 +01:00
ementalo
cc82d2ccc2 Change user matching for enderchest.
Update SetExpFix to 2.9 Version
2012-08-29 14:30:37 +01:00
ementalo
1b725c7999 Fixing speed and enderchest on 3.0 2012-08-29 11:51:36 +01:00
ementalo
caa67e4207 Main jar should compile, the tests are messed up 2012-08-29 00:07:56 +01:00
Iaccidentally
44cd21a28b add Commandenerchest to 3.0 (still needs changes to playerlistener and user to work) and update plugin.yml 2012-08-27 19:30:08 -04:00
Iaccidentally
f52d7d05ec Merge branch 'master' of https://github.com/essentials/Essentials 2012-08-26 20:02:37 -04:00
Iaccidentally
d8c6b921f0 add Commandspeed to 3.x 2012-08-26 20:02:01 -04:00
ementalo
53cffa7556 Updates for new user object and other fixes 2012-08-27 01:01:04 +01:00
Iaccidentally
7aff52ccec Missed one. 2012-08-26 19:35:42 -04:00
Iaccidentally
8dc42dd39b fix imports 2012-08-26 14:41:07 -04:00
snowleo
50ab5ffd93 Removing server layer part 2 2012-08-26 20:17:29 +02:00
snowleo
b98021acab Organize Imports 2012-08-26 17:15:35 +02:00
snowleo
b36dae3f5c Removing server layer, part 1 2012-08-26 17:10:17 +02:00
snowleo
40267faa6e Updated pom to latest bukkit beta build 2012-08-26 09:58:09 +02:00
XwartX
007a9b9e0c Update Essentials/src/messages_nl.properties
Small fixes in translations
2012-08-21 12:56:12 +03:00
Iaccidentally
dd79a5bf8d 2.9 config > master fixes default config wiki page 2012-08-08 10:35:32 -03:00
Iaccidentally
1b3142d38c Merge branch 'master' of https://github.com/essentials/Essentials 2012-08-07 01:49:35 -04:00
Iaccidentally
224e76c803 re-add color 2012-08-07 01:48:49 -04:00
ementalo
99ca48ed42 update pom to 1.3 bukkit.
A couple of fixes
2012-08-06 15:38:12 +01:00
Iaccidentally
9cee4f9826 2.9 -> 3.0 (new commands and signs) 2012-08-06 07:50:40 -04:00
Iaccidentally
412d979c75 Merge pull request #110 from Yofel/master
use the correct enum types in the switch
2012-08-06 03:49:58 -07:00
Philip Muskovac
5ec004b1f7 fix the last commit to use the enum values correctly 2012-08-04 13:28:46 +02:00
Alexander Schepp
0c754c03c6 Merge pull request #109 from Yofel/master
make /gc show END worlds as The End
2012-08-04 04:14:32 -07:00
Iaccidentally
1e7c69c0d5 master branch too! 2012-08-04 08:03:05 -03:00
Iaccidentally
5c82ed2962 I before E, except after C. 2012-08-04 07:47:12 -03:00
Philip Muskovac
8a100886e9 add support for the end to /gc 2012-08-04 12:42:28 +02:00
Iaccidentally
6e837e2106 I am a master grammar nazi 2012-08-04 07:42:03 -03:00
Alexander Schepp
7d20e4edd1 Merge pull request #105 from oggehej/patch-1
"gameMode" message [Swedish Translation]
2012-08-01 06:00:44 -07:00
Alexander Schepp
06c34a1df8 Merge pull request #107 from necrodoom/patch-1
update items.csv to 1.3, may need extra cleanup
2012-08-01 05:59:39 -07:00
Alexander Schepp
6b8b507b4e Merge pull request #106 from samschaap/patch-1
Fixed small typo
2012-08-01 05:54:55 -07:00
necrodoom
686264fa83 removed useless emerald aliases
items.csv version 2.1_05
2012-08-01 15:28:52 +03:00
necrodoom
716b6b7c1f added splash mundane and unreverted dualbit
version 2.1_04 of items.csv
2012-08-01 12:01:48 +03:00
necrodoom
a332e68cb8 update items.csv to 1.3, may need extra cleanup
if someone is updating from 1.2 to 1.3 he must use new items.csv, due to changes in woodenslab crafting.
2012-07-31 16:59:28 +03:00
snowleo
cf66bcc05a Allow to cancel the event 2012-07-29 12:36:22 +02:00
snowleo
e6bda76b12 Events WIP 2012-07-29 12:33:35 +02:00
Alexander Schepp
8c4eb152a3 Fix days in polish translation 2012-07-26 04:25:03 +03:00
Iaccidentally
be87640ec4 fixed args count 2012-07-22 14:57:09 -04:00
Iaccidentally
fc6acc9af8 Round 1 of fixing getPlayer in commands 2012-07-22 14:54:18 -04:00
snowleo
13b9bc600a Fix AbstractDelayedYamlFileReader 2012-07-22 13:13:28 +02:00
snowleo
b76f5c71a3 Fix StoredLocation 2012-07-22 13:11:00 +02:00
snowleo
a181e6d7b2 Compile on save all enabled in Netbeans 2012-07-22 12:42:19 +02:00
snowleo
ca928e42ed Removing /nuke and /antioch 2012-07-22 12:32:04 +02:00
snowleo
ff1ea62a91 Fix interface params to match with the implementation method 2012-07-22 11:40:05 +02:00
snowleo
a10b76e9e4 Update of Lombok to 0.11.2 2012-07-22 11:28:32 +02:00
snowleo
dd8ddd15a1 Fix more stuff in 3.0 2012-07-22 11:28:14 +02:00
samschaap
7dffd607a6 Fixed small typo 2012-07-20 21:57:27 +03:00
ementalo
ff39c63f83 Be careful with getUser vs matchUser 2012-07-20 16:39:45 +01:00
ementalo
af80208ac5 Clear up merge leftovers 2012-07-20 16:32:58 +01:00
ementalo
c395997272 mail player matching update 2012-07-20 12:19:56 +01:00
ementalo
26e5b52c26 Some user matching updates 2012-07-20 12:12:21 +01:00
oggehej
fe66727366 "gameMode" message, if you're choosing creative is it grammatically incorrect.
Ex: Satte kreativs spelläge till oggehej.
It should then be "kreativt", but you can't choose to have both "{0}s" and "{0}t".
2012-07-19 18:04:23 +03:00
ementalo
ea1cce76f9 Revert "more replacing. fix getUser();"
This reverts commit ab9545624c.
2012-07-17 20:48:05 +01:00
Iaccidentally
ab9545624c more replacing. fix getUser(); 2012-07-17 15:42:15 -04:00
Iaccidentally
90ba0c91ca fix permission.default in afk 2012-07-17 14:44:13 -04:00
Iaccidentally
3c28300b03 round 2 of import fixing 2012-07-17 14:25:40 -04:00
Iaccidentally
3575428d6b Use IServer not bukkit server 2012-07-17 12:03:02 -04:00
Iaccidentally
b297a22b55 Fixing imports and removing bukkit in commands 2012-07-17 11:55:59 -04:00
ementalo
9db8dac2e3 Some more fixes 2012-07-17 14:46:35 +01:00
ementalo
ed00fb9d39 Command perms fix 2012-07-17 14:25:49 +01:00
ementalo
a661bce7b3 Merge of server-layer branch 2012-07-17 14:21:03 +01:00
ementalo
3c385e6927 Package Renames 2012-07-16 15:01:16 +01:00
ementalo
9d41899b97 Package Renames 2012-07-16 15:01:00 +01:00
snowleo
fff9f07994 server-layer part 2 2012-07-15 19:58:08 +02:00
Alexander Schepp
9f05e43ecf Update master 2012-07-15 19:56:44 +03:00
Alexander Schepp
6f53ec8165 Merge pull request #102 from gravypod/master
NecroDoom's CVS fix
2012-07-15 09:49:23 -07:00
gravypod
51c2c43c14 Made by Necrodoom. [He just asked me to push this] 2012-07-15 09:41:05 -07:00
Alexander Schepp
e6195ec452 Merge pull request #98 from xGhOsTkiLLeRx/master
Updated German language file
2012-07-15 02:21:22 -07:00
xGhOsTkiLLeRx
29bc2e2dfd Done 2012-07-15 04:34:33 +03:00
xGhOsTkiLLeRx
f93a136324 Rev 3 - final? 2012-07-13 02:05:48 +03:00
Paul A.
0d57815e8b Update readme about 3.0 2012-07-12 17:21:38 +02:00
xGhOsTkiLLeRx
47abce70bb Fixed "muted" messages - wasn't my fault ;) 2012-07-12 16:14:32 +03:00
xGhOsTkiLLeRx
d5dbf80d97 Last line translated 2012-07-12 15:31:14 +03:00
xGhOsTkiLLeRx
14a7e4c84a Update master 2012-07-12 15:26:26 +03:00
xGhOsTkiLLeRx
5cd5a654c8 Rev 2 - spell fixes and grammar correction 2012-07-12 15:25:50 +03:00
snowleo
210f7fe749 Keep orientation while teleporting up 2012-07-12 12:30:25 +02:00
snowleo
c3e261d60a Fix /time command 2012-07-12 12:30:25 +02:00
snowleo
cfb93e97f0 Ignore players without IP 2012-07-12 12:30:25 +02:00
snowleo
a0b59fd58e Another NPE fix for bots 2012-07-12 12:30:24 +02:00
snowleo
2670d641b1 Ignore folder, that should not be published 2012-07-12 12:30:24 +02:00
snowleo
b4b90874f6 Organize Imports 2012-07-12 12:30:23 +02:00
snowleo
3f9c29bf8c Move NULL check to the top 2012-07-12 12:30:23 +02:00
snowleo
fe572db6bb Drop dependency of craftbukkit on main project, we don't need it anymore. 2012-07-12 12:30:22 +02:00
snowleo
3060a7b259 Using the new methods in Essentials to getUser 2012-07-12 12:30:22 +02:00
snowleo
719e1a861f Organize imports 2012-07-12 12:30:22 +02:00
snowleo
c434bb7f50 Removed /essentials nya and /essentials moo 2012-07-12 12:30:21 +02:00
xGhOsTkiLLeRx
f0e7483f56 Updated German language file. 2012-07-12 02:25:28 +03:00
Alexander Schepp
2fc896532f Fix version in messages_se.properties 2012-07-11 14:20:11 +03:00
Alexander Schepp
15a4e94eb7 Merge pull request #94 from DMarby/master
Swedish translation
2012-07-11 04:17:04 -07:00
Alexander Schepp
3cace07d90 Merge pull request #97 from JamieSinn/patch-1
Added the ability to stop fire with /heal
2012-07-11 04:14:58 -07:00
JamieSinn
95b12f0f42 Added the ability to stop fire 2012-07-11 00:04:03 -03:00
David Marby
e3da60d6e4 Added swedish translation 2012-07-07 02:10:14 +02:00
ementalo
120f1c73e7 Move creaturespawn options to worldoptions 2012-07-06 16:42:49 +01:00
ementalo
06e6749ca3 Move creature spawn prevention to core 2012-07-06 15:57:54 +01:00
ementalo
30600295a6 Enabled signs within the if 2012-07-06 14:11:31 +01:00
ementalo
a5c2dcc33b Fix enabling signs 2012-07-06 13:49:29 +01:00
ementalo
9f7214a97f Improve the newlines in the yml files. (All ymls kits, etc need testing) 2012-07-05 16:10:36 +01:00
ementalo
d78c4930c1 Cleanup getHome(s) 2012-07-03 14:46:38 +01:00
ementalo
a4dea20292 Implement getHome(s) 2012-07-03 13:44:55 +01:00
Iaccidentally
3deda1952d Update master 2012-07-03 04:51:54 -03:00
ementalo
9579917efa Commandcost fix 2012-06-29 01:05:17 +01:00
ementalo
7ed07dedba Merge branch 'master' of https://github.com/essentials/Essentials 2012-06-28 14:00:14 +01:00
ementalo
93e80d7459 Fill out default spawn prevent values in protect 2012-06-28 13:59:38 +01:00
Iaccidentally
20908c5b5f Merge pull request #93 from necrodoom/patch-8
ID 97 fix, pointed out by branicyeti
2012-06-28 01:31:35 -07:00
necrodoom
5cdfa7681d ID 97 fix, pointed out by branicyeti 2012-06-28 10:57:17 +03:00
snowleo
4540b7144d Fix pattern in update, to read the version info correctly 2012-06-27 14:56:52 +02:00
ementalo
3a94057c4e Fix IDE cleverness with I18n 2012-06-27 13:44:36 +01:00
ementalo
4a80f704fe .com -> .net in test package of Update 2012-06-27 13:38:33 +01:00
ementalo
ac9c0cb0fc Merge branch 'master' of https://github.com/essentials/Essentials 2012-06-27 13:36:07 +01:00
ementalo
16d0b5c228 package name change to net.ess3 2012-06-27 13:35:39 +01:00
snowleo
5724f0b542 And another one 2012-06-27 14:32:02 +02:00
snowleo
653864da35 Missed files during rename 2012-06-27 14:24:05 +02:00
snowleo
c1230bd6ae Remove obsolete version output 2012-06-27 14:06:49 +02:00
snowleo
d88211bdf6 Fix EssentialsUpdate 2012-06-27 14:06:49 +02:00
snowleo
6123f17ef4 Renamed plugin from Essentials3 to Essentials-3 2012-06-27 14:06:49 +02:00
md_5
06f54fdbac That just leaves the big ol' core. Largely ignore Compat as it is very temporary. 2012-06-27 20:27:27 +10:00
md_5
4561a7f010 Fairly expansive cleanup of ess protect. 2012-06-27 20:23:06 +10:00
md_5
7bef2d3817 Cleanup signs, update and xmpp, more to come. 2012-06-27 20:03:26 +10:00
ementalo
3d96c9caaf Use essentials data folder location for protect db 2012-06-27 10:15:20 +01:00
ementalo
c5d93a7e54 Fix Colours 2012-06-27 00:29:50 +01:00
ementalo
44e71dcbb9 Import sappin mah sentry 2012-06-26 23:34:31 +01:00
ementalo
68463b4af8 Add some default values to protect config.
Figure out a better way to do this for HashMaps....
2012-06-26 23:31:38 +01:00
ementalo
1596ea1335 Fix GeoIP config 2012-06-26 23:08:33 +01:00
Iaccidentally
99a2ddee6f Merge branch 'master' of https://github.com/essentials/Essentials 2012-06-26 15:15:48 -04:00
Iaccidentally
ce740d6bd2 add fixed keepxp. 2012-06-26 15:15:11 -04:00
ementalo
a46f194832 Assign EssentialsTimer to the declared variable. Fixes gc 2012-06-26 14:40:54 +01:00
ementalo
39c8355ed7 implement request teleport 2012-06-26 14:23:37 +01:00
ementalo
88d8a9cee2 remove deprecated code 2012-06-26 13:37:38 +01:00
ementalo
845fa00856 fix some encoding issues for §
Don't attempt to close on null objects
2012-06-26 13:21:48 +01:00
ementalo
d1dad4fca5 change pattern match for essentials update 2012-06-26 11:36:54 +01:00
md_5
451abd2bec Bogus class reference to leave in jmx extensions 2012-06-26 19:18:18 +10:00
md_5
93f4713f8b Bit of maven magic, no more huge EssProtect jar. 2012-06-26 18:19:29 +10:00
Paul A.
e31008d1eb Fix build format on spanish properties file. 3.0 uses ${build.number} instead of TeamCity 2012-06-26 10:13:43 +02:00
md_5
459f1b70cb Compile time fixes. 2012-06-26 18:07:11 +10:00
Iaccidentally
ba82ff0f4e fixes to the spainish translation thanks to dx 2012-06-26 00:22:33 -04:00
ementalo
01f2b93abc @khobbits Add optional 2n'd param to temp ban reason TL key. 2012-06-26 00:07:33 +01:00
ementalo
a9fae0faad .properties updates 2012-06-26 00:01:09 +01:00
ementalo
61ac58bb2d Merge branch '3.0'
Conflicts:
	Essentials/src/com/earth2me/essentials/utils/textreader/KeywordReplacer.java
	Essentials/src/items.csv
2012-06-25 23:51:14 +01:00
ementalo
09ef49cbaf @SyntaxBlitz Fix /vanish with no arguments doing nothing 2012-06-25 23:47:51 +01:00
ementalo
5604231367 @necrodoom major slab alias expansion for items.csv
d0a8dc4812
2012-06-25 23:44:06 +01:00
ementalo
49465358f9 snowleo Prevent NPEs in KeywordReplacer
2c6a81a916
2012-06-25 23:38:20 +01:00
ementalo
da968c60a2 3.0 is now master 2012-06-25 23:15:38 +01:00
ementalo
6488882e1a Merge branch 'master' into 3.0
Conflicts:
	Essentials/src/com/earth2me/essentials/Essentials.java
	Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
	Essentials/src/com/earth2me/essentials/ISettings.java
	Essentials/src/com/earth2me/essentials/Settings.java
	Essentials/src/com/earth2me/essentials/Teleport.java
	Essentials/src/com/earth2me/essentials/User.java
	Essentials/src/com/earth2me/essentials/UserData.java
	Essentials/src/com/earth2me/essentials/bukkit/Enchantments.java
	Essentials/src/com/earth2me/essentials/commands/Commandban.java
	Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java
	Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
	Essentials/src/com/earth2me/essentials/commands/Commandexp.java
	Essentials/src/com/earth2me/essentials/commands/Commandhat.java
	Essentials/src/com/earth2me/essentials/commands/Commandignore.java
	Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
	Essentials/src/com/earth2me/essentials/commands/Commandmail.java
	Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
	Essentials/src/com/earth2me/essentials/commands/Commandpay.java
	Essentials/src/com/earth2me/essentials/commands/Commandr.java
	Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
	Essentials/src/com/earth2me/essentials/commands/Commandtpa.java
	Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java
	Essentials/src/com/earth2me/essentials/commands/Commandvanish.java
	Essentials/src/com/earth2me/essentials/commands/Commandwhois.java
	Essentials/src/com/earth2me/essentials/utils/textreader/KeywordReplacer.java
	Essentials/src/items.csv
	EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
	EssentialsChat/src/plugin.yml
	EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSign.java
	EssentialsSpawn/src/plugin.yml
	lib/bukkit.jar
	lib/craftbukkit.jar
2012-06-25 23:07:37 +01:00
ementalo
f8bb4d058d Merge fixes 2012-06-25 22:24:10 +01:00
ementalo
283a9ce9fa Merge branch 'master' into 3.0
More to follow

Conflicts:
	Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
	Essentials/src/com/earth2me/essentials/Kit.java
	Essentials/src/com/earth2me/essentials/Teleport.java
	Essentials/src/com/earth2me/essentials/User.java
	Essentials/src/com/earth2me/essentials/UserData.java
	Essentials/src/com/earth2me/essentials/commands/Commandfly.java
	Essentials/src/com/earth2me/essentials/commands/Commandgod.java
	Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java
	Essentials/src/com/earth2me/essentials/commands/Commandkit.java
	Essentials/src/com/earth2me/essentials/commands/Commandmute.java
	Essentials/src/items.csv
	Essentials/src/messages.properties
	Essentials/src/messages_cs.properties
	Essentials/src/messages_da.properties
	Essentials/src/messages_de.properties
	Essentials/src/messages_en.properties
	Essentials/src/messages_es.properties
	Essentials/src/messages_fr.properties
	Essentials/src/messages_it.properties
	Essentials/src/messages_nl.properties
	Essentials/src/messages_pl.properties
	Essentials/src/messages_pt.properties
	EssentialsSigns/src/com/earth2me/essentials/signs/SignBlockListener.java
	EssentialsSigns/src/com/earth2me/essentials/signs/SignEntityListener.java
	EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
2012-06-25 22:01:59 +01:00
ementalo
7ce9e42f35 Missing user methods 2012-06-21 19:35:48 +01:00
ementalo
bfbec1c46c Remove fake explosion.
Missing bits of commandr
2012-06-18 15:51:48 +01:00
ementalo
89eca7d991 2.9 Merges
Make /vanish follow the same rules as /fly, /god and /gamemode
Add espawn to plugin.yml
Allow your hat to be removed with /hat remove
void silent command failures on /hat (ie typing /hat fish will no longer silently return as if broken)
Fix /exp so it can be used in the console
Using /exp, show can't find player message, if no matching player is found

Replace op ignore exempt with ignore exempt chat permission:
essentials.chat.ignoreexempt
This permission won't prevent a player from ignoring the player, but the player will see the chat messages anyway.
Fix chat showing [spy] prefix when social spy was not required to see the message
Players should not be able to ignore Console
Also implement chat exempt permission in other commands.
Prevent joinbots from triggering join code, unless they are actually connected to the server and online.
2012-06-18 13:55:25 +01:00
ementalo
88e7e684af Messing around with whois syntax (TL's probably need some love) 2012-06-18 13:06:32 +01:00
ementalo
faea8af22e Adding mute status to /whois 2012-06-18 12:57:56 +01:00
ementalo
6db7de9c4d Enchantments update 2012-06-18 12:53:53 +01:00
ementalo
16f9163c45 Fix vanish 2012-06-18 12:52:36 +01:00
ementalo
8bdcec9072 Big boolean cleanup 2012-06-18 12:16:21 +01:00
ementalo
933d648ef6 3 char min length on /pay and /msg
Make /whois throw an error if no matching players are found.
2012-06-18 12:13:58 +01:00
ementalo
93246f020f Pass the actual player object to Bukkit.
Add the list that hides vanished players
2012-06-18 12:05:41 +01:00
ementalo
492239724c Broadcast command allows colour formatting. 2012-06-18 12:01:17 +01:00
ementalo
8cc61d3b33 Fix /lightning <player> <damage> to actually deal the proper set damage (5 or 25% by default) 2012-06-18 12:00:16 +01:00
ementalo
6677f75c52 Fix /essentials command to not show command debugging if there were no conflicts 2012-06-18 11:58:14 +01:00
ementalo
cfbfd5ee46 Try to be a little more sensible with stored cooldowns. 2012-06-18 11:54:40 +01:00
ementalo
ca21b92762 Fix /mute to follow same convention as /tjail
Fixed #2056
2012-06-18 11:39:27 +01:00
ementalo
962d49517b Missing event aborts in sign code. 2012-06-18 11:25:51 +01:00
ementalo
5545553345 Fix bug with /remove and minecarts 2012-06-18 11:22:39 +01:00
ementalo
dd8a3cfa4f Allow syntax: /god <player> <on/off> 2012-06-18 11:21:28 +01:00
ementalo
3a38e4102a Allow syntax: /fly <player> <on/off> 2012-06-18 10:58:44 +01:00
ementalo
dc4fc46c4b Latest translations and items.csv 2012-06-18 10:36:56 +01:00
ementalo
b9f529e53d Play a bit less greedy with events 2012-06-18 10:33:52 +01:00
ementalo
cc02df0f78 Itemdb shows durability of item in hand 2012-06-18 10:22:28 +01:00
ementalo
330c7271a7 Fix xmpp format stripping 2012-06-17 18:43:01 +01:00
Paul A.
cbe64fb1de Remove duplicate kittycannon in plugin.yml 2012-06-06 13:37:25 +02:00
ementalo
72b4ac257d Missing gm changes 2012-06-06 10:01:27 +01:00
Paul A.
9f3b3d5873 Merge pull request #73 from ementalo/3.0
2.9 -> 3.0 merge

Metrics has been disable atm.
Everything eeds a thorough going over, settings are prob in wrong place etc.
2012-06-05 18:20:06 -07:00
ementalo
5c0f944b2b 2.9 -> 3.0
Missing inventory events.
Updated polish translations
2012-06-06 02:12:23 +01:00
ementalo
ff5a82a14c 2.9 -> 3.0 merge 2012-06-06 01:53:34 +01:00
ementalo
9b7a40736e 2.9 -> 3.0 merge
Commented out a load of metrics code for the time being
2012-05-31 01:27:24 +01:00
ementalo
03a52cd070 2.9 -> 3.0
Permissions and command fixes
Kit cleanup (needs timestamp work still)
2012-05-31 00:40:35 +01:00
ementalo
cea3113df4 2.9 -> 3.0
Adding world pems to the various commands (this should be seperated out to its own method)
2012-05-30 13:12:50 +01:00
ementalo
53d54146d6 2.9 to 3.0
Trade file fixes
2012-05-29 22:51:15 +01:00
ementalo
0af4103b92 2.9 3.0 merge
Fix permissions checks
2012-05-29 22:20:52 +01:00
ementalo
a8af0a9259 2.9 to 3.0 merge 2012-05-29 22:06:04 +01:00
ementalo
373a48da54 Master -> 3.0 2012-05-28 00:37:28 +01:00
md_5
b69a16bcf0 Remove EssentialsAntiCheat pending the release of a better alternative in 2.0 by @neatmonster 2012-04-16 16:51:29 +10:00
md_5
3ac7823678 Bump Bukkit version and hopefully fix building! 2012-04-10 13:24:28 +10:00
snowleo
711d42d604 Server-Layer Part 1 2012-04-08 00:07:53 +02:00
md_5
fe8fb70db2 Fix artifacts (reverse-merged from commit a8d8adbefc) 2012-04-07 21:23:58 +10:00
md_5
d8f158ed71 Finish up the speed check. 2012-04-07 21:06:51 +10:00
md_5
ea50813107 Negate some 1 class packages 2012-04-05 20:52:31 +10:00
md_5
501e510cb3 But EvenPrime Bukkit does it for you! 2012-04-05 20:48:51 +10:00
md_5
2ce7f5726f Why are all these static methods final? Also what black magic is an enum set :O 2012-04-05 20:47:09 +10:00
md_5
3d3b57cb1b Hopefully get the basis of a speed check. This whole idea of checks needs to be cleaned up. 2012-04-05 20:37:20 +10:00
md_5
530c2c4c11 Add config option for disabling of cheats. Off by default 2012-04-05 20:24:56 +10:00
md_5
0bded50f5f Boost to an incredibly bulky config 2012-04-05 20:18:47 +10:00
md_5
a8d8adbefc Update Bukkit version 2012-04-05 19:38:29 +10:00
md_5
2566d8a0db Fix flying when not in creative mode 2012-03-24 10:37:11 +11:00
md_5
dc4ca6386f Fix all other references 2012-03-18 14:58:19 +11:00
snowleo
a79da0418d Fix ant copy 2012-03-18 04:54:26 +01:00
md_5
5014b93e16 Use maven for versioning. Note GroupManager versioning is broken. 2012-03-18 14:33:16 +11:00
md_5
b643f2c1d6 Add the maven compile plugin to ensure consistant builds 2012-03-18 14:21:17 +11:00
md_5
97530fd15d Disable soft deterrents for now (reverse-merged from commit ec5de33274)
Everyone in #essentials can burn andrewkm
2012-03-17 20:39:58 +11:00
md_5
ec5de33274 Disable soft deterrents for now 2012-03-17 20:19:03 +11:00
md_5
1d08e1ccda Last ditch attempt at making work properly 2012-03-17 20:13:38 +11:00
md_5
9ea91790e1 Fix the permissions 2012-03-17 19:53:15 +11:00
md_5
0075613223 [EAC] small cleanup regarding events 2012-03-17 17:02:19 +11:00
md_5
60ae0559bc Add craftbukkit.jar to the output, allowing for easy upload 2012-03-15 16:07:57 +11:00
md_5
7e3a9f85bf Why was that even there in the first place 2012-03-14 20:16:40 +11:00
md_5
95a1e2ca93 Some simple checks to get rid of those annoying, casual trouble makers 2012-03-14 20:15:26 +11:00
md_5
06068212c9 Move even further away from ant 2012-03-14 17:59:49 +11:00
snowleo
f9668be20e Enchantments are part of bukkit 2012-03-14 04:32:40 +01:00
snowleo
8880873759 Prototype for an abstraction layer for bukkit/mc/spout... 2012-03-14 04:25:40 +01:00
snowleo
90acb796f4 Trade is part of Economy 2012-03-14 03:58:53 +01:00
snowleo
e20f47ab3b Register is part of Economy 2012-03-14 03:57:29 +01:00
snowleo
c7a4d37f6e Moved CommandsHandler to commands package 2012-03-14 03:53:30 +01:00
snowleo
86c85ae92b ExecuteTimer is a Util 2012-03-14 03:50:49 +01:00
snowleo
822ad7ee29 New package bukkit for future use
Since the underlying apis will change (MC, Bukkit, Spout, …) and we probably want to reuse our code, we should start building an abstraction layer.
2012-03-14 03:48:19 +01:00
snowleo
43a933eef7 This belongs to utils 2012-03-14 03:38:27 +01:00
snowleo
67281efac1 The textreader classes are utils, so they should be under the utils package 2012-03-14 03:36:13 +01:00
snowleo
30c7a3af16 Move Economy API, MoneyHolder and WorthHolder to Economy package 2012-03-14 03:33:41 +01:00
snowleo
d0d71283cd Moving location code out of Util class 2012-03-14 03:26:21 +01:00
snowleo
df2abbf50b Missing files from the last commit 2012-03-14 03:24:19 +01:00
snowleo
4d452cfaef Moving the date code out of Util class 2012-03-14 03:18:53 +01:00
snowleo
1f8cf1935f Move utils to new package 2012-03-14 03:10:22 +01:00
snowleo
14a421f870 Moving backup to subpackage 2012-03-14 03:05:12 +01:00
snowleo
1bfe63da96 Splitting permissions and ranks (renamed from groups)
Deleted all old permissions handlers, since we fully use superperms now
2012-03-14 03:01:23 +01:00
snowleo
b571076915 Fix broken utf8 characters 2012-03-13 03:24:30 +01:00
snowleo
6ea02b53de Merging of master into 3.0
Squashed commit of the following:

commit dfd63a81ac
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 12 16:50:32 2012 +0000

    Missed a TL key.

commit dfbc1956c9
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 12 15:35:20 2012 +0000

    Fixing a few TL Keys

commit c0490c0890
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 12 15:21:37 2012 +0000

    New TL Key, allow formatting/colouring of help output.

commit 2da802d4b7
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 12 15:00:44 2012 +0000

    New permission: essentials.seen.banreason
    With this permission players can see why a user was banned, in /seen.

commit adffbab678
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 12 01:15:10 2012 +0000

    Adding jail time to /whois.

commit e11525ab64
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 12 01:00:57 2012 +0000

    Update offline user check.
    Add ban reason to /seen

commit 8dcd591beb
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 11 23:59:59 2012 +0000

    Update setworth to allow /setworth <price> ingame
    Allow /setworth to be used from console.

commit a40c936bcf
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 11 20:58:54 2012 +0000

    New Permission: essentials.lightning.others
    With this permission you can use /lightning <player>, without only strike based on direction.

commit 5c2622b390
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 11 01:46:01 2012 +0000

    Add Enderman check to EntityChangeEvent (Should fix sheep eating grass).

commit c7046b696a
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 10 21:42:46 2012 +0000

    Use ignoreCancelled on event registration.

commit 9ac5ce8a75
Author: KHobbits <rob@khobbits.co.uk>
Date:   Wed Mar 7 12:14:32 2012 +0000

    Update info.txt to hint at /einfo.

commit 5c55e18d33
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Mar 6 23:17:10 2012 +0000

    Fixing typo in config.yml

commit 1db5d61945
Merge: 0b60d4e 1e34a39
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 16:25:35 2012 +0000

    Merge branch 'release'

    Conflicts:
    	lib/bukkit.jar
    	lib/craftbukkit.jar

commit 1e34a396cd
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 15:51:15 2012 +0000

    Change starter kit to default to stone tools

commit ba96117f55
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 14:17:09 2012 +0000

    Temp fix to disable version check on R7

commit 96b217cbe8
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 08:41:19 2012 +0000

    Craftbukkit/Bukkit R7

commit 0dd5c0370e
Author: md_5 <md_5@bigpond.com>
Date:   Mon Mar 5 18:40:18 2012 +1100

    I dont think free noteblocks are a good idea

commit bdf32cde9e
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 00:39:37 2012 +0000

    Missed one.

commit e91ed60441
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 00:22:31 2012 +0000

    Fixing spawnmob count.

commit 8577202f48
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 00:19:40 2012 +0000

    Add listgroups as TL key

commit 7819b9d2f0
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 00:08:37 2012 +0000

    Apply colors to group tags.

commit 15c0565923
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 21:54:51 2012 +0000

    Build custom mob list /spawnmob

commit 2b25ca2932
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 21:43:24 2012 +0000

    CME

commit c7a6677d52
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 20:06:50 2012 +0000

    Adding starter/newbie kit to EssentialsSpawn
    Optimization to EssentialsSpawn join event.

commit c3d5b32986
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 16:17:16 2012 +0000

    Extra command alias.

commit cbfb524195
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 10:11:58 2012 +0000

    Allow more currency customization.
    Added currency key to messages.

commit b16a1f7237
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 09:20:03 2012 +0000

    Adding option to modify all users balances (including offline) /eco reset ** <amount>

commit e28f1b1be3
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 08:18:25 2012 +0000

    Half-revert double backflip. 10 points.
    (op prefix changes that md-5 broke, thinking I broke op prefixes)

commit b512a243e7
Author: md_5 <md_5@bigpond.com>
Date:   Sun Mar 4 15:43:00 2012 +1100

    Fix op colours, which KHobbits broke!

commit 873c9880dd
Author: Chris Ward <chris@chrisgward.com>
Date:   Sat Mar 3 19:21:27 2012 +1100

    Cleanup

    Signed-off-by: Chris Ward <chris@chrisgward.com>

commit e6736e48a5
Author: Chris Ward <chris@chrisgward.com>
Date:   Sat Mar 3 18:07:43 2012 +1100

    Cleanup

    Signed-off-by: Chris Ward <chris@chrisgward.com>

commit caf598f55b
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 07:09:41 2012 +0000

    Capital case for formatting.

commit 619e099a04
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 07:03:54 2012 +0000

    Force all kits to lowercase.

commit faba1e3604
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 05:27:02 2012 +0000

    *make it look like i'm doing something*

commit 7cb728b15f
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 05:09:03 2012 +0000

    I think switches are better.

commit 3e3c7f0d54
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 19:05:30 2012 +0000

    Only update displayname on world change, not every teleport.

commit a45c19a08b
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 17:05:55 2012 +0000

    Extra command aliases

commit eb74a1de9c
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 17:03:34 2012 +0000

    Make the antioch message optional.

commit 8450734cf1
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 16:54:12 2012 +0000

    Entity event cleanup

commit 016299a1dd
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 16:33:20 2012 +0000

    Shouldn't really be canceling events at priority monitor, oops.

commit d27ff9abb6
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 16:29:06 2012 +0000

    Don't think we need animation event anymore.

commit cdf5d45483
Author: Iaccidentally <coryhuckaby@gmail.com>
Date:   Thu Mar 1 23:10:32 2012 -0500

    update messages.properties for the new bukkit download link (ci.bukkit,org no longer works)

commit 0b60d4efe2
Author: md_5 <md_5@bigpond.com>
Date:   Mon Mar 5 18:40:18 2012 +1100

    I dont think free noteblocks are a good idea

commit d31e434e4d
Author: md_5 <md_5@bigpond.com>
Date:   Mon Mar 5 18:28:04 2012 +1100

    Allow spamming of this, by reducing explosion damage to 0, same effect, no mess

commit fabc1c3dd9
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 00:39:37 2012 +0000

    Missed one.

commit 68fbc40605
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 00:22:31 2012 +0000

    Fixing spawnmob count.

commit 8b7c5cf2ed
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 00:19:40 2012 +0000

    Add listgroups as TL key

commit 1811631b93
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Mar 5 00:08:37 2012 +0000

    Apply colors to group tags.

commit 7cec1564b9
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 21:54:51 2012 +0000

    Build custom mob list /spawnmob

commit a75eefcdd4
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 21:43:24 2012 +0000

    CME

commit 6a9027da6d
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 20:06:50 2012 +0000

    Adding starter/newbie kit to EssentialsSpawn
    Optimization to EssentialsSpawn join event.

commit e55aa3cea7
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 16:17:16 2012 +0000

    Extra command alias.

commit 1ce2c60bf4
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 16:01:49 2012 +0000

    Updating Craftbukkit #2034 Bukkit #1378

commit 6da705c86f
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 10:11:58 2012 +0000

    Allow more currency customization.
    Added currency key to messages.

commit c3fa56322b
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 09:20:03 2012 +0000

    Adding option to modify all users balances (including offline) /eco reset ** <amount>

commit 53cfab229b
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 08:18:25 2012 +0000

    Half-revert double backflip. 10 points.
    (op prefix changes that md-5 broke, thinking I broke op prefixes)

commit b62217f301
Merge: 860f6a4 d9a8453
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Mar 4 08:13:29 2012 +0000

    Merge branch 'master' of github.com:essentials/Essentials

commit d9a8453995
Author: md_5 <md_5@bigpond.com>
Date:   Sun Mar 4 15:43:00 2012 +1100

    Fix op colours, which KHobbits broke!

commit e6181928e8
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Mar 3 17:01:53 2012 +0100

    Cleanup of /spawnmob

commit 860f6a41ac
Merge: 8aa7b1f cea5c81
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 13:49:26 2012 +0000

    Merge branch 'master' of github.com:essentials/Essentials

commit 8aa7b1f301
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 13:48:58 2012 +0000

    Update CB #2032 B #1377
    Min CB #2015

commit cea5c81d44
Merge: 504f28d 35576ab
Author: md-5 <md_5@bigpond.com>
Date:   Sat Mar 3 00:34:00 2012 -0800

    Merge pull request #56 from Iaccidentally/patch-4

    Allow spawning baby villagers and ocelots

commit 504f28df1a
Merge: 3360551 74a5755
Author: md-5 <md_5@bigpond.com>
Date:   Sat Mar 3 00:31:48 2012 -0800

    Merge pull request #55 from chrisward/master

    Just a really small cleanup

commit 74a57553f6
Author: Chris Ward <chris@chrisgward.com>
Date:   Sat Mar 3 19:21:27 2012 +1100

    Cleanup

    Signed-off-by: Chris Ward <chris@chrisgward.com>

commit 35576ab64a
Author: Iaccidentally <coryhuckaby@gmail.com>
Date:   Sat Mar 3 03:04:54 2012 -0500

    add little babbys

commit 33605517ff
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 07:09:41 2012 +0000

    Capital case for formatting.

commit 6da6e4d2e8
Author: Chris Ward <chris@chrisgward.com>
Date:   Sat Mar 3 18:07:43 2012 +1100

    Cleanup

    Signed-off-by: Chris Ward <chris@chrisgward.com>

commit c0fa03ede2
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 07:03:54 2012 +0000

    Force all kits to lowercase.

commit 301b609e93
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 05:27:02 2012 +0000

    *make it look like i'm doing something*

commit b6bbe237ea
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Mar 3 05:09:03 2012 +0000

    I think switches are better.

commit de7ab13c03
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 19:05:30 2012 +0000

    Only update displayname on world change, not every teleport.

commit 7a0f4da860
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 17:05:55 2012 +0000

    Extra command aliases

commit 1bbbfe1c96
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 17:03:34 2012 +0000

    Make the antioch message optional.

commit 25ebe68389
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 16:54:12 2012 +0000

    Entity event cleanup

commit 7737d19c5a
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 16:33:20 2012 +0000

    Shouldn't really be canceling events at priority monitor, oops.

commit 622ca4bf8a
Author: KHobbits <rob@khobbits.co.uk>
Date:   Fri Mar 2 16:29:06 2012 +0000

    Don't think we need animation event anymore.

commit b090afbeb3
Merge: 21a248e dce1495
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Mar 1 20:15:16 2012 -0800

    Merge pull request #54 from Iaccidentally/patch-3

    update messages.properties for the new bukkit download link (ci.bukkit,o...

commit dce149511e
Author: Iaccidentally <coryhuckaby@gmail.com>
Date:   Thu Mar 1 23:10:32 2012 -0500

    update messages.properties for the new bukkit download link (ci.bukkit,org no longer works)

commit 21a248e94d
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Mar 2 01:30:52 2012 +0100

    Will be removed until the next release XD

commit f1aed4b521
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Mar 2 00:40:50 2012 +0100

    Better cats

commit 7564ebf79e
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Mar 2 00:18:31 2012 +0100

    Fix world heights

commit b9aecbe1d4
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Mar 2 00:12:22 2012 +0100

    Min version CB# 2004

commit 49eb451a76
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Mar 2 00:09:50 2012 +0100

    New eggs

commit 64d866a77d
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Mar 2 00:06:57 2012 +0100

    New Entities and Items for 1.2

commit f75779aa7a
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 23:57:34 2012 +0100

    CB#2004 B#1368

commit 5622882602
Merge: b3d3928 6df3b90
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Mar 1 22:37:15 2012 +0000

    Merge branch 'master' of github.com:essentials/Essentials

commit b3d3928db8
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Mar 1 22:36:51 2012 +0000

    Kit sign cleanup

commit 6df3b9008a
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 23:23:23 2012 +0100

    update inventory

commit c36ca65e09
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 23:09:48 2012 +0100

    Bukkit broke this sign :(

commit 2e788802fe
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Mar 1 22:04:50 2012 +0000

    Fix kit timers resetting on server restart.

commit b0552019f5
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Mar 1 21:47:01 2012 +0000

    Fix version matching.

commit dae69622a5
Merge: 696b930 a8da3ee
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 19:08:52 2012 +0100

    Merge branch 'refs/heads/master' into release

commit 696b930fb2
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 17:33:09 2012 +0100

    EntityType instead of CreatureType

commit e43a62f992
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 16:17:40 2012 +0100

    Requires #1988 because of the new Inventory stuff

commit 02c1cb05c7
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 16:15:37 2012 +0100

    Updated to R6

commit b44d738867
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 15:56:17 2012 +0100

    CB# 1988 B# 1360

commit e1818f7e62
Author: md_5 <md_5@bigpond.com>
Date:   Thu Mar 1 14:40:57 2012 +1100

    Separate config sections evenly

commit e5081db7e4
Author: md_5 <md_5@bigpond.com>
Date:   Thu Mar 1 12:27:59 2012 +1100

    Remove old, unwanted manifest.mf files

commit ba346bd797
Author: ElgarL <ElgarL@palmergames.com>
Date:   Tue Feb 28 10:46:10 2012 +0000

    Make 'manload' reload the config correctly.

commit 0670ece7f3
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Feb 25 17:57:26 2012 +0000

    Updating Bukkit: CB #1858, B #1334

commit a8da3eebd7
Merge: 056303b 3823e7a
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 17:33:25 2012 +0100

    Merge remote-tracking branch 'origin/groupmanager'

commit 056303b53c
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 17:33:09 2012 +0100

    EntityType instead of CreatureType

commit 454f7d30de
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 16:17:40 2012 +0100

    Requires #1988 because of the new Inventory stuff

commit 6d1c270976
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 16:15:37 2012 +0100

    Updated to R6

commit d1001274bb
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Mar 1 15:56:17 2012 +0100

    CB# 1988 B# 1360

commit 3099855562
Merge: 3f26d4a 833a5b2
Author: md_5 <md_5@bigpond.com>
Date:   Thu Mar 1 16:23:21 2012 +1100

    Merge remote-tracking branch 'origin/master'

commit 3f26d4ad98
Author: md_5 <md_5@bigpond.com>
Date:   Thu Mar 1 14:40:57 2012 +1100

    Separate config sections evenly

commit bae337cc49
Author: md_5 <md_5@bigpond.com>
Date:   Thu Mar 1 12:27:59 2012 +1100

    Remove old, unwanted manifest.mf files

commit 3823e7a108
Author: ElgarL <ElgarL@palmergames.com>
Date:   Tue Feb 28 10:46:10 2012 +0000

    Make 'manload' reload the config correctly.

commit 1c2221f52f
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Feb 27 15:31:43 2012 +0000

    Adding option to log all eco api transactions.

commit 1b780a4364
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Feb 27 03:40:18 2012 +0000

    Prevent EssSpawn trying to handle spawning of jailed players.

commit ac3e65a829
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Feb 27 03:24:58 2012 +0000

    Change jail listener to catch respawn at Highest

commit 332f19177e
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 05:10:04 2012 +0000

    Allow people to hit exactly 'min money'.

commit 6ab57b9abe
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 05:06:03 2012 +0000

    Cleanup.

commit 862f3aad59
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 05:01:40 2012 +0000

    Adjustments to negative eco give/take.

commit e277acf80e
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 04:27:13 2012 +0000

    Display users new balance on /eco give/take.

commit 9f893e68e9
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 04:15:14 2012 +0000

    Add Minimum Balance, to allow people to manage overdrafts.

commit 833a5b2b55
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Feb 27 15:31:43 2012 +0000

    Adding option to log all eco api transactions.

commit 340f0c68eb
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Feb 27 03:40:18 2012 +0000

    Prevent EssSpawn trying to handle spawning of jailed players.

commit a5e3182dad
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Feb 27 03:24:58 2012 +0000

    Change jail listener to catch respawn at Highest

commit 10ae9c3aa2
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 05:10:04 2012 +0000

    Allow people to hit exactly 'min money'.

commit bcf903de92
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 05:06:03 2012 +0000

    Cleanup.

commit ad08d27504
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 05:01:40 2012 +0000

    Adjustments to negative eco give/take.

commit d24f77dbd5
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 04:27:13 2012 +0000

    Display users new balance on /eco give/take.

commit a5b38ce1a4
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 26 04:15:14 2012 +0000

    Add Minimum Balance, to allow people to manage overdrafts.

commit 5d048d2c1d
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Feb 25 17:57:26 2012 +0000

    Updating Bukkit: CB #1858, B #1334

commit 13d3cc3306
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Feb 25 17:40:00 2012 +0000

    Lowering min bukkit to r4 - 1838, this build should still be compatible.

commit 9f02fb4dd4
Merge: 8042cef 07baa6e
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Feb 25 17:22:39 2012 +0000

    Merge branch 'master' into release

commit 07baa6e611
Merge: 28f478d 50bd586
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Feb 25 17:22:01 2012 +0000

    Merge remote branch 'remotes/origin/groupmanager'

commit 50bd5869bf
Author: ElgarL <ElgarL@palmergames.com>
Date:   Sat Feb 25 09:29:54 2012 +0000

    Prevent promoting players to, and demoting to GlobalGroups.

commit fa49fc91d2
Author: ElgarL <ElgarL@palmergames.com>
Date:   Sat Feb 25 09:22:54 2012 +0000

    Prevent adding inheritances to globalgroups. These are permissions
    collections, not player groups.

commit 28f478dd04
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Feb 23 17:25:00 2012 +0000

    Write to user files less, on money update.

commit 6fb8dad0ec
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Feb 23 15:17:23 2012 +0000

    Balance top now has server total on first line.
    Balance top will update ess balance backup if using register/vault eco.

commit 9f605e9a88
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Feb 23 14:49:23 2012 +0000

    Fixing upgrade script to allow powertool upgrade.

commit e5b91dae73
Author: KHobbits <rob@khobbits.co.uk>
Date:   Wed Feb 22 12:32:51 2012 +0000

    Fixing kits for new config classes.

commit e1749fecd1
Author: KHobbits <rob@khobbits.co.uk>
Date:   Wed Feb 22 01:29:37 2012 +0000

    Extra command aliases.

commit 358edff798
Author: KHobbits <rob@khobbits.co.uk>
Date:   Wed Feb 22 00:22:22 2012 +0000

    Powertools dispatch commands as delayed tasks (should reduce any conflict issues).

commit 34f13ba89c
Author: KHobbits <rob@khobbits.co.uk>
Date:   Wed Feb 22 00:11:21 2012 +0000

    Switch powertools to use different event.
    Reduce multiple triggering of powertool events.
    Abort event when used with powertool.

commit 945ba6f8ab
Author: KHobbits <rob@khobbits.co.uk>
Date:   Wed Feb 22 00:10:13 2012 +0000

    Fix powertools with new config format.

commit 46f05ee92f
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Feb 21 22:14:11 2012 +0000

    Check to see if home section exists.

commit 6d46fc66ce
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Feb 21 22:12:37 2012 +0000

    Fixing home list.

commit ed7fe9213f
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Feb 21 21:39:25 2012 +0000

    Fix /sudo message display.

commit 9c68cbae72
Author: ElgarL <ElgarL@palmergames.com>
Date:   Tue Feb 21 18:40:54 2012 +0000

    Removed BukkitPermsOverride as this is now the default with bukkit
    handling child nodes.

commit c0df771539
Author: ElgarL <ElgarL@palmergames.com>
Date:   Tue Feb 21 18:38:08 2012 +0000

    Update for Bukkit R5 compatability.
    Removed some unused variables.

commit 9bd0c33fef
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Feb 21 18:41:27 2012 +0100

    Never give our user object to other plugins!

commit 8042cefd3d
Merge: 16a0f44 514f07c
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Feb 19 01:20:50 2012 +0000

    Merge branch 'master' into release

commit 16a0f44b4d
Merge: 1a2acb4 7633b13
Author: KHobbits <rob@khobbits.co.uk>
Date:   Wed Feb 15 19:09:02 2012 +0000

    Merge remote branch 'remotes/origin/master' into release

commit 1a2acb43ae
Merge: 36d07cb f0c0ee1
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Feb 14 23:56:02 2012 +0000

    Merge branch 'master' into release

commit 36d07cb539
Merge: 6ca1cde effe0d5
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Feb 13 17:35:05 2012 +0000

    Merge branch 'master' into release

commit 6ca1cdec4f
Merge: e2abf05 86a1dda
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Feb 2 11:41:18 2012 +0000

    Merge branch 'master' into release

commit e2abf05a27
Merge: d9e6f29 8500542
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Jan 30 05:36:03 2012 +0000

    Merge branch 'master' into release

commit d9e6f2975a
Merge: d8ac358 2f1d9ad
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Jan 29 21:44:30 2012 +0000

    Merge branch 'master' into release

commit d8ac3587ac
Merge: 85c4fbd a2418a6
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Jan 29 21:39:05 2012 +0000

    Merge branch 'master' into release

commit 85c4fbdf4f
Merge: 5a7f38f dff8f54
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Jan 29 21:20:56 2012 +0000

    Merge branch 'master' into release

commit 5a7f38fa29
Merge: 417148f 6a5fefb
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Jan 29 05:00:04 2012 +0000

    Merge branch 'master' into release

commit 417148f5da
Merge: a85cbdd 8f03505
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sun Jan 29 01:45:40 2012 +0000

    Merge branch 'master' into release

commit a85cbdd505
Merge: b4d9197 c6aa340
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Jan 28 12:59:15 2012 +0000

    Merge branch 'master' into release

commit b4d91978c7
Merge: 16bde87 8aa260e
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Jan 26 04:51:10 2012 +0100

    Merge branch 'refs/heads/master' into release

commit 16bde87982
Merge: 2705336 b8944d0
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Jan 26 00:31:05 2012 +0000

    Merge branch 'master' into release

commit 270533652b
Merge: 03d6402 324dd05
Author: ementalo <suror@gmx.co.uk>
Date:   Wed Jan 25 14:29:05 2012 +0000

    Merge branch 'master' into release

commit 03d640260d
Merge: f27b229 da3a6af
Author: KHobbits <rob@khobbits.co.uk>
Date:   Wed Jan 25 00:04:08 2012 +0000

    Merge branch 'master' into release

commit f27b2290dc
Merge: efda9be 0ea41d9
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Jan 24 03:43:49 2012 +0100

    Merge branch 'refs/heads/master' into release

commit efda9beece
Merge: c7c7e5e 4b61ac9
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Jan 21 17:19:12 2012 +0000

    Merge branch 'master' into release

commit c7c7e5e4ce
Merge: f61f801 f26cccb
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Jan 16 12:43:09 2012 +0000

    Merge remote branch 'remotes/origin/master' into release

commit f61f80164d
Merge: d16fef9 f0def90
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Jan 14 15:52:55 2012 +0000

    Merge branch 'master' into release

commit d16fef9f7f
Merge: 4425d53 43f1c0f
Author: KHobbits <rob@khobbits.co.uk>
Date:   Sat Jan 14 13:16:33 2012 +0000

    Merge branch 'master' into release
    ~ GM needs testing before release ~

commit 4425d53664
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Dec 20 12:24:59 2011 +0100

    Only info not a warning if a file is missing

commit ee5e015a63
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Dec 20 12:20:12 2011 +0100

    Correctly match release and non release versions of bukkit.

commit 839ce3d526
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Dec 20 11:57:22 2011 +0100

    Fix sending our player object to other plugins.

commit cc06117210
Merge: cbd5b6c 5a092f0
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Dec 19 12:07:28 2011 +0100

    Merge branch 'refs/heads/master' into release

commit cbd5b6c0f4
Merge: 867e66e fec3b61
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Dec 19 05:04:15 2011 +0000

    Merge remote branch 'remotes/origin/master' into release

commit 867e66e774
Merge: 45ffeaf 9eaebad
Author: snowleo <schneeleo@gmail.com>
Date:   Wed Dec 14 11:56:09 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 45ffeaffec
Merge: f91b622 79861b1
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Dec 13 23:52:58 2011 +0100

    Merge branch 'refs/heads/master' into release

commit f91b622646
Merge: 40a9c28 70bd9bd
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Dec 13 10:32:59 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 40a9c28699
Merge: 081491d e37ab86
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Dec 12 23:15:48 2011 +0000

    Merge branch 'master' into release

commit 081491d0a1
Merge: 8d0230d f936cd5
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Dec 12 23:06:40 2011 +0000

    Merge branch 'master' into release

commit 8d0230d6a8
Merge: 37e5260 e379ac5
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Dec 8 05:41:00 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 37e5260cda
Merge: 19b8031 e169e95
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Nov 29 21:55:09 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 19b8031933
Merge: 99211fd 91cdff9
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Nov 28 22:42:17 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 99211fd407
Merge: 3d839c2 5e24584
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Nov 28 20:28:05 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 3d839c2b21
Merge: e1e7a1c 9acc7db
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Nov 28 20:03:09 2011 +0100

    Merge branch 'refs/heads/master' into release

commit e1e7a1cfdb
Merge: 0ed7f87 b637e49
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Nov 28 04:23:38 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 0ed7f87ee0
Merge: 579bbc9 aceda4c
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Nov 27 20:59:19 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 579bbc9f2c
Merge: e672de9 af456a7
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Nov 24 04:26:05 2011 +0100

    Merge branch 'refs/heads/master' into release

commit e672de949c
Merge: f72762b 19f5a23
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Nov 20 21:46:02 2011 +0100

    Merge branch 'refs/heads/master' into release

commit f72762bcb2
Merge: 7ecc3c2 4f8319b
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Nov 19 16:04:00 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 7ecc3c25b0
Merge: adcffba 41c0385
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Nov 17 19:06:44 2011 +0100

    Merge branch 'refs/heads/master' into release

commit adcffba7cf
Merge: e271e60 2a4c26e
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Nov 17 16:34:39 2011 +0100

    Merge branch 'refs/heads/master' into release

commit e271e60144
Merge: 16be869 c5c29ae
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Nov 17 15:34:27 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 16be86953f
Merge: 1f527cd eda827b
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Nov 15 22:52:42 2011 +0100

    Merge branch 'refs/heads/master' into release

commit 1f527cdb9e
Merge: 11e8240 90c9fe7
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Nov 8 05:17:42 2011 +0000

    Merge branch 'essmaster' into essrelease

commit 11e8240c5c
Merge: 4aecc03 aa922c5
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Oct 22 11:55:01 2011 +0200

    Merge branch 'refs/heads/master' into release

    Conflicts:
    	EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java

commit 4aecc034c2
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Oct 11 22:51:30 2011 +0100

    Fixing typo in release build.

commit a111a07bca
Merge: eb71097 9ec398b
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Oct 11 20:06:23 2011 +0100

    Merge branch 'essmaster' into essrelease

commit eb71097546
Merge: c7fcb72 1bb3eb0
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Oct 11 17:52:56 2011 +0100

    Merge remote branch 'remotes/ess/master' into essrelease

commit c7fcb72d6c
Merge: 04af8ef 02ee314
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Oct 10 17:21:48 2011 +0100

    Merge remote branch 'remotes/ess/master' into essrelease

commit 04af8ef329
Merge: 4cdf803 a34c92d
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Oct 10 00:30:47 2011 +0200

    Merge branch 'master' into release

commit 4cdf803ab7
Merge: 4595c15 6012086
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Oct 9 23:52:15 2011 +0200

    Merge branch 'master' into release

commit 4595c15bee
Merge: 1e3d2fb 8199416
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Oct 9 17:54:59 2011 +0200

    Merge branch 'master' into release

commit 1e3d2fbfd2
Merge: 57c25bf 313df99
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Oct 8 19:43:07 2011 +0200

    Merge branch 'master' into release

commit 57c25bf151
Merge: ae030b2 55fc8bd
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Oct 4 23:07:30 2011 +0200

    Merge branch 'master' into release

commit ae030b227a
Merge: 4f85751 0645d58
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Oct 4 22:20:10 2011 +0200

    Merge branch 'master' into release

commit 4f85751694
Merge: 6b0d0da 65a78a6
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Oct 4 21:34:28 2011 +0200

    Merge branch 'master' into release

commit 6b0d0daa2e
Merge: 401498a 9718e65
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Oct 4 14:40:12 2011 +0100

    Merge branch 'essmaster' into essrelease

commit 401498a4f7
Merge: 8bb5018 acdad5c
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Oct 4 09:51:51 2011 +0100

    Merge branch 'essmaster' into essrelease

commit 8bb50189bc
Merge: eb665a0 f2407bc
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Sep 29 00:43:42 2011 +0100

    Merge remote branch 'remotes/ess/master' into essrelease

commit eb665a059a
Merge: 3dc29be a8cfbe1
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Sep 29 00:40:16 2011 +0100

    Merge branch 'essmaster' into essrelease

commit 3dc29be083
Merge: 82e5447 ee00fb7
Author: KHobbits <rob@khobbits.co.uk>
Date:   Tue Sep 27 02:01:52 2011 +0100

    Merge branch 'essmaster' into essrelease

commit 82e5447526
Merge: 066f3fd 8b23f86
Author: KHobbits <rob@khobbits.co.uk>
Date:   Mon Sep 26 23:06:02 2011 +0100

    Merge branch 'essmaster' into essrelease

commit 066f3fd726
Merge: f0acf73 e9c0bb2
Author: KHobbits <rob@khobbits.co.uk>
Date:   Thu Sep 22 15:29:47 2011 +0100

    Merge branch 'essmaster' into essrelease

commit f0acf733a5
Merge: 96c4dd2 33c6fc1
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Sep 22 10:47:58 2011 +0200

    Merge branch 'master' into release

commit 96c4dd2ab9
Merge: df3b9a7 998d097
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Sep 5 14:15:07 2011 +0200

    Merge branch 'master' into release

commit df3b9a7ef9
Merge: 70a3a59 fd6f768
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Sep 4 20:47:46 2011 +0200

    Merge branch 'master' into release

commit 70a3a5919e
Merge: 688d37e fc7a3e0
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Sep 2 00:05:05 2011 +0200

    Merge branch 'master' into release

commit 688d37ee60
Merge: 3dcf8bc 382bd24
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Sep 1 16:35:47 2011 +0200

    Merge branch 'master' into release

commit 3dcf8bc8fc
Merge: 7039d61 ecc1a0a
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Aug 30 09:46:49 2011 +0200

    Merge branch 'master' into release

commit 7039d613ee
Merge: 256c963 12e3eb1
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Aug 29 20:43:49 2011 +0200

    Merge branch 'master' into release

commit 256c963370
Merge: 7b8c2a4 d818f70
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Aug 21 21:44:58 2011 +0200

    Merge branch 'master' into release

commit 7b8c2a4575
Merge: 7f1ba0d 040e2be
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Aug 21 20:22:28 2011 +0200

    Merge branch 'master' into release

commit 7f1ba0d6ae
Merge: 7e5b79a 2b48045
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Aug 19 02:32:56 2011 +0200

    Merge branch 'master' into release

commit 7e5b79aa14
Merge: 086343e a53d8dd
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Aug 19 02:10:36 2011 +0200

    Merge branch 'master' into release

commit 086343ee48
Merge: a1ad512 c79ac59
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Aug 19 01:06:52 2011 +0200

    Merge branch 'master' into release

commit a1ad512a80
Merge: 9bb2ef9 6a9865c
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Aug 19 00:42:26 2011 +0200

    Merge branch 'master' into release

commit 9bb2ef9cbe
Merge: 832910d beb34a7
Author: snowleo <schneeleo@gmail.com>
Date:   Wed Jul 27 01:04:37 2011 +0200

    Merge branch 'master' into release

commit 832910d480
Merge: 13da2b2 1645417
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 23 22:34:43 2011 +0200

    Merge branch 'master' into release

commit 13da2b2924
Merge: 84ac520 7aea9e7
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 23 20:06:00 2011 +0200

    Merge branch 'master' into release

commit 84ac520353
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 23 20:05:44 2011 +0200

    Master and Release branch are now identical again.

    Removed warning for an older bukkit version.

commit 5613975314
Merge: 662d30a dc0ca35
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 23 03:11:14 2011 +0200

    Merge branch 'master' into release

commit 662d30ae45
Merge: 57bee44 4099755
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 23 03:07:38 2011 +0200

    Merge branch 'master' into release

commit 57bee443b1
Merge: 621618e 0f3c0e8
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 23 02:39:37 2011 +0200

    Merge branch 'master' into release

commit 621618e41f
Merge: 6ccb608 5455917
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Jul 21 02:58:39 2011 +0200

    Merge branch 'master' into release

commit 6ccb60813a
Merge: b341199 2067bb8
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Jul 21 02:52:25 2011 +0200

    Merge branch 'master' into release

commit b34119901e
Merge: b317aef 4f31d27
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Jul 21 02:29:45 2011 +0200

    Merge branch 'master' into release

commit b317aef8c9
Merge: fdbc6fa 8b41219
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Jul 21 00:31:39 2011 +0200

    Merge branch 'master' into release

commit fdbc6fa94f
Merge: 0ffe249 28dd14d
Author: snowleo <schneeleo@gmail.com>
Date:   Wed Jul 20 23:18:34 2011 +0200

    Merge branch 'master' into release

commit 0ffe24903a
Merge: e550a7c f6e6e00
Author: snowleo <schneeleo@gmail.com>
Date:   Wed Jul 20 23:09:40 2011 +0200

    Merge branch 'master' into release

commit e550a7cc44
Merge: 82165a2 9efc084
Author: snowleo <schneeleo@gmail.com>
Date:   Wed Jul 20 22:37:43 2011 +0200

    Merge branch 'master' into release

commit 82165a2af6
Merge: 63a4fe3 815b700
Author: snowleo <schneeleo@gmail.com>
Date:   Wed Jul 20 22:22:02 2011 +0200

    Merge branch 'master' into release

commit 63a4fe32c1
Merge: 1c44a25 06dc9c2
Author: snowleo <schneeleo@gmail.com>
Date:   Wed Jul 20 18:40:04 2011 +0200

    Merge branch 'master' into release

commit 1c44a25a4a
Merge: cf21ece 0483635
Author: snowleo <schneeleo@gmail.com>
Date:   Wed Jul 20 12:13:24 2011 +0200

    Merge branch 'master' into release

commit cf21ecee2e
Merge: 5467e50 3b59dd0
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Jul 19 12:09:48 2011 +0200

    Merge branch 'master' into release

commit 5467e502a5
Merge: 6af9ec2 e805d10
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Jul 19 11:42:18 2011 +0200

    Merge branch 'master' into release

commit 6af9ec266b
Merge: faa7e0e 150a0e0
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Jul 19 01:52:44 2011 +0200

    Merge branch 'master' into release

commit faa7e0e7a9
Merge: aa36060 fdbb651
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Jul 19 00:47:14 2011 +0200

    Merge branch 'master' into release

commit aa3606007a
Merge: db59749 d0bf190
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Jul 19 00:42:10 2011 +0200

    Merge branch 'master' into release

commit db5974970d
Merge: ba2539d d2bc7e0
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Jul 18 20:55:31 2011 +0200

    Merge branch 'master' into release

commit ba2539db67
Merge: 21d0661 e3a470e
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Jul 18 02:30:16 2011 +0200

    Merge branch 'master' into release

commit 21d0661d79
Merge: 9f3eb46 1556801
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Jul 18 01:49:45 2011 +0200

    Merge branch 'master' into release

commit 9f3eb461a9
Merge: 34b0deb 48230f6
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 16 17:04:46 2011 +0200

    Merge branch 'master' into release

commit 34b0deba29
Merge: d9a93d8 088f50c
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 16 16:53:13 2011 +0200

    Merge branch 'master' into release

commit d9a93d8dff
Merge: 7477763 5ad12b5
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 16 14:04:49 2011 +0200

    Merge branch 'master' into release

commit 747776344b
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 16 13:32:10 2011 +0200

    Fixing merge error

commit f979a79081
Merge: 367e984 e6685ab
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 16 13:25:12 2011 +0200

    Merge branch 'master' into release

    Conflicts:
    	Essentials/src/com/earth2me/essentials/Essentials.java
    	Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
    	Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
    	Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
    	Essentials/src/com/earth2me/essentials/register/payment/Methods.java
    	Essentials/src/items.csv
    	EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
    	lib/bukkit-0.0.1-SNAPSHOT.jar
    	lib/craftbukkit-0.0.1-SNAPSHOT.jar

commit 367e9840cc
Author: snowleo <schneeleo@gmail.com>
Date:   Tue Jun 7 22:18:57 2011 +0200

    Fix save inventory after logout for new players.

commit ea590c2ed1
Author: snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>
Date:   Sun Jun 5 00:00:41 2011 +0000

    NPE fix for offline users in UserData

    git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1583 e251c2fe-e539-e718-e476-b85c1f46cddb

commit d93120257b
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 2 01:10:48 2011 +0200

    Update of bukkit version number in essentials class

commit e763b362d9
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jul 2 01:09:19 2011 +0200

    CB# 953
    B# 754

commit e5eb1ca0cb
Author: snowleo <schneeleo@gmail.com>
Date:   Fri Jul 1 10:52:59 2011 +0200

    More names for pistons (items.csv)
    Fix for /unlimited and pistons

commit ea2649db5e
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Jun 30 19:16:50 2011 +0200

    Updated items.csv

commit b53fc9cadc
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Jun 30 18:54:05 2011 +0200

    Renamed functions

commit 4b35e1b729
Author: snowleo <schneeleo@gmail.com>
Date:   Thu Jun 30 18:43:23 2011 +0200

    CB #946
    B #750

commit 40e106db13
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Jun 27 11:57:03 2011 +0200

    Fix /spawner command

    The name had to be first letter uppercase, the rest lowercase

commit 3dc0659f66
Author: snowleo <schneeleo@gmail.com>
Date:   Mon Jun 27 11:53:57 2011 +0200

    Another fix to /spawnmob

    Merged for release

commit e652ed2981
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Jun 26 02:00:57 2011 +0200

    Copy&Paste is bad.

commit 28db891aa5
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Jun 26 01:43:59 2011 +0200

    Fix for Register inside Essentials

commit b63ae9b771
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Jun 26 01:43:19 2011 +0200

    SEVERE error messages for other plugins, that try to manually enable Essentials, FakePermissions or GroupManager

commit 27c84ceaac
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jun 25 15:34:33 2011 +0200

    Remove the restriction of EssEcoApi to not use iConomy or BOSE

commit d67ccd03ca
Merge: 96b0f27 5e2f4bc
Author: snowleo <schneeleo@gmail.com>
Date:   Sat Jun 25 14:27:30 2011 +0200

    Merge branch 'bukkitupdate' into release

commit 96b0f27c51
Author: snowleo <schneeleo@gmail.com>
Date:   Sun Jun 12 02:47:50 2011 +0200

    Fix for Craftbukkit Bug 912
2012-03-13 03:14:24 +01:00
md_5
78f4820876 Initial formatted and slightly tweaked version of @evenprime 's NoCheat. Will be intergrated into the main Essentials as soon as possible 2012-03-12 10:39:36 +11:00
md_5
2640905846 It is important to get things right the fist time. Especially when you will be staring at them for a while to come. 2012-03-04 12:34:14 +11:00
md_5
6b7e9de5f2 Thanks to @ementalo we now have a repo 2012-03-04 12:22:30 +11:00
snowleo
57daa09e9a Serious bug is serious 2012-03-04 01:39:22 +01:00
ementalo
cd5ae6a167 ant files from teamcity - gathering artifacts and versioning files. 2012-03-03 23:57:13 +00:00
md_5
7e8ca05203 Complete the transition to maven :D 2012-03-04 10:37:05 +11:00
md_5
3ed78c0520 Move EssentialsSpawn into the main plugin, going to make it a component in the near future 2012-03-03 13:19:10 +11:00
snowleo
22a37a0c1b Revert "I honestly have no idea if this works, but on paper it does. Will be great, now to figure out how to test." until there is a real alternative.
This reverts commit 7b8a9d60d7.
2012-03-03 02:40:22 +01:00
md_5
7b8a9d60d7 I honestly have no idea if this works, but on paper it does. Will be great, now to figure out how to test. 2012-03-02 21:48:03 +11:00
md_5
3b76bbfe78 Put test classes where they belong 2012-03-02 16:29:04 +11:00
KHobbits
6d4d0ef2c1 Merge pull request #52 from Zenexer/3.0
Misc Cleaning
2012-02-23 11:47:01 -08:00
Paul Buonopane
d06fc84e41 Changed s to dropStack for verbosity, and organized imports.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:46:57 -05:00
Paul Buonopane
1cbb6f1617 ManagedFile was in the correct folder, but had the wrong package header.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:29:49 -05:00
Paul Buonopane
0039f73fb3 Better use of logger.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:27:23 -05:00
Paul Buonopane
a865c9ad01 Formatting.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:26:55 -05:00
Paul Buonopane
8c5d4d83f1 Avoided shadowing.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:26:10 -05:00
Paul Buonopane
53c9265800 Formatting.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:24:46 -05:00
Paul Buonopane
9b25a25e91 Methods' applicable members are now static.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:21:26 -05:00
Paul Buonopane
a2fdf66de4 Renamed TNT explosion listener to be more consistent with naming scheme.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:18:29 -05:00
Paul Buonopane
224e5f129e ChargeException was in the correct folder, but had the wrong package header.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:14:33 -05:00
Paul Buonopane
146599ae4b Formatting.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:11:09 -05:00
Paul Buonopane
4203119e9a Removed poor use of shadowing.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:02:55 -05:00
Paul Buonopane
aefe79bbe7 Added @Override annotation in I18n.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 12:00:27 -05:00
Paul Buonopane
5da1e9a220 Increased logger efficiency in Essentials.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 11:58:43 -05:00
Paul Buonopane
a0df79cc06 Removed unused imports in Essentials.
Signed-off-by: Paul Buonopane <techsoftadvanced@gmail.com>
2012-02-23 11:56:48 -05:00
snowleo
32840e68f3 Sign settings 2012-02-21 19:17:22 +01:00
snowleo
4da3f52164 Merge branch 'refs/heads/master' into 3.0
Conflicts:
	.gitignore
	Essentials/src/com/earth2me/essentials/Essentials.java
	Essentials/src/com/earth2me/essentials/EssentialsTimer.java
	Essentials/src/com/earth2me/essentials/ISettings.java
	Essentials/src/com/earth2me/essentials/Jails.java
	Essentials/src/com/earth2me/essentials/OfflinePlayer.java
	Essentials/src/com/earth2me/essentials/Settings.java
	Essentials/src/com/earth2me/essentials/User.java
	Essentials/src/com/earth2me/essentials/UserData.java
	Essentials/src/com/earth2me/essentials/UserMap.java
	Essentials/src/com/earth2me/essentials/Util.java
	Essentials/src/com/earth2me/essentials/commands/Commandnear.java
	Essentials/src/com/earth2me/essentials/commands/Commandping.java
	Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
	Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java
	Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java
	Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
	Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
	Essentials/src/messages_en.properties
	Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java
	Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java
	EssentialsChat/src/plugin.yml
	EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
	EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
	EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
2012-02-21 18:34:53 +01:00
snowleo
cae3c5a03e We don't need to get OfflinePlayer again. 2012-02-13 11:22:49 +01:00
md_5
13206b3418 Its a good idea to remove imports when you remove a class 2012-02-13 18:11:01 +11:00
md_5
c713be8c82 No need for that CraftBukkit hack anymore 2012-02-13 18:05:59 +11:00
snowleo
a3c67e23c8 Organize Imports 2012-02-06 22:26:52 +01:00
snowleo
ffcdd99ad0 Cleanup 2012-02-06 22:22:05 +01:00
snowleo
539700cb21 New Groups code, supports groups.yml file, gm and vault, new economy api. 2012-02-06 22:13:39 +01:00
snowleo
1078b7b5f2 copy&paste fail 2012-02-05 18:29:37 +01:00
snowleo
f908eee76c New permissions for signs 2012-02-05 18:26:21 +01:00
snowleo
b95c662ed5 Finally fix tests 2012-02-05 18:02:45 +01:00
snowleo
a60f280a1c Fixing the Testcases 2012-02-05 17:35:47 +01:00
snowleo
8ab5bad988 Modified BetterLocation, and new Permission-System 2012-02-05 17:19:32 +01:00
KHobbits
8080abacd6 More general cleanup. 2012-01-28 14:17:27 +00:00
KHobbits
e960078e1a Random Cleanup 2012-01-28 14:05:50 +00:00
KHobbits
f4413633b8 Clean more imports. 2012-01-28 13:48:30 +00:00
KHobbits
5c44877c4c Organize Imports 2012-01-28 13:44:06 +00:00
KHobbits
36d7907987 Fix missing import. 2012-01-28 13:40:10 +00:00
KHobbits
047f373631 Merge branch 'master' into 3.0
Conflicts:
	Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java
	Essentials/src/com/earth2me/essentials/commands/Commandhome.java
	Essentials/src/com/earth2me/essentials/commands/Commandsethome.java
	Essentials/src/messages_fr.properties
	EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
2012-01-28 13:33:09 +00:00
KHobbits
72ed86e0dd Tidy chat. 2012-01-26 00:01:49 +00:00
KHobbits
c689b55c4d Fix depends 2012-01-25 23:56:54 +00:00
ementalo
cbee61093e Fix exception when getting displayname
Fix exception if null values are in settings groups.yml
2012-01-25 01:09:32 +00:00
KHobbits
df061749dd 2nd sweep over Essentials Chat, to implement 2.8 changes.
Formatting cache still needs reimplemented.
2012-01-24 23:20:00 +00:00
KHobbits
38a9327284 Merge branch '3.0' of github.com:essentials/Essentials into 3.0
Conflicts:
	Essentials/src/messages_en.properties
2012-01-24 22:56:53 +00:00
ementalo
307c6c7bf0 remove merge leftovers
Don't try to spawn users who have disconnected before we have a chance to spawn them
2012-01-24 22:50:34 +00:00
KHobbits
bdc695c85b First sweep over Essentials Chat, to implement 2.8 changes.
Formatting cache still needs reimplemented.
2012-01-24 22:08:20 +00:00
KHobbits
8c54f37092 Fix messages file 2012-01-24 20:47:11 +00:00
snowleo
cc0e9aa84b Merge branch 'refs/heads/master' into 3.0
The changes to EssChat have not been merged

Conflicts:
	Essentials/src/com/earth2me/essentials/Essentials.java
	Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
	Essentials/src/com/earth2me/essentials/ISettings.java
	Essentials/src/com/earth2me/essentials/OfflinePlayer.java
	Essentials/src/com/earth2me/essentials/Settings.java
	Essentials/src/com/earth2me/essentials/Util.java
	Essentials/src/com/earth2me/essentials/listener/EssentialsBlockListener.java
	Essentials/src/com/earth2me/essentials/listener/EssentialsPlayerListener.java
	Essentials/src/com/earth2me/essentials/listener/EssentialsPluginListener.java
	Essentials/src/messages.properties
	Essentials/src/messages_da.properties
	Essentials/src/messages_de.properties
	Essentials/src/messages_en.properties
	Essentials/src/messages_es.properties
	Essentials/src/messages_fr.properties
	Essentials/src/messages_nl.properties
	EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
	EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
	EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java
	EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
	EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java
	EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
	EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
	EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
	EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
	EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
	EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java
	EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
	EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java
2012-01-24 00:52:08 +01:00
snowleo
6af054631f More work on 3.0 branch 2012-01-24 00:01:31 +01:00
ementalo
01a37df700 Add new permission essentials.protect.alerts.notrigger
If user has this permisson they do not trigger EssProtect block alerts
Fix spawnmob sign command args
2012-01-23 16:00:23 +00:00
snowleo
f0dd81ee00 Merge branch 'refs/heads/master' into 3.0
Did some tweaks, so that it actually works.

Conflicts:
	Essentials/src/com/earth2me/essentials/Essentials.java
	Essentials/src/com/earth2me/essentials/User.java
	Essentials/src/com/earth2me/essentials/Util.java
	Essentials/src/com/earth2me/essentials/commands/Commandhelpop.java
	Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java
	Essentials/src/com/earth2me/essentials/commands/Commandmail.java
	Essentials/src/com/earth2me/essentials/commands/Commandme.java
	Essentials/src/com/earth2me/essentials/commands/Commandmsg.java
	Essentials/src/com/earth2me/essentials/commands/Commandnick.java
	Essentials/src/com/earth2me/essentials/commands/Commandr.java
	Essentials/src/com/earth2me/essentials/listener/EssentialsPlayerListener.java
	EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
	EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
	EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
	EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java
	EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
	build.xml
2012-01-18 04:01:01 +01:00
KHobbits
27b0cc86de Don't charge a user if warp already exists (and they can't set it). 2012-01-17 19:25:56 +00:00
KHobbits
ee88abafcf Merge branch '3.0' of github.com:essentials/Essentials into 3.0 2012-01-17 17:41:16 +00:00
KHobbits
a1cf08d6ab Auto update gm version. 2012-01-17 17:23:27 +00:00
ementalo
42e9e105cb Adding permissions for overwriting exisitng warps
essentials.warp.overwrite.[warpname] will allow overwrting of exsiting warps
Adding WarpNotFoundException class
For ticket #
2012-01-17 16:19:53 +00:00
KHobbits
ec0d6651b0 Removing 2 dead classes. 2012-01-17 03:13:44 +00:00
snowleo
348bb6d0a3 Merge branch 'refs/heads/master' into 3.0 2012-01-13 00:23:39 +01:00
snowleo
64904cdcfd Create Files, if they don't exist 2012-01-12 16:34:52 +01:00
snowleo
69d57b04d9 ItemDb now loads in half the time, uses 72KB less memory. 2012-01-12 16:33:55 +01:00
snowleo
ef659d5f26 Better Location code for lazy loading worlds
This fixes problems with worlds that are loaded after the Location object is created and should prevent memory leaks when a world is unloaded.
2012-01-11 04:36:57 +01:00
snowleo
703c5741bd Essentials should run now... 2012-01-10 01:02:23 +01:00
snowleo
d64c73fc51 Finished Protect, Essentials should build now. 2012-01-10 00:36:09 +01:00
snowleo
92abba0f25 All tests should work now 2012-01-09 23:27:52 +01:00
snowleo
cc3cd5e89c Cleanup of Console class 2012-01-06 01:55:41 +01:00
KHobbits
3513d72a7b Fixing Warp, Spawnmob signs
Fix Imports
2012-01-04 21:41:05 +00:00
KHobbits
8432e1fc7d Fixing kit and protect signs (inGroup)
Fix imports
2012-01-04 21:37:00 +00:00
KHobbits
a46f6fd73d Revert "Possible sign refactor?"
This reverts commit 897571db7d.
2012-01-04 18:56:36 +00:00
KHobbits
897571db7d Possible sign refactor? 2012-01-04 18:34:37 +00:00
KHobbits
de0a419476 Cleaning up item spawning and kits. 2012-01-04 17:51:14 +00:00
ementalo
6dd73f5247 ReadLock for realname
Remove unneeded overrides
Redo Khobbits messages_de changes
2012-01-04 15:53:59 +00:00
ementalo
a50cfb3efb 3.0 updates - Main jar should build now 2012-01-04 15:06:10 +00:00
ementalo
bbcf2ecce3 Fix a few things for 3.0
Test #843 - new config option added cancelTpRequestsOnWorldChange
Test # 1255 - essentials.nogod.override permission added
Test #1311 - added ban reason in /seen
2012-01-04 11:57:00 +00:00
snowleo
86ea654a5d Cleanup of Backup class 2012-01-04 05:45:32 +01:00
KHobbits
d2bbbd14fc Organize Imports 2012-01-04 03:45:26 +00:00
KHobbits
a5398e938c final is cleaner. 2012-01-04 03:37:47 +00:00
KHobbits
7b01bc894d Readlocks maybe... 2012-01-04 03:27:25 +00:00
KHobbits
2678be90e3 Fixing up kits. 2012-01-04 03:12:21 +00:00
snowleo
781f42fba1 More fixes for commands 2012-01-03 21:43:57 +01:00
snowleo
481749b119 New names 2012-01-03 02:57:44 +01:00
snowleo
a552b88172 I always forget these 2012-01-03 02:53:57 +01:00
snowleo
801562ac2c More work on Protect 2012-01-03 02:51:19 +01:00
snowleo
869d79ae73 This feels so good D: 2012-01-03 01:53:38 +01:00
snowleo
7153676137 Starting to break Protect 2012-01-03 00:07:44 +01:00
snowleo
d2c1b24e4b Prototype for grouping permissions into an enum 2012-01-02 23:45:50 +01:00
snowleo
b3de4276bc Those are permission based now 2012-01-02 23:35:36 +01:00
snowleo
cb31939a7a New Protect config 2012-01-02 23:25:17 +01:00
snowleo
41e0e64a5f EssentialsSpawn and EssentialsChat should build now again 2012-01-02 22:38:47 +01:00
snowleo
a20e96af4e Netbeans 7.1 RC2 project stuff 2012-01-02 22:37:44 +01:00
snowleo
cedf363557 Merge branch 'refs/heads/master' into 3.0 2012-01-02 20:29:00 +01:00
snowleo
9bb6d77bdb More work done on the 3.0 branch 2011-12-23 12:57:26 +01:00
snowleo
03171616fa Merge branch 'refs/heads/master' into 3.0
Conflicts:
	Essentials/src/com/earth2me/essentials/Essentials.java
2011-12-22 23:37:12 +01:00
KHobbits
087a594449 Removing duplicate messages file
This causes confusion when trying to override messages in the ess folder.
2011-12-18 11:52:49 +00:00
KHobbits
c0b78cc3d5 Adding /join as alias to /tpa, and /come as alias to /tpahere 2011-12-18 04:30:00 +00:00
KHobbits
b05e4079d9 Essentials now throws a custom event, to handle local chat.
(Changing event name, so we don't get custom event conflicts.)
2011-12-17 17:57:57 +00:00
KHobbits
556c990eff EssentialsChat cleaning. 2011-12-17 17:40:47 +00:00
KHobbits
618f58c3f3 Merge branch 'master' into 3.0 2011-12-15 20:47:59 +00:00
snowleo
a7e71488c6 Merge branch 'refs/heads/master' into 3.0 2011-12-15 10:32:56 +01:00
snowleo
0155bcedb7 Updated all modules to new api, some settings are still missing 2011-12-14 16:31:08 +01:00
snowleo
9ab2fe54fc Added EssentialsSigns to build.xml 2011-12-14 16:05:35 +01:00
snowleo
0f1eb9b4f9 Moved signs code to a new module 2011-12-14 16:04:15 +01:00
snowleo
503e837cfd Fail merge :D 2011-12-14 15:22:29 +01:00
snowleo
0a98b8f662 Merge branch 'refs/heads/master' into 3.0
Conflicts:
	Essentials/src/com/earth2me/essentials/Essentials.java
	Essentials/src/com/earth2me/essentials/IUser.java
	Essentials/src/com/earth2me/essentials/Trade.java
	Essentials/src/com/earth2me/essentials/User.java
2011-12-14 15:20:22 +01:00
snowleo
6e79302908 More work done. 2011-12-12 22:31:19 +01:00
snowleo
ecf72e27bb More work done 2011-12-11 13:16:36 +01:00
snowleo
d1aea7dd35 Merge branch 'refs/heads/master' into 3.0
Conflicts:
	Essentials/src/com/earth2me/essentials/Util.java
2011-12-11 09:25:33 +01:00
snowleo
b2a307ec23 Merge branch 'refs/heads/master' into 3.0 2011-12-11 08:56:53 +01:00
snowleo
f0dabdd4b1 Re-Implemented User class 2011-12-10 03:04:10 +01:00
831 changed files with 43121 additions and 69048 deletions

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/bukkit-0.0.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/Permissions3.jar"/>
</classpath>

75
.gitignore vendored
View File

@@ -1,42 +1,37 @@
# Eclipse stuff
.classpath
.project
.settings
# netbeans
nbproject
# we use maven!
build.xml
# maven
target
jars
dependency-reduced-pom.xml
# vim
.*.sw[a-p]
# various other potential build files
build
bin
dist
manifest.mf
# Mac filesystem dust
.DS_Store
/BuildAll/nbproject/private/
/EssentialsProtect/nbproject/private/
/EssentialsChat/nbproject/private/
/EssentialsGroupBridge/nbproject/private/
/EssentialsGeoIP/nbproject/private/
/EssentialsSpawn/nbproject/private/
/EssentialsXMPP/nbproject/private/
/EssentialsGroupManager/nbproject/private/
/BuildAll/build/
/EssentialsGroupBridge/dist/
/EssentialsGroupBridge/build/
/EssentialsGeoIP/dist/
/EssentialsGeoIP/build/
/EssentialsGroupManager/build/
/EssentialsGroupManager/dist/
/BuildAll/dist/
/EssentialsChat/build/
/EssentialsChat/dist/
/EssentialsSpawn/build/
/EssentialsSpawn/dist/
/EssentialsXMPP/dist/
/EssentialsXMPP/build/
/EssentialsProtect/dist/
/EssentialsProtect/build/
/EssentialsPermissionsCommands/nbproject/private/
/EssentialsPermissionsCommands/build/
/EssentialsPermissionsCommands/dist/
/Essentials/nbproject/private/
/Essentials/dist/
/Essentials/build/
/YamlAnnotations/
/EssentialsUpdate/nbproject/private/
# intellij
*.iml
*.ipr
*.iws
.idea/
/EssentialsRelease/
/EssentialsUpdate/dist/
/EssentialsUpdate/build/
/WebPush/apikey.php
/WebPush/nbproject/private
/.idea
*.iml
/EssentialsGroupManager/bin
/EssentialsGroupManager/.externalToolBuilders
*.mo
*.po.~*~

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Essentials</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

17
.travis.yml Normal file
View File

@@ -0,0 +1,17 @@
language: java
jdk:
- oraclejdk7
- openjdk7
- openjdk6
script: mvn clean test
notifications:
irc:
channels:
- "irc.esper.net#lain"
on_success: change
on_failure: always
email:
recipients:
- "team@ess3.net"
on_success: change
on_failure: always

View File

@@ -1,74 +0,0 @@
<?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="BuildAll" default="default" basedir=".">
<description>Builds, tests, and runs the project BuildAll.</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="BuildAll-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>

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
build.xml.data.CRC32=51b33957
build.xml.script.CRC32=7a797370
build.xml.stylesheet.CRC32=28e38971@1.44.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=51b33957
nbproject/build-impl.xml.script.CRC32=c5170bed
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46

View File

@@ -1,129 +0,0 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=BuildAll
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:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/BuildAll.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
includes=**
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
${reference.EssentialsChat.jar}:\
${reference.EssentialsProtect.jar}:\
${reference.EssentialsSpawn.jar}:\
${reference.EssentialsGeoIP.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.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
project.Essentials=../Essentials
project.EssentialsChat=../EssentialsChat
project.EssentialsGeoIP=../EssentialsGeoIP
project.EssentialsGroupBridge=../EssentialsGroupBridge
project.EssentialsGroupManager=../EssentialsGroupManager
project.EssentialsProtect=../EssentialsProtect
project.EssentialsSpawn=../EssentialsSpawn
project.EssentialsXMPP=../EssentialsXMPP
reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
reference.EssentialsChat.jar=${project.EssentialsChat}/dist/EssentialsChat.jar
reference.EssentialsGeoIP.jar=${project.EssentialsGeoIP}/dist/EssentialsGeoIP.jar
reference.EssentialsGroupBridge.jar=${project.EssentialsGroupBridge}/dist/EssentialsGroupBridge.jar
reference.EssentialsGroupManager.jar=${project.EssentialsGroupManager}/dist/EssentialsGroupManager.jar
reference.EssentialsProtect.jar=${project.EssentialsProtect}/dist/EssentialsProtect.jar
reference.EssentialsSpawn.jar=${project.EssentialsSpawn}/dist/EssentialsSpawn.jar
reference.EssentialsXMPP.jar=${project.EssentialsXMPP}/dist/EssentialsXMPP.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test

View File

@@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>BuildAll</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
<libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
<definitions>..\lib\nblibraries.properties</definitions>
</libraries>
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
<reference>
<foreign-project>Essentials</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsChat</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsGeoIP</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsGroupBridge</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsGroupManager</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsProtect</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsSpawn</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsXMPP</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
</references>
</configuration>
</project>

View File

@@ -1,84 +0,0 @@
<?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

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<netbeans.compile.on.save>all</netbeans.compile.on.save>
</properties>
</project-shared-configuration>

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +0,0 @@
build.xml.data.CRC32=7d758acf
build.xml.script.CRC32=3233ee78
build.xml.stylesheet.CRC32=28e38971@1.38.2.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=a830bc14
nbproject/build-impl.xml.script.CRC32=a9f8842a
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
nbproject/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

@@ -1,3 +0,0 @@
DoNotUseThreads
LongVariable
SignatureDeclareThrowsException

View File

@@ -1,154 +0,0 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=lombok.core.AnnotationProcessor
annotation.processing.run.all.processors=false
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=Essentials
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.importGroupsOrder=*
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.separateImportGroups=false
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:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/Essentials.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.BOSEconomy7.jar=../lib/BOSEconomy7.jar
file.reference.bPermissions.jar=../lib/bPermissions.jar
file.reference.bpermissions2.jar=../lib/bpermissions2.jar
file.reference.bukkit.jar=../lib/bukkit.jar
file.reference.craftbukkit.jar=../lib/craftbukkit.jar
file.reference.iCo4.jar=../lib/iCo4.jar
file.reference.iCo5.jar=../lib/iCo5.jar
file.reference.iCo6.jar=../lib/iCo6.jar
file.reference.lombok.jar=../lib/lombok-0.10.8.jar
file.reference.MultiCurrency.jar=../lib/MultiCurrency.jar
file.reference.Permissions3.jar=../lib/Permissions3.jar
file.reference.PermissionsBukkit-1.2.jar=../lib/PermissionsBukkit-1.2.jar
file.reference.PermissionsEx.jar=../lib/PermissionsEx.jar
file.reference.Privileges.jar=..\\lib\\Privileges.jar
file.reference.Vault.jar=../lib/Vault.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.Permissions3.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}:\
${file.reference.bPermissions.jar}:\
${file.reference.PermissionsBukkit-1.2.jar}:\
${file.reference.lombok.jar}:\
${reference.EssentialsGroupManager.jar}:\
${file.reference.bukkit.jar}:\
${file.reference.craftbukkit.jar}:\
${file.reference.Vault.jar}:\
${file.reference.Privileges.jar}:\
${file.reference.bpermissions2.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit_4.10.classpath}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.reference.PermissionsEx.jar=../lib/PermissionsEx-javadoc.jar
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=true
platform.active=default_platform
project.EssentialsGroupManager=../EssentialsGroupManager
reference.EssentialsGroupManager.jar=../EssentialsGroupManager/dist/EssentialsGroupManager.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=-Djline.terminal=jline.UnsupportedTerminal
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>Essentials</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
<libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
<definitions>../lib/nblibraries.properties</definitions>
</libraries>
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
<reference>
<foreign-project>EssentialsGroupManager</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
</references>
</configuration>
</project>

3677
Essentials/po/en.po Normal file

File diff suppressed because it is too large Load Diff

3674
Essentials/po/keys.pot Normal file

File diff suppressed because it is too large Load Diff

119
Essentials/pom.xml Normal file
View File

@@ -0,0 +1,119 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.essentials3</groupId>
<artifactId>EssentialsParent</artifactId>
<version>3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>Essentials</artifactId>
<dependencies>
<!-- Internal Depends -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>EssentialsGroupManager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>0.11.6</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.4.1</version>
</dependency>
<!-- Test Depends -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<!-- External Plugin Depends -->
<dependency>
<groupId>cosine</groupId>
<artifactId>BOSEconomy</artifactId>
<version>0.7</version>
</dependency>
<dependency>
<groupId>com.iConomy</groupId>
<artifactId>iConomy</artifactId>
<version>5.0</version>
</dependency>
<dependency>
<groupId>com.iCo6</groupId>
<artifactId>iConomy</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>me.ashtheking</groupId>
<artifactId>MultiCurrency</artifactId>
<version>0.05</version>
</dependency>
<dependency>
<groupId>net.milkbowl</groupId>
<artifactId>Vault</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>commons-io:*</include>
<include>org.apache.commons:commons-compress</include>
</includes>
</artifactSet>
<minimizeJar>true</minimizeJar>
<relocations>
<relocation>
<pattern>org.apache.commons</pattern>
<shadedPattern>net.ess3.commons</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.xnap.commons</groupId>
<artifactId>maven-gettext-plugin</artifactId>
<configuration>
<poDirectory>${basedir}/po/</poDirectory>
<targetBundle>messages2</targetBundle>
<keywords>-k_ -kComment -k -s --package-name=Essentials --package-version=${project.version} --copyright-holder="Essentials Team"</keywords>
<outputFormat>properties</outputFormat>
<sourceDirectory>${basedir}/../</sourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>

18
Essentials/src/book.txt Normal file
View File

@@ -0,0 +1,18 @@
This is the book file.
This file format works similar to the info.txt, motd.txt and rules.txt
Place content in here that you would like to be used by books ingame.
You can use this content by using the book:<section> meta option in kits or item spawning.
#Colors
Minecraft colors:
&0 &&0 &1 &&1 &2 &&2 &3 &&3
&4 &&4 &5 &&5 &6 &&6 &7 &&7
&8 &&8 &9 &&9 &a &&a &b &&b
&c &&c &d &&d &e &&e &f &&f
&0
&&k &kMagic&r &&l &lBold
&&m &mStrike&r &&n &nUline
&&o &oItalic&r &&r &rReset

View File

@@ -1,137 +0,0 @@
package com.earth2me.essentials;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.command.Command;
import org.bukkit.command.PluginCommand;
import org.bukkit.command.PluginCommandYamlParser;
import org.bukkit.plugin.Plugin;
public class AlternativeCommandsHandler
{
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private final transient Map<String, List<PluginCommand>> altcommands = new HashMap<String, List<PluginCommand>>();
private final transient Map<String, String> disabledList = new HashMap<String, String>();
private final transient IEssentials ess;
public AlternativeCommandsHandler(final IEssentials ess)
{
this.ess = ess;
for (Plugin plugin : ess.getServer().getPluginManager().getPlugins())
{
if (plugin.isEnabled())
{
addPlugin(plugin);
}
}
}
public final void addPlugin(final Plugin plugin)
{
if (plugin.getDescription().getMain().contains("com.earth2me.essentials"))
{
return;
}
final List<Command> commands = PluginCommandYamlParser.parse(plugin);
final String pluginName = plugin.getDescription().getName().toLowerCase(Locale.ENGLISH);
for (Command command : commands)
{
final PluginCommand pc = (PluginCommand)command;
final List<String> labels = new ArrayList<String>(pc.getAliases());
labels.add(pc.getName());
PluginCommand reg = ess.getServer().getPluginCommand(pluginName + ":" + pc.getName().toLowerCase(Locale.ENGLISH));
if (reg == null)
{
reg = ess.getServer().getPluginCommand(pc.getName().toLowerCase(Locale.ENGLISH));
}
if (reg == null || !reg.getPlugin().equals(plugin))
{
continue;
}
for (String label : labels)
{
List<PluginCommand> plugincommands = altcommands.get(label.toLowerCase(Locale.ENGLISH));
if (plugincommands == null)
{
plugincommands = new ArrayList<PluginCommand>();
altcommands.put(label.toLowerCase(Locale.ENGLISH), plugincommands);
}
boolean found = false;
for (PluginCommand pc2 : plugincommands)
{
if (pc2.getPlugin().equals(plugin))
{
found = true;
}
}
if (!found)
{
plugincommands.add(reg);
}
}
}
}
public void removePlugin(final Plugin plugin)
{
final Iterator<Map.Entry<String, List<PluginCommand>>> iterator = altcommands.entrySet().iterator();
while (iterator.hasNext())
{
final Map.Entry<String, List<PluginCommand>> entry = iterator.next();
final Iterator<PluginCommand> pcIterator = entry.getValue().iterator();
while (pcIterator.hasNext())
{
final PluginCommand pc = pcIterator.next();
if (pc.getPlugin() == null || pc.getPlugin().equals(plugin))
{
pcIterator.remove();
}
}
if (entry.getValue().isEmpty())
{
iterator.remove();
}
}
}
public PluginCommand getAlternative(final String label)
{
final List<PluginCommand> commands = altcommands.get(label);
if (commands == null || commands.isEmpty())
{
return null;
}
if (commands.size() == 1)
{
return commands.get(0);
}
// return the first command that is not an alias
for (PluginCommand command : commands)
{
if (command.getName().equalsIgnoreCase(label))
{
return command;
}
}
// return the first alias
return commands.get(0);
}
public void executed(final String label, final String otherLabel)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, "Essentials: Alternative command " + label + " found, using " + otherLabel);
}
disabledList.put(label, otherLabel);
}
public Map<String, String> disabledCommands()
{
return disabledList;
}
}

View File

@@ -1,140 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Backup implements Runnable
{
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private transient final Server server;
private transient final IEssentials ess;
private transient boolean running = false;
private transient int taskId = -1;
private transient boolean active = false;
public Backup(final IEssentials ess)
{
this.ess = ess;
server = ess.getServer();
if (server.getOnlinePlayers().length > 0)
{
startTask();
}
}
void onPlayerJoin()
{
startTask();
}
private void startTask()
{
if (!running)
{
final long interval = ess.getSettings().getBackupInterval() * 1200; // minutes -> ticks
if (interval < 1200)
{
return;
}
taskId = ess.scheduleSyncRepeatingTask(this, interval, interval);
running = true;
}
}
@Override
public void run()
{
if (active)
{
return;
}
active = true;
final String command = ess.getSettings().getBackupCommand();
if (command == null || "".equals(command))
{
return;
}
if ("save-all".equalsIgnoreCase(command)) {
final CommandSender cs = server.getConsoleSender();
server.dispatchCommand(cs, "save-all");
active = false;
return;
}
LOGGER.log(Level.INFO, _("backupStarted"));
final CommandSender cs = server.getConsoleSender();
server.dispatchCommand(cs, "save-all");
server.dispatchCommand(cs, "save-off");
ess.scheduleAsyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
try
{
final ProcessBuilder childBuilder = new ProcessBuilder(command);
childBuilder.redirectErrorStream(true);
childBuilder.directory(ess.getDataFolder().getParentFile().getParentFile());
final Process child = childBuilder.start();
final BufferedReader reader = new BufferedReader(new InputStreamReader(child.getInputStream()));
try
{
child.waitFor();
String line;
do
{
line = reader.readLine();
if (line != null)
{
LOGGER.log(Level.INFO, line);
}
}
while (line != null);
}
finally
{
reader.close();
}
}
catch (InterruptedException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
finally
{
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
server.dispatchCommand(cs, "save-on");
if (server.getOnlinePlayers().length == 0)
{
running = false;
if (taskId != -1)
{
server.getScheduler().cancelTask(taskId);
}
}
active = false;
LOGGER.log(Level.INFO, _("backupFinished"));
}
});
}
}
});
}
}

View File

@@ -1,15 +0,0 @@
package com.earth2me.essentials;
public class ChargeException extends Exception
{
public ChargeException(final String message)
{
super(message);
}
public ChargeException(final String message, final Throwable throwable)
{
super(message, throwable);
}
}

View File

@@ -1,684 +0,0 @@
/*
* Essentials - a bukkit plugin
* Copyright (C) 2011 Essentials Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.api.Economy;
import com.earth2me.essentials.api.IJails;
import com.earth2me.essentials.commands.EssentialsCommand;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.commands.NoChargeException;
import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import com.earth2me.essentials.metrics.Metrics;
import com.earth2me.essentials.metrics.MetricsListener;
import com.earth2me.essentials.metrics.MetricsStarter;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import com.earth2me.essentials.signs.SignBlockListener;
import com.earth2me.essentials.signs.SignEntityListener;
import com.earth2me.essentials.signs.SignPlayerListener;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.world.WorldLoadEvent;
import org.bukkit.event.world.WorldUnloadEvent;
import org.bukkit.plugin.InvalidDescriptionException;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitScheduler;
import org.yaml.snakeyaml.error.YAMLException;
public class Essentials extends JavaPlugin implements IEssentials
{
public static final int BUKKIT_VERSION = 2149;
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private transient ISettings settings;
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
private transient Jails jails;
private transient Warps warps;
private transient Worth worth;
private transient List<IConf> confList;
private transient Backup backup;
private transient ItemDb itemDb;
private transient final Methods paymentMethod = new Methods();
private transient PermissionsHandler permissionsHandler;
private transient AlternativeCommandsHandler alternativeCommandsHandler;
private transient UserMap userMap;
private transient ExecuteTimer execTimer;
private transient I18n i18n;
private transient Metrics metrics;
private transient EssentialsTimer timer;
private transient List<String> vanishedPlayers = new ArrayList<String>();
@Override
public ISettings getSettings()
{
return settings;
}
public void setupForTesting(final Server server) throws IOException, InvalidDescriptionException
{
final File dataFolder = File.createTempFile("essentialstest", "");
if (!dataFolder.delete())
{
throw new IOException();
}
if (!dataFolder.mkdir())
{
throw new IOException();
}
i18n = new I18n(this);
i18n.onEnable();
LOGGER.log(Level.INFO, _("usingTempFolderForTesting"));
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);
i18n.updateLocale("en");
userMap = new UserMap(this);
permissionsHandler = new PermissionsHandler(this, false);
Economy.setEss(this);
}
@Override
public void onEnable()
{
execTimer = new ExecuteTimer();
execTimer.start();
i18n = new I18n(this);
i18n.onEnable();
execTimer.mark("I18n1");
final PluginManager pm = getServer().getPluginManager();
for (Plugin plugin : pm.getPlugins())
{
if (plugin.getDescription().getName().startsWith("Essentials")
&& !plugin.getDescription().getVersion().equals(this.getDescription().getVersion())
&& !plugin.getDescription().getName().equals("EssentialsAntiCheat"))
{
LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName()));
}
}
final Matcher versionMatch = Pattern.compile("git-Bukkit-(?:(?:[0-9]+)\\.)+[0-9]+-R[\\.0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion());
if (versionMatch.matches())
{
final int versionNumber = Integer.parseInt(versionMatch.group(1));
if (versionNumber < BUKKIT_VERSION && versionNumber > 100)
{
LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *");
LOGGER.log(Level.SEVERE, _("notRecommendedBukkit"));
LOGGER.log(Level.SEVERE, _("requiredBukkit", Integer.toString(BUKKIT_VERSION)));
LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *");
this.setEnabled(false);
return;
}
}
else
{
LOGGER.log(Level.INFO, _("bukkitFormatChanged"));
LOGGER.log(Level.INFO, getServer().getVersion());
LOGGER.log(Level.INFO, getServer().getBukkitVersion());
}
execTimer.mark("BukkitCheck");
try
{
final EssentialsUpgrade upgrade = new EssentialsUpgrade(this);
upgrade.beforeSettings();
execTimer.mark("Upgrade");
confList = new ArrayList<IConf>();
settings = new Settings(this);
confList.add(settings);
execTimer.mark("Settings");
upgrade.afterSettings();
execTimer.mark("Upgrade2");
i18n.updateLocale(settings.getLocale());
userMap = new UserMap(this);
confList.add(userMap);
execTimer.mark("Init(Usermap)");
warps = new Warps(getServer(), this.getDataFolder());
confList.add(warps);
execTimer.mark("Init(Spawn/Warp)");
worth = new Worth(this.getDataFolder());
confList.add(worth);
itemDb = new ItemDb(this);
confList.add(itemDb);
execTimer.mark("Init(Worth/ItemDB)");
reload();
}
catch (YAMLException exception)
{
if (pm.getPlugin("EssentialsUpdate") != null)
{
LOGGER.log(Level.SEVERE, _("essentialsHelp2"));
}
else
{
LOGGER.log(Level.SEVERE, _("essentialsHelp1"));
}
LOGGER.log(Level.SEVERE, exception.toString());
pm.registerEvents(new Listener()
{
@EventHandler(priority = EventPriority.LOW)
public void onPlayerJoin(final PlayerJoinEvent event)
{
event.getPlayer().sendMessage("Essentials failed to load, read the log file.");
}
}, this);
for (Player player : getServer().getOnlinePlayers())
{
player.sendMessage("Essentials failed to load, read the log file.");
}
this.setEnabled(false);
return;
}
backup = new Backup(this);
permissionsHandler = new PermissionsHandler(this, settings.useBukkitPermissions());
alternativeCommandsHandler = new AlternativeCommandsHandler(this);
final EssentialsPluginListener serverListener = new EssentialsPluginListener(this);
pm.registerEvents(serverListener, this);
confList.add(serverListener);
final EssentialsPlayerListener playerListener = new EssentialsPlayerListener(this);
pm.registerEvents(playerListener, this);
final EssentialsBlockListener blockListener = new EssentialsBlockListener(this);
pm.registerEvents(blockListener, this);
final SignBlockListener signBlockListener = new SignBlockListener(this);
pm.registerEvents(signBlockListener, this);
final SignPlayerListener signPlayerListener = new SignPlayerListener(this);
pm.registerEvents(signPlayerListener, this);
final SignEntityListener signEntityListener = new SignEntityListener(this);
pm.registerEvents(signEntityListener, this);
final EssentialsEntityListener entityListener = new EssentialsEntityListener(this);
pm.registerEvents(entityListener, this);
final EssentialsWorldListener worldListener = new EssentialsWorldListener(this);
pm.registerEvents(worldListener, this);
//TODO: Check if this should be here, and not above before reload()
jails = new Jails(this);
confList.add(jails);
pm.registerEvents(tntListener, this);
timer = new EssentialsTimer(this);
getScheduler().scheduleSyncRepeatingTask(this, timer, 100, 100);
Economy.setEss(this);
execTimer.mark("RegListeners");
final MetricsStarter metricsStarter = new MetricsStarter(this);
if (metricsStarter.getStart() != null && metricsStarter.getStart() == true)
{
getScheduler().scheduleAsyncDelayedTask(this, metricsStarter, 1);
}
else if (metricsStarter.getStart() != null && metricsStarter.getStart() == false)
{
final MetricsListener metricsListener = new MetricsListener(this, metricsStarter);
pm.registerEvents(metricsListener, this);
}
final String timeroutput = execTimer.end();
if (getSettings().isDebug())
{
LOGGER.log(Level.INFO, "Essentials load " + timeroutput);
}
}
@Override
public void onDisable()
{
for (Player p : getServer().getOnlinePlayers())
{
User user = getUser(p);
if (user.isVanished())
{
user.toggleVanished();
p.sendMessage(_("unvanishedReload"));
}
}
i18n.onDisable();
Economy.setEss(null);
Trade.closeLog();
}
@Override
public void reload()
{
Trade.closeLog();
for (IConf iConf : confList)
{
iConf.reloadConfig();
execTimer.mark("Reload(" + iConf.getClass().getSimpleName() + ")");
}
i18n.updateLocale(settings.getLocale());
}
@Override
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.", null);
}
@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, final IEssentialsModule module)
{
// Allow plugins to override the command via onCommand
if (!getSettings().isCommandOverridden(command.getName()) && (!commandLabel.startsWith("e") || commandLabel.equalsIgnoreCase(command.getName())))
{
final PluginCommand pc = alternativeCommandsHandler.getAlternative(commandLabel);
if (pc != null)
{
alternativeCommandsHandler.executed(commandLabel, pc.getLabel());
try
{
return pc.execute(sender, commandLabel, args);
}
catch (final Exception ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
sender.sendMessage(ChatColor.RED + "An internal error occurred while attempting to perform this command");
return true;
}
}
}
try
{
User user = null;
if (sender instanceof Player)
{
user = getUser(sender);
LOGGER.log(Level.INFO, String.format("[PLAYER_COMMAND] %s: /%s %s ", ((Player)sender).getName(), commandLabel, EssentialsCommand.getFinalArg(args, 0)));
}
// New mail notification
if (user != null && !getSettings().isCommandDisabled("mail") && !commandLabel.equals("mail") && user.isAuthorized("essentials.mail"))
{
final List<String> mail = user.getMails();
if (mail != null && !mail.isEmpty())
{
user.sendMessage(_("youHaveNewMail", mail.size()));
}
}
// Check for disabled commands
if (getSettings().isCommandDisabled(commandLabel))
{
return true;
}
IEssentialsCommand cmd;
try
{
cmd = (IEssentialsCommand)classLoader.loadClass(commandPath + command.getName()).newInstance();
cmd.setEssentials(this);
cmd.setEssentialsModule(module);
}
catch (Exception ex)
{
sender.sendMessage(_("commandNotLoaded", commandLabel));
LOGGER.log(Level.SEVERE, _("commandNotLoaded", commandLabel), ex);
return true;
}
// Check authorization
if (user != null && !user.isAuthorized(cmd, permissionPrefix))
{
LOGGER.log(Level.WARNING, _("deniedAccessCommand", user.getName()));
user.sendMessage(_("noAccessCommand"));
return true;
}
// Run the command
try
{
if (user == null)
{
cmd.run(getServer(), sender, commandLabel, command, args);
}
else
{
cmd.run(getServer(), user, commandLabel, command, args);
}
return true;
}
catch (NoChargeException ex)
{
return true;
}
catch (NotEnoughArgumentsException ex)
{
sender.sendMessage(command.getDescription());
sender.sendMessage(command.getUsage().replaceAll("<command>", commandLabel));
if (!ex.getMessage().isEmpty())
{
sender.sendMessage(ex.getMessage());
}
return true;
}
catch (Throwable ex)
{
showError(sender, ex, commandLabel);
return true;
}
}
catch (Throwable ex)
{
LOGGER.log(Level.SEVERE, _("commandFailed", commandLabel), ex);
return true;
}
}
@Override
public void showError(final CommandSender sender, final Throwable exception, final String commandLabel)
{
sender.sendMessage(_("errorWithMessage", exception.getMessage()));
if (getSettings().isDebug())
{
LOGGER.log(Level.WARNING, _("errorCallingCommand", commandLabel), exception);
}
}
@Override
public BukkitScheduler getScheduler()
{
return this.getServer().getScheduler();
}
@Override
public IJails getJails()
{
return jails;
}
@Override
public Warps getWarps()
{
return warps;
}
@Override
public Worth getWorth()
{
return worth;
}
@Override
public Backup getBackup()
{
return backup;
}
public Metrics getMetrics()
{
return metrics;
}
public void setMetrics(Metrics metrics)
{
this.metrics = metrics;
}
@Override
public User getUser(final Object base)
{
if (base instanceof Player)
{
return getUser((Player)base);
}
if (base instanceof String)
{
final User user = userMap.getUser((String)base);
if (user != null && user.getBase() instanceof OfflinePlayer)
{
((OfflinePlayer)user.getBase()).setName((String)base);
}
return user;
}
return null;
}
private <T extends Player> User getUser(final T base)
{
if (base == null)
{
return null;
}
if (base instanceof User)
{
return (User)base;
}
User user = userMap.getUser(base.getName());
if (user == null)
{
user = new User(base, this);
}
else
{
user.update(base);
}
return user;
}
@Override
public User getOfflineUser(final String name)
{
final User user = userMap.getUser(name);
if (user != null && user.getBase() instanceof OfflinePlayer)
{
((OfflinePlayer)user.getBase()).setName(name);
}
return user;
}
@Override
public World getWorld(final String name)
{
if (name.matches("[0-9]+"))
{
final int worldId = Integer.parseInt(name);
if (worldId < getServer().getWorlds().size())
{
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 IUser sender, final String message)
{
if (sender == null)
{
return getServer().broadcastMessage(message);
}
if (sender.isHidden())
{
return 0;
}
final Player[] players = getServer().getOnlinePlayers();
for (Player player : players)
{
final User user = getUser(player);
if (!user.isIgnoredPlayer(sender))
{
player.sendMessage(message);
}
}
return players.length;
}
@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 PermissionsHandler getPermissionsHandler()
{
return permissionsHandler;
}
@Override
public AlternativeCommandsHandler getAlternativeCommandsHandler()
{
return alternativeCommandsHandler;
}
@Override
public ItemDb getItemDb()
{
return itemDb;
}
@Override
public UserMap getUserMap()
{
return userMap;
}
@Override
public I18n getI18n()
{
return i18n;
}
@Override
public EssentialsTimer getTimer()
{
return timer;
}
@Override
public List<String> getVanishedPlayers()
{
return vanishedPlayers;
}
private static class EssentialsWorldListener implements Listener, Runnable
{
private transient final IEssentials ess;
public EssentialsWorldListener(final IEssentials ess)
{
this.ess = ess;
}
@EventHandler(priority = EventPriority.LOW)
public void onWorldLoad(final WorldLoadEvent event)
{
ess.getJails().onReload();
ess.getWarps().reloadConfig();
for (IConf iConf : ((Essentials)ess).confList)
{
if (iConf instanceof IEssentialsModule)
{
iConf.reloadConfig();
}
}
}
@EventHandler(priority = EventPriority.LOW)
public void onWorldUnload(final WorldUnloadEvent event)
{
ess.getJails().onReload();
ess.getWarps().reloadConfig();
for (IConf iConf : ((Essentials)ess).confList)
{
if (iConf instanceof IEssentialsModule)
{
iConf.reloadConfig();
}
}
}
@Override
public void run()
{
ess.reload();
}
}
}

View File

@@ -1,46 +0,0 @@
package com.earth2me.essentials;
import org.bukkit.GameMode;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.ItemStack;
public class EssentialsBlockListener implements Listener
{
private final transient IEssentials ess;
public EssentialsBlockListener(final IEssentials ess)
{
this.ess = ess;
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBlockPlace(final BlockPlaceEvent event)
{
// Do not rely on getItemInHand();
// http://leaky.bukkit.org/issues/663
final ItemStack is = Util.convertBlockToItem(event.getBlockPlaced());
if (is == null)
{
return;
}
final User user = ess.getUser(event.getPlayer());
final boolean unlimitedForUser = user.hasUnlimited(is);
if (unlimitedForUser && user.getGameMode() == GameMode.SURVIVAL)
{
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
user.getInventory().addItem(is);
user.updateInventory();
}
});
}
}
}

View File

@@ -1,140 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.*;
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
import org.bukkit.inventory.ItemStack;
public class EssentialsEntityListener implements Listener
{
private final IEssentials ess;
public EssentialsEntityListener(IEssentials ess)
{
this.ess = ess;
}
@EventHandler(priority = EventPriority.LOW)
public void onEntityDamage(final EntityDamageByEntityEvent event)
{
final Entity eAttack = event.getDamager();
final Entity eDefend = event.getEntity();
if (eDefend instanceof Player && eAttack instanceof Player)
{
final User defender = ess.getUser(eDefend);
final User attacker = ess.getUser(eAttack);
if (ess.getSettings().getLoginAttackDelay() > 0 && !attacker.isAuthorized("essentials.pvpdelay.exempt")
&& (System.currentTimeMillis() < (attacker.getLastLogin() + ess.getSettings().getLoginAttackDelay())))
{
event.setCancelled(true);
}
if (attacker.hasInvulnerabilityAfterTeleport() || defender.hasInvulnerabilityAfterTeleport())
{
event.setCancelled(true);
}
attacker.updateActivity(true);
final List<String> commandList = attacker.getPowertool(attacker.getItemInHand());
if (commandList != null && !commandList.isEmpty())
{
for (final String command : commandList)
{
if (command != null && !command.isEmpty())
{
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
attacker.getServer().dispatchCommand(attacker.getBase(), command.replaceAll("\\{player\\}", defender.getName()));
}
});
event.setCancelled(true);
return;
}
}
}
}
else if (eDefend instanceof Ageable && eAttack instanceof Player)
{
final Player player = (Player)eAttack;
final ItemStack hand = player.getItemInHand();
if (hand != null && hand.getType() == Material.MILK_BUCKET)
{
((Ageable)eDefend).setBaby();
hand.setType(Material.BUCKET);
player.setItemInHand(hand);
player.updateInventory();
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityDamage(final EntityDamageEvent event)
{
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
{
final Player player = (Player)event.getEntity();
player.setFireTicks(0);
player.setRemainingAir(player.getMaximumAir());
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityCombust(final EntityCombustEvent event)
{
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerDeathEvent(final PlayerDeathEvent event)
{
final User user = ess.getUser(event.getEntity());
if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back"))
{
user.setLastLocation();
user.sendMessage(_("backAfterDeath"));
}
if (!ess.getSettings().areDeathMessagesEnabled())
{
event.setDeathMessage("");
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onFoodLevelChange(final FoodLevelChangeEvent event)
{
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityRegainHealth(final EntityRegainHealthEvent event)
{
if (event.getRegainReason() == RegainReason.SATIATED && event.getEntity() instanceof Player
&& ess.getUser(event.getEntity()).isAfk() && ess.getSettings().getFreezeAfkPlayers())
{
event.setCancelled(true);
}
}
}

View File

@@ -1,462 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.TextInput;
import com.earth2me.essentials.textreader.TextPager;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerLoginEvent.Result;
import org.bukkit.event.player.*;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
public class EssentialsPlayerListener implements Listener
{
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private final transient IEssentials ess;
private static final int AIR = Material.AIR.getId();
private static final int BED = Material.BED_BLOCK.getId();
public EssentialsPlayerListener(final IEssentials parent)
{
this.ess = parent;
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerRespawn(final PlayerRespawnEvent event)
{
final User user = ess.getUser(event.getPlayer());
updateCompass(user);
user.setDisplayNick();
}
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerChat(final PlayerChatEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isMuted())
{
event.setCancelled(true);
user.sendMessage(_("playerMuted"));
LOGGER.info(_("mutedUserSpeaks", user.getName()));
}
final Iterator<Player> it = event.getRecipients().iterator();
while (it.hasNext())
{
final User u = ess.getUser(it.next());
if (u.isIgnoredPlayer(user))
{
it.remove();
}
}
user.updateActivity(true);
user.setDisplayNick();
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerMove(final PlayerMoveEvent event)
{
if ((!ess.getSettings().cancelAfkOnMove() && !ess.getSettings().getFreezeAfkPlayers())
|| event.getFrom().getBlockX() == event.getTo().getBlockX()
&& event.getFrom().getBlockZ() == event.getTo().getBlockZ()
&& event.getFrom().getBlockY() == event.getTo().getBlockY())
{
return;
}
final User user = ess.getUser(event.getPlayer());
if (user.isAfk() && ess.getSettings().getFreezeAfkPlayers())
{
final Location from = event.getFrom();
final Location to = event.getTo().clone();
to.setX(from.getX());
to.setY(from.getY());
to.setZ(from.getZ());
try
{
event.setTo(Util.getSafeDestination(to));
}
catch (Exception ex)
{
event.setTo(to);
}
return;
}
final Location afk = user.getAfkPosition();
if (afk == null || !event.getTo().getWorld().equals(afk.getWorld()) || afk.distanceSquared(event.getTo()) > 9)
{
user.updateActivity(true);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerQuit(final PlayerQuitEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (ess.getSettings().removeGodOnDisconnect() && user.isGodModeEnabled())
{
user.setGodModeEnabled(false);
}
if (user.isVanished())
{
user.toggleVanished();
}
user.setLastLocation();
user.updateActivity(false);
user.dispose();
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(final PlayerJoinEvent event)
{
ess.scheduleAsyncDelayedTask(new Runnable()
{
@Override
public void run()
{
delayedJoin(event.getPlayer());
}
});
}
public void delayedJoin(final Player player)
{
if (!player.isOnline())
{
return;
}
ess.getBackup().onPlayerJoin();
final User user = ess.getUser(player);
user.setDisplayNick();
updateCompass(user);
user.setLastLogin(System.currentTimeMillis());
user.updateActivity(false);
for (String p : ess.getVanishedPlayers())
{
if (!user.isAuthorized("essentials.vanish.see"))
{
user.hidePlayer(ess.getUser(p).getBase());
}
}
if (user.isAuthorized("essentials.sleepingignored"))
{
user.setSleepingIgnored(true);
}
if (!ess.getSettings().isCommandDisabled("motd") && user.isAuthorized("essentials.motd"))
{
try
{
final IText input = new TextInput(user, "motd", true, ess);
final IText output = new KeywordReplacer(input, user, ess);
final TextPager pager = new TextPager(output, true);
pager.showPage("1", null, "motd", user);
}
catch (IOException ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.WARNING, ex.getMessage(), ex);
}
else
{
LOGGER.log(Level.WARNING, ex.getMessage());
}
}
}
if (!ess.getSettings().isCommandDisabled("mail") && user.isAuthorized("essentials.mail"))
{
final List<String> mail = user.getMails();
if (mail.isEmpty())
{
user.sendMessage(_("noNewMail"));
}
else
{
user.sendMessage(_("youHaveNewMail", mail.size()));
}
}
}
private void updateCompass(final User user)
{
Location loc = user.getHome(user.getLocation());
if (loc == null)
{
loc = user.getBedSpawnLocation();
}
if (loc != null)
{
final Location updateLoc = loc;
ess.scheduleSyncDelayedTask(new Runnable()
{
@Override
public void run()
{
user.setCompassTarget(updateLoc);
}
});
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerLogin(final PlayerLoginEvent event)
{
switch (event.getResult())
{
case ALLOWED:
case KICK_FULL:
case KICK_BANNED:
break;
default:
return;
}
final User user = ess.getUser(event.getPlayer());
if (user.isNPC())
{
user.setNPC(false);
}
final long currentTime = System.currentTimeMillis();
final boolean banExpired = user.checkBanTimeout(currentTime);
user.checkMuteTimeout(currentTime);
user.checkJailTimeout(currentTime);
if (!banExpired && (user.isBanned() || event.getResult() == Result.KICK_BANNED))
{
final String banReason = user.getBanReason();
event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : _("defaultBanReason"));
return;
}
if (event.getResult() == Result.KICK_FULL && !user.isAuthorized("essentials.joinfullserver"))
{
event.disallow(Result.KICK_FULL, _("serverFull"));
return;
}
event.allow();
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerTeleport(final PlayerTeleportEvent event)
{
final boolean backListener = ess.getSettings().registerBackInListener();
final boolean teleportInvulnerability = ess.getSettings().isTeleportInvulnerability();
if (backListener || teleportInvulnerability)
{
final User user = ess.getUser(event.getPlayer());
//There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports.
if (backListener && (event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND))
{
user.setLastLocation();
}
if (teleportInvulnerability)
{
user.enableInvulnerabilityAfterTeleport();
}
}
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerEggThrow(final PlayerEggThrowEvent event)
{
final User user = ess.getUser(event.getPlayer());
final ItemStack stack = new ItemStack(Material.EGG, 1);
if (user.hasUnlimited(stack))
{
user.getInventory().addItem(stack);
user.updateInventory();
}
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerBucketEmpty(final PlayerBucketEmptyEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.hasUnlimited(new ItemStack(event.getBucket())))
{
event.getItemStack().setType(event.getBucket());
ess.scheduleSyncDelayedTask(new Runnable()
{
@Override
public void run()
{
user.updateInventory();
}
});
}
}
private final static List<String> COMMANDS = Arrays.asList("msg", "r", "mail", "m", "t", "whisper", "emsg", "tell", "er", "reply", "ereply", "email");
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
{
final Player player = event.getPlayer();
final String cmd = event.getMessage().toLowerCase(Locale.ENGLISH).split(" ")[0].replace("/", "").toLowerCase(Locale.ENGLISH);
if (COMMANDS.contains(cmd))
{
for (Player onlinePlayer : ess.getServer().getOnlinePlayers())
{
final User spyer = ess.getUser(onlinePlayer);
if (spyer.isSocialSpyEnabled() && !player.equals(onlinePlayer))
{
onlinePlayer.sendMessage(player.getDisplayName() + " : " + event.getMessage());
}
}
}
else if (!cmd.equalsIgnoreCase("afk"))
{
final User user = ess.getUser(player);
user.updateActivity(true);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerChangedWorld(final PlayerChangedWorldEvent event)
{
final User user = ess.getUser(event.getPlayer());
final String newWorld = event.getPlayer().getLocation().getWorld().getName();
user.setDisplayNick();
updateCompass(user);
if (ess.getSettings().getNoGodWorlds().contains(newWorld) && user.isGodModeEnabledRaw())
{
user.sendMessage(_("noGodWorldWarning"));
}
if (!event.getPlayer().getWorld().getName().equals(newWorld))
{
user.sendMessage(_("currentWorld", newWorld));
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerInteract(final PlayerInteractEvent event)
{
switch (event.getAction())
{
case RIGHT_CLICK_BLOCK:
if (!event.isCancelled() && event.getClickedBlock().getTypeId() == BED && ess.getSettings().getUpdateBedAtDaytime())
{
Player player = event.getPlayer();
player.setBedSpawnLocation(event.getClickedBlock().getLocation());
player.sendMessage(_("homeSet", player.getLocation().getWorld().getName(), player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()));
}
break;
case LEFT_CLICK_AIR:
case LEFT_CLICK_BLOCK:
if (event.getItem() != null && event.getItem().getTypeId() != AIR)
{
final User user = ess.getUser(event.getPlayer());
if (user.hasPowerTools() && user.arePowerToolsEnabled() && usePowertools(user, event.getItem().getTypeId()))
{
event.setCancelled(true);
}
}
break;
default:
break;
}
}
private boolean usePowertools(final User user, final int id)
{
final List<String> commandList = user.getPowertool(id);
if (commandList == null || commandList.isEmpty())
{
return false;
}
boolean used = false;
// We need to loop through each command and execute
for (final String command : commandList)
{
if (command.contains("{player}"))
{
continue;
}
else if (command.startsWith("c:"))
{
used = true;
user.chat(command.substring(2));
}
else
{
used = true;
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
user.getServer().dispatchCommand(user.getBase(), command);
}
});
}
}
return used;
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPlayerPickupItem(final PlayerPickupItemEvent event)
{
if (ess.getSettings().getDisableItemPickupWhileAfk())
{
if (ess.getUser(event.getPlayer()).isAfk())
{
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void onInventoryClickEvent(final InventoryClickEvent event)
{
if (event.getView().getTopInventory().getType() == InventoryType.PLAYER)
{
final User user = ess.getUser(event.getWhoClicked());
final InventoryHolder invHolder = event.getView().getTopInventory().getHolder();
if (invHolder != null && invHolder instanceof HumanEntity)
{
final User invOwner = ess.getUser((HumanEntity)invHolder);
if (user.isInvSee() && (!user.isAuthorized("essentials.invsee.modify")
|| invOwner.isAuthorized("essentials.invsee.preventmodify")
|| !invOwner.isOnline()))
{
event.setCancelled(true);
}
}
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onInventoryCloseEvent(final InventoryCloseEvent event)
{
if (event.getView().getTopInventory().getType() == InventoryType.PLAYER)
{
final User user = ess.getUser(event.getPlayer());
user.setInvSee(false);
}
}
}

View File

@@ -1,50 +0,0 @@
package com.earth2me.essentials;
import java.util.logging.Level;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent;
public class EssentialsPluginListener implements Listener, IConf
{
private final transient IEssentials ess;
public EssentialsPluginListener(final IEssentials ess)
{
this.ess = ess;
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginEnable(final PluginEnableEvent event)
{
ess.getPermissionsHandler().checkPermissions();
ess.getAlternativeCommandsHandler().addPlugin(event.getPlugin());
if (!ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().setMethod(ess.getServer().getPluginManager()))
{
ess.getLogger().log(Level.INFO, "Payment method found (" + ess.getPaymentMethod().getMethod().getLongName() + " version: " + ess.getPaymentMethod().getMethod().getVersion() + ")");
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginDisable(final PluginDisableEvent event)
{
ess.getPermissionsHandler().checkPermissions();
ess.getAlternativeCommandsHandler().removePlugin(event.getPlugin());
// Check to see if the plugin thats being disabled is the one we are using
if (ess.getPaymentMethod() != null && ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().checkDisabled(event.getPlugin()))
{
ess.getPaymentMethod().reset();
ess.getLogger().log(Level.INFO, "Payment method was disabled. No longer accepting payments.");
}
}
@Override
public void reloadConfig()
{
ess.getPermissionsHandler().setUseSuperperms(ess.getSettings().useBukkitPermissions());
ess.getPermissionsHandler().checkPermissions();
}
}

View File

@@ -1,85 +0,0 @@
package com.earth2me.essentials;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Set;
import java.util.logging.Level;
import org.bukkit.entity.Player;
public class EssentialsTimer implements Runnable
{
private final transient IEssentials ess;
private final transient Set<User> onlineUsers = new HashSet<User>();
private transient long lastPoll = System.currentTimeMillis();
private final transient LinkedList<Float> history = new LinkedList<Float>();
EssentialsTimer(final IEssentials ess)
{
this.ess = ess;
}
@Override
public void run()
{
final long currentTime = System.currentTimeMillis();
long timeSpent = (currentTime - lastPoll) / 1000;
if (timeSpent == 0)
{
timeSpent = 1;
}
if (history.size() > 10)
{
history.remove();
}
float tps = 100f / timeSpent;
if (tps <= 20)
{
history.add(tps);
}
lastPoll = currentTime;
for (Player player : ess.getServer().getOnlinePlayers())
{
try
{
final User user = ess.getUser(player);
onlineUsers.add(user);
user.setLastOnlineActivity(currentTime);
user.checkActivity();
}
catch (Exception e)
{
ess.getLogger().log(Level.WARNING, "EssentialsTimer Error:", e);
}
}
final Iterator<User> iterator = onlineUsers.iterator();
while (iterator.hasNext())
{
final User user = iterator.next();
if (user.getLastOnlineActivity() < currentTime && user.getLastOnlineActivity() > user.getLastLogout())
{
user.setLastLogout(user.getLastOnlineActivity());
iterator.remove();
continue;
}
user.checkMuteTimeout(currentTime);
user.checkJailTimeout(currentTime);
user.resetInvulnerabilityAfterTeleport();
}
}
public float getAverageTPS()
{
float avg = 0;
for (Float f : history)
{
if (f != null)
{
avg += f;
}
}
return avg / history.size();
}
}

View File

@@ -1,816 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.craftbukkit.FakeWorld;
import com.earth2me.essentials.settings.Spawns;
import com.earth2me.essentials.storage.YamlStorageWriter;
import static com.earth2me.essentials.I18n._;
import java.io.*;
import java.math.BigInteger;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.inventory.ItemStack;
public class EssentialsUpgrade
{
private final static Logger LOGGER = Logger.getLogger("Minecraft");
private final transient IEssentials ess;
private final transient EssentialsConf doneFile;
EssentialsUpgrade(final IEssentials essentials)
{
ess = essentials;
if (!ess.getDataFolder().exists())
{
ess.getDataFolder().mkdirs();
}
doneFile = new EssentialsConf(new File(ess.getDataFolder(), "upgrades-done.yml"));
doneFile.load();
}
private void moveWorthValuesToWorthYml()
{
if (doneFile.getBoolean("moveWorthValuesToWorthYml", false))
{
return;
}
try
{
final File configFile = new File(ess.getDataFolder(), "config.yml");
if (!configFile.exists())
{
return;
}
final EssentialsConf conf = new EssentialsConf(configFile);
conf.load();
final Worth worth = new Worth(ess.getDataFolder());
boolean found = false;
for (Material mat : Material.values())
{
final int id = mat.getId();
final double value = conf.getDouble("worth-" + id, Double.NaN);
if (!Double.isNaN(value))
{
found = true;
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, _("upgradingFilesError"), e);
}
}
private void moveMotdRulesToFile(String name)
{
if (doneFile.getBoolean("move" + name + "ToFile", false))
{
return;
}
try
{
final File file = new File(ess.getDataFolder(), name + ".txt");
if (file.exists())
{
return;
}
final File configFile = new File(ess.getDataFolder(), "config.yml");
if (!configFile.exists())
{
return;
}
final EssentialsConf conf = new EssentialsConf(configFile);
conf.load();
List<String> lines = conf.getStringList(name);
if (lines != null && !lines.isEmpty())
{
if (!file.createNewFile())
{
throw new IOException("Failed to create file " + file);
}
PrintWriter writer = new PrintWriter(file);
for (String line : lines)
{
writer.println(line);
}
writer.close();
}
doneFile.setProperty("move" + name + "ToFile", true);
doneFile.save();
}
catch (Throwable e)
{
LOGGER.log(Level.SEVERE, _("upgradingFilesError"), e);
}
}
private void removeLinesFromConfig(File file, String regex, String info) throws Exception
{
boolean needUpdate = false;
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
{
final String line = bReader.readLine();
if (line == null)
{
break;
}
if (line.matches(regex))
{
if (!needUpdate && info != null)
{
bWriter.write(info, 0, info.length());
bWriter.newLine();
}
needUpdate = true;
}
else
{
if (line.endsWith("\r\n"))
{
bWriter.write(line, 0, line.length() - 2);
}
else if (line.endsWith("\r") || line.endsWith("\n"))
{
bWriter.write(line, 0, line.length() - 1);
}
else
{
bWriter.write(line, 0, line.length());
}
bWriter.newLine();
}
}
while (true);
bReader.close();
bWriter.close();
if (needUpdate)
{
if (!file.renameTo(new File(file.getParentFile(), file.getName().concat("." + System.currentTimeMillis() + ".upgradebackup"))))
{
throw new Exception(_("configFileMoveError"));
}
if (!tempFile.renameTo(file))
{
throw new Exception(_("configFileRenameError"));
}
}
else
{
tempFile.delete();
}
}
private void updateUsersToNewDefaultHome()
{
if (doneFile.getBoolean("updateUsersToNewDefaultHome", false))
{
return;
}
final File userdataFolder = new File(ess.getDataFolder(), "userdata");
if (!userdataFolder.exists() || !userdataFolder.isDirectory())
{
return;
}
final File[] userFiles = userdataFolder.listFiles();
for (File file : userFiles)
{
if (!file.isFile() || !file.getName().endsWith(".yml"))
{
continue;
}
final EssentialsConf config = new EssentialsConf(file);
try
{
config.load();
if (config.hasProperty("home") && !config.hasProperty("home.default"))
{
@SuppressWarnings("unchecked")
final List<Object> vals = (List<Object>)config.getProperty("home");
if (vals == null)
{
continue;
}
World world = ess.getServer().getWorlds().get(0);
if (vals.size() > 5)
{
world = ess.getServer().getWorld((String)vals.get(5));
}
if (world != null)
{
final Location loc = new Location(
world,
((Number)vals.get(0)).doubleValue(),
((Number)vals.get(1)).doubleValue(),
((Number)vals.get(2)).doubleValue(),
((Number)vals.get(3)).floatValue(),
((Number)vals.get(4)).floatValue());
final String worldName = world.getName().toLowerCase(Locale.ENGLISH);
if (worldName != null && !worldName.isEmpty())
{
config.removeProperty("home");
config.setProperty("home.default", worldName);
config.setProperty("home.worlds." + worldName, loc);
config.save();
}
}
}
}
catch (RuntimeException ex)
{
LOGGER.log(Level.INFO, "File: " + file.toString());
throw ex;
}
}
doneFile.setProperty("updateUsersToNewDefaultHome", true);
doneFile.save();
}
private void updateUsersPowerToolsFormat()
{
if (doneFile.getBoolean("updateUsersPowerToolsFormat", false))
{
return;
}
final File userdataFolder = new File(ess.getDataFolder(), "userdata");
if (!userdataFolder.exists() || !userdataFolder.isDirectory())
{
return;
}
final File[] userFiles = userdataFolder.listFiles();
for (File file : userFiles)
{
if (!file.isFile() || !file.getName().endsWith(".yml"))
{
continue;
}
final EssentialsConf config = new EssentialsConf(file);
try
{
config.load();
if (config.hasProperty("powertools"))
{
@SuppressWarnings("unchecked")
final Map<String, Object> powertools = config.getConfigurationSection("powertools").getValues(false);
if (powertools == null)
{
continue;
}
for (Map.Entry<String, Object> entry : powertools.entrySet())
{
if (entry.getValue() instanceof String)
{
List<String> temp = new ArrayList<String>();
temp.add((String)entry.getValue());
((Map<String, Object>)powertools).put(entry.getKey(), temp);
}
}
config.save();
}
}
catch (RuntimeException ex)
{
LOGGER.log(Level.INFO, "File: " + file.toString());
throw ex;
}
}
doneFile.setProperty("updateUsersPowerToolsFormat", true);
doneFile.save();
}
private void updateUsersHomesFormat()
{
if (doneFile.getBoolean("updateUsersHomesFormat", false))
{
return;
}
final File userdataFolder = new File(ess.getDataFolder(), "userdata");
if (!userdataFolder.exists() || !userdataFolder.isDirectory())
{
return;
}
final File[] userFiles = userdataFolder.listFiles();
for (File file : userFiles)
{
if (!file.isFile() || !file.getName().endsWith(".yml"))
{
continue;
}
final EssentialsConf config = new EssentialsConf(file);
try
{
config.load();
if (config.hasProperty("home") && config.hasProperty("home.default"))
{
@SuppressWarnings("unchecked")
final String defworld = (String)config.getProperty("home.default");
final Location defloc = getFakeLocation(config, "home.worlds." + defworld);
if (defloc != null)
{
config.setProperty("homes.home", defloc);
}
Set<String> worlds = config.getConfigurationSection("home.worlds").getKeys(false);
Location loc;
String worldName;
if (worlds == null)
{
continue;
}
for (String world : worlds)
{
if (defworld.equalsIgnoreCase(world))
{
continue;
}
loc = getFakeLocation(config, "home.worlds." + world);
if (loc == null)
{
continue;
}
worldName = loc.getWorld().getName().toLowerCase(Locale.ENGLISH);
if (worldName != null && !worldName.isEmpty())
{
config.setProperty("homes." + worldName, loc);
}
}
config.removeProperty("home");
config.save();
}
}
catch (RuntimeException ex)
{
LOGGER.log(Level.INFO, "File: " + file.toString());
throw ex;
}
}
doneFile.setProperty("updateUsersHomesFormat", true);
doneFile.save();
}
private void moveUsersDataToUserdataFolder()
{
final File usersFile = new File(ess.getDataFolder(), "users.yml");
if (!usersFile.exists())
{
return;
}
final EssentialsConf usersConfig = new EssentialsConf(usersFile);
usersConfig.load();
for (String username : usersConfig.getKeys(false))
{
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);
}
final List<String> mails = usersConfig.getStringList(username + ".mail");
if (mails != null && !mails.isEmpty())
{
user.setMails(mails);
}
if (!user.hasHome())
{
@SuppressWarnings("unchecked")
final List<Object> vals = (List<Object>)usersConfig.getProperty(username + ".home");
if (vals != null)
{
World world = ess.getServer().getWorlds().get(0);
if (vals.size() > 5)
{
world = getFakeWorld((String)vals.get(5));
}
if (world != null)
{
user.setHome("home", new Location(world,
((Number)vals.get(0)).doubleValue(),
((Number)vals.get(1)).doubleValue(),
((Number)vals.get(2)).doubleValue(),
((Number)vals.get(3)).floatValue(),
((Number)vals.get(4)).floatValue()));
}
}
}
}
usersFile.renameTo(new File(usersFile.getAbsolutePath() + ".old"));
}
private void convertWarps()
{
final File warpsFolder = new File(ess.getDataFolder(), "warps");
if (!warpsFolder.exists())
{
warpsFolder.mkdirs();
}
final File[] listOfFiles = warpsFolder.listFiles();
if (listOfFiles.length >= 1)
{
for (int i = 0; i < listOfFiles.length; i++)
{
final String filename = listOfFiles[i].getName();
if (listOfFiles[i].isFile() && filename.endsWith(".dat"))
{
try
{
final BufferedReader rx = new BufferedReader(new FileReader(listOfFiles[i]));
double x, y, z;
float yaw, pitch;
String worldName;
try
{
if (!rx.ready())
{
continue;
}
x = Double.parseDouble(rx.readLine().trim());
if (!rx.ready())
{
continue;
}
y = Double.parseDouble(rx.readLine().trim());
if (!rx.ready())
{
continue;
}
z = Double.parseDouble(rx.readLine().trim());
if (!rx.ready())
{
continue;
}
yaw = Float.parseFloat(rx.readLine().trim());
if (!rx.ready())
{
continue;
}
pitch = Float.parseFloat(rx.readLine().trim());
worldName = rx.readLine();
}
finally
{
rx.close();
}
World w = null;
for (World world : ess.getServer().getWorlds())
{
if (world.getEnvironment() != World.Environment.NETHER)
{
w = world;
break;
}
}
if (worldName != null)
{
worldName = worldName.trim();
World w1 = null;
w1 = getFakeWorld(worldName);
if (w1 != null)
{
w = w1;
}
}
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")))
{
throw new Exception(_("fileRenameError", filename));
}
}
catch (Exception ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
}
}
}
final File warpFile = new File(ess.getDataFolder(), "warps.txt");
if (warpFile.exists())
{
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)
{
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(_("fileRenameError", "warps.txt"));
}
}
}
finally
{
rx.close();
}
}
catch (Exception ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
}
}
private void sanitizeAllUserFilenames()
{
if (doneFile.getBoolean("sanitizeAllUserFilenames", false))
{
return;
}
final File usersFolder = new File(ess.getDataFolder(), "userdata");
if (!usersFolder.exists())
{
return;
}
final File[] listOfFiles = usersFolder.listFiles();
for (int i = 0; i < listOfFiles.length; i++)
{
final String filename = listOfFiles[i].getName();
if (!listOfFiles[i].isFile() || !filename.endsWith(".yml"))
{
continue;
}
final String sanitizedFilename = Util.sanitizeFileName(filename.substring(0, filename.length() - 4)) + ".yml";
if (sanitizedFilename.equals(filename))
{
continue;
}
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, _("userdataMoveError", filename, sanitizedFilename));
continue;
}
if (newFile.exists())
{
LOGGER.log(Level.WARNING, _("duplicatedUserdata", filename, sanitizedFilename));
continue;
}
if (!tmpFile.renameTo(newFile))
{
LOGGER.log(Level.WARNING, _("userdataMoveBackError", sanitizedFilename, sanitizedFilename));
}
}
doneFile.setProperty("sanitizeAllUserFilenames", true);
doneFile.save();
}
private World getFakeWorld(final String 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);
}
return null;
}
public Location getFakeLocation(EssentialsConf config, String path)
{
String worldName = config.getString((path != null ? path + "." : "") + "world");
if (worldName == null || worldName.isEmpty())
{
return null;
}
World world = getFakeWorld(worldName);
if (world == null)
{
return null;
}
return new Location(world,
config.getDouble((path != null ? path + "." : "") + "x", 0),
config.getDouble((path != null ? path + "." : "") + "y", 0),
config.getDouble((path != null ? path + "." : "") + "z", 0),
(float)config.getDouble((path != null ? path + "." : "") + "yaw", 0),
(float)config.getDouble((path != null ? path + "." : "") + "pitch", 0));
}
private void deleteOldItemsCsv()
{
if (doneFile.getBoolean("deleteOldItemsCsv", false))
{
return;
}
final File file = new File(ess.getDataFolder(), "items.csv");
if (file.exists())
{
try
{
final Set<BigInteger> oldconfigs = new HashSet<BigInteger>();
oldconfigs.add(new BigInteger("66ec40b09ac167079f558d1099e39f10", 16)); // sep 1
oldconfigs.add(new BigInteger("34284de1ead43b0bee2aae85e75c041d", 16)); // crlf
oldconfigs.add(new BigInteger("c33bc9b8ee003861611bbc2f48eb6f4f", 16)); // jul 24
oldconfigs.add(new BigInteger("6ff17925430735129fc2a02f830c1daa", 16)); // crlf
MessageDigest digest = ManagedFile.getDigest();
final BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
final DigestInputStream dis = new DigestInputStream(bis, digest);
final byte[] buffer = new byte[1024];
try
{
while (dis.read(buffer) != -1)
{
}
}
finally
{
dis.close();
}
BigInteger hash = new BigInteger(1, digest.digest());
if (oldconfigs.contains(hash) && !file.delete())
{
throw new IOException("Could not delete file " + file.toString());
}
doneFile.setProperty("deleteOldItemsCsv", true);
doneFile.save();
}
catch (IOException ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
}
private void updateSpawnsToNewSpawnsConfig()
{
if (doneFile.getBoolean("updateSpawnsToNewSpawnsConfig", false))
{
return;
}
final File configFile = new File(ess.getDataFolder(), "spawn.yml");
if (configFile.exists())
{
final EssentialsConf config = new EssentialsConf(configFile);
try
{
config.load();
if (!config.hasProperty("spawns"))
{
final Spawns spawns = new Spawns();
Set<String> keys = config.getKeys(false);
for (String group : keys)
{
Location loc = getFakeLocation(config, group);
spawns.getSpawns().put(group.toLowerCase(Locale.ENGLISH), loc);
}
if (!configFile.renameTo(new File(ess.getDataFolder(), "spawn.yml.old")))
{
throw new Exception(_("fileRenameError", "spawn.yml"));
}
PrintWriter writer = new PrintWriter(configFile);
try
{
new YamlStorageWriter(writer).save(spawns);
}
finally
{
writer.close();
}
}
}
catch (Exception ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
doneFile.setProperty("updateSpawnsToNewSpawnsConfig", true);
doneFile.save();
}
private void updateJailsToNewJailsConfig()
{
if (doneFile.getBoolean("updateJailsToNewJailsConfig", false))
{
return;
}
final File configFile = new File(ess.getDataFolder(), "jail.yml");
if (configFile.exists())
{
final EssentialsConf config = new EssentialsConf(configFile);
try
{
config.load();
if (!config.hasProperty("jails"))
{
final com.earth2me.essentials.settings.Jails jails = new com.earth2me.essentials.settings.Jails();
Set<String> keys = config.getKeys(false);
for (String jailName : keys)
{
Location loc = getFakeLocation(config, jailName);
jails.getJails().put(jailName.toLowerCase(Locale.ENGLISH), loc);
}
if (!configFile.renameTo(new File(ess.getDataFolder(), "jail.yml.old")))
{
throw new Exception(_("fileRenameError", "jail.yml"));
}
PrintWriter writer = new PrintWriter(configFile);
try
{
new YamlStorageWriter(writer).save(jails);
}
finally
{
writer.close();
}
}
}
catch (Exception ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
doneFile.setProperty("updateJailsToNewJailsConfig", true);
doneFile.save();
}
private void warnMetrics()
{
if (doneFile.getBoolean("warnMetrics", false))
{
return;
}
ess.getSettings().setMetricsEnabled(false);
doneFile.setProperty("warnMetrics", true);
doneFile.save();
}
public void beforeSettings()
{
if (!ess.getDataFolder().exists())
{
ess.getDataFolder().mkdirs();
}
moveWorthValuesToWorthYml();
moveMotdRulesToFile("motd");
moveMotdRulesToFile("rules");
}
public void afterSettings()
{
sanitizeAllUserFilenames();
updateUsersToNewDefaultHome();
moveUsersDataToUserdataFolder();
convertWarps();
updateUsersPowerToolsFormat();
updateUsersHomesFormat();
deleteOldItemsCsv();
updateSpawnsToNewSpawnsConfig();
updateJailsToNewJailsConfig();
warnMetrics();
}
}

View File

@@ -1,9 +0,0 @@
package com.earth2me.essentials;
/**
* @deprecated New interface will be IReload in api package
*/
@Deprecated
public interface IConf {
public void reloadConfig();
}

View File

@@ -1,78 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.api.IJails;
import com.earth2me.essentials.metrics.Metrics;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import java.util.List;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitScheduler;
/**
* @deprecated This will be moved to the api package soon
*/
@Deprecated
public interface IEssentials extends Plugin
{
void addReloadListener(IConf listener);
void reload();
boolean onCommandEssentials(CommandSender sender, Command command, String commandLabel, String[] args, ClassLoader classLoader, String commandPath, String permissionPrefix, IEssentialsModule module);
User getUser(Object base);
I18n getI18n();
User getOfflineUser(String name);
World getWorld(String name);
int broadcastMessage(IUser sender, String message);
ISettings getSettings();
BukkitScheduler getScheduler();
IJails getJails();
Warps getWarps();
Worth getWorth();
Backup getBackup();
Methods getPaymentMethod();
int scheduleAsyncDelayedTask(Runnable run);
int scheduleSyncDelayedTask(Runnable run);
int scheduleSyncDelayedTask(Runnable run, long delay);
int scheduleSyncRepeatingTask(final Runnable run, long delay, long period);
TNTExplodeListener getTNTListener();
PermissionsHandler getPermissionsHandler();
AlternativeCommandsHandler getAlternativeCommandsHandler();
void showError(final CommandSender sender, final Throwable exception, final String commandLabel);
ItemDb getItemDb();
UserMap getUserMap();
Metrics getMetrics();
void setMetrics(Metrics metrics);
EssentialsTimer getTimer();
List<String> getVanishedPlayers();
}

View File

@@ -1,6 +0,0 @@
package com.earth2me.essentials;
public interface IEssentialsModule
{
}

View File

@@ -1,9 +0,0 @@
package com.earth2me.essentials;
import org.bukkit.command.CommandSender;
public interface IReplyTo {
public void setReplyTo(CommandSender user);
public CommandSender getReplyTo();
}

View File

@@ -1,49 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.commands.IEssentialsCommand;
import org.bukkit.Location;
import org.bukkit.entity.Player;
/**
* @deprecated This will be moved to the api package soon
*/
@Deprecated
public interface IUser extends Player
{
long getLastTeleportTimestamp();
boolean isAuthorized(String node);
boolean isAuthorized(IEssentialsCommand cmd);
boolean isAuthorized(IEssentialsCommand cmd, String permissionPrefix);
void setLastTeleportTimestamp(long time);
Location getLastLocation();
Player getBase();
double getMoney();
void takeMoney(double value);
void giveMoney(double value);
boolean canAfford(double value);
String getGroup();
void setLastLocation();
Location getHome(String name) throws Exception;
Location getHome(Location loc) throws Exception;
boolean isHidden();
Teleport getTeleport();
void setJail(String jail);
}

View File

@@ -1,122 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.api.IItemDb;
import static com.earth2me.essentials.I18n._;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
public class ItemDb implements IConf, IItemDb
{
private final transient IEssentials ess;
public ItemDb(final IEssentials ess)
{
this.ess = ess;
file = new ManagedFile("items.csv", ess);
}
private final transient Map<String, Integer> items = new HashMap<String, Integer>();
private final transient Map<String, Short> durabilities = new HashMap<String, Short>();
private final transient ManagedFile file;
@Override
public void reloadConfig()
{
final List<String> lines = file.getLines();
if (lines.isEmpty())
{
return;
}
durabilities.clear();
items.clear();
for (String line : lines)
{
line = line.trim().toLowerCase(Locale.ENGLISH);
if (line.length() > 0 && line.charAt(0) == '#')
{
continue;
}
final String[] parts = line.split("[^a-z0-9]");
if (parts.length < 2)
{
continue;
}
final int numeric = Integer.parseInt(parts[1]);
durabilities.put(parts[0].toLowerCase(Locale.ENGLISH), parts.length > 2 && !parts[2].equals("0") ? Short.parseShort(parts[2]) : 0);
items.put(parts[0].toLowerCase(Locale.ENGLISH), numeric);
}
}
public ItemStack get(final String id, final int quantity) throws Exception
{
final ItemStack retval = get(id.toLowerCase(Locale.ENGLISH));
retval.setAmount(quantity);
return retval;
}
public ItemStack get(final String id) throws Exception
{
int itemid = 0;
String itemname = null;
short metaData = 0;
if (id.matches("^\\d+[:+',;.]\\d+$"))
{
itemid = Integer.parseInt(id.split("[:+',;.]")[0]);
metaData = Short.parseShort(id.split("[:+',;.]")[1]);
}
else if (id.matches("^\\d+$"))
{
itemid = Integer.parseInt(id);
}
else if (id.matches("^[^:+',;.]+[:+',;.]\\d+$"))
{
itemname = id.split("[:+',;.]")[0].toLowerCase(Locale.ENGLISH);
metaData = Short.parseShort(id.split("[:+',;.]")[1]);
}
else
{
itemname = id.toLowerCase(Locale.ENGLISH);
}
if (itemname != null)
{
if (items.containsKey(itemname))
{
itemid = items.get(itemname);
if (durabilities.containsKey(itemname) && metaData == 0)
{
metaData = durabilities.get(itemname);
}
}
else if (Material.getMaterial(itemname) != null)
{
itemid = Material.getMaterial(itemname).getId();
metaData = 0;
}
else
{
throw new Exception(_("unknownItemName", id));
}
}
final Material mat = Material.getMaterial(itemid);
if (mat == null)
{
throw new Exception(_("unknownItemId", itemid));
}
final ItemStack retval = new ItemStack(mat);
retval.setAmount(mat.getMaxStackSize());
retval.setDurability(metaData);
return retval;
}
}

View File

@@ -1,324 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.api.IJails;
import com.earth2me.essentials.storage.AsyncStorageObjectHolder;
import java.io.File;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.plugin.PluginManager;
public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.settings.Jails> implements IJails
{
private static final transient Logger LOGGER = Bukkit.getLogger();
private static transient boolean enabled = false;
public Jails(final IEssentials ess)
{
super(ess, com.earth2me.essentials.settings.Jails.class);
reloadConfig();
}
private void registerListeners()
{
enabled = true;
final PluginManager pluginManager = ess.getServer().getPluginManager();
final JailListener blockListener = new JailListener();
pluginManager.registerEvents(blockListener, ess);
}
@Override
public File getStorageFile()
{
return new File(ess.getDataFolder(), "jail.yml");
}
@Override
public void finishRead()
{
if (enabled == false && getCount() > 0)
{
registerListeners();
}
}
@Override
public void finishWrite()
{
if (enabled == false)
{
registerListeners();
}
}
@Override
public Location getJail(final String jailName) throws Exception
{
acquireReadLock();
try
{
if (getData().getJails() == null || jailName == null
|| !getData().getJails().containsKey(jailName.toLowerCase(Locale.ENGLISH)))
{
throw new Exception(_("jailNotExist"));
}
Location loc = getData().getJails().get(jailName.toLowerCase(Locale.ENGLISH));
if (loc == null || loc.getWorld() == null)
{
throw new Exception(_("jailNotExist"));
}
return loc;
}
finally
{
unlock();
}
}
@Override
public Collection<String> getList() throws Exception
{
acquireReadLock();
try
{
if (getData().getJails() == null)
{
return Collections.emptyList();
}
return new ArrayList<String>(getData().getJails().keySet());
}
finally
{
unlock();
}
}
@Override
public void removeJail(final String jail) throws Exception
{
acquireWriteLock();
try
{
if (getData().getJails() == null)
{
return;
}
getData().getJails().remove(jail.toLowerCase(Locale.ENGLISH));
}
finally
{
unlock();
}
}
@Override
public void sendToJail(final IUser user, final String jail) throws Exception
{
acquireReadLock();
try
{
if (user.isOnline())
{
Location loc = getJail(jail);
user.getTeleport().now(loc, false, TeleportCause.COMMAND);
}
user.setJail(jail);
}
finally
{
unlock();
}
}
@Override
public void setJail(final String jailName, final Location loc) throws Exception
{
acquireWriteLock();
try
{
if (getData().getJails() == null)
{
getData().setJails(new HashMap<String, Location>());
}
getData().getJails().put(jailName.toLowerCase(Locale.ENGLISH), loc);
}
finally
{
unlock();
}
}
@Override
public int getCount()
{
try
{
return getList().size();
}
catch (Exception ex)
{
return 0;
}
}
private class JailListener implements Listener
{
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBlockBreak(final BlockBreakEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBlockPlace(final BlockPlaceEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBlockDamage(final BlockDamageEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityDamageByEntity(final EntityDamageByEntityEvent event)
{
if (event.getCause() != DamageCause.ENTITY_ATTACK || event.getEntity().getType() != EntityType.PLAYER)
{
return;
}
final Entity damager = event.getDamager();
if (damager.getType() == EntityType.PLAYER)
{
final User user = ess.getUser(damager);
if (user != null && user.isJailed())
{
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPlayerInteract(final PlayerInteractEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerRespawn(final PlayerRespawnEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (!user.isJailed() || user.getJail() == null || user.getJail().isEmpty())
{
return;
}
try
{
event.setRespawnLocation(getJail(user.getJail()));
}
catch (Exception ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerTeleport(final PlayerTeleportEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (!user.isJailed() || user.getJail() == null || user.getJail().isEmpty())
{
return;
}
try
{
event.setTo(getJail(user.getJail()));
}
catch (Exception ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
user.sendMessage(_("jailMessage"));
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerJoin(final PlayerJoinEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (!user.isJailed() || user.getJail() == null || user.getJail().isEmpty())
{
return;
}
try
{
sendToJail(user, user.getJail());
}
catch (Exception ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
user.sendMessage(_("jailMessage"));
}
}
}

View File

@@ -1,176 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import static com.earth2me.essentials.I18n.capitalCase;
import com.earth2me.essentials.commands.NoChargeException;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import java.util.*;
import java.util.logging.Level;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
public class Kit
{
//TODO: Convert this to use one of the new text classes?
public static String listKits(final IEssentials ess, final User user) throws Exception
{
try
{
final ConfigurationSection kits = ess.getSettings().getKits();
final StringBuilder list = new StringBuilder();
for (String kiteItem : kits.getKeys(false))
{
if (user == null || user.isAuthorized("essentials.kit." + kiteItem.toLowerCase(Locale.ENGLISH)))
{
list.append(" ").append(capitalCase(kiteItem));
}
}
return list.toString().trim();
}
catch (Exception ex)
{
throw new Exception(_("kitError"), ex);
}
}
public static void checkTime(final User user, final String kitName, final Map<String, Object> els) throws NoChargeException
{
final Calendar time = new GregorianCalendar();
// Take the current time, and remove the delay from it.
final double delay = els.containsKey("delay") ? ((Number)els.get("delay")).doubleValue() : 0L;
final Calendar earliestTime = new GregorianCalendar();
earliestTime.add(Calendar.SECOND, -(int)delay);
earliestTime.add(Calendar.MILLISECOND, -(int)((delay * 1000.0) % 1000.0));
// This value contains the most recent time a kit could have been used that would allow another use.
final long earliestLong = earliestTime.getTimeInMillis();
// When was the last kit used?
final Long lastTime = user.getKitTimestamp(kitName);
if (lastTime == null || lastTime < earliestLong)
{
user.setKitTimestamp(kitName, time.getTimeInMillis());
}
else if (lastTime > time.getTimeInMillis())
{
// This is to make sure time didn't get messed up on last kit use.
// If this happens, let's give the user the benifit of the doubt.
user.setKitTimestamp(kitName, time.getTimeInMillis());
}
else
{
time.setTimeInMillis(lastTime);
time.add(Calendar.SECOND, (int)delay);
time.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
user.sendMessage(_("kitTimed", Util.formatDateDiff(time.getTimeInMillis())));
throw new NoChargeException();
}
}
public static List<String> getItems(final User user, final Map<String, Object> kit) throws Exception
{
if (kit == null)
{
throw new Exception(_("kitError2"));
}
try
{
return (List<String>)kit.get("items");
}
catch (Exception e)
{
user.sendMessage(_("kitError2"));
throw new Exception(_("kitErrorHelp"), e);
}
}
public static void expandItems(final IEssentials ess, final User user, final List<String> items) throws Exception
{
try
{
boolean spew = false;
for (String d : items)
{
final String[] parts = d.split(" ");
final String[] item = parts[0].split("[:+',;.]", 2);
final int id = Material.getMaterial(Integer.parseInt(item[0])).getId();
final short data = item.length > 1 ? Short.parseShort(item[1]) : 0;
final int amount = parts.length > 1 ? Integer.parseInt(parts[1]) : 1;
final ItemStack stack = new ItemStack(id, amount, data);
if (parts.length > 2)
{
for (int i = 2; i < parts.length; i++)
{
final String[] split = parts[i].split("[:+',;.]", 2);
if (split.length < 1)
{
continue;
}
final Enchantment enchantment = Enchantments.getByName(split[0]);
if (enchantment == null)
{
throw new Exception("Enchantment not found: " + split[0]);
}
int level;
if (split.length > 1)
{
level = Integer.parseInt(split[1]);
}
else
{
level = enchantment.getMaxLevel();
}
try
{
stack.addEnchantment(enchantment, level);
}
catch (Exception ex)
{
throw new Exception("Enchantment " + enchantment.getName() + ": " + ex.getMessage(), ex);
}
}
}
final Map<Integer, ItemStack> overfilled;
if (user.isAuthorized("essentials.oversizedstacks"))
{
overfilled = InventoryWorkaround.addItem(user.getInventory(), true, ess.getSettings().getOversizedStackSize(), stack);
}
else
{
overfilled = InventoryWorkaround.addItem(user.getInventory(), true, 0, stack);
}
for (ItemStack itemStack : overfilled.values())
{
user.getWorld().dropItemNaturally(user.getLocation(), itemStack);
spew = true;
}
}
user.updateInventory();
if (spew)
{
user.sendMessage(_("kitInvFull"));
}
}
catch (Exception e)
{
user.updateInventory();
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.WARNING, e.getMessage());
}
else
{
ess.getLogger().log(Level.WARNING, e.getMessage());
}
throw new Exception(_("kitError2"), e);
}
}
}

View File

@@ -1,120 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
public enum Mob
{
CHICKEN("Chicken", Enemies.FRIENDLY, EntityType.CHICKEN),
COW("Cow", Enemies.FRIENDLY, EntityType.COW),
CREEPER("Creeper", Enemies.ENEMY, EntityType.CREEPER),
GHAST("Ghast", Enemies.ENEMY, EntityType.GHAST),
GIANT("Giant", Enemies.ENEMY, EntityType.GIANT),
PIG("Pig", Enemies.FRIENDLY, EntityType.PIG),
PIGZOMB("PigZombie", Enemies.NEUTRAL, EntityType.PIG_ZOMBIE),
SHEEP("Sheep", Enemies.FRIENDLY, "", EntityType.SHEEP),
SKELETON("Skeleton", Enemies.ENEMY, EntityType.SKELETON),
SLIME("Slime", Enemies.ENEMY, EntityType.SLIME),
SPIDER("Spider", Enemies.ENEMY, EntityType.SPIDER),
SQUID("Squid", Enemies.FRIENDLY, EntityType.SQUID),
ZOMBIE("Zombie", Enemies.ENEMY, EntityType.ZOMBIE),
WOLF("Wolf", Enemies.NEUTRAL, EntityType.WOLF),
CAVESPIDER("CaveSpider", Enemies.ENEMY, EntityType.CAVE_SPIDER),
ENDERMAN("Enderman", Enemies.ENEMY, "", EntityType.ENDERMAN),
SILVERFISH("Silverfish", Enemies.ENEMY, "", EntityType.SILVERFISH),
ENDERDRAGON("EnderDragon", Enemies.ENEMY, EntityType.ENDER_DRAGON),
VILLAGER("Villager", Enemies.FRIENDLY, EntityType.VILLAGER),
BLAZE("Blaze", Enemies.ENEMY, EntityType.BLAZE),
MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, EntityType.MUSHROOM_COW),
MAGMACUBE("MagmaCube", Enemies.ENEMY, EntityType.MAGMA_CUBE),
SNOWMAN("Snowman", Enemies.FRIENDLY, "", EntityType.SNOWMAN),
OCELOT("Ocelot", Enemies.NEUTRAL, EntityType.OCELOT),
IRONGOLEM("IronGolem", Enemies.NEUTRAL, EntityType.IRON_GOLEM);
public static final Logger logger = Logger.getLogger("Minecraft");
private Mob(String n, Enemies en, String s, EntityType type)
{
this.suffix = s;
this.name = n;
this.type = en;
this.bukkitType = type;
}
private Mob(String n, Enemies en, EntityType type)
{
this.name = n;
this.type = en;
this.bukkitType = type;
}
public String suffix = "s";
final public String name;
final public Enemies type;
final private EntityType bukkitType;
private static final Map<String, Mob> hashMap = new HashMap<String, Mob>();
static
{
for (Mob mob : Mob.values())
{
hashMap.put(mob.name.toLowerCase(Locale.ENGLISH), mob);
}
}
public static Set<String> getMobList() {
return Collections.unmodifiableSet(hashMap.keySet());
}
public LivingEntity spawn(final Player player, final Server server, final Location loc) throws MobException
{
final LivingEntity entity = player.getWorld().spawn(loc, (Class<? extends LivingEntity>)this.bukkitType.getEntityClass());
if (entity == null)
{
logger.log(Level.WARNING, _("unableToSpawnMob"));
throw new MobException();
}
return entity;
}
public enum Enemies
{
FRIENDLY("friendly"),
NEUTRAL("neutral"),
ENEMY("enemy");
private Enemies(final String type)
{
this.type = type;
}
final protected String type;
}
public EntityType getType()
{
return bukkitType;
}
public static Mob fromName(final String name)
{
return hashMap.get(name.toLowerCase(Locale.ENGLISH));
}
public static class MobException extends Exception
{
private static final long serialVersionUID = 1L;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,38 +0,0 @@
package com.earth2me.essentials;
import lombok.Delegate;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.permissions.Permissible;
import org.bukkit.permissions.ServerOperator;
public class PlayerExtension implements Player
{
@Delegate(types =
{
Player.class, Entity.class, CommandSender.class, ServerOperator.class,
HumanEntity.class, ConfigurationSerializable.class, LivingEntity.class,
Permissible.class
})
protected Player base;
public PlayerExtension(final Player base)
{
this.base = base;
}
public final Player getBase()
{
return base;
}
public final Player setBase(final Player base)
{
return this.base = base;
}
}

View File

@@ -1,61 +0,0 @@
package com.earth2me.essentials;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityExplodeEvent;
public class TNTExplodeListener implements Listener, Runnable
{
private final transient IEssentials ess;
private transient boolean enabled = false;
private transient int timer = -1;
public TNTExplodeListener(final IEssentials ess)
{
super();
this.ess = ess;
}
public void enable()
{
if (!enabled)
{
enabled = true;
timer = ess.scheduleSyncDelayedTask(this, 1000);
return;
}
if (timer != -1)
{
ess.getScheduler().cancelTask(timer);
timer = ess.scheduleSyncDelayedTask(this, 1000);
}
}
@EventHandler(priority = EventPriority.LOW)
public void onEntityExplode(final EntityExplodeEvent event)
{
if (!enabled)
{
return;
}
if (event.getEntity() instanceof LivingEntity)
{
return;
}
if (event.blockList().size() < 1)
{
return;
}
event.setCancelled(true);
event.getLocation().getWorld().createExplosion(event.getLocation(), 0F);
}
@Override
public void run()
{
enabled = false;
}
}

View File

@@ -1,300 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.api.ITeleport;
import static com.earth2me.essentials.I18n._;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public class Teleport implements Runnable, ITeleport
{
private static final double MOVE_CONSTANT = 0.3;
private static class Target
{
private final Location location;
private final Entity entity;
public Target(Location location)
{
this.location = location;
this.entity = null;
}
public Target(Entity entity)
{
this.entity = entity;
this.location = null;
}
public Location getLocation()
{
if (this.entity != null)
{
return this.entity.getLocation();
}
return location;
}
}
private IUser user;
private int teleTimer = -1;
private long started; // time this task was initiated
private long delay; // how long to delay the teleport
private int health;
// note that I initially stored a clone of the location for reference, but...
// when comparing locations, I got incorrect mismatches (rounding errors, looked like)
// so, the X/Y/Z values are stored instead and rounded off
private long initX;
private long initY;
private long initZ;
private Target teleportTarget;
private Trade chargeFor;
private final IEssentials ess;
private static final Logger logger = Logger.getLogger("Minecraft");
private TeleportCause cause;
private void initTimer(long delay, Target target, Trade chargeFor, TeleportCause cause)
{
this.started = System.currentTimeMillis();
this.delay = delay;
this.health = user.getHealth();
this.initX = Math.round(user.getLocation().getX() * MOVE_CONSTANT);
this.initY = Math.round(user.getLocation().getY() * MOVE_CONSTANT);
this.initZ = Math.round(user.getLocation().getZ() * MOVE_CONSTANT);
this.teleportTarget = target;
this.chargeFor = chargeFor;
this.cause = cause;
}
@Override
public void run()
{
if (user == null || !user.isOnline() || user.getLocation() == null)
{
cancel();
return;
}
if (Math.round(user.getLocation().getX() * MOVE_CONSTANT) != initX
|| Math.round(user.getLocation().getY() * MOVE_CONSTANT) != initY
|| Math.round(user.getLocation().getZ() * MOVE_CONSTANT) != initZ
|| user.getHealth() < health)
{ // user moved, cancel teleport
cancel(true);
return;
}
health = user.getHealth(); // in case user healed, then later gets injured
long now = System.currentTimeMillis();
if (now > started + delay)
{
try
{
cooldown(false);
user.sendMessage(_("teleportationCommencing"));
try
{
now(teleportTarget, cause);
if (chargeFor != null)
{
chargeFor.charge(user);
}
}
catch (Throwable ex)
{
ess.showError(user.getBase(), ex, "teleport");
}
}
catch (Exception ex)
{
user.sendMessage(_("cooldownWithMessage", ex.getMessage()));
}
}
}
public Teleport(IUser user, IEssentials ess)
{
this.user = user;
this.ess = ess;
}
public void respawn(final Trade chargeFor, TeleportCause cause) throws Exception
{
final Player player = user.getBase();
final Location bed = player.getBedSpawnLocation();
final PlayerRespawnEvent pre = new PlayerRespawnEvent(player, bed == null ? player.getWorld().getSpawnLocation() : bed, bed != null);
ess.getServer().getPluginManager().callEvent(pre);
teleport(new Target(pre.getRespawnLocation()), chargeFor, cause);
}
public void warp(String warp, Trade chargeFor, TeleportCause cause) throws Exception
{
Location loc = ess.getWarps().getWarp(warp);
teleport(new Target(loc), chargeFor, cause);
user.sendMessage(_("warpingTo", warp));
}
public void cooldown(boolean check) throws Exception
{
final Calendar time = new GregorianCalendar();
if (user.getLastTeleportTimestamp() > 0)
{
// Take the current time, and remove the delay from it.
final double cooldown = ess.getSettings().getTeleportCooldown();
final Calendar earliestTime = new GregorianCalendar();
earliestTime.add(Calendar.SECOND, -(int)cooldown);
earliestTime.add(Calendar.MILLISECOND, -(int)((cooldown * 1000.0) % 1000.0));
// This value contains the most recent time a teleport could have been used that would allow another use.
final long earliestLong = earliestTime.getTimeInMillis();
// When was the last teleport used?
final Long lastTime = user.getLastTeleportTimestamp();
if (lastTime > time.getTimeInMillis())
{
// This is to make sure time didn't get messed up on last kit use.
// If this happens, let's give the user the benifit of the doubt.
user.setLastTeleportTimestamp(time.getTimeInMillis());
return;
}
else if (lastTime > earliestLong && !user.isAuthorized("essentials.teleport.cooldown.bypass"))
{
time.setTimeInMillis(lastTime);
time.add(Calendar.SECOND, (int)cooldown);
time.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0));
throw new Exception(_("timeBeforeTeleport", Util.formatDateDiff(time.getTimeInMillis())));
}
}
// if justCheck is set, don't update lastTeleport; we're just checking
if (!check)
{
user.setLastTeleportTimestamp(time.getTimeInMillis());
}
}
public void cancel(boolean notifyUser)
{
if (teleTimer == -1)
{
return;
}
try
{
ess.getServer().getScheduler().cancelTask(teleTimer);
if (notifyUser)
{
user.sendMessage(_("pendingTeleportCancelled"));
}
}
finally
{
teleTimer = -1;
}
}
public void cancel()
{
cancel(false);
}
public void teleport(Location loc, Trade chargeFor) throws Exception
{
teleport(new Target(loc), chargeFor, TeleportCause.PLUGIN);
}
public void teleport(Location loc, Trade chargeFor, TeleportCause cause) throws Exception
{
teleport(new Target(loc), chargeFor, cause);
}
public void teleport(Entity entity, Trade chargeFor, TeleportCause cause) throws Exception
{
teleport(new Target(entity), chargeFor, cause);
}
private void teleport(Target target, Trade chargeFor, TeleportCause cause) throws Exception
{
double delay = ess.getSettings().getTeleportDelay();
if (chargeFor != null)
{
chargeFor.isAffordableFor(user);
}
cooldown(true);
if (delay <= 0 || user.isAuthorized("essentials.teleport.timer.bypass"))
{
cooldown(false);
now(target, cause);
if (chargeFor != null)
{
chargeFor.charge(user);
}
return;
}
cancel();
Calendar c = new GregorianCalendar();
c.add(Calendar.SECOND, (int)delay);
c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
user.sendMessage(_("dontMoveMessage", Util.formatDateDiff(c.getTimeInMillis())));
initTimer((long)(delay * 1000.0), target, chargeFor, cause);
teleTimer = ess.scheduleSyncRepeatingTask(this, 10, 10);
}
private void now(Target target, TeleportCause cause) throws Exception
{
cancel();
user.setLastLocation();
user.getBase().teleport(Util.getSafeDestination(target.getLocation()), cause);
}
public void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception
{
if (cooldown)
{
cooldown(false);
}
now(new Target(loc), cause);
}
public void now(Location loc, Trade chargeFor, TeleportCause cause) throws Exception
{
cooldown(false);
chargeFor.charge(user);
now(new Target(loc), cause);
}
public void now(Entity entity, boolean cooldown, TeleportCause cause) throws Exception
{
if (cooldown)
{
cooldown(false);
}
now(new Target(entity), cause);
}
public void back(Trade chargeFor) throws Exception
{
teleport(new Target(user.getLastLocation()), chargeFor, TeleportCause.COMMAND);
}
public void back() throws Exception
{
now(new Target(user.getLastLocation()), TeleportCause.COMMAND);
}
public void home(Location loc, Trade chargeFor) throws Exception
{
teleport(new Target(loc), chargeFor, TeleportCause.COMMAND);
}
}

View File

@@ -1,693 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.register.payment.Method;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
private CommandSender replyTo = null;
private transient User teleportRequester;
private transient boolean teleportRequestHere;
private transient boolean vanished;
private transient final Teleport teleport;
private transient long teleportRequestTime;
private transient long lastOnlineActivity;
private transient long lastThrottledAction;
private transient long lastActivity = System.currentTimeMillis();
private boolean hidden = false;
private transient Location afkPosition = null;
private boolean invSee = false;
private static final Logger logger = Logger.getLogger("Minecraft");
User(final Player base, final IEssentials ess)
{
super(base, ess);
teleport = new Teleport(this, ess);
if (isAfk())
{
afkPosition = getLocation();
}
}
User update(final Player base)
{
setBase(base);
return this;
}
@Override
public boolean isAuthorized(final IEssentialsCommand cmd)
{
return isAuthorized(cmd, "essentials.");
}
@Override
public boolean isAuthorized(final IEssentialsCommand cmd, final String permissionPrefix)
{
return isAuthorized(permissionPrefix + (cmd.getName().equals("r") ? "msg" : cmd.getName()));
}
@Override
public boolean isAuthorized(final String node)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "checking if " + base.getName() + " has " + node);
}
if (base instanceof OfflinePlayer)
{
return false;
}
if (isOp())
{
return true;
}
if (isJailed())
{
return false;
}
try
{
return ess.getPermissionsHandler().hasPermission(base, node);
}
catch (Exception ex)
{
ess.getLogger().log(Level.SEVERE, "Permission System Error: " + ess.getPermissionsHandler().getName() + " returned: " + ex.getMessage());
return false;
}
}
public void healCooldown() throws Exception
{
final Calendar now = new GregorianCalendar();
if (getLastHealTimestamp() > 0)
{
final double cooldown = ess.getSettings().getHealCooldown();
final Calendar cooldownTime = new GregorianCalendar();
cooldownTime.setTimeInMillis(getLastHealTimestamp());
cooldownTime.add(Calendar.SECOND, (int)cooldown);
cooldownTime.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0));
if (cooldownTime.after(now) && !isAuthorized("essentials.heal.cooldown.bypass"))
{
throw new Exception(_("timeBeforeHeal", Util.formatDateDiff(cooldownTime.getTimeInMillis())));
}
}
setLastHealTimestamp(now.getTimeInMillis());
}
@Override
public void giveMoney(final double value)
{
giveMoney(value, null);
}
public void giveMoney(final double value, final CommandSender initiator)
{
if (value == 0)
{
return;
}
setMoney(getMoney() + value);
sendMessage(_("addedToAccount", Util.displayCurrency(value, ess)));
if (initiator != null)
{
initiator.sendMessage(_("addedToOthersAccount", Util.displayCurrency(value, ess), this.getDisplayName(), Util.displayCurrency(getMoney(), ess)));
}
}
public void payUser(final User reciever, final double value) throws Exception
{
if (value == 0)
{
return;
}
if (canAfford(value))
{
setMoney(getMoney() - value);
reciever.setMoney(reciever.getMoney() + value);
sendMessage(_("moneySentTo", Util.displayCurrency(value, ess), reciever.getDisplayName()));
reciever.sendMessage(_("moneyRecievedFrom", Util.displayCurrency(value, ess), getDisplayName()));
}
else
{
throw new Exception(_("notEnoughMoney"));
}
}
@Override
public void takeMoney(final double value)
{
takeMoney(value, null);
}
public void takeMoney(final double value, final CommandSender initiator)
{
if (value == 0)
{
return;
}
setMoney(getMoney() - value);
sendMessage(_("takenFromAccount", Util.displayCurrency(value, ess)));
if (initiator != null)
{
initiator.sendMessage(_("takenFromOthersAccount", Util.displayCurrency(value, ess), this.getDisplayName(), Util.displayCurrency(getMoney(), ess)));
}
}
@Override
public boolean canAfford(final double cost)
{
return canAfford(cost, true);
}
public boolean canAfford(final double cost, final boolean permcheck)
{
final double mon = getMoney();
if (!permcheck || isAuthorized("essentials.eco.loan"))
{
return (mon - cost) >= ess.getSettings().getMinMoney();
}
return cost <= mon;
}
public void dispose()
{
this.base = new OfflinePlayer(getName(), ess);
}
@Override
public void setReplyTo(final CommandSender user)
{
replyTo = user;
}
@Override
public CommandSender getReplyTo()
{
return replyTo;
}
@Override
public int compareTo(final User other)
{
return Util.stripFormat(this.getDisplayName()).compareToIgnoreCase(Util.stripFormat(other.getDisplayName()));
}
@Override
public boolean equals(final Object object)
{
if (!(object instanceof User))
{
return false;
}
return this.getName().equalsIgnoreCase(((User)object).getName());
}
@Override
public int hashCode()
{
return this.getName().hashCode();
}
public Boolean canSpawnItem(final int itemId)
{
return !ess.getSettings().itemSpawnBlacklist().contains(itemId);
}
public Location getHome() throws Exception
{
return getHome(getHomes().get(0));
}
public void setHome()
{
setHome("home", getLocation());
}
public void setHome(final String name)
{
setHome(name, getLocation());
}
@Override
public void setLastLocation()
{
setLastLocation(getLocation());
}
public void requestTeleport(final User player, final boolean here)
{
teleportRequestTime = System.currentTimeMillis();
teleportRequester = player;
teleportRequestHere = here;
}
public User getTeleportRequest()
{
return teleportRequester;
}
public boolean isTpRequestHere()
{
return teleportRequestHere;
}
public String getNick(final boolean longnick)
{
final StringBuilder prefix = new StringBuilder();
String nickname;
String suffix = "";
final String nick = getNickname();
if (ess.getSettings().isCommandDisabled("nick") || nick == null || nick.isEmpty() || nick.equals(getName()))
{
nickname = getName();
}
else
{
nickname = ess.getSettings().getNicknamePrefix() + nick;
}
if (isOp())
{
try
{
final String opPrefix = ess.getSettings().getOperatorColor().toString();
if (opPrefix.length() > 0)
{
prefix.insert(0, opPrefix);
suffix = "§f";
}
}
catch (Exception e)
{
}
}
if (ess.getSettings().addPrefixSuffix())
{
if (!ess.getSettings().disablePrefix())
{
final String ptext = ess.getPermissionsHandler().getPrefix(base).replace('&', '§');
prefix.insert(0, ptext);
suffix = "§f";
}
if (!ess.getSettings().disableSuffix())
{
final String stext = ess.getPermissionsHandler().getSuffix(base).replace('&', '§');
suffix = stext + "§f";
suffix = suffix.replace("§f§f", "§f");
}
}
final String strPrefix = prefix.toString();
String output = strPrefix + nickname + suffix;
if (!longnick && output.length() > 16)
{
output = strPrefix + nickname;
}
if (!longnick && output.length() > 16)
{
output = Util.lastCode(strPrefix) + nickname;
}
if (!longnick && output.length() > 16)
{
output = Util.lastCode(strPrefix) + nickname.substring(0, 14);
}
if (output.charAt(output.length() - 1) == '§') {
output = output.substring(0, output.length() - 1);
}
return output;
}
public void setDisplayNick()
{
if (base.isOnline() && ess.getSettings().changeDisplayName())
{
setDisplayName(getNick(true));
if (ess.getSettings().changePlayerListName())
{
String name = getNick(false);
try
{
setPlayerListName(name);
}
catch (IllegalArgumentException e)
{
if (ess.getSettings().isDebug())
{
logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player.");
}
}
}
}
}
@Override
public String getDisplayName()
{
return super.getDisplayName() == null ? super.getName() : super.getDisplayName();
}
@Override
public Teleport getTeleport()
{
return teleport;
}
public long getLastOnlineActivity()
{
return lastOnlineActivity;
}
public void setLastOnlineActivity(final long timestamp)
{
lastOnlineActivity = timestamp;
}
@Override
public double getMoney()
{
if (ess.getPaymentMethod().hasMethod())
{
try
{
final Method method = ess.getPaymentMethod().getMethod();
if (!method.hasAccount(this.getName()))
{
throw new Exception();
}
final Method.MethodAccount account = ess.getPaymentMethod().getMethod().getAccount(this.getName());
return account.balance();
}
catch (Throwable ex)
{
}
}
return super.getMoney();
}
@Override
public void setMoney(final double value)
{
if (ess.getPaymentMethod().hasMethod())
{
try
{
final Method method = ess.getPaymentMethod().getMethod();
if (!method.hasAccount(this.getName()))
{
throw new Exception();
}
final Method.MethodAccount account = ess.getPaymentMethod().getMethod().getAccount(this.getName());
account.set(value);
}
catch (Throwable ex)
{
}
}
super.setMoney(value);
Trade.log("Update", "Set", "API", getName(), new Trade(value, ess), null, null, null, ess);
}
public void updateMoneyCache(final double value)
{
if (ess.getPaymentMethod().hasMethod() && super.getMoney() != value)
{
super.setMoney(value);
}
}
@Override
public void setAfk(final boolean set)
{
this.setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : set);
if (set && !isAfk())
{
afkPosition = getLocation();
}
else if (!set && isAfk())
{
afkPosition = null;
}
super.setAfk(set);
}
@Override
public boolean toggleAfk()
{
final boolean now = super.toggleAfk();
this.setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : now);
return now;
}
@Override
public boolean isHidden()
{
return hidden;
}
public void setHidden(final boolean hidden)
{
this.hidden = hidden;
if (hidden == true)
{
setLastLogout(getLastOnlineActivity());
}
}
//Returns true if status expired during this check
public boolean checkJailTimeout(final long currentTime)
{
if (getJailTimeout() > 0 && getJailTimeout() < currentTime && isJailed())
{
setJailTimeout(0);
setJailed(false);
sendMessage(_("haveBeenReleased"));
setJail(null);
try
{
getTeleport().back();
}
catch (Exception ex)
{
}
return true;
}
return false;
}
//Returns true if status expired during this check
public boolean checkMuteTimeout(final long currentTime)
{
if (getMuteTimeout() > 0 && getMuteTimeout() < currentTime && isMuted())
{
setMuteTimeout(0);
sendMessage(_("canTalkAgain"));
setMuted(false);
return true;
}
return false;
}
//Returns true if status expired during this check
public boolean checkBanTimeout(final long currentTime)
{
if (getBanTimeout() > 0 && getBanTimeout() < currentTime && isBanned())
{
setBanTimeout(0);
setBanned(false);
return true;
}
return false;
}
public void updateActivity(final boolean broadcast)
{
if (isAfk())
{
setAfk(false);
if (broadcast && !isHidden())
{
setDisplayNick();
ess.broadcastMessage(this, _("userIsNotAway", getDisplayName()));
}
}
lastActivity = System.currentTimeMillis();
}
public void checkActivity()
{
final long autoafkkick = ess.getSettings().getAutoAfkKick();
if (autoafkkick > 0 && lastActivity > 0 && (lastActivity + (autoafkkick * 1000)) < System.currentTimeMillis()
&& !isHidden() && !isAuthorized("essentials.kick.exempt") && !isAuthorized("essentials.afk.kickexempt"))
{
final String kickReason = _("autoAfkKickReason", autoafkkick / 60.0);
lastActivity = 0;
kickPlayer(kickReason);
for (Player player : ess.getServer().getOnlinePlayers())
{
final User user = ess.getUser(player);
if (user.isAuthorized("essentials.kick.notify"))
{
player.sendMessage(_("playerKicked", Console.NAME, getName(), kickReason));
}
}
}
final long autoafk = ess.getSettings().getAutoAfk();
if (!isAfk() && autoafk > 0 && lastActivity + autoafk * 1000 < System.currentTimeMillis() && isAuthorized("essentials.afk"))
{
setAfk(true);
if (!isHidden())
{
setDisplayNick();
ess.broadcastMessage(this, _("userIsAway", getDisplayName()));
}
}
}
public Location getAfkPosition()
{
return afkPosition;
}
@Override
public boolean isGodModeEnabled()
{
return (super.isGodModeEnabled() && !ess.getSettings().getNoGodWorlds().contains(getLocation().getWorld().getName()))
|| (isAfk() && ess.getSettings().getFreezeAfkPlayers());
}
public boolean isGodModeEnabledRaw()
{
return super.isGodModeEnabled();
}
@Override
public String getGroup()
{
return ess.getPermissionsHandler().getGroup(base);
}
public boolean inGroup(final String group)
{
return ess.getPermissionsHandler().inGroup(base, group);
}
public boolean canBuild()
{
if (isOp())
{
return true;
}
return ess.getPermissionsHandler().canBuild(base, getGroup());
}
public long getTeleportRequestTime()
{
return teleportRequestTime;
}
public boolean isInvSee()
{
return invSee;
}
public void setInvSee(final boolean set)
{
invSee = set;
}
private transient long teleportInvulnerabilityTimestamp = 0;
public void enableInvulnerabilityAfterTeleport()
{
final long time = ess.getSettings().getTeleportInvulnerability();
if (time > 0)
{
teleportInvulnerabilityTimestamp = System.currentTimeMillis() + time;
}
}
public void resetInvulnerabilityAfterTeleport()
{
if (teleportInvulnerabilityTimestamp != 0
&& teleportInvulnerabilityTimestamp < System.currentTimeMillis())
{
teleportInvulnerabilityTimestamp = 0;
}
}
public boolean hasInvulnerabilityAfterTeleport()
{
return teleportInvulnerabilityTimestamp != 0 && teleportInvulnerabilityTimestamp >= System.currentTimeMillis();
}
public boolean isVanished()
{
return vanished;
}
public void setVanished(final boolean set)
{
vanished = set;
if (set)
{
for (Player p : ess.getServer().getOnlinePlayers())
{
if (!ess.getUser(p).isAuthorized("essentials.vanish.see"))
{
p.hidePlayer(getBase());
}
}
setHidden(true);
ess.getVanishedPlayers().add(getName());
}
else
{
for (Player p : ess.getServer().getOnlinePlayers())
{
p.showPlayer(getBase());
}
setHidden(false);
ess.getVanishedPlayers().remove(getName());
}
}
public void toggleVanished()
{
final boolean set = !vanished;
this.setVanished(set);
}
public boolean checkSignThrottle() {
if (isSignThrottled()) {
return true;
}
updateThrottle();
return false;
}
public boolean isSignThrottled()
{
final long minTime = lastThrottledAction + (1000 / ess.getSettings().getSignUsePerSecond());
return (System.currentTimeMillis() < minTime);
}
public void updateThrottle()
{
lastThrottledAction = System.currentTimeMillis();;
}
}

View File

@@ -1,142 +0,0 @@
package com.earth2me.essentials;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.util.concurrent.UncheckedExecutionException;
import java.io.File;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.ExecutionException;
import org.bukkit.entity.Player;
public class UserMap extends CacheLoader<String, User> implements IConf
{
private final transient IEssentials ess;
private final transient Cache<String, User> users = CacheBuilder.newBuilder().softValues().build(this);
private final transient ConcurrentSkipListSet<String> keys = new ConcurrentSkipListSet<String>();
public UserMap(final IEssentials ess)
{
super();
this.ess = ess;
loadAllUsersAsync(ess);
}
private void loadAllUsersAsync(final IEssentials ess)
{
ess.scheduleAsyncDelayedTask(new Runnable()
{
@Override
public void run()
{
final File userdir = new File(ess.getDataFolder(), "userdata");
if (!userdir.exists())
{
return;
}
keys.clear();
users.invalidateAll();
for (String string : userdir.list())
{
if (!string.endsWith(".yml"))
{
continue;
}
final String name = string.substring(0, string.length() - 4);
keys.add(Util.sanitizeFileName(name));
}
}
});
}
public boolean userExists(final String name)
{
return keys.contains(Util.sanitizeFileName(name));
}
public User getUser(final String name)
{
try
{
return users.get(name);
}
catch (ExecutionException ex)
{
return null;
}
catch (UncheckedExecutionException ex)
{
return null;
}
}
@Override
public User load(final String name) throws Exception
{
String sanitizedName = Util.sanitizeFileName(name);
if (!sanitizedName.equals(name))
{
User user = getUser(sanitizedName);
if (user == null)
{
throw new Exception("User not found!");
}
else
{
return user;
}
}
for (Player player : ess.getServer().getOnlinePlayers())
{
if (player.getName().equalsIgnoreCase(name))
{
keys.add(sanitizedName);
return new User(player, ess);
}
}
final File userFile = getUserFile2(sanitizedName);
if (userFile.exists())
{
keys.add(sanitizedName);
return new User(new OfflinePlayer(name, ess), ess);
}
throw new Exception("User not found!");
}
@Override
public void reloadConfig()
{
loadAllUsersAsync(ess);
}
public void removeUser(final String name)
{
keys.remove(Util.sanitizeFileName(name));
users.invalidate(Util.sanitizeFileName(name));
users.invalidate(name);
}
public Set<String> getAllUniqueUsers()
{
return Collections.unmodifiableSet(keys);
}
public int getUniqueUsers()
{
return keys.size();
}
public File getUserFile(final String name)
{
return getUserFile2(Util.sanitizeFileName(name));
}
private File getUserFile2(final String name)
{
final File userFolder = new File(ess.getDataFolder(), "userdata");
return new File(userFolder, name + ".yml");
}
}

View File

@@ -1,621 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.*;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.ItemStack;
public class Util
{
private Util()
{
}
private final static Logger logger = Logger.getLogger("Minecraft");
private final static Pattern INVALIDFILECHARS = Pattern.compile("[^a-z0-9]");
private final static Pattern INVALIDCHARS = Pattern.compile("[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFC]");
public static String sanitizeFileName(final String name)
{
final String newName = INVALIDFILECHARS.matcher(name.toLowerCase(Locale.ENGLISH)).replaceAll("_");
return newName;
}
public static String sanitizeString(final String string)
{
return INVALIDCHARS.matcher(string).replaceAll("");
}
public static String formatDateDiff(long date)
{
Calendar c = new GregorianCalendar();
c.setTimeInMillis(date);
Calendar now = new GregorianCalendar();
return Util.formatDateDiff(now, c);
}
public static String formatDateDiff(Calendar fromDate, Calendar toDate)
{
boolean future = false;
if (toDate.equals(fromDate))
{
return _("now");
}
if (toDate.after(fromDate))
{
future = true;
}
StringBuilder sb = new StringBuilder();
int[] types = new int[]
{
Calendar.YEAR,
Calendar.MONTH,
Calendar.DAY_OF_MONTH,
Calendar.HOUR_OF_DAY,
Calendar.MINUTE,
Calendar.SECOND
};
String[] names = new String[]
{
_("year"),
_("years"),
_("month"),
_("months"),
_("day"),
_("days"),
_("hour"),
_("hours"),
_("minute"),
_("minutes"),
_("second"),
_("seconds")
};
int accuracy = 0;
for (int i = 0; i < types.length; i++)
{
if (accuracy > 2)
{
break;
}
int diff = dateDiff(types[i], fromDate, toDate, future);
if (diff > 0)
{
accuracy++;
sb.append(" ").append(diff).append(" ").append(names[i * 2 + (diff > 1 ? 1 : 0)]);
}
}
if (sb.length() == 0)
{
return "now";
}
return sb.toString().trim();
}
private static int dateDiff(int type, Calendar fromDate, Calendar toDate, boolean future)
{
int diff = 0;
long savedDate = fromDate.getTimeInMillis();
while ((future && !fromDate.after(toDate)) || (!future && !fromDate.before(toDate)))
{
savedDate = fromDate.getTimeInMillis();
fromDate.add(type, future ? 1 : -1);
diff++;
}
diff--;
fromDate.setTimeInMillis(savedDate);
return diff;
}
public static long parseDateDiff(String time, boolean future) throws Exception
{
Pattern timePattern = Pattern.compile(
"(?:([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]*)?)?", Pattern.CASE_INSENSITIVE);
Matcher m = timePattern.matcher(time);
int years = 0;
int months = 0;
int weeks = 0;
int days = 0;
int hours = 0;
int minutes = 0;
int seconds = 0;
boolean found = false;
while (m.find())
{
if (m.group() == null || m.group().isEmpty())
{
continue;
}
for (int i = 0; i < m.groupCount(); i++)
{
if (m.group(i) != null && !m.group(i).isEmpty())
{
found = true;
break;
}
}
if (found)
{
if (m.group(1) != null && !m.group(1).isEmpty())
{
years = Integer.parseInt(m.group(1));
}
if (m.group(2) != null && !m.group(2).isEmpty())
{
months = Integer.parseInt(m.group(2));
}
if (m.group(3) != null && !m.group(3).isEmpty())
{
weeks = Integer.parseInt(m.group(3));
}
if (m.group(4) != null && !m.group(4).isEmpty())
{
days = Integer.parseInt(m.group(4));
}
if (m.group(5) != null && !m.group(5).isEmpty())
{
hours = Integer.parseInt(m.group(5));
}
if (m.group(6) != null && !m.group(6).isEmpty())
{
minutes = Integer.parseInt(m.group(6));
}
if (m.group(7) != null && !m.group(7).isEmpty())
{
seconds = Integer.parseInt(m.group(7));
}
break;
}
}
if (!found)
{
throw new Exception(_("illegalDate"));
}
Calendar c = new GregorianCalendar();
if (years > 0)
{
c.add(Calendar.YEAR, years * (future ? 1 : -1));
}
if (months > 0)
{
c.add(Calendar.MONTH, months * (future ? 1 : -1));
}
if (weeks > 0)
{
c.add(Calendar.WEEK_OF_YEAR, weeks * (future ? 1 : -1));
}
if (days > 0)
{
c.add(Calendar.DAY_OF_MONTH, days * (future ? 1 : -1));
}
if (hours > 0)
{
c.add(Calendar.HOUR_OF_DAY, hours * (future ? 1 : -1));
}
if (minutes > 0)
{
c.add(Calendar.MINUTE, minutes * (future ? 1 : -1));
}
if (seconds > 0)
{
c.add(Calendar.SECOND, seconds * (future ? 1 : -1));
}
Calendar max = new GregorianCalendar();
max.add(Calendar.YEAR, 10);
if (c.after(max)) {
return max.getTimeInMillis();
}
return c.getTimeInMillis();
}
// The player can stand inside these materials
private static final Set<Integer> AIR_MATERIALS = new HashSet<Integer>();
private static final HashSet<Byte> AIR_MATERIALS_TARGET = new HashSet<Byte>();
static
{
AIR_MATERIALS.add(Material.AIR.getId());
AIR_MATERIALS.add(Material.SAPLING.getId());
AIR_MATERIALS.add(Material.POWERED_RAIL.getId());
AIR_MATERIALS.add(Material.DETECTOR_RAIL.getId());
AIR_MATERIALS.add(Material.LONG_GRASS.getId());
AIR_MATERIALS.add(Material.DEAD_BUSH.getId());
AIR_MATERIALS.add(Material.YELLOW_FLOWER.getId());
AIR_MATERIALS.add(Material.RED_ROSE.getId());
AIR_MATERIALS.add(Material.BROWN_MUSHROOM.getId());
AIR_MATERIALS.add(Material.RED_MUSHROOM.getId());
AIR_MATERIALS.add(Material.TORCH.getId());
AIR_MATERIALS.add(Material.REDSTONE_WIRE.getId());
AIR_MATERIALS.add(Material.SEEDS.getId());
AIR_MATERIALS.add(Material.SIGN_POST.getId());
AIR_MATERIALS.add(Material.WOODEN_DOOR.getId());
AIR_MATERIALS.add(Material.LADDER.getId());
AIR_MATERIALS.add(Material.RAILS.getId());
AIR_MATERIALS.add(Material.WALL_SIGN.getId());
AIR_MATERIALS.add(Material.LEVER.getId());
AIR_MATERIALS.add(Material.STONE_PLATE.getId());
AIR_MATERIALS.add(Material.IRON_DOOR_BLOCK.getId());
AIR_MATERIALS.add(Material.WOOD_PLATE.getId());
AIR_MATERIALS.add(Material.REDSTONE_TORCH_OFF.getId());
AIR_MATERIALS.add(Material.REDSTONE_TORCH_ON.getId());
AIR_MATERIALS.add(Material.STONE_BUTTON.getId());
AIR_MATERIALS.add(Material.SNOW.getId());
AIR_MATERIALS.add(Material.SUGAR_CANE_BLOCK.getId());
AIR_MATERIALS.add(Material.DIODE_BLOCK_OFF.getId());
AIR_MATERIALS.add(Material.DIODE_BLOCK_ON.getId());
AIR_MATERIALS.add(Material.TRAP_DOOR.getId());
AIR_MATERIALS.add(Material.PUMPKIN_STEM.getId());
AIR_MATERIALS.add(Material.MELON_STEM.getId());
AIR_MATERIALS.add(Material.VINE.getId());
AIR_MATERIALS.add(Material.FENCE_GATE.getId());
AIR_MATERIALS.add(Material.WATER_LILY.getId());
AIR_MATERIALS.add(Material.NETHER_FENCE.getId());
AIR_MATERIALS.add(Material.NETHER_WARTS.getId());
for (Integer integer : AIR_MATERIALS)
{
AIR_MATERIALS_TARGET.add(integer.byteValue());
}
AIR_MATERIALS_TARGET.add((byte)Material.WATER.getId());
AIR_MATERIALS_TARGET.add((byte)Material.STATIONARY_WATER.getId());
}
public static Location getTarget(final LivingEntity entity) throws Exception
{
final Block block = entity.getTargetBlock(AIR_MATERIALS_TARGET, 300);
if (block == null)
{
throw new Exception("Not targeting a block");
}
return block.getLocation();
}
public static Location getSafeDestination(final Location loc) throws Exception
{
if (loc == null || loc.getWorld() == null)
{
throw new Exception(_("destinationNotSet"));
}
final World world = loc.getWorld();
int x = loc.getBlockX();
int y = (int)Math.round(loc.getY());
int z = loc.getBlockZ();
while (isBlockAboveAir(world, x, y, z))
{
y -= 1;
if (y < 0)
{
break;
}
}
while (isBlockUnsafe(world, x, y, z))
{
y += 1;
if (y >= world.getHighestBlockYAt(x, z))
{
x += 1;
break;
}
}
while (isBlockUnsafe(world, x, y, z))
{
y -= 1;
if (y <= 1)
{
x += 1;
y = world.getHighestBlockYAt(x, z);
if (x - 32 > loc.getBlockX())
{
throw new Exception(_("holeInFloor"));
}
}
}
return new Location(world, x + 0.5D, y, z + 0.5D, loc.getYaw(), loc.getPitch());
}
private static boolean isBlockAboveAir(final World world, final int x, final int y, final int z)
{
return AIR_MATERIALS.contains(world.getBlockAt(x, y - 1, z).getType().getId());
}
public static boolean isBlockUnsafe(final World world, final int x, final int y, final int z)
{
final Block below = world.getBlockAt(x, y - 1, z);
if (below.getType() == Material.LAVA || below.getType() == Material.STATIONARY_LAVA)
{
return true;
}
if (below.getType() == Material.FIRE)
{
return true;
}
if ((!AIR_MATERIALS.contains(world.getBlockAt(x, y, z).getType().getId()))
|| (!AIR_MATERIALS.contains(world.getBlockAt(x, y + 1, z).getType().getId())))
{
return true;
}
return isBlockAboveAir(world, x, y, z);
}
public static ItemStack convertBlockToItem(final Block block)
{
final ItemStack is = new ItemStack(block.getType(), 1, (short)0, block.getData());
switch (is.getType())
{
case WOODEN_DOOR:
is.setType(Material.WOOD_DOOR);
is.setDurability((short)0);
break;
case IRON_DOOR_BLOCK:
is.setType(Material.IRON_DOOR);
is.setDurability((short)0);
break;
case SIGN_POST:
case WALL_SIGN:
is.setType(Material.SIGN);
is.setDurability((short)0);
break;
case CROPS:
is.setType(Material.SEEDS);
is.setDurability((short)0);
break;
case CAKE_BLOCK:
is.setType(Material.CAKE);
is.setDurability((short)0);
break;
case BED_BLOCK:
is.setType(Material.BED);
is.setDurability((short)0);
break;
case REDSTONE_WIRE:
is.setType(Material.REDSTONE);
is.setDurability((short)0);
break;
case REDSTONE_TORCH_OFF:
case REDSTONE_TORCH_ON:
is.setType(Material.REDSTONE_TORCH_ON);
is.setDurability((short)0);
break;
case DIODE_BLOCK_OFF:
case DIODE_BLOCK_ON:
is.setType(Material.DIODE);
is.setDurability((short)0);
break;
case DOUBLE_STEP:
is.setType(Material.STEP);
break;
case TORCH:
case RAILS:
case LADDER:
case WOOD_STAIRS:
case COBBLESTONE_STAIRS:
case LEVER:
case STONE_BUTTON:
case FURNACE:
case DISPENSER:
case PUMPKIN:
case JACK_O_LANTERN:
case WOOD_PLATE:
case STONE_PLATE:
case PISTON_STICKY_BASE:
case PISTON_BASE:
case IRON_FENCE:
case THIN_GLASS:
case TRAP_DOOR:
case FENCE:
case FENCE_GATE:
case NETHER_FENCE:
is.setDurability((short)0);
break;
case FIRE:
return null;
case PUMPKIN_STEM:
is.setType(Material.PUMPKIN_SEEDS);
break;
case MELON_STEM:
is.setType(Material.MELON_SEEDS);
break;
}
return is;
}
private static DecimalFormat dFormat = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US));
public static String formatAsCurrency(final double value)
{
String str = dFormat.format(value);
if (str.endsWith(".00"))
{
str = str.substring(0, str.length() - 3);
}
return str;
}
public static String displayCurrency(final double value, final IEssentials ess)
{
return _("currency", ess.getSettings().getCurrencySymbol(), formatAsCurrency(value));
}
public static String shortCurrency(final double value, final IEssentials ess)
{
return ess.getSettings().getCurrencySymbol() + formatAsCurrency(value);
}
public static double roundDouble(final double d)
{
return Math.round(d * 100.0) / 100.0;
}
public static boolean isInt(final String sInt)
{
try
{
Integer.parseInt(sInt);
}
catch (NumberFormatException e)
{
return false;
}
return true;
}
public static String joinList(Object... list)
{
return joinList(", ", list);
}
public static String joinList(String seperator, Object... list)
{
StringBuilder buf = new StringBuilder();
for (Object each : list)
{
if (buf.length() > 0)
{
buf.append(seperator);
}
if (each instanceof Collection)
{
buf.append(joinList(seperator, ((Collection)each).toArray()));
}
else
{
try
{
buf.append(each.toString());
}
catch (Exception e)
{
buf.append(each.toString());
}
}
}
return buf.toString();
}
public static String lastCode(final String input) {
int pos = input.lastIndexOf("§");
if (pos == -1 || (pos + 1) == input.length()) {
return "";
}
return input.substring(pos, pos + 2);
}
private static transient final Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)");
private static transient final Pattern VANILLA_PATTERN = Pattern.compile("\u00A7+[0-9A-FK-ORa-fk-or]");
private static transient final Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])");
private static transient final Pattern VANILLA_COLOR_PATTERN = Pattern.compile("\u00A7+[0-9A-Fa-f]");
private static transient final Pattern VANILLA_MAGIC_PATTERN = Pattern.compile("\u00A7+[Kk]");
private static transient final Pattern VANILLA_FORMAT_PATTERN = Pattern.compile("\u00A7+[L-ORl-or]");
private static transient final Pattern REPLACE_COLOR_PATTERN = Pattern.compile("&([0-9a-f])");
private static transient final Pattern REPLACE_MAGIC_PATTERN = Pattern.compile("&(k)");
private static transient final Pattern REPLACE_FORMAT_PATTERN = Pattern.compile("&([l-or])");
public static String stripFormat(final String input)
{
if (input == null)
{
return null;
}
return VANILLA_PATTERN.matcher(input).replaceAll("");
}
public static String replaceFormat(final String input)
{
if (input == null)
{
return null;
}
return REPLACE_PATTERN.matcher(input).replaceAll("\u00a7$1");
}
public static String blockURL(final String input)
{
if (input == null)
{
return null;
}
String text = URL_PATTERN.matcher(input).replaceAll("$1 $2");
while (URL_PATTERN.matcher(text).find())
{
text = URL_PATTERN.matcher(text).replaceAll("$1 $2");
}
return text;
}
public static String formatString(final IUser user, final String permBase, final String input)
{
if (input == null)
{
return null;
}
String message;
if (user.isAuthorized(permBase + ".color"))
{
message = Util.replaceColor(input, REPLACE_COLOR_PATTERN);
}
else
{
message = Util.stripColor(input, VANILLA_COLOR_PATTERN);
}
if (user.isAuthorized(permBase + ".magic"))
{
message = Util.replaceColor(message, REPLACE_MAGIC_PATTERN);
}
else
{
message = Util.stripColor(message, VANILLA_MAGIC_PATTERN);
}
if (user.isAuthorized(permBase + ".format"))
{
message = Util.replaceColor(message, REPLACE_FORMAT_PATTERN);
}
else
{
message = Util.stripColor(message, VANILLA_FORMAT_PATTERN);
}
return message;
}
public static String formatMessage(final IUser user, final String permBase, final String input)
{
if (input == null)
{
return null;
}
String message = formatString(user, permBase, input);
if (!user.isAuthorized(permBase + ".url"))
{
message = Util.blockURL(message);
}
return message;
}
private static String stripColor(final String input, final Pattern pattern)
{
return pattern.matcher(input).replaceAll("");
}
private static String replaceColor(final String input, final Pattern pattern)
{
return pattern.matcher(input).replaceAll("\u00a7$1");
}
}

View File

@@ -1,152 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.commands.WarpNotFoundException;
import java.io.File;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Server;
public class Warps implements IConf
{
private static final Logger logger = Logger.getLogger("Minecraft");
private final Map<StringIgnoreCase, EssentialsConf> warpPoints = new HashMap<StringIgnoreCase, EssentialsConf>();
private final File warpsFolder;
private final Server server;
public Warps(Server server, File dataFolder)
{
this.server = server;
warpsFolder = new File(dataFolder, "warps");
if (!warpsFolder.exists())
{
warpsFolder.mkdirs();
}
reloadConfig();
}
public boolean isEmpty()
{
return warpPoints.isEmpty();
}
public Collection<String> getWarpNames()
{
final List<String> keys = new ArrayList<String>();
for (StringIgnoreCase stringIgnoreCase : warpPoints.keySet())
{
keys.add(stringIgnoreCase.getString());
}
Collections.sort(keys, String.CASE_INSENSITIVE_ORDER);
return keys;
}
public Location getWarp(String warp) throws Exception
{
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(warp));
if (conf == null)
{
throw new WarpNotFoundException();
}
return conf.getLocation(null, server);
}
public void setWarp(String name, Location loc) throws Exception
{
String filename = Util.sanitizeFileName(name);
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name));
if (conf == null)
{
File confFile = new File(warpsFolder, filename + ".yml");
if (confFile.exists())
{
throw new Exception(_("similarWarpExist"));
}
conf = new EssentialsConf(confFile);
warpPoints.put(new StringIgnoreCase(name), conf);
}
conf.setProperty(null, loc);
conf.setProperty("name", name);
conf.save();
}
public void delWarp(String name) throws Exception
{
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name));
if (conf == null)
{
throw new Exception(_("warpNotExist"));
}
if (!conf.getFile().delete())
{
throw new Exception(_("warpDeleteError"));
}
warpPoints.remove(new StringIgnoreCase(name));
}
@Override
public final void reloadConfig()
{
warpPoints.clear();
File[] listOfFiles = warpsFolder.listFiles();
if (listOfFiles.length >= 1)
{
for (int i = 0; i < listOfFiles.length; i++)
{
String filename = listOfFiles[i].getName();
if (listOfFiles[i].isFile() && filename.endsWith(".yml"))
{
try
{
EssentialsConf conf = new EssentialsConf(listOfFiles[i]);
conf.load();
String name = conf.getString("name");
if (name != null)
{
warpPoints.put(new StringIgnoreCase(name), conf);
}
}
catch (Exception ex)
{
logger.log(Level.WARNING, _("loadWarpError", filename), ex);
}
}
}
}
}
private static class StringIgnoreCase
{
private final String string;
public StringIgnoreCase(String string)
{
this.string = string;
}
@Override
public int hashCode()
{
return getString().toLowerCase(Locale.ENGLISH).hashCode();
}
@Override
public boolean equals(Object o)
{
if (o instanceof StringIgnoreCase)
{
return getString().equalsIgnoreCase(((StringIgnoreCase)o).getString());
}
return false;
}
public String getString()
{
return string;
}
}
}

View File

@@ -1,61 +0,0 @@
package com.earth2me.essentials;
import java.io.File;
import java.util.Locale;
import java.util.logging.Logger;
import org.bukkit.inventory.ItemStack;
public class Worth implements IConf
{
private static final Logger logger = Logger.getLogger("Minecraft");
private final EssentialsConf config;
public Worth(File dataFolder)
{
config = new EssentialsConf(new File(dataFolder, "worth.yml"));
config.setTemplateName("/worth.yml");
config.load();
}
public double getPrice(ItemStack itemStack)
{
String itemname = itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
double result;
result = config.getDouble("worth." + itemname + "." + itemStack.getDurability(), Double.NaN);
if (Double.isNaN(result))
{
result = config.getDouble("worth." + itemname + ".0", Double.NaN);
}
if (Double.isNaN(result))
{
result = config.getDouble("worth." + itemname, Double.NaN);
}
if (Double.isNaN(result))
{
result = config.getDouble("worth-" + itemStack.getTypeId(), Double.NaN);
}
return result;
}
public void setPrice(ItemStack itemStack, double price)
{
if (itemStack.getType().getData() == null)
{
config.setProperty("worth." + itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), price);
}
else
{
// Bukkit-bug: getDurability still contains the correct value, while getData().getData() is 0.
config.setProperty("worth." + itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "") + "." + itemStack.getDurability(), price);
}
config.removeProperty("worth-" + itemStack.getTypeId());
config.save();
}
@Override
public void reloadConfig()
{
config.load();
}
}

View File

@@ -1,10 +0,0 @@
package com.earth2me.essentials.api;
import java.util.Map;
import org.bukkit.command.PluginCommand;
public interface IAlternativeCommandsHandler
{
Map<String, String> disabledCommands();
}

View File

@@ -1,51 +0,0 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.perm.IPermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
public interface IEssentials extends Plugin, IReload
{
void addReloadListener(IReload listener);
IUser getUser(Object base);
int broadcastMessage(IUser sender, String message);
II18n getI18n();
ISettings getSettings();
IJails getJail();
IWarps getWarps();
IWorth getWorth();
IItemDb getItemDb();
IUserMap getUserMap();
IEssentialsEconomy getEconomy();
World getWorld(String name);
Methods getPaymentMethod();
int scheduleAsyncDelayedTask(Runnable run);
int scheduleSyncDelayedTask(Runnable run);
int scheduleSyncDelayedTask(Runnable run, long delay);
int scheduleSyncRepeatingTask(Runnable run, long delay, long period);
IPermissionsHandler getPermissionsHandler();
IAlternativeCommandsHandler getAlternativeCommandsHandler();
void showCommandError(CommandSender sender, String commandLabel, Throwable exception);
}

View File

@@ -1,37 +0,0 @@
package com.earth2me.essentials.api;
public interface IEssentialsEconomy
{
double getMoney(String name) throws UserDoesNotExistException;
void setMoney(String name, double balance) throws UserDoesNotExistException, NoLoanPermittedException;
void add(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException;
void subtract(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException;
void divide(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException;
void multiply(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException;
void resetBalance(String name) throws UserDoesNotExistException, NoLoanPermittedException;
boolean hasEnough(String name, double amount) throws UserDoesNotExistException;
boolean hasMore(String name, double amount) throws UserDoesNotExistException;
boolean hasLess(String name, double amount) throws UserDoesNotExistException;
boolean isNegative(String name) throws UserDoesNotExistException;
String format(double amount);
boolean playerExists(String name);
boolean isNPC(String name) throws UserDoesNotExistException;
boolean createNPC(String name);
void removeNPC(String name) throws UserDoesNotExistException;
}

View File

@@ -1,9 +0,0 @@
package com.earth2me.essentials.api;
import java.util.Locale;
public interface II18n
{
Locale getCurrentLocale();
}

View File

@@ -1,11 +0,0 @@
package com.earth2me.essentials.api;
import org.bukkit.inventory.ItemStack;
public interface IItemDb
{
ItemStack get(final String name, final int quantity) throws Exception;
ItemStack get(final String name) throws Exception;
}

View File

@@ -1,20 +0,0 @@
package com.earth2me.essentials.api;
import java.util.Collection;
import org.bukkit.Location;
public interface IJails extends IReload
{
Location getJail(String jailName) throws Exception;
Collection<String> getList() throws Exception;
int getCount();
void removeJail(String jail) throws Exception;
void sendToJail(com.earth2me.essentials.IUser user, String jail) throws Exception;
void setJail(String jailName, Location loc) throws Exception;
}

View File

@@ -1,10 +0,0 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.settings.Settings;
import com.earth2me.essentials.storage.IStorageObjectHolder;
public interface ISettings extends IStorageObjectHolder<Settings>
{
}

View File

@@ -1,10 +0,0 @@
package com.earth2me.essentials.api;
import org.bukkit.Location;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public interface ITeleport
{
void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception;
}

View File

@@ -1,43 +0,0 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.commands.IEssentialsCommand;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public interface IUser extends Player, IReload
{
long getLastTeleportTimestamp();
boolean isAuthorized(String node);
boolean isAuthorized(IEssentialsCommand cmd);
boolean isAuthorized(IEssentialsCommand cmd, String permissionPrefix);
void setLastTeleportTimestamp(long time);
Location getLastLocation();
Player getBase();
double getMoney();
void takeMoney(double value);
void giveMoney(double value);
String getGroup();
void setLastLocation();
Location getHome(String name) throws Exception;
Location getHome(Location loc) throws Exception;
boolean isHidden();
ITeleport getTeleport();
void setJail(String jail);
}

View File

@@ -1,20 +0,0 @@
package com.earth2me.essentials.api;
import java.io.File;
import java.util.Set;
public interface IUserMap
{
boolean userExists(final String name);
IUser getUser(final String name);
void removeUser(final String name);
Set<String> getAllUniqueUsers();
int getUniqueUsers();
File getUserFile(final String name);
}

View File

@@ -1,16 +0,0 @@
package com.earth2me.essentials.api;
import java.util.Collection;
import org.bukkit.Location;
public interface IWarps extends IReload
{
Location getWarp(String warp) throws Exception;
Collection<String> getWarps();
void removeWarp(String name) throws Exception;
void setWarp(String name, Location loc) throws Exception;
}

View File

@@ -1,11 +0,0 @@
package com.earth2me.essentials.api;
import org.bukkit.inventory.ItemStack;
public interface IWorth extends IReload
{
double getPrice(ItemStack itemStack);
void setPrice(ItemStack itemStack, double price);
}

View File

@@ -1,12 +0,0 @@
package com.earth2me.essentials.api;
import static com.earth2me.essentials.I18n._;
public class NoLoanPermittedException extends Exception
{
public NoLoanPermittedException()
{
super(_("negativeBalanceError"));
}
}

View File

@@ -1,12 +0,0 @@
package com.earth2me.essentials.api;
import static com.earth2me.essentials.I18n._;
public class UserDoesNotExistException extends Exception
{
public UserDoesNotExistException(String name)
{
super(_("userDoesNotExist", name));
}
}

View File

@@ -1,53 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commandafk extends EssentialsCommand
{
public Commandafk()
{
super("afk");
}
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.afk.others"))
{
User afkUser = ess.getUser(ess.getServer().matchPlayer(args[0]));
if (afkUser != null)
{
toggleAfk(afkUser);
}
}
else
{
toggleAfk(user);
}
}
private void toggleAfk(User user)
{
user.setDisplayNick();
if (!user.toggleAfk())
{
//user.sendMessage(_("markedAsNotAway"));
if (!user.isHidden())
{
ess.broadcastMessage(user, _("userIsNotAway", user.getDisplayName()));
}
user.updateActivity(false);
}
else
{
//user.sendMessage(_("markedAsAway"));
if (!user.isHidden())
{
ess.broadcastMessage(user, _("userIsAway", user.getDisplayName()));
}
}
}
}

View File

@@ -1,30 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commandback extends EssentialsCommand
{
public Commandback()
{
super("back");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (user.getWorld() != user.getLastLocation().getWorld() && ess.getSettings().isWorldTeleportPermissions()
&& !user.isAuthorized("essentials.world." + user.getLastLocation().getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.world." + user.getLastLocation().getWorld().getName()));
}
final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.sendMessage(_("backUsageMsg"));
user.getTeleport().back(charge);
throw new NoChargeException();
}
}

View File

@@ -1,32 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Backup;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandbackup extends EssentialsCommand
{
public Commandbackup()
{
super("backup");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
final Backup backup = ess.getBackup();
if (backup == null)
{
throw new Exception(_("backupDisabled"));
}
final String command = ess.getSettings().getBackupCommand();
if (command == null || "".equals(command) || "save-all".equalsIgnoreCase(command))
{
throw new Exception(_("backupDisabled"));
}
backup.run();
sender.sendMessage(_("backupStarted"));
}
}

View File

@@ -1,37 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandbalance extends EssentialsCommand
{
public Commandbalance()
{
super("balance");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
sender.sendMessage(_("balance", Util.displayCurrency(getPlayer(server, args, 0, true).getMoney(), ess)));
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
final double bal = (args.length < 1
|| !(user.isAuthorized("essentials.balance.others")
|| user.isAuthorized("essentials.balance.other"))
? user
: getPlayer(server, args, 0, true)).getMoney();
user.sendMessage(_("balance", Util.displayCurrency(bal, ess)));
}
}

View File

@@ -1,68 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandban extends EssentialsCommand
{
public Commandban()
{
super("ban");
}
@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();
}
final User user = getPlayer(server, args, 0, true);
if (!user.isOnline())
{
if (sender instanceof Player
&& !ess.getUser(sender).isAuthorized("essentials.ban.offline"))
{
sender.sendMessage(_("banExempt"));
return;
}
}
else
{
if (user.isAuthorized("essentials.ban.exempt"))
{
sender.sendMessage(_("banExempt"));
return;
}
}
final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
String banReason;
if (args.length > 1)
{
banReason = _("banFormat", getFinalArg(args, 1), senderName);
}
else
{
banReason = _("banFormat", _("defaultBanReason"), senderName);
}
user.setBanReason(banReason);
user.setBanned(true);
user.kickPlayer(banReason);
for (Player onlinePlayer : server.getOnlinePlayers())
{
final User player = ess.getUser(onlinePlayer);
if (player.isAuthorized("essentials.ban.notify"))
{
onlinePlayer.sendMessage(_("playerBanned", senderName, user.getName(), banReason));
}
}
}
}

View File

@@ -1,42 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandbanip extends EssentialsCommand
{
public Commandbanip()
{
super("banip");
}
@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();
}
final User player = ess.getUser(args[0]);
if (player == null)
{
ess.getServer().banIP(args[0]);
sender.sendMessage(_("banIpAddress"));
}
else
{
final String ipAddress = player.getLastLoginAddress();
if (ipAddress.length() == 0)
{
throw new Exception(_("playerNotFound"));
}
ess.getServer().banIP(player.getLastLoginAddress());
sender.sendMessage(_("banIpAddress"));
}
}
}

View File

@@ -1,51 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.TreeType;
public class Commandbigtree extends EssentialsCommand
{
public Commandbigtree()
{
super("bigtree");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
TreeType tree;
if (args.length > 0 && args[0].equalsIgnoreCase("redwood"))
{
tree = TreeType.TALL_REDWOOD;
}
else if (args.length > 0 && args[0].equalsIgnoreCase("tree"))
{
tree = TreeType.BIG_TREE;
}
else if (args.length > 0 && args[0].equalsIgnoreCase("jungle"))
{
tree = TreeType.JUNGLE;
}
else
{
throw new NotEnoughArgumentsException();
}
final Location loc = Util.getTarget(user);
final Location safeLocation = Util.getSafeDestination(loc);
final boolean success = user.getWorld().generateTree(safeLocation, tree);
if (success)
{
user.sendMessage(_("bigTreeSuccess"));
}
else
{
throw new Exception(_("bigTreeFailure"));
}
}
}

View File

@@ -1,26 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandbroadcast extends EssentialsCommand
{
public Commandbroadcast()
{
super("broadcast");
}
@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();
}
ess.broadcastMessage(null, _("broadcast", Util.replaceFormat(getFinalArg(args, 0))));
}
}

View File

@@ -1,30 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandburn extends EssentialsCommand
{
public Commandburn()
{
super("burn");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
for (Player p : server.matchPlayer(args[0]))
{
p.setFireTicks(Integer.parseInt(args[1]) * 20);
sender.sendMessage(_("burnMsg", p.getDisplayName(), Integer.parseInt(args[1])));
}
}
}

View File

@@ -1,98 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.List;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandclearinventory extends EssentialsCommand
{
public Commandclearinventory()
{
super("clearinventory");
}
//TODO: Cleanup
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
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]);
if (!online.isEmpty())
{
for (Player p : online)
{
p.getInventory().clear();
user.sendMessage(_("inventoryClearedOthers", p.getDisplayName()));
}
return;
}
throw new Exception(_("playerNotFound"));
}
else
{
Player p = server.getPlayer(args[0]);
if (p != null)
{
p.getInventory().clear();
user.sendMessage(_("inventoryClearedOthers", p.getDisplayName()));
}
else
{
throw new Exception(_("playerNotFound"));
}
}
}
else
{
user.getInventory().clear();
user.sendMessage(_("inventoryCleared"));
}
}
@Override
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
if (args[0].length() >= 3)
{
List<Player> online = server.matchPlayer(args[0]);
if (!online.isEmpty())
{
for (Player p : online)
{
p.getInventory().clear();
sender.sendMessage(_("inventoryClearedOthers", p.getDisplayName()));
}
return;
}
throw new Exception(_("playerNotFound"));
}
else
{
Player u = server.getPlayer(args[0]);
if (u != null)
{
u.getInventory().clear();
sender.sendMessage(_("inventoryClearedOthers", u.getDisplayName()));
}
else
{
throw new Exception(_("playerNotFound"));
}
}
}
}

View File

@@ -1,60 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.Locale;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commanddelhome extends EssentialsCommand
{
public Commanddelhome()
{
super("delhome");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
User user = ess.getUser(sender);
String name;
String[] expandedArg;
//Allowing both formats /sethome khobbits house | /sethome khobbits:house
final String[] nameParts = args[0].split(":");
if (nameParts[0].length() != args[0].length())
{
expandedArg = nameParts;
}
else
{
expandedArg = args;
}
if (expandedArg.length > 1 && (user == null || user.isAuthorized("essentials.delhome.others")))
{
user = getPlayer(server, expandedArg, 0, true);
name = expandedArg[1];
}
else if (user == null)
{
throw new NotEnoughArgumentsException();
}
else
{
name = expandedArg[0];
}
//TODO: Think up a nice error message
/*
* if (name.equalsIgnoreCase("bed")) { throw new Exception("You cannot remove the vanilla home point"); }
*/
user.delHome(name.toLowerCase(Locale.ENGLISH));
sender.sendMessage(_("deleteHome", name));
}
}

View File

@@ -1,25 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commanddeljail extends EssentialsCommand
{
public Commanddeljail()
{
super("deljail");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
ess.getJails().removeJail(args[0]);
sender.sendMessage(_("deleteJail", args[0]));
}
}

View File

@@ -1,25 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commanddelwarp extends EssentialsCommand
{
public Commanddelwarp()
{
super("delwarp");
}
@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();
}
ess.getWarps().delWarp(args[0]);
sender.sendMessage(_("deleteWarp", args[0]));
}
}

View File

@@ -1,32 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commanddepth extends EssentialsCommand
{
public Commanddepth()
{
super("depth");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
final int depth = user.getLocation().getBlockY() - 63;
if (depth > 0)
{
user.sendMessage(_("depthAboveSea", depth));
}
else if (depth < 0)
{
user.sendMessage(_("depthBelowSea", (-depth)));
}
else
{
user.sendMessage(_("depth"));
}
}
}

View File

@@ -1,115 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.Locale;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandeco extends EssentialsCommand
{
public Commandeco()
{
super("eco");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
EcoCommands cmd;
double amount;
try
{
cmd = EcoCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH));
amount = Double.parseDouble(args[2].replaceAll("[^0-9\\.]", ""));
}
catch (Exception ex)
{
throw new NotEnoughArgumentsException(ex);
}
if (args[1].contentEquals("**"))
{
for (String sUser : ess.getUserMap().getAllUniqueUsers())
{
final User player = ess.getUser(sUser);
switch (cmd)
{
case GIVE:
player.giveMoney(amount);
break;
case TAKE:
if (player.canAfford(amount, false))
{
player.takeMoney(amount);
}
break;
case RESET:
player.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
break;
}
}
}
else if (args[1].contentEquals("*"))
{
for (Player onlinePlayer : server.getOnlinePlayers())
{
final User player = ess.getUser(onlinePlayer);
switch (cmd)
{
case GIVE:
player.giveMoney(amount);
break;
case TAKE:
if (!player.canAfford(amount, false))
{
throw new Exception(_("notEnoughMoney"));
}
player.takeMoney(amount);
break;
case RESET:
player.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
break;
}
}
}
else
{
final User player = getPlayer(server, args, 1, true);
switch (cmd)
{
case GIVE:
player.giveMoney(amount, sender);
break;
case TAKE:
if (!player.canAfford(amount, false))
{
throw new Exception(_("notEnoughMoney"));
}
player.takeMoney(amount, sender);
break;
case RESET:
player.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
break;
}
}
}
private enum EcoCommands
{
GIVE, TAKE, RESET
}
}

View File

@@ -1,96 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Enchantments;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.*;
import org.bukkit.Server;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
public class Commandenchant extends EssentialsCommand
{
public Commandenchant()
{
super("enchant");
}
//TODO: Implement charge costs: final Trade charge = new Trade("enchant-" + enchantmentName, ess);
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
final ItemStack stack = user.getItemInHand();
if (stack == null)
{
throw new Exception(_("nothingInHand"));
}
if (args.length == 0)
{
final Set<String> enchantmentslist = new TreeSet<String>();
for (Map.Entry<String, Enchantment> entry : Enchantments.entrySet())
{
final String enchantmentName = entry.getValue().getName().toLowerCase(Locale.ENGLISH);
if (enchantmentslist.contains(enchantmentName) || user.isAuthorized("essentials.enchant." + enchantmentName))
{
enchantmentslist.add(entry.getKey());
//enchantmentslist.add(enchantmentName);
}
}
throw new NotEnoughArgumentsException(_("enchantments", Util.joinList(enchantmentslist.toArray())));
}
int level = -1;
if (args.length > 1)
{
try
{
level = Integer.parseInt(args[1]);
}
catch (NumberFormatException ex)
{
level = -1;
}
}
final Enchantment enchantment = getEnchantment(args[0], user);
if (level < 0 || level > enchantment.getMaxLevel())
{
level = enchantment.getMaxLevel();
}
if (level == 0)
{
stack.removeEnchantment(enchantment);
}
else
{
stack.addEnchantment(enchantment, level);
}
user.getInventory().setItemInHand(stack);
user.updateInventory();
final String enchantmentName = enchantment.getName().toLowerCase(Locale.ENGLISH);
if (level == 0)
{
user.sendMessage(_("enchantmentRemoved", enchantmentName.replace('_', ' ')));
}
else
{
user.sendMessage(_("enchantmentApplied", enchantmentName.replace('_', ' ')));
}
}
public static Enchantment getEnchantment(final String name, final User user) throws Exception
{
final Enchantment enchantment = Enchantments.getByName(name);
if (enchantment == null)
{
throw new Exception(_("enchantmentNotFound"));
}
final String enchantmentName = enchantment.getName().toLowerCase(Locale.ENGLISH);
if (user != null && !user.isAuthorized("essentials.enchant." + enchantmentName))
{
throw new Exception(_("enchantmentPerm", enchantmentName));
}
return enchantment;
}
}

View File

@@ -1,204 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Util;
import com.earth2me.essentials.metrics.Metrics;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
public class Commandessentials extends EssentialsCommand
{
public Commandessentials()
{
super("essentials");
}
private transient int taskid;
private final transient Map<Player, Block> noteBlocks = new HashMap<Player, Block>();
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length == 0) {
run_disabled(server, sender, commandLabel, args);
}
else if (args[0].equalsIgnoreCase("debug"))
{
run_debug(server, sender, commandLabel, args);
}
else if (args[0].equalsIgnoreCase("nya"))
{
run_nya(server, sender, commandLabel, args);
}
else if (args[0].equalsIgnoreCase("moo"))
{
run_moo(server, sender, commandLabel, args);
}
else if (args[0].equalsIgnoreCase("opt-out"))
{
run_optout(server, sender, commandLabel, args);
}
else {
run_reload(server, sender, commandLabel, args);
}
}
private void run_disabled(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
sender.sendMessage("Essentials " + ess.getDescription().getVersion());
sender.sendMessage("/<command> <reload/debug>");
final StringBuilder disabledCommands = new StringBuilder();
for (Map.Entry<String, String> entry : ess.getAlternativeCommandsHandler().disabledCommands().entrySet())
{
if (disabledCommands.length() > 0) {
disabledCommands.append(", ");
}
disabledCommands.append(entry.getKey()).append(" => ").append(entry.getValue());
}
if (disabledCommands.length() > 0) {
sender.sendMessage(_("blockList"));
sender.sendMessage(disabledCommands.toString());
}
}
private void run_debug(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
ess.getSettings().setDebug(!ess.getSettings().isDebug());
sender.sendMessage("Essentials " + ess.getDescription().getVersion() + " debug mode " + (ess.getSettings().isDebug() ? "enabled" : "disabled"));
}
private void run_reload(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
ess.reload();
sender.sendMessage(_("essentialsReload", ess.getDescription().getVersion()));
}
private void run_nya(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
final Map<String, Byte> noteMap = new HashMap<String, Byte>();
noteMap.put("1F#", (byte)0x0);
noteMap.put("1G", (byte)0x1);
noteMap.put("1G#", (byte)0x2);
noteMap.put("1A", (byte)0x3);
noteMap.put("1A#", (byte)0x4);
noteMap.put("1B", (byte)0x5);
noteMap.put("1C", (byte)0x6);
noteMap.put("1C#", (byte)0x7);
noteMap.put("1D", (byte)0x8);
noteMap.put("1D#", (byte)0x9);
noteMap.put("1E", (byte)0xA);
noteMap.put("1F", (byte)0xB);
noteMap.put("2F#", (byte)(0x0 + 0xC));
noteMap.put("2G", (byte)(0x1 + 0xC));
noteMap.put("2G#", (byte)(0x2 + 0xC));
noteMap.put("2A", (byte)(0x3 + 0xC));
noteMap.put("2A#", (byte)(0x4 + 0xC));
noteMap.put("2B", (byte)(0x5 + 0xC));
noteMap.put("2C", (byte)(0x6 + 0xC));
noteMap.put("2C#", (byte)(0x7 + 0xC));
noteMap.put("2D", (byte)(0x8 + 0xC));
noteMap.put("2D#", (byte)(0x9 + 0xC));
noteMap.put("2E", (byte)(0xA + 0xC));
noteMap.put("2F", (byte)(0xB + 0xC));
if (!noteBlocks.isEmpty())
{
return;
}
final String tuneStr = "1D#,1E,2F#,,2A#,1E,1D#,1E,2F#,2B,2D#,2E,2D#,2A#,2B,,2F#,,1D#,1E,2F#,2B,2C#,2A#,2B,2C#,2E,2D#,2E,2C#,,2F#,,2G#,,1D,1D#,,1C#,1D,1C#,1B,,1B,,1C#,,1D,,1D,1C#,1B,1C#,1D#,2F#,2G#,1D#,2F#,1C#,1D#,1B,1C#,1B,1D#,,2F#,,2G#,1D#,2F#,1C#,1D#,1B,1D,1D#,1D,1C#,1B,1C#,1D,,1B,1C#,1D#,2F#,1C#,1D,1C#,1B,1C#,,1B,,1C#,,2F#,,2G#,,1D,1D#,,1C#,1D,1C#,1B,,1B,,1C#,,1D,,1D,1C#,1B,1C#,1D#,2F#,2G#,1D#,2F#,1C#,1D#,1B,1C#,1B,1D#,,2F#,,2G#,1D#,2F#,1C#,1D#,1B,1D,1D#,1D,1C#,1B,1C#,1D,,1B,1C#,1D#,2F#,1C#,1D,1C#,1B,1C#,,1B,,1B,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1A#,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1F#,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1A#,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1F#,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1A#,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1F#,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1A#,,1B,,1F#,1G#,1B,,1F#,1G#,1B,1C#,1D#,1B,1E,1D#,1E,2F#,1B,,1B,,1F#,1G#,1B,1F#,1E,1D#,1C#,1B,,,,1F#,1B,,1F#,1G#,1B,,1F#,1G#,1B,1B,1C#,1D#,1B,1F#,1G#,1F#,1B,,1B,1A#,1B,1F#,1G#,1B,1E,1D#,1E,2F#,1B,,1B,,";
final String[] tune = tuneStr.split(",");
for (Player player : server.getOnlinePlayers())
{
final Location loc = player.getLocation();
loc.add(0, 3, 0);
while (loc.getBlockY() < player.getLocation().getBlockY() + 10 && loc.getBlock().getTypeId() != 0)
{
loc.add(0, 1, 0);
}
if (loc.getBlock().getTypeId() == 0)
{
noteBlocks.put(player, loc.getBlock());
loc.getBlock().setType(Material.NOTE_BLOCK);
}
}
taskid = ess.scheduleSyncRepeatingTask(new Runnable()
{
int i = 0;
@Override
public void run()
{
final String note = tune[i];
i++;
if (i >= tune.length)
{
Commandessentials.this.stopTune();
}
if (note.isEmpty())
{
return;
}
Map<Player, Block> noteBlocks = Commandessentials.this.noteBlocks;
for (Player onlinePlayer : server.getOnlinePlayers())
{
final Block block = noteBlocks.get(onlinePlayer);
if (block == null || block.getType() != Material.NOTE_BLOCK)
{
continue;
}
onlinePlayer.playNote(block.getLocation(), (byte)0, noteMap.get(note));
}
}
}, 20, 2);
}
private void stopTune()
{
ess.getScheduler().cancelTask(taskid);
for (Block block : noteBlocks.values())
{
if (block.getType() == Material.NOTE_BLOCK)
{
block.setType(Material.AIR);
}
}
noteBlocks.clear();
}
private void run_moo(final Server server, final CommandSender sender, final String command, final String args[])
{
if(sender instanceof ConsoleCommandSender)
sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | ||", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } );
else
sender.sendMessage(new String[]{" (__)", " (oo)", " /------\\/", " / | | |", " * /\\---/\\", " ~~ ~~", "....\"Have you mooed today?\"..." } );
}
private void run_optout(final Server server, final CommandSender sender, final String command, final String args[])
{
final Metrics metrics = ess.getMetrics();
try
{
sender.sendMessage("Essentials collects simple metrics to highlight which features to concentrate work on in the future.");
if (metrics.isOptOut()) {
metrics.enable();
} else {
metrics.disable();
}
sender.sendMessage("Anonymous Metrics are now: " + (metrics.isOptOut() ? "disabled" : "enabled"));
}
catch (IOException ex)
{
sender.sendMessage("Unable to modify 'plugins/PluginMetrics/config.yml': " + ex.getMessage());
}
}
}

View File

@@ -1,143 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import com.earth2me.essentials.craftbukkit.SetExpFix;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandexp extends EssentialsCommand
{
public Commandexp()
{
super("exp");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length == 0)
{
showExp(user, user);
}
else if (args[0].equalsIgnoreCase("set") && user.isAuthorized("essentials.exp.set"))
{
if (args.length == 3 && user.isAuthorized("essentials.exp.set.others"))
{
expMatch(server, user, args[1], args[2], false);
}
else
{
setExp(user, user, args[1], false);
}
}
else if (args[0].equalsIgnoreCase("give") && user.isAuthorized("essentials.exp.give"))
{
if (args.length == 3 && user.isAuthorized("essentials.exp.give.others"))
{
expMatch(server, user, args[1], args[2], true);
}
else
{
setExp(user, user, args[1], true);
}
}
else
{
String match = args[0].trim();
if (args.length == 2)
{
match = args[1].trim();
}
if (match.equalsIgnoreCase("show") || !user.isAuthorized("essentials.exp.others"))
{
showExp(user, user);
}
else
{
showMatch(server, user, match);
}
}
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
else if (args.length > 2 && args[0].equalsIgnoreCase("set"))
{
expMatch(server, sender, args[1], args[2], false);
}
else if (args.length > 2 && args[0].equalsIgnoreCase("give"))
{
expMatch(server, sender, args[1], args[2], true);
}
else
{
String match = args[0].trim();
if (args.length == 2)
{
match = args[1].trim();
}
showMatch(server, sender, match);
}
}
private void showMatch(final Server server, final CommandSender sender, final String match) throws NotEnoughArgumentsException
{
boolean foundUser = false;
for (Player matchPlayer : server.matchPlayer(match))
{
foundUser = true;
final User target = ess.getUser(matchPlayer);
showExp(sender, target);
}
if (!foundUser)
{
throw new NotEnoughArgumentsException(_("playerNotFound"));
}
}
private void expMatch(final Server server, final CommandSender sender, final String match, final String amount, final boolean toggle) throws NotEnoughArgumentsException
{
boolean foundUser = false;
for (Player matchPlayer : server.matchPlayer(match))
{
final User target = ess.getUser(matchPlayer);
setExp(sender, target, amount, toggle);
foundUser = true;
}
if (!foundUser)
{
throw new NotEnoughArgumentsException(_("playerNotFound"));
}
}
private void showExp(final CommandSender sender, final User target)
{
final int totalExp = SetExpFix.getTotalExperience(target);
final int expLeft = (int)Util.roundDouble(((((3.5 * target.getLevel()) + 6.7) - (totalExp - ((1.75 * (target.getLevel() * target.getLevel())) + (5.00 * target.getLevel())))) + 1));
sender.sendMessage(_("exp", target.getDisplayName(), SetExpFix.getTotalExperience(target), target.getLevel(), expLeft));
}
private void setExp(final CommandSender sender, final User target, final String strAmount, final boolean give)
{
Long amount = Long.parseLong(strAmount);
if (give)
{
amount += SetExpFix.getTotalExperience(target);
}
if (amount > Integer.MAX_VALUE)
{
amount = (long)Integer.MAX_VALUE;
}
SetExpFix.setTotalExperience(target, amount.intValue());
sender.sendMessage(_("expSet", target.getDisplayName(), amount));
}
}

View File

@@ -1,49 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandext extends EssentialsCommand
{
public Commandext()
{
super("ext");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
extinguishPlayers(server, sender, args[0]);
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
user.setFireTicks(0);
user.sendMessage(_("extinguish"));
return;
}
extinguishPlayers(server, user, commandLabel);
}
private void extinguishPlayers(final Server server, final CommandSender sender, final String name) throws Exception
{
for (Player matchPlayer : server.matchPlayer(name))
{
matchPlayer.setFireTicks(0);
sender.sendMessage(_("extinguishOthers", matchPlayer.getDisplayName()));
}
}
}

View File

@@ -1,52 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.List;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandfeed extends EssentialsCommand
{
public Commandfeed()
{
super("feed");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.feed.others"))
{
feedOtherPlayers(server,user,args[0]);
}
else
{
user.setFoodLevel(20);
user.setSaturation(10);
user.sendMessage(_("feed"));
}
}
private void feedOtherPlayers(final Server server, final CommandSender sender, final String name)
{
final List<Player> players = server.matchPlayer(name);
if (players.isEmpty())
{
sender.sendMessage(_("playerNotFound"));
return;
}
for (Player player : players)
{
if (ess.getUser(player).isHidden())
{
continue;
}
player.setFoodLevel(20);
player.setSaturation(10);
sender.sendMessage(_("feedOther", player.getDisplayName()));
}
}
}

View File

@@ -1,29 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.entity.Fireball;
import org.bukkit.entity.SmallFireball;
import org.bukkit.util.Vector;
public class Commandfireball extends EssentialsCommand
{
public Commandfireball()
{
super("fireball");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
boolean small = false;
if (args.length > 0 && args[0].equalsIgnoreCase("small"))
{
small = true;
}
final Vector direction = user.getEyeLocation().getDirection().multiply(2);
Fireball fireball = user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), small ? SmallFireball.class : Fireball.class);
fireball.setShooter(user.getBase());
}
}

View File

@@ -1,77 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandfly extends EssentialsCommand
{
public Commandfly()
{
super("fly");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
flyOtherPlayers(server, sender, args);
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && args[0].trim().length() > 2 && user.isAuthorized("essentials.fly.others"))
{
flyOtherPlayers(server, user, args);
return;
}
user.setAllowFlight(!user.getAllowFlight());
if (!user.getAllowFlight())
{
user.setFlying(false);
}
user.sendMessage(_("flyMode", _(user.getAllowFlight() ? "enabled" : "disabled"), user.getDisplayName()));
}
private void flyOtherPlayers(final Server server, final CommandSender sender, final String[] args)
{
for (Player matchPlayer : server.matchPlayer(args[0]))
{
final User player = ess.getUser(matchPlayer);
if (player.isHidden())
{
continue;
}
if (args.length > 1)
{
if (args[1].contains("on") || args[1].contains("ena") || args[1].equalsIgnoreCase("1"))
{
player.setAllowFlight(true);
}
else
{
player.setAllowFlight(false);
}
}
else
{
player.setAllowFlight(!player.getAllowFlight());
}
if (!player.getAllowFlight())
{
player.setFlying(false);
}
sender.sendMessage(_("flyMode", _(player.getAllowFlight() ? "enabled" : "disabled"), player.getDisplayName()));
}
}
}

View File

@@ -1,71 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.Locale;
import org.bukkit.GameMode;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandgamemode extends EssentialsCommand
{
public Commandgamemode()
{
super("gamemode");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
gamemodeOtherPlayers(server, sender, args);
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && args[0].trim().length() > 2 && user.isAuthorized("essentials.gamemode.others"))
{
gamemodeOtherPlayers(server, user, args);
return;
}
user.setGameMode(user.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL);
user.sendMessage(_("gameMode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)), user.getDisplayName()));
}
private void gamemodeOtherPlayers(final Server server, final CommandSender sender, final String[] args)
{
for (Player matchPlayer : server.matchPlayer(args[0]))
{
final User player = ess.getUser(matchPlayer);
if (player.isHidden())
{
continue;
}
if (args.length > 1)
{
if (args[1].contains("creat") || args[1].equalsIgnoreCase("1"))
{
player.setGameMode(GameMode.CREATIVE);
}
else
{
player.setGameMode(GameMode.SURVIVAL);
}
}
else
{
player.setGameMode(player.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : GameMode.SURVIVAL);
}
sender.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
}
}
}

View File

@@ -1,47 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
public class Commandgc extends EssentialsCommand
{
public Commandgc()
{
super("gc");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
float tps = ess.getTimer().getAverageTPS();
ChatColor color;
if (tps >= 18)
{
color = ChatColor.GREEN;
}
else if (tps >= 15)
{
color = ChatColor.YELLOW;
}
else
{
color = ChatColor.RED;
}
sender.sendMessage(_("tps", "" + color + tps));
sender.sendMessage(_("gcmax", (Runtime.getRuntime().maxMemory() / 1024 / 1024)));
sender.sendMessage(_("gctotal", (Runtime.getRuntime().totalMemory() / 1024 / 1024)));
sender.sendMessage(_("gcfree", (Runtime.getRuntime().freeMemory() / 1024 / 1024)));
for (World w : server.getWorlds())
{
sender.sendMessage(
(w.getEnvironment() == World.Environment.NETHER ? "Nether" : "World") + " \"" + w.getName() + "\": "
+ w.getLoadedChunks().length + _("gcchunks")
+ w.getEntities().size() + _("gcentities"));
}
}
}

View File

@@ -1,57 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandgetpos extends EssentialsCommand
{
public Commandgetpos()
{
super("getpos");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.getpos.others"))
{
final User otherUser = getPlayer(server, args, 0);
if (!otherUser.isHidden() || user.isAuthorized("essentials.list.hidden"))
{
outputPosition(user, otherUser.getLocation(), user.getLocation());
return;
}
}
outputPosition(user, user.getLocation(), null);
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
final User user = getPlayer(server, args, 0);
outputPosition(sender, user.getLocation(), null);
}
//TODO: Translate
private void outputPosition(final CommandSender sender, final Location coords, final Location distance)
{
sender.sendMessage("§7World: " + coords.getWorld().getName());
sender.sendMessage("§7X: " + coords.getBlockX() + " (+East <-> -West)");
sender.sendMessage("§7Y: " + coords.getBlockY() + " (+Up <-> -Down)");
sender.sendMessage("§7Z: " + coords.getBlockZ() + " (+South <-> -North)");
sender.sendMessage("§7Yaw: " + (coords.getYaw() + 180 + 360) % 360 + " (Rotation)");
sender.sendMessage("§7Pitch: " + coords.getPitch() + " (Head angle)");
if (distance != null && coords.getWorld().equals(distance.getWorld()))
{
sender.sendMessage("§7Distance: " + coords.distance(distance));
}
}
}

View File

@@ -1,107 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.Locale;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class Commandgive extends EssentialsCommand
{
public Commandgive()
{
super("give");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
final ItemStack stack = ess.getItemDb().get(args[1]);
final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
if (sender instanceof Player
&& (ess.getSettings().permissionBasedItemSpawn()
? (!ess.getUser(sender).isAuthorized("essentials.give.item-all")
&& !ess.getUser(sender).isAuthorized("essentials.give.item-" + itemname)
&& !ess.getUser(sender).isAuthorized("essentials.give.item-" + stack.getTypeId()))
: (!ess.getUser(sender).isAuthorized("essentials.itemspawn.exempt")
&& !ess.getUser(sender).canSpawnItem(stack.getTypeId()))))
{
throw new Exception(_("cantSpawnItem", itemname));
}
final User giveTo = getPlayer(server, args, 0);
if (args.length > 3 && Util.isInt(args[2]) && Util.isInt(args[3]))
{
stack.setAmount(Integer.parseInt(args[2]));
stack.setDurability(Short.parseShort(args[3]));
}
else if (args.length > 2 && Integer.parseInt(args[2]) > 0)
{
stack.setAmount(Integer.parseInt(args[2]));
}
else if (ess.getSettings().getDefaultStackSize() > 0)
{
stack.setAmount(ess.getSettings().getDefaultStackSize());
}
else if (ess.getSettings().getOversizedStackSize() > 0 && giveTo.isAuthorized("essentials.oversizedstacks"))
{
stack.setAmount(ess.getSettings().getOversizedStackSize());
}
if (args.length > 3)
{
for (int i = Util.isInt(args[3]) ? 4 : 3; i < args.length; i++)
{
final String[] split = args[i].split("[:+',;.]", 2);
if (split.length < 1)
{
continue;
}
final Enchantment enchantment = Commandenchant.getEnchantment(split[0], sender instanceof Player ? ess.getUser(sender) : null);
int level;
if (split.length > 1)
{
level = Integer.parseInt(split[1]);
}
else
{
level = enchantment.getMaxLevel();
}
stack.addEnchantment(enchantment, level);
}
}
if (stack.getType() == Material.AIR)
{
throw new Exception(_("cantSpawnItem", "Air"));
}
//TODO: TL this.
final String itemName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
sender.sendMessage(ChatColor.BLUE + "Giving " + stack.getAmount() + " of " + itemName + " to " + giveTo.getDisplayName() + ".");
if (giveTo.isAuthorized("essentials.oversizedstacks"))
{
InventoryWorkaround.addItem(giveTo.getInventory(), true, ess.getSettings().getOversizedStackSize(), stack);
}
else
{
InventoryWorkaround.addItem(giveTo.getInventory(), true, stack);
}
giveTo.updateInventory();
}
}

View File

@@ -1,76 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandgod extends EssentialsCommand
{
public Commandgod()
{
super("god");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
godOtherPlayers(server, sender, args);
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && args[0].trim().length() > 2 && user.isAuthorized("essentials.god.others"))
{
godOtherPlayers(server, user, args);
return;
}
user.setGodModeEnabled(!user.isGodModeEnabled());
user.sendMessage(_("godMode", (user.isGodModeEnabled() ? _("enabled") : _("disabled"))));
}
private void godOtherPlayers(final Server server, final CommandSender sender, final String[] args)
{
for (Player matchPlayer : server.matchPlayer(args[0]))
{
final User player = ess.getUser(matchPlayer);
if (player.isHidden())
{
continue;
}
if (args.length > 1)
{
if (args[1].contains("on") || args[1].contains("ena") || args[1].equalsIgnoreCase("1"))
{
player.setGodModeEnabled(true);
}
else
{
player.setGodModeEnabled(false);
}
}
else
{
player.setGodModeEnabled(!player.isGodModeEnabled());
}
final boolean enabled = player.isGodModeEnabled();
if (enabled)
{
player.setFoodLevel(20);
}
player.sendMessage(_("godMode", (enabled ? _("enabled") : _("disabled"))));
sender.sendMessage(_("godMode", _(enabled ? "godEnabledFor" : "godDisabledFor", matchPlayer.getDisplayName())));
}
}
}

View File

@@ -1,63 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
public class Commandhat extends EssentialsCommand
{
public Commandhat()
{
super("hat");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && (args[0].contains("rem") || args[0].contains("off") || args[0].equalsIgnoreCase("0")))
{
final PlayerInventory inv = user.getInventory();
final ItemStack head = inv.getHelmet();
if (head == null || head.getType() == Material.AIR)
{
user.sendMessage(_("hatEmpty"));
}
else
{
final ItemStack air = new ItemStack(Material.AIR);
inv.setHelmet(air);
InventoryWorkaround.addItem(user.getInventory(), true, head);
user.sendMessage(_("hatRemoved"));
}
}
else
{
if (user.getItemInHand().getType() != Material.AIR)
{
final ItemStack hand = user.getItemInHand();
if (hand.getType().getMaxDurability() == 0)
{
final PlayerInventory inv = user.getInventory();
final ItemStack head = inv.getHelmet();
inv.removeItem(hand);
inv.setHelmet(hand);
inv.setItemInHand(head);
user.sendMessage(_("hatPlaced"));
}
else
{
user.sendMessage(_("hatArmor"));
}
}
else
{
user.sendMessage(_("hatFail"));
}
}
}
}

View File

@@ -1,72 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.List;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandheal extends EssentialsCommand
{
public Commandheal()
{
super("heal");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.heal.others"))
{
if (!user.isAuthorized("essentials.heal.cooldown.bypass"))
{
user.healCooldown();
}
healOtherPlayers(server, user, args[0]);
return;
}
if (!user.isAuthorized("essentials.heal.cooldown.bypass"))
{
user.healCooldown();
}
user.setHealth(20);
user.setFoodLevel(20);
user.sendMessage(_("heal"));
}
@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();
}
healOtherPlayers(server, sender, args[0]);
}
private void healOtherPlayers(final Server server, final CommandSender sender, final String name)
{
final List<Player> players = server.matchPlayer(name);
if (players.isEmpty())
{
sender.sendMessage(_("playerNotFound"));
return;
}
for (Player p : players)
{
if (ess.getUser(p).isHidden())
{
continue;
}
p.setHealth(20);
p.setFoodLevel(20);
p.sendMessage(_("heal"));
sender.sendMessage(_("healOther", p.getDisplayName()));
}
}
}

View File

@@ -1,38 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.logging.Level;
import org.bukkit.Server;
import org.bukkit.entity.Player;
public class Commandhelpop extends EssentialsCommand
{
public Commandhelpop()
{
super("helpop");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
user.setDisplayNick();
final String message = _("helpOp", user.getDisplayName(), Util.stripFormat(getFinalArg(args, 0)));
logger.log(Level.INFO, message);
for (Player onlinePlayer : server.getOnlinePlayers())
{
final User player = ess.getUser(onlinePlayer);
if (!player.isAuthorized("essentials.helpop.receive"))
{
continue;
}
player.sendMessage(message);
}
}
}

View File

@@ -1,46 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commandignore extends EssentialsCommand
{
public Commandignore()
{
super("ignore");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
User player;
try
{
player = getPlayer(server, args, 0);
}
catch (NoSuchFieldException ex)
{
player = ess.getOfflineUser(args[0]);
}
if (player == null)
{
throw new Exception(_("playerNotFound"));
}
if (user.isIgnoredPlayer(player))
{
user.setIgnoredPlayer(player, false);
user.sendMessage(_("unignorePlayer", player.getName()));
}
else
{
user.setIgnoredPlayer(player, true);
user.sendMessage(_("ignorePlayer", player.getName()));
}
}
}

View File

@@ -1,26 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.TextInput;
import com.earth2me.essentials.textreader.TextPager;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandinfo extends EssentialsCommand
{
public Commandinfo()
{
super("info");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
final IText input = new TextInput(sender, "info", true, ess);
final IText output = new KeywordReplacer(input, sender, ess);
final TextPager pager = new TextPager(output);
pager.showPage(args.length > 0 ? args[0] : null, args.length > 1 ? args[1] : null, commandLabel, sender);
}
}

View File

@@ -1,28 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.Arrays;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
public class Commandinvsee extends EssentialsCommand
{
public Commandinvsee()
{
super("invsee");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
final User invUser = getPlayer(server, args, 0);
user.setInvSee(true);
user.openInventory(invUser.getInventory());
}
}

View File

@@ -1,98 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.Locale;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
public class Commanditem extends EssentialsCommand
{
public Commanditem()
{
super("item");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
final ItemStack stack = ess.getItemDb().get(args[0]);
final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
if (ess.getSettings().permissionBasedItemSpawn()
? (!user.isAuthorized("essentials.itemspawn.item-all")
&& !user.isAuthorized("essentials.itemspawn.item-" + itemname)
&& !user.isAuthorized("essentials.itemspawn.item-" + stack.getTypeId()))
: (!user.isAuthorized("essentials.itemspawn.exempt")
&& !user.canSpawnItem(stack.getTypeId())))
{
throw new Exception(_("cantSpawnItem", itemname));
}
try
{
if (args.length > 1 && Integer.parseInt(args[1]) > 0)
{
stack.setAmount(Integer.parseInt(args[1]));
}
else if (ess.getSettings().getDefaultStackSize() > 0)
{
stack.setAmount(ess.getSettings().getDefaultStackSize());
}
else if (ess.getSettings().getOversizedStackSize() > 0 && user.isAuthorized("essentials.oversizedstacks"))
{
stack.setAmount(ess.getSettings().getOversizedStackSize());
}
if (args.length > 2)
{
for (int i = 2; i < args.length; i++)
{
final String[] split = args[i].split("[:+',;.]", 2);
if (split.length < 1)
{
continue;
}
final Enchantment enchantment = Commandenchant.getEnchantment(split[0], user);
int level;
if (split.length > 1)
{
level = Integer.parseInt(split[1]);
}
else
{
level = enchantment.getMaxLevel();
}
stack.addEnchantment(enchantment, level);
}
}
}
catch (NumberFormatException e)
{
throw new NotEnoughArgumentsException();
}
if (stack.getType() == Material.AIR)
{
throw new Exception(_("cantSpawnItem", "Air"));
}
final String displayName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
user.sendMessage(_("itemSpawn", stack.getAmount(), displayName));
if (user.isAuthorized("essentials.oversizedstacks"))
{
InventoryWorkaround.addItem(user.getInventory(), true, ess.getSettings().getOversizedStackSize(), stack);
}
else
{
InventoryWorkaround.addItem(user.getInventory(), true, stack);
}
user.updateInventory();
}
}

View File

@@ -1,49 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class Commanditemdb extends EssentialsCommand
{
public Commanditemdb()
{
super("itemdb");
}
@Override
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
ItemStack itemStack = null;
if (args.length < 1)
{
if (sender instanceof Player)
{
itemStack = ((Player)sender).getItemInHand();
}
if (itemStack == null)
{
throw new NotEnoughArgumentsException();
}
}
else
{
itemStack = ess.getItemDb().get(args[0]);
}
sender.sendMessage(itemStack.getType().toString() + "- " + itemStack.getTypeId() + ":" + Integer.toString(itemStack.getData().getData()));
if (itemStack.getType() != Material.AIR)
{
int maxuses = itemStack.getType().getMaxDurability();
int durability = ((maxuses + 1) - itemStack.getDurability());
if (maxuses != 0)
{
sender.sendMessage(_("durability", Integer.toString(durability)));
}
}
}
}

View File

@@ -1,20 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandjails extends EssentialsCommand
{
public Commandjails()
{
super("jails");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
sender.sendMessage("§7" + Util.joinList(" ", ess.getJails().getList()));
}
}

View File

@@ -1,42 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public class Commandjump extends EssentialsCommand
{
public Commandjump()
{
super("jump");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
Location loc;
final Location cloc = user.getLocation();
try
{
loc = Util.getTarget(user);
loc.setYaw(cloc.getYaw());
loc.setPitch(cloc.getPitch());
loc.setY(loc.getY() + 1);
}
catch (NullPointerException ex)
{
throw new Exception(_("jumpError"), ex);
}
final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().teleport(loc, charge, TeleportCause.COMMAND);
throw new NoChargeException();
}
}

View File

@@ -1,44 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandkick extends EssentialsCommand
{
public Commandkick()
{
super("kick");
}
@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();
}
final User user = getPlayer(server, args, 0);
if (sender instanceof Player && user.isAuthorized("essentials.kick.exempt"))
{
throw new Exception(_("kickExempt"));
}
final String kickReason = args.length > 1 ? getFinalArg(args, 1) : _("kickDefault");
user.kickPlayer(kickReason);
final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
for (Player onlinePlayer : server.getOnlinePlayers())
{
User player = ess.getUser(onlinePlayer);
if (player.isAuthorized("essentials.kick.notify"))
{
onlinePlayer.sendMessage(_("playerKicked", senderName, user.getName(), kickReason));
}
}
}
}

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