1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-03 19:52:40 +02:00

Compare commits

...

4327 Commits

Author SHA1 Message Date
ementalo
d36d80933f Remove libs from repository 2015-06-15 23:19:21 +01:00
KHobbits
86c746a77c Unrequired Dependacy 2014-09-06 17:22:25 +01:00
KHobbits
767596c4e5 Merge branch '2.x' of github.com:essentials/Essentials into 2.x 2014-09-03 00:21:42 +01:00
KHobbits
98db85cb34 rework /seen to be a little stricter on argument matching. 2014-08-18 21:00:03 +01:00
md_5
f36d629cfa Fix missed cases from previous user iteration optimizations. 2014-08-16 19:04:13 +10:00
KHobbits
10e0ac2d48 Make sure we close any open inventories of players who leave. 2014-08-14 01:58:17 +01:00
KHobbits
8890660e20 Use quicker ban lookup to reduce /seen lag. 2014-08-14 01:50:31 +01:00
KHobbits
0cab5b9601 Add paging to mail.
Support aliases in rule and baltop output.
2014-08-11 19:03:24 +01:00
KHobbits
f4e6f01cd9 Add mailFormat TL key. 2014-08-11 18:46:04 +01:00
Necrodoom
a24530b27c Misc clarification (socialspy and kit delay)
clarify allow-silent-join-quit
2014-08-11 00:12:43 +01:00
Necrodoom
bad388176b Remove outdated try-catches 2014-08-11 00:11:06 +01:00
Necrodoom
38837bb3ad Add /tempban missing syntax 2014-08-11 00:10:09 +01:00
FearFree
228bb27cb1 Add amount required to notEnoughMoney TL key.
See https://essentials3.atlassian.net/browse/ESS-5125 for request.
2014-07-19 20:31:50 +01:00
KHobbits
4a51422266 Formatting fixes. 2014-07-19 20:11:45 +01:00
SidShakal
52dacc054b Fix sticky piston retract breaking essentials sign
Sticky pistons could break signs that were mounted on blocks the pistons were retracting.

This patch extends the protection from just the piston base to include the extended piston arm and the block at the end of the piston arm as well.

This method will very likely need to be changed again when 1.8 comes out, but this should bring us a bit closer, by wrapping the block tests in a loop.
2014-07-19 20:08:38 +01:00
md_5
035182fcda Optimize player / user iteration.
* Add a method for backwards compatability with unmapped code.
* Convert all getOnlinePlayers() calls to use this method, part of the IEssentials interface
* Add a new method getOnlineUsers() Ljava/lang/Iterable;
* Convert appropriate calls to use this method
* Update Bukkit to #1945
* Update CraftBukkit to #3103
2014-07-19 20:07:50 +01:00
Alexander Likhachev
310e41396b Add permission check before resetting speed on login The staff of my server asked me to do this fix, but I think it is very useful for all. This commit change is to reset player fly & run speed only if player has no permission to change speed. 2014-07-19 20:07:09 +01:00
KHobbits
a894c81a6d If a player already exists in the usermap, don't replace it with a eco npc. 2014-07-19 18:04:35 +01:00
KHobbits
8c40d295c1 Clean up tempban messages to be a little clearer. 2014-07-14 21:23:56 +01:00
KHobbits
a942b8bbdf Update translations from Crowdin (http://translate2.ess3.net) 2014-07-12 22:12:51 +01:00
KHobbits
a44275af7d Remove ban check from /ess cleanup, no longer required.
Fix ban upgrade script.
2014-07-12 19:13:23 +01:00
FearFree
6d8d3a486f Update to new ban method. 2014-07-12 17:40:14 +01:00
KHobbits
394ea6f172 Add ban reason to /banip 2014-07-12 17:23:11 +01:00
KHobbits
c4d5beea7e Still give 'nickNoMore' message when removing a nickname. 2014-07-12 16:48:01 +01:00
KHobbits
b29f89bc6a Allow for changing of username casing without adding 'nickname' prefix. 2014-07-12 16:43:57 +01:00
KHobbits
5e06f7ea1f Prevent users from setting unsafe homes when teleport safety is disabled. 2014-07-12 16:34:18 +01:00
KHobbits
93a2b484a1 Allow people with god & fly to teleport to unsafe locations even when teleport safety is disabled. 2014-07-12 16:33:50 +01:00
KHobbits
80b7afe20e Converge ban message translations, and add reason support to default tempban tl key. 2014-07-12 16:32:42 +01:00
KHobbits
d67cca7f51 Switch sudo to command dispatch, this will allow vanilla commands to be executed. 2014-07-12 15:29:25 +01:00
KHobbits
727c3b8eb6 Don't cascade null usernames passed from eco api 2014-07-10 11:48:54 +01:00
KHobbits
cc5635ccb5 New permission :essentials.tp.position Required to use /tp [player] <x> <y> <z> 2014-07-06 18:41:12 +01:00
Necrodoom
52f0dd9149 Add support for vanilla /tp <x> <y> <z> teleport syntax. 2014-07-06 18:41:01 +01:00
KHobbits
58bc6116de Allow forcing adult status on randomly generated /spawnmob mobs. 2014-07-06 18:25:00 +01:00
KHobbits
e05658e27a Update Bukkit
CB: 3092 B: 1938
2014-07-06 16:40:06 +01:00
KHobbits
2d9f24194d Show warp teleport status to teleport owner. 2014-06-28 18:10:32 +01:00
KHobbits
e0893adb12 Slightly reorder teleport messages to be less confusing. 2014-06-28 18:06:13 +01:00
KHobbits
36f3540da9 Fix NPE with /list in console 2014-06-27 04:28:33 +01:00
KHobbits
20329e99a9 Update essentials to support 3rd party vanish toggling. 2014-06-27 01:46:37 +01:00
KHobbits
87c0f20e92 Add some debugging to make it easier to diagnose kit errors. 2014-06-25 19:19:04 +01:00
KHobbits
f6b2524a8c Kit cleanup and refactor. 2014-06-25 19:03:31 +01:00
KHobbits
84a0363079 Allow multiple kits to be spawned per command. 2014-06-23 00:38:13 +01:00
KHobbits
2e7042a7b4 New permission: essentials.signs.trade.override.collect
People with this permission will collect the resources of other peoples trade signs broken with admin permissions (essentials.signs.trade.override).
2014-06-21 21:47:33 +01:00
Necrodoom
c74bff8394 empty array is not null array 2014-06-19 16:22:38 +01:00
KHobbits
fd2e4a03ce Reduce a few nickname refresh calls. 2014-06-19 04:02:15 +01:00
KHobbits
1f630b3de2 Force listener cleanup on plugin disable. 2014-06-19 02:59:08 +01:00
KHobbits
3f31cf3a4b Add a lag check for permission system checks.
This doesn't include normal permission checks, since the overhead could be detrimental.
2014-06-19 02:38:28 +01:00
KHobbits
5486159561 Revert "Add spawn location cache to reduce blocking on player respawn."
This reverts commit 7c013fa437.
2014-06-17 23:27:46 +01:00
KHobbits
71e94aec9e If "sethome-multiple" config section is invalid, silently fallback to default config values. 2014-06-17 00:19:59 +01:00
KHobbits
7c013fa437 Add spawn location cache to reduce blocking on player respawn. 2014-06-16 19:55:34 +01:00
KHobbits
32c61c2e91 Add default ban reason for tempban reason. 2014-06-14 22:06:26 +01:00
KHobbits
e1852795ea Check for arraynull on pex group request. 2014-06-14 18:20:49 +01:00
KHobbits
784d22bb11 Only remove first date match from ban reason. 2014-06-14 16:27:34 +01:00
KHobbits
4d16fe338d Add optional {2} in 'tempBanned' TL key, for reason. 2014-06-14 16:21:05 +01:00
KHobbits
463f66d076 Show UUID in trackUUID debug message. 2014-06-07 18:21:10 +01:00
KHobbits
6a1a6134a7 Don't allow old UUID's to accidentally overwrite current UUID for user mapping.
Add some extra logging and uuid debug.
2014-06-07 18:08:25 +01:00
KHobbits
d98f370988 New permission: essentials.itemspawn.meta-vanilla
Without this permission you cannot use vanilla itemmeta.  You can still use essentials style meta, if you have the appropriate permissions.
2014-06-07 16:08:51 +01:00
KHobbits
d4d31d6171 Try to use consistent UUIDs and not rely on Bukkit lookup while saving. 2014-06-07 15:45:57 +01:00
KHobbits
45331ada21 Add local echo of mail being sent on /mail send. 2014-06-05 00:07:27 +01:00
KHobbits
8b8e6cbbe3 Fix firework recipe in /recipe 2014-06-04 16:13:20 +01:00
KHobbits
e0a1c3319b Use strings for cachemap key, should prevent accidental key issues. 2014-06-01 21:50:24 +01:00
KHobbits
46ca2652a7 Add API logging to Eco API. 2014-05-31 20:37:44 +01:00
KHobbits
7564d1f7f8 Extend getUser(Object) to match uuid and offline players. 2014-05-30 22:16:06 +01:00
KHobbits
c4c5b2abf1 Emulate player join for mocking. 2014-05-27 21:14:45 +01:00
KHobbits
d9368ec284 Improve fakeServer model 2014-05-27 20:31:13 +01:00
KHobbits
9a8dfb8be3 Remove online player lookup in usermap.getUUIDMap(), throw log entry on failback. 2014-05-27 18:04:02 +01:00
KHobbits
e8b39f7e3c Log takeMoney exception, even if we ignore it. 2014-05-27 10:46:25 +01:00
KHobbits
c51381bba7 Revert writecount reset, this could cause odd behavior. 2014-05-27 06:18:34 +01:00
KHobbits
00325ae656 Enforce userdata save on player dispose. 2014-05-27 04:52:52 +01:00
KHobbits
6bdbada6fc If we are modifying money, force transaction clear, this is important. 2014-05-27 03:41:18 +01:00
KHobbits
b46eb81b85 Don't check silentjoin.vanish if another plugin has hidden the join message. 2014-05-26 22:08:18 +01:00
KHobbits
c8ed259073 New permission: essentials.silentjoin.vanish
The server needs silentjoin to be enabled first.
2014-05-25 19:31:55 +01:00
KHobbits
26ef8c062a Abort transaction before updating funds on balance overflow. 2014-05-25 17:03:23 +01:00
KHobbits
e0c361ad07 Utilize write transactions for delaylogin task. 2014-05-25 01:38:37 +01:00
KHobbits
98a6258bfe Rename listening methods to be a little more descriptive of their purpose. 2014-05-24 18:47:40 +01:00
KHobbits
7abef81564 Convert 9 anonymous scheduled tasks to named classes for better logging. 2014-05-18 21:32:07 +01:00
KHobbits
625dea8012 Fix invalid TL key. 2014-05-18 19:47:18 +01:00
KHobbits
5a7dceedf2 Exempt named mobs by default from /remove
Named mobs can be removed using /remove named
Killing all mobs now requires /remove all,tamed,named
2014-05-18 14:43:07 +01:00
KHobbits
b3a24525d5 Tweak to player login event. 2014-05-18 13:26:27 +01:00
KHobbits
75954a489a Update worth.yml to be more descriptive. 2014-05-17 04:31:44 +01:00
KHobbits
9b803c8081 Update /condense syntax hint. 2014-05-17 04:21:51 +01:00
@ArkhamNetwork
fdd4334ff5 Optimize PlayerLoginEvent 2014-05-17 04:05:51 +01:00
@ArkhamNetwork
f06baa85a9 Move the teleport timer to an async task. 2014-05-17 03:35:44 +01:00
KHobbits
f4ad7cebd4 Prevent near empty userdata file creation. 2014-05-17 03:06:48 +01:00
KHobbits
77b06c39a3 Stop using old string player lookup. 2014-05-17 02:47:10 +01:00
KHobbits
8964d38c3e Prevent reading and writing the usermap at the same time. 2014-05-17 01:50:41 +01:00
Faris Rehman
6bea2160a2 Add user messages. 2014-05-16 20:39:49 +01:00
KHobbits
e4a0e8c11c First draft of /condense 2014-05-16 20:30:06 +01:00
KHobbits
e2f5d0a220 If Bukkit doesn't know who a player is, but we do, substitute the last known nickname when ban checking. 2014-05-10 21:52:45 +01:00
KHobbits
0e80656dc6 Update English TL keys. 2014-05-10 17:49:37 +01:00
KHobbits
602a5c0b5f Update translations from crowdin (http://translate2.ess3.net/) 2014-05-10 16:11:03 +01:00
Luke Anderson (stuntguy3000)
e5fa627e95 Improve messages/formatting 2014-05-10 16:03:39 +01:00
Burke D
4312fbcad1 Grammatical changes to config.yml 2014-05-10 15:46:08 +01:00
clou44
dc6727cf80 Updated Items.csv: Added nemofish and fishnemo.
Added shorter aliases for salmon, pufferfish, and clownfish.
2014-05-10 15:38:29 +01:00
KHobbits
171f690faf Only dispose users who are offline at point of disposal.
This should cater for quick reconnects on lagged servers.
2014-05-10 15:36:58 +01:00
KHobbits
48e50c6d21 Initialize TL Bundle on plugin start. 2014-05-06 07:00:57 +01:00
KHobbits
90f99ac680 Remove '-' from valid account names again.
This could cause issues with NPC's converted to UUID before this version.
2014-05-05 22:46:46 +01:00
KHobbits
0ae1d13c34 Reload locale even if it is set to null. 2014-05-05 20:47:48 +01:00
KHobbits
be6b1f7432 Better handle TL failover. 2014-05-05 14:48:25 +01:00
KHobbits
7d48b29ae4 Update teleport timer to handle UUID rather than player names. 2014-05-05 13:01:20 +01:00
KHobbits
966d48bbb6 Better handle corrupted chunks. 2014-05-04 19:39:35 +01:00
ElgarL
b7a70be5e5 Error in logic 2014-05-04 17:12:15 +01:00
ElgarL
e8e9d281bb Prevent players who have never logged in before from taking over existing accounts. 2014-05-04 16:22:58 +01:00
KHobbits
eeda41356f Allow disabling userfile cache on uuid convert.
Add "ignore-userfiles-cache: true" to "upgrades-done.yml" to disable cache, forcing uuid lookup requests.
2014-05-04 13:25:20 +01:00
ElgarL
d46d8d45fa Fix clones forgetting sub groups. 2014-05-04 12:50:22 +01:00
ElgarL
89b759d7ac Set a default mirror map if none is found in the config. 2014-05-04 12:50:21 +01:00
ElgarL
b2d8beb887 Fix overloadedWorldHolder so it correctly calls the new WorldHolder code when the user is not overloaded. 2014-05-04 12:50:20 +01:00
ElgarL
5271854e7e Fixup javadocs 2014-05-04 12:50:18 +01:00
ElgarL
ae2f78b535 v2.1: - Update for CraftBukkit 1.7.8-R0.1(3050). - Add UUID support. Plugins can still query by player name but a UUID is faster and preferable. 2014-05-04 12:50:17 +01:00
ElgarL
226f921819 Do not override higher level permissions with negations. 2014-05-04 12:50:16 +01:00
Necrodoom
931de7bd66 Fix a /mangcheckp message 2014-05-04 12:50:15 +01:00
ElgarL
a75b04cb4b Update mangcheckp to understand Exception nodes. 2014-05-04 12:50:14 +01:00
ElgarL
009f4fede9 Fix manucheckp to understand and report correctly on Exception nodes. 2014-05-04 12:50:13 +01:00
ElgarL
64acdbf99e Allow Exceptions in any inherited group to override negation of permissions. 2014-05-04 12:50:12 +01:00
Necrodoom
e982d8c8f8 Cleanup plugin description 2014-05-04 12:50:11 +01:00
ElgarL
5129ad7d25 Prevent adding sub groups for ranks the granting player doesn't have access to. 2014-05-04 12:50:09 +01:00
ElgarL
80f5972c04 Allow Exception permission to override negations when in the same group. 2014-05-04 12:50:08 +01:00
ElgarL
389b59515d Change to use LinkedHashSets to preserve ordering. Fixes an issue with populating bukkit perms in the wrong order. Fix wildcard negation in parent groups. 2014-05-04 12:50:07 +01:00
ElgarL
4f95d64dd3 Fix Cyclic mirroring test (silly me) 2014-05-04 12:50:06 +01:00
ElgarL
d89adcdecc Tidy imports 2014-05-04 12:50:05 +01:00
Necrodoom
454ef4016f Improve Javadocs, clean ' strip checks, update changelog. 2014-05-04 12:50:04 +01:00
Necrodoom
188c2548fb add recursive permission adding/removing
also other minor fixes
2014-05-04 12:50:03 +01:00
ElgarL
28036b7d17 Check subgroup permissions with an equal priority so no one subgroup is higher ranked than another. 2014-05-04 12:50:02 +01:00
KHobbits
721d5c2f5c Fix attempting to spawn invalid items. 2014-04-30 05:41:42 +01:00
KHobbits
921c4f82ef Skip npc's when doing cleanup. 2014-04-29 04:42:55 +01:00
KHobbits
b8a5fa294d Better handle a write locked usermap.csv 2014-04-29 01:44:28 +01:00
KHobbits
21179b2d62 Run user dispose on another thread. 2014-04-28 23:12:35 +01:00
Corin Simpson-Bryars
0a3394ac0f Updating pom for vault
When deploying with Jenkins the build will fail due to there being no http://repo.ess3.net:8071/content/groups/public/net/milkbowl/vault/1.2.27 however there's a valid jar/dir for vault at http://repo.ess3.net:8071/content/groups/public/net/milkbowl/vault/Vault/1.2.32/
This will keep maven happy and the build not to error.
2014-04-28 00:52:06 +01:00
KHobbits
ae0844d4d5 Fix /home for offline players. 2014-04-27 17:09:44 +01:00
KHobbits
f586a15006 Update UUID mapping, if uuid for a username changes. 2014-04-27 01:35:52 +01:00
KHobbits
d96d124f97 Switch AFK check to use UUID. 2014-04-27 01:10:44 +01:00
KHobbits
ada718fdd6 Delay uuidconversion for 10s and show warning.
UUID conversion should now better handle offline conversion.
2014-04-26 23:50:12 +01:00
KHobbits
8a60f59433 Fix time command exit statuses. 2014-04-24 10:24:35 +01:00
KHobbits
36594b6311 Skip empty user names on uuid conversion. 2014-04-22 18:07:02 +01:00
KHobbits
6bdb0aef77 [Breaking] Fix ECO NPC's. This is a work around of CB's recent changes blocking invalid uuid lookups.
NPC's converted with the previous version will need manual changes.
2014-04-19 02:03:39 +01:00
KHobbits
40bf783d19 Only write to UUIDMap if the entry doesn't exist. 2014-04-18 06:48:14 +01:00
KHobbits
b941234d67 Format /seen account history list, optimize map loading. 2014-04-18 05:57:47 +01:00
KHobbits
2180aa8208 Add previous account tracking to /seen 2014-04-18 04:48:34 +01:00
KHobbits
39c912b16b Force CB 3050+ 2014-04-18 03:58:27 +01:00
KHobbits
c7112c3ace Fix offlineplayers with null names. 2014-04-17 06:09:08 +01:00
KHobbits
d58d51b526 Optimize uuidmap writing, and use userConf write buffering. 2014-04-17 05:34:34 +01:00
KHobbits
6c1dd72fb0 Add progress status and /ess uuidconvert command for manual conversion. 2014-04-17 02:18:28 +01:00
KHobbits
8e5c7b58d6 Update Bukkit to 1.7.8-R0.1
Bukkit: 1922 CraftBukkit: 3050
2014-04-15 00:24:12 +01:00
KHobbits
42a813f59e Add UUID mocking support, and fix tests. 2014-04-15 00:08:02 +01:00
KHobbits
63f0efb765 Allow usermap to support legacy users, and restore ability to create user on first access, as well as server join. 2014-04-15 00:07:35 +01:00
KHobbits
b18713f86d Make eco npc methods use proper user config creation and resets. 2014-04-15 00:06:29 +01:00
KHobbits
3bf0279a3e Stop delayed writes from reversing user reset. 2014-04-15 00:05:56 +01:00
KHobbits
8b85d08a4a Remove Ess object from FakeServer. 2014-04-14 00:03:07 +01:00
KHobbits
44a4475e3e Essentials UUID conversion. 2014-04-13 21:40:15 +01:00
KHobbits
517853fb73 Converted emulated player class calls to use base class. 2014-04-13 01:01:49 +01:00
clou44
fec02fee51 Update items.csv
Added additional aliases for various flowers.
2014-04-10 23:31:05 +01:00
clou44
1c205844c0 Update items.csv
Added additional aliases for coal blocks.
2014-04-10 23:30:58 +01:00
KHobbits
27863897e5 Update config.yml to reflect vanilla fallback no longer works. 2014-04-07 14:09:09 +01:00
KHobbits
667d741ab9 Update Bukkit 1.7.5-R0.1
Bukkit 1919 CB: 3039
No UUID update yet.
2014-04-06 15:57:37 +01:00
KHobbits
9c8be30b2d Cleanup 2014-04-06 15:44:37 +01:00
KHobbits
9482e24b54 Correctly handle line overflow in book pager
Fixes a bug with the last book pager tweak.
2014-04-05 15:33:38 +01:00
KHobbits
adea4b953e Fix fly logic check (creative doesn't mean fly is enabled) 2014-03-31 03:26:48 +01:00
KHobbits
0d86b36777 Add chat configurables. 2014-03-30 15:50:32 +01:00
KHobbits
d85d91611c See if we can better handle book paging to fit more context on a line, without causing text loss after reaching character limit. 2014-03-29 16:07:32 +00:00
evonuts
c88ddda7d9 Minor phrasing fixes. 2014-03-26 22:08:37 +00:00
Matt Anthony
f8ec8ffd8f Add colors to a few TL keys. 2014-03-26 21:58:36 +00:00
KHobbits
c27ad91592 Add local echo to tempban command. 2014-03-26 20:08:38 +00:00
KHobbits
c6b81c69d1 Helpop should use broadcast method
Add local echo's to helpop and mute commands.
2014-03-26 20:06:01 +00:00
Necrodoom
f2151a8dbb Add socialspy wildcard support 2014-03-26 19:09:00 +00:00
Necrodoom
434f77e4c9 Match /clearinventory multiple permission to /msg 2014-03-26 19:07:48 +00:00
Necrodoom
943017a54c Some messages fixes, and information addition. 2014-03-26 19:07:41 +00:00
KHobbits
ee85c62387 Revert "Do not allow a block with an Essentials Sign attached to it to be pulled with a sticky piston"
This reverts commit ad0f143f8b.
2014-03-26 15:14:40 +00:00
Chris Ward
ad0f143f8b Do not allow a block with an Essentials Sign attached to it to be pulled with a sticky piston 2014-03-26 22:00:57 +11:00
KHobbits
182914e402 Merge branch '2.x' of github.com:essentials/Essentials into 2.x 2014-03-23 18:14:21 +00:00
KHobbits
aa8617c1b8 Fix null teleport costs. 2014-03-23 18:12:33 +00:00
FearFree
51bd0d88f3 Future Java versions may not support _ as identifier. 2014-03-22 16:08:11 +11:00
KHobbits
7266908177 Cleanup warp charging, to properly handle warp sign costs. 2014-03-19 00:01:47 +00:00
ElgarL
936a42cc6a Merge pull request #668 from necrodoom/patch-91
Fix messages
2014-03-12 15:41:53 +00:00
KHobbits
31718c2a05 Fix some /home errors with invalid data. 2014-03-09 17:59:07 +00:00
Dabo Ross
aba7ea5b02 Add IEssentialsSpawn class for API for Essentials Spawn with two methods, getSpawn(String) and setSpawn(String, Location).
Implement IEssentialsSpawn in EssentialsSpawn.
2014-03-09 17:31:36 +00:00
KHobbits
ddbe1030df Update translations from Crowdin
http://translate2.ess3.net/
2014-03-09 17:23:38 +00:00
Necrodoom
fc59e9f48d Fix messages 2014-03-09 19:17:26 +02:00
Luke Anderson (stuntguy3000)
53de887a51 Add missing language pointers 2014-03-09 17:14:09 +00:00
FearFree
41faf1df89 Remove op and replace with permission 2014-03-09 17:01:31 +00:00
KHobbits
042b688eab Only enable teleport protection on plugin/command caused teleport events. 2014-03-09 01:13:41 +00:00
Dykam
dc7fee3db3 You can now access the old balance during the UserBalanceUpdateEvent Event 2014-03-04 19:44:55 +00:00
Kryptic Dot
6299c5dcf7 Cleaning up readme markdown 2014-03-04 19:29:47 +00:00
SkyBirdSoar
f844d6be68 Fixed some grammatic errors, changed some sentences. 2014-03-04 19:26:16 +00:00
Zed Spencer-Milnes
d3a1c895a5 Finish Sentence
# Setting to false means EssentialsAntiBuild will never prevent you from using.
->
# Setting to false means EssentialsAntiBuild will never prevent you from using items.

Am I glad to make such a profoud change to the source code.
2014-03-04 19:22:05 +00:00
Luke Anderson
97ffd930fe Remove generated comments 2014-03-04 19:20:56 +00:00
KHobbits
2738f7daef Fix login death caused by built up fall damage using /fly. 2014-03-03 21:24:00 +00:00
KHobbits
ff06a55ea5 User loading cleanup 2014-03-03 09:01:07 +00:00
KHobbits
b38485dce0 Round to gc output to 2 dp. 2014-03-03 08:34:43 +00:00
KHobbits
9bb9102c6a Constant user file casing. 2014-02-27 01:55:04 +00:00
KHobbits
6d9ed5f90a Fix warp sign costs. 2014-02-25 07:09:32 +00:00
KHobbits
55956c5490 Fix safety tp check above world height
Performance tweak to fly check
2014-02-23 17:41:25 +00:00
KHobbits
dfdaa0248d Fix customtext copy 2014-02-19 03:28:28 +00:00
KHobbits
914eeb14dd Alternative implementation of unsafe enchant blocking for signs.
Permission: essentials.signs.enchant.allowunsafe - required to add unsafe enchants using enchant signs.
This reverts commit 548adaa521.
2014-02-19 01:18:40 +00:00
KHobbits
d02f1024bc Fix projectiles compiling. 2014-02-19 00:58:20 +00:00
KHobbits
b637d8ac2d Update Bukkit to 1.7.3-R0.3 - Bukkit: 1903 CB: 3020
This also disables vanilla fallback, use new aliases file.
2014-02-19 00:36:54 +00:00
snowleo
548adaa521 Split unsafe enchantments in kits to a new config option 2014-02-18 23:47:18 +01:00
KHobbits
48cb0f5c51 Merge branch '2.x' of github.com:essentials/Essentials into 2.x 2014-02-16 01:15:25 +00:00
KHobbits
668eec3137 Use the absolute radius value. 2014-02-16 01:15:01 +00:00
Chris Ward
7b9656e5b4 Update repository URLs 2014-02-15 14:23:30 +11:00
KHobbits
46476b36d9 Allow sending customtext chapters as a parameter instead of reading commandLabel 2014-02-13 22:52:14 +00:00
KHobbits
3a96853466 Fix Stripping/blocking of urls containing caps. 2014-02-12 01:20:54 +00:00
Iaccidentally
e425a0d946 Merge pull request #657 from evonuts/2.x
Fix spelling error (atleast) in translation files.
2014-02-11 02:27:10 -05:00
evonuts
c8909b5035 Fix spelling error (atleast) in translation files. 2014-02-11 20:15:14 +13:00
KHobbits
ff63d0612a Fix world argument to ignore radius, and allow for skipping radius param in syntax. 2014-02-09 22:26:54 +00:00
KHobbits
2abe63222c Fix ghost items with /recipe 2014-02-09 21:54:04 +00:00
Necrodoom
9703eb4372 Reorder ID 376 2014-02-09 21:37:03 +00:00
KHobbits
bb51001176 Code cleanup and remove remote skull edit. 2014-02-08 01:23:54 +00:00
Luke Anderson (stuntguy3000)
2938b2c459 Add /skull command 2014-02-08 00:25:34 +00:00
coegho
20629a17a7 [Fix] fireball-fire=true now prevents fire spread from fireballs 2014-02-08 00:22:56 +00:00
Necrodoom
6dccbb20d9 Restore 2 aliases 2014-02-08 00:16:11 +00:00
Necrodoom
2b64c35ca9 Fix duplicates, a few more aliases addition/remove 2014-02-08 00:16:11 +00:00
KHobbits
807a5c382f Reformat pom 2014-02-08 00:13:46 +00:00
KHobbits
a1e1e42a02 Add bow as a skeleton keyword 2014-02-06 02:35:27 +00:00
Iaccidentally
78b74afa4b Modifier order consistency 2014-02-04 11:11:43 -05:00
KHobbits
9d60c20f17 Readme tweak. 2014-02-04 01:17:06 +00:00
KHobbits
a292dcbd17 Add support for vanilla item names from api. 2014-02-02 19:04:09 +00:00
KHobbits
ef451056f9 Fixed argument count for meta parsing. 2014-02-02 18:56:45 +00:00
KHobbits
3a26dda240 Allow the Essentials module to compile again. 2014-02-02 18:19:29 +00:00
KHobbits
d56b8a9f63 Raise minimum CB version to 2922 or 1.7.2-R0.1
This should prevent issued caused by UUID mismatch.
2014-02-02 17:13:44 +00:00
KHobbits
0b2526fc46 Track UUID for future use. 2014-02-02 17:05:41 +00:00
KHobbits
33156c4f83 Restore teleporting to middle of block, when flying and unsafe is enabled. 2014-02-02 16:43:31 +00:00
KHobbits
109c26fa8f [Breaking] Add exception when players have exceeded their account limit.
This might effect some plugins which hook Essentials for economy without using the API
2014-02-02 16:07:32 +00:00
KHobbits
889afc8089 Make sure we leave any vehicles before teleporting. 2014-02-02 15:04:07 +00:00
Iaccidentally
042f3a210a [FIX] Print a proper error when using tpaccept with no requester 2014-02-01 16:49:54 -05:00
Chris Ward
bce7a7c739 Allow the use of non-development Bukkit builds at runtime
Unsafe code is surrounded by sufficient handling
2014-01-30 10:43:26 +11:00
Chris Ward
85c09226e2 Restore Bukkit dependency to parent pom 2014-01-30 10:34:16 +11:00
KHobbits
6f91c1beff Attempt to fix client issue with speed reset on world change. 2014-01-26 22:33:56 +00:00
KHobbits
38a7d18265 Make /speed persist on world change if permissions exist. 2014-01-26 20:00:41 +00:00
KHobbits
cd2fc1928f Force Bukkit version to match deps. 2014-01-25 23:29:48 +00:00
KHobbits
4e1e5c5cd0 Use OSX character split on internal sign interface 2014-01-25 22:55:28 +00:00
Necrodoom
2d094d3b04 Fix cauldron ID 2014-01-25 22:46:26 +00:00
Necrodoom
b837ad66bd Trim items.csv based on feedback 2014-01-25 22:46:25 +00:00
snowleo
7edb7aa7fc Read backup output async 2014-01-25 15:33:33 +01:00
Chris Ward
ad988e05e4 Add fullstops for @Necrodoom 2014-01-21 12:20:24 +11:00
Chris Ward
e03e59e2b4 Add support for vanilla JSON metadata syntax (/give, /i, /kit, etc.) 2014-01-21 00:54:48 +11:00
Chris Ward
3495fc8982 Update to Bukkit Development Builds
Change things so unit testing can run after Bukkit's breaking commit with classloader stuff
2014-01-20 21:20:13 +11:00
KHobbits
9432765479 Fix hidden groups in /list 2014-01-14 21:55:30 +00:00
KHobbits
ae5629ab2d Pass optional location parameters to teleport TL keys. 2014-01-12 01:23:12 +00:00
KHobbits
31c027adf8 Config description cleanup. 2014-01-11 17:34:35 +00:00
Adam
ce91aaf953 Reset Exhaustion on /feed 2014-01-08 01:07:38 +00:00
Chris Ward
223465bd69 Add an upload-only pom file for GroupManager 2014-01-06 10:03:22 +11:00
KHobbits
9e8f570dda Check command cost, before running kit delay check, prevent accidentally delaying unran commands. 2014-01-03 08:16:17 +00:00
KHobbits
39318f8432 Add and implement sign break/create/interact events to EssAPI
Implement AfkStatusChangeEvent
2013-12-31 17:47:52 +00:00
KHobbits
27f4e338a2 Remove redundant permission check. 2013-12-31 04:44:28 +00:00
KHobbits
dc80edde4b Fix NB parent compiling 2013-12-28 23:09:56 +00:00
KHobbits
85f6d6ebe0 Add permission: essentials.msg.multiple and essentials.pay.multiple
Message permission will allow rough nick matches and wildcards, while pay will only allow wildcards.
2013-12-28 22:37:36 +00:00
Chris Ward
5b4893e6cb Add deploy plugin 2013-12-29 03:04:36 +11:00
Chris Ward
79b7162cdc Use the Essentials Maven repository 2013-12-29 00:21:26 +11:00
Chris Ward
5f78452880 Remove Ant, migrate Netbeans code style to pom.xml 2013-12-27 03:47:13 +11:00
Chris Ward
22f83a82bd Travis - use Maven to build 2013-12-26 01:19:51 +11:00
SkyBirdSoar
5b2887201b Add aliases to stationary water & stationary lava
New changes:
stillwater is an alias to 9:0 (Stationary water)
stilllava is an alias to 11:0 (Stationary lava)
2013-12-26 01:17:42 +11:00
Chris Ward
841bbbf71f Pull geoip library from Maven 2013-12-26 01:12:04 +11:00
Chris Ward
72e115fdb7 Use Ant to replace GroupManager's plugin.yml version 2013-12-22 19:21:19 +11:00
KHobbits
d0c25729ed Better matching of zombie and skeleton mobdata to avoid confusion. 2013-12-22 00:12:22 +00:00
KHobbits
e928e24c78 Add {4} to homeSet TL key, this contains the name of the home being set. 2013-12-21 23:30:12 +00:00
KHobbits
aba674e286 Check command cost permissions prior to teleporting. Fixes ESS-4918 2013-12-21 23:19:58 +00:00
KHobbits
40b22a11cb Add extra /home message TL params
{1} = current home count
{2} = max home count
2013-12-21 17:42:55 +00:00
KHobbits
6c0970e4b3 Don't check for default worth durability if more than one durability price is defined.
This also adds support for '*' durability matching 'other'.
2013-12-21 03:33:27 +00:00
KHobbits
264ef2760d Restore CB to lib folder 2013-12-21 02:39:26 +00:00
Chris Ward
fcf502f2a9 Use Bukkit beta build 2013-12-18 17:26:01 +11:00
KHobbits
08f28a961d Try changing the config file home language up a little bit. 2013-12-17 19:23:28 +00:00
Necrodoom
1e065d6bab fix gcWorld in de locale 2013-12-15 12:49:06 -06:00
Necrodoom
c01ec42743 Add cobweb aliases 2013-12-13 09:23:29 -06:00
Chris Ward
44385ce024 Change teleport safety checks to use less expensive methods. 2013-12-13 19:41:57 +11:00
KHobbits
4b2e4c61f9 Alter teleport cancel message to reflect config option. 2013-12-13 08:15:28 +00:00
Joshua Popoff
27919ed78a Add the ability to disable teleport safety. Requested by a few people - teleport safety isn't always a good thing for some servers. Request is cancelled if not safe. 2013-12-13 17:07:26 +11:00
Chris Ward
7bb9c352dd Remove Javadocs from the default compile, use the javadoc:javadoc goal to generate them. 2013-12-11 21:50:06 +11:00
Chris Ward
f10df04f2b Merge pull request #609 from Skylexia/patch-1
Fixed all the salmon.
2013-12-10 18:46:51 -08:00
Skylexia
adb4b32eca Fixed all the salmon. 2013-12-10 20:42:56 -05:00
Iaccidentally
b1cbb0fca3 Merge pull request #607 from necrodoom/patch-67
Add new baked potato aliases - thanks clou44
2013-12-08 09:45:16 -08:00
Necrodoom
720e689b76 Add new baked potato aliases - thanks clou44 2013-12-08 19:44:14 +02:00
Chris Ward
8724f70fd6 Strip all Mac OSX characters
Temporary workaround awaiting PR from Bukkit
2013-12-08 20:40:10 +11:00
md-5
488cf869c8 Fix formatting from last commit 2013-12-08 17:00:53 +11:00
md_5
4f7022b4c7 Strip weird sign chars sent by OSX due to client bug 2013-12-08 16:57:44 +11:00
KHobbits
eff7760531 Update config.yml to reflect recent custom message settings. 2013-12-08 04:46:33 +00:00
KHobbits
0a44905d5b Make it so both {world} and {worldname} work for both keyword parsers. 2013-12-07 23:58:47 +00:00
KHobbits
821c30c726 Update Bukkit
Bukkit: #1859 CB: #2943
2013-12-07 22:26:41 +00:00
Necrodoom
8b855cd09a Ignore empty chat events generated by plugins 2013-12-07 22:15:01 +00:00
KHobbits
8ab444df05 Add support for adding item meta to [free] signs.
Fix NPE on [sign] creation.
2013-12-07 20:25:23 +00:00
KHobbits
125fa6637a Logger cleanup pt 1. 2013-12-07 20:03:05 +00:00
KHobbits
93ef122ee7 Cleanup /remove ingame syntax 2013-12-07 19:17:36 +00:00
KHobbits
da4917dd74 Show warning when invalid mob type is specified for /remove 2013-12-07 19:03:29 +00:00
KHobbits
e0aeebd2e0 Remove requires at least one argument. 2013-12-07 18:46:25 +00:00
Chris Ward
4fff1e779d Fix issue in login messages
Message wouldn't be displayed if silent join is enabled and custom is disabled. Probably.
2013-12-07 14:24:39 +11:00
Chris Ward
76368ff9c9 Disable the login message hooks automatically 2013-12-07 14:20:51 +11:00
Chris Ward
385e3a77c2 Fix login messages 2013-12-07 13:44:41 +11:00
Chris Ward
3a2771e3a7 Revert "Fixed bug when logging in silently"
This reverts commit 880893aa43.
2013-12-07 13:24:48 +11:00
Iaccidentally
66ea548780 Merge pull request #605 from Phryxiil/2.x
Fixed bug when logging in silently
2013-12-06 18:17:06 -08:00
Zarubinator
880893aa43 Fixed bug when logging in silently 2013-12-06 21:15:27 -05:00
Chris Ward
3e381970e1 Who doesn't love a good ol' NPE 2013-12-06 19:01:37 +11:00
Necrodoom
5490f68d8c Fix glass pane IDs
remove duplicates in items.csv (thanks .itemdbparse)
2013-12-05 23:09:35 +00:00
Chris Ward
c1bdd6ec94 Cleanup join/quit messages. 2013-12-05 23:08:29 +00:00
Chris Ward
e8bd7baba8 Fix custom join messages Removes double message, adds colour codes and placeholders for the user's name. 2013-12-05 23:08:28 +00:00
TheReverend403
3433d59b7b Code cleanup 2013-12-05 23:06:04 +00:00
Necrodoom
c37c238832 Update items.csv to 1.7.2 (beta file version) 2013-12-05 23:03:34 +00:00
KHobbits
1f337dc1cd Updated translations from crowdin 2013-12-05 23:03:34 +00:00
KHobbits
8f863c3935 Cache join/quit messages. 2013-12-05 23:03:33 +00:00
Iaccidentally
a8825fab22 Add options to disable join/quit messages and custom join/quit messages 2013-12-05 23:03:33 +00:00
KHobbits
4bc7034b25 Merge remove and killall command, thanks to @Evonuts and @Iaccidentally. 2013-12-05 23:03:33 +00:00
Adam
4f6290c61c Add a title to [Disposal] and [Free] sign inventory 2013-12-05 23:03:33 +00:00
Chris Ward
5281bafec9 Update FakeServer - fixes compilation 2013-12-05 23:03:33 +00:00
KHobbits
6817160351 Update to first build of 1.7.2 - CraftBukkit is still buggy so expect issues
Bukkit: #1856 CB: #2922
2013-12-05 23:03:32 +00:00
iBo3oF
66e55e0e29 Add Balance Update Event. 2013-12-05 23:03:31 +00:00
KHobbits
db4ec10a4c Tidy up string manipulation in trade signs. 2013-12-05 23:03:31 +00:00
KHobbits
139f99d98f Try to be a little less confusing with non-command debug errors. 2013-12-05 23:03:31 +00:00
KHobbits
df7015ea4f Adding saddles to horses should properly tame horses. 2013-12-05 23:03:31 +00:00
Necrodoom
0ebc82756f Do not block user damaging self (ender eye) 2013-11-17 19:19:42 +02:00
Joseph Jenniges
2db51893a9 Fix logic error with /kickall in console 2013-11-17 10:04:36 -06:00
snowleo
fa5e78f2c6 Fix fromIndex = -20 2013-11-15 20:06:16 +01:00
KHobbits
53fa837d0e Throw meaningful warnings when wrong Essentials version is used with unsupported mod packs. 2013-11-15 00:22:10 +00:00
Iaccidentally
833d32ff2b Tidy up Commandremove a bit, thanks to Evonuts 2013-11-10 23:25:42 +00:00
Iaccidentally
53d62c6966 Add more functionality to the remove command. This now overlaps some functionality of the killall command, which should eventually be merged into this command and removed. new options: hostile, monsters, passive, animals, ambient, mobs, entities 2013-11-10 23:25:34 +00:00
KHobbits
a9e62516bc Allow ignore to block tpahere requests. 2013-11-09 04:08:25 +00:00
KHobbits
d720911128 Add a couple more enchant aliases for blast protection 2013-11-09 03:40:51 +00:00
Iaccidentally
f056d430c4 Cleanup various aspects of code, fix some formatting, more netbeans 7.4 stuff 2013-11-06 21:22:32 -05:00
Iaccidentally
5415207c88 Add ability to supress join/leave messages :: new permissions: essentials.silentjoin & essentials.silentquit 2013-11-06 18:05:02 -05:00
Iaccidentally
ca0d688db0 netbeans 7.4 stuff 2013-11-06 18:03:46 -05:00
KHobbits
acf62ac21f Update Bukkit and Craftbukkit jar files for stable 1.6.4
Bukkit: 1848 Craftbukkit: 2912
2013-10-28 00:29:01 +00:00
KHobbits
a3abef4218 Update Translation files from Crowdin:
http://translate2.ess3.net/
2013-10-28 00:21:41 +00:00
FearFree
2ba83544e1 Update for consistency.
Signed-off-by: KHobbits <rob@khobbits.co.uk>
2013-10-28 00:10:35 +00:00
FearFree
4d9dc9a603 Clarify no perm msgs for missing .offline perms
Signed-off-by: KHobbits <rob@khobbits.co.uk>
2013-10-28 00:10:33 +00:00
KHobbits
65c973a154 Clarify message when ignoring exempt players. 2013-10-27 23:53:24 +00:00
Chris Ward
28b122ee1d Fix automatic versioning when compiling with Maven 2013-10-21 13:50:17 +11:00
KHobbits
ce245d5bdd Add a little more group based debugging. 2013-10-21 01:20:09 +01:00
KHobbits
df5e566682 Add debug log entry when checking permission groups. 2013-10-20 17:45:37 +01:00
KHobbits
2538618835 Round up Y position when standing on half blocks. This should address some safelogin bugs. 2013-10-20 02:25:11 +01:00
KHobbits
2284b0f45e Restore deleted craftbukkit jar 2013-10-20 01:36:22 +01:00
KHobbits
81a9a0f65e Restore original give/take Money API 2013-10-19 12:26:28 +01:00
Chris Ward
2a02a67ff0 [Fix] Allow someone to change their nick to different case of the same thing 2013-10-19 12:19:40 +01:00
Chris Ward
200948bdd5 Use a player's real name in /balance if they are vanished 2013-10-19 12:19:40 +01:00
Chris Ward
c55c0d6bdd Call Ant from Maven (for GM) 2013-10-19 12:19:40 +01:00
Chris Ward
5eabb8ac26 Fix null pointer exception on kits with meta 2013-10-19 12:19:39 +01:00
Chris Ward
0ba3afe881 Make looping commands see vanished players properly
Make /r check player existence in the correct order
2013-10-19 12:19:39 +01:00
Chris Ward
d84fb870bf Add Maven Support 2013-10-19 12:19:39 +01:00
Chris Ward
ce3a90b617 Fix double messages in targeted commands 2013-10-19 12:19:37 +01:00
Chris Ward
859db92ccc Remove .idea and *.iml from git 2013-10-18 17:32:47 +11:00
Chris Ward
e0177e28b1 Fix /r 2013-10-18 17:23:27 +11:00
KHobbits
e07dc0f248 Cleanup 2013-10-18 00:07:35 +01:00
KHobbits
22ff0fc56d Restore getUser API 2013-10-18 00:07:34 +01:00
KHobbits
ff46b39f2b Extract CommandSender to CommandSource, this should prevent Ess user object leaks. 2013-10-16 21:05:33 +01:00
KHobbits
d6dfe5da65 Strip nickname prefix when doing displayname comparison. 2013-10-16 20:54:23 +01:00
Iaccidentally
4583e549ea Cleanup XMPP PR 2013-10-16 20:53:30 +01:00
patjense
595c5c4da2 add delayed task for XMPP presence update 2013-10-16 20:52:50 +01:00
patjense
a11ba6b09a add XMPP presence management stack 2013-10-16 20:52:50 +01:00
patjense
8083cfba89 add update for global presence handler 2013-10-16 20:52:50 +01:00
KHobbits
ca7847e5ce Clean Imports 2013-10-11 03:44:41 +01:00
KHobbits
e9f8312121 Allow for event based test cases. 2013-10-11 03:34:41 +01:00
Iaccidentally
36bc71b093 implement GodStatusChangeEvent 2013-10-11 03:14:51 +01:00
KHobbits
7f059ac725 Update README.markdown 2013-10-07 01:34:42 +01:00
KHobbits
7ffa11e4e1 Allow recolouring own name. 2013-10-05 05:34:33 +01:00
KHobbits
ad8b0ced39 Cleanup 2013-10-05 03:27:40 +01:00
KHobbits
b227a4ef02 Improve nick validation
Now matches nicks against userdata for conflicts
Now checks for empty string nicknames
2013-10-05 02:31:19 +01:00
KHobbits
e6c17e9e96 Add more API template and implement nick change event. 2013-10-05 02:11:39 +01:00
KHobbits
1bff1cdf0b Extract user match looping 2013-09-28 21:33:22 +01:00
Luke GB
6dbd2a37f7 Adds even more clarification to metrics opt-out 2013-09-25 00:22:11 +01:00
TheReverend403
24fd0485be Adds clarification to metrics opt-out 2013-09-25 00:18:43 +01:00
drtshock
1bc9fadf4a Format to the format with the formatter. 2013-09-24 09:38:30 +01:00
drtshock
0b9f1f0a3a Ignore list and no tpa to self. Fixes ESS-4456 ESS-4711
List users that you ignore when no arguments are given. Otherwise state
that no players are ignored.

Don't allow users to tpa or tpahere themself. This is a problem with
people "glitching" with how essentials finds a safe location to get
inside of places they shouldn't.
2013-09-24 09:38:29 +01:00
Iaccidentally
c28db6ee68 Update to 1.6.4 2013-09-19 21:38:15 -04:00
Chris Ward
0cdd8dbf75 Cleanup 2013-09-18 22:22:56 +10:00
GunfighterJ
f72777b546 Update ItemStack reference to getTypeId() 2013-09-17 23:23:45 +10:00
Chris Ward
bd4a26bb0a Require latest Bukkit RB 2013-09-17 21:08:20 +10:00
GunfighterJ
9a7a50bead Push latest Bukkit RB 2013-09-17 06:06:34 -05:00
GunfighterJ
ee792298b9 Fix translation typo 2013-09-15 16:43:16 -05:00
KHobbits
e7a1c53065 Fix handling max warp pages. 2013-09-10 01:42:11 +01:00
KHobbits
e01622d6e8 Fix case sensitivity on {PLAYERLIST:group} 2013-09-06 23:54:37 +01:00
KHobbits
4146c401f0 Clarify kit errors 2013-09-05 15:40:43 +01:00
KHobbits
f342c10fda Expose other plugins ban masks. 2013-09-04 07:19:30 +01:00
KHobbits
b8a2bce805 Properly handle negative /clear amounts. 2013-09-04 06:35:53 +01:00
KHobbits
d227b4d987 Reimplement 'private' keywords. 2013-09-01 00:24:11 +01:00
KHobbits
b06846aacb New enum cached, lazy generated KeywordReplacer
This runs before the pager, so keywords on other pages will still be parsed.
2013-08-31 23:11:08 +01:00
Pocketkid2
8a7cb777d0 Use Tamed instead of horse/ocelot/wolf 2013-08-31 19:36:41 +01:00
KHobbits
13436732d0 Add support for coloured authors on books
Fixes ESS-4690
2013-08-31 13:20:36 +01:00
KHobbits
6edc53fec6 Add debug output to keyword replacer 2013-08-30 13:37:49 +01:00
KHobbits
f719424859 This tp req cancel isn't needed anymore. 2013-08-30 11:05:27 +01:00
KHobbits
fce0d48766 Don't waste cpu on /baltop if eco is disabled. 2013-08-28 18:00:27 +01:00
KHobbits
1a2772dfdc Extend eco disable option to block eco lookups. This can be required to combat slow SQL economies.
This option is not recommended under normal circumstances.
2013-08-28 17:50:28 +01:00
KHobbits
843400ccec Don't allow buying partial item sets via trade signs. 2013-08-28 13:42:08 +01:00
KHobbits
ca12b47a5c Add another customtext example (including one with multiple aliases) 2013-08-20 23:43:40 +01:00
KHobbits
acc6a12b1c Add support for {PLAYERLIST:GROUP} AND {PLAYERLIST:GROUP:<none>}
Replace <none> with what you want to show if there are no players from that group online.
2013-08-20 23:39:34 +01:00
Chris Ward
e8e4d28b6d Add COORDS, UPTIME and TPS keywords 2013-08-20 22:14:29 +10:00
KHobbits
af782bb409 More colour. 2013-08-20 01:51:32 +01:00
KHobbits
9f0ada7a9d Refresh default motd. 2013-08-19 22:00:30 +01:00
KHobbits
c47f8369be Fix text file color code escaping (&&6 -> &6) Add support for color escaping in ingame chat Other formatting class cleanup 2013-08-19 21:37:44 +01:00
KHobbits
ab3ad25fb6 New command /customtext - This command is intended to be used with bukkit.yml aliases to make custom commands. 2013-08-19 21:37:33 +01:00
KHobbits
b30a873e45 Add support for multiple bookmarks/chapter names
Clean up info file handling
2013-08-19 00:13:49 +01:00
KHobbits
35da3e67fe Fix tests 2013-08-18 22:48:13 +01:00
KHobbits
f0a8798b55 Reset fall distance when toggling fly so fall damage is not accidentally applied. 2013-08-18 22:43:43 +01:00
KHobbits
a6bb2cf9a0 Fix a few issues with /list and group formatting. 2013-08-18 22:08:57 +01:00
KHobbits
66c40b955f Fix feed cooldown bypass permission:
Permission: essentials.feed.cooldown.bypass
2013-08-18 21:05:45 +01:00
KHobbits
1a292e34a2 Fix NPE in /kill when used from console. Thanks Necrodoom 2013-08-18 21:04:19 +01:00
KHobbits
1faf24b740 Add muting offline players
Permission: essentials.mute.offline
2013-08-18 21:02:47 +01:00
KHobbits
009ea37d1c Allow alternative command handler to also pass tab complete. 2013-08-15 21:58:23 +01:00
Necrodoom
40b5e7fcdf items.csv - try move the most common item alias to top of aliases stack
without ore aliases remove
2013-08-15 21:37:55 +01:00
KHobbits
68534303ac Use essentials itemdb for charge messages. 2013-08-15 05:47:23 +01:00
KHobbits
1f0a684204 Use user object to send messages when possible. 2013-08-15 01:53:22 +01:00
KHobbits
466b24a428 Gracefully handle botched plugin starts 2013-08-13 23:41:54 +01:00
KHobbits
a03535e307 Fix mail sendall from console skipping first param 2013-08-13 22:01:13 +01:00
Necrodoom
751d2dc755 fix config comment at heal-cooldown 2013-08-13 18:16:40 +01:00
Pocketkid2
9acd05fffa Update Commandremove.java
Fix class checking in /remove
2013-08-13 18:14:40 +01:00
Necrodoom
b938f01b18 trim and replace spaces in chapter names to always work in commands 2013-08-13 18:07:27 +01:00
KHobbits
97934669ec Teleport cleanup 2013-08-13 18:06:24 +01:00
GunfighterJ
52d72d85f6 Fix NPE in /back when no previous location exists 2013-08-13 11:46:52 -05:00
KHobbits
ab0a1e4f64 Restore safe location for /top 2013-08-13 00:55:31 +01:00
KHobbits
99d7c2e4c7 Prevent inf loop when adding air to kits.
Should fix #4555
2013-08-12 00:26:51 +01:00
KHobbits
85402be22b Fully support numerical worth yml data. 2013-08-11 23:43:45 +01:00
KHobbits
517d6a30cb When in fly+god mode or when in creative mode, don't use safe teleport location when teleporting to other players.
Enable fly in unsafe circumstances.
This only works when teleporting within worlds for permission reasons.
2013-08-11 22:42:29 +01:00
KHobbits
04aed9d05e Update plugin.yml and add some aliases (Evonuts is going to hate me) 2013-08-11 22:10:56 +01:00
KHobbits
c7e08392f7 Allow toggling vanish for other players
Permission: essentials.vanish.others
2013-08-11 21:48:30 +01:00
KHobbits
dfdc519e66 General cleanup.
Add optional TL param for tempban/mute time in notify message
2013-08-11 21:34:26 +01:00
KHobbits
24350efc94 The /tpahere command now stores the location of 'here' rather than using the current players location.
Cleanup teleport logic - This also fixes exploiting /tpahere to get accesses to restricted areas.
2013-08-11 16:37:21 +01:00
KHobbits
195842088c Update Mob.java 2013-08-09 04:38:57 +01:00
Necrodoom
4a69f89c52 display syntax if more than one argument to avoid confusion with command purpose
more clearly, show syntax when people try to do /money give playername amount
2013-08-05 16:04:28 +01:00
KHobbits
c5958851cc Update Bukkit for 1.6.2R0.1 beta
CB: 2838 Bukkit: 2252
2013-08-05 04:15:26 +01:00
KHobbits
43a04ec0a1 Update Translations from crowdin 2013-08-05 00:19:44 +01:00
KHobbits
72e0327761 Force space after group in /list 2013-08-04 23:39:56 +01:00
GunfighterJ
088e7ddc03 Remove duplicate key 2013-08-04 12:53:46 -05:00
Pocketkid2
a1e9056065 Update Potions.java
Add extra alias
2013-08-04 11:38:48 -05:00
KHobbits
db838bcf6c More missing syntax. 2013-08-03 02:48:50 +01:00
KHobbits
b629625570 Add missing command syntax for /spawnmob 2013-08-03 02:25:42 +01:00
Pocketkid2
ac921babd3 Update Commandkillall.java
Add support for horses
2013-07-29 21:40:52 +10:00
KHobbits
d0fb315d63 Restore vault compat 2013-07-26 00:11:37 +01:00
Iaccidentally
01f1346b73 Merge pull request #524 from necrodoom/patch-40
fix mobdata typo
2013-07-25 10:51:08 -07:00
Necrodoom
59ec6884b8 fix mobdata typo 2013-07-25 16:44:48 +02:00
GunfighterJ
8e433b818c Close inventories before opening any others 2013-07-24 16:01:17 -05:00
KHobbits
fa9320dcc1 Use the correct name in /sethome if you don't have sethome.others permission. 2013-07-23 23:39:44 +01:00
KHobbits
01b84fbb8f Restore deprecated trade api
Fixes #4500
2013-07-23 22:48:32 +01:00
KHobbits
cd2ca6118d Fix max radius. 2013-07-21 00:04:04 +01:00
okamosy
2b1b112478 Refactored and cleaned up SpawnMob. Added context-aware help /spawnmob <mob>: 2013-07-20 21:29:13 +01:00
KHobbits
8763109731 Show if a IP is ip-banned on /seen <ip> 2013-07-19 02:25:50 +01:00
KHobbits
04e66f36fc Cleanup worth and sell messages 2013-07-19 00:55:21 +01:00
snowleo
3df8b0841b Can't sell negative amount of items. 2013-07-19 01:01:52 +02:00
okamosy
3becc54063 Added horse armor /spawnmob horse:armor<iron|gold|diamond> 2013-07-17 23:32:25 +01:00
okamosy
3c641138cf Added saddles to pigs and horses /spawnmob pig:saddle /spawnmob horse:saddle 2013-07-17 23:31:37 +01:00
KHobbits
536793ed10 Log notice when chat ignore is blocked by another plugin. 2013-07-17 23:26:26 +01:00
KHobbits
1666cd9193 Add scaling object cap for usermap, prevent huge memory usage, also config file configurable. 2013-07-17 01:56:27 +01:00
okamosy
fac381696a Added horses to SpawnMob /spawnmob horse:<color><variant><style><chest> 2013-07-16 23:36:11 +01:00
KHobbits
fc52dbeddb Fix radius logic 2013-07-15 23:15:35 +01:00
Necrodoom
396e715a89 Max near radius 2013-07-15 23:10:55 +01:00
KHobbits
3cd37cc40b Add missing param in /remove 2013-07-15 02:43:23 +01:00
KHobbits
bbc4f7a1a1 Better handle esschat/GM reloading during async events. 2013-07-15 00:47:17 +01:00
KHobbits
a7de16f9f4 Update Craftbukkit
CB: 2814 Bukkit: 1792
2013-07-14 22:27:57 +01:00
KHobbits
08b6c0a341 Try to restore basic api functionality 2013-07-14 13:00:03 +01:00
KHobbits
565698879a Tidy and slightly expand user API 2013-07-14 12:41:27 +01:00
KHobbits
311bd14bc4 Fix worth display bug 2013-07-14 12:09:49 +01:00
KHobbits
4c620e4fa1 Fix local chat spy tag order. 2013-07-14 01:20:36 +01:00
KHobbits
585d323239 Throw syntax error instead of "For input string" 2013-07-14 01:07:59 +01:00
KHobbits
1df8d7e654 Add support for /worth all and /worth hand 2013-07-14 01:03:08 +01:00
KHobbits
db200a0401 Whoops, wrong event. 2013-07-13 18:56:18 +01:00
KHobbits
dc5825d5f9 Wrap ItemDb accessors and move Item string matching to itemdb class. 2013-07-13 18:52:53 +01:00
KHobbits
df627282b0 Fix local message when no players are in the area
Allow any translation key to be silenced by blanking it in locale file
2013-07-13 18:46:26 +01:00
Iaccidentally
a3cc1e4213 [API] flip! (╯°□°)╯︵ ┻━┻ 2013-07-13 13:40:46 -04:00
Iaccidentally
3082aeee94 [API] fix implementation? 2013-07-13 12:52:08 -04:00
Iaccidentally
12c9bb311a Merge branch 'API' of https://github.com/essentials/Essentials into API 2013-07-13 12:41:31 -04:00
Iaccidentally
878a5a2674 [API] fix other modules to use new packages 2013-07-13 12:40:50 -04:00
KHobbits
8a30272022 Fix failing XMPP build. 2013-07-13 17:36:35 +01:00
KHobbits
96749c72d0 Add 'No one listening' message stub, will be empty by default and thus not sent. 2013-07-13 17:31:14 +01:00
KHobbits
3043127b74 Remove old chat hook
Use Bukkit API for local chat handling
Implement localChatSpy event
2013-07-13 17:25:58 +01:00
Iaccidentally
c23c1b9530 [API] remove setters 2013-07-13 11:53:52 -04:00
Iaccidentally
ad60d7c692 [API] Event framework 2013-07-13 11:48:05 -04:00
Iaccidentally
95293b46e0 [API] Move 2.x API to new package, create dummy classes for compatibility 2013-07-13 11:14:39 -04:00
Iaccidentally
93198e8d41 Merge branch '2.x' of https://github.com/essentials/Essentials into API 2013-07-13 10:38:28 -04:00
Necrodoom
ae6dedf605 fix mute message when chatting
deny /mail if muted
2013-07-12 15:22:48 +01:00
GunfighterJ
2dd34f05f0 Add horse to entity spawn protection blacklist 2013-07-11 12:37:09 -05:00
KHobbits
c7d82e51c3 Don't cast sender to User. 2013-07-11 09:20:52 +01:00
KHobbits
b4fe8e6b25 Prevent speed from hitting absolute zero. 2013-07-11 08:58:22 +01:00
KHobbits
eef0fd7059 Update TL files from Crowdin, this commit resets untranslated English to new colour scheme. 2013-07-10 22:36:27 +01:00
KHobbits
028e85f7f5 Remove unused TL Keys 2013-07-10 22:14:23 +01:00
Iaccidentally
3d540df792 tweak default setting for max nick length 2013-07-10 11:01:49 -04:00
Iaccidentally
5a780409b8 [FEATURE] Add configurable max nick length 2013-07-10 10:48:14 -04:00
KHobbits
87cf40c218 Update CB to 2808 2013-07-10 00:09:48 +01:00
KHobbits
9a59de7594 Fix TL handling with escaped ' marks. 2013-07-10 00:03:14 +01:00
KHobbits
c071cf0caa Fix user comparison. 2013-07-09 09:08:26 +01:00
GunfighterJ
351fb0582c Implement abstract methods 2013-07-08 19:28:24 -05:00
GunfighterJ
34410f5ec6 Update to 1.6.2, adds new potion effect types 2013-07-08 19:22:38 -05:00
KHobbits
a68e32d320 Standardize translation formatting. 2013-07-07 15:01:00 +01:00
KHobbits
2f2c1d2bc6 Update Polish and Swedish translations from crowdin 2013-07-07 14:54:38 +01:00
KHobbits
59bc0b4d0f Translation cleanup
Allow '' in non format keys
Update French translation from crowdin
2013-07-07 14:52:31 +01:00
Gabriel D
dc1469a8e1 Update some new text 2013-07-07 14:13:43 +01:00
KHobbits
fe85668021 More cleanup 2013-07-07 13:02:40 +01:00
KHobbits
0be9986dfb Misc cleanup 2013-07-07 12:38:01 +01:00
KHobbits
89e71ae34e Whoops, we shouldn't be leaking the user object. 2013-07-07 11:51:12 +01:00
mrarroyo
ddb26dde1b Fix punctuation 2013-07-07 02:17:25 +01:00
Chris Ward
0d303f7b41 Merge pull request #509 from necrodoom/patch-31
add horse egg
2013-07-02 02:25:49 -07:00
Necrodoom
03889cce39 add horse egg 2013-07-02 12:20:20 +03:00
KHobbits
12eea274a2 Add carpet to safe teleport materials. 2013-07-02 08:02:01 +01:00
KHobbits
73373f288a Add command logging for CommandBlocks and other console types. 2013-07-02 07:16:42 +01:00
Iaccidentally
a3ed9cd507 Merge pull request #503 from necrodoom/patch-26
update items.csv to Minecraft 1.6
2013-07-01 19:48:11 -07:00
GunfighterJ
de25c5c827 Update Essentials for Bukkit 1.6.1-R0.1-SNAPSHOT 2013-07-01 21:38:27 -05:00
Necrodoom
8fb48dcf2b update items.csv to Minecraft 1.6 2013-07-01 13:03:24 -05:00
GunfighterJ
66dae31484 Close the reader 2013-06-30 07:47:33 -05:00
GunfighterJ
32426aa540 Force reading in UTF-8 from .txt files 2013-06-30 07:40:24 -05:00
Tyler Blair
6808b03feb Update Plugin Metrics to R7 2013-06-29 18:05:42 +01:00
Iaccidentally
8719518b67 [API] Fix package naming 2013-06-28 15:30:47 -04:00
Iaccidentally
ebe69f5368 [API] fix references 2013-06-28 15:26:23 -04:00
Iaccidentally
fe38168d64 [API] Cleanup 2013-06-28 15:21:49 -04:00
Iaccidentally
afbcadd0c3 [API] Remove some unneeded dependencies 2013-06-28 14:58:45 -04:00
Iaccidentally
2a9d283a88 [API] A basic example of a custom event, more to come. 2013-06-28 14:22:18 -04:00
KHobbits
dfcbdb7bb1 Add {TEAMPREFIX} {TEAMSUFFIX} and {TEAMNAME} to chat formatting. 2013-06-28 17:12:01 +01:00
KHobbits
9e11a4a381 Force repair inventory refresh. 2013-06-28 14:14:43 +01:00
KHobbits
3e747fd5a5 Minor colour tweak 2013-06-28 13:05:56 +01:00
KHobbits
3dc22d4c76 Make the paging logic even more complicated. 2013-06-28 01:05:56 +01:00
KHobbits
ec674289a7 Drop messageFormat for simple string replace, remove duped ' marks. 2013-06-27 09:33:35 +01:00
KHobbits
8fedd5076c Don't drop oversized stacks on the ground if player doesn't have oversized permission. 2013-06-26 21:44:34 +01:00
KHobbits
129094da2c [Fix] Fix toggle syntax in plugin.yml 2013-06-26 08:57:26 +01:00
KHobbits
200cd16a05 Merge pull request #504 from necrodoom/patch-30
[Fix] Fix socialspy toggle with no on/off param.
2013-06-26 00:51:51 -07:00
Necrodoom
4e46879a4e fix socialspy toggles 2013-06-26 09:56:56 +03:00
KHobbits
fb654d6d2f Let's make the default group colour orange. 2013-06-26 01:22:18 +01:00
KHobbits
2f58929d60 Don't automatically convert {chatparms} to [chatparams] 2013-06-25 18:04:31 +01:00
Necrodoom
d2413963e7 update items.csv to Minecraft 1.6 2013-06-25 19:04:29 +03:00
KHobbits
79d070b5fc Fix null values. 2013-06-25 16:34:17 +01:00
ZerothAngel
7c074236c8 Add group/prefix/suffix support for zPermissions. 2013-06-25 16:24:23 +01:00
Luuk Jacobs
69ad1b9191 Reword some things, minor fixes and add punctuation.
more tiny fixes
minor unicode fix
2013-06-25 16:20:21 +01:00
KHobbits
4a27ccad60 Merge branch '2.x' of github.com:essentials/Essentials into 2.9 2013-06-25 16:00:32 +01:00
KHobbits
11b2a8938a Merge pull request #502 from afistofirony/patch-1
Changing a spawner should update its BlockState.
2013-06-25 07:58:46 -07:00
KHobbits
fa4b0a2445 Add missing variable. 2013-06-25 15:09:50 +01:00
Sahir
d6f2ea3fc5 Changing a spawner should update its BlockState. 2013-06-25 17:07:43 +04:00
KHobbits
a473ae4d6b Update KeywordReplacer.java 2013-06-24 13:31:07 +02:00
KHobbits
f05e24a4a8 Update info.txt 2013-06-24 13:29:28 +02:00
KHobbits
751dc204e4 Merge pull request #499 from mozoa/patch-1
Update messages_nl.properties
2013-06-23 15:41:51 -07:00
KHobbits
5ee0fe301e Merge pull request #501 from theudis/patch-6
Update messages_fr.properties
2013-06-23 15:41:30 -07:00
theudis
f61ca35a95 Update messages_fr.properties 2013-06-24 00:18:58 +03:00
KHobbits
d3c3146471 [Feature] Allow the placing of spawners with predefined network id's (/i spawner:50)
[Permission] essentials.spawnerconvert.<mobname> - Allow the placing of specific mobspawners with premade network id's.
2013-06-23 16:11:24 +01:00
mozoa
58a54c4f6d Update messages_nl.properties
Reworded some strings
and changed the order of words
2013-06-23 16:49:08 +02:00
KHobbits
b4a487f58e Merge pull request #498 from mozoa/patch-1
Added /ci lines
2013-06-22 16:49:48 -07:00
mozoa
a462b71690 Update messages_nl.properties 2013-06-22 22:51:38 +03:00
mozoa
05e0955743 Update messages_nl.properties
Added new CI lines
bit indifferent about line 543 and 544
2013-06-22 22:49:26 +03:00
KHobbits
4cff2ff996 [Feature] Expand /ci to allow removing certain amounts, and breakdown on the items removed. 2013-06-22 17:36:35 +01:00
KHobbits
3c58a2ce82 Clean up exception types. 2013-06-22 16:33:22 +01:00
KHobbits
87d0e92c1f Fix missing Unicode in NL TL 2013-06-21 11:23:01 +01:00
KHobbits
8bbcf575b7 Reduce restrictions on same item trading, so only identical items are blocked. 2013-06-20 21:14:28 +01:00
mozoa
be6e699d86 Update NL locale 2013-06-20 21:07:58 +01:00
KHobbits
903e44f158 [Fix] Don't throw the wrong error message when using group limited kit signs. 2013-06-19 21:20:58 +01:00
GunfighterJ
25d04f88d4 Merge pull request #489 from necrodoom/patch-23
fix permission check typo (thanks to #4365)
2013-06-18 11:01:17 -07:00
Necrodoom
4172835cb0 fix permission check typo (thanks to #4365) 2013-06-18 20:57:30 +03:00
KHobbits
b5baf6a6a5 Merge pull request #488 from necrodoom/patch-21
fix typo in eco warning
2013-06-17 08:19:59 -07:00
Necrodoom
fde6b103b1 fix typo in eco warning 2013-06-17 16:05:45 +03:00
KHobbits
bae4a451eb Block external access to unsupported saveConfig() method. 2013-06-17 01:08:42 +01:00
KHobbits
23041abfbe Allow new lines and add secure broadcast keywords. 2013-06-16 01:18:35 +01:00
KHobbits
92b71ae352 Cleanup broadcast, allow limited keywords in. 2013-06-16 01:07:16 +01:00
KHobbits
a0af13f26d Clarify 'permission-based-item-spawn' config setting. 2013-06-16 00:05:27 +01:00
KHobbits
c77e308755 Update to 1.5.2 RB:
Bukkit #1776 CraftBukkit #2788
2013-06-15 11:53:47 +01:00
KHobbits
f9d32ae8e8 Reset suffix on /nick even if op and prefix/suffix are disabled. 2013-06-13 09:18:47 +01:00
KHobbits
b6b68fd03c Merge pull request #485 from necrodoom/patch-29
no permissions is not an error, so dont output it as a warning
2013-06-12 02:59:55 -07:00
Necrodoom
2d625215f6 no permissions is not an error, so dont output it as a warning 2013-06-12 12:41:15 +03:00
KHobbits
560d0cf7ee Merge branch 'temp1' into 2.9 2013-06-11 20:50:24 +01:00
KHobbits
46ab4d026a Merge branch 'release' of github.com:essentials/Essentials into 2.9 2013-06-11 20:46:28 +01:00
Iaccidentally
8d359a2cd5 Cleanup imports 2013-06-11 20:45:12 +01:00
KHobbits
baa9f0af1f Restore support for replacing CAPITAL colour codes. 2013-06-11 16:38:24 +01:00
KHobbits
f2cb9d8ca1 Don't look up valid looking IP's in the player database. 2013-06-09 23:10:02 +01:00
Iaccidentally
b5158a88d6 Remove old permissions handlers that are no longer used. This fixes an issue where new versions of Bpermissions would be detected as old. 2013-06-09 14:38:27 -04:00
KHobbits
f458f47eaa Allow use of deprecated teleport function through interface. 2013-06-09 13:38:09 +01:00
theudis
cf030932ac Update messages_fr.properties
Small changes in what I had done previously.
2013-06-09 03:09:20 +01:00
Necrodoom
a13b708d56 Fix arg length checks on /exp 2013-06-09 03:07:35 +01:00
cexikitin
a6b5902929 Alert give sender that the user was unable to receive all the items. 2013-06-09 03:05:40 +01:00
KHobbits
7470ee6854 Split util classes. 2013-06-08 22:31:19 +01:00
KHobbits
c1bcfa6286 Cleanup ITarget 2013-06-08 21:43:42 +01:00
KHobbits
1c309995d1 Turn Target into a real class. 2013-06-08 21:40:02 +01:00
KHobbits
a0a3d856b1 Trapdoors should be treated as half blocks, not transparent blocks. 2013-06-08 21:26:11 +01:00
KHobbits
3cc09b421c Teleport invulnerability should trigger on respawn as well as normal teleport. 2013-06-08 21:06:33 +01:00
KHobbits
244592a9e2 Essentials API cleanup and teleport possession fixing. (UNSTABLE) 2013-06-08 19:34:14 +01:00
KHobbits
e4e9b67dcd Throw a little testing on toggle logic. 2013-06-08 16:33:30 +01:00
KHobbits
b4e484ea32 Try and make toggles DRYer without loosing command flow.
Allow socialspy to match multiple players.
2013-06-08 15:13:51 +01:00
KHobbits
bd3a8a3aed Allow spawning zombies without the trademark gold boots.
Also limit armor to zombies and skeletons.
2013-06-05 03:15:12 +01:00
KHobbits
2d3fbc2635 Fix unit tests. 2013-06-02 17:56:48 +01:00
KHobbits
7d4671d1d3 Attempt to fix /seen times on vanish. 2013-06-02 17:45:56 +01:00
KHobbits
10aed414a7 Mute and sudo should check for essentials.vanish.interact permission. 2013-06-02 16:09:56 +01:00
KHobbits
9807090341 Allow spawning zombies with swords too. 2013-06-02 00:09:12 +01:00
KHobbits
299b169269 [Feature]Extend spawning mob meta to allow more customized spawning:
/spawnmob (skeleton|zombie|pigzombie):(diamond|iron|gold)armor
2013-06-02 00:02:40 +01:00
KHobbits
976bacb33f [Fix] Set some default mob data.
Fixes skeletons spawning without bows.
2013-06-01 23:33:31 +01:00
KHobbits
7c4519e425 Update Essentials spawn to use new kit params. 2013-05-27 02:29:28 +01:00
KHobbits
c92ab08127 Better handle kit item casting. 2013-05-27 02:25:30 +01:00
KHobbits
f94fec0fcb Ignore extra spaces in kit config. 2013-05-26 23:53:39 +01:00
KHobbits
7a8ad7d3b4 Exempt [repair] signs from 'essentials.repair.all' permissions check. 2013-05-26 22:00:35 +01:00
KHobbits
876710e017 Update inventory when closing ghost-dupe-able inventory, to remove ghost items. 2013-05-26 18:21:19 +01:00
KHobbits
ac46caa33f Reduce duplicated broadcast code. 2013-05-26 17:58:04 +01:00
KHobbits
48db31083f Simplify player matching. 2013-05-26 17:37:11 +01:00
KHobbits
f920f71546 Standardize /getpos and /whois to use essentials.vanish.interact like all other commands. 2013-05-26 17:20:03 +01:00
KHobbits
ffccedec65 GeoIP already has a perm, doesn't need hidden behind essentials.seen.extra as well. 2013-05-26 16:52:25 +01:00
KHobbits
bfe1b4cf0f Show teleport cancel messages to tpa user. 2013-05-26 16:49:11 +01:00
KHobbits
faeb92371b Fix /helpop for console use. 2013-05-26 16:23:36 +01:00
KHobbits
2df9ab392e [Fix] Fix vanished player matching in: /seen /give /burn /nuke /tpall /tpaall 2013-05-26 16:02:40 +01:00
KHobbits
bf2e2d4517 Forgot to push Essentials spawn changes. 2013-05-24 00:10:39 +01:00
KHobbits
663031349b Improve hidden player matching.
Replace essentials.teleport.hidden with essentials.vanish.interact
Fix perm checks in tpall and tpaall
2013-05-23 22:59:09 +01:00
KHobbits
b9882490ce Fixing feed messages. 2013-05-23 22:12:54 +01:00
KHobbits
0982e5eb02 Improve user matching 2013-05-20 18:50:14 +01:00
KHobbits
3ea71c21fb Don't throw NPE on broken sign state, just allow block to break. 2013-05-19 01:21:21 +01:00
KHobbits
ac665f963a Default chat formatting should strip all format codes, not just colours. 2013-05-19 01:03:54 +01:00
KHobbits
0ea2967ba9 Add indication of when kit's cannot be used yet, in the /kit output. 2013-05-18 23:27:41 +01:00
KHobbits
77b3a82d2a Tidy up /gc's TPS output. 2013-05-18 21:42:02 +01:00
KHobbits
feb0677047 [Feature] Add hunger level to /whois 2013-05-18 18:20:06 +01:00
KHobbits
a5ec8edf6b Fix null when trying to tempban players in console for times longer than max ban. 2013-05-18 17:57:05 +01:00
KHobbits
ed515dc187 Tweak /baltop to not show displaynames on vanished players. 2013-05-12 21:19:54 +01:00
KHobbits
51b9d95afe Tiny listener optimizations. 2013-05-12 20:59:07 +01:00
KHobbits
9d6f93f9a8 Small tweak to warning display and make config variable 'economy-lag-warning' set in ms not ns. 2013-05-12 16:31:40 +01:00
KHobbits
414a3ccf4e Make the lag warning configurable, useful to debug economy lag on larger servers. 2013-05-12 16:10:41 +01:00
KHobbits
02c13e94b3 Throw console warning on slow economy api call. 2013-05-12 04:12:34 +01:00
GunfighterJ
ee8dead2d3 [Fix] Check initial direction when looking for a safe teleport spot 2013-05-10 11:21:39 -05:00
KHobbits
f8a9bf970f Don't treat AFK players as god mode when dealing with food regen. 2013-05-09 17:44:10 +01:00
snowleo
1d7b300a64 Update ItemDb.java 2013-05-08 00:53:37 +03:00
snowleo
7cec2031da Doesn't need this 2013-05-08 00:52:39 +03:00
KHobbits
5b044428b4 [Feature] Withdraw from trade signs without dropping items as overflow. [EXPERIMENTAL] 2013-05-06 23:09:31 +01:00
KHobbits
1691fdb8cf Add some sign debugging to /ess debug to help track down charging issues. 2013-05-05 22:37:28 +01:00
KHobbits
c10c09a6e1 Couple more bits of Eco cleanup 2013-05-05 20:05:28 +01:00
KHobbits
7912541a03 Fix /sell to handle zero priced items again. 2013-05-05 19:59:35 +01:00
snowleo
4269424fe4 Make it compatible with Factions again. 2013-05-05 19:00:21 +03:00
snowleo
390cc4e6e2 Catch both exceptions in EssentialsConf and valueOf instead of new 2013-05-05 11:55:39 +02:00
snowleo
884790f9aa Cleanup 2013-05-05 11:42:53 +02:00
snowleo
d62b37790e ECONOMY MADNESS? THIS IS … FIXED 2013-05-05 11:41:19 +02:00
snowleo
4ff9e3847d fix NPE in teleport code 2013-05-05 11:08:49 +03:00
KHobbits
52dcadb51f Further economy cleanup 2013-05-05 08:03:06 +01:00
KHobbits
a6ad9c9ecd Cleanup player argument matching in loops
Cleanup ess cleanup timestamp matching
2013-05-05 07:15:33 +01:00
KHobbits
4d82264761 Economy Madness 2013-05-05 05:12:17 +01:00
KHobbits
b13fed5d7b Trim stored precision to below that of a double, to prevent rounding issues. 2013-05-05 01:23:07 +01:00
theudis
fb8c4a246a Update messages_fr.properties 2013-05-04 21:56:32 +01:00
KHobbits
9b99d2749b Update CS translation with some extra TL keys from tommymortago 2013-05-04 19:34:55 +01:00
KHobbits
46b84b07bf Sorted TL files 2013-05-04 19:22:44 +01:00
pa001024
3afcdd8734 update zh-locate 2013-05-04 18:32:44 +01:00
Necrodoom
819ae51980 Throw invalid kit message on invalid delay 2013-05-04 18:26:34 +01:00
KHobbits
7646dffc17 cleanup 2013-05-04 18:22:55 +01:00
KHobbits
b66b8f5cc7 [Feature] Make /kit list kit costs if any are set. 2013-05-04 18:11:35 +01:00
KHobbits
af36787daa Merge pull request #465 from skmedix/patch-1
Update Polish translation
2013-05-04 08:55:18 -07:00
KHobbits
64e63763e5 [Permission] Add essentials.repair.all permission, which is required to unlock /repair all
Also make it to /repair defaults to hand.
2013-05-04 16:06:06 +01:00
KHobbits
406927db9b [Fix] Allow Feed to be used via console
Throw events when modifying heath or food levels.
2013-05-04 16:04:59 +01:00
snowleo
5d75308ad1 Remove User instance from Teleport class 2013-05-03 01:53:54 +02:00
snowleo
d4d33043d0 Don't trust File.length() 2013-05-03 01:26:51 +02:00
snowleo
5906a88045 Do not keep hard references to User objects 2013-05-03 01:15:02 +02:00
snowleo
c84756b88d *angry eyes* 2013-05-03 00:25:07 +02:00
snowleo
0f4982f478 Fix cleanup to not hold Users in memory. 2013-05-03 00:12:40 +02:00
Iaccidentally
b66beb47bb Update libs for 1.5.2 :: Minimum CB version now 2763 2013-05-02 11:54:05 -04:00
SKmedix
38d249aa4d Update messages_pl.properties
Changelog:
---
* Added:
kitError2 (216)
kitNotFound (536)
socialSpy (537)
setBal (538)
insufficientFunds (540)

* Fixed:
backUsageMsg (21)
banFormat (28)
bedMissing (30)
connectedPlayers (58)
downloadingGeoIp (91)
fullStack (125)
geoIpUrlEmpty (131)
geoIpUrlInvalid (132)
healOther (148)
itemSpawn (200)
jailReleased (206)
jailSentenceExtended (208)
jailSet (209)
kickedAll (213)
kitInvFull (221)
kitOnce (222)
markMailAsRead (239)
matchingIPAddress (242)
messageTruncated (246)
nickChanged (272)
removed (376)
repairNone (381)
teleportAll (419)
tempBanned (434)
thunderDuration (437)
timeSet (442)
totalWorthAll (446)
totalWorthBlocks (447)
tradeSignEmpty (450)
youAreHealed (520)
youHaveNewMail (521)
balanceOther (527)
2013-04-30 20:34:33 +03:00
Iaccidentally
a5001d15ad Minor cleanup 2013-04-30 12:57:38 -04:00
Iaccidentally
ccc1ca7a04 Fix some tl keys :: update Portuguese translation 2013-04-30 12:26:09 -04:00
Iaccidentally
4892847372 API & misc cleanup 2013-04-30 12:25:25 -04:00
Iaccidentally
fd5cddcadd Merge pull request #460 from main--/2.9
Made the "throws" declaration of getWarps() more specific
2013-04-30 08:30:41 -07:00
KHobbits
6754ffada3 Support /me in console 2013-04-30 02:24:30 +01:00
KHobbits
a32be2310a Allow powertool to be set from console. 2013-04-30 02:18:22 +01:00
KHobbits
f86d26bbec Fix tests. 2013-04-30 01:50:02 +01:00
KHobbits
a72c0b406c Move spawnmob.stack perm check to the right place. 2013-04-30 01:37:39 +01:00
KHobbits
24f26f3d08 [Fix] Stacked mobs count towards spawnmob-limit count. 2013-04-30 01:04:40 +01:00
KHobbits
08b9ebed6f Fix currency rounding up. 2013-04-30 00:35:39 +01:00
KHobbits
800c550277 Fix TL messages. 2013-04-30 00:18:53 +01:00
KHobbits
6616cf1abc Fix Eco take bug and fix NPE 2013-04-30 00:07:28 +01:00
KHobbits
dc7f68feee Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2013-04-29 23:50:49 +01:00
GunfighterJ
daf1e5cee8 Remove ArrayListInput
Formatting
2013-04-29 14:04:59 -05:00
main()
aa0ba6150e Made the "throws" declaration of getWarps() more specific
It is very difficult to handle an Exception thrown by an API method when you don't have any way to **programatically** (without dirty stuff like string comparisons, so the message is not enough) distinguish errors and find out what's going on.
2013-04-29 20:29:42 +02:00
GunfighterJ
e56b24ec10 Add keyword replacements in kits
Add SimpleTextInput constructor for lists
Variable refactoring for clarity.
2013-04-29 06:31:08 -05:00
Iaccidentally
c395d4ea7d cleanup last commit a bit 2013-04-28 17:22:11 -04:00
Iaccidentally
dec6894e5d [API] Add a warp api, with future 3.x support :: minor cleanup 2013-04-28 16:23:45 -04:00
KHobbits
506539c124 Fix ZH TL messages 2013-04-28 14:18:19 +01:00
pa001024
eaa5e65bef Add China/Hong Kong/Taiwan Translations 2013-04-28 14:12:21 +01:00
Iaccidentally
0ff7d3bebd [CHANGE] Rewrite eco command with better logic :: the command will now attempt to do exactly what it is told, with respect to the minimum balance :: fix missing messages 2013-04-27 23:44:23 -04:00
KHobbits
c291f7b7e0 [Fix] Try singular and plural entity names in /remove. 2013-04-28 04:26:39 +01:00
Necrodoom
535e806512 Fix radius in /remove and add world.
Fix SocialSpy
Fix /killall world argument.
2013-04-28 04:20:28 +01:00
Necrodoom
a11a258805 [Feature] Add /socialspy other 2013-04-28 03:44:24 +01:00
KHobbits
7126daf7b6 Update Polish translation by skmedix 2013-04-28 03:31:18 +01:00
Necrodoom
f3264a8457 [Fix] Output proper message if typo'd kit 2013-04-28 03:22:31 +01:00
snowleo
6f459a3acb Update Commandgc.java 2013-04-23 08:57:22 +03:00
snowleo
831b581ea8 Derp, still need currentTime 2013-04-23 08:55:02 +03:00
snowleo
5553ca747c Fix tps after Timer changes 2013-04-23 08:51:25 +03:00
snowleo
a74189777a Allow to forceSave conf files 2013-04-23 00:47:45 +02:00
snowleo
4851ac6830 Delayed write to file (experimental) 2013-04-22 23:31:11 +02:00
U-SFX\wardcg
7e59c349f8 Merge remote-tracking branch 'origin/groupmanager' into 2.9 2013-04-23 01:02:31 +10:00
KHobbits
32e3791b07 Minor TP and timer tweaks. 2013-04-22 00:11:13 +01:00
KHobbits
0f075f8cac Attempt to smooth out timer usage.
Add extra sign metrics.
2013-04-21 23:39:50 +01:00
snowleo
5f1d753bef Restrict EssentialsTimer to 10ms execution time 2013-04-22 01:23:21 +03:00
Iaccidentally
7379cc8bfa [FEATURE] Add kill exempt :: new permission: essentials.kill.exempt
players with essentials.kill.force and console will still be able to override this
2013-04-19 14:40:10 -04:00
Iaccidentally
a3895499b2 Merge pull request #453 from necrodoom/patch-20
[FIX] ID 18, 29, 33 invalid damage values and more
2013-04-19 10:32:47 -07:00
ElgarL
54f09a1098 Merge pull request #452 from evonuts/groupmanager
Minor grammatical changes to config.yml
2013-04-19 09:57:16 -07:00
Necrodoom
dba710e261 [FIX] ID 18, 29, 33 invalid damage values and more
expand IDs 98:1, 98:2, 98:3
2013-04-19 19:43:22 +03:00
GunfighterJ
52a92fc97c Fix NPE on invalid enchant 2013-04-19 10:06:43 -05:00
evonuts
c8cc8eeea7 Minor grammatical changes to config.yml 2013-04-19 12:13:09 +12:00
Iaccidentally
2ab5676e27 [Feature] Add a blacklist for what dispensers can dispense to antibuild 2013-04-16 17:01:01 -04:00
Iaccidentally
32404bb598 [UPDATE] Update to 1.5.1-r0.2 beta build 2013-04-16 16:59:36 -04:00
Iaccidentally
d6a1f348d7 Clean up last commit 2013-04-16 16:16:07 -04:00
Iaccidentally
2536bcd206 [FIX] Update user activity when shooting a bow 2013-04-16 15:58:13 -04:00
GunfighterJ
fe61451fdf Allow permission control of stacked mobs
Adds essentials.spawnmob.stack to allow stacking of more than one mob using the /spawnmob command

Adds https://www.assembla.com/spaces/essentials/tickets/4050
2013-04-14 15:01:25 -05:00
snowleo
854c08c5ca Changing that name too, thanks jomp16 2013-04-14 12:30:30 +03:00
snowleo
881ea12916 Threading Fix 2013-04-14 04:44:16 +03:00
KHobbits
843a0297a1 Remove duplicate perm. 2013-04-13 23:50:17 +01:00
KHobbits
79cbcd6b00 Check threading on backup init. 2013-04-13 23:10:09 +01:00
GunfighterJ
13baa68ec6 Merge pull request #438 from GunfighterJ/2.9
Add Romanian translation
2013-04-08 17:27:16 -07:00
GunfighterJ
7c2ebd8b99 Add Romanian translation 2013-04-06 17:13:59 -05:00
GunfighterJ
0855156ef7 [Feature] pweather command 2013-04-06 16:20:12 -05:00
snowleo
8f0296dcf8 Still need that check 2013-04-06 18:40:42 +03:00
snowleo
a67d8e00f1 Math fail 2013-04-06 18:38:49 +03:00
snowleo
4ca7d404f3 Fix § at end of line 2013-04-06 18:37:13 +03:00
KHobbits
3a989f5110 Balance others message. 2013-04-06 05:54:44 +01:00
KHobbits
5c5ee357aa Fix group name when using wildcard group definitions. 2013-04-06 05:05:28 +01:00
ementalo
c87fb118f1 Remove GB from main build.xml 2013-04-04 20:49:55 +01:00
ementalo
38d5d58d93 [update] Remove GroupBridge 2013-04-04 20:45:09 +01:00
KHobbits
20cf572506 Missing file update. 2013-04-04 08:45:08 +01:00
KHobbits
90fc412a62 Update Bukkit for 1.5.1-R0.1 Beta.
CB: 2735 Bukkit: 1741
2013-04-04 08:39:57 +01:00
Paul A.
a3ef2d298c Merge pull request #435 from GunfighterJ/2.9
[Fix] NPE on ptime from console
2013-04-02 08:31:42 -07:00
GunfighterJ
b887bd4e53 [Fix] NPE on ptime from console 2013-04-02 10:21:20 -05:00
Iaccidentally
05cc2c33bd Merge pull request #431 from GunfighterJ/2.9
Show Geolocation in /seen
2013-04-01 14:20:42 -07:00
GunfighterJ
c20840cc8c Show Geolocation in /seen
Refactor argument for clarity
2013-04-01 16:00:09 -05:00
KHobbits
bb4c213a51 Block sign interact if player is dead. 2013-04-01 05:23:04 +01:00
KHobbits
e84153e7c4 Merge pull request #428 from necrodoom/patch-15
readd "forest" and "jungle"
2013-03-31 08:27:26 -07:00
Necrodoom
9724430856 readd "forest" and "jungle" 2013-03-31 18:26:38 +03:00
KHobbits
6b361b0853 For group overflow, add a little colour. 2013-03-30 02:40:20 +00:00
KHobbits
6882f6d679 Use original casing in config file group name. 2013-03-30 02:36:09 +00:00
Iaccidentally
1792c76a12 [FIX] add itemframe support to remove 2013-03-29 22:20:54 -04:00
KHobbits
247dc769d0 Prevent sign healing when the player is recently dead. 2013-03-29 14:37:30 +00:00
SKmedix
cc5685f88a Update messages_pl.properties
Update Polish translation.
2013-03-29 03:19:43 +00:00
Necrodoom
7831dfd3f5 [Fix] Allow console to afk others 2013-03-29 03:16:18 +00:00
Necrodoom
4aca5bac0b wipe too general log name aliases 2013-03-29 03:13:03 +00:00
Necrodoom
829d03161b [Fix] Sudo allowed on vanished players. 2013-03-29 03:10:45 +00:00
Necrodoom
dcec29080c prevent confusion at /ci code 2013-03-29 03:04:54 +00:00
KHobbits
c1fee4469f Spacing. 2013-03-29 03:01:53 +00:00
KHobbits
596860b1cb Fixing casing and formatting issues in /list 2013-03-29 02:59:55 +00:00
KHobbits
d34bdf0144 Merge pull request #423 from kukelekuuk00/patch-1
[Fix] Strip colourcodes from groups in /list (internal only)
2013-03-28 19:50:50 -07:00
ElgarL
37e985615c another string fix. 2013-03-28 16:08:59 +00:00
ElgarL
1b8edee8f8 More Necrodoom fixes. 2013-03-28 15:38:18 +00:00
ElgarL
a363fbf564 Fix loops. 2013-03-28 13:10:17 +00:00
ElgarL
0ad3baa517 Merge pull request #371 from necrodoom/patch-72
add new commands and others
2013-03-28 05:59:35 -07:00
Luuk Jacobs
2feb7e2d13 [Fix] Strip colourcodes from groups
This way groups with colourcodes in the middle of the name work with /who <groupname> ie. §4S§cerveradmin
2013-03-26 11:43:45 +01:00
Iaccidentally
7a99f3356a Merge pull request #409 from GunfighterJ/2.9
[Feature] Stack more mobs with /spawnmob
2013-03-22 14:39:55 -07:00
GunfighterJ
6f4a2ecd2c [Feature] Stack more mobs with /spawnmob
Uses same syntax, now supports more than 2 mobs
2013-03-22 16:35:01 -05:00
KHobbits
dbcda7ea55 Abort user login code, if user disconnects before it runs. 2013-03-21 22:30:02 +00:00
KHobbits
b8337e9af8 Don't allow an empty list value. 2013-03-21 21:41:30 +00:00
KHobbits
b9b2102f61 Tweak ess version 2013-03-21 21:12:58 +00:00
KHobbits
3f4bea039d Add the max-walk-speed config variable back to the default config file. 2013-03-20 23:24:45 +00:00
SKmedix
d712a59203 Update messages_pl.properties
Update Polish translation.
2013-03-20 08:53:00 +00:00
KHobbits
f94b8581c8 Use correct getPlayer method to not match offline users. 2013-03-20 01:29:54 +00:00
KHobbits
4a506d97df [Permission] essentials.vanish.interact - Players with this permission will be able to interact with hidden players. 2013-03-20 01:00:50 +00:00
KHobbits
27bc766b43 Add some missing hidden checks 2013-03-19 23:24:06 +00:00
KHobbits
56a8812385 Try to unify player matching for hidden users:
kill, lightning and ptime still need cleanup
2013-03-19 23:17:34 +00:00
KHobbits
c3979b1c28 [Fix] Reset walk/fly speed on login.
[Permission] essentials.speed.<fly|walk> - If a player only has one of these, they will only be able to toggle the given state.
2013-03-19 22:55:00 +00:00
KHobbits
76f49e1247 Don't close inventories every plugin disable, just our own. 2013-03-19 21:05:12 +00:00
Necrodoom
8ed7022bf4 [Fix] Print correct sender name on /spawn player from console. 2013-03-19 20:59:02 +00:00
Necrodoom
9a350c5150 Fix exception in /heal, "playernotfound" should be exception. 2013-03-19 20:56:50 +00:00
KHobbits
bc892a4b02 Use original case for default /list groups. 2013-03-19 18:34:28 +00:00
KHobbits
d88ef0eaf0 readmeupdate 2013-03-19 14:32:23 +00:00
Necrodoom
047d73b39f kittycannon should actually fire kittens 2013-03-19 14:31:34 +00:00
Necrodoom
01221ff3b1 console should be able to mute admins 2013-03-19 14:09:30 +00:00
Necrodoom
90d77cc178 [Fix] offline player matching for online only commands.
/kick,/warp, /burn & /tppos should only match online players
2013-03-19 14:07:42 +00:00
KHobbits
020b22070d Pull the default list behavior from the old 'sort-list-by-groups' variable if it exists. 2013-03-19 09:00:50 +00:00
KHobbits
7cb23c1a46 Add Travis notifications 2013-03-18 23:48:01 +00:00
KHobbits
a7fca4b750 Try different ant command 2013-03-18 23:35:00 +00:00
KHobbits
0f707713e0 Travis 2013-03-18 23:27:15 +00:00
KHobbits
2e5d09b04a Merge pull request #396 from GunfighterJ/2.9
Allow potion clear/apply commands to work
2013-03-18 16:20:45 -07:00
KHobbits
fa99942375 Minor code cleanup 2013-03-18 23:15:18 +00:00
KHobbits
ec9ce7f2e8 Cleanup: Run Kukes code through a dryer, add more comments. 2013-03-18 22:43:05 +00:00
GunfighterJ
a3df17dbbb Allow potion clear/apply commands to work 2013-03-18 11:21:28 -05:00
KHobbits
e7663773e9 Edit default config to not cause confusion. 2013-03-18 08:59:40 +00:00
KHobbits
ede618c13a Cleanup: Comment and simplify /list code - More to do. 2013-03-18 08:53:12 +00:00
KHobbits
a640c40157 Cleanup - Split /list into methods 2013-03-18 08:16:34 +00:00
kukelekuuk00
ccbfca864f fixes and addition of '*' to match all unmatched users. 2013-03-18 06:16:02 +00:00
kukelekuuk00
291a33e42c Added /list [group] and some more detailed configuration regarding /list 2013-03-18 06:16:02 +00:00
GunfighterJ
df306fb63d Potion erroring and duration/power fix 2013-03-18 06:14:44 +00:00
Necrodoom
a8d87f94e1 update IDs 27, 28, 66, 157
update rails aliases to match bukkit item names
2013-03-18 06:14:00 +00:00
GunfighterJ
6ee21e16d0 [Fix] Potion erroring and duration/power fix 2013-03-17 13:34:10 -05:00
KHobbits
2b5f21d471 [Fix] Restore /speed command's ability to control walk speed. 2013-03-17 06:38:24 +00:00
KHobbits
e483d61f69 Fixing TL edit error. 2013-03-16 12:17:13 +00:00
Necrodoom
cc5eb28586 Update messages.properties
fix typos in new messages
2013-03-16 12:15:57 +00:00
KHobbits
69cbc926cf Fix raw bukkit itemdb lookup 2013-03-16 12:11:03 +00:00
KHobbits
d1c172f957 Cleanup open inventories 2013-03-16 11:01:56 +00:00
KHobbits
26d674083f Import cleanup 2013-03-16 09:19:30 +00:00
KHobbits
9643eb3b2f Fix potion effect errors 2013-03-16 09:13:21 +00:00
KHobbits
c7564796a9 Fix Minecart class rename
Lets use consistent versions in the code base
Bukkit: 1700 CB: 2648
2013-03-16 08:55:39 +00:00
KHobbits
a2fbbf6f55 We use tabs not spaces for indenting. 2013-03-16 08:43:52 +00:00
KHobbits
a63d93977f Check health is 0 after /suicide 2013-03-16 08:42:24 +00:00
KHobbits
0302b7ca09 Fix missing /ci syntax update. 2013-03-16 08:32:21 +00:00
Alexander Schepp
47941e715f Merge pull request #388 from GunfighterJ/2.9
[Feature] Additional spawnable mob types
2013-03-15 13:44:43 -07:00
GunfighterJ
ee65ee90c5 [Feature] Additional spawnable mob types 2013-03-15 15:41:23 -05:00
Alexander Schepp
b91d1977fc Merge pull request #387 from GunfighterJ/2.9
Initial 1.5 update
2013-03-15 12:59:50 -07:00
GunfighterJ
528e124af2 Initial 1.5 update 2013-03-15 14:54:51 -05:00
Alexander Schepp
5298089197 Merge pull request #342 from necrodoom/patch-60
[feature] update items.csv to minecraft 1.5
2013-03-15 12:25:09 -07:00
KHobbits
d7f9abb5fa Merge pull request #383 from necrodoom/patch-73
[fix] trying to AFK others should work now
2013-03-15 06:28:56 -07:00
KHobbits
8b687d18ee Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2013-03-14 18:01:50 +00:00
Iaccidentally
165b1e50dc Merge pull request #385 from Skylexia/patch-1
[Fix] Fixing message (Tl key).
2013-03-13 17:41:10 -07:00
Skylexia
eeee6f28e9 Fixing message. 2013-03-13 20:23:01 -03:00
KHobbits
e1e487da4d Fix missing console notifications on /unban and /unbanip 2013-03-12 22:26:24 +00:00
Necrodoom
bb74656a96 [fix] trying to AFK others should work now 2013-03-11 15:36:12 +02:00
KHobbits
8bc01910fc Fixing ban ip broadcast notification. 2013-03-11 10:33:59 +00:00
KHobbits
bb01c0bb51 Fix Essentials version display 2013-03-11 02:01:57 +00:00
KHobbits
4c1e9b1762 Fixed lost TL. 2013-03-10 23:43:13 +00:00
Skylexia-PC
68a5f1ba07 Shows IP unbans to online staff. 2013-03-10 23:41:17 +00:00
Necrodoom
67a976d794 readd some checks 2013-03-10 14:42:03 +02:00
KHobbits
43ab68700d Merge pull request #380 from Skylexia/2.9
[Feature] Broadcast unbans to online staff.
2013-03-10 00:38:09 -08:00
Skylexia-PC
a4faa4bca8 Update tl properties to remove unused properties. 2013-03-10 04:37:04 -04:00
Skylexia-PC
58510b964b [Feature] Broadcast unbans to online staff. 2013-03-10 03:22:35 -04:00
KHobbits
db17c3310c Use lower locale. 2013-03-10 02:04:11 +00:00
KHobbits
3399dd5c84 Protect us from npe. 2013-03-10 02:01:59 +00:00
Iaccidentally
dc3a9fa5fb Merge pull request #379 from GunfighterJ/2.9
Allow potion meta to work
2013-03-09 16:46:59 -08:00
GunfighterJ
dc94bd1172 Allow potion meta to work
Instead of denying if they have perms
2013-03-09 18:38:59 -06:00
KHobbits
da558f25d7 Fix TL key casing. 2013-03-09 21:41:30 +00:00
KHobbits
65e883b975 [Fix] Allow /nick to change nickname case, without adding prefix character. 2013-03-09 14:24:19 +00:00
KHobbits
36e1fa22cb [Fix] Move allowunsafe enchant perm to: essentials.enchantments.allowunsafe 2013-03-09 14:02:34 +00:00
KHobbits
9212c5247c [Fix] Move all enchant type perms to: essentials.enchantments.<enchant>
[Fix] Move all potion effect perms to: essentials.potions.<effect>
[Fix] Move multiple potion perm to: essentials.potions.multiple
Other perms: essentials.itemspawn.meta-(firework|firework-multiple|firework-power|name|lore|head|book|chapter|chapter-<chapter>|author|title)
2013-03-09 13:56:38 +00:00
Necrodoom
c1706ea6fb fix alias 2013-03-09 15:12:15 +02:00
KHobbits
2d3ac155b0 Merge pull request #378 from Skylexia/2.9
Fixing exp trading type.
2013-03-08 14:08:08 -08:00
Skylexia-PC
caed9307e4 Fixing exp trading type. 2013-03-08 17:04:54 -05:00
KHobbits
fdb0214049 Allow item/item trades still. 2013-03-08 12:34:11 +00:00
KHobbits
b8b4568153 Merge pull request #370 from necrodoom/patch-71
[fix] EssentialsAntiBuild shouldn't run without Essentials
2013-03-08 04:01:08 -08:00
KHobbits
9f90999b29 Clean up meta error messages.
Add enchant perm checks back.
2013-03-07 03:17:58 +00:00
KHobbits
af56c437e4 Don't check people for meta perms when using kits. 2013-03-07 02:57:25 +00:00
KHobbits
c53d6a0025 Merge pull request #375 from GunfighterJ/patch-15
[Feature] Adds meta permissions
2013-03-06 18:46:55 -08:00
KHobbits
072e2705fe [Fix] Prevent same item type trades on signs, prevents amount confusion scams. 2013-03-07 02:42:47 +00:00
KHobbits
c97114d776 Fix cleanup comparison number base 2013-03-06 23:39:11 +00:00
KHobbits
6dd9d29b51 Add cleanup logging to debug mode. 2013-03-06 22:36:36 +00:00
GunfighterJ
a2e2c63b76 [Feature] Adds meta permissions
TL MetaItemStack.java
Some meta cleanup
Parameter refactor for clarity
Full list of added perms http://goo.gl/do1XL
2013-03-06 15:09:51 -06:00
KHobbits
59dfaa1584 Fix a color code mistake. 2013-03-06 20:46:19 +00:00
KHobbits
0ea7244222 Sort TL files. 2013-03-06 17:44:05 +00:00
Necrodoom
c80e58bed2 add armor aliases since new leather names 2013-03-05 18:56:40 +02:00
KHobbits
f16e9ce450 [Fix] Unify item spawning permissions in /give 2013-03-03 20:33:23 +00:00
Necrodoom
02bb4237a9 add mising isopoverride check 2013-03-03 18:35:05 +02:00
KHobbits
c0172e9fbd Merge pull request #372 from skmedix/patch-21
Update messages_pl.properties
2013-03-02 09:43:35 -08:00
SKmedix
1de6c666f2 Update messages_pl.properties
Update Polish translations.
---
Date: 2.03.13

---
Added "playerBanIpAddress" (27)
2013-03-02 18:41:04 +01:00
KHobbits
911aa65f20 Fix /banip so it compiles, also throw it through a DRYer. 2013-03-02 17:08:22 +00:00
Necrodoom
18c8f26f21 Include IP address when banning IP 2013-03-02 17:08:16 +00:00
Necrodoom
64eaa571a9 add new commands, add alias to listgroups 2013-03-02 10:03:45 +02:00
Necrodoom
e0e383f0f8 Update GroupManagerPermissions.java 2013-03-02 09:56:38 +02:00
Necrodoom
239e149b8d fix clear commands change mandemote and manpromote
dont make manpromote and mandemote act like manuadd when OP, 3 manuadd commands arent needed.
2013-03-02 09:50:31 +02:00
Necrodoom
ee1178e8be messages fix, add /manuclearp and /mangclearp 2013-03-01 20:48:12 +02:00
ementalo
063525311d Remove reference to c3p0 from build.xml 2013-02-28 21:23:33 +00:00
ementalo
12cd5cb898 [Breaking] Remove protect database functionality for protecting signs and rails.
- Removed config entries
- Removed c3p0 lib
2013-02-28 21:02:37 +00:00
Necrodoom
704f8f8725 [fix] essantibuild shouldnt run without essentials 2013-02-28 19:04:05 +02:00
KHobbits
e8beea5114 Merge pull request #369 from TheReverend403/2.9
Fix geoip messages
2013-02-28 05:32:42 -08:00
Lee Watson
49e9c3ca33 Updated ALL local files 2013-02-28 13:23:28 +00:00
KHobbits
db78a5dcb9 Merge pull request #364 from necrodoom/patch-69
deny empty warp name
2013-02-28 04:55:40 -08:00
KHobbits
adcaf6450b Merge pull request #357 from skmedix/patch-20
Update Essentials/src/messages_pl.properties
2013-02-28 04:53:58 -08:00
KHobbits
55a1e40bf2 [Fix] Charging players at wrong point in /spawn 2013-02-28 12:52:22 +00:00
KHobbits
120c14e72b Add extra trade log messages for sign charges. 2013-02-28 03:15:21 +00:00
Necrodoom
4e8160fb7f deny empty warp name 2013-02-26 19:07:10 +02:00
ElgarL
f4733f218a Merge pull request #361 from necrodoom/patch-66
add catches for the last 2 config settings
2013-02-26 08:49:40 -08:00
ElgarL
c1e98e176b Merge pull request #362 from necrodoom/patch-67
fix a few groupmanager.java errors
2013-02-26 06:43:31 -08:00
Necrodoom
d26ab2fd65 change commandblock message 2013-02-26 13:05:45 +02:00
Necrodoom
0f630389aa fix a few groupmanager.java errors 2013-02-26 12:27:05 +02:00
Necrodoom
c727addd93 add catches for the last 2 config settings 2013-02-26 12:17:26 +02:00
Iaccidentally
3525a7e201 This is still needed. 2013-02-25 22:44:52 -05:00
KHobbits
be98b5d915 Revert "[Spawn] Please join me in welcoming EssentialsSpawn to Java 1.6 and modern bukkit.
This reverts commit a403dbabf6.
If you don't understand the code, don't touch it.
2013-02-26 03:30:11 +00:00
Iaccidentally
f007b390e1 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-02-25 22:01:49 -05:00
Iaccidentally
a403dbabf6 [Spawn] Please join me in welcoming EssentialsSpawn to Java 1.6 and modern bukkit. :: http://i.imgur.com/79Izo.jpg 2013-02-25 22:01:06 -05:00
Iaccidentally
80a3e5efb6 Merge pull request #360 from GunfighterJ/patch-15
[Protect] Prevent creepers from breaking paintings if their explosions a...
2013-02-25 18:46:44 -08:00
GunfighterJ
c9cf8acf1a [Protect] Prevent creepers from breaking paintings if their explosions are disabled.
Backport from 3.0
2013-02-25 17:15:20 -06:00
ElgarL
ee2edec13d Show the world a group change is made in when using notify. 2013-02-25 14:11:42 +00:00
ElgarL
09d5026467 Store worldSelection indexed on the senders name rather than the object
(fixes commandblocks using manselect).
2013-02-25 13:49:18 +00:00
ElgarL
083da08092 Only prevent adding nodes with '/manuaddp' and '/mangaddp' if they are
exact matches (not wildcards).
2013-02-25 12:47:23 +00:00
ElgarL
aceea11885 Warn when adding a node where an exception already exist. 2013-02-25 10:46:16 +00:00
ElgarL
aa58ebc63e Don't allow adding a node with '/manuaddp' and '/mangaddp' which is
already negated.
2013-02-25 10:27:01 +00:00
ElgarL
a2dc90ec73 Fix setting of accessLevel on User level permission tests. 2013-02-25 10:11:44 +00:00
SKmedix
b0b02fa4ce Update Essentials/src/messages_pl.properties
Update Polish translations.
---
Date: 24.02.13

---
+ Added "noMatchingPlayers" (509)
+ Added "matchingIPAddress" (510)
+ Added "runningPlayerMatch" (511)
* Fixed "adventure" (8)
* Fixed "antiBuildInteract" (14)
2013-02-24 11:45:56 +01:00
KHobbits
08ff6de4d9 [Feature] Allow IP lookup in /seen command.
[Permission] essentials.seen.ipsearch - allows /seen <ip address>
2013-02-24 03:55:20 +00:00
KHobbits
db7aabfb44 Clarify vanish status a little. 2013-02-23 23:34:31 +00:00
Iaccidentally
bb60b6eb4b Merge pull request #352 from GunfighterJ/patch-15
[Fix] Persist yaw and pitch on teleport
2013-02-23 11:57:15 -08:00
KHobbits
0a0a2cdeb4 Merge pull request #356 from skmedix/patch-19
Update Essentials/src/messages_pl.properties
2013-02-23 05:26:21 -08:00
skmedix
2400977c55 Update Essentials/src/messages_pl.properties
Update Polish translations.
---
Date: 23.02.13
---
* Fixed "fireworkSyntax" (502)
* Fixed colors.
2013-02-23 11:08:47 +01:00
ElgarL
1c599813d4 Merge pull request #355 from necrodoom/patch-63
add "all_unnamed_worlds" info
2013-02-22 12:47:12 -08:00
Necrodoom
7502a5c4c5 fix typo 2013-02-22 20:49:57 +02:00
Necrodoom
b334a29471 add "all_unnamed_worlds" info 2013-02-22 20:48:09 +02:00
ElgarL
966aca4495 Only one error this time Necrodoom :) 2013-02-22 17:21:14 +00:00
ElgarL
f79861e321 Merge pull request #353 from necrodoom/patch-61
various messages fixes - This better work!!!!!!
2013-02-22 09:19:56 -08:00
ElgarL
ffde29a307 Fix global mirroring of non main worlds. 2013-02-22 17:07:55 +00:00
Necrodoom
88410828c3 various messages fixes 2013-02-22 19:07:01 +02:00
GunfighterJ
a61e905f9a [Fix] Persist yaw and pitch on teleport
Vanilla bukkit/MC persists yaw on teleport
2013-02-22 10:56:39 -06:00
ElgarL
17bdef5613 Merge pull request #351 from GunfighterJ/gm-patch-1
Receive was spelt wrong
2013-02-22 05:56:53 -08:00
GunfighterJ
ba3148deab I before E except after C 2013-02-22 07:50:54 -06:00
ElgarL
eef14a6649 Do not list "all_unnamed_worlds" as a selectable world. 2013-02-22 13:17:58 +00:00
ElgarL
65251ade16 Don't try to use the worldHolder before it's initialised. 2013-02-22 12:59:50 +00:00
ElgarL
fcf28e4b84 Added a new mirroring option in the config of 'all_unnamed_worlds'. This
will cause all new or unnamed worlds to use this mirroring.
2013-02-22 12:39:41 +00:00
ElgarL
78c4ca5182 '/manselect' will no longer list duplicate worlds. 2013-02-22 11:46:59 +00:00
KHobbits
42e934eeb2 Merge pull request #350 from skmedix/patch-18
Update Polish TL - Thanks to andrewkm for proofing.
2013-02-22 02:44:03 -08:00
skmedix
a6dd6f16ef Update Essentials/src/messages_pl.properties
Update Polish translations.
---
Date: 21.02.13
---
+ Added "cleaned" (42)
+ Added "cleaned" (43)
2013-02-21 11:03:06 +01:00
GunfighterJ
5016b3ff33 Cache teleport invulnerability time 2013-02-20 13:46:28 +00:00
Chris Ward
352bc08f7f Final! 2013-02-20 12:46:47 +11:00
KHobbits
a1779da986 Readme cleanup. 2013-02-20 01:39:04 +00:00
KHobbits
6cc71b8114 Code cleanup 2013-02-19 23:06:04 +00:00
kukelekuuk00
fd36e064ab Added /essentials cleanup <days> [money] [homes] [bans]
Delete userdata of players offline for over <days> and with less money than [money], less homes than [homes] and less bans than [bans].
2013-02-19 22:43:23 +00:00
Necrodoom
087b413e8c add 1.5 new slab blocks 2013-02-19 19:47:49 +02:00
Necrodoom
5156227f64 update items.csv to minecraft 1.5
dont pull till 1.5 bukkit devbuild
2013-02-19 13:35:29 +02:00
Chris Ward
c6bdb15c69 Merge pull request #341 from necrodoom/patch-59
fix rest of "posion" aliases
2013-02-19 02:26:44 -08:00
Necrodoom
cb555c82a8 fix rest of "posion" aliases 2013-02-19 11:46:26 +02:00
GunfighterJ
443030e5cd Fixes Necrodoom's code Needs more exception 2013-02-18 15:25:09 +00:00
Necrodoom
c5f6b38579 make sure player isnt dead before healing 2013-02-18 15:08:55 +00:00
KHobbits
5fff8e288a Fix socialspy command list. 2013-02-17 18:05:07 +00:00
ElgarL
696aff7c19 Fix Necrodooms code...again! 2013-02-17 17:24:52 +00:00
ElgarL
3fc328f22c Merge pull request #338 from necrodoom/patch-57
if variable is inside ' ', strip them
2013-02-17 09:22:36 -08:00
ElgarL
acccad18f0 Merge pull request #328 from necrodoom/patch-53
delete player command messages, bukkit does it
2013-02-17 09:21:12 -08:00
Necrodoom
32415d2801 if variable is inside ' ', strip them 2013-02-17 19:09:04 +02:00
KHobbits
012cb100a5 Clarify command disabling. 2013-02-17 16:30:05 +00:00
Necrodoom
a02e0de8b0 fix auto afk description 2013-02-17 16:26:18 +00:00
KHobbits
3a546f71b9 Merge pull request #334 from necrodoom/patch-54
add skull alias to head item
2013-02-17 08:17:10 -08:00
Necrodoom
0de9a51aa3 add skull alias to head item 2013-02-17 18:15:48 +02:00
snowleo
3166a62971 why do we even remove the items?
derp
2013-02-17 15:34:49 +01:00
snowleo
f016ca9220 Revert the last 2 commits and actually fix the right one. 2013-02-17 15:17:47 +01:00
snowleo
93b328d8f4 Fix all removeItem()
This could fix some broken logging of selling items
2013-02-17 15:10:41 +01:00
snowleo
eecf32b325 Items can't be reused after the have been used in removeItem 2013-02-17 15:07:32 +01:00
KHobbits
ab49f826d6 Fix a couple of cosmetic errors in /seen 2013-02-17 01:18:50 +00:00
Skylexia
8e9174c304 Fixed colour coding.
Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

Fixed colour coding.

totalWorthAll
totalWorthBlocks
2013-02-16 18:22:25 +00:00
KHobbits
686f331253 Merge pull request #333 from GunfighterJ/patch-12
Adds optional argument to clear both inventory and armor with /clear
2013-02-16 08:40:44 -08:00
GunfighterJ
0a2582ebdc Adds optional argument to clear inventory and armor with /clear 2013-02-15 12:38:41 -06:00
ElgarL
f02ebf245f Catch the error when using an out of date config for
'allow_commandblocks' So it doesn't kill the whole config.
2013-02-15 17:39:34 +00:00
KHobbits
cfe1244774 Merge pull request #331 from kukelekuuk00/2.9
Add methods to UserData and IUser for accessing and writing of data from other plugins.
2013-02-14 03:05:41 -08:00
kukelekuuk00
4079a69864 Add a method to write to the userdata to UserData.java and IUser.java. 2013-02-13 08:24:25 -06:00
Iaccidentally
9613404fbf Merge branch '2.9' of https://github.com/essentials/Essentials.git into 2.9 2013-02-12 18:38:35 -05:00
Iaccidentally
0c72a7ab99 Clean up protect :: transient is not needed :: remove unnecessary returns :: @Override all the things! 2013-02-12 18:37:40 -05:00
KHobbits
1fc719e4c2 Fix /give|/item descriptions for itemmeta. 2013-02-12 22:56:17 +00:00
KHobbits
a095a0bc14 Merge branch '2.9' of github.com:essentials/Essentials into patch-41 2013-02-12 22:46:35 +00:00
Necrodoom
4d463f03ef remove color from bedNull 2013-02-12 22:45:54 +00:00
KHobbits
1bff1ef829 fix typo in messages
add new messages to messages.properties

add new messages to messages_en.properties

add new messages to messages_cs.properties

add new messages to messages_da.properties

add new messages to messages_de.properties

add new messages to messages_es.properties

add new messages to messages_fi.properties

add new messages to messages_fr.properties

add new messages to messages_it.properties

add new messages to messages_nl.properties

add new messages to messages_pl.properties

add new messages to messages_pt.properties

add new messages to messages_se.properties

remove color from bedNull

remove color from bedNull

remove color from bedNull

remove color from bedNull

remove color from bedNull

remove color from bedNull

remove color from bedNull

remove color from bedNull

remove color from bedNull

remove color from bedNull

remove color from bedNull

remove color from bedNull
2013-02-12 22:45:54 +00:00
Necrodoom
3170d926aa change bed spawn set message 2013-02-12 22:43:07 +00:00
Necrodoom
5390a65f15 try improve bed spawn handle
dont act as if bed doesnt exist if its missing
2013-02-12 22:43:06 +00:00
Iaccidentally
416eacf618 Fix build :: This is what happens when you don't use an IDE 2013-02-12 17:42:04 -05:00
Necrodoom
3452319a8b fix typo 2013-02-12 22:26:02 +00:00
KHobbits
3b67b57345 add inventoryclearall message
update messages.properties

update messages_en.properties

update messages_da.properties

update messages_de.properties

update messages_en.properties

update messages_es.properties

update messages_fi.properties

update messages_fr.properties

update messages_it.properties

update messages_nl.properties

update messages_pl.properties

update messages_pt.properties

update messages_se.properties
2013-02-12 22:26:02 +00:00
Skylexia
6f2f6c18c3 Update Essentials/src/config.yml 2013-02-12 17:17:48 -05:00
Skylexia
7e9b85452e Update Essentials/src/plugin.yml 2013-02-12 17:13:08 -05:00
Necrodoom
afcf4a5c98 delete player command messages, bukkit does it 2013-02-12 16:56:54 +02:00
ElgarL
074a88d9aa Merge pull request #327 from necrodoom/patch-52
add missing return false in manudelp
2013-02-12 06:49:27 -08:00
Necrodoom
836a4789d6 add missing return false; 2013-02-12 16:47:39 +02:00
KHobbits
e03951806f Minor entity optimization. 2013-02-11 23:33:30 +00:00
KHobbits
61e2d9eece Attempt to optimize Essentials login event. 2013-02-11 23:11:37 +00:00
KHobbits
370297de10 Merge pull request #325 from Skylexia/patch-2
Fixed all "poison" typos; add ppotato alias.
2013-02-11 15:00:14 -08:00
Skylexia
99553fec7c Update Essentials/src/items.csv 2013-02-11 17:57:20 -05:00
KHobbits
eba2c124be Merge pull request #324 from Skylexia/patch-1
Update Essentials/src/items.csv
2013-02-11 10:41:09 -08:00
Skylexia
b6f80fff59 Update Essentials/src/items.csv 2013-02-11 13:38:11 -05:00
KHobbits
903efa16a7 Merge pull request #322 from necrodoom/patch-50
add dye aliases to match bukkit
2013-02-11 09:22:56 -08:00
Necrodoom
2784c55f59 add dye aliases to match bukkit 2013-02-11 18:56:23 +02:00
KHobbits
fbaaf9183b Merge pull request #321 from GunfighterJ/patch-10
Fix array index out of bounds on /firework fire
2013-02-11 08:41:47 -08:00
GunfighterJ
2e29dabca7 Fix array index out of bounds on /firework fire 2013-02-11 10:35:55 -06:00
ElgarL
ba1cc19453 Merge pull request #298 from necrodoom/patch-37
Fix typo at groupmanager config.yml
2013-02-10 02:12:42 -08:00
Chris Ward
ca117d2c55 Merge pull request #317 from necrodoom/patch-47
update AFK documation
2013-02-10 01:54:37 -08:00
Necrodoom
e16928790b update AFK documation 2013-02-10 11:46:59 +02:00
Chris Ward
6d05a00331 Fix compilation, unreachable code. 2013-02-10 20:37:46 +11:00
Chris Ward
1d7ee07e99 Merge pull request #316 from necrodoom/patch-46
throw exception on banexempt
2013-02-10 01:34:53 -08:00
Necrodoom
b858923d9c throw exception on banexempt
match rest of moderator commands
2013-02-10 11:04:55 +02:00
KHobbits
8baedd173a Fix kit messages when giving kit to another player. 2013-02-10 00:07:40 +00:00
KHobbits
4489801242 missing alias 2013-02-09 23:39:21 +00:00
GunfighterJ
2b08440d68 Proper TL 2013-02-09 16:27:54 -06:00
GunfighterJ
8af3733971 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-02-09 16:27:19 -06:00
KHobbits
3abb849bfe Make /god and /god <player> behave the same. 2013-02-09 19:31:31 +00:00
Chris Ward
ff4bbb99ef Merge remote-tracking branch 'origin/groupmanager' into 2.9 2013-02-09 21:55:20 +11:00
ElgarL
14e836e204 Fix bad Git Merge 2013-02-09 10:51:16 +00:00
Chris Ward
833d7e243e Merge pull request #312 from necrodoom/patch-44
update kit link to the new one
2013-02-09 02:48:48 -08:00
Necrodoom
325c4a8123 update kit link to the new one 2013-02-09 12:47:36 +02:00
Chris Ward
a1873de981 Merge pull request #311 from necrodoom/patch-43
fix itemmeta link on kit section
2013-02-09 02:41:01 -08:00
Necrodoom
1e267a05fd fix itemmeta link on kit section 2013-02-09 11:57:32 +02:00
GunfighterJ
6c6f8208d7 Un-deletes deleted things. 2013-02-08 17:14:46 -06:00
GunfighterJ
ea4c00bc10 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-02-08 16:05:48 -06:00
snowleo
c1a2d4a8d9 Fix /seen command 2013-02-08 22:26:21 +01:00
snowleo
c49b2c5101 Don't overwrite last location on logout
Logout position is saved as logoutlocation now in users yml
2013-02-08 21:22:35 +01:00
snowleo
b5873f28fd Check if player is still online 2013-02-08 21:18:00 +01:00
snowleo
61d53a3347 Fix async access to bukkit code 2013-02-08 21:16:21 +01:00
Chris Ward
28a04d3460 Merge pull request #304 from necrodoom/patch-40
pull messages.properties changes to messages_en
2013-02-06 22:54:27 -08:00
Necrodoom
1a189fbd02 pull messages.properties changes to messages_en 2013-02-06 16:15:18 +02:00
Chris Ward
9746893cf8 Merge pull request #300 from necrodoom/patch-39
add missing puncuation
2013-02-06 02:49:04 -08:00
KHobbits
5bb6775323 Don't block food recovery in god mode. 2013-02-05 23:34:08 +00:00
KHobbits
ac7bae8ccf Merge pull request #302 from GunfighterJ/patch-9
Prevents flying from being disabled on world teleport if player has esse...
2013-02-05 12:07:36 -08:00
GunfighterJ
d633143d80 Prevents flying from being disabled on world teleport if player has essentials.fly 2013-02-05 13:16:27 -06:00
GunfighterJ
9564975840 Adds potion meta
Some cleanup as well
2013-02-05 13:13:19 -06:00
Necrodoom
fe107ae0d4 fix a few errors 2013-02-05 16:45:30 +02:00
Necrodoom
dadae7e528 add missing puncuation
probably needs extra reading though before pulling.
2013-02-05 13:57:27 +02:00
KHobbits
4c1f2e9f5d Merge pull request #297 from necrodoom/patch-36
fix typo at ID 22
2013-02-05 03:26:19 -08:00
Necrodoom
7636cecf43 Fix typo at groupmanager config.yml 2013-02-05 13:13:00 +02:00
Necrodoom
d3bdd44725 fix typo at ID 22 2013-02-05 13:11:36 +02:00
ElgarL
d4c844cedd Revert Necro's change to mancheckw 2013-02-04 13:44:58 +00:00
ElgarL
c4bd07135d Fix Necrodooms errors for not using an IDE!!!!! 2013-02-04 13:33:06 +00:00
ElgarL
1d0003184e Merge pull request #291 from necrodoom/patch-32
display name instead of path for /mancheckw
2013-02-04 05:29:10 -08:00
ElgarL
45f510c534 Merge pull request #290 from necrodoom/patch-30
Derp - revert incorrect modified line
2013-02-04 05:25:10 -08:00
KHobbits
39625f46ab Stylize 'bed' in /home list 2013-02-03 17:30:14 +00:00
Chris Ward
61b59407ac Merge pull request #294 from necrodoom/patch-35
add common cat type name aliases
2013-02-03 05:16:17 -08:00
Necrodoom
4a0a19befd add common cat type name aliases 2013-02-03 15:13:36 +02:00
KHobbits
04ef95e870 We don't need move events if afk interact is disabled. 2013-02-03 05:15:25 +00:00
KHobbits
0d3cf9657b Merge pull request #292 from GunfighterJ/2.9
Adds toggle to disable AFK cancel on interactions
2013-02-02 21:11:43 -08:00
GunfighterJ
d2ff2d32a7 Adds toggle to disable AFK cancel on interactions 2013-02-02 23:06:09 -06:00
KHobbits
24cf09a540 Minor comment updates. 2013-02-03 04:14:23 +00:00
Necrodoom
eec5f557f1 Update EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java 2013-02-01 16:39:18 +02:00
Necrodoom
bf393c952f Update EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java 2013-02-01 16:33:55 +02:00
Necrodoom
d54549456d Update EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java 2013-02-01 16:33:37 +02:00
Necrodoom
74aa0cd582 Update EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java 2013-02-01 16:31:58 +02:00
Necrodoom
0e5b19db3c Derp - revert incorrect modified line 2013-02-01 14:14:46 +02:00
KHobbits
59b689cfc0 Fix missing 'bed' from home list. 2013-02-01 05:26:17 +00:00
KHobbits
cd8ee29ca6 Let Bukkit decide if a bedspawn is valid or not.
Bukkit's bed fix forces minimum bukkit change.
2013-02-01 02:59:40 +00:00
KHobbits
7b475e6ac7 [GM] Catch all of the null. 2013-02-01 02:52:41 +00:00
KHobbits
9c09771845 Make gm API lookup respect offlineperms toggle properly. 2013-02-01 00:01:57 +00:00
KHobbits
8e6ef99ae2 Updating groups example 2013-01-31 21:02:38 +00:00
KHobbits
e23745e03f Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9
Conflicts:
	EssentialsGroupManager/src/Changelog.txt
2013-01-31 20:38:36 +00:00
Iaccidentally
54a106d45f cleanup :: fix build 2013-01-31 14:40:33 -05:00
Iaccidentally
80e2c82399 Refactor name of ScheduleAsyncDelayedTask to RunTaskAsynchronously 2013-01-31 14:16:09 -05:00
Iaccidentally
8aad9a4cb5 Update to 1.4.7 R1 :: remove calls to ScheduleAsyncDelayedTask, as it is deprecated :: cleanup :: WARNING: This commit may or may not be stable 2013-01-31 14:03:27 -05:00
ElgarL
454cc69f60 Fix Necrodooms broken code. 2013-01-30 19:55:38 +00:00
ElgarL
3b8da420b8 Merge pull request #288 from necrodoom/patch-29
config option to allow GM commands in commandblocks
2013-01-30 11:45:27 -08:00
Necrodoom
350b292c00 update changelog 2013-01-30 19:26:46 +02:00
Necrodoom
2508952d59 update commandblock usage deny message 2013-01-30 19:25:35 +02:00
Necrodoom
c632bb54e2 update config description of allow_commmandblocks 2013-01-30 19:14:57 +02:00
Necrodoom
d0e4fe0469 add allow commandblock check 2013-01-30 18:53:40 +02:00
Necrodoom
9902cb4a09 register new config setting 2013-01-30 18:47:19 +02:00
Necrodoom
9484b4f22b update config.yml to include commandblock change 2013-01-30 18:15:58 +02:00
KHobbits
8b9a01169c What is less than less than one. 2013-01-29 23:59:31 +00:00
KHobbits
0849e6e964 Might as well make it all safe. 2013-01-29 23:51:42 +00:00
snowleo
2c49541d04 Don't run calls against bucket api in async login thread 2013-01-30 00:26:50 +01:00
snowleo
3ec9da40cb Update /sell command to newer bukkit api 2013-01-29 20:29:03 +01:00
ElgarL
518feaf8b6 Doh, actually find what world we want to check properly with mancheckw. 2013-01-29 16:56:03 +00:00
ElgarL
a0345bb782 Update plugin.yml with the new command 2013-01-29 16:45:23 +00:00
ElgarL
aec2f08057 grammaaahhhh!!! 2013-01-29 16:35:15 +00:00
ElgarL
30ab3d79a3 Added '/mancheckw <world>' to inspect what permission files a world is
referencing.
2013-01-29 16:33:20 +00:00
ElgarL
a6829f1d09 Missed an S 2013-01-29 16:15:45 +00:00
ElgarL
a6988a26b8 Prevent '*' permissions granting the 'groupmanager.noofflineperm'
permission.
2013-01-29 16:14:24 +00:00
ementalo
d3087cc165 Revert "Merge pull request #286 from GunfighterJ/2.9"
This reverts commit ad48534545, reversing
changes made to f2619a4dde.
2013-01-29 10:25:01 +00:00
Iaccidentally
ad48534545 Merge pull request #286 from GunfighterJ/2.9
Ignore itemmeta on selling
2013-01-28 21:13:41 -08:00
GunfighterJ
3ae56b54b0 Ignore itemmeta on sell 2013-01-28 23:11:43 -06:00
ElgarL
53f01fa328 Add support for BukkitForge using 'overworld' as the main world name. 2013-01-28 04:13:16 +00:00
GunfighterJ
5da8b9fa91 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-27 14:20:59 -06:00
KHobbits
f2619a4dde Minor /ci tweak. 2013-01-27 17:22:43 +00:00
KHobbits
85039162e1 Cleanup /ci addition. 2013-01-27 17:10:07 +00:00
GunfighterJ
b8003c9023 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-27 10:44:13 -06:00
KHobbits
8962ce601b Merge pull request #278 from GunfighterJ/2.9
Adds vanilla syntax for /clearinventory
2013-01-27 08:40:39 -08:00
KHobbits
879466be58 Fix vanish status when switching worlds.
This fixes the potion effect being cleared on world change.
2013-01-27 16:39:50 +00:00
KHobbits
3d38182f76 Add command syntax comment, for clarification.
Merge branch '2.9' of github.com:essentials/Essentials into 2.9
2013-01-27 15:26:46 +00:00
KHobbits
409fc25f9b Don't try and charge a user if we don't have the chat data stored. 2013-01-27 15:26:42 +00:00
Iaccidentally
9ee75c995f Make heal remove fire from players. 2013-01-26 17:16:48 -05:00
Iaccidentally
f7d51e494e Update heal to account for the fact that 20 is not always the max health 2013-01-26 17:12:17 -05:00
GunfighterJ
7bc16a6d7f Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-24 21:16:13 -06:00
KHobbits
588b9f5269 Revert "Prevent replacement of { and } characters in chat.format"
This reverts commit d78a905175.
2013-01-25 03:12:13 +00:00
KHobbits
5db484f726 Try command fallback 2013-01-25 03:06:53 +00:00
KHobbits
fec06105ff Merge pull request #284 from phrstbrn/chat-braces-fix
Prevent replacement of { and } characters in chat.format
2013-01-24 08:53:32 -08:00
Zak Ford
d78a905175 Prevent replacement of { and } characters in chat.format 2013-01-24 11:43:10 -05:00
GunfighterJ
899cb60f06 Update /ci to support vanilla syntax 2013-01-23 16:47:21 -06:00
Chris Ward
d809e13837 Add debug option to XMPP 2013-01-23 19:41:36 +11:00
Chris Ward
ad3f6318fd Remove references to earth2me in plugin.ymls 2013-01-23 02:56:18 +11:00
Chris Ward
a606a088a0 Merge pull request #280 from necrodoom/patch-28
update documation reference in config.yml
2013-01-22 00:13:07 -08:00
Necrodoom
8cf28399f4 Update Essentials/src/config.yml 2013-01-22 09:54:48 +02:00
KHobbits
a823da012c Small patch to allow multiple firework effects to be defined in kits. 2013-01-21 23:38:03 +00:00
KHobbits
98b2c0199d Revert /gc change.
Simplify firework syntax, and add help
Merge branch 'patch-26' of git://github.com/necrodoom/Essentials into 2.9
2013-01-21 20:07:02 +00:00
KHobbits
1219dd31a7 Merge pull request #276 from necrodoom/patch-26
Update Essentials/src/plugin.yml
2013-01-21 06:41:32 -08:00
Necrodoom
3a2b78d160 Update Essentials/src/plugin.yml 2013-01-21 16:40:45 +02:00
Necrodoom
4bcae83c54 Update Essentials/src/messages_en.properties 2013-01-21 16:37:12 +02:00
Necrodoom
a4fa0045af fix message 2013-01-21 16:35:40 +02:00
Necrodoom
29e6944970 try make error message more informative 2013-01-21 16:32:49 +02:00
Necrodoom
8b78774580 Update Essentials/src/plugin.yml 2013-01-21 16:29:26 +02:00
KHobbits
7cc9cd5656 Allow negative exp to be given 2013-01-21 14:15:53 +00:00
KHobbits
150732e520 Fix a couple of param issues. 2013-01-21 13:40:45 +00:00
KHobbits
42901f6d60 Merge pull request #275 from DMarby/patch-1
Update Essentials/src/messages_se.properties
2013-01-20 15:31:34 -08:00
David Marby
4cd4b85ca3 Update Essentials/src/messages_se.properties 2013-01-21 00:26:38 +01:00
KHobbits
7094add569 Show afk warning when pm'ing afk players.
Fix vanished leak on player matching.
2013-01-20 22:05:44 +00:00
KHobbits
d9ab62fe98 Add optional 2nd arg to broadcast format. 2013-01-20 20:58:05 +00:00
KHobbits
3f38677952 Fix book meta error message. 2013-01-20 20:41:15 +00:00
KHobbits
4f46e71b98 Trim long /gc output, add /gc all 2013-01-20 20:35:41 +00:00
KHobbits
67b5b4e06b Fix minor /book bug (Null author) 2013-01-20 20:06:27 +00:00
KHobbits
8f9eebf222 Fix eco take derp. 2013-01-20 19:43:59 +00:00
KHobbits
282be645ae Fix colour syntax message on coloured leather. 2013-01-20 01:44:03 +00:00
KHobbits
d832acc5c9 Minor cleanup on /eco command. 2013-01-20 01:24:09 +00:00
KHobbits
4e6a0435a8 Merge pull request #274 from GunfighterJ/2.9
Cleanup /eco, fix reset broadcast
2013-01-19 17:12:07 -08:00
KHobbits
1ce24d5b4d Cleanup /exp command, and fix vanilla syntax issues.
Needs double checking with commandblocks with vanilla syntax.
2013-01-20 01:10:41 +00:00
GunfighterJ
33cc62a747 Cleanup /eco, fix reset broadcast 2013-01-19 17:58:12 -06:00
KHobbits
39d37ba7f8 Add example firework kit, and cleanup debug messages. 2013-01-19 23:43:40 +00:00
KHobbits
56bc3cc4fa Move firework meta handling into MetaItemStack
Allow firework meta to be applied to item spawning and kit commands.
2013-01-19 23:35:59 +00:00
ElgarL
23710a0c6f Negate 'groupmanager.noofflineperms' by default in the owner group. 2013-01-19 22:22:42 +00:00
KHobbits
7b1e0c1361 Merge pull request #272 from GunfighterJ/2.9
/eco overhaul, adds /eco set
2013-01-19 10:54:11 -08:00
GunfighterJ
22ef464c43 /eco overhaul, adds /eco set 2013-01-19 12:50:35 -06:00
KHobbits
56dcf54c2d Reduce chance of self repeating powertool actions. 2013-01-19 15:19:39 +00:00
Chris Ward
27c8584c11 Merge pull request #271 from necrodoom/patch-25
update /book description
2013-01-19 06:21:47 -08:00
Necrodoom
cd504536ff update /book description 2013-01-19 16:16:35 +02:00
ElgarL
7fc47d357e Negate 'groupmanager.noofflineperms' by default in the owner group. 2013-01-19 12:40:40 +00:00
Chris Ward
bea81c0e7f Touch of cleanup to Gunfighter's addition to exp 2013-01-19 18:22:22 +11:00
GunfighterJ
57480b2c5d Adds vanilla syntax to /exp command 2013-01-18 18:20:05 -06:00
Alexander Schepp
79a81f4365 Fix bug with empty motd 2013-01-18 23:36:59 +01:00
Iaccidentally
085538abd9 Merge pull request #266 from GunfighterJ/2.9
Duplicate alias removed
2013-01-17 17:30:04 -08:00
GunfighterJ
b4dafe5ac9 Duplicate alias removed 2013-01-17 19:27:21 -06:00
snowleo
0b5d87d5dd Merge remote-tracking branch 'origin/groupmanager' into 2.9 2013-01-18 01:01:23 +01:00
Iaccidentally
1530c1957f Merge pull request #265 from GunfighterJ/2.9
Adds essentials.mute.notify
2013-01-17 15:53:37 -08:00
GunfighterJ
8be27fc307 Adds essentials.mute.notify 2013-01-17 17:42:32 -06:00
Iaccidentally
855c0802f1 Merge pull request #263 from GunfighterJ/2.9
Added /firework command
2013-01-17 14:59:01 -08:00
Iaccidentally
ba6ab14b87 Update libs 2013-01-17 14:36:03 -05:00
Iaccidentally
b90c4440fd Update Bukkit to 1.4.7-R0.1 2013-01-17 14:25:19 -05:00
GunfighterJ
cb19a11c47 Now it adds the right firework command 2013-01-16 20:40:29 -06:00
GunfighterJ
d551bba3f6 Adds the actual /firework command 2013-01-16 20:39:09 -06:00
GunfighterJ
86ae21490c Added /firework command 2013-01-16 20:36:33 -06:00
Iaccidentally
f64f929960 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-16 21:23:17 -05:00
KHobbits
d6886f3aa6 Fix null args on /book 2013-01-16 16:56:27 +00:00
KHobbits
0a45568598 Remove logger. 2013-01-16 16:30:30 +00:00
KHobbits
e0328d9173 Remove broken firework meta. 2013-01-15 00:37:08 +00:00
KHobbits
4d0490218b Start work on firework effect - syntax in flux 2013-01-14 23:11:19 +00:00
Iaccidentally
b757d96fd8 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-14 17:25:32 -05:00
KHobbits
631a35dc82 Couple of extra /helpop aliases. 2013-01-14 21:40:25 +00:00
KHobbits
4aca367044 Add colour support to item meta. 2013-01-14 21:34:35 +00:00
KHobbits
d3260dc045 Only show ban reason in the in-game display, not full banFormat. 2013-01-14 11:59:31 +00:00
KHobbits
ad7bde8b02 Better handle initial book.txt creation. 2013-01-14 08:21:03 +00:00
KHobbits
f7a0f21145 Switch book meta, to use 'book.txt', and 'book:<section>'.
Should make things clearer and easier to understand.
2013-01-14 08:14:42 +00:00
KHobbits
19d763f316 Merge remote-tracking branch 'remotes/origin/groupmanager' into 2.9 2013-01-14 07:37:11 +00:00
KHobbits
76b7a8734e All the better to kick you with
(Pipe format for linebreak)
2013-01-14 07:36:45 +00:00
ElgarL
5f5bb2ed8a Fix recursive loop when used on offline servers. 2013-01-14 06:47:50 +00:00
ElgarL
9c36a03028 Update GlobalGroups (removing old permissions) as Towny handles it's own
perms now.
2013-01-14 05:48:48 +00:00
KHobbits
f0c9f5e585 Cleanup /book command. 2013-01-13 23:11:15 +00:00
Iaccidentally
4927c10462 Merge pull request #260 from GunfighterJ/patch-3
Fixes /top command not carrying pitch and yaw
2013-01-13 15:09:05 -08:00
GunfighterJ
6db672b0fc Fixes /top command not carrying pitch and yaw 2013-01-13 17:02:46 -06:00
KHobbits
4d7b24e244 Merge pull request #259 from GunfighterJ/patch-2
Added more book commands for editing author and title
2013-01-13 14:57:35 -08:00
GunfighterJ
ab23f59a3a Merge branch 'patch-2' of https://github.com/GunfighterJ/Essentials into patch-2
Conflicts:
	Essentials/src/com/earth2me/essentials/commands/Commandbook.java
2013-01-13 16:31:29 -06:00
GunfighterJ
d3ca0028cd Added more book arguments for editing author and title amend 2013-01-13 16:19:37 -06:00
KHobbits
055a4a7a81 Cleanup of book meta. 2013-01-13 22:18:08 +00:00
GunfighterJ
df1e4a228b Added more book commands for editing author and title 2013-01-13 15:54:11 -06:00
KHobbits
e9c32c790c Adding support for books made from /einfo 2013-01-13 21:08:24 +00:00
ElgarL
438f4969b0 typo in changelog. 2013-01-13 16:40:53 +00:00
ElgarL
2095c426aa Do not grant any permissions (nort update Bukkit) if the server is in
offline mode and the player has the permission node
'groupmanager.noofflineperms'.
2013-01-13 16:39:53 +00:00
KHobbits
023ca29856 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2013-01-13 16:30:43 +00:00
KHobbits
78d35b72a4 Clean up TextPager 2013-01-13 16:30:22 +00:00
ElgarL
8863bfa6a1 Fix the logger so errors are reported again. 2013-01-13 16:20:38 +00:00
ElgarL
dac89c338a Synchronize pushing to Bukkit perms to prevent any
ConcurrentModificationException.
2013-01-13 16:20:09 +00:00
Chris Ward
3907400b55 Merge pull request #258 from necrodoom/patch-22
update ID 397:3
2013-01-13 05:03:05 -08:00
Necrodoom
ef0c99b439 update ID 397:3 2013-01-13 15:01:10 +02:00
KHobbits
faad7612f0 Add provisional support for basic item Meta
Adds /book command to allow reediting of signed books.
2013-01-13 04:44:28 +00:00
KHobbits
78f8be3a40 Clean up userdata saving, to prevent CMI
Also update config section code to use newer bukkit methods
2013-01-12 19:30:06 +00:00
KHobbits
701d052184 Don't extend ItemStack 2013-01-12 17:05:05 +00:00
KHobbits
67f9142bf4 Pull item meta from itemdb class 2013-01-12 14:12:12 +00:00
Iaccidentally
825611eb07 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-11 12:56:18 -05:00
Iaccidentally
7bd0e35ec5 Merge pull request #251 from necrodoom/patch-19
/me shakes fist at Khobbits
2013-01-11 09:17:44 -08:00
Necrodoom
2d922d233b /me shakes fist at Khobbits
fixes c93fcceade whitespace
2013-01-11 19:10:32 +02:00
Chris Ward
04e80efca6 Merge remote-tracking branch 'origin/groupmanager' into 2.9 2013-01-11 21:59:39 +11:00
Chris Ward
bbb48d8698 Fixes Item Frames being linked to Paintings when breaking 2013-01-11 21:54:52 +11:00
ElgarL
bf48afafb8 Store a plugin and server reference. 2013-01-11 00:53:48 +00:00
KHobbits
13a349795f New permission: essentials.sethome.bed
Players with this permission will force a bed home updating if daytime beds are enabled.
2013-01-10 22:36:38 +00:00
Chris Ward
8722bb84d9 Implement abstract methods 2013-01-10 22:57:08 +11:00
Chris Ward
75bca3832c Update bukkit/craftbukkit libs. Force latest beta version 2013-01-10 22:51:48 +11:00
KHobbits
6de11a23a4 Ban cleanup 2013-01-09 21:31:56 +00:00
KHobbits
32d3b2b7f0 Util commenting 2013-01-09 21:18:46 +00:00
KHobbits
9fdb754d1c Multiline kick messages and tempban countdown. 2013-01-09 21:04:58 +00:00
Chris Ward
8a7866ecca Merge branch 'groupmanager' into 2.9 2013-01-10 04:57:10 +11:00
Joseph
1908054d09 Formatting 2013-01-10 03:25:58 +11:00
GunfighterJ
13f0df501a Add more items to Fireball command. Add delay option to /spawner 2013-01-10 03:25:57 +11:00
Chris Ward
06c3c8597b Merge pull request #247 from necrodoom/patch-18
rewrite ID 43:6, 44:6, 113, 114
2013-01-09 06:50:31 -08:00
Necrodoom
692e4a3315 rewrite ID 43:6, 44:6, 113, 114 2013-01-09 16:46:37 +02:00
ElgarL
767057512a Synchronize the raising of GroupManager events to Bukkit.getServer()
(should prevent deadlocks).
2013-01-09 14:38:00 +00:00
ElgarL
11022e8683 Merge pull request #241 from necrodoom/patch-15
fix typo
2013-01-09 02:50:30 -08:00
ElgarL
cb0b621e87 Remove attachments BEFORE we clear them. 2013-01-09 04:27:10 +00:00
ElgarL
314a4c38e6 code tidy. 2013-01-09 04:13:40 +00:00
ElgarL
0db764f35d Remove attachments before clearing 2013-01-09 04:04:59 +00:00
ElgarL
c091ebbfef Clear our attachment map upon a manload so we correctly reconfigure a
players new permissions.
2013-01-09 03:55:26 +00:00
KHobbits
3fffa343c9 Expand plugin.yml fireball aliases. 2013-01-09 01:00:13 +00:00
KHobbits
9f32d4a3f3 Fire a few extra entities from /fireball 2013-01-09 00:58:29 +00:00
KHobbits
0e93ed8eb6 Add a couple of extra entities to spawnmob 2013-01-09 00:41:24 +00:00
KHobbits
92128459e7 Cleanup 2013-01-08 23:59:31 +00:00
KHobbits
c86f32cca7 Pull and clean up book enchant pullreq.
Removed 1 enchant per book limit, anvils seem to handle multiple enchants fine, even if the result can only be one enchant.
2013-01-08 23:51:46 +00:00
Chasing Code
0955cb296a Add missing import for EnchantmentStorageMeta 2013-01-08 11:46:08 -08:00
Chasing Code
ae0bdfc896 Store enchanments in Enchanted Books
Change enchant command to store the enchantment instead of applying it when used on an Enchanted Book.  If an enchantment is already present, replace it (only one allowed on Enchanted Books).
2013-01-08 11:37:46 -08:00
oggehej
1fbf664f31 Update Swedish translation with new messages. 2013-01-08 19:45:51 +11:00
Chris Ward
3e7e94d992 Store regex, use util method instead of another regex. Store variable 2013-01-08 02:26:09 +11:00
Chris Ward
aac01ea936 Fix multiple enchantments in kits 2013-01-08 02:25:35 +11:00
Chris Ward
69519767b0 Merge pull request #242 from necrodoom/patch-17
update ID 127
2013-01-07 07:00:41 -08:00
Necrodoom
57ff528500 update ID 127 2013-01-07 16:52:51 +02:00
Chris Ward
9574d707b7 Unnecessary RegEx is unnecessary. 2013-01-08 00:08:11 +11:00
KHobbits
588fdb2ad9 Enchantment and item spawning cleanup
Should make it a little easier to add itemmeta.
2013-01-06 18:28:24 +00:00
KHobbits
20624cfc07 Tell user that /mail sendall succeeded when used in console. 2013-01-06 16:27:20 +00:00
Necrodoom
b9140bf1ad fix typo 2013-01-05 19:05:02 +02:00
Necrodoom
c7f4b9d218 update IDs 368, 381, 399, 402 2013-01-05 19:27:56 +11:00
KHobbits
6a80c1cf64 Throw an error if user doesn't have permission to use kit sign. 2013-01-05 07:39:32 +00:00
KHobbits
7e90ebb9c8 More user feedback on enchant sign. 2013-01-05 07:24:02 +00:00
KHobbits
98e1ffcc30 Allow unsafe enchants to be placed by [enchant] signs if enabled in the config file. 2013-01-05 07:05:25 +00:00
KHobbits
5bf4c6e268 Couple of extra enchant aliases 2013-01-05 06:59:37 +00:00
KHobbits
9cebdd1c8b Merge branch 'release' into 2.9 2013-01-04 21:40:02 +00:00
KHobbits
a7e567e309 Fix sign break bug 2013-01-04 13:05:57 +00:00
md_5
9745984904 Might be worth catching other occurances of the event too. 2013-01-04 13:53:01 +11:00
md_5
64c37cd900 ArrayList, I choose you! (Fixes CraftBook erroring when the killall command is used and custom drops are enabled in that plugin) 2013-01-04 13:49:45 +11:00
Alexander Schepp
e2f2c843cb Fix nl translation 2013-01-03 11:50:19 +01:00
Iaccidentally
e032939f7c Update AntiBuild to use HangingBreakByEntityEvent instead of deprecated PaintingBreakByEntityEvent 2013-01-02 18:25:40 -05:00
Iaccidentally
374f7547e4 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-02 18:24:34 -05:00
KHobbits
a2eb53b45a Merge pull request #236 from gravypod/patch-1
Store ingredient map and recipe shape
2013-01-01 15:20:26 -08:00
KHobbits
a1cc1716d6 New permission: essentials.fly.safelogin - Players with this command will automatically switch to fly mode if they login whilst floating in the air. 2013-01-01 22:00:53 +00:00
KHobbits
bdc1f0528a New perm: essentials.vanish.effect - People with this effect will get the potion effect applied while vanished. 2013-01-01 21:12:26 +00:00
KHobbits
2e1ee82c91 Cleanup cleanup. 2013-01-01 19:48:08 +00:00
KHobbits
31f9b4e8f0 More cleanup 2013-01-01 19:34:32 +00:00
KHobbits
c53eccf326 Cleanup 2013-01-01 18:39:23 +00:00
ElgarL
f0d8aec438 Merge pull request #235 from necrodoom/patch-10
fix isOpOverride checks
2012-12-31 07:59:27 -08:00
gravypod
80e6ecb5dd Store ingredient map and recipe shape 2012-12-31 10:44:28 -05:00
Chris Ward
0adb4b99d2 Fix recipe NPE/failed display in game 2013-01-01 02:26:04 +11:00
Necrodoom
0490a1e499 fix isOpOverride checks 2012-12-31 15:35:58 +02:00
KHobbits
d839258961 Don't unregister all listeners. 2012-12-31 12:15:51 +00:00
KHobbits
4cf7107184 Unregister unused events. 2012-12-31 05:44:20 +00:00
KHobbits
2b7d7292d8 Use bukkit api for chat user list 2012-12-31 05:43:05 +00:00
KHobbits
5ccdffc898 Allow unbanning players who do not have valid userdata 2012-12-31 01:08:39 +00:00
KHobbits
fefb346500 Implement event toggle. 2012-12-30 04:32:43 +00:00
KHobbits
8eb99a16c8 Reorganize entity listener 2012-12-30 03:32:32 +00:00
Alexander Schepp
e8b45dba88 Use the right formatter in XMPP 2012-12-30 00:23:04 +01:00
KHobbits
0325e7a340 Hide a few more duplicate enchantments from /enchant 2012-12-29 09:00:42 +00:00
KHobbits
737f355174 Set default tpa timeout to 2 minutes. 2012-12-29 08:40:03 +00:00
KHobbits
8b1b3352d8 Allow unsafe enchantments in /item /give /kit and /enchant
Needs enabled in config file manually.
2012-12-29 08:36:24 +00:00
KHobbits
6370267f62 Make /enchant only show valid enchantments for the item. 2012-12-29 07:58:28 +00:00
KHobbits
253ee53403 Add aliases for new thorns enchantment. 2012-12-29 07:47:07 +00:00
KHobbits
b2a1504722 Ignore self damage in teleport entity protection. 2012-12-29 07:35:26 +00:00
KHobbits
06d3f9f41c Lets clean up the recipe window on player quit, just in case. 2012-12-29 06:55:48 +00:00
KHobbits
f6dd34e980 Fix home functionality bugs:
/home not using bed when enabled
/home not giving teleport warning
2012-12-29 06:43:26 +00:00
KHobbits
3d5ce2868a Update bukkit to 1.4.6-R0.1
bukkit: 1652 cb: 2561
2012-12-29 06:37:52 +00:00
KHobbits
66518f10cd Fix string match error on none existing user (/ban). 2012-12-29 02:00:48 +00:00
Chris Ward
c76b603bec Add SimplyPerms to classpath 2012-12-29 11:26:44 +11:00
Xefir
eb5ebc5f9a Added SimplyPerms Handler 2012-12-29 10:41:15 +11:00
Alexander Schepp
c04f83ce20 Merge pull request #229 from necrodoom/patch-9
fix tempban permission check
2012-12-28 09:37:40 -08:00
Necrodoom
cca19631f8 derp - fix tempban permission check 2012-12-28 19:05:54 +02:00
ElgarL
aa5bdd5b16 Fix missing + from Necrodoom's pull request. 2012-12-28 13:46:22 +00:00
ElgarL
88a1b471a3 Merge pull request #228 from necrodoom/patch-8
Update EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManage...
2012-12-28 05:43:54 -08:00
Iaccidentally
7f15f5a405 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-12-26 09:48:38 -05:00
Chris Ward
67789d7ad2 Revert 340319db4b - Adding permission node to speak, with config option to enable the node 2012-12-27 01:41:32 +11:00
Chris Ward
5b5ce6b15d Add tpdeny message to /tpahere 2012-12-27 01:10:57 +11:00
Iaccidentally
c04e4ccf82 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-12-25 18:12:42 -05:00
Necrodoom
2fd8df3a18 Update EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java 2012-12-25 18:11:10 +02:00
Chris Ward
340319db4b Adding permission node to speak, with config option to enable the node 2012-12-24 01:55:53 +11:00
Chris Ward
c66c5ead66 Move max-tempban-time in config 2012-12-24 01:04:02 +11:00
Chris Ward
a8b312042d Fixing IUser 2012-12-23 21:29:26 +11:00
Chris Ward
ab62d521ab Adding isAfk and setAfk to IUser API 2012-12-23 21:25:29 +11:00
KHobbits
2f2652c786 Make seen status's only show when true. 2012-12-22 03:36:56 +00:00
Chris Ward
3af6db773d Merge pull request #215 from necrodoom/patch-5
update items.csv to minecraft 1.4.6
2012-12-21 04:33:14 -08:00
KHobbits
ccfd85b2a1 Log target plugin in debug mode for altcmd 2012-12-21 06:38:51 +00:00
KHobbits
34292e6fea Final all the things - Recipe 2012-12-21 03:48:54 +00:00
KHobbits
b39ed95844 Fix recipe layout for small shapes 2012-12-21 03:35:48 +00:00
KHobbits
3aff740c62 Swap method order on recipe 2012-12-21 03:21:35 +00:00
KHobbits
f4e28c69f5 Adjust section matching. 2012-12-20 23:37:37 +00:00
KHobbits
73caa8736f Merge pull request #227 from Elvaron/2.9
FallBack for missing config property
2012-12-20 15:36:01 -08:00
Elvaron
df75311ed2 FallBack for missing config property 2012-12-21 00:16:18 +01:00
KHobbits
f1a891aa64 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-12-20 22:58:00 +00:00
KHobbits
b4920d32aa Add support for whitelisting commands in /help by permission: essentials.help.<plugin>.<command> 2012-12-20 22:57:38 +00:00
KHobbits
a231aa6134 Reduce permissions checking when generating /help 2012-12-20 22:54:36 +00:00
KHobbits
6010151a18 Allow certain commands while in jail, but only if the user normally has access to that command. 2012-12-20 22:53:52 +00:00
KHobbits
6f15edef94 Merge pull request #226 from Elvaron/2.9
Made socialspy commands list configurable
2012-12-20 14:16:45 -08:00
Elvaron
ada24bb006 Made socialspy commands list configurable 2012-12-20 23:07:22 +01:00
KHobbits
13c799bd2e Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-12-20 20:37:42 +00:00
KHobbits
d73bbd469a Add a little bit of extra information to /seen, this will show when user is online. 2012-12-20 20:37:04 +00:00
KHobbits
9b56f36819 Warn other party when teleport fails after tpaccept. 2012-12-20 20:24:07 +00:00
KHobbits
8eb0624539 Redundant tpaccept cost check. 2012-12-20 20:23:51 +00:00
KHobbits
a579845728 Fix max tempban length option. 2012-12-20 20:11:45 +00:00
KHobbits
6a1fb49369 Warn other party when teleport fails after tpaccept. 2012-12-20 20:01:43 +00:00
KHobbits
d2320ddc03 Redundant tpaccept cost check. 2012-12-20 19:50:59 +00:00
KHobbits
f7b0b134b5 Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-12-20 17:03:48 +00:00
KHobbits
eabbd393f6 Remove command cost warnings from plugin matching. 2012-12-20 15:51:49 +00:00
Chris Ward
364bb3e90e Fix currency display in MOTD - display currency character, trim decimal places 2012-12-20 15:45:32 +00:00
snowleo
e1743e3e65 Don't use broken CB methods ... 2012-12-20 15:45:22 +00:00
snowleo
22ee57cea9 Don't use broken CB methods ... 2012-12-20 16:07:40 +01:00
Chris Ward
c5513b6b40 Useless import 2012-12-20 23:10:38 +11:00
Chris Ward
a360536e34 Fix currency display in MOTD - display currency character, trim decimal places 2012-12-20 23:07:49 +11:00
md_5
dd55cccb85 Fix nagging for overriden commands. 2012-12-20 09:56:30 +01:00
snowleo
33a4d53a91 Merge branch 'refs/heads/groupmanager' into 2.9 2012-12-20 09:55:26 +01:00
snowleo
be59a299d0 Fix gm builds
Change craftbukkit.jar -> bukkit,jar
2012-12-20 09:36:35 +01:00
md_5
7b8df19dd1 Lets leave numeric homes as is for now, looping through all files on server startup is not the place to do this (reverse-merged from commit 709f206d3d) 2012-12-20 17:24:14 +11:00
md_5
51a700edcf Fix nagging for overriden commands. 2012-12-20 17:11:05 +11:00
Chris Ward
b20e4a6bcb Fix NPE in update (sorry again :P) 2012-12-20 15:45:09 +11:00
Chris Ward
709f206d3d Update home names to prepend "home" to numeric home names 2012-12-20 13:11:05 +11:00
snowleo
67fce78e63 Force people to use latest CB version 2012-12-20 00:46:03 +01:00
snowleo
253da406b7 Fix Spawns / Jail loading 2012-12-20 00:46:03 +01:00
snowleo
7d067977bc Update Inventory Workaround to the latest version
Still bugged in CB: maxAmount of items
2012-12-20 00:46:03 +01:00
snowleo
fddb13c12b Force people to use latest CB version 2012-12-19 23:28:18 +01:00
snowleo
505e7951c6 Fix Spawns / Jail loading 2012-12-19 23:26:29 +01:00
snowleo
3b7a98f942 Update Inventory Workaround to the latest version
Still bugged in CB: maxAmount of items
2012-12-19 22:07:03 +01:00
ElgarL
bd4ce76e18 Update Bukkit to version #2543 (1.4.5-R1.0) To ensure we are all
compatible with current recommended build.
2012-12-19 15:10:37 +00:00
Chris Ward
b6b0ca0296 Fix recipe command 2012-12-20 01:35:55 +11:00
md_5
ef1de40ff4 Simply using the SnakeYaml default (which in turn defaults to Class.forName) appears to be enough to get the classes for our custom configuration. This avoid Bukkit depreciation. 2012-12-19 12:57:05 +00:00
KHobbits
7afcc03c50 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-12-19 12:54:00 +00:00
KHobbits
908beda5db Updating Bukkit to 1.4.5 RB
Bukkit: 1643 CB: 2543
2012-12-19 12:52:05 +00:00
Chris Ward
049f883bba Merge pull request #223 from chrisgward/patch-1
Add /recipe command
2012-12-19 00:28:27 -08:00
md_5
a0bd048501 Simply using the SnakeYaml default (which in turn defaults to Class.forName) appears to be enough to get the classes for our custom configuration. This avoid Bukkit depreciation. 2012-12-19 19:10:02 +11:00
Chris Ward
7a65ecf283 Add /recipe command 2012-12-19 14:57:12 +11:00
KHobbits
765cf4353e Remove CB from EssCore libs. 2012-12-18 22:58:55 +00:00
KHobbits
460439a579 Merge pull request #216 from chrisgward/patch-1
Add tempban limit (with override node)
2012-12-18 02:24:45 -08:00
KHobbits
4120d12380 Fix command costs warnings. 2012-12-17 18:32:42 +00:00
KHobbits
209d7d3c38 Support new skeleton and zombie types.
Also fix baby sheep colours.
2012-12-16 21:39:31 +00:00
KHobbits
55664539f5 Log a few extra metrics. 2012-12-16 21:02:02 +00:00
KHobbits
02e5058030 Merge pull request #217 from necrodoom/patch-7
add "w" alias
2012-12-16 11:07:10 -08:00
Necrodoom
e10f6faade Update Essentials/src/plugin.yml 2012-12-16 18:05:07 +02:00
Necrodoom
d5946ff088 add "w" alias 2012-12-16 18:03:04 +02:00
Chris Ward
26d880e312 Add tempban limit (with override node) and console override to exempt node. 2012-12-17 02:12:38 +11:00
Alexander Schepp
08c6e745cb derp
That's why switch statements are bad.
2012-12-16 13:59:25 +01:00
Alexander Schepp
0c1ac313c8 Fix order of messages 2012-12-16 13:48:02 +01:00
KHobbits
1f209d2883 Update bukkit
Bukkit 1608 CraftBukkit 2488
2012-12-16 12:28:49 +00:00
KHobbits
d8fe7227b9 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-12-16 12:12:23 +00:00
Necrodoom
9255484efd update items.csv to minecraft 1.4.6 2012-12-16 12:52:16 +02:00
Alexander Schepp
e19304c097 Merge pull request #214 from necrodoom/patch-4
change add-prefix-suffix description
2012-12-15 06:17:22 -08:00
snowleo
91f85f30f2 Fix the gap 2012-12-15 14:22:52 +01:00
snowleo
4f493784ce Align /tp syntax with Minecraft /tp command 2012-12-15 14:12:34 +01:00
Necrodoom
c96dd1d491 change add-prefix-suffic description
hopefully will keep newbies from changing it for no reason
2012-12-15 12:58:57 +02:00
Iaccidentally
a8a659117c Merge pull request #210 from Echo4190/patch-1
Update Essentials/src/config.yml
2012-12-11 04:06:10 -08:00
Echo419
b5ba094e61 Update Essentials/src/config.yml
trillions => trillion
english => English
2012-12-11 12:03:21 +00:00
KHobbits
3ae0bd9069 Merge pull request #209 from necrodoom/patch-2
update config.yml to reference wiki more
2012-12-10 09:46:31 -08:00
KHobbits
5a9b795ccf Add missing import. 2012-12-10 17:45:32 +00:00
KHobbits
af7f631b40 Update metrics to r6 2012-12-10 17:43:06 +00:00
KHobbits
64d0cd4e58 Metrics Diff 2012-12-10 17:40:15 +00:00
Necrodoom
6117d831c6 update config.yml to reference wiki more
also changed locale setting to be less confusing
2012-12-10 09:39:22 +02:00
KHobbits
9f0a50b0b6 Delay sending respawn event until we actually try to respawn user. 2012-12-09 17:32:02 +00:00
KHobbits
8bde398762 Revert "Bukkit should have fixed this issue, so we can now get a better first join player experience by teleporting them at once with no delay."
This reverts commit 034d30ec77.

This breaks compatibility with multiverse, and Essentials core.
2012-12-09 17:14:57 +00:00
KHobbits
383583d0b7 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-12-09 17:10:31 +00:00
KHobbits
42fbe9138d Move null bed check to teleport code 2012-12-09 17:10:12 +00:00
md_5
034d30ec77 Bukkit should have fixed this issue, so we can now get a better first join player experience by teleporting them at once with no delay. 2012-12-09 16:03:00 +11:00
KHobbits
f4c3c5e69b Shorten local chat format. 2012-12-08 18:51:18 +00:00
KHobbits
18e393bf89 Some nice friendly messages to help debugging command costs. 2012-12-08 15:51:33 +00:00
KHobbits
db9b97a9a4 Throw error when using /more on full stack 2012-12-07 00:46:13 +00:00
KHobbits
00e9497134 Remove unused variable 2012-12-06 23:27:43 +00:00
KHobbits
b5f9cf185c Make BPerms sign group checking behave similarly to same as GM and PEX 2012-12-06 23:26:48 +00:00
KHobbits
74cf8b036a Merge pull request #208 from kukelekuuk00/2.9
Added a total profit message for /sell all|blocks
2012-12-05 09:14:07 -08:00
kukelekuuk00
d401addebc Added a total profit message for /sell all|blocks 2012-12-05 15:40:17 +01:00
KHobbits
fcb7047cac Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-12-03 09:09:17 +00:00
KHobbits
47cd3c4756 Update afk status on block interact 2012-12-03 09:08:56 +00:00
Iaccidentally
d436d85ab9 Merge pull request #205 from evonuts/patch-1
Spelling/Grammar fixes.
2012-12-01 02:43:20 -08:00
evonuts
faa78d9d31 Spelling/Grammar fixes. 2012-12-01 21:51:24 +13:00
Iaccidentally
089d920a89 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-11-27 14:54:18 -05:00
snowleo
d238d353c9 Add log color removal.
(This could already be done with the bukkit setting "log-strip-color")
2012-11-27 19:54:32 +01:00
KHobbits
37be9811aa Fix kit timers, kit times more than 25 years will be treated as single use. 2012-11-27 18:27:23 +00:00
KHobbits
07f2c67664 Userdata cleanup 2012-11-27 17:47:08 +00:00
KHobbits
6e1933a338 Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-11-27 15:24:34 +00:00
Iaccidentally
9840bf298e Merge pull request #204 from necrodoom/patch-23
fix typo at config.yml
2012-11-25 09:30:13 -08:00
Necrodoom
05f77da3f3 fix typo at config.yml 2012-11-25 15:07:25 +02:00
Iaccidentally
42710e3528 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-11-24 14:55:54 -05:00
KHobbits
41ea758531 Merge pull request #201 from necrodoom/patch-22
fix spacing at disabled-commands
2012-11-20 11:16:00 -08:00
Necrodoom
4e91e51ce8 fix spacing at disabled-commands 2012-11-20 19:38:21 +02:00
ElgarL
9655178d3f Fix recursive error detection when partial mirroring the main world 2012-11-20 14:55:06 +00:00
snowleo
070575bb22 Better fix for last commit 2012-11-19 22:03:25 +01:00
snowleo
d5edf4e3d7 Fix for the plugin conflict with any plugin that contains a log4j library 2012-11-19 20:28:12 +01:00
KHobbits
a7a6bbe040 Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-11-19 14:28:28 +00:00
KHobbits
8eb1a14e5a Add tptoggle others Essentials style. 2012-11-16 01:37:47 +00:00
Iaccidentally
3560160a9e Merge remote-tracking branch 'remotes/origin/release' into 2.9 2012-11-13 22:57:14 -05:00
ElgarL
c4c94a8de0 Update bukkit.jar to #1593 in lib so we can reference the new
interfaces.
2012-11-13 10:17:15 +00:00
Iaccidentally
3d51e29206 Merge pull request #195 from evonuts/2.9
Update fly command to allow for /fly on|*ena*|1 and inversely, /fly off|...
2012-11-11 14:21:18 -08:00
ElgarL
e9757340bf Prevent GM commands from being used on CommandBlocks. 2012-11-11 20:56:07 +00:00
ElgarL
7e8bf6024a Add support for Rcon. 2012-11-11 20:39:03 +00:00
Iaccidentally
f064cf617a update tptoggle to allow toggling other players :: new permission: essentials.tptoggle.others 2012-11-11 14:34:56 -05:00
KHobbits
671b0f0faf Cleanup spawnmob classes
Spawnmob sign nolonger calls Command
Spawnmob other, now spawns at targets feet, rather than where the target is looking
Console can now spawnmob other
2012-11-11 18:55:02 +00:00
Iaccidentally
6e10546405 Merge pull request #197 from necrodoom/patch-21
Update Essentials/src/com/earth2me/essentials/Mob.java
2012-11-11 09:10:33 -08:00
KHobbits
519cff03c6 Mob comment. 2012-11-11 17:04:16 +00:00
Necrodoom
34e8d00b59 Update Essentials/src/com/earth2me/essentials/Mob.java 2012-11-11 18:58:05 +02:00
Iaccidentally
75f90b0aa6 Make playerFishEvent cancel AFK :: fixes #3192 2012-11-11 11:43:10 -05:00
KHobbits
c7ae401dda Merge branch '2.9' of github.com:essentials/Essentials into release 2012-11-11 14:55:00 +00:00
KHobbits
85ee5f27ae Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-11-11 14:54:19 +00:00
KHobbits
49df29ee0a Merge branch '2.9' of github.com:essentials/Essentials into release 2012-11-11 14:53:42 +00:00
Iaccidentally
8143b254d4 Merge pull request #196 from necrodoom/patch-20
update ID 101, by andrewkm request
2012-11-10 09:53:16 -08:00
Necrodoom
8b5eb72469 update ID 101, by andrewkm request 2012-11-10 19:12:25 +02:00
evonuts
4d23fbf6bb Fix fly specific settings for other players (eg. /fly evonuts on) 2012-11-10 22:17:39 +13:00
evonuts
21cacd1c88 Update fly command to allow for /fly on|*ena*|1 and inversely, /fly off|*dis*|0. 2012-11-10 13:40:48 +13:00
ElgarL
5509c87362 Merge pull request #194 from necrodoom/patch-19
correct spaces at plugin.yml
2012-11-09 05:51:52 -08:00
ElgarL
7a62716502 Merge pull request #193 from necrodoom/patch-18
GroupManager typo fix
2012-11-09 05:51:15 -08:00
ElgarL
bd313db135 Merge pull request #190 from necrodoom/patch-16
fix typos and update ingame error message
2012-11-09 05:50:39 -08:00
Necrodoom
28a88b22e7 correct spaces at plugin.yml 2012-11-08 16:35:57 +02:00
Necrodoom
0cae056a69 GroupManager typo fix 2012-11-08 16:31:49 +02:00
KHobbits
503013e9d4 Extra perm check in /home 2012-11-08 11:53:26 +00:00
md_5
e115af5e5d Set a players sleeping ignored status synchronously, just in case! Thanks for the hint mbaxter & Wolvereness. Closes ticket 3179. 2012-11-08 18:57:44 +11:00
Iaccidentally
1507159a8c Merge pull request #192 from evonuts/2.9
Allow for console based gamemode shortcuts. Fixes ticket #3173
2012-11-07 18:39:39 -08:00
evonuts
85c07da45c Allow for console based gamemode shortcuts. Fixes ticket #3173 2012-11-08 15:19:07 +13:00
Iaccidentally
b4d767fdf7 fix build 2012-11-04 19:04:10 -05:00
Iaccidentally
f5b6e09cc4 CB 2455 :: Bukkit 1593 2012-11-04 17:52:35 -05:00
KHobbits
3cc0332b2b Allow the 'userIsNotAway' and 'userIsAway' translation messages to be empty. 2012-11-04 22:41:35 +00:00
Alexander Schepp
a55c30c07e Allow the noNewMail translation to be empty 2012-11-04 22:34:47 +01:00
KHobbits
a92e1ccaaf Code comments. 2012-11-04 21:31:23 +00:00
Iaccidentally
f97f7d6818 allow money to be put in kits using the currency symbol before the amount 2012-11-04 16:25:09 -05:00
KHobbits
b3d47a4427 Use durability instead of itemdata for antibuild checks.
Fixes potion blocking using antibuild.
2012-11-04 18:02:36 +00:00
KHobbits
2ed37211bb Fix godmode pvp protection not blocking thrown pots and arrows. 2012-11-04 17:31:57 +00:00
KHobbits
254dceec0d Fix missing mob target block 2012-11-04 16:45:02 +00:00
KHobbits
dc1947ee61 Fix a few more errors in plugin.yml 2012-11-04 13:29:39 +00:00
KHobbits
fdc6274fdd Fix plugin.yml typo. 2012-11-04 13:16:05 +00:00
KHobbits
e67d3ac682 Code comments 2012-11-04 02:24:54 +00:00
KHobbits
5bea1caa3d Limit tnt disable on /nuke to 10s 2012-11-04 02:18:51 +00:00
md_5
9af653484c Update Spanish translations thanks to nikooo14. 2012-11-03 11:47:39 +11:00
Necrodoom
bb20248474 Update EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java 2012-11-02 18:21:26 +02:00
Alexander Schepp
bb95bd3534 remove all L 2012-10-31 21:30:57 +01:00
Iaccidentally
4ccc8df38a Make /exp accept L before or after the amount, add extra checks 2012-10-31 16:25:13 -04:00
Alexander Schepp
8920d7ad8b Handle int overflow in SetExpFix 2012-10-31 21:06:30 +01:00
Alexander Schepp
1f8ec60028 Use the class, not the interface
This code will be changed later, once Elgarl updates the gm branch to 1.4
2012-10-31 20:06:32 +01:00
Alexander Schepp
e3f32e94da Quickfix to prevent GM commands from being called by BlockCommandSender. 2012-10-31 19:44:13 +01:00
Iaccidentally
3ee16493c8 fix minimum required bukkit version. 2012-10-29 14:26:51 -03:00
Iaccidentally
2ddad0ba21 CB 2420 :: Bukkit 1570 :: Update FakeServer and OfflinePlayer 2012-10-29 13:17:56 -04:00
KHobbits
f904b38afe Merge pull request #185 from evonuts/patch-5
Update Essentials/src/config.yml
2012-10-29 02:21:24 -07:00
evonuts
e6c466f071 Update Essentials/src/config.yml
'flase' typo in wither-spawnexplosion
2012-10-29 22:06:23 +13:00
ementalo
c9ef36abee Fix mail 2012-10-28 20:09:25 +00:00
ementalo
51794d21fb Fix mail 2012-10-28 20:00:15 +00:00
Iaccidentally
c3f6f1e9e7 typo fix 2012-10-28 15:03:45 -03:00
Iaccidentally
e0412800a1 Update Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
2.9 too
2012-10-28 15:01:54 -03:00
Iaccidentally
a9432e6408 nothing to see here, move along (typo fix) 2012-10-28 13:09:19 -04:00
Iaccidentally
06cfbab6ae NOW with complete wither protection! 2012-10-28 13:05:08 -04:00
Iaccidentally
e9fb819d0a oops! :: fix wither spawn explosion blocking 2012-10-28 12:58:01 -04:00
Iaccidentally
73013a19ba Fully support wither blocking in protect 2012-10-28 12:53:12 -04:00
Iaccidentally
0a4955cd79 CB #2415 2012-10-28 12:23:47 -04:00
Iaccidentally
88a543a64f Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-10-28 11:10:17 -04:00
Iaccidentally
b8c63ea816 update tppos to not accept coords over 30000000 2012-10-28 11:09:49 -04:00
Iaccidentally
72d6dd7b27 Merge pull request #184 from necrodoom/patch-15
add bat egg and witch egg
2012-10-28 07:40:52 -07:00
Necrodoom
3bdc578189 add bat egg and witch egg
enderdragon and wither have no useable eggs, so not added
2012-10-28 16:37:23 +02:00
Iaccidentally
31161d7536 Protect updates :: ability to prevent wither damage :: block spawning of new mobs 2012-10-28 09:39:54 -04:00
Iaccidentally
77621e1cbf CB #2406 Bukkit #1568 2012-10-28 09:11:50 -04:00
md-5
b6bb0b87f4 Merge pull request #183 from evonuts/patch-4
Update Essentials/src/config.yml
2012-10-28 03:22:55 -07:00
evonuts
395a8cd7a0 Update Essentials/src/config.yml 2012-10-28 22:37:00 +13:00
md_5
06789ba813 Why the f*** do we depend on Bukkit too? 2012-10-28 20:09:26 +11:00
md-5
ec958e39db Merge pull request #182 from evonuts/patch-3
Update Essentials/src/config.yml
2012-10-28 02:02:24 -07:00
md_5
a2cfb1ff8e No idea why this still refuses to compile locally. Stupid ant. 2012-10-28 20:01:27 +11:00
evonuts
2a3ddf6bf7 Update Essentials/src/config.yml 2012-10-28 21:55:20 +13:00
md-5
77b4042967 Merge pull request #180 from Glyca/2.9
Added, fixed and improved French translations
2012-10-28 01:38:51 -07:00
md-5
3b08636a9b Merge pull request #176 from necrodoom/patch-14
update files to minecraft 1.4
2012-10-28 01:37:22 -07:00
Glyca
271f92cbc7 Added, fixed and improved French translations 2012-10-27 21:47:55 +02:00
Necrodoom
fd3f8941c5 update ID 137 2012-10-27 10:41:50 +03:00
KHobbits
504a82bc37 Merge branch '2.9' of github.com:essentials/Essentials into release 2012-10-26 21:41:49 +01:00
KHobbits
0acaff8a85 Reduce calls to bukkit getPlayer(); 2012-10-26 21:34:36 +01:00
ementalo
7445d44a77 2.9 Release 2012-10-26 09:48:45 +01:00
KHobbits
2dccfdb53c Fix tp delay message 2012-10-23 00:00:55 +01:00
KHobbits
c2cfa8a089 Update EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java 2012-10-22 14:55:52 +02:00
KHobbits
2c52ed361c Update listener comment 2012-10-22 12:27:01 +02:00
Alexander Schepp
2a227a6400 Fix NPE in UserData on login
if no address is available
2012-10-21 23:17:08 +03:00
KHobbits
411a4cc7ee Fix perm check in /kill 2012-10-20 19:24:33 +01:00
KHobbits
5d42895173 If the player is still alive, make sure he dies. (/kill) 2012-10-20 19:18:04 +01:00
KHobbits
84f8ff055f Block explicit /home bed, unless user has "essentials.home.bed" permission.
This does not effect the '/home' command when used with no arguments.
In this case, a player will still be sent to the bed home, if they have no Ess home set.
2012-10-20 16:15:43 +01:00
KHobbits
eb845cc6dd Remove extra home check. 2012-10-20 16:09:54 +01:00
Necrodoom
fff657a380 update mob.java to 1.4 2012-10-20 12:24:18 +03:00
Necrodoom
d589ac37ef update items.csv to 1.4
items.csv version 2.2_01
2012-10-20 12:11:27 +03:00
ementalo
1269ed4b35 Fix test 2012-10-17 13:14:59 +01:00
ementalo
b4e6d55040 CB #2396 B #1566 2012-10-17 13:09:03 +01:00
snowleo
87edb235b5 Don't call plugin manager in Settings. 2012-10-15 20:30:52 +02:00
KHobbits
e4aaa5df1b Merge pull request #174 from necrodoom/patch-13
fix sandstone slab aliases
2012-10-14 09:44:26 -07:00
Necrodoom
f237d83360 fix sandstone slab aliases 2012-10-14 19:40:57 +03:00
KHobbits
a25be26c12 Allow kicking of hidden players 2012-10-14 13:04:00 +01:00
KHobbits
209efb3ac9 Warn when banning a player who has never connected to the server. 2012-10-14 13:03:54 +01:00
Iaccidentally
b446df78e2 Update Essentials/src/items.csv
quick items.csv fix
2012-10-09 05:19:27 -03:00
KHobbits
75c6e3cccf Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-10-07 22:40:18 +01:00
KHobbits
110a70ec01 Add alt warp perm for others 2012-10-07 22:40:04 +01:00
snowleo
23b08e223c Update AntiBuild for NB7.2 2012-10-07 23:00:09 +02:00
snowleo
dc44abbb1d Prevent massive amount of mails being send.
Added new config: mails-per-minute, default 1000
2012-10-07 22:46:15 +02:00
KHobbits
532ecab05e New permission: essentials.vanish.pvp
If you don't have this permission you cannot PVP while vanished.
2012-10-07 18:10:50 +01:00
KHobbits
e130bca4c5 Change default action colour to be different to /say 2012-10-06 22:26:51 +01:00
KHobbits
914a7b5968 Code comments 2012-10-06 03:49:36 +01:00
KHobbits
97544a755f Comment for future sanity. 2012-10-05 02:06:23 +01:00
KHobbits
26bcb84ee3 Fix gamemode other perm check 2012-10-02 21:06:28 +01:00
KHobbits
9a6616b302 Better handle invalid warp names 2012-10-02 00:19:42 +01:00
KHobbits
2e115c73a2 Cleanup sethome 2012-10-01 20:32:10 +01:00
Alexander Schepp
c34167a135 Merge pull request #171 from chrisgward/patch-5
Adding console override to sudo chat
2012-10-01 10:31:48 -07:00
Chris Ward
ccd226f685 Adding console override to sudo chat, changing say to c: 2012-10-02 03:30:13 +10:00
ElgarL
42e4f3f6cb Merge remote-tracking branch 'remotes/origin/2.9' into groupmanager 2012-10-01 17:51:56 +01:00
ElgarL
9a1920a8df Merge branch '2.9' of https://ElgarL@github.com/essentials/Essentials.git into 2.9 2012-10-01 17:50:08 +01:00
ElgarL
38b2687f54 Move Event to LOW so permissions get updated before this event is
triggered.

With LOWEST it would only randomly work with most perm systems,
depending on the loading order.
2012-10-01 17:49:42 +01:00
Alexander Schepp
a3eff95988 Merge pull request #165 from chrisgward/patch-2
Adding say command to sudo to fake chat
2012-10-01 09:34:49 -07:00
Alexander Schepp
33c8e32da1 Merge pull request #166 from chrisgward/patch-3
Blocking numeric home names, changing invalid home message
2012-10-01 09:34:09 -07:00
Chris Ward
7fcc1da283 Blocking numeric home names, changing invalid home message 2012-10-02 02:32:52 +10:00
Chris Ward
eaa92b8c83 Adding -c switch to sudo to fake chat 2012-10-02 02:31:15 +10:00
Alexander Schepp
78f7d069b0 Merge pull request #169 from chrisgward/patch-5
Adding console only overrides to exempts
2012-10-01 09:15:18 -07:00
Alexander Schepp
c576af4d8f Merge pull request #170 from chrisgward/2.9
Fixing storage of compiled regex
2012-10-01 09:12:35 -07:00
Chris Ward
6aad42e35e Fixing storage of compiled regex 2012-10-02 02:11:05 +10:00
Chris Ward
a8575bddef Adding console overrides to exempts 2012-10-02 01:57:29 +10:00
Iaccidentally
e44d0754b5 Merge pull request #164 from chrisgward/patch-1
Fixing bad file names in Windows (Fixes #2924)
2012-10-01 07:16:22 -07:00
Chris Ward
f4b45f5ca0 Fixing bad file names in Windows (Fixes #2924) 2012-10-01 21:20:17 +10:00
ElgarL
eaa3b12c4b allWorldsDataList now returns fully mirrored worlds whihc are not
identical mirrors (fixes the /manselect list).
2012-10-01 12:05:49 +01:00
KHobbits
99bad86db6 Merge pull request #163 from chrisgward/patch-1
Fixes #2933
2012-10-01 03:27:37 -07:00
Chris Ward
8855d2525a Typo (Ticket 2933) 2012-10-01 20:12:13 +10:00
KHobbits
d889059168 Merge pull request #158 from necrodoom/patch-10
update potion aliases- add all unused potions
2012-09-30 13:55:20 -07:00
KHobbits
b6bce5c9d6 Merge pull request #162 from necrodoom/patch-12
small fixes to items.csv
2012-09-30 13:55:09 -07:00
KHobbits
128b48adee Restore removed tp method, it is used in other plugins. 2012-09-30 18:15:46 +01:00
KHobbits
4911b7105c Update Bukkit/CB to 1.3.2 R1
Bukkit: 1546 CB: 2377
2012-09-30 17:33:49 +01:00
Necrodoom
3a95bb27dd small fixes to items.csv 2012-09-30 19:22:14 +03:00
KHobbits
b1e63feeee Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-09-30 17:21:09 +01:00
Necrodoom
b37b165e9d update kit sign permission check 2012-09-30 17:16:03 +01:00
Necrodoom
e91bdf7bd5 update warp sign permission check 2012-09-30 17:15:57 +01:00
KHobbits
480d3f36ad Should fix tpaccept charge bug - needs testing 2012-09-30 17:15:40 +01:00
KHobbits
eed0eddffc New permission: essentials.teleport.timer.move - allow players to move during tp delay 2012-09-29 23:48:59 +01:00
KHobbits
23d99dd977 Little bit DRYer 2012-09-29 23:41:12 +01:00
KHobbits
8f4a48700f Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-29 23:35:09 +01:00
KHobbits
b8b4966e00 Properly handle tphere requests so the right user is in control/charged. 2012-09-29 23:34:46 +01:00
KHobbits
4526a4fe52 Tidy Teleport file 2012-09-29 23:33:32 +01:00
KHobbits
89356b17c2 Merge pull request #161 from necrodoom/patch-11
update signs permission check
2012-09-29 13:52:07 -07:00
Necrodoom
bc1c4b2ce5 update kit sign permission check 2012-09-29 15:57:31 +03:00
Necrodoom
c92b3b6217 update warp sign permission check 2012-09-29 15:55:47 +03:00
KHobbits
83a712826c Should fix tpaccept charge bug - needs testing 2012-09-29 03:59:31 +01:00
KHobbits
781ad92240 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-09-28 23:01:32 +01:00
KHobbits
f88346e75b Add potion effect clearing on /heal - Chris Ward 2012-09-28 20:56:03 +01:00
KHobbits
c369a6ee96 Cleanup of god mode effects, suggested by gravypod. 2012-09-28 20:45:56 +01:00
KHobbits
1799165bd8 God mode cancel potion effects - Chris ward
Revert heal changes.
2012-09-28 20:35:13 +01:00
Necrodoom
a1a9b112b4 update potion aliases- add all unused potions
items.csv version 2.1_13
2012-09-28 17:02:43 +03:00
Paul A.
df528cf431 Fix updating version on items.csv 2012-09-27 16:39:23 +02:00
Paul A.
c64b26b8af Merge pull request #156 from evonuts/patch-1
Minor spelling/grammatical fixes
2012-09-27 05:47:31 -07:00
evonuts
a44edfaa96 Minor spelling/grammatical fixes 2012-09-28 00:42:25 +12:00
Paul A.
31011f638d Merge pull request #154 from necrodoom/patch-9
typo fix in config.yml as found by @Evonuts
2012-09-27 05:22:09 -07:00
Necrodoom
9cabb99784 typo fix in config.yml 2012-09-27 15:19:14 +03:00
KHobbits
758d8f52b5 Remove debug comments. 2012-09-25 22:37:58 +01:00
KHobbits
765e849b0f Handle negated wildcard perms in generic superperms 2012-09-25 22:21:15 +01:00
ElgarL
717b38aad7 Update users.yml to follow new ordering. 2012-09-25 20:41:16 +01:00
ElgarL
15f71ea45d No need for a new array. 2012-09-25 20:39:24 +01:00
ElgarL
25646b55bf Add alphabetically sorted user lists. 2012-09-25 13:23:19 +01:00
KHobbits
50591c8fd8 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-09-25 13:16:41 +01:00
ElgarL
91d83d909f Change order of data in Users.yml to [name, Group, SubGroup,
Permissions, Info nodes].
2012-09-25 13:09:26 +01:00
ElgarL
da89d75fbd Commenting 2012-09-25 11:27:36 +01:00
ElgarL
d208c244aa Fix javadocs 2012-09-25 11:25:19 +01:00
ElgarL
f63cde00fa Minor typo fix - Necrodoom 2012-09-25 11:15:28 +01:00
KHobbits
d8bb7e3ce0 Revert "Clean up imports"
This reverts commit 8d778293cb.
2012-09-24 23:04:33 +01:00
KHobbits
14777ed382 Improve fake sign check. 2012-09-24 23:01:58 +01:00
Paul A.
a3f4637dd6 Merge pull request #151 from gravypod/patch-2
Clean up imports
2012-09-24 14:34:36 -07:00
KHobbits
64f0b63226 Envelope new drop/pickup/craft perms under 'essentials.build'. 2012-09-24 12:48:07 +01:00
KHobbits
2df6ecb8dc Minor cleanup 2012-09-24 03:16:15 +01:00
gravypod
8d778293cb Clean up imports 2012-09-23 22:06:39 -03:00
KHobbits
1a5b160cab Fix and give better sign errors. 2012-09-24 00:19:39 +01:00
KHobbits
7dfacb57ce Less sign checking if certain signs aren't enabled. 2012-09-23 23:51:57 +01:00
KHobbits
37cb387101 config typo. 2012-09-23 23:18:17 +01:00
KHobbits
81344b6d11 Minor colour change 2012-09-23 23:08:35 +01:00
KHobbits
533f67a687 Move wildcard perm check to superperms handler, rather than being PEX specific. 2012-09-23 23:01:14 +01:00
KHobbits
ada750a2b3 Lower reporting level of metrics errors. 2012-09-23 18:08:43 +01:00
KHobbits
0c42e90746 Support new lines in newbie welcome message. 2012-09-22 21:15:04 +01:00
KHobbits
c49aba0ae4 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9
Resolved Conflicts:
	EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
2012-09-22 20:44:45 +01:00
KHobbits
9851b956a7 Cleanup delhome to match normal home cases properly. 2012-09-22 20:43:27 +01:00
ElgarL
6bd41637ba Update warning in GlobalGroups - Necrodoom. 2012-09-22 19:51:38 +01:00
ElgarL
79a25c435f - Fix Synchronization on adding subgroups (thanks snowleo).
- Remove info node support from GlobalGroups. It should not have them
as GlobalGroups are only permission collections.
2012-09-22 19:18:51 +01:00
KHobbits
5e8ecdd6f9 Reset colour code at start of default broadcast msg. 2012-09-22 15:00:00 +01:00
KHobbits
75ea1c3952 General demo txt formatting 2012-09-22 14:44:56 +01:00
KHobbits
61733ad1e5 Clean chat colours. 2012-09-22 14:40:56 +01:00
KHobbits
b35f6bd6fe Clean up the info.txt 2012-09-22 14:36:07 +01:00
KHobbits
49f0e47279 Merge pull request #148 from necrodoom/patch-7
fix info.txt colors and tags
I'll do a little manual cleanup.
2012-09-22 06:21:51 -07:00
KHobbits
0eee367873 Possibly solve info writing issues in globalgroups
Editing this on the ess branch, cause i'm sure there is a better fix.
2012-09-22 04:35:55 +02:00
Necrodoom
cc45cf468f fix info.txt colors and tags 2012-09-21 18:09:30 +03:00
md_5
fbdc7c39d9 Check for explicit * permission when using PEX. 2012-09-21 19:53:20 +10:00
KHobbits
436376898f Update config.yml to show multiple enchantments for kits. 2012-09-21 02:10:39 +01:00
KHobbits
07021b99e2 Make sure we check for wildcards in PEX 2012-09-20 20:36:07 +01:00
KHobbits
49c1fe9627 Switch pex permissions checks to use superperms rather than direct api call. 2012-09-20 20:21:45 +01:00
KHobbits
17a7548ef8 ignoreCancelled events. 2012-09-19 21:07:50 +01:00
KHobbits
019ecfead2 New Permission:
essentials.build.pickup.<id>[:<datavalue>] - Allows collecting of an item
essentials.build.drop.<id>[:<datavalue>] - Allows dropping of an item
2012-09-19 20:57:06 +01:00
KHobbits
f210b324e2 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-19 19:48:14 +01:00
KHobbits
9b21ee55c2 New Permission:
essentials.build.craft.<id>[:<datavalue>] - Allows crafting of an item
2012-09-19 19:47:47 +01:00
md_5
369511fc69 Self indulgent commit. Door should be an alias for wood door. 2012-09-17 21:55:52 +10:00
KHobbits
c93fcceade Hide Protection sign option. 2012-09-17 11:29:16 +01:00
KHobbits
52cc394814 Fix a few minor text formatting issues. 2012-09-16 20:45:33 +01:00
KHobbits
4f31f91519 Config file permissions cleanup
Removed deprecated 'restricted-commands' section.
Deprecated 'superperms' toggle.
Remove op override on essentials permissions.
Give op's all permissions by default via superperms.
2012-09-16 20:27:35 +01:00
KHobbits
bda63e2cbd Merge pull request #146 from necrodoom/patch-6
update dualbit, fix strength, add swift aliases
2012-09-16 08:48:16 -07:00
Necrodoom
7d44484de1 update dualbit, fix strength, add swift aliases
items.csv version 2.1_12
2012-09-16 18:46:46 +03:00
md_5
b1ad781628 Merge remote-tracking branch 'origin/groupmanager' into 2.9 2012-09-16 23:02:56 +10:00
Iaccidentally
eda2e5ae14 Update Essentials/src/plugin.yml
updating SKYNET
2012-09-15 21:07:42 -03:00
KHobbits
58be412fc0 Missing tl key. 2012-09-15 22:06:42 +01:00
KHobbits
4743aaa9af Add server uptime to /gc 2012-09-15 22:04:18 +01:00
KHobbits
f3c9547e2e Add missing TL key
Fixes #1363
2012-09-15 21:16:31 +01:00
KHobbits
6f7c32229b Allow bans on players who have never connected. 2012-09-15 20:57:44 +01:00
KHobbits
64ab6932bf Reduce the enchantment list some more. 2012-09-15 20:29:29 +01:00
KHobbits
bd8ea2194d Fix Essentials /sethome to more strictly obey home limits. 2012-09-15 19:55:12 +01:00
KHobbits
87dbb7433b /ess reset <player> - Clears stored data about a user. 2012-09-14 02:30:24 +01:00
KHobbits
06a9182fd2 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-14 01:11:04 +01:00
KHobbits
443654536f Fixed jail extend message - xGhOsTkiLLeRx 2012-09-14 01:10:22 +01:00
KHobbits
9c528db24c Update Essentials/nbproject/project.properties
Accidentally added unneeded line...
2012-09-14 02:01:02 +02:00
KHobbits
c1af9a6503 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-14 00:59:25 +01:00
KHobbits
dad7f9dfec Don't create empty user files 2012-09-14 00:58:57 +01:00
KHobbits
d41627323f Merge pull request #141 from DerFlash/2.9
Fix problems with async chat event not sending messages to xmpp chat spy
2012-09-13 06:21:11 -07:00
DerFlash
77f7027c50 Fix problems with async chat event not sending messages to xmpp chat spy 2012-09-13 14:57:02 +02:00
KHobbits
2b8be298aa remove users from bperm example, different yml file now. 2012-09-13 01:50:55 +01:00
KHobbits
2d2e6b5e72 Update bpermissions example 2012-09-13 01:46:23 +01:00
ElgarL
c404918bae Remove unused imports. 2012-09-11 11:12:19 +01:00
KHobbits
632e4accfc Couple extra /info aliases. 2012-09-11 05:05:55 +01:00
KHobbits
a48c157eab Less strict matching on /realname 2012-09-11 01:07:31 +01:00
KHobbits
ce55da8a2a Make /realname throw an error if no matches were found 2012-09-11 00:53:32 +01:00
snowleo
dd779ea66a Missing final 2012-09-10 20:53:25 +02:00
snowleo
f07c89803f Thread safety for GM 2012-09-10 20:49:07 +02:00
snowleo
ff18374456 Revert bad synchronization
This reverts commit 9d820c94a6.
2012-09-10 19:06:17 +02:00
ElgarL
b4460f8bac Synchronize the world data holder. 2012-09-10 17:46:01 +01:00
KHobbits
7497d94359 Patch flight disable, to not effect creative mode.
Full world change config still needs coding.
2012-09-10 01:13:30 +01:00
KHobbits
b558ff7bf0 Fixing map/ironore bug. 2012-09-10 01:10:32 +01:00
ElgarL
9d820c94a6 Change to Hashtables to reduce the chance of a
ConcurrentModificationException pulling group/user data in an Async
thread.
2012-09-10 00:15:42 +01:00
KHobbits
b572e4e831 Little bit extra sanity checking. 2012-09-09 20:13:03 +01:00
KHobbits
f7954757ef Move auto afk permission to 'essentials.afk.auto' 2012-09-09 19:09:35 +01:00
KHobbits
09ca7a0919 Fixing locale typo. 2012-09-09 18:35:20 +01:00
KHobbits
698c8d4cc2 Fix Missing TL key 2012-09-09 17:10:26 +01:00
KHobbits
fac24fb832 Change default op colour 2012-09-09 16:55:43 +01:00
KHobbits
49ad851218 More message cleanup 2012-09-09 16:52:45 +01:00
KHobbits
059c1168ac Manual merge necrodoom enchant changes. 2012-09-09 16:29:38 +01:00
KHobbits
f5cf4267da Two sets of enchantment aliases. 2012-09-09 16:27:22 +01:00
KHobbits
a4eae17f11 More message cleanup 2012-09-09 16:15:12 +01:00
KHobbits
0e2d65c28d Missing TL keys 2012-09-09 15:50:22 +01:00
KHobbits
f1225b5187 Few more message tweaks. 2012-09-09 15:27:25 +01:00
KHobbits
82d298ab37 If chat event doesn't resolve to valid player, cancel and exit. 2012-09-09 06:36:14 +01:00
KHobbits
c69683b210 Message cleanup. 2012-09-09 05:41:06 +01:00
KHobbits
020d3824a2 Update some of the example permissions files for the perm changes. 2012-09-08 23:00:57 +01:00
KHobbits
2c21687212 Move the per world permissions:
essentials.world.worldname is moved to essentials.worlds.worldname
2012-09-08 22:50:20 +01:00
KHobbits
256ce9e9e6 Log to console the effects of /sudo 2012-09-08 21:10:26 +01:00
KHobbits
edbac5560d Remove dead setting.
Fixes #2465
2012-09-08 20:41:38 +01:00
KHobbits
46709caabc Move the per kit and warp permissions:
essentials.kit.kitname is moved to essentials.kits.kitname
essentials.warp.warpname is moved to essentials.warps.warpname
2012-09-08 20:32:48 +01:00
KHobbits
7fa6ce1263 Look out for nulls. 2012-09-08 18:41:21 +01:00
KHobbits
d98f96c1df Make /itemdb command list the 15 shortest item.csv names for said item.
This will be useful when making eco signs.
2012-09-08 18:33:06 +01:00
KHobbits
48444a0fa8 Fix /itemdb showing 'uses left' on none held items. 2012-09-08 16:33:00 +01:00
KHobbits
209b6bcea0 Fix compile error. 2012-09-08 16:03:54 +01:00
KHobbits
8d19e48605 Async EssentialsSpawn join event, like the others. 2012-09-08 14:55:37 +01:00
KHobbits
85f12b43a2 New Permission: essentials.god.pvp
Unless you have this permission you will be unable to attack other players while in god mode.
2012-09-08 14:51:03 +01:00
KHobbits
19f54fa030 Give user chance to get display name set before displaying geoip. 2012-09-08 14:40:19 +01:00
KHobbits
315c4ec1f2 Potential fix for teleporting issue. 2012-09-08 14:30:11 +01:00
KHobbits
682cf7ae08 Switch default antibuild status to false. Antibuild toggling shouldn't be an issue with it as a stand alone plugin. 2012-09-08 14:11:12 +01:00
snowleo
8ef5632b7b Fix ConcurrentModification bugs
This will probably slow down any access to config
2012-09-07 18:33:28 +02:00
Iaccidentally
d1b9351b16 Update Essentials/src/com/earth2me/essentials/commands/Commandburn.java
typo fix
2012-09-04 00:16:23 -03:00
KHobbits
7f65879cb6 Catch null eco symbol. 2012-09-02 20:17:28 +01:00
KHobbits
8bc0f29e20 More error on 'Permissions system error' in debug mode. 2012-09-02 18:30:59 +01:00
KHobbits
d3a48f7d92 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-02 18:11:54 +01:00
KHobbits
8ea0525909 Update /kit delay to use updated yaml code. 2012-09-02 18:11:29 +01:00
KHobbits
4ffef28504 Merge pull request #136 from necrodoom/patch-3
update enchants with 3-1 letter aliases
2012-09-02 07:51:29 -07:00
KHobbits
814ec196fc Add support for /gamemode toggle | /gamemode t and /gmt to toggle between the 3 gamemodes. 2012-09-02 06:54:58 +01:00
KHobbits
ff6bb07580 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-02 01:57:10 +01:00
Iaccidentally
d3382cb9fe fix burn matching all players 2012-09-01 16:40:49 -04:00
Necrodoom
48189359e3 update enchants with 3-1 letter aliases 2012-09-01 10:33:20 +03:00
KHobbits
4fbc314f2c Another Config tweak. 2012-08-31 22:31:56 +01:00
KHobbits
9cd396ebf8 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-08-31 22:28:21 +01:00
KHobbits
58b6759556 Config file tweaks 2012-08-31 22:26:26 +01:00
ElgarL
286c5293d8 Include the GM version when logging errors. 2012-08-31 21:56:46 +01:00
ElgarL
2a241041b1 Give a better error when a subgroup is null. 2012-08-31 21:47:35 +01:00
KHobbits
b4d702cc4d Fix powertool command logging. 2012-08-31 18:52:40 +01:00
KHobbits
fb4fd2bfd9 Don't need built in command logger anymore. 2012-08-31 18:44:14 +01:00
KHobbits
6c58f6c482 Sanity Check. 2012-08-31 17:57:57 +01:00
KHobbits
b87e38e24c Add missing repair cost check on /repair hand 2012-08-31 17:54:10 +01:00
KHobbits
789aa7bddb Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-31 17:48:25 +01:00
KHobbits
95e10ca7c8 Reduce the number of permissions checks in command cost lookups
Add support for item number repair costs (repair-123: 120)
Ess charge api supports nested charges.
Slight kit optimization.
2012-08-31 17:48:07 +01:00
KHobbits
9826ac81d7 Merge pull request #134 from necrodoom/patch-16
clear whitespace in globalgroups.yml
2012-08-31 06:48:07 -07:00
Necrodoom
74216d3ec6 clear whitespace in globalgroups.yml 2012-08-31 16:40:25 +03:00
KHobbits
dba2aa1697 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-31 14:09:44 +01:00
KHobbits
ce34912b8a Fix metrics when kits are improperly configured. 2012-08-31 14:09:20 +01:00
Paul A.
dc00fd66c5 Update Essentials/src/config.yml
More grammar from Evonuts
2012-08-31 12:30:40 +02:00
Paul A.
a64947878b Update Essentials/src/config.yml
Grammar update thanks to Evonuts
2012-08-31 11:37:10 +02:00
KHobbits
0d98640b2a Fix painting break in antibuild. 2012-08-31 06:06:33 +01:00
KHobbits
7108e4f52c Fix IllegalStateException in sign click patch
Cleanup
2012-08-31 00:47:53 +01:00
KHobbits
afb90ab147 Fix min bukkit version warning. 2012-08-30 23:28:16 +01:00
KHobbits
702af90b05 Reset fly/speed on world change
This will be optional in a future version - Discuss http://goo.gl/Vuh4N
2012-08-30 23:13:50 +01:00
KHobbits
1619543cbd Update chat formatting to use &r instead of &f 2012-08-30 20:43:33 +01:00
KHobbits
abe63652cc Clear up overriding comments on config file.
Closes #2725
2012-08-30 19:19:03 +01:00
KHobbits
315278841e Merge pull request #133 from necrodoom/patch-15
clarify some things on config
2012-08-30 10:08:38 -07:00
Necrodoom
ecdb0f3235 minor fix 2012-08-30 19:00:53 +03:00
Necrodoom
1eceb6efd6 clarify some things on config 2012-08-30 18:58:43 +03:00
KHobbits
292f89b941 Merge pull request #131 from necrodoom/patch-14
update pork aliases
2012-08-29 08:22:04 -07:00
Necrodoom
1f71a9ce3f update pork aliases
items.csv version 2.1_11
2012-08-29 16:51:38 +03:00
KHobbits
3f9dfc9281 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-08-28 03:12:16 +01:00
KHobbits
fa65eb9e59 Fix CB. 2012-08-28 03:08:06 +01:00
KHobbits
c81ff7dd4d Merge branch '2.9' into release 2012-08-28 03:05:13 +01:00
KHobbits
98489b133a Update CB :: Bukkit 1536 || Craftbukkit 2352 (1.3.2-R0.1) 2012-08-28 03:01:49 +01:00
KHobbits
5a2a4753b4 Merge branch '2.9' of github.com:essentials/Essentials into release 2012-08-28 02:55:02 +01:00
KHobbits
c1f3cf929f If both freeze-afk-players and cancel-afk-on-move is turned on, cancel AFK on player jump. 2012-08-28 02:50:59 +01:00
KHobbits
b6c9126ae8 Disable AFK when player damages entity. 2012-08-28 02:24:01 +01:00
KHobbits
5b55dd1b3d Manually merge Nickshelton80's alias change. 2012-08-28 02:08:58 +01:00
KHobbits
3c67f408db Handle jail teleport locations slightly better. 2012-08-28 02:06:11 +01:00
KHobbits
f2811b3d78 Optimize AntiBuild a little
Support item name deny messages in antibuild.
2012-08-28 01:38:16 +01:00
KHobbits
eb23c943e0 Fix minor typo in plugin.yml
Remove 'essentials.interact' permission from antibuild - Not needed
2012-08-27 23:59:29 +01:00
KHobbits
c7107fc2ee Remove max walk option to config, until its fixed in the client. 2012-08-27 03:09:56 +01:00
KHobbits
4ad5beef26 Missing [player] param syntax on /afk 2012-08-26 20:26:06 +01:00
KHobbits
897c1353e3 Comment out/remove the /speed walk code, until the client properly supports this function. 2012-08-26 19:53:58 +01:00
KHobbits
1b0a794708 New command /speed [walk|fly] <speed> [player]
New permissions:
essentials.speed = access to the command
essentials.speed.others = ability to change the speed of another player
essentials.speed.bypass = override max speed limits in config.yml
New config options:
max-fly-speed
max-walk-speed
2012-08-26 19:35:39 +01:00
KHobbits
45798e2a2b More work on /fly command - Still incomplete
Updated and fixed messages files for missing keys.
2012-08-26 17:16:22 +01:00
KHobbits
5b4516aafb Updated Spanish Translation 2012-08-26 00:36:35 +01:00
KHobbits
95abbb749d Foundation for speed command - not yet implemented. 2012-08-25 19:23:41 +01:00
KHobbits
60c68102c2 Add AntiBuild to Metrics. 2012-08-25 16:57:36 +01:00
KHobbits
d52d392f6f Don't check for loan permission is there is no cost. 2012-08-22 09:12:38 +01:00
KHobbits
a5003feb93 New perm: essentials.kit.exemptdelay
Allows you to exempt from kit delays.
2012-08-22 00:27:33 +01:00
ElgarL
ee22f02289 iacc's anal 2012-08-21 21:28:26 +01:00
KHobbits
6405b63742 Remove debug messages. 2012-08-21 20:45:27 +01:00
KHobbits
b7c1b77a5b New command: /enderchest [player] (alias /endersee and /echest)
This command lets you look inside your or another players enderchest
New Permissions:
essentials.enderchest - Access to the command
essentials.enderchest.others - Lets you look at other enderchests
essentials.enderchest.modify - Lets you modify other enderchests
2012-08-21 20:44:09 +01:00
KHobbits
997846d9e9 Update CB
Bukkit 1533 || Craftbukkit 2345 (1.3.1-R2.1)
2012-08-21 19:56:14 +01:00
KHobbits
392b5dd333 Merge branch '2.9' into release 2012-08-21 19:34:26 +01:00
KHobbits
71708f9d44 Reorder perm check in antibuild 2012-08-20 08:41:22 +01:00
KHobbits
c3d72b7c61 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-19 23:42:05 +01:00
KHobbits
625c6b224e Merge branch 'antibuild' into 2.9 2012-08-19 23:41:28 +01:00
KHobbits
552d2e9674 Reduce permissions checks in antibuild.
Add a little debug logging for those with it enabled.
2012-08-19 21:20:55 +01:00
KHobbits
6173d3cf44 Merge pull request #124 from necrodoom/patch-11
patch ID 322 and update ID 260
2012-08-19 12:52:32 -07:00
KHobbits
b839fbaf34 Correct antibuild perm check
(still need to abort interact/use checks on block place)
2012-08-19 16:08:36 +01:00
KHobbits
d4df6e434c Attempt to add support for metadata permissions. 2012-08-19 15:25:40 +01:00
KHobbits
444ec11dc1 Split Ess protect into EssProtect and EssAntiBuild
New permissions:
essentials.build - same as build: true
essentials.build.interact.<id> - whitelist single interact block
essentials.build.place.<id> - whitelist single place block
essentials.build.break.<id> - whitelist single break block
essentials.build.use.<id> - whitelist single use item
2012-08-19 14:54:58 +01:00
ElgarL
97c8eae84c No more null errors from corrupt config.yml's. 2012-08-19 14:49:16 +01:00
necrodoom
d68b8b1a52 patch ID 322 and update ID 260
items.csv version 2.1_10
2012-08-19 09:50:19 +03:00
KHobbits
fdd185088e Add some command cost debugging messages to /ess debug 2012-08-19 03:38:09 +01:00
KHobbits
fc2fc3c0db Slightly more realistic worth prices. 2012-08-19 02:49:32 +01:00
KHobbits
3408e95797 Tidy the worth file formatting. 2012-08-19 02:25:30 +01:00
KHobbits
c651cc2b6d Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-18 16:10:36 +01:00
Iaccidentally
de7d73a1b6 Merge pull request #123 from necrodoom/patch-9
fix ID 2259, pointed out by tanite
2012-08-18 07:59:16 -07:00
KHobbits
57b5236ba6 Removing EssentialsUpdate from 2.9 branch.
Development may be continued in 3.x branch.
2012-08-18 15:51:55 +01:00
KHobbits
6200505a99 Remove 3.x api migration code.
3.x development was moved to different code branch.
Removing deprecated warnings, since it would be silly to deprecate ALL classes.
2012-08-18 15:48:29 +01:00
KHobbits
d28936bfbe Fix /warp command matching in console. 2012-08-18 15:25:14 +01:00
necrodoom
3dff295dfb fix ID 2259, pointed out by tanite
items.csv version 2.1_09
2012-08-18 10:22:12 +03:00
Iaccidentally
24f9c5cdd9 Merge pull request #122 from necrodoom/patch-8
update IDs: 5,6,17,18 - erase unused and add new
2012-08-15 01:20:40 -07:00
necrodoom
60847f9bbe update IDs: 5,6,17,18 - erase unused and add new
items.csv version 2.1_08
2012-08-15 10:39:34 +03:00
ElgarL
ff26422840 Fix an error with Logging set to 'OFF' triggering a cast exception. 2012-08-14 13:26:02 +01:00
Iaccidentally
83d93d1ced Merge pull request #121 from necrodoom/patch-6
few extra fixes to several ID item name aliases
2012-08-13 01:17:22 -07:00
necrodoom
fc44a55da9 few extra fixes to several IDs
items.csv version 2.1_07
2012-08-13 10:03:39 +03:00
Iaccidentally
21c2744fa1 add spruce/pine tree to items.csv 2012-08-13 01:45:10 -04:00
KHobbits
e2ec73faf2 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-13 02:33:09 +01:00
KHobbits
f5075e6330 Try and prevent 'corrupt' messages files from breaking essentials. 2012-08-13 02:32:45 +01:00
snowleo
73d88fd77e Fix encoding of swedish locale 2012-08-13 01:36:39 +02:00
KHobbits
6f753deb7e Update Essentials/src/items.csv 2012-08-13 01:19:10 +02:00
KHobbits
9870b7fc9b Update Essentials/src/items.csv 2012-08-13 01:15:53 +02:00
KHobbits
8e28f26cbb Merge pull request #115 from necrodoom/patch-3
grammar check on plugin.yml
2012-08-11 18:08:50 -07:00
KHobbits
fc32fe7bd1 Add command name matching to /gamemode
This allows aliases such as /gmc and /creative [player] to be used without stating gamemode as a parameter.
2012-08-12 01:13:52 +01:00
KHobbits
6cc3b9f3d8 Improve player matching in /gamemode
Add extra aliases to /gamemode
2012-08-12 01:12:10 +01:00
Iaccidentally
ff6bc480e8 fix name length check in /kill 2012-08-10 07:17:05 -04:00
Iaccidentally
52a8c95ab4 fix msg and pay to accept 2 character names 2012-08-10 06:54:42 -04:00
KHobbits
193698737f Throw warning when using /kill without valid player. 2012-08-10 02:40:05 +01:00
KHobbits
8988c9488d Add console log message when player is /kicked 2012-08-10 02:35:05 +01:00
KHobbits
b50795f2ca Add console log message when player is /banned 2012-08-10 02:27:10 +01:00
KHobbits
aa60feda2e Fix yaml issue with /kit 2012-08-10 02:26:23 +01:00
KHobbits
be758c9923 Fix Chat Formatting so chat type is shown first. 2012-08-09 13:11:51 +01:00
Iaccidentally
beea995861 Merge pull request #117 from necrodoom/patch-5
items.csv update with ticket #2559 suggestions
2012-08-09 02:07:13 -07:00
necrodoom
f6a5d43f24 items.csv update with ticket #2559 suggestions
items.csv 2.1_06
2012-08-09 10:24:07 +03:00
KHobbits
176e87d9a3 Merge branch 'release' of github.com:essentials/Essentials into release 2012-08-08 23:13:56 +01:00
KHobbits
82f8539761 Merge branch '2.9' into release 2012-08-08 23:13:33 +01:00
KHobbits
02d0f8d4b8 Fix /top so that glass counts as a real block. 2012-08-08 23:00:09 +01:00
KHobbits
e04310b53d Fix tp permissions check to check player typing command not teleportee.
If you don't want players inviting players to other worlds, do not give them essentials.world.<currentworld>
2012-08-08 22:50:54 +01:00
snowleo
c30dac78d6 Merge branch 'refs/heads/2.9' into release 2012-08-08 14:22:13 +02:00
snowleo
0480c992d0 Correct material for beds 2012-08-08 14:21:25 +02:00
snowleo
1f319e351f Merge branch 'refs/heads/2.9' into release 2012-08-08 14:14:42 +02:00
snowleo
0940877036 Fix right click on signs 2012-08-08 14:11:40 +02:00
snowleo
6341bae18a Test the places around the location first, then go up 2012-08-08 13:13:39 +02:00
necrodoom
7ea3ca0d94 sets, not setting 2012-08-08 11:32:21 +03:00
snowleo
641a4b2def Fix teleports on beds 2012-08-08 10:16:06 +02:00
KHobbits
e1fc3bcff1 Merge branch 'release' of github.com:essentials/Essentials into release 2012-08-08 02:11:04 +01:00
KHobbits
addb613768 Merge branch '2.9' into release 2012-08-08 02:10:25 +01:00
KHobbits
2a2d853610 Fix minor Exp discrepancy
Add 'l<level>' syntax to /exp command
EG: /exp set l20
2012-08-08 02:07:47 +01:00
KHobbits
d7abf6781d Fix /day /night /sun and /storm aliases to actually set to the current status if used without parameters.
fixes #2365
2012-08-08 00:52:43 +01:00
KHobbits
8fe5c1ab7f Don't show two error messages on [kit] signs.
Fixes #2508
2012-08-08 00:14:07 +01:00
snowleo
16a0422cc7 Merge branch 'refs/heads/2.9' into release 2012-08-07 21:11:34 +02:00
snowleo
76c04a55c4 Merge branch 'refs/heads/groupmanager' into 2.9 2012-08-07 20:13:27 +02:00
ElgarL
72d98b2f67 Better error report on malformed GlobalGroups. 2012-08-07 17:58:57 +01:00
snowleo
a045e50c8a Merge branch 'refs/heads/2.9' into release 2012-08-07 17:45:40 +02:00
snowleo
a1080e8487 Prevent errors in listeners affecting EssentialsChat 2012-08-07 16:03:39 +02:00
Alexander Schepp
3c87d91186 Merge pull request #114 from necrodoom/patch-2
another extra space
2012-08-07 05:44:23 -07:00
necrodoom
2f995a0233 another extra space 2012-08-07 15:27:25 +03:00
md_5
151490f7b3 Clean up spaces in config. Please don't break this in the future, this is the second fix guys. 2012-08-07 20:39:55 +10:00
Iaccidentally
59b76cc2cd Merge pull request #112 from necrodoom/patch-1
update permissions to include new nodes
2012-08-07 01:34:34 -07:00
necrodoom
a3c7da17f6 update with new workbench node 2012-08-07 11:07:52 +03:00
necrodoom
826e8e0f17 update permissions to include new nodes 2012-08-07 11:04:01 +03:00
KHobbits
5ce1d10896 Merge branch '2.9' of github.com:essentials/Essentials into release 2012-08-07 08:55:35 +01:00
KHobbits
3d349306ae Fix CB. 2012-08-07 08:52:57 +01:00
KHobbits
39777235c1 Merge branch '2.9' into release 2012-08-07 08:50:06 +01:00
KHobbits
41baef87e8 Updating CB:
CB: 2317 Bukkit 1521
2012-08-07 08:49:09 +01:00
KHobbits
85a7648f62 Merge branch '2.9' of github.com:essentials/Essentials into release 2012-08-07 08:45:16 +01:00
snowleo
e2d8846b91 Merge branch 'refs/heads/groupmanager' into 2.9 2012-08-06 18:25:55 +02:00
ElgarL
bedc95d69b Fix GlobalGroups not loading permission nodes. 2012-08-06 17:15:56 +01:00
snowleo
1603a3adad Just don't use nio, this might be slower. 2012-08-06 15:57:54 +02:00
Iaccidentally
266453e2fb update gc for all worlds (thanks to Yofel) 2012-08-06 06:54:55 -04:00
KHobbits
ef73ea3d99 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-08-06 09:17:19 +01:00
ElgarL
18f4158616 Ignore stupid plugins which add empty permission nodes. 2012-08-06 07:05:20 +01:00
KHobbits
ba9971e874 Don't bomb if userMap isn't initialized. 2012-08-06 02:44:01 +01:00
KHobbits
a440e153c1 New Sign: Info
Syntax: [info] / [chapter] / [page number] / [cost]
2012-08-06 00:58:35 +01:00
KHobbits
789bc2b73b New Sign: Repair
Syntax: [repair] / <hand|all> / [cost]
2012-08-06 00:33:29 +01:00
KHobbits
0cc72ea0f8 New command: /workbench (aliases /wb and /wbench)
Permission: essentials.workbench
2012-08-06 00:26:42 +01:00
KHobbits
d0d2798a1b Default value for [gamemode] sign
New syntax: [gamemode] / <mode>  / [price]
2012-08-06 00:23:47 +01:00
snowleo
260896cea5 I should read javadoc properly. 2012-08-06 00:55:25 +02:00
snowleo
a1197bc9c7 Move FileChannel inside the loop 2012-08-05 20:16:53 +02:00
snowleo
f5d2c335d8 Throw exception after 5 attempts 2012-08-05 19:50:37 +02:00
snowleo
248b8696e5 Try to fix interrupt problem. 2012-08-05 19:41:28 +02:00
Alexander Schepp
8c885e1002 Fix /gamemode 2 playername 2012-08-04 14:17:41 +03:00
Iaccidentally
ba9185689f i'm in ur config, fixxn ur grammer 2012-08-04 06:56:10 -04:00
Iaccidentally
4a29def494 I am a grammar nazi. 2012-08-04 07:40:54 -03:00
snowleo
b4d850a7e3 More thread safety 2012-08-04 11:10:57 +02:00
snowleo
050f80c52a Thread safety for XMPP 2012-08-04 10:48:56 +02:00
ementalo
55b083ddbf CB #2289 Bukkit #1512
Change PlayerChatEvent to AsyncPlayerChatEvent
2012-08-04 09:25:54 +01:00
snowleo
9bc6ece81e Make chat handling more thread safe (and also faster) 2012-08-03 22:57:29 +02:00
snowleo
5b3993b190 Synchronized chatStore 2012-08-03 21:45:32 +02:00
ElgarL
0b0c3f99e9 Fix mirroring now we are not using any Bukkit methods. 2012-08-03 11:15:14 +01:00
ElgarL
9924703426 Stop using the YamlConfiguration in bukkit for our config handling. We
can now support periods in world names.
2012-08-03 10:36:26 +01:00
snowleo
18ec08ad54 Ignore case on /gm command 2012-08-03 10:41:23 +02:00
snowleo
feecde52de Code cleanup 2012-08-03 10:39:45 +02:00
snowleo
04ec9dea13 Ignore case on gamemode signs and code cleanup 2012-08-03 10:36:50 +02:00
snowleo
b0552420cf Less loops please 2012-08-03 10:33:45 +02:00
snowleo
fb1b76be80 Another fix for /exp 2012-08-03 10:29:22 +02:00
snowleo
30a2b1127c New exp calculations. 2012-08-03 10:21:03 +02:00
snowleo
54221a0094 Fix broken output of /itemdb 2012-08-03 10:02:47 +02:00
ElgarL
c7907fcb59 Fix a cases sensitivity bug in world loading. 2012-08-03 08:54:06 +01:00
snowleo
32362f33c1 Netbeans 7.2 changes 2012-08-03 09:45:44 +02:00
Iaccidentally
e208f9198b Merge branch '2.9' of https://github.com/essentials/Essentials 2012-08-02 20:30:09 -04:00
Iaccidentally
2f4a009a9c update 2.9 item.csv for 1.3 (changes by necrodoom) 2012-08-02 20:29:09 -04:00
ementalo
95d453194a Switching the syntax of gamemode /gm mode player and adding mode aliases
Fixing translation keys
Fix plugin.yml gamemode syntax
2012-08-02 17:43:58 +01:00
ementalo
cd9f0bf18d CB #2267 Bukkit #1505
Updates to gamemode command, mode is now mandatory [creative|survival|adventure]
Updates to gamemode sign, now requires another line with gamemode
2012-08-02 13:52:11 +01:00
Paul A.
fd3d52f324 Check the player we are bringing has permission to enter the world vs the initiating user the final frontier 2012-08-01 16:04:13 +02:00
Paul A.
519f8a7f88 re: re: Check the player we are bringing has permission to enter the world vs the initiating user 2012-08-01 15:56:58 +02:00
Paul A.
d85049439a Check the player we are bringing has permission to enter the world vs the initiating user part 4 2012-08-01 15:55:04 +02:00
Paul A.
e827da32a6 Check the player we are bringing has permission to enter the world vs the initiating user 2012-08-01 15:53:30 +02:00
Paul A.
75ba88d396 Check the player we are bringing has permission to enter the world vs the initiating user 2012-08-01 15:52:55 +02:00
Paul A.
ecb72bfb6a Check the player we are bringing has permission to enter the world vs the initiating user 2012-08-01 15:50:28 +02:00
Alexander Schepp
c630e8cbe0 Fix "x times" on signs. 2012-07-31 13:13:18 +03:00
Iaccidentally
56109eee5c Merge branch '2.9' of https://github.com/essentials/Essentials 2012-07-29 14:23:36 -04:00
Iaccidentally
136d60e1f5 KeepXp fixed. 2012-07-29 14:20:09 -04:00
KHobbits
f3a2b2772e Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-07-29 17:16:10 +01:00
KHobbits
14fadd2e98 Recommit Keep Exp on death permission
Permission: essentials.keepxp
Code by Iaccidentially.
2012-07-29 17:15:44 +01:00
Alexander Schepp
310786f0fe Prevent that Essentials breaks other plugins signs 2012-07-28 00:26:04 +03:00
KHobbits
ad2387ff5b Revert optimization, doesn't find glass blocks. 2012-07-17 21:05:13 +01:00
KHobbits
88842ae82b Add small optimization tweak to new safe block function. 2012-07-17 01:28:20 +01:00
KHobbits
f511465a34 Remove debugging messages. 2012-07-17 00:47:23 +01:00
KHobbits
dc61c753e5 Try to do a little better when searching for safe teleport locations. 2012-07-17 00:46:07 +01:00
KHobbits
5309c824b2 Merge pull request #101 from chrisgward/patch-1
Adding enchantment aliases for fire protection
2012-07-15 10:13:33 -07:00
Chris Ward
17fea49b2f Adding enchantment aliases for fire protection 2012-07-15 19:47:53 +10:00
ElgarL
16c0ea0d4d Fix a typo because Necrodoom is anal. 2012-07-13 16:22:52 +01:00
ElgarL
2bd3f2227d Change to our own Yaml parsing for globalgroups instead of using the
YAMLConfiguration class in bukkit.
2012-07-13 13:38:53 +01:00
snowleo
fde9a6c91d Fix version in messages_se.properties 2012-07-11 13:22:44 +02:00
snowleo
54a84ef7ea Added swedish translation (from 3.0 branch) 2012-07-11 13:18:54 +02:00
KHobbits
0107c929b4 Add missing triggers from /mute block list 2012-07-11 02:46:45 +02:00
ElgarL
70430a4aed If a permission is found return the correct node for mangcheckp (not
null).
2012-07-10 14:35:08 +01:00
ElgarL
4acce8bfab Merge branch 'groupmanager' of
https://ElgarL@github.com/essentials/Essentials.git into groupmanager

Conflicts:
	EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
2012-07-10 14:27:50 +01:00
ElgarL
ce1e92389f Stop force removing attachments and let Bukkit handle it's own mess. 2012-07-10 14:10:13 +01:00
Alexander Schepp
dd6bd07b45 Ignore players, that don't have an IP 2012-07-10 15:57:49 +03:00
Alexander Schepp
24d22464a1 Another NPE fix for bots 2012-07-10 15:56:12 +03:00
md-5
0da3bc3dd6 Merge pull request #96 from mbax/groupmanager
Fix critical flaw in permissions removal with regards to fake players and Tekkit.
2012-07-10 02:25:56 -07:00
Matt Baxter
cad0d1d36c Fix critical flaw in permissions removal.
Potential for removing the removal entirely but this can be figured out later.
2012-07-10 06:24:17 -03:00
ElgarL
fa7688b4b5 Throw a better error than 'null' when someone removes all groups from a
yml.
2012-07-06 08:33:57 +01:00
ElgarL
017136ff1c Ignore any sub folders in the Worlds folder which start with a period
(fix for storing data in svn respoitories).
2012-07-04 11:32:17 +01:00
Iaccidentally
42243f42aa Update 2.9 2012-07-03 04:50:29 -03:00
KHobbits
8a9c6db508 Update 2.9 2012-07-01 16:40:48 +02:00
md_5
c802f19f53 Fix issue with cross world local chat. 2012-06-26 18:13:53 +10:00
ementalo
3d53212b9b Revert "add essentials.keepxp to allow a player to keep their level after death."
This reverts commit 7f40c1ca66.
2012-06-25 21:40:22 +01:00
Iaccidentally
7f40c1ca66 add essentials.keepxp to allow a player to keep their level after death. 2012-06-24 23:27:30 -04:00
ElgarL
f86c526f7c Fix loading users with only numerals in their names to be seen as
strings.
2012-06-24 13:10:22 +01:00
KHobbits
b9a4ba4326 Merge branch 'master' of github.com:essentials/Essentials into release 2012-06-23 13:47:32 +01:00
KHobbits
86f13fb494 Revert "fix /back resetting on logout"
This is desired behavior, and required for other features.
This reverts commit 9aea1029ac.
2012-06-23 13:33:36 +01:00
md-5
aa9c79fd75 Merge pull request #89 from necrodoom/patch-7
major slab alias expansion for items.csv
2012-06-23 02:07:34 -07:00
necrodoom
fa5f157ae8 major slab alias expansion for items.csv 2012-06-23 12:02:28 +03:00
Alexander Schepp
d694f20298 Too much space :D 2012-06-22 20:12:56 +03:00
Alexander Schepp
56ef52a4fa Prevent NPEs in KeywordReplacer 2012-06-22 19:16:40 +03:00
ElgarL
a45f9f5502 Only output a Data update message if something has changed. 2012-06-22 15:44:04 +01:00
Iaccidentally
9aea1029ac fix /back resetting on logout 2012-06-22 03:44:19 -04:00
md-5
6b401e9257 Merge pull request #88 from SyntaxBlitz/master
Fix /vanish with no arguments doing nothing
2012-06-21 04:31:18 -07:00
Timothy Aveni
49400f0ac3 Fix /vanish with no arguments doing nothing 2012-06-21 06:17:26 -04:00
md-5
1b8e859138 Merge pull request #87 from necrodoom/patch-5
updated items.csv, 43:4, 43:5, 44:4, 44:5
2012-06-21 03:03:39 -07:00
necrodoom
f37427d380 while enraged at mibbit and esper failing to work, updated items.csv 2012-06-21 12:18:14 +03:00
md_5
30529cc88c Merge branch 'master' into release 2012-06-21 18:27:54 +10:00
md_5
028b1e426f Merge remote-tracking branch 'origin/groupmanager' 2012-06-21 18:27:21 +10:00
md_5
ecc2e17ff7 Update Czech translation. 2012-06-21 18:18:57 +10:00
Iaccidentally
e7e1d1a109 change some default values 2012-06-21 05:05:22 -03:00
Iaccidentally
51f7f6807a fixxy fixxy 2012-06-19 18:13:47 -04:00
Iaccidentally
114f8ca31c Add Finnish translation 2012-06-19 18:02:05 -04:00
Iaccidentally
70bb7f3597 Merge branch 'master' of https://github.com/essentials/Essentials 2012-06-19 17:56:43 -04:00
KHobbits
257d169ef5 *borrows snowleo's strainer* 2012-06-19 20:57:40 +01:00
Iaccidentally
ac85507175 Merge branch 'master' of https://github.com/essentials/Essentials 2012-06-19 12:48:55 -04:00
Paul A.
d37a883a8a Merge pull request #86 from necrodoom/patch-4
adding beef and steak to items.csv - thanks @necrodoom
2012-06-19 07:13:37 -07:00
KHobbits
7eafd2bea7 Little safety check for bad plugins. 2012-06-19 09:03:37 +01:00
KHobbits
ebd1fdc0a3 Patch to allow plugins to use ignore lookup, without updating their own code. 2012-06-19 08:59:26 +01:00
KHobbits
3abf66516b Add optional 2n'd param to temp ban reason TL key. 2012-06-19 08:46:33 +01:00
necrodoom
8a4afc1b74 hotfix before 2.9.2 release 2012-06-19 10:04:13 +03:00
ementalo
e4308c9dd4 Fixing vanish on off arguments 2012-06-18 15:35:21 +01:00
ementalo
690c34c665 Use the assigned variable when looking at durability in itemdb 2012-06-18 10:28:37 +01:00
KHobbits
31910e0b82 Add sign throttle config option.
Allows you to limit how often an Essentials sign can be spammed per player.
2012-06-17 19:28:59 +01:00
Iaccidentally
0783c766a0 The French are weird : they use colons like this. 2012-06-17 11:50:52 -04:00
Iaccidentally
011ddc3425 fix spacing issue in messages.properties 2012-06-17 11:41:00 -04:00
ElgarL
f8d6337364 Better update for the User object player reference. 2012-06-16 19:12:54 +01:00
ElgarL
8345ff8fbf Clear the player reference on logout so it's refreshed upon a reconnect. 2012-06-16 19:04:40 +01:00
KHobbits
42ec44fd2e Using /exp, show can't find player message, if no matching player is found. 2012-06-16 18:22:31 +01:00
KHobbits
abffca467a Added missing syntax to plugin.yml 2012-06-16 17:56:12 +01:00
KHobbits
c5ea103963 Fix playerlistname update when prefix/suffix option is disabled.
Fixes #2216
2012-06-16 17:42:42 +01:00
KHobbits
ae9b76e87c Adjust kit delay description.
Fixes #1580
2012-06-16 17:37:42 +01:00
KHobbits
0331962f98 Prevent joinbots from triggering join code, unless they are actually connected to the server and online. 2012-06-16 17:31:33 +01:00
KHobbits
dfc509c2f4 Added TL key for ban syntax,
Default message: "Banned: <reason>"
Default reason: The Ban Hammer has spoken!
Optional 2nd param to banReason, {1}, will contain user who made the ban.
Example use: "banReason=Banned for {0} by {1}"
2012-06-16 17:10:47 +01:00
KHobbits
1530cf76b6 Fix teleport cooldowns - thanks @basicsensei
Fixes #2260
2012-06-16 16:46:40 +01:00
KHobbits
923f2732b4 Players should not be able to ignore Console
Also implement chat exempt permission in other commands.
2012-06-16 16:22:51 +01:00
KHobbits
0e29e2ac60 Fix chat showing [spy] prefix when social spy was not required to see the message.
Fixes #2263
2012-06-16 16:05:48 +01:00
KHobbits
3f7d252c31 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.
2012-06-16 16:01:27 +01:00
KHobbits
63280f2e08 Fix /exp so it can be used in the console 2012-06-16 14:26:29 +01:00
KHobbits
64f2d14b15 Avoid silent command failures on /hat (ie typing /hat fish will no longer silently return as if broken) 2012-06-16 14:02:13 +01:00
KHobbits
363a825c38 Added missing TL key 'hatRemoved' 2012-06-16 13:56:36 +01:00
KHobbits
bd1aec349c Make /vanish follow the same rules as /fly, /god and /gamemode 2012-06-16 13:53:46 +01:00
Iaccidentally
e7039f500f Merge pull request #85 from kukelekuuk00/master
Updated dutch translation and fixed many grammar and spelling mistakes.
2012-06-15 15:06:38 -07:00
kukelekuuk00
f463fc9f97 Updated dutch translation and fixed many grammar and spelling mistakes. 2012-06-16 00:02:19 +02:00
Iaccidentally
27028d2c0e Merge pull request #82 from kukelekuuk00/master
Allow your hat to be removed with /hat remove
2012-06-15 13:44:51 -07:00
kukelekuuk00
13fa4bcb5f Allow your hat to be removed with /hat remove 2012-06-15 22:36:26 +02:00
Paul A.
44696316ea Merge pull request #81 from kukelekuuk00/master
/vanish [on|off] - thanks kukelekuuk00
2012-06-15 03:05:13 -07:00
kukelekuuk00
1ed1c57371 args[0] instead of args[1]
derp
2012-06-15 11:41:06 +02:00
kukelekuuk00
55d6ef7719 /vanish [on|off] 2012-06-15 11:02:04 +02:00
Iaccidentally
31ea15caac Merge branch 'master' of https://github.com/essentials/Essentials 2012-06-12 22:33:12 -04:00
Iaccidentally
646d9dec3a add /e<command> aliases to essentials spawn 2012-06-12 22:28:10 -04:00
KHobbits
3be9803130 Revert "Invert teleport timer."
This reverts commit 81e98cf04a.
2012-06-13 03:06:42 +01:00
KHobbits
81e98cf04a Invert teleport timer. 2012-06-13 02:51:47 +01:00
KHobbits
20c1ab7888 3 char min length on /pay and /msg 2012-06-13 00:49:36 +01:00
Iaccidentally
5092fa8071 This is broken for some reason. Removing until fixed. 2012-06-12 01:41:39 -04:00
Iaccidentally
a3fcd89100 oops. forgot this. 2012-06-12 01:13:12 -04:00
Iaccidentally
71fc91edc7 add admin chat 2012-06-12 00:59:53 -04:00
Iaccidentally
e6dc76e31c Merge pull request #79 from Iaccidentally/master
update messages_pt.properties
2012-06-11 19:40:42 -07:00
Iaccidentally
6335f35ce2 fix Portuguese translation with new messages 2012-06-11 22:34:40 -04:00
Alexander Schepp
2f8694e6dd Merge pull request #78 from Iaccidentally/master
fix some tl keys
2012-06-11 19:17:44 -07:00
Iaccidentally
d8564c3568 fix some tl keys 2012-06-11 22:05:30 -04:00
KHobbits
6c1c8495a7 Messing around with whois syntax
(TL's probably need some love)
2012-06-12 01:43:20 +01:00
KHobbits
5085b3657c Fix spacing issue in /list 2012-06-12 00:27:21 +01:00
KHobbits
6f745aa344 Fixing messed enchantment. 2012-06-12 00:18:53 +01:00
KHobbits
9fb14c69bf Merge pull request #76 from necrodoom/patch-2
pull request for expanding enchant database
2012-06-11 16:17:53 -07:00
KHobbits
d88099b785 Merge pull request #77 from necrodoom/patch-3
woodenslab fix, pointed out by branicyeti
2012-06-11 16:17:21 -07:00
KHobbits
eec97c3a8c Adding mute status to /whois 2012-06-12 00:16:09 +01:00
necrodoom
5d595b3f4c woodenslab fix, pointed out by branicyeti 2012-06-11 16:39:18 +03:00
necrodoom
9441bcb4fe pull request for expanding enchant database 2012-06-11 15:08:12 +03:00
KHobbits
789601ce09 Update Bukkit to 1.2.5-R4
Bukkit: #1473 CB: #2222
2012-06-11 00:40:45 +01:00
md_5
2e113425f2 Fix the vanish command for good. 2012-06-11 09:18:06 +10:00
KHobbits
ecf9952428 I spied some more big Booleans. 2012-06-11 00:14:19 +01:00
KHobbits
b15dc79492 i should prefer boolean to Boolean. 2012-06-11 00:08:31 +01:00
KHobbits
84606b89b5 Make /whois throw an error if no matching players are found. 2012-06-11 00:07:22 +01:00
md_5
327ce54bcf Pass the actual player object to Bukkit. 2012-06-11 08:45:24 +10:00
KHobbits
f3213494db /vanish command sets players invisible to essentials commands. 2012-06-10 23:36:10 +01:00
KHobbits
011a89071e Broadcast command allows colour formatting. 2012-06-10 23:35:50 +01:00
KHobbits
d227224bc8 Fix /lightning <player> <damage> to actually deal the proper set damage (5 or 25% by default). 2012-06-10 23:00:49 +01:00
KHobbits
4f69427c63 Fix /essentials command to not show command debugging if there were no conflicts. 2012-06-10 22:46:56 +01:00
KHobbits
bdd64da249 Try to be a little more sensible with stored cooldowns. 2012-06-10 21:55:48 +01:00
KHobbits
0bbd094236 Fix /mute to follow same convention as /tjail
Fixed #2056
2012-06-10 19:56:24 +01:00
KHobbits
555ec29f91 Missing event aborts in sign code. 2012-06-10 19:40:09 +01:00
KHobbits
0d4cece390 Fix bug with /remove and minecarts 2012-06-10 19:36:31 +01:00
KHobbits
f75f69ca42 Allow syntax: /god <player> <on/off> 2012-06-10 19:20:43 +01:00
KHobbits
f3eaa5bf12 Allow syntax: /fly <player> <on/off> 2012-06-10 19:11:45 +01:00
KHobbits
e3e7bfa8c8 Fixing up some TL mistakes 2012-06-10 18:38:55 +01:00
KHobbits
cac2935cc8 Play a bit less greedy with events 2012-06-10 18:33:07 +01:00
KHobbits
35135e8c63 Remove dura command and merge into itemdb. 2012-06-10 18:31:28 +01:00
KHobbits
bd83ec0d31 Fix kits to only show to people who can use them. 2012-06-10 18:27:55 +01:00
KHobbits
2be2650567 Merge pull request #72 from kukelekuuk00/master
Durability command
2012-06-10 10:22:42 -07:00
KHobbits
2b083f7e2f Merge pull request #75 from necrodoom/patch-1
updating items.csv with newest pastebin, fixes duplicates and wrong alia...
2012-06-10 10:21:40 -07:00
necrodoom
ccaea65a80 file indented for unknown reason 2012-06-10 18:06:26 +03:00
necrodoom
0e1fe6acbc updating items.csv with newest pastebin, fixes duplicates and wrong aliases. 2012-06-10 15:29:34 +03:00
kukelekuuk00
b777ab58c9 DERP #2 2012-06-10 14:19:03 +02:00
kukelekuuk00
a4d8d24f84 DERP 2012-06-09 23:06:09 +02:00
snowleo
f13df076b9 Fix xmpp format stripping 2012-06-08 00:34:25 +03:00
KHobbits
442daf41d9 Merge branch 'master' of github.com:essentials/Essentials 2012-06-03 16:35:12 +01:00
KHobbits
73a17dd11a Fix broken preventmodify permissions check in invsee (*scowls at ementalo*)
Also added check to prevent duping items
2012-06-03 16:34:27 +01:00
md-5
503399091d Merge pull request #74 from Rutr/master
Edit the polish translation, thanks Rutr.
2012-06-02 14:36:00 -07:00
Rutr
50c1e0c451 translation some new messages and edit some existing 2012-06-02 17:46:26 +03:00
kukelekuuk00
4135c3ddf8 some more aliases for /durability 2012-06-02 00:36:27 +02:00
kukelekuuk00
fe5bb46e5a added /dura a durability check 2012-05-30 13:42:38 +02:00
md_5
851c564e67 Don't allow armor to be used as a hat. 2012-05-27 17:36:04 +10:00
md_5
f94ec6622f Add new command /hat and update translate keys as well as fix colour codes. 2012-05-27 17:24:49 +10:00
md_5
9e1eb83796 Client side note blocks don't play it seems (reverse-merged from commit d83437e394) 2012-05-26 14:47:30 +10:00
KHobbits
cbe3aec670 Tidy up PVP attack delay. 2012-05-22 21:02:28 +01:00
KHobbits
3c9cd3ea07 Merge branch 'master' of github.com:essentials/Essentials 2012-05-22 17:54:39 +01:00
KHobbits
510fe43657 Separate toggle for world teleports using homes. 2012-05-22 17:54:19 +01:00
ementalo
d5f52ddb2d Adding new config setting login-attack-delay. Set this in seconds for a delay before players can attack each other after logging on.
Use permission "essentials.pvpdelay.exempt" to bypass this restriction
2012-05-22 01:29:47 +01:00
KHobbits
3ef591d74f Code tidy. 2012-05-22 00:41:03 +01:00
KHobbits
556665d614 Merge branch 'master' of github.com:essentials/Essentials 2012-05-22 00:39:44 +01:00
KHobbits
b841878a33 Patch null error in /home after recent update. 2012-05-22 00:39:23 +01:00
md_5
043173c2bf Keep track of vanished players and tweak lag meter. 2012-05-21 15:13:24 +10:00
KHobbits
e4e1c950b5 Make /home and /back obey the world perm system.
This will prevent players from moving between words using virtually all essentials commands.
ATM /warp is excepted, because we already have per warp permissions.
Ess3 may see warp permissions altered to: essentials.warp.<world>.<warpname>
2012-05-20 23:58:03 +01:00
KHobbits
861def1a1c Fixing unit tests. 2012-05-19 22:19:24 +01:00
KHobbits
f507f366e5 Forgot to update plugin syntax.
Added missing perm checks.
2012-05-19 22:02:42 +01:00
KHobbits
366bae5838 Exp command cleanup 2012-05-19 21:52:54 +01:00
KHobbits
a52addc721 Merge pull request #70 from kukelekuuk00/master
/exp [set|give|player] [player] [amount]
2012-05-19 12:42:33 -07:00
KHobbits
bf3c5a02b1 Update CraftBukkit: 1.2.5-R2.0 - 2190
Update Bukkit: 1.2.5-R2.0 - 1459
2012-05-19 20:35:36 +01:00
KHobbits
2528981b0d Merge branch 'master' of github.com:essentials/Essentials 2012-05-19 17:45:09 +01:00
KHobbits
96c89f659e Strip invalid chars from kit names
This may possibly block some kits from working that previous worked, if the kit name contained unusual letters
2012-05-19 17:44:47 +01:00
kukelekuuk00
b18867fa0b Fixes made, added /exp fix [playername] this fixes negative exp. 2012-05-17 14:39:40 +02:00
md_5
cbb54d8ff6 There is no need to start a second task to measure lag, it can in fact be measured with enough precision from the exisitng one. 2012-05-17 20:33:40 +10:00
md_5
4208963b00 Add a LagMeter (ticks per second) to the /gc command. This command can now be accessed with /lag as well. Also added a simple /vanish command, with the extra node essentials.vanish.see
If you require a more advanced vanish solution checkout VanishNoPacket from mbaxter.
2012-05-17 20:25:02 +10:00
kukelekuuk00
5559da0091 small description change 2012-05-14 11:43:57 +02:00
kukelekuuk00
84d8c3a646 new command /exp [set|give|player] [player] [amount]
perms are essentials.exp,  essentials.exp.others,  essentials.exp.set,  essentials.exp.set.others,  essentials.exp.give and  essentials.exp.give.others
2012-05-14 11:36:44 +02:00
KHobbits
3af923d940 Try to trim long displaynicks instead of blankly refusing to show them.
Will try trimming prefixes and dropping suffixes before trimming nicknames.
2012-05-13 18:58:50 +01:00
kukelekuuk00
1c1bdc1c25 Added an /exp command that shows the amount of exp you have and how much you need for the next level.
Permissions are essentials.exp and essentials.exp.needed
2012-05-13 13:44:41 +02:00
KHobbits
f7e038dba1 Force 3 letters before matching players for /god /gamemode and /fly 2012-05-07 00:30:09 +01:00
KHobbits
447a2f042f Revert "Update home count..." This reverts commit cd1734f096.
On second thought, this would just lead to inconsistency....
2012-05-07 00:16:45 +01:00
KHobbits
f4c30692e4 Home confirmation when using a bed. 2012-05-07 00:08:01 +01:00
KHobbits
cd1734f096 Update home count to include the bed home if set, this does not prevent people from setting a bed home if they are at max. 2012-05-07 00:05:02 +01:00
KHobbits
86fed7df38 Revert "Revert "New config option 'cancel-afk-on-move' - Set to false you don't use afk." -- This should fix afk mode."
This reverts commit a40b225d47.

Another attempt at adding 'cancel-afk-on-move' toggle.
2012-05-06 23:38:04 +01:00
KHobbits
eaadecd2f6 Revert "/me crashes ementalo's face for making the client crash."
This reverts commit d9ac02d701.

And fix the original bug.
2012-05-06 23:30:55 +01:00
KHobbits
c42283a63c Add whisper to social spy trigger list. 2012-05-06 16:11:16 +01:00
KHobbits
6ca7573a81 Revert "We can't damage and kill, so we will just kill to make everyone happy, and the event pointless."
This reverts commit 7957a946ef.

Also fix kill to do the same.
2012-05-06 16:09:47 +01:00
md_5
7957a946ef We can't damage and kill, so we will just kill to make everyone happy, and the event pointless. 2012-05-05 20:01:18 +10:00
snowleo
3b78c2c2c1 Merge branch 'refs/heads/groupmanager' 2012-04-26 10:42:48 +02:00
snowleo
a40b225d47 Revert "New config option 'cancel-afk-on-move' - Set to false you don't use afk." -- This should fix afk mode.
This reverts commit 00e8e29efb.

Conflicts:

	Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
2012-04-26 10:41:24 +02:00
ementalo
8a42d0d325 Latest items.csv by necrodoom 2012-04-25 11:27:18 +01:00
md_5
d9ac02d701 /me crashes ementalo's face for making the client crash. 2012-04-25 17:02:15 +10:00
snowleo
da84e78883 Fix items.csv 2012-04-24 21:48:28 +03:00
snowleo
3be03a77bd Merge pull request #66 from Iaccidentally/patch-8
Necrodoom's update to items.csv
2012-04-24 11:42:50 -07:00
Iaccidentally
5a02960025 Necrodoom's update to items.csv 2012-04-24 14:57:56 -03:00
ementalo
0d36e990e4 Updated czech language, thanks tommymortago 2012-04-24 12:29:24 +01:00
md_5
1c8b6bb397 Small cleanup of things 2012-04-24 20:31:19 +10:00
ementalo
b72f6e2822 Adding the kickedAll TL key the the rest of the files 2012-04-24 10:24:08 +01:00
md_5
a384f78255 Add message to sender when all players kicked, addresses issue #1968 2012-04-24 17:47:27 +10:00
md_5
9a358a8b0f Use a quick (and working comparer) 2012-04-24 17:44:49 +10:00
ementalo
7fc0d08ffc New permission essentials.invsee.preventmodify. People with this permission cannot have their inventories modified by invsee 2012-04-23 23:51:10 +01:00
snowleo
03ea9d3563 Merge pull request #64 from mdojcar/patch-1
0.2 version of Czech translate: optimized by mdojcar
2012-04-23 14:42:55 -07:00
ElgarL
ec375c0780 Allow 'manucheckp' to notify when superperms reports false but it is
really negated.
2012-04-22 12:12:50 +01:00
ElgarL
3ebec83d13 Fix forgetting sub groups on a manload. 2012-04-21 16:58:22 +01:00
mdojcar
1e7f5c4b7c 0.2 version: optimized by mdojcar (modojcar@seznam.cz) - mirne fixy a trochu jsem preklad vylepsil 2012-04-21 09:35:59 +03:00
ElgarL
e0e43c8018 updated classpath (eclipse) for teh whole project 2012-04-21 02:33:13 +01:00
ElgarL
666568eff7 remove unneeded dependency of craftbukkit 2012-04-21 02:32:37 +01:00
ElgarL
2b8f00c122 Remove unneeded dependency of craftbukkit (Eclipse building) 2012-04-21 02:32:02 +01:00
KHobbits
32e6b4834b Remove stack trace cleaning, didn't actually remove unwanted elements. 2012-04-20 22:31:25 +01:00
ElgarL
df7db445b8 Prevent null perms getting past the GlobalGroups loader. 2012-04-18 22:22:35 +01:00
KHobbits
921a05e4fa Slightly widen block break protection on protected signs (still does not block chain breaks). 2012-04-18 01:30:14 +01:00
KHobbits
a89c447e9a Merge remote branch 'remotes/origin/groupmanager' 2012-04-18 00:39:14 +01:00
KHobbits
c2551af6f4 Switch the order of the alt give syntax to follow vanilla order. 2012-04-18 00:37:44 +01:00
ElgarL
59f6ca0239 Fix a couple of perms in GlobalGroups 2012-04-17 18:57:11 +01:00
KHobbits
0a3448b680 Don't get the Essentials user object when we don't need it. 2012-04-17 01:14:07 +01:00
KHobbits
267c343fc0 Wrong default value for AFK disable pickup. 2012-04-17 00:53:57 +01:00
ElgarL
c8607a711b Re-initialize the WorldsHolder on a reload, as un-registering and
re-registering a new holder means all plugins have to check for the new
service on every quiery.
2012-04-16 23:54:33 +01:00
KHobbits
3157a279aa Merge branch 'master' of github.com:essentials/Essentials 2012-04-16 21:43:19 +01:00
KHobbits
fe937ec5b2 Null check, for quick exit. 2012-04-16 21:42:53 +01:00
md_5
fcccd212e4 Do we have to remind @khobbits not to code while drunk. Again. 2012-04-16 19:43:53 +10:00
KHobbits
9df2413d20 Fixing a few TL issues. 2012-04-16 10:33:51 +01:00
KHobbits
922a32e032 Don't fire entity powertool commands, with our user object. 2012-04-16 10:19:19 +01:00
KHobbits
cdb847dbb3 Minor perf tweak. 2012-04-15 23:13:34 +01:00
KHobbits
00e8e29efb New config option 'cancel-afk-on-move' - Set to false you don't use afk. 2012-04-15 22:50:55 +01:00
KHobbits
3168947ad1 Few missing default permissions. 2012-04-15 22:02:08 +01:00
KHobbits
46e65db54d Merge remote branch 'remotes/origin/groupmanager' 2012-04-15 19:41:06 +01:00
KHobbits
2297c03f16 Fix metrics errors to be... descriptive. 2012-04-15 15:12:42 +01:00
KHobbits
c90c447f01 Revert "Add option to disable jails entirely."
This reverts commit 58dfc03ab7.
2012-04-14 23:18:20 +01:00
KHobbits
6d111eb8d7 Throw syntax error on /item, if syntax is wrong. 2012-04-14 17:53:33 +01:00
KHobbits
87832b2731 Merge branch 'master' of github.com:essentials/Essentials 2012-04-14 15:58:12 +01:00
KHobbits
4ee4616e12 Fix null locations in /seen 2012-04-14 15:57:47 +01:00
md_5
58dfc03ab7 Add option to disable jails entirely. 2012-04-14 15:21:42 +10:00
md_5
2624c403ba Change some ordering and clean pmd warnings 2012-04-14 15:07:10 +10:00
KHobbits
48b670d8c6 Optimize sign interacts. 2012-04-14 04:54:01 +01:00
KHobbits
a8d17c4e3d Try to speed up teleport events. 2012-04-14 04:13:37 +01:00
ElgarL
8fa627ea82 Correct formatting in command list. 2012-04-13 23:56:50 +01:00
ElgarL
6f10928688 Finally remove all deprecated methods. 2012-04-13 15:16:08 +01:00
ElgarL
1170297ce9 Code tidy 2012-04-13 15:00:55 +01:00
ElgarL
b8b14900e5 Stop using our own deprecated methods as we tell others to do. 2012-04-13 14:57:23 +01:00
ementalo
124dfbc324 Merge branch 'master' of https://github.com/essentials/Essentials 2012-04-13 14:52:25 +01:00
ementalo
f67defff0b Don't kill tamed ocelots with killall Test #1921 2012-04-13 14:49:15 +01:00
ElgarL
3005bc1ca0 Update all code formatting to use tabs for indentation. 2012-04-13 14:40:26 +01:00
ElgarL
6b33504c09 Fixed the 'last' nested throw/catch and rework all user and group
reading to be certain to trap all errors.
2012-04-13 13:58:05 +01:00
snowleo
9dfb582f66 Fix double charge in /jump 2012-04-12 23:57:19 +03:00
ementalo
d6c5492e12 Merge branch 'master' of github.com:essentials/Essentials 2012-04-12 21:26:34 +01:00
ementalo
50e9e8debb Display name of new world on world change 2012-04-12 21:26:19 +01:00
snowleo
5de9627103 Merge branch 'refs/heads/groupmanager' 2012-04-12 04:27:04 +02:00
ElgarL
f2d13677bd Unregister the worldsHolder as a service on a reload/shutdown instead of
the whole plugin.
2012-04-12 03:21:38 +01:00
ElgarL
0d5e4321a9 Fix silly nested throw/catch statements. Errors are now correctly
generated when reading yml's.
2012-04-12 01:21:22 +01:00
snowleo
bdb7b75351 Merge branch 'refs/heads/groupmanager'
Conflicts:
	EssentialsGroupManager/src/globalgroups.yml
2012-04-11 21:57:58 +02:00
snowleo
c02a2c9dca Prevent that a config file is loaded/saved by more than one thread. 2012-04-11 22:51:34 +03:00
ElgarL
4047eb7895 Expand GlobalGroups.yml and groups.yml to cover the VanishNoPacket
plugin. Demonstrating how to negate and add nodes when using the '*'
permission with inheritance.
2012-04-11 19:10:28 +01:00
ElgarL
06a4a7fbd2 Fix 'manuadd' to use the default or selected world (via 'manselect'), if
the world is not specified in the command.
2012-04-10 20:48:34 +01:00
ElgarL
90dc7b6287 Stop the error on shutdown if GM failed to load at startup.
GroupManager will now generate it's own log (in the GM folder) to
keep things tidy, but also to account of those players unable to
find/access their server.log.
Startup errors will now lock out ALL commands other than '/manload'
2012-04-10 20:40:04 +01:00
ElgarL
74534d7781 Properly fix concurrent modification when removing all attachments. 2012-04-10 17:02:50 +01:00
snowleo
a3b8c3d94d Should fix some exp math issues 2012-04-09 17:52:46 +03:00
ElgarL
cfda56697b Added missing confirmation message on '/manload'. 2012-04-07 21:30:49 +01:00
ElgarL
60eac79096 Better handling of errors in user and group yml's. 2012-04-07 19:24:46 +01:00
ElgarL
159a140b46 Fix a concurrent modification error when removing all attachments. 2012-04-07 17:21:48 +01:00
ElgarL
3a9f1f0988 Expand 'manwhois' to also list a users subgroups. 2012-04-07 11:47:07 +01:00
KHobbits
12840a68cb Allow vanilla syntax of /give 2012-04-07 04:39:12 +01:00
KHobbits
9fe1a323f6 Remove 'set' and 'add' from /time command args, to allow use of original syntax. 2012-04-07 04:22:17 +01:00
KHobbits
e1ca739899 New ingame command syntax: /kit <kit> <playername>
New Permission: essentials.kit.others - allows giving kits to other people.
New console commands: /kit & /kit <kit> <playername>
2012-04-07 03:34:01 +01:00
KHobbits
cb77594982 Console should be able to kick everyone. 2012-04-07 03:07:07 +01:00
KHobbits
f2c0fe934f Move player loading and updates to new thread, to reduce on join lag. 2012-04-06 19:19:08 +01:00
ElgarL
55433e2288 Remove all permission attachments when performing a manload or restart. 2012-04-06 12:53:36 +01:00
KHobbits
507c138dc4 Chat spy, should show otherworld chat. 2012-04-06 02:36:27 +01:00
KHobbits
5955210f76 Merge branch 'master' of github.com:essentials/Essentials 2012-04-05 23:37:33 +01:00
KHobbits
04b8702c5f Fix /time not working with the '##pm' syntax. 2012-04-05 23:36:57 +01:00
md_5
d16b27325e Add version tag 2012-04-06 07:39:25 +10:00
md_5
c2a1444851 Add polish translation, thanks losdamianos 2012-04-06 07:33:10 +10:00
ElgarL
c3225d1607 Don't throw errors when attempting to remove permission attachments
(bukkit will have already removed it).
2012-04-05 21:06:48 +01:00
snowleo
9b8b004ca2 Merge remote-tracking branch 'origin/groupmanager' 2012-04-05 17:05:43 +02:00
ElgarL
566f5ff327 Fix an error I caused trying to modify an unmodifiable list when parsing
'*' permissions.
2012-04-05 15:02:08 +01:00
KHobbits
4823712f47 Fixing up NPE bug in jails (implemented in Dev2.9.163) 2012-04-05 13:28:23 +01:00
ElgarL
7e1e18ef91 Update to 2.0
Fix GM reporting of permission inheritance to retain the correct order.
Lower inheritance groups can no longer negate a higher groups
permissions.
2012-04-05 12:54:26 +01:00
KHobbits
9cb45a0a15 Added wiki names for enchantments. 2012-04-05 05:46:36 +01:00
KHobbits
ad59255310 Jail update, jailed people can't attack other players. 2012-04-05 03:22:49 +01:00
KHobbits
5cd57f6b5e Updating plugin.yml to add sendall syntax. 2012-04-04 23:02:13 +01:00
KHobbits
faabcb1bb9 Added extra params to setHome TL key {0} world {1} x {2} y {3} z 2012-04-04 18:19:39 +01:00
ementalo
b8c87c37cd 1.2.5 Update Craftbukkit #2149 Bukkit ??? 2012-04-04 15:33:11 +01:00
KHobbits
1eebe3c81b Fix unit tests. 2012-04-04 03:21:14 +01:00
KHobbits
7dcc6bc5f6 Report invalid enchantments in kits.
Improve error logging
2012-04-04 03:09:27 +01:00
KHobbits
1f2b6ab7d3 Catch all values greater than 10 years to avoid exploits. 2012-04-04 02:07:01 +01:00
KHobbits
cdd4f10dbd Cap mute/ban/jail to 10 years (any more is silly).
Cap time descriptions to 3 significant notions.
2012-04-04 01:55:06 +01:00
KHobbits
854cd3e7f4 Update seen to show better data for vanished users:
New Perm: essentials.seen.extra - Shows some extra information for staff
2012-04-04 01:20:57 +01:00
KHobbits
100541bca2 Little bit of powertools code cleanup. 2012-04-04 00:40:58 +01:00
KHobbits
d59aaae2fc Enable powertools if they are disabled when setting a new tool. 2012-04-04 00:39:59 +01:00
KHobbits
4849a7cf5f Better hide vanished players. 2012-04-03 16:12:49 +01:00
KHobbits
6af79ef419 Command cost api update: Can now set fallback costs.
Repair command addition: ontop of 'repair' and 'repair-<itemname>' you can now charge for 'repair-all' to charge more for /repair all or 'repair-item' to charge per item repaired.
2012-04-03 15:35:13 +01:00
ElgarL
ebfab2c9fe Prevent Null entries in group inheritance from throwing errors. 2012-04-03 14:30:27 +01:00
KHobbits
be4891601f Switch sign listeners back to compare block id, rather than materials. 2012-04-02 22:58:07 +01:00
ElgarL
5ad8f0ee8e Added a new permission node 'groupmanager.op'. This will cause players
with this node to be treated as op's when using GroupManager commands
(they will still require each commands
permission node to use them).
2012-04-02 21:12:19 +01:00
KHobbits
5e936523f5 Allow tppos to be used in console. 2012-04-02 02:47:44 +01:00
KHobbits
f0f6747082 Optional second param to /gm to force gamemode on other players. 2012-04-02 02:31:31 +01:00
KHobbits
de081c8f0e Listener Cleanup 2012-04-02 02:22:30 +01:00
ElgarL
dd436fa121 Force remove player attachments on disconnect, and tidyup during player
join in case of any errors. Fixes a bug of losing permissions.
2012-04-01 03:44:37 +01:00
KHobbits
46fda4a5ea Make sure can build checks in permbukkit/privileges work for admins/owners. 2012-04-01 02:44:11 +01:00
KHobbits
adf976490e Minor cleanup to player events. 2012-03-30 21:44:14 +01:00
KHobbits
9fa68e9fd4 Add newish signs to default enabled commands config. 2012-03-30 21:04:15 +01:00
KHobbits
0c73a807f7 Formatting. 2012-03-30 13:29:58 +01:00
KHobbits
973558dadf Don't push vault version to metrics. 2012-03-30 13:27:57 +01:00
KHobbits
14c70858a7 Reset ban reason to null on /ban <player>, if no reason is set. 2012-03-30 11:40:44 +01:00
KHobbits
07e4c69c1a Fix tpo syntax error. 2012-03-29 22:32:16 +01:00
KHobbits
c1889790ad Iaccidentally's changes to pt TL. 2012-03-29 21:17:50 +01:00
KHobbits
9a46cd24a5 Update TL header. 2012-03-29 18:49:56 +01:00
KHobbits
61571f5547 New translation messages 2012-03-29 18:37:22 +01:00
KHobbits
4d8d46266d Update default permissions. 2012-03-29 18:14:24 +01:00
KHobbits
00e28d6418 Missing air materials. 2012-03-29 16:41:13 +01:00
ElgarL
164ab45534 Merge branch 'groupmanager' of https://elgarl@github.com/essentials/Essentials.git into groupmanager 2012-03-29 14:09:07 +01:00
ElgarL
560acd4027 Catch errors caused by bad indentation in yml's. 2012-03-29 14:02:53 +01:00
ElgarL
9bfab868d6 Stop attempting to push empty permissions when players edit the yml's
incorrectly.
2012-03-29 13:41:59 +01:00
KHobbits
1467ac9224 Interact event cleanup 2012-03-29 03:06:52 +01:00
KHobbits
12ddeb3267 Update to CB #2126 B #1425
Min CB version changed to 2122
2012-03-29 02:00:51 +01:00
KHobbits
cf402a847a Fix using /setworth <price> 2012-03-29 00:13:56 +01:00
KHobbits
8943b81c93 Merge branch 'groupmanager' of github.com:essentials/Essentials 2012-03-28 17:37:03 +01:00
KHobbits
c9aaba9fac Implement all abstract methods. 2012-03-28 15:12:25 +01:00
KHobbits
dcacf3a7fb Merge branch 'master' of github.com:essentials/Essentials 2012-03-28 15:03:45 +01:00
KHobbits
897d721880 Don't register jail listeners, if no jails are set. 2012-03-28 15:03:18 +01:00
snowleo
10acb7247b Fix for the fix 2012-03-28 11:21:31 +02:00
snowleo
56dbc52088 Fix isAffordableFor in Trade class
This fixes buy signs giving out items, when the player has essentials.eco.loan permission, but min-money in config is set to 0.
2012-03-28 10:36:10 +02:00
KHobbits
d9f2d753e4 Pull example perm files out of the ess jar. 2012-03-28 00:59:51 +01:00
KHobbits
e56b41ebbd Try to reduce lag caused by join spam. 2012-03-27 21:08:06 +01:00
snowleo
de55825dc1 Adds pvp protection after teleport 2012-03-27 21:15:11 +02:00
KHobbits
c1744fe216 Adding world permission checks to:
tpaall tpall tpahere tphere tpohere
User is required to have the permission for the world he is in, before he can teleport users outside this world, to it.
2012-03-27 15:28:40 +01:00
ElgarL
8e53c23a5f Update GlobalGroups.yml for new/changed Towny permission nodes. 2012-03-27 10:14:53 +01:00
ElgarL
d7bf472edc Auto rename all case sensitive world folders to lower case (if
possible).
2012-03-26 20:06:59 +01:00
ElgarL
6c24688244 Treat all world names as lower case for file handling (please check in
your worlds folder. You should have no folders with upper case letters
from now).
2012-03-26 19:18:19 +01:00
KHobbits
66777adfb9 Fix kit enchants for people without oversized stack permission.
Add permissions lookup to debug mode.
2012-03-26 13:28:32 +01:00
KHobbits
feae4db98f Clarify how backup works.
Add option for auto save-all.
2012-03-26 00:49:53 +01:00
KHobbits
9633400295 Update tp to check if target player has tptoggle disabled.
Update tpo to allow player to player tp.
2012-03-25 23:32:04 +01:00
KHobbits
02fa3779e4 Don't show 'backup started' on /backup if it hasn't been configured. 2012-03-25 19:10:39 +01:00
KHobbits
21a47bbac8 Reorder login/join event calls. 2012-03-25 17:27:06 +01:00
KHobbits
4f5e669251 Don't override other plugins which allow joining over capacity. 2012-03-25 16:46:36 +01:00
KHobbits
4ec70650fe Reduce amount of move event calls being processed. 2012-03-25 16:30:22 +01:00
KHobbits
53a8cdd6a1 Update [balance] sign to use currency formatting. 2012-03-25 14:26:08 +01:00
KHobbits
0eebb07de4 Merge branch 'master' of github.com:essentials/Essentials 2012-03-25 14:20:53 +01:00
KHobbits
c57c95a2a7 Fix chat format regex. 2012-03-25 14:20:26 +01:00
snowleo
ce765b3a2e CopyPaste-Fail 2012-03-25 11:47:26 +02:00
snowleo
2b9c12dc48 Wrong url 2012-03-25 11:45:50 +02:00
snowleo
f018b2c723 This is no longer stored in file, so it's not part of UserData anymore. 2012-03-25 11:44:33 +02:00
snowleo
37a176dda7 Optimize metrics 2012-03-25 11:39:19 +02:00
snowleo
e006da5353 AntiCheat has different version numbers, so don't check. 2012-03-25 11:09:13 +02:00
KHobbits
b279670bc3 Should probably cancel this at lowest. 2012-03-25 02:55:19 +01:00
KHobbits
6702100bb7 Merge branch 'master' of github.com:essentials/Essentials 2012-03-25 02:34:19 +01:00
KHobbits
24eaa5a23b Invsee now shows a live player inventory in a window, rather than cloning players inventory.
New Permission: essentials.invsee.modify - Player with this permission will be able to add/remove items from the other players inventory.
2012-03-25 02:33:52 +01:00
KHobbits
1e9d586633 Update Essentials/src/config.yml 2012-03-24 23:28:56 +00:00
KHobbits
2fd10e495f Mysql is bad. 2012-03-24 23:25:43 +00:00
KHobbits
955efe65dd Better English. 2012-03-24 21:12:15 +00:00
KHobbits
e1afa394c3 New permission check: essentials.list.hidden is now required to /getpos hidden players. 2012-03-24 21:08:45 +00:00
KHobbits
c868b9dc26 Extra itemcsv. 2012-03-23 23:13:04 +00:00
KHobbits
f0e9a0efb6 'Enabled' looks better than 'true'. 2012-03-23 22:38:01 +00:00
KHobbits
2975053b61 Make sure items don't stack wrong in [free] signs. 2012-03-23 20:15:03 +00:00
KHobbits
c793fc13a7 Fix for showing plugins when user has no permission. 2012-03-23 18:26:19 +00:00
KHobbits
45a45284cd Wrong colour code symbol. 2012-03-23 17:50:15 +00:00
KHobbits
40b552086f Merge remote branch 'remotes/origin/groupmanager' 2012-03-23 17:44:00 +00:00
KHobbits
54857b5e9d Help command refresh. 2012-03-23 17:16:09 +00:00
KHobbits
8f9b7eb877 Merge branch 'master' of github.com:essentials/Essentials 2012-03-23 13:53:08 +00:00
snowleo
a1005bb4b7 Spaaaaaace! So much space! Gotta see it all! 2012-03-23 14:30:00 +01:00
KHobbits
97c07ff20a Merge branch 'master' of github.com:essentials/Essentials 2012-03-23 13:26:12 +00:00
KHobbits
eb92819e36 Fix url matching. 2012-03-23 13:26:03 +00:00
snowleo
895b2bd067 Fix utf-8 decoding problems. 2012-03-23 14:22:10 +01:00
snowleo
52eb05c925 http://youtu.be/8DdeLUA0Fms 2012-03-23 12:11:01 +01:00
KHobbits
394155dfcb Merge branch 'master' of github.com:essentials/Essentials 2012-03-23 10:18:16 +00:00
KHobbits
6dbb2d405e Adding missing entities to Protect Spawn Blacklist 2012-03-23 10:16:38 +00:00
snowleo
089da4b031 Fix UTF8 handling in Configuration class 2012-03-23 11:13:44 +01:00
KHobbits
ad22f3d770 Update Essentials/src/config.yml 2012-03-23 10:03:15 +00:00
KHobbits
546eacf3f6 Remove white user prefix, if prefix is blank. Messes with EssentialsChat colouring. 2012-03-23 07:56:44 +00:00
KHobbits
2464429683 Fixing chat color formatting. 2012-03-23 00:19:27 +00:00
KHobbits
bac1cb41dc Disabling player list updates by default (can mess with tab completion)
Hopefully this will be reverted if/when patch is found.
2012-03-23 00:15:22 +00:00
KHobbits
ec732df2d8 Improve kit matching, and add enchantments.
Enchanted kit example in config.yml
2012-03-22 23:47:35 +00:00
KHobbits
82b85024a2 Fix jar building. 2012-03-22 23:10:59 +00:00
KHobbits
4fe0ce4677 Update CB to 2105 2012-03-22 23:07:23 +00:00
KHobbits
5edfa1b610 New command: /fly
New perm: essentials.fly.others
2012-03-22 22:59:52 +00:00
KHobbits
4ddd7a4bb1 Split formatting perms for signs as well. 2012-03-22 22:26:04 +00:00
KHobbits
1002a5a902 New Permission: essentials.chat.url
Without this perm, URLs will be modified not to be links.
2012-03-22 22:19:58 +00:00
KHobbits
e843e5df00 Split colour permissions into 3: color/magic/format 2012-03-22 22:07:13 +00:00
KHobbits
27bf6e103d Update to 1.2.4 (R0.1)
New Minimum CB version: 2100
2012-03-22 20:55:56 +00:00
KHobbits
a3e01e5dda Extra items in 1.2.4 2012-03-22 20:48:27 +00:00
KHobbits
db65f23820 Add villager professions to /spawnmob 2012-03-22 20:03:52 +00:00
ElgarL
e2238ab0cb Correct Grammar 2012-03-22 17:54:59 +00:00
ElgarL
ab8f66230b Merge pull request #62 from bonney12/groupmanager
Update language and commenting
2012-03-22 10:53:25 -07:00
KHobbits
b512734ab8 Bukkit R0.3 api updates. 2012-03-22 17:26:05 +00:00
KHobbits
9e16ca2a86 Update missing 1.2.3 items in items.csv 2012-03-22 17:25:42 +00:00
KHobbits
d6a0cb0f2e Extra Trees 2012-03-22 17:25:13 +00:00
KHobbits
ec9618310a Fixed again. 2012-03-22 12:02:19 +00:00
KHobbits
aefa2f11f4 Fix typo. 2012-03-22 11:57:30 +00:00
KHobbits
363ba7f9f1 Merge branch 'master' of github.com:essentials/Essentials 2012-03-21 23:55:19 +00:00
KHobbits
28cec2c193 Cleaning up displaynames 2012-03-21 23:54:57 +00:00
KHobbits
dd32dd1dab Merge pull request #63 from Iaccidentally/patch-6
update default player-commands to support new and missed commands
2012-03-21 09:25:05 -07:00
Iaccidentally
2bc875dc03 update default player-commands to support new and missed commands 2012-03-21 13:23:36 -03:00
Michael Bonney
31d6697764 Removed Portuguese text, and added English replacements. Made more sense of the sentences, and also changed an incorrect message to it's proper form. 2012-03-21 16:13:34 +00:00
KHobbits
01cb84b627 Split if tree for readability. 2012-03-20 15:03:53 +00:00
KHobbits
7f521ca4a2 Teleport check cleanup 2012-03-20 13:26:49 +00:00
KHobbits
1d9218e3d9 Fix per world teleport permission checking. 2012-03-20 11:53:05 +00:00
KHobbits
50443ee16b Add 'color' sign type to config file.
Enforce colour permission on signs when essentials signs are enabled.
2012-03-19 08:21:39 +00:00
KHobbits
6f44a4e778 Missing kit time check from [kit] signs. 2012-03-18 17:15:46 +00:00
KHobbits
dce77f0b72 Only show nickname update message in debug mode. 2012-03-18 03:29:49 +00:00
KHobbits
445121d6e8 Shorten help messages. 2012-03-18 03:01:44 +00:00
KHobbits
b1e9375250 Error and info cleanup. 2012-03-17 20:23:46 +00:00
KHobbits
af8cf203e2 Merge remote branch 'remotes/origin/groupmanager' 2012-03-17 18:20:33 +00:00
ElgarL
e036ecf924 Don't remove an attachment on a player leaving as Bukkit never forgets
it. This fixes non mirrored permissions being messed up if a player
relogs.
2012-03-17 15:56:40 +00:00
snowleo
4c7564c936 Merge branch 'refs/heads/groupmanager' 2012-03-17 13:38:51 +01:00
ElgarL
20b1131811 Removed some debug spam. 2012-03-17 12:37:23 +00:00
snowleo
88380708d4 Fix bukkit download url 2012-03-17 11:15:28 +01:00
snowleo
da4ffc812e Fix bukkit download url 2012-03-17 11:12:32 +01:00
KHobbits
43d248ae6b Merge remote branch 'remotes/origin/groupmanager' 2012-03-17 08:01:19 +00:00
KHobbits
f8d1c61886 New permission: essentials.tp.others - Allows players to /tp <p1> <p2> replaces old reused permission.
New permission usage: if world-teleport-permissions is true in the config, TP commands will now check for essentials.world.<worldname> when a tp would switch worlds.
2012-03-17 06:10:02 +00:00
KHobbits
f1249fa2c6 Comments to SetExpFix. 2012-03-17 03:38:32 +00:00
KHobbits
6299676d4b Adding Exp to /whois, shows total exp and ingame level.
Due to the way minecraft calculates levels (flawed formula), its possible to not match calculated level.
2012-03-17 01:43:49 +00:00
KHobbits
4f70dc656e Adding reference to &k in MOTD. 2012-03-16 23:03:22 +00:00
KHobbits
821da679ca Handle permission check failures better. 2012-03-15 23:15:19 +00:00
KHobbits
ed1e39deb9 Add missing methods. 2012-03-15 22:23:26 +00:00
KHobbits
7daecfbcd6 Updating Bukkit/CraftBukkit to match minimum ver. 2012-03-15 22:15:17 +00:00
md_5
ba65f66543 Fill the entire sign with free goodness 2012-03-15 20:55:56 +11:00
md_5
271241094f Update minimum CraftBukkit version 2012-03-15 20:51:51 +11:00
md_5
dc5fac3789 Restore [free] and [disposal] signs back to their intended behaviour 2012-03-15 20:48:55 +11:00
snowleo
cf41172f33 :P 2012-03-15 09:15:28 +01:00
KHobbits
2f5302f008 Graph a little bit extra information. 2012-03-15 08:08:25 +00:00
KHobbits
3aadff48bf Fix fake explosions. 2012-03-15 06:42:58 +00:00
KHobbits
09fdd20de3 Make /nuke drop tnt from a more reasonable height. 2012-03-15 05:09:34 +00:00
KHobbits
3f53aa0efe Make /spawner errors more descriptive. 2012-03-15 04:41:56 +00:00
KHobbits
09e9547111 Add metric opt out toggle ingame. 2012-03-15 03:49:17 +00:00
KHobbits
f7b5e92c89 Fixing setwarp command. 2012-03-15 02:12:43 +00:00
KHobbits
f99e8c066f Adding some simple feature metrics. 2012-03-15 02:12:27 +00:00
KHobbits
e2423aef46 Metrics errors aren't important. 2012-03-15 01:32:08 +00:00
KHobbits
e751c92c8c Basic module graph. 2012-03-15 01:17:12 +00:00
KHobbits
2c09c02ee6 Add Griefcraft metrics to Essentials
Warns on first start, and first staff join, and 5 minute warning before logging starts.
2012-03-15 00:49:22 +00:00
ementalo
247742386a Adding permissions for overwriting exisitng warps
essentials.warp.overwrite.[warpname] will allow overwrting of exsiting warps
essentials.warp.overwrite.* for all warps
Adding WarpNotFoundException class
2012-03-14 21:16:22 +00:00
KHobbits
a0373a4eea Fixing warp command costs. 2012-03-13 16:15:01 +00:00
ElgarL
24a15ace92 Fix a globalgroup inheritance in groups.yml 2012-03-12 22:18:25 +00:00
KHobbits
09bc09c0db Missed a TL key. 2012-03-12 16:50:32 +00:00
KHobbits
ca294883a5 Fixing a few TL Keys 2012-03-12 15:35:20 +00:00
KHobbits
2ccc371868 New TL Key, allow formatting/colouring of help output. 2012-03-12 15:21:37 +00:00
KHobbits
4903f14dd6 New permission: essentials.seen.banreason
With this permission players can see why a user was banned, in /seen.
2012-03-12 15:00:44 +00:00
KHobbits
216831ebfe Adding jail time to /whois. 2012-03-12 01:15:10 +00:00
KHobbits
ca8007af6d Update offline user check.
Add ban reason to /seen
2012-03-12 01:00:57 +00:00
KHobbits
4be87b9299 Update setworth to allow /setworth <price> ingame
Allow /setworth to be used from console.
2012-03-11 23:59:59 +00:00
KHobbits
21cb0edc46 New Permission: essentials.lightning.others
With this permission you can use /lightning <player>, without only strike based on direction.
2012-03-11 20:58:54 +00:00
KHobbits
ba50ce5f3a Add Enderman check to EntityChangeEvent (Should fix sheep eating grass). 2012-03-11 01:46:01 +00:00
KHobbits
554a209af1 Use ignoreCancelled on event registration. 2012-03-10 21:42:46 +00:00
KHobbits
452e266f7d Update info.txt to hint at /einfo. 2012-03-07 12:14:32 +00:00
KHobbits
980b023be9 Fixing typo in config.yml 2012-03-06 23:17:10 +00:00
ElgarL
d243d243a5 change []<> for optional command components 2012-03-06 16:23:57 +00:00
ElgarL
69d426a534 Expanded '/manuadd'to accept an optional variable for the world (eg
'/manuadd <player> <group> <world>').
2012-03-06 11:02:48 +00:00
KHobbits
2191351ddf Merge branch 'release'
Conflicts:
	lib/bukkit.jar
	lib/craftbukkit.jar
2012-03-05 16:25:35 +00:00
KHobbits
af4319770e Change starter kit to default to stone tools 2012-03-05 15:51:15 +00:00
KHobbits
5cb65202c9 Temp fix to disable version check on R7 2012-03-05 14:17:09 +00:00
KHobbits
7bb75bd7ee Craftbukkit/Bukkit R7 2012-03-05 08:41:19 +00:00
md_5
1f39617fe2 I dont think free noteblocks are a good idea 2012-03-05 08:37:16 +00:00
KHobbits
873c2f71ba Missed one. 2012-03-05 08:37:15 +00:00
KHobbits
664c388767 Fixing spawnmob count. 2012-03-05 08:37:15 +00:00
KHobbits
69dc500614 Add listgroups as TL key 2012-03-05 08:37:15 +00:00
KHobbits
a1f4177c09 Apply colors to group tags. 2012-03-05 08:37:15 +00:00
KHobbits
02da6a8fe9 Build custom mob list /spawnmob 2012-03-05 08:37:14 +00:00
KHobbits
4673a32897 CME 2012-03-05 08:37:14 +00:00
KHobbits
5f6f505a33 Adding starter/newbie kit to EssentialsSpawn
Optimization to EssentialsSpawn join event.
2012-03-05 08:37:14 +00:00
KHobbits
c0d827d1a2 Extra command alias. 2012-03-05 08:37:14 +00:00
KHobbits
ed4f5fb2a2 Allow more currency customization.
Added currency key to messages.
2012-03-05 08:37:14 +00:00
KHobbits
db104a00c2 Adding option to modify all users balances (including offline) /eco reset ** <amount> 2012-03-05 08:37:14 +00:00
KHobbits
9a83ad2e13 Half-revert double backflip. 10 points.
(op prefix changes that md-5 broke, thinking I broke op prefixes)
2012-03-05 08:37:14 +00:00
md_5
043762d387 Fix op colours, which KHobbits broke! 2012-03-05 08:37:13 +00:00
Chris Ward
38ff5906ad Cleanup
Signed-off-by: Chris Ward <chris@chrisgward.com>
2012-03-05 08:35:48 +00:00
Chris Ward
e6196bccae Cleanup
Signed-off-by: Chris Ward <chris@chrisgward.com>
2012-03-05 08:35:48 +00:00
KHobbits
e2f83124ac Capital case for formatting. 2012-03-05 08:35:48 +00:00
KHobbits
b04cf5ac69 Force all kits to lowercase. 2012-03-05 08:35:48 +00:00
KHobbits
7cf96782a2 *make it look like i'm doing something* 2012-03-05 08:35:48 +00:00
KHobbits
3eba99f601 I think switches are better. 2012-03-05 08:35:48 +00:00
KHobbits
4d5531834d Only update displayname on world change, not every teleport. 2012-03-05 08:35:48 +00:00
KHobbits
c179c648b2 Extra command aliases 2012-03-05 08:35:47 +00:00
KHobbits
dacc6e453f Make the antioch message optional. 2012-03-05 08:35:47 +00:00
KHobbits
73a9e15a0e Entity event cleanup 2012-03-05 08:35:47 +00:00
KHobbits
3096d16398 Shouldn't really be canceling events at priority monitor, oops. 2012-03-05 08:35:47 +00:00
KHobbits
9cb7bcd2e1 Don't think we need animation event anymore. 2012-03-05 08:35:47 +00:00
Iaccidentally
8a34ab289f update messages.properties for the new bukkit download link (ci.bukkit,org no longer works) 2012-03-05 08:35:46 +00:00
md_5
d83437e394 I dont think free noteblocks are a good idea 2012-03-05 18:40:18 +11:00
md_5
3306ff6b64 Allow spamming of this, by reducing explosion damage to 0, same effect, no mess 2012-03-05 18:28:04 +11:00
KHobbits
dfe786aa61 Missed one. 2012-03-05 00:39:37 +00:00
KHobbits
e3fc0229e3 Fixing spawnmob count. 2012-03-05 00:22:31 +00:00
KHobbits
b069f83938 Add listgroups as TL key 2012-03-05 00:19:40 +00:00
KHobbits
b47bbbe1ec Apply colors to group tags. 2012-03-05 00:08:37 +00:00
KHobbits
45a490136b Build custom mob list /spawnmob 2012-03-04 21:54:51 +00:00
KHobbits
69a81af4bd CME 2012-03-04 21:43:24 +00:00
KHobbits
654663c0fd Adding starter/newbie kit to EssentialsSpawn
Optimization to EssentialsSpawn join event.
2012-03-04 20:09:25 +00:00
KHobbits
00d12585f3 Extra command alias. 2012-03-04 16:17:16 +00:00
KHobbits
2b1343205b Updating Craftbukkit #2034 Bukkit #1378 2012-03-04 16:01:49 +00:00
ElgarL
d78df58eea Better reporting when a users.yml is failing to load. 2012-03-04 10:39:39 +00:00
KHobbits
aaf34a291b Allow more currency customization.
Added currency key to messages.
2012-03-04 10:11:58 +00:00
KHobbits
5dc0432775 Adding option to modify all users balances (including offline) /eco reset ** <amount> 2012-03-04 09:20:03 +00:00
KHobbits
81d516cc10 Half-revert double backflip. 10 points.
(op prefix changes that md-5 broke, thinking I broke op prefixes)
2012-03-04 08:18:25 +00:00
KHobbits
310d1da475 Merge branch 'master' of github.com:essentials/Essentials 2012-03-04 08:13:29 +00:00
md_5
b4210cd7e0 Fix op colours, which KHobbits broke! 2012-03-04 15:43:00 +11:00
snowleo
3a738a6bb8 Cleanup of /spawnmob 2012-03-03 17:01:53 +01:00
ElgarL
7494323a1e Minor change to globalgroups 2012-03-03 14:03:52 +00:00
KHobbits
f105c78c7e Merge branch 'master' of github.com:essentials/Essentials 2012-03-03 13:49:26 +00:00
KHobbits
623d134a16 Update CB #2032 B #1377
Min CB #2015
2012-03-03 13:48:58 +00:00
ElgarL
79d4ee04ac Fix a silly logic error when testing bukkit perms 2012-03-03 13:47:59 +00:00
ElgarL
29fa09510f Minor optimization when checking bukkit permissions. 2012-03-03 13:00:17 +00:00
md-5
ba218eb625 Merge pull request #56 from Iaccidentally/patch-4
Allow spawning baby villagers and ocelots
2012-03-03 00:34:00 -08:00
md-5
f8affe7146 Merge pull request #55 from chrisward/master
Just a really small cleanup
2012-03-03 00:31:48 -08:00
Chris Ward
ea915d65f4 Cleanup
Signed-off-by: Chris Ward <chris@chrisgward.com>
2012-03-03 19:21:27 +11:00
Iaccidentally
969c4dac4e add little babbys 2012-03-03 03:04:54 -05:00
KHobbits
fce2c68c56 Capital case for formatting. 2012-03-03 07:09:41 +00:00
Chris Ward
03c51cdeaf Cleanup
Signed-off-by: Chris Ward <chris@chrisgward.com>
2012-03-03 18:07:43 +11:00
KHobbits
33bd09867d Force all kits to lowercase. 2012-03-03 07:03:54 +00:00
KHobbits
de96e09f76 *make it look like i'm doing something* 2012-03-03 05:27:02 +00:00
KHobbits
4ce6c115b4 I think switches are better. 2012-03-03 05:09:03 +00:00
KHobbits
0a4bf3243c Only update displayname on world change, not every teleport. 2012-03-02 19:05:30 +00:00
KHobbits
c1d21f7bce Extra command aliases 2012-03-02 17:05:55 +00:00
KHobbits
6784eae1fd Make the antioch message optional. 2012-03-02 17:03:34 +00:00
KHobbits
6a6e920aa3 Entity event cleanup 2012-03-02 16:54:12 +00:00
KHobbits
a3ca9ae93d Shouldn't really be canceling events at priority monitor, oops. 2012-03-02 16:33:20 +00:00
KHobbits
015e348dc9 Don't think we need animation event anymore. 2012-03-02 16:29:06 +00:00
KHobbits
b1e232ae1c Merge pull request #54 from Iaccidentally/patch-3
update messages.properties for the new bukkit download link (ci.bukkit,o...
2012-03-01 20:15:16 -08:00
Iaccidentally
41fa53384e update messages.properties for the new bukkit download link (ci.bukkit,org no longer works) 2012-03-01 23:10:32 -05:00
snowleo
c065247881 Will be removed until the next release XD 2012-03-02 01:30:52 +01:00
snowleo
e0829dc831 Better cats 2012-03-02 00:40:50 +01:00
snowleo
78e7c783b5 Fix world heights 2012-03-02 00:18:31 +01:00
snowleo
bf497b0a49 Min version CB# 2004 2012-03-02 00:12:22 +01:00
snowleo
84354db25e New eggs 2012-03-02 00:09:50 +01:00
snowleo
bf61edd3bb New Entities and Items for 1.2 2012-03-02 00:06:57 +01:00
snowleo
384e41bf41 CB#2004 B#1368 2012-03-01 23:57:34 +01:00
KHobbits
62ea760a96 Merge branch 'master' of github.com:essentials/Essentials 2012-03-01 22:37:15 +00:00
KHobbits
ff2735c19d Kit sign cleanup 2012-03-01 22:36:51 +00:00
snowleo
96b6e03f28 update inventory 2012-03-01 23:23:23 +01:00
snowleo
3820b32b57 Bukkit broke this sign :( 2012-03-01 23:10:12 +01:00
KHobbits
a4751e9781 Fix kit timers resetting on server restart. 2012-03-01 22:04:50 +00:00
KHobbits
fd343fba0b Fix version matching. 2012-03-01 21:47:01 +00:00
snowleo
75309ca64a Merge branch 'refs/heads/master' into release 2012-03-01 19:08:52 +01:00
snowleo
ecbbc9f29c EntityType instead of CreatureType 2012-03-01 19:05:50 +01:00
snowleo
ebdfe0fd41 Requires #1988 because of the new Inventory stuff 2012-03-01 19:05:50 +01:00
snowleo
179cdddc01 Updated to R6 2012-03-01 19:05:50 +01:00
snowleo
bc2e4e5db8 CB# 1988 B# 1360 2012-03-01 19:05:49 +01:00
md_5
a6be13f135 Separate config sections evenly 2012-03-01 19:05:47 +01:00
md_5
c5709c20a0 Remove old, unwanted manifest.mf files 2012-03-01 19:05:47 +01:00
ElgarL
b48ad9c018 Make 'manload' reload the config correctly. 2012-03-01 19:05:47 +01:00
KHobbits
9d2f892f6e Updating Bukkit: CB #1858, B #1334 2012-03-01 19:05:47 +01:00
snowleo
6f9654ea9b Merge remote-tracking branch 'origin/groupmanager' 2012-03-01 17:33:25 +01:00
snowleo
42ff4fc59c EntityType instead of CreatureType 2012-03-01 17:33:09 +01:00
snowleo
4474137065 Requires #1988 because of the new Inventory stuff 2012-03-01 16:17:40 +01:00
snowleo
b3422cccc9 Updated to R6 2012-03-01 16:16:05 +01:00
snowleo
be14822ae3 CB# 1988 B# 1360 2012-03-01 16:16:05 +01:00
md_5
10ccc503ee Merge remote-tracking branch 'origin/master' 2012-03-01 16:23:21 +11:00
md_5
f96c546e3c Separate config sections evenly 2012-03-01 14:40:57 +11:00
md_5
1195149c4d Remove old, unwanted manifest.mf files 2012-03-01 12:27:59 +11:00
ElgarL
a36136689e Make 'manload' reload the config correctly. 2012-02-28 10:46:10 +00:00
KHobbits
5df5c29afd Adding option to log all eco api transactions. 2012-02-28 02:45:03 +00:00
KHobbits
3af589bfd8 Prevent EssSpawn trying to handle spawning of jailed players. 2012-02-28 02:45:03 +00:00
KHobbits
3b01f4cd1b Change jail listener to catch respawn at Highest 2012-02-28 02:45:03 +00:00
KHobbits
8cb110cd99 Allow people to hit exactly 'min money'. 2012-02-28 02:45:03 +00:00
KHobbits
7e78104594 Cleanup. 2012-02-28 02:45:03 +00:00
KHobbits
7ce9f719c1 Adjustments to negative eco give/take. 2012-02-28 02:45:03 +00:00
KHobbits
0ca7613976 Display users new balance on /eco give/take. 2012-02-28 02:45:02 +00:00
KHobbits
edd1636b7e Add Minimum Balance, to allow people to manage overdrafts. 2012-02-28 02:45:02 +00:00
KHobbits
60157e5a8c Adding option to log all eco api transactions. 2012-02-27 15:31:43 +00:00
KHobbits
685edfff51 Prevent EssSpawn trying to handle spawning of jailed players. 2012-02-27 03:40:18 +00:00
KHobbits
912046a523 Change jail listener to catch respawn at Highest 2012-02-27 03:24:58 +00:00
KHobbits
7a74e56421 Allow people to hit exactly 'min money'. 2012-02-26 05:10:04 +00:00
KHobbits
7976f19345 Cleanup. 2012-02-26 05:06:03 +00:00
KHobbits
1a4f2aeb57 Adjustments to negative eco give/take. 2012-02-26 05:01:40 +00:00
KHobbits
8df4e9c3ab Display users new balance on /eco give/take. 2012-02-26 04:27:29 +00:00
KHobbits
27ae50e3e3 Add Minimum Balance, to allow people to manage overdrafts. 2012-02-26 04:15:14 +00:00
KHobbits
c58c28b44f Updating Bukkit: CB #1858, B #1334 2012-02-25 17:57:26 +00:00
KHobbits
555cbbc759 Lowering min bukkit to r4 - 1838, this build should still be compatible. 2012-02-25 17:40:00 +00:00
KHobbits
df8c6bae5a Merge branch 'master' into release 2012-02-25 17:22:39 +00:00
KHobbits
726284578f Merge remote branch 'remotes/origin/groupmanager' 2012-02-25 17:22:01 +00:00
ElgarL
78fef80baf Prevent promoting players to, and demoting to GlobalGroups. 2012-02-25 09:29:54 +00:00
ElgarL
3bf7fa1362 Prevent adding inheritances to globalgroups. These are permissions
collections, not player groups.
2012-02-25 09:22:54 +00:00
KHobbits
0df8cb0b07 Write to user files less, on money update. 2012-02-23 17:25:00 +00:00
KHobbits
2fbacc8f60 Balance top now has server total on first line.
Balance top will update ess balance backup if using register/vault eco.
2012-02-23 15:17:23 +00:00
KHobbits
7b13aebc5a Fixing upgrade script to allow powertool upgrade. 2012-02-23 14:49:23 +00:00
KHobbits
d0acabaaa0 Fixing kits for new config classes. 2012-02-22 12:32:51 +00:00
KHobbits
82471f9531 Extra command aliases. 2012-02-22 01:29:37 +00:00
KHobbits
21b982f068 Powertools dispatch commands as delayed tasks (should reduce any conflict issues). 2012-02-22 00:23:04 +00:00
KHobbits
c6b1a8af23 Switch powertools to use different event.
Reduce multiple triggering of powertool events.
Abort event when used with powertool.
2012-02-22 00:11:21 +00:00
KHobbits
97157bc1fb Fix powertools with new config format. 2012-02-22 00:10:13 +00:00
KHobbits
8c706a4537 Check to see if home section exists. 2012-02-21 22:19:56 +00:00
KHobbits
1a2f844bfa Fixing home list. 2012-02-21 22:12:37 +00:00
KHobbits
377bdb7c22 Fix /sudo message display. 2012-02-21 21:39:25 +00:00
ElgarL
d89028841e Removed BukkitPermsOverride as this is now the default with bukkit
handling child nodes.
2012-02-21 18:40:54 +00:00
ElgarL
674832c2f6 Update for Bukkit R5 compatability.
Removed some unused variables.
2012-02-21 18:38:08 +00:00
snowleo
b41444d87a Never give our user object to other plugins! 2012-02-21 18:41:27 +01:00
snowleo
7c270b0b5a Merge branch 'refs/heads/groupmanager' 2012-02-21 17:34:45 +01:00
snowleo
406295a548 Updated Essentials to work with R5 2012-02-21 17:33:46 +01:00
snowleo
3062035236 CB#1952
B#1330
2012-02-21 16:47:25 +01:00
KHobbits
5aee6269d3 Merge branch 'master' into release 2012-02-19 01:20:50 +00:00
KHobbits
2b4b2034ae Add bPerm2 support for chat prefixes. 2012-02-18 22:47:38 +00:00
KHobbits
984bd949fd Little bit of extra info in the default /einfo file 2012-02-18 22:08:18 +00:00
KHobbits
8de2b1520f Re-allow colours in newb welcome messages. 2012-02-18 21:34:05 +00:00
KHobbits
d0c89f4e9f Adding full keyword support for newb join message.
Also adding {ADDRESS} and {USERNAME} as new keywords.
2012-02-18 21:09:18 +00:00
ElgarL
b70ac29033 A command of '/manload' with no world arguments now performs a full
reload of GM.
2012-02-18 09:05:28 +00:00
KHobbits
bccd39a623 Don't try to use old bPerms API if it is not available. 2012-02-16 23:44:13 +00:00
KHobbits
d336b79cf2 Fixing being charged twice for /back. 2012-02-16 16:57:50 +00:00
KHobbits
7dd76b55a7 Merge remote branch 'remotes/origin/master' into release 2012-02-15 19:09:02 +00:00
md_5
34abbfbbd2 Its a good idea to actually register the listeners 2012-02-15 19:55:41 +11:00
md_5
c0f9ff869b Make Essentials Update use new Listener system, and fix a few general mistakes, including that of the config 2012-02-15 19:34:46 +11:00
md_5
db2974e03e Fix formatting in the config.yml and plugin.yml files. Add a new author. 2012-02-15 17:57:53 +11:00
md_5
0f0716d8fa Add all the new R4 methods 2012-02-15 17:53:47 +11:00
md_5
6f40ed48e1 Update to 1.1-R4 2012-02-15 17:44:35 +11:00
md_5
8bfe7fb584 Remove dropItems from the inventory work around 2012-02-15 17:21:28 +11:00
ElgarL
c8079169f1 comment name change 2012-02-15 06:16:33 +00:00
ElgarL
341e5b0599 Depreciate PlayerTeleportEvent, PlayerRespawnEvent and PlayerPortalEvent
as it's all handled in PlayerChangedWorldEvent.
This also means we no longer update permissions before we change
worlds.
2012-02-15 06:15:31 +00:00
KHobbits
f058b6c6ca Merge branch 'master' into release 2012-02-14 23:56:02 +00:00
KHobbits
61db2dbb1c /spawnmob - Only list mobs you have permission to spawn. 2012-02-14 23:55:29 +00:00
snowleo
c475db78a8 Don't return null, throw an exception 2012-02-14 20:30:06 +01:00
snowleo
713024c873 Merge pull request #49 from Iaccidentally/patch-2
fix typo in config.yml (another one)
2012-02-14 11:21:52 -08:00
Iaccidentally
c4e5b7ffdd fix typo in config.yml (another one) 2012-02-14 14:21:07 -05:00
snowleo
715c2401af Merge pull request #48 from Iaccidentally/patch-1
fix typo in config.yml
2012-02-14 11:18:03 -08:00
Iaccidentally
66f0b02003 fix typo in config.yml 2012-02-14 14:16:34 -05:00
ElgarL
660bb8912e Depreciate PlayerTeleportEvent as it's all handled in
PlayerChangedWorldEvent.
2012-02-14 13:01:39 +00:00
snowleo
786a3dedeb Less sanitizing for more performance 2012-02-13 21:32:05 +01:00
KHobbits
734cea470d Caching regex return in user cleanup.
(Pushing this for testing purposes).
2012-02-13 19:40:33 +00:00
KHobbits
02f9f57544 Merge branch 'master' into release 2012-02-13 17:35:05 +00:00
KHobbits
94db92be0d Merge remote branch 'remotes/origin/groupmanager' 2012-02-13 17:24:32 +00:00
KHobbits
117dbbc796 Merge branch 'master' of github.com:essentials/Essentials 2012-02-13 17:17:14 +00:00
KHobbits
33b4ad33e0 Allow charges for different mob types in /spawner 2012-02-13 17:16:27 +00:00
KHobbits
00553ad69a Add per warp command costs
Make warp other commands charge the commander, not the warped.
2012-02-13 17:09:07 +00:00
md_5
77e1ea06dd Clean up the CommandException stack traces so they appear as if Essentials was never there. 2012-02-12 08:19:24 +11:00
KHobbits
c6a96bc7a3 Update trade signs properly, and visibly handle full signs. 2012-02-11 21:15:26 +00:00
KHobbits
303ddc8119 Merge pull request #46 from krinsdeath/master
Added Privileges to known Permissions plugins
2012-02-11 12:12:59 -08:00
KHobbits
cb8c095436 Refactoring tpaccept perm check to include tpaall. 2012-02-11 20:10:19 +00:00
KHobbits
6b5eb94176 Merge pull request #45 from Wolvereness/master
Fix /tpaccept permission check
Refactoring to follow.
2012-02-11 12:06:42 -08:00
Jeff Wardian
6b4d7af24d Added PrivilegesHandler.java;
Implemented privileges in PermissionsHandler.java;

Fixed PrivilegesHandler.canBuild();
2012-02-11 10:06:18 -08:00
ElgarL
2b854b217e Change Service registration to register WorldsHolder instead of
AnjoPermissionsHandler. This is the correct entry point for all data.
2012-02-11 10:36:55 +00:00
Wolvereness
62b354a989 Fix exploit with /tpaccept if sender no longer has permission 2012-02-09 23:14:57 -06:00
KHobbits
0fb981a56d Allow colour codes in /ping 2012-02-09 22:13:00 +00:00
KHobbits
e6b4b61ed2 New Permission: essentials.sudo.exempt
If a user has this perm, they cannot be controlled.
2012-02-09 22:11:46 +00:00
KHobbits
6c6e960aa0 Optional argument to /ping [message]- Message to be echo'd.
Possible use in scripts, checking for lag, /sudo, etc.
2012-02-09 22:02:24 +00:00
KHobbits
373f0a1460 Fixing silly typo - Fixes shout costs. 2012-02-09 02:11:36 +00:00
ElgarL
3b02d9ee91 Add some commenting 2012-02-05 16:41:34 +00:00
ElgarL
aaa92afc12 Fix world mirroring so it correctly creates data files and data sources
for partially mirrored worlds.
Fixed world mirroring so it returns the correct data for the
requested world
2012-02-05 16:30:58 +00:00
ElgarL
fadc8455cb Prevent getAllPlayersPermissions() processing a group more than once.
Improves performance when using complex inheritance structures.
2012-02-02 18:10:35 +00:00
KHobbits
cbcb6d2ad5 Merge branch 'master' into release 2012-02-02 11:41:18 +00:00
KHobbits
c96e691af6 Make it so ops can build, even if they don't have the matching permission. 2012-02-02 10:43:17 +00:00
KHobbits
722c3d27de Force minimum CB version to 1846, don't want people on #1840 due to big bugs. 2012-02-02 10:32:18 +00:00
KHobbits
5e5452d926 Fixing repair to not repair items with datavalues, unless they actually have a durability. 2012-02-02 10:27:35 +00:00
KHobbits
55d5961fd5 Craftbukkit #1846 Bukkit #1211 2012-02-02 10:27:09 +00:00
KHobbits
aef06e21c8 Recover from broken config files, but keep a backup of the old one for purpose of data recovery. 2012-02-02 09:48:56 +00:00
KHobbits
31f16f2d06 Extend valid characters to be a little less strict. 2012-02-02 09:37:30 +00:00
KHobbits
8a15a08d0f Sanitize mail for untoward characters.
Prevent a user error from terminating essentials timer task.
2012-02-02 09:26:36 +00:00
ElgarL
cc6b2b7f8f fix setGroup to only block superperms update if update is false. 2012-02-02 02:41:10 +00:00
ElgarL
1894a5621c Fix a bug with getWorldData return the main world data for all mirrors,
instead of the worlds parent data.
2012-02-02 02:01:04 +00:00
KHobbits
65f39f621d More info, and less severe warning on jail error. 2012-01-31 08:33:14 +00:00
KHobbits
1ae2f60e7c Update jails to new event system. 2012-01-31 08:06:50 +00:00
ElgarL
dd1ce93811 Catch all errors in badly formatted groups. 2012-01-31 03:16:34 +00:00
ElgarL
a6eee4f654 Track the 'onPlayerChangeWorld' event as some teleports seem to not be
triggering a world move.
2012-01-30 17:08:55 +00:00
ElgarL
18fa38f3c0 Auto sort permissions on load to speed up population of superperms.
Negating a parent node after adding all nodes with * will now
correctly remove all child nodes of that parent before populating
superperms.
	  eg.
	      - '*'
	      - -vanish.*
	      - vanish.standard
2012-01-30 14:41:19 +00:00
KHobbits
098c4e5afd Merge branch 'master' into release 2012-01-30 05:36:03 +00:00
KHobbits
8bb14feca9 Remove invalid item spawn blacklist warning during startup. 2012-01-29 23:36:27 +00:00
KHobbits
e59029ec66 Merge branch 'master' into release 2012-01-29 21:44:30 +00:00
KHobbits
67bf4a58fe Prevent /home bed, if the bed was later destroyed. 2012-01-29 21:44:15 +00:00
KHobbits
61a66110cb Merge branch 'master' into release 2012-01-29 21:39:05 +00:00
ElgarL
8946f3a75a .project change for Eclipse Build tool 2012-01-29 21:37:50 +00:00
KHobbits
ae401f1fca Fixing Kill/suicide in creative mode. 2012-01-29 21:37:38 +00:00
KHobbits
99b0261ae8 Merge branch 'master' into release 2012-01-29 21:20:56 +00:00
KHobbits
b5c50ed219 New craftbukkit
CB 1840, B 1208
2012-01-29 21:06:55 +00:00
KHobbits
3ef32d1269 Merge remote branch 'remotes/origin/groupmanager' 2012-01-29 20:57:54 +00:00
KHobbits
9f552f39b3 Fix boolean fail in /r offline checking. 2012-01-29 20:57:17 +00:00
ElgarL
71d5488018 updating .gitignore 2012-01-29 11:04:52 +00:00
ElgarL
c7474a9020 Fix players retaining permissions when demoted. 2012-01-29 10:54:24 +00:00
KHobbits
b96862b170 Merge branch 'master' into release 2012-01-29 05:00:04 +00:00
KHobbits
67e4828984 Optional second argument to /tpaccept, it will only accept the request if the sender matched that string. 2012-01-29 04:59:30 +00:00
KHobbits
b4ce35bafc Added kit note.
Fixes #1276
2012-01-29 03:26:44 +00:00
KHobbits
a1210ea119 Kill people the proper way.
Test #1410
2012-01-29 03:23:38 +00:00
KHobbits
9438375c49 Switch /near priority to check for int first.
Test #1269
2012-01-29 03:09:59 +00:00
KHobbits
ba8aa8bf28 Make sure player is online when sending a /reply. 2012-01-29 02:57:52 +00:00
KHobbits
48f392d62a Merge branch 'master' into release 2012-01-29 01:45:40 +00:00
KHobbits
8e36855fb8 Merge remote branch 'remotes/origin/groupmanager' 2012-01-29 01:45:03 +00:00
KHobbits
edc0da55d2 Prevent disabled sign creation (if any of essentials signs are enabled) 2012-01-29 01:42:55 +00:00
KHobbits
33839ca0c9 Fix sign list format. 2012-01-29 01:38:24 +00:00
KHobbits
65c8f38e10 Disable all signs by default. 2012-01-29 01:27:04 +00:00
KHobbits
a19ffe10a5 Added options to enable each sign type 2012-01-29 01:12:38 +00:00
ElgarL
3f2baa3c0b silly formatting change to test gitbot 2012-01-28 18:01:17 +00:00
KHobbits
62b6ec4397 Merge branch 'master' into release 2012-01-28 12:59:15 +00:00
KHobbits
7afb0d845e Merge remote branch 'remotes/origin/groupmanager' 2012-01-28 12:58:37 +00:00
ElgarL
4c78ab4f2a fix for an iterator error if there is only one element in the array. 2012-01-28 11:59:54 +00:00
ElgarL
17a3497b00 Fixed a bug when pushing superperms in the wrong order. 2012-01-28 11:47:39 +00:00
KHobbits
1214d93050 Only list bed home if it is set. 2012-01-28 01:39:51 +00:00
KHobbits
b53b75caa0 Allow space as well as : in /delhome 2012-01-28 01:32:15 +00:00
KHobbits
e6d525a168 Stop users from using /sethome bed 2012-01-28 01:09:02 +00:00
KHobbits
e82ee71bd9 If bed home is set, give priority when spawning. 2012-01-28 00:57:08 +00:00
KHobbits
72885e1d6c Check bed still exist, for bed homes. 2012-01-28 00:49:22 +00:00
KHobbits
085250c72f Switch website URL's to point at wiki. 2012-01-28 00:20:46 +00:00
ElgarL
7695c9f5c7 Properly fix inherited negated nodes. 2012-01-27 13:09:11 +00:00
ElgarL
25806e7fa8 do not allow inherited permissions to negate higher perms. 2012-01-27 12:38:00 +00:00
KHobbits
9be34c899f Merge branch 'master' of github.com:essentials/Essentials 2012-01-26 21:21:35 +00:00
KHobbits
e47043589f Revert emergency listener to old style
Stops peoples world world burning down if they throw in 2.8, on a 1.0 server.
2012-01-26 21:21:13 +00:00
snowleo
4da91e7de7 Merge branch 'refs/heads/master' into release 2012-01-26 04:51:10 +01:00
snowleo
9a14b9be16 Minor fix to french translation 2012-01-26 04:49:26 +01:00
Léa Gris
3cb6a4af3a i18n added to command nuke 2012-01-26 04:46:00 +01:00
Léa Gris
ab6f00707d Updated translations to Essentials Dev2.7.191 2012-01-26 04:45:16 +01:00
KHobbits
06fee668d6 Merge branch 'master' into release 2012-01-26 00:31:05 +00:00
KHobbits
22c5a67d66 Set min bukkit to 1818 - RB 2012-01-26 00:30:33 +00:00
KHobbits
0987606eff Merge remote branch 'remotes/origin/groupmanager' 2012-01-26 00:28:10 +00:00
ElgarL
6642d9996a Fixed an infinite loop error when using '/manudel' on a logged in
player. It caused setDefaultGroup to trigger a bukkit update when no GM
User existed yet.
2012-01-25 23:44:14 +00:00
ElgarL
29ca77791c Trap errors in fetching the mirrors map. 2012-01-25 22:43:07 +00:00
ElgarL
d6d4afc3f5 Check for a null player object in the PlayerTeleportEvent. 2012-01-25 22:35:24 +00:00
ElgarL
8a5eba9664 Fixed subgroups (I broke earlier). 2012-01-25 22:33:22 +00:00
ementalo
43490864ee Merge branch 'master' into release 2012-01-25 14:29:05 +00:00
paul.aston
1f12d77a3f CB #1818
RB #1200
2012-01-25 14:23:46 +00:00
Paul A.
da6ad4567a Merge pull request #43 from essentials/groupmanager
Fix trying to modify an unmodifiable collection breaking superperms.
2012-01-24 17:29:08 -08:00
ElgarL
d7bc467ee3 Fix trying to modify an unmodifiable collection breaking superperms. 2012-01-25 01:20:44 +00:00
KHobbits
0fc118dc3a Merge branch 'master' into release 2012-01-25 00:04:08 +00:00
KHobbits
157861ee39 Merge remote branch 'remotes/origin/groupmanager' 2012-01-25 00:02:15 +00:00
ementalo
0a05cda9bc Don't try to spawn users who have disconnected before we have a chance to spawn them 2012-01-24 22:43:33 +00:00
ElgarL
8ba637a50a Fix typo/wording in changelog
Allow negation to the * permission node when populating superperms.
2012-01-24 19:41:22 +00:00
ElgarL
45ad79a0c2 Allow negations with the * permission node when population superperms. 2012-01-24 19:38:22 +00:00
ElgarL
6daee7b8a2 Fix hasOwnData to return a correct result with new mirroring system 2012-01-24 15:37:21 +00:00
ElgarL
ee9fcce050 Fixed isInList 2012-01-24 15:35:20 +00:00
ElgarL
5f626f1866 addSubGroup now returns a boolean for success/failure.
'/manuaddsub' now correctly reports if it was able to add the sub
group.
2012-01-24 14:21:07 +00:00
ElgarL
7d011cfe3a Added recursive loop detection for World mirroring (you may not set the
main world as a mirror of another).
Fixed fetching world data so it no longer returns the mirrored world
for groups. Each world data holder now points to the correct data set,
so can be returned as an object.
2012-01-24 14:08:53 +00:00
snowleo
a8689569a1 Merge branch 'refs/heads/master' into release 2012-01-24 03:43:49 +01:00
snowleo
08b4b9f0b5 Merge branch 'refs/heads/groupmanager' 2012-01-24 03:43:17 +01:00
ementalo
c2135961b4 Add new permission essentials.protect.alerts.notrigger
If user has this permisson they do not trigger EssProtect block alerts
2012-01-23 15:48:56 +00:00
ElgarL
20e3179b3a Fixed infinite loop error on player join.
Optimized code to only update the player logging in instead of all
players online.
2012-01-22 23:46:26 +00:00
ElgarL
d83c7da92b Separated all events to be independent classes. 2012-01-21 20:18:40 +00:00
ElgarL
e638ef4f99 Fixed a random null error upon a player portaling. 2012-01-21 19:09:08 +00:00
KHobbits
fa1d29b4db Merge branch 'master' into release 2012-01-21 17:19:12 +00:00
ElgarL
be5c90e0b9 Update to new Bukkit Event system.
Update GroupManagerBridge for new event system.
2012-01-21 11:47:08 +00:00
KHobbits
113f6a2ee6 Catching throwable leads to madness, lets do this safely. 2012-01-21 00:19:13 +00:00
KHobbits
ea58fe02cc Catch errors too, incase the class doesn't exist. 2012-01-21 00:01:43 +00:00
KHobbits
33d761e55a Messages Cleanup 2012-01-20 23:13:37 +00:00
KHobbits
8b3501353e If vault throws an exception, it should not be enabled. 2012-01-20 23:04:43 +00:00
KHobbits
801815d2ab Adding translation keys for [L] and [Spy] 2012-01-20 22:57:35 +00:00
KHobbits
19ca37d392 Check shout/question messages are longer than 1 character. 2012-01-20 22:54:47 +00:00
snowleo
a44c6d51f7 Removing load info, bucket displays that now. 2012-01-20 05:52:35 +01:00
snowleo
49318ba78f New Event code for EssentialsSpawn 2012-01-20 05:34:28 +01:00
snowleo
3315019203 Update for new CraftBukkit Event Code
EssentialsSpawn can't be updated yet, because the new event system lacks dynamic priorities.
2012-01-20 05:20:37 +01:00
snowleo
6ff7e6fd25 CB#1791 2012-01-20 04:09:35 +01:00
KHobbits
fabb33ff49 Fix EssChat displayname error. 2012-01-19 15:51:55 +00:00
KHobbits
45a44b526e Merge remote branch 'remotes/origin/groupmanager' 2012-01-19 15:34:00 +00:00
KHobbits
df826932bc Fix Lombok include. 2012-01-19 15:08:37 +00:00
ElgarL
a5fb87e1d0 Fixed text when adding a subgroup to not say the player was moved. 2012-01-19 13:08:57 +00:00
snowleo
58300d41f8 Update of Lombok, fixes memory leak in Netbeans 2012-01-19 13:17:05 +01:00
ElgarL
4661382e7b Remove debug spam 2012-01-19 12:08:39 +00:00
snowleo
d326a1fcea Cache MessageFormats for Chat 2012-01-19 02:03:20 +01:00
KHobbits
03a748c027 Compiled regex is faster. 2012-01-18 23:35:30 +00:00
KHobbits
3c4076d4c6 Make sure to clean the chatStore. 2012-01-18 23:08:40 +00:00
KHobbits
c2b08079d7 Reduce duplicate calls in EssentialsChat
Should cut the time down a little.
2012-01-18 22:53:39 +00:00
KHobbits
e1b44c28e3 Merge remote branch 'remotes/origin/groupmanager' 2012-01-18 20:04:50 +00:00
ElgarL
6d59abaf72 Better optimize assembling of a players permissions and allow the * node
to populate all registered superperms.
2012-01-18 16:39:12 +00:00
ElgarL
a40ec03249 Added a tidy error message for invalid permission entries in
GlobalGroups.
2012-01-18 01:25:25 +00:00
KHobbits
7f633a110d Merge remote branch 'remotes/origin/groupmanager' 2012-01-17 23:50:05 +00:00
KHobbits
8096291cfa Merge remote branch 'remotes/origin/groupmanager' 2012-01-17 23:49:38 +00:00
ElgarL
6676461f65 v 1.9:
Optimize populating Bukkit perms so we no longer calculate the
child
nodes (Bukkit already does this).
2012-01-17 18:03:16 +00:00
KHobbits
93f8896ee4 Merge branch 'master' of github.com:essentials/Essentials 2012-01-17 17:40:22 +00:00
KHobbits
3617c00798 Auto Update GM Version 2012-01-17 17:24:22 +00:00
snowleo
9f794f2c51 Shorter names for enchantment signs. 2012-01-17 01:45:03 +01:00
KHobbits
523ca2181d Stripping vanilla colour from /helpop and /mail
Adding support for &k in EssChat
Adding support for colour in /msg and /r - New perm: essentials.msg.color
2012-01-16 20:25:36 +00:00
KHobbits
e1f64534b2 Merge branch 'master' of github.com:essentials/Essentials 2012-01-16 19:42:37 +00:00
KHobbits
6e1a0e538f Stripping vanilla colours from /msg 2012-01-16 19:42:15 +00:00
snowleo
ebdf2167fe Fix /nick command colors 2012-01-16 20:38:53 +01:00
snowleo
cb3f60c1be Strip colors from chat, if the user does not have the permission. 2012-01-16 20:29:55 +01:00
KHobbits
35d66e83eb Removing debugging message from player login. 2012-01-16 18:58:44 +00:00
snowleo
8b02090ecc Cleanup 2012-01-16 19:11:41 +01:00
KHobbits
1cf3599b05 Adding support for Vault as a fallback economy method. 2012-01-16 18:00:43 +00:00
KHobbits
41b84f9f26 Merge remote branch 'remotes/origin/master' into release 2012-01-16 12:43:09 +00:00
snowleo
517b5428d1 Optimize TextInput to cache motd and info textfiles. 2012-01-16 04:51:27 +01:00
snowleo
80dcf9b37d Revert changes to Usermap 2012-01-16 02:12:20 +01:00
snowleo
5ab7edb941 Optimize Break in Protect 2012-01-16 01:55:04 +01:00
snowleo
68335ba3a2 Speed improvements for Move and Interact Event. 2012-01-16 00:50:52 +01:00
ElgarL
a69f212232 Removed '- bukkit.command' form the globalgroups permission nodes. 2012-01-15 01:43:42 +00:00
snowleo
42abc50240 Reload less 2012-01-14 23:25:52 +01:00
snowleo
543a85e13e Temporary fix for Spawns and Jails when Worlds are loaded after Essentials.
This will be replaced by BetterLocation fix in 3.0 branch.
2012-01-14 23:13:58 +01:00
KHobbits
31844275d7 Allowing use of aliases in help/info/motd, for command suggestions.
Test #1441
2012-01-14 16:53:18 +00:00
KHobbits
700cc5d024 Fixing double charges on /home
Test #1426
2012-01-14 16:42:53 +00:00
KHobbits
0a9f815fbb Fixing {WorldDate}
Test #1353
2012-01-14 16:36:19 +00:00
KHobbits
7197cc2810 Merge branch 'master' into release 2012-01-14 15:52:55 +00:00
KHobbits
72c3ca0b47 Merge remote branch 'remotes/origin/groupmanager' 2012-01-14 15:52:22 +00:00
ElgarL
dd93d7f99c Catch NullPointerErrors generated by blank permission nodes. 2012-01-14 15:48:55 +00:00
KHobbits
d0e5c26ecf Update Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java 2012-01-14 15:04:16 +00:00
KHobbits
9add949b1a Merge branch 'master' into release
~ GM needs testing before release ~
2012-01-14 13:16:33 +00:00
KHobbits
ce6f6ad855 Removing debugging messages. 2012-01-13 22:50:48 +00:00
KHobbits
d242de8cc8 Adjusting default spawn behavior.
Moving option in config file.
2012-01-13 22:41:47 +00:00
snowleo
9006183de4 Merge branch 'refs/heads/groupmanager' 2012-01-13 01:38:54 +01:00
snowleo
d09343a603 Add new eggs to items.csv 2012-01-12 23:56:39 +01:00
snowleo
1d52b4b2bc Min Bukkit version is 1713 now 2012-01-12 23:43:11 +01:00
snowleo
561dccd5a0 Added the new Enchantments 2012-01-12 23:42:04 +01:00
snowleo
955843d6a0 Netbeans 7.1 stuff 2012-01-12 23:37:39 +01:00
snowleo
bf3253e056 CB#1713 B#1136 2012-01-12 23:36:45 +01:00
ElgarL
e23f1dd18f Major, MAJOR changes to support partial/full world mirroring.
You can now mirror groups.yml, users.yml or both files between
different worlds.
2012-01-11 05:51:40 +00:00
ElgarL
fac659a61a Optimize fetching of Mirrored world data. 2012-01-10 18:40:34 +00:00
ElgarL
49a19a7717 Changed over to a reflection method for populating superperms as Bukkit
lags when you handle permissions one at a time.
2012-01-09 02:00:58 +00:00
ElgarL
5b19ecdca8 Fix 'manucheckp' to correctly report if a permission is available from
GroupManager or Bukkit.
2012-01-05 19:43:30 +00:00
ElgarL
d712bca8c7 Reload GlobalGroups when you perform a world load.
Changed GlobalGroups to save/load before local groups in the
scheduled data saving/loading
2012-01-03 02:04:48 +00:00
snowleo
dbaf510ad0 Merge pull request #42 from jjkoletar/patch-1
No sending to all players, must specify target.
2012-01-01 16:38:05 -08:00
Jeremy
89aa3141f2 No sending to all players, must specify target. 2012-01-01 18:18:29 -06:00
ElgarL
373a240ae2 Changed the way events are raised to prevent variable corruption. 2011-12-29 14:52:42 +00:00
ElgarL
424b3427bb Decreased ranks of default users so idiots who don't remove them can't
get 'hacked' when in offline mode.
2011-12-22 17:01:10 +00:00
ElgarL
ffb78ae31b Delayed GroupManager events so Superperms will be fully updated before
plugins receive the events.
2011-12-20 17:21:55 +00:00
snowleo
4cb7ac8f03 Only info not a warning if a file is missing 2011-12-20 12:25:30 +01:00
snowleo
ffd466a782 Only info not a warning if a file is missing 2011-12-20 12:24:59 +01:00
snowleo
3b25ae006e Correctly match release and non release versions of bukkit. 2011-12-20 12:20:41 +01:00
snowleo
5c02de8503 Correctly match release and non release versions of bukkit. 2011-12-20 12:20:12 +01:00
snowleo
9e1d263555 Fix sending our player object to other plugins. 2011-12-20 11:57:51 +01:00
snowleo
98dcf3c077 Fix sending our player object to other plugins. 2011-12-20 11:57:22 +01:00
ElgarL
e7b90734e2 Expanded GlobalGroups.yml and Groups.yml to include Towny permissions. 2011-12-19 19:22:04 +00:00
ElgarL
a5e630a9e1 manpromote and mandemote now correctly sent the notification to the
console if the command was issued there.
2011-12-19 15:44:27 +00:00
snowleo
160803b082 Always return an offlineplayer object with the name, that the user wants. 2011-12-19 12:57:09 +01:00
snowleo
a092dce959 Fix double names in /balancetop and show display name in balancetop 2011-12-19 12:39:23 +01:00
snowleo
be7f831080 Merge branch 'refs/heads/master' into release 2011-12-19 12:07:28 +01:00
KHobbits
37b44a03ed Merge branch 'master' of github.com:essentials/Essentials 2011-12-19 10:57:44 +00:00
KHobbits
4a6f6cf32a Prevent future warps being named as numbers. 2011-12-19 10:57:18 +00:00
snowleo
d1b3ab05b0 More null checks for Jails 2011-12-19 11:53:52 +01:00
KHobbits
290ebe284b Merge remote branch 'remotes/origin/master' into release 2011-12-19 05:04:15 +00:00
ElgarL
29a3f9d07c Fixed a typo 2011-12-18 15:21:56 +00:00
ElgarL
e23a69474d Fixed manucheckp on group (missed it in last commit) 2011-12-18 14:35:14 +00:00
ElgarL
5121367707 Fixed 'manucheckp' returning a null for the searched node when it's a
group/subgroup.
2011-12-18 14:26:00 +00:00
ElgarL
9a1a6c1491 Changed ServicesManager registration to lowest from normal. 2011-12-18 04:25:54 +00:00
KHobbits
b70962b12c Merge branch 'master' of github.com:essentials/Essentials 2011-12-15 20:47:24 +00:00
KHobbits
f58ed3f512 Make powertool use a chat event, instead of just messaging each user. 2011-12-15 20:47:06 +00:00
snowleo
475d173216 Corrected version match for 1597 build version 2011-12-15 10:32:04 +01:00
ElgarL
a3446c1a26 Removed op permissions from admins in the default GloblaGroups.yml. 2011-12-14 16:24:47 +00:00
snowleo
04515217f5 Fix failing override for /enchant /eco /ext 2011-12-14 15:07:08 +01:00
snowleo
04cb15fdb0 Merge branch 'refs/heads/master' into release 2011-12-14 11:56:09 +01:00
snowleo
258a5b9868 Merge branch 'refs/heads/groupmanager' 2011-12-14 10:03:32 +01:00
ElgarL
c277858790 deleting the contents of GlobalGroups.yml will no longer thrown a
NullPointerException.
2011-12-14 04:26:02 +00:00
KHobbits
f251cd14ba Read current exp, instead of stored exp.
This means that exp used in enchanting is subtracted from total exp.
2011-12-14 03:41:24 +00:00
snowleo
21059b6a8d Merge branch 'refs/heads/master' into release 2011-12-13 23:52:58 +01:00
snowleo
9d984faefe Merge branch 'refs/heads/groupmanager' 2011-12-13 23:52:25 +01:00
ElgarL
19a4da4bd0 GM now registers with Bukkits ServicesManager. 2011-12-13 18:20:02 +00:00
ElgarL
16f76f7828 Update event Action names to be unique 2011-12-13 17:32:39 +00:00
ElgarL
6f77addc71 Added custom events so plugins can now be notified of changes within
GroupManager.
2011-12-13 17:13:53 +00:00
KHobbits
f66c3793d7 Fixing killall command definition. 2011-12-13 09:38:20 +00:00
snowleo
c144d188cf Merge branch 'refs/heads/master' into release 2011-12-13 10:32:59 +01:00
snowleo
9579953f03 Renamed /butcher to /killall and fixes to the code. 2011-12-13 10:28:15 +01:00
snowleo
f3f8243de8 Netbeans 7.1 changes for EssentialsUpdate 2011-12-13 08:46:50 +01:00
snowleo
f30811cd89 Tiny fix to the last commit. 2011-12-13 08:41:28 +01:00
snowleo
590c184433 Better exp fix and allow exp on buy and sell signs. 2011-12-13 08:38:15 +01:00
snowleo
e021360613 Disabling exp as currency. Normal money will be used. 2011-12-13 07:35:46 +01:00
KHobbits
c70bff04b7 Update exp trade signs on purchase. 2011-12-13 04:52:09 +00:00
KHobbits
1f7d722f35 Fixing Sell/Buy Signs which use EXP as a currency. 2011-12-13 04:29:16 +00:00
KHobbits
dcc1cd15b4 Merge branch 'master' of github.com:essentials/Essentials 2011-12-13 03:12:09 +00:00
KHobbits
61d77e5a44 Update copylibs. 2011-12-13 03:11:11 +00:00
KHobbits
938c063e98 Inform user that they were healed. 2011-12-13 01:47:58 +00:00
KHobbits
229586ba38 Merge branch 'master' into release 2011-12-12 23:15:48 +00:00
KHobbits
1da72b33b3 Updating min Bukkit version. 2011-12-12 23:13:39 +00:00
KHobbits
1a7367f6d6 Merge branch 'master' into release 2011-12-12 23:06:40 +00:00
KHobbits
d9057f3e66 Updating to RB
CraftBukkit #1597 Bukkit #1073
2011-12-12 23:00:21 +00:00
KHobbits
b670dde058 Merge remote branch 'remotes/origin/groupmanager'
Adjusting bukkit paths to remove version number.
2011-12-12 22:51:18 +00:00
KHobbits
825ebbd568 Update Bukkit jars and paths. 2011-12-12 22:45:59 +00:00
ElgarL
016c181b70 Offline player checks now support partial name matches. 2011-12-12 16:39:15 +00:00
ElgarL
578aff625c Fix classpath for Eclipse 2011-12-12 15:59:34 +00:00
ElgarL
9761bc86b6 Dev Jar files for GM 2011-12-12 15:56:00 +00:00
ElgarL
d3b945eb0b Update GM version to 1.7
GM now supports offline players without having to mantogglevalidate
Added craftbukkit-1.0.0-SNAPSHOT.jar to lib (version 1587)
Added bukkit-1.0.0-R1-SNAPSHOT.jar to lib (version 1065)
Updated GM XML's to build using dev bukkit/CB build jars.
2011-12-12 15:53:33 +00:00
KHobbits
d4a71f9054 Merge branch 'master' of github.com:essentials/Essentials 2011-12-12 00:49:33 +00:00
KHobbits
e29714aefe Switching the item value of brewing stands 2011-12-12 00:48:39 +00:00
snowleo
a1c8d1ac41 Fix sorting of users in /who 2011-12-11 09:22:27 +01:00
KHobbits
37c3719c9f Temp Fix wildcard permissions in bperms. 2011-12-11 06:00:29 +00:00
KHobbits
6f9cf862a8 Make the version error messages stand out a little more... 2011-12-11 05:49:25 +00:00
KHobbits
9ff140758e Added cleanup note
Minecraft server usually shows players around 140-180 range, so changing default /near to 200.
2011-12-10 04:12:22 +00:00
KHobbits
32e1e4bffa Make the alt command message, sound less negative/broken. 2011-12-09 22:53:36 +00:00
KHobbits
462c8e2e54 Update plugin information. 2011-12-09 21:51:31 +00:00
KHobbits
7bf944ea1c New permissions: essentials.powertool.append. 2011-12-09 21:42:36 +00:00
KHobbits
eb9e063278 Simplify the protect config file examples. 2011-12-09 04:07:53 +00:00
snowleo
543ed2af1e Fix broken charge for shout and question 2011-12-09 02:48:57 +01:00
ementalo
4df8de54af Allow timeout of /tpa /tpahere requests
Adds new config setting tpa-accept-cancellation
Test #781
2011-12-08 23:43:09 +00:00
KHobbits
e484a2fa41 Merge branch 'master' of github.com:essentials/Essentials 2011-12-08 04:44:34 +00:00
KHobbits
1e07a1deb4 First Refactor of Kits
New sign: [Kit] / <kit name> / [group] / [charge]
2011-12-08 04:44:18 +00:00
snowleo
54044333c7 Merge branch 'refs/heads/master' into release 2011-12-08 05:41:00 +01:00
snowleo
a6ebf6d52d Merge branch 'refs/heads/groupmanager' 2011-12-08 04:14:27 +01:00
ElgarL
697f3dbdb4 Fix manload to properly clone user variables. 2011-12-08 02:28:12 +00:00
KHobbits
7e29f65213 Merge branch 'master' of github.com:essentials/Essentials 2011-12-08 02:23:18 +00:00
KHobbits
edfa47705f Adjusting /spawn to not trigger respawn event. 2011-12-08 02:21:10 +00:00
snowleo
a50e735272 Fix for Towny using an old method. 2011-12-08 02:23:44 +01:00
snowleo
4efb3174cd Prevent blockdamage by enderdragon (default true) in EssentialsProtect CB#1566 B#1058 2011-12-08 00:48:53 +01:00
snowleo
ff75975ae7 Fix Jails not loaded after server start. 2011-12-07 16:50:16 +01:00
snowleo
594448a488 /home sends the player to bed again before it tries to respawn. 2011-12-07 15:18:50 +01:00
snowleo
794e92879f Allow to set the Respawn priority in config. 2011-12-07 15:09:22 +01:00
snowleo
3d940e9090 Fix Enchant sign, the user has to hold the item in hand now. A * or "any" in the second line allows to enchant all possible items. 2011-12-07 14:23:56 +01:00
snowleo
f1eae18247 Use of our Inventory code in enchant sign to be reliable. 2011-12-07 13:44:51 +01:00
snowleo
52d56f71a2 New config option disable-item-pickup-while-afk, defaults to true. 2011-12-07 12:10:41 +01:00
snowleo
348244f26e Banned moved from /whois to /seen 2011-12-07 12:00:01 +01:00
snowleo
257f3c9687 SnakeYaml now ignores additional mapping values in files, so it throws less errors. 2011-12-07 11:57:31 +01:00
snowleo
da6c87abd9 Fix I18n file not loading from Essentials folder, when the locale is not defined in config. 2011-12-07 11:22:02 +01:00
snowleo
f74b1176e1 Fix /mail sendall, fixes #1209 2011-12-07 11:02:10 +01:00
snowleo
f4cb8c879a /balancetop now has pages instead of max argument
Test #1210
2011-12-07 10:53:06 +01:00
snowleo
261ebebb62 Null check in new player teleport, fixes #1212 2011-12-07 10:37:34 +01:00
snowleo
52961b40a6 Missing translation for last commit 2011-12-07 10:35:06 +01:00
snowleo
86b7ddd13d Support for experience as trading goods on signs. This will not work until experience is fixed in Bukkit. 2011-12-07 10:31:18 +01:00
snowleo
aa1543dd07 Updated /near and /getpos command, added new argument playername
Test #1214
2011-12-07 10:03:23 +01:00
Khyperia
69f83d8413 New feature: IsBanned to /whois 2011-12-07 09:36:11 +08:00
Khyperia
d7f200dfbc Added new player argument: /spawnmob <mob> [amount] [player]
Test: #821
2011-12-07 09:36:11 +08:00
ementalo
64db184e7d Merge branch 'master' of github.com:essentials/Essentials 2011-12-07 01:13:08 +00:00
ementalo
47f29cbe5d Catch TeleportClause.COMMAND in the teleport listener.
Changed Teleport methods to pass a TeleportClause param
2011-12-07 01:12:36 +00:00
Khyperia
a21203f5cb New feature: /mail sendall <message>
Test: #649
2011-12-07 08:53:15 +08:00
Khyperia
345aeca35b Renamed /find to /itemdb 2011-12-07 08:53:14 +08:00
Khyperia
f05d49f5e7 New command: /find <item>
Test #278
Test #293
Test #348
2011-12-07 08:53:14 +08:00
snowleo
52d1de0ef8 Fix serious bug in Dev2.7.137 - Dev2.7.144: if spawn.yml is not present, the server will run into a deadlock. 2011-12-07 00:08:45 +01:00
ementalo
88b8865fe1 Adding ability to save /back location from teleport events outside essentilals
New config setting to turn this on "register-back-in-listener"
Test #1200
CB#1560 / B#1055
2011-12-06 22:56:38 +00:00
snowleo
fb0d89e71c Fixing color in announce-format 2011-12-06 22:02:19 +01:00
snowleo
4690a29c18 This is no longer needed 2011-12-06 17:44:02 +01:00
snowleo
f650c9363f More cleanup 2011-12-06 17:42:55 +01:00
snowleo
be4b0628a3 Added /jail /ejail alias to plugin.yml 2011-12-06 17:31:35 +01:00
snowleo
efa031058a Updated Jails to use the new config classes 2011-12-06 17:28:48 +01:00
snowleo
e824ce7933 cleanup 2011-12-06 16:35:30 +01:00
snowleo
6429bf4a30 New Interfaces in api package (WIP) 2011-12-06 16:32:06 +01:00
snowleo
908d137957 UserBase is abstract 2011-12-06 15:40:35 +01:00
snowleo
e42d05c43e Refactoring to create less redundant code 2011-12-06 15:38:14 +01:00
snowleo
166dfbd532 Prevent some rare cases of NPE and Deadlocks, better error handling on yaml load 2011-12-06 14:39:52 +01:00
snowleo
4c2b9b8d0f Updated EssentialsSpawn to use the new config code
/spawn and /home now call the PlayerRespawnEvent to make it more compatible with other plugins.
2011-12-06 13:41:29 +01:00
snowleo
a44bd360c0 More work done on config code 2011-12-06 10:37:17 +01:00
snowleo
ffd81c9a3c Using the correct type of Set in UserMap. 2011-12-06 08:28:41 +01:00
snowleo
2887640100 Check if the item can be enchanted. 2011-12-05 00:20:46 +01:00
Khyperia
18f423f74a Added {VERSION} to motd
Test #1198
2011-12-05 06:56:20 +08:00
snowleo
3014af83f0 utf8 encoding 2011-12-04 23:39:08 +01:00
snowleo
ed5293288b Merge remote-tracking branch 'dysp/patch-1'
Conflicts:
	Essentials/src/messages_da.properties
2011-12-04 23:37:01 +01:00
snowleo
ccf76b4055 Readded because of popular demand: default-stack-size for /give and /item, values below 1 return max stack size (or oversized stack size). 2011-12-04 23:21:30 +01:00
snowleo
49004cf0ec Ignore teleport cooldown on /tjail 2011-12-04 22:57:40 +01:00
snowleo
c73037bb84 Added missing steps to items.csv (by andrewkm from ecocitycraft.com) 2011-12-04 22:53:29 +01:00
snowleo
f03e05d996 Fix some rare cases, where adding an item to inventory could result in an infinite loop. 2011-12-04 22:45:47 +01:00
snowleo
0c5031595b Allow oversized stacks in kits. 2011-12-04 22:33:49 +01:00
snowleo
1aac259864 Enchantements are now stored in one class 2011-12-04 22:28:29 +01:00
snowleo
b50e9dbe73 Added missing [player] to plugin.yml 2011-12-04 22:10:20 +01:00
snowleo
7816313028 New permission essentials.spawn.others 2011-12-04 22:09:36 +01:00
snowleo
5c2df611fe Added null check to /break 2011-12-04 22:06:03 +01:00
snowleo
308f0506dc Less use of sqrt 2011-12-04 22:01:50 +01:00
snowleo
e37c9d47ab Merge pull request #35 from khyperia/master
Multiple commits from khyperia
2011-12-04 12:49:52 -08:00
Khyperia
5fe00b6573 Added [enchant] sign
Test #1177
2011-12-04 14:58:00 -05:00
Khyperia
7837cc2301 Added /spawn <player>
Test #607
2011-12-03 20:24:35 -05:00
KHobbits
a785013690 Show command conflict in debug mode. 2011-12-03 23:38:28 +00:00
KHobbits
6842023f6f Sort translation files properly. 2011-12-03 21:18:15 +00:00
KHobbits
19dbe56c14 New Permission: essentials.world.<worldname>
~ Unsure about the future of this feature, its recommended you don't rely on /world to switch worlds ~
Test #1178
2011-12-03 21:15:53 +00:00
KHobbits
5d260a93e7 New command /remove
Test #1193
2011-12-03 21:14:03 +00:00
KHobbits
f049fecea3 New command: /feed New permission: essentials.feed.others
Test #1191
2011-12-03 20:54:53 +00:00
KHobbits
621c68bf6e New command: /more
Test #1189
2011-12-03 20:44:44 +00:00
KHobbits
4b876efd77 New Command /break, and new Permission: essentials.break.bedrock
Test #1188
2011-12-03 20:41:24 +00:00
KHobbits
c6f802b83b Merge pull request #34 from khyperia/master 2011-12-03 12:36:38 -08:00
Khyperia
3007e9346b Added per-world permissions for /world 2011-12-03 12:13:42 -05:00
Khyperia
1865e0d3f7 Merge commit 2011-12-03 11:14:53 -05:00
KHobbits
53b34438b0 Small cleanup to checkActivity 2011-12-03 13:50:32 +00:00
Khyperia
dd017870be Fixed accedental typo 2011-12-02 20:55:43 -05:00
Dysp
b4ddd791c9 The last translation was so poorly done (I suspect the use of google-translate) that I decided to translate it myself. There may be errors due to lack of insigt for the context of the individual sentence. I can easily correct these, if I am notified. 2011-12-03 01:05:12 +01:00
Khyperia
154cdb7044 Added some commands from request 946 2011-12-02 19:02:12 -05:00
KHobbits
293e7b04a2 Patching gamemode and god toggles to not match on ' ' 2011-12-02 21:32:32 +00:00
KHobbits
68c873ea0d items.csv update for crackedstonebrick (id98,2) 2011-12-02 09:28:57 +00:00
KHobbits
91af9d4d07 Remove invalid dupe permission from permbukkit example. 2011-12-02 09:23:23 +00:00
KHobbits
11d089569c Make the chat formatting config file link to the wiki. 2011-12-02 09:17:20 +00:00
snowleo
3bbb8c380d Missing language files for last commit 2011-12-02 08:34:28 +01:00
snowleo
34ce207534 New config options repair-enchanted (default true) and permission essentials.repair.enchanted 2011-12-02 08:30:52 +01:00
snowleo
1f05cb930b Allows to be teleported to bed location of offline players.
Also adds missing return in /home command
2011-12-02 08:19:55 +01:00
snowleo
bfc90c610a Null check 2011-12-02 03:27:37 +01:00
snowleo
a020e0b9e6 Moved block to item conversion to Util class 2011-12-02 03:25:22 +01:00
snowleo
10ccbda30c Added new tags to info.txt 2011-12-02 02:01:48 +01:00
Khyperia
726d26865d Added many new MOTD possibilities + getI18n() to Essentials.java 2011-12-02 08:42:48 +08:00
Khyperia
2f0d5f88de Added {DATE} and {TIME} to motd 2011-12-02 08:42:48 +08:00
Khyperia
a5a230749f Added many new MOTD possibilities + getI18n() to Essentials.java 2011-12-01 19:37:12 -05:00
KHobbits
8e4bddba2a Missing command aliases. 2011-12-01 17:32:48 +00:00
KHobbits
3f56bde72f Missing aliases 2011-12-01 17:25:46 +00:00
KHobbits
97d174ba21 CB#1538 b#1050 2011-12-01 16:20:53 +00:00
KHobbits
854df23389 Show how far away each player is. 2011-12-01 15:58:25 +00:00
KHobbits
748d388705 Fixing near output. 2011-12-01 15:31:53 +00:00
KHobbits
e7ea30c517 Better distance checking. 2011-12-01 15:15:45 +00:00
KHobbits
34a2e03df7 Command: /near 2011-12-01 14:43:16 +00:00
KHobbits
028aa6be67 Fixing spawnmob errors to say the right thing. 2011-12-01 14:43:00 +00:00
KHobbits
c3fa56bc67 Merge branch 'master' of github.com:essentials/Essentials
Conflicts:
	Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
	Essentials/src/com/earth2me/essentials/commands/Commandenchant.java
2011-12-01 13:47:06 +00:00
KHobbits
9a172c79f1 Command Cleanup 2011-12-01 13:42:39 +00:00
snowleo
db9df18231 minor changes to items.csv 2011-12-01 04:46:43 +01:00
snowleo
d86a69c738 Updated items.csv by michaelwm from ecocitycraft.com 2011-12-01 04:39:51 +01:00
Khyperia
498a7f59a2 Added {DATE} and {TIME} to motd 2011-11-30 21:02:57 -05:00
Khyperia
eaa9248020 Updating to latest 2011-11-30 20:30:21 -05:00
snowleo
073e04c51f Update of Smack to 3.2.1 2011-12-01 02:11:40 +01:00
snowleo
949d0778e9 We don't need them anymore. 2011-12-01 01:56:39 +01:00
snowleo
30b5bc12df This is obsolete too. 2011-12-01 01:41:09 +01:00
snowleo
b3f4e32401 Cleanup of the library folder
Also: we don't use the mysql.jar/sqlite.jar anymore, since it is included in craftbukkit. I don't know why this reference in config.yml still exists.
2011-12-01 01:35:48 +01:00
snowleo
b2e22111ed We don't need that anymore. 2011-11-30 23:51:41 +01:00
snowleo
e0892b428f CB#1534 B#1048 2011-11-30 22:59:50 +01:00
snowleo
1797b59b75 Allow EssentialsProtect to go into emergency mode, if Essentials core is not present at all. 2011-11-30 21:25:11 +01:00
snowleo
3888b08f6d If Essentials core fails to read one of the configs now, it will disable itself. If other modules detect that Essentials is not enabled, they will be disabled too. EssentialsProtect will go into emergency mode, canceling all events that could hurt your world. Fix the file and either restart or reload the server. 2011-11-30 20:49:11 +01:00
snowleo
d127f535b2 Removed EnchantmentFix, because it's fixed in CB#1526 2011-11-30 20:49:11 +01:00
KHobbits
2c3adc4701 /spawnmob sheep:<colour> + /spawnmob sheep:baby = /spawnmob sheep:<colour>baby.
And as a nice extra, random: /spawnmob sheep:randombaby 10
2011-11-30 03:58:20 +00:00
KHobbits
ca466ce9e3 Missing an Animal. 2011-11-30 03:44:33 +00:00
snowleo
8ea05b8a58 New config option update-bed-at-daytime that allows players to always set their bed location 2011-11-30 02:51:02 +01:00
snowleo
76c1c9d9a8 Updated readme about format guidelines. 2011-11-30 00:54:44 +01:00
snowleo
92618de63f Removing old settings.zip 2011-11-30 00:52:55 +01:00
snowleo
e48bb71023 Fix /balancetop, cache was not cleared 2011-11-30 00:48:51 +01:00
snowleo
2726809e6f Merge branch 'refs/heads/master' into release 2011-11-29 21:55:09 +01:00
snowleo
42ec61a0db Merge branch 'refs/heads/groupmanager' 2011-11-29 21:38:00 +01:00
snowleo
de026afb92 mirror world_the_end in default config.yml 2011-11-29 21:34:31 +01:00
snowleo
45c36c7099 Using this code until Bukkit fixes spawnCreature() 2011-11-29 19:24:54 +01:00
snowleo
827cfeb079 Output the redirected plugin too. 2011-11-29 18:48:52 +01:00
snowleo
c9b7dde6ee Allow joinList to understand Collections. 2011-11-29 18:40:13 +01:00
KHobbits
47e7d60964 Merge branch 'master' of github.com:essentials/Essentials 2011-11-29 17:21:46 +00:00
KHobbits
324814967f Adding some debug info to /essentials 2011-11-29 17:21:18 +00:00
snowleo
9f38179729 Fix NPE in getUser() 2011-11-29 17:39:22 +01:00
KHobbits
7ab1bdd477 Settings Cleanup. 2011-11-29 16:16:45 +00:00
KHobbits
a5c8676ab9 GC: Never force reclaiming RAM on user logout, it will be done automatically, when the time is right.
~ Should reduce player event lag a little bit ~
2011-11-29 16:06:39 +00:00
KHobbits
b721a510c5 Merge branch 'master' of github.com:essentials/Essentials 2011-11-29 13:10:19 +00:00
KHobbits
a9e59e7a40 Handle a null handler (GM) 2011-11-29 13:10:00 +00:00
snowleo
46e6da296b 1TBS? Nope, Allman
This reverts commit 9a5c9eb63a.
2011-11-29 05:06:07 +01:00
snowleo
9a5c9eb63a New format guidelines? 2011-11-29 04:51:29 +01:00
ElgarL
cba46d8b41 globalgroups prefix 'g:' is now not case sensitive. 2011-11-29 02:32:09 +00:00
snowleo
4b9710ef64 UserMap.getUser() will return null on failure. 2011-11-29 00:36:36 +01:00
snowleo
5f5e2aba00 Fix NPE when reading old player files 2011-11-29 00:30:06 +01:00
snowleo
e3f0573d18 Merge branch 'refs/heads/master' into release 2011-11-28 22:42:17 +01:00
snowleo
f31672d92d Fix another bug in /sell 2011-11-28 22:41:26 +01:00
snowleo
5bf32ec0ac Allow to set size of MagmaCubes in /spawnmob 2011-11-28 22:06:59 +01:00
snowleo
47dc52dd59 Added info how to read the next page to /info /help /motd /rules 2011-11-28 20:52:15 +01:00
snowleo
2d0ffcef91 Merge branch 'refs/heads/master' into release 2011-11-28 20:28:05 +01:00
snowleo
0dae97d7f4 Fix bug in /sell command 2011-11-28 20:24:13 +01:00
snowleo
6c2548ae21 Merge branch 'refs/heads/master' into release 2011-11-28 20:03:09 +01:00
snowleo
e3cd1404ef Changes to /sell /give and /item
Material.getMaxStackSize() will now be used in /give and /item
The config option default-stack-size has been removed
New config option oversized-stacksize and permission essentials.oversizedstacks
Fixes bug giving out too many items on /give and /item when a stacksize > 64 is given.
Fixes bug in /sell that ignores enchantments
/sell now uses Material.getMaxStackSize() for /sell egg 2s (will sell 32 instead of 128 now)
2011-11-28 19:55:51 +01:00
snowleo
255373f841 Translation of /balancetop 2011-11-28 18:59:33 +01:00
snowleo
9f40db4f46 Calculation of /balancetop is now async to prevent slowdown of the server 2011-11-28 18:53:38 +01:00
snowleo
930f517fee Ignore defaultstacksize from config, just use 64 2011-11-28 17:58:26 +01:00
KHobbits
32b48f0f3d Merge branch 'master' of github.com:essentials/Essentials 2011-11-28 12:56:20 +00:00
KHobbits
8203b43637 Adding extra mobs to essentials protect, changing some default settings. 2011-11-28 12:55:54 +00:00
snowleo
5ff17f0682 New option for EssProtect: Prevent villager death. 2011-11-28 06:15:51 +01:00
snowleo
b08778202c Merge branch 'refs/heads/master' into release 2011-11-28 04:23:38 +01:00
snowleo
d228d2f0a5 Forgot this again. :D 2011-11-28 04:15:09 +01:00
KHobbits
e925589b21 Someone said something about wanting Snowmen.
... and MagmaCubes.
Bukkit #1045 CraftBukkit #1522
2011-11-28 03:12:37 +00:00
KHobbits
2983a80cbc Fix empty argument in delhome. 2011-11-28 02:54:19 +00:00
snowleo
e2cea1a796 Fix broken trade/buy signs because of a wrong cast 2011-11-27 22:36:32 +01:00
snowleo
a46f22f8ca Merge branch 'refs/heads/master' into release 2011-11-27 20:59:19 +01:00
snowleo
0937d54336 Allow enchantments to be removed using /enchant enchantmentname 0 2011-11-27 20:40:39 +01:00
snowleo
6db353bc6a New permissions:
essentials.spawnmob.[mobname] and essentials.spawner.[mobname]
2011-11-27 19:59:06 +01:00
snowleo
04b88cd0c4 Catch exception instead of checking for null 2011-11-27 19:13:55 +01:00
snowleo
9b4d0feb0f Update Essentials/src/messages_fr.properties 2011-11-27 18:56:04 +01:00
snowleo
a3517d09bd Merge pull request #32 from leagris/patch-1
Up to date, more accurate french translation.
2011-11-27 09:55:33 -08:00
Léa Gris
84ea809008 Up to date, more accurate french translation. 2011-11-27 17:52:12 +01:00
snowleo
3e72bbb36b Allow /unbanip playername, not just ips 2011-11-27 16:58:47 +01:00
snowleo
a3016b7204 Don't add the internal bukkit names to the enchantment list, to make it shorter. 2011-11-27 11:43:42 +01:00
snowleo
5f312bf21a Revert to the old behavior of oversized stacks. We might remove or change this in the future. 2011-11-27 10:59:28 +01:00
snowleo
8c03ae4efb Updated the enchantment names to match those of the game 2011-11-27 10:48:10 +01:00
snowleo
fc201c8b77 Enchantments in CraftBukkit are still broken, but it works with Essentials :) 2011-11-27 10:02:41 +01:00
snowleo
77c283f47e Fix Typo 2011-11-27 09:09:04 +01:00
snowleo
f287c2082f Only print stack trace of motd.txt not found, if debug is on. 2011-11-27 09:07:15 +01:00
snowleo
949682f23f Added enchantment to /give and /item
Updated plugin.yml
2011-11-27 08:57:21 +01:00
snowleo
e0961fc176 Implement correct hashCode() and equals() in EnchantmentLevel 2011-11-27 08:26:52 +01:00
snowleo
f21e1ce67f Enchantment Multiplier in future Worth config 2011-11-27 08:18:41 +01:00
snowleo
b4bd4d0c5e Enchantments on Trade signs? Fixes check, so we won't add items that are enchanted. 2011-11-27 07:47:16 +01:00
snowleo
06259e2252 Added 1.9 material where you can stand 2011-11-27 07:33:03 +01:00
snowleo
9d77457b54 /spawner without mobname outputs available mobs 2011-11-27 07:32:42 +01:00
snowleo
164dbf0af4 Locale.ENGLISH!!1! 2011-11-27 06:23:07 +01:00
snowleo
f5271774da Using the ItemStack.clone() method 2011-11-27 06:10:11 +01:00
snowleo
e8cd89f788 CB#1518 B#1042
Support for Enchantments & Removed broken BedFix (in cb now)
2011-11-27 06:01:41 +01:00
KHobbits
3e9d2f19fb URL went nowhere. 2011-11-27 04:54:48 +00:00
snowleo
d5aa9d84e9 BedLocationFix for CraftBukkit 2011-11-27 04:46:33 +01:00
snowleo
9881cd1816 New command /enchant
Permissions for each enchantment: essentials.enchant.[enchantmentname]
For all use *
2011-11-27 04:36:42 +01:00
KHobbits
0ee1825c61 Merge remote branch 'remotes/origin/groupmanager' 2011-11-27 03:16:32 +00:00
ElgarL
3d95841d5f Added file details in error messages for loading groups/users. 2011-11-27 03:12:28 +00:00
snowleo
1406042578 CB#1512 B#1039 2011-11-27 03:22:39 +01:00
KHobbits
faaf7e2529 Merge branch 'master' of github.com:essentials/Essentials 2011-11-27 01:15:39 +00:00
KHobbits
5ff2f0b0c7 Fixing optional argument on tppos to use the correct yaw value. 2011-11-27 01:15:14 +00:00
snowleo
fd49eb19f0 arrrgggss 2011-11-27 00:31:14 +01:00
snowleo
c38e03a795 Fix banning random player (and all other commands where a empty player is given) 2011-11-27 00:23:40 +01:00
snowleo
8a63441f88 New behavior of the /home command and beds
- The behavior has been altered to match the vanilla server.
 - Using a bed will no longer create a home in the users file, if config option bed-sethome is set
 - The config option bed-sethome has been removed
 - It's now possible to go to /home bed or /home playername:bed
 - Bed locations stored before installing Essentials will be used
 - Players respawn at their bed location (if set) instead of the spawn, if respawn-at-home is set to false
 - The default value of spawn-if-no-home is set to true
 - If spawn-if-no-home is set and the player has not set a home, he will be either teleported to his bed location (if set) or the spawn, when he uses the /home command
2011-11-26 22:30:40 +01:00
snowleo
541d06bfb7 Forgot to save this file before commit 2011-11-26 17:37:07 +01:00
snowleo
86926f2f1d Translated /list command 2011-11-26 15:26:48 +01:00
snowleo
2a8266b31f Cleanup 2011-11-26 00:34:36 +01:00
snowleo
ac5d39f5ef Fix ItemDupe bug in bukkit 2011-11-25 22:26:06 +01:00
snowleo
6ba02c7f74 Merge branch 'refs/heads/groupmanager' 2011-11-25 21:12:38 +01:00
ElgarL
befbb4d0e5 Optimizations include changing the return of comparePermissionString. 2011-11-25 19:33:32 +00:00
ElgarL
cb166b7db3 Minor optimization for groups 2011-11-25 16:34:34 +00:00
ElgarL
4964918172 Raised bukkit perms priority 2011-11-25 16:01:46 +00:00
ElgarL
75dabb0b32 Fix superperms to pass all tests
http://dev.bukkit.org/server-mods/superpermstest/
2011-11-25 15:49:35 +00:00
snowleo
cc155b145b Another safety check 2011-11-25 14:02:40 +01:00
snowleo
7dad3578c9 Fix another NPE in AlternativeCommandsHandler 2011-11-25 13:55:09 +01:00
snowleo
9e5ad7e645 This config option is never read 2011-11-25 13:03:07 +01:00
snowleo
926868c7a7 Disable god mode automatically in worlds defined by config 2011-11-25 07:12:21 +01:00
snowleo
313f4e951f Oh no! Angry wolf babies D: 2011-11-25 06:04:19 +01:00
snowleo
1cc71007b1 Baby wolfs, awwwwh 2011-11-25 05:54:32 +01:00
snowleo
aa1b8e3c9b CB#1501 B#1037
New spawnmob options: cow:baby sheep:baby chicken:baby pig:baby
2011-11-25 05:49:57 +01:00
snowleo
5aceb01643 Fix NPE in AlternativeCommandsHandler on shutdown 2011-11-25 00:22:57 +01:00
ElgarL
cbf8d1046d minimal optimizations 2011-11-24 16:45:57 +00:00
ElgarL
b07118a051 optimize getPermissionList 2011-11-24 16:34:05 +00:00
ElgarL
179a2ecff7 More optimization (charAt(0)) 2011-11-24 16:05:41 +00:00
ElgarL
bf8ee036d1 remove unused imports. 2011-11-24 16:00:46 +00:00
ElgarL
acd1c61c52 rewrite of comparePermissionString (snowleo) 2011-11-24 15:57:21 +00:00
ElgarL
8bc38bd5fa Optimize comparePermissionString 2011-11-24 15:28:32 +00:00
ElgarL
e5bb463269 remove bukkit perms check from checkUserPermission as it's performed in
checkFullUserPermission
2011-11-24 14:05:25 +00:00
ElgarL
8bcca0526b Optimize sorting to speedup permission tests. 2011-11-24 13:26:30 +00:00
snowleo
ec36ed54cb Show more then 9 lines of motd on login 2011-11-24 05:57:01 +01:00
snowleo
72337ba791 Merge branch 'refs/heads/master' into release 2011-11-24 04:26:05 +01:00
KHobbits
c1b71b1024 New permission essentials.nick.color
Allows control over who can use colour codes in nicknames.
2011-11-23 22:24:31 +00:00
snowleo
93c7ee3f2c Invert pattern 2011-11-23 02:52:08 +01:00
snowleo
462c34b70d More work on the config code 2011-11-23 02:43:38 +01:00
snowleo
5a05219595 Merge branch 'refs/heads/groupmanager' 2011-11-22 15:12:20 +01:00
snowleo
e2b591b8ff GM does not need CraftBukkit 2011-11-22 06:02:47 +01:00
KHobbits
778040a719 Fixing inventory method calls.
Bug report: http://pastie.org/2901587
2011-11-22 04:55:21 +00:00
KHobbits
f5bcaa24f5 Switching priority on help permissions
Bukkit #1488
2011-11-22 04:41:34 +00:00
KHobbits
aab292864e Merge branch 'master' of github.com:essentials/Essentials 2011-11-22 04:00:26 +00:00
KHobbits
cceeee5fdb Rewriting help, to use new classes. 2011-11-22 04:00:04 +00:00
snowleo
390ef73897 Moved all dependency on craftbukkit to one package in the main jar. The rest is now clean bukkit code. Also cleaned PlayerExtension class. 2011-11-22 03:02:08 +01:00
snowleo
7c23f67545 Corrected name in items.csv: whitestone => enderstone 2011-11-22 02:25:56 +01:00
ElgarL
0c1d9d4e21 Stop throwing errors on an empty users file. 2011-11-21 09:51:31 +00:00
snowleo
0623c3902d Set shooter of Fireball or it will die instantly. 2011-11-21 03:50:31 +01:00
snowleo
4597d5d34a Added new creatures to EssProtect prevent spawning
Ghast and Slime default value changed
2011-11-21 03:21:02 +01:00
snowleo
770fc55c46 Cleanup 2011-11-21 03:07:44 +01:00
snowleo
409a4fa5aa Fixing the tests 2011-11-21 03:05:18 +01:00
snowleo
e3fa243753 Switch to the new I18n class and format cleanup of all classes 2011-11-21 02:55:26 +01:00
snowleo
161a65300b Merge branch 'refs/heads/master' into release 2011-11-20 21:46:02 +01:00
snowleo
0d0eb1e8bd Fix timeWorldCurrent translation key in /time command 2011-11-20 19:12:20 +01:00
snowleo
40f3f7fcd1 Prevent NPE with creatures that are not added to bucket yet. 2011-11-20 16:50:08 +01:00
snowleo
dacad38dd9 Fix long prefix breaking setPlayerListName(), because they are too long.
If Essentials detects, that the player name would be too long with prefix and suffix to fit in the player list, it will only update the name without prefix and suffix but with nickname and opcolor.
2011-11-20 16:43:38 +01:00
snowleo
26590fa7b8 Fix Bukkit version pattern 2011-11-20 16:40:18 +01:00
snowleo
fc2bd73688 Add SmallFireball to EssProtect 2011-11-20 15:43:39 +01:00
snowleo
15df345bf2 Added option to /fireball command: /fireball small 2011-11-20 14:34:03 +01:00
snowleo
437fab8b04 Added new mobs 2011-11-20 14:33:17 +01:00
snowleo
56d4cb6a65 Added new methods to Fake classes 2011-11-20 14:30:54 +01:00
snowleo
8d873907fb Added the new items to items.csv 2011-11-20 14:30:21 +01:00
snowleo
8b2d076833 CB# 1467 B#1022 2011-11-20 14:03:00 +01:00
ElgarL
e33c2940be better groups match checking for globalgroups 2011-11-20 02:27:25 +00:00
ElgarL
ed272e3fee Prevent Group.equals tests throwing a NullPointerException for
GlobalGroups.
2011-11-19 20:46:34 +00:00
snowleo
0f373b6880 Merge branch 'refs/heads/master' into release 2011-11-19 16:04:00 +01:00
KHobbits
7690afd5ef Warn in the console if group prefixes are too long.
People using displayname prefixes can set longer chat prefixes in the chat config.
2011-11-18 23:08:16 +00:00
KHobbits
0275453504 Continuing code cleanup 2011-11-18 22:09:26 +00:00
KHobbits
2751321fcc Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-11-18 19:18:06 +00:00
snowleo
3f2448e51f Null checks 2011-11-18 20:15:26 +01:00
KHobbits
4a15bd8fdd More code cleanup. 2011-11-18 18:33:22 +00:00
KHobbits
b42ee56807 Code cleanup continues... 2011-11-18 18:11:49 +00:00
KHobbits
6da2c69e3f Code cleanup continued. 2011-11-18 17:48:49 +00:00
snowleo
717b082535 New I18n code, not used yet 2011-11-18 15:04:22 +01:00
KHobbits
5ff6b04d4d Little more command cleanup. 2011-11-18 13:48:31 +00:00
KHobbits
768bc1896c Updating gitignore to ignore private files. 2011-11-18 12:10:36 +00:00
KHobbits
fa131dd832 Updating gamemode to allow essentials.gamemode.other. 2011-11-18 12:08:27 +00:00
KHobbits
b4a5613ece Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-11-18 12:07:11 +00:00
KHobbits
a123cdc104 Command cleanup 2011-11-18 12:06:59 +00:00
KHobbits
980166831d Updating web push to just push the zip files. 2011-11-18 12:06:19 +00:00
snowleo
6beebeca6c Updated UserMap to newest Guava-API 2011-11-18 05:29:27 +01:00
snowleo
d147a08ab9 Remove useless import 2011-11-18 05:23:38 +01:00
snowleo
2d8434cb40 Update ExecuteTimer to use ns instead of ms for calculations, output is still in ms 2011-11-18 05:13:38 +01:00
snowleo
05a611088b Java 1.5 clients will never reach that point, so we can remove it. 2011-11-18 04:22:09 +01:00
snowleo
a10ee50b7c motd and rules are now configured in the files motd.txt and rules.txt, values from config.yml are copied automatically
New features:
Info command now understands the tags from motd and rules
motd and rules are now multipage
On join, only the first page of motd is shown.
2011-11-18 04:18:03 +01:00
snowleo
ae1d52b272 Better solution for the alternative commands 2011-11-18 01:43:58 +01:00
snowleo
00cf51e079 Check for other plugin aliases and run them instead. 2011-11-18 01:01:05 +01:00
snowleo
48ee9cb1a5 Merge branch 'refs/heads/master' into release 2011-11-17 19:06:44 +01:00
snowleo
39a4a363f6 General fix against overwriting already existing protections 2011-11-17 17:06:06 +01:00
snowleo
6f616bd514 Merge branch 'refs/heads/master' into release 2011-11-17 16:34:39 +01:00
snowleo
54389e2f9c Prevent that sign protection in EssProtect can be circumvented by placing signs. 2011-11-17 16:20:31 +01:00
snowleo
311f73e9a2 The data value of leaves changed by 4
0 -> 4, 1 -> 5, 2 -> 6 to make them permanent, items.csv should be updated automatically
2011-11-17 16:14:56 +01:00
snowleo
9dd01e11d5 Merge branch 'refs/heads/master' into release 2011-11-17 15:34:27 +01:00
snowleo
c073285a87 Merge branch 'refs/heads/groupmanager' 2011-11-17 15:34:05 +01:00
ElgarL
50f07f4ad7 Fixed a crash on reload due to bukkit not unloading plugins before
reloading.
2011-11-17 14:28:33 +00:00
snowleo
8852910c7a Fix water/lava bucket bug with mobs 2011-11-17 14:23:35 +01:00
ElgarL
bc1e16fcf1 Fixed GM holding files open and causing the time stamp to be incorrect.
This caused GM to require a '/mansave force' when it shouldn't be
needed.
2011-11-17 05:46:01 +00:00
snowleo
88b5b30d6d Sudo: This would break horrible for offline players and the original player object has to be used. 2011-11-16 04:26:24 +01:00
KHobbits
b191546f03 Sudo Command
This might never make it to release, needs tidying first at least.
2011-11-16 03:00:31 +00:00
KHobbits
21ebe59094 Gamemode sign, standard sign permissions. 2011-11-16 00:21:55 +00:00
KHobbits
929e2ce4c9 New permission: essentials.repair.armor
If a player has this permission '/repair all' will also repair equipped armor.
2011-11-15 23:54:26 +00:00
KHobbits
487b341f83 Updating banip to support offline players. 2011-11-15 23:01:15 +00:00
snowleo
ba4939de8b Merge branch 'refs/heads/master' into release 2011-11-15 22:52:42 +01:00
snowleo
617a3b6331 Merge branch 'refs/heads/groupmanager' 2011-11-15 22:52:05 +01:00
snowleo
efac932e95 Cleanup of the /tree commands 2011-11-15 22:51:14 +01:00
snowleo
a2c14b7c07 null the Essentials object in static EcoApi, so it doesn't leak on /reload.
TODO: Make the eco api non-static
2011-11-15 22:51:14 +01:00
snowleo
77dfa1ba18 Prevent that players are teleported to offline players using /tpa and players that lost their tpahere permission 2011-11-15 22:51:14 +01:00
ElgarL
0e1e5c8ead Added comments to groups.yml for global groups 2011-11-15 18:17:18 +00:00
KHobbits
0eaae89739 Prevent client crash on 'Free air' 2011-11-14 10:11:23 +00:00
snowleo
f98039a415 Fix #1106 GeoIP announces players who are hidden, on join. 2011-11-11 03:27:09 +01:00
ElgarL
6a5658f4f4 Remove bperms nodes which shouldn't be in globalGroups 2011-11-08 13:03:32 +00:00
KHobbits
ea04a1952a Merge branch 'essmaster' into essrelease 2011-11-08 05:17:42 +00:00
KHobbits
218c98fa20 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-11-08 05:16:15 +00:00
ElgarL
de63a0ac1f Change to default users as examples 2011-11-07 22:15:58 +00:00
ElgarL
8704d6ed3a Minor optimization for Group loading/clone 2011-11-07 15:33:15 +00:00
ElgarL
51bcd3bac4 Fix for Users file being flagged as updated when it wasn't. 2011-11-07 01:59:12 +00:00
ElgarL
767422c8c8 Fixed Group/User reloading
Fixed Group.clone(dataholder)
2011-11-05 15:41:40 +00:00
KHobbits
9959f8b728 Extra translation keys. 2011-11-05 00:12:07 +00:00
KHobbits
eeb5642e9c Adding op/god mode to whois. 2011-11-04 23:41:39 +00:00
ElgarL
5d9f11aecc Fix for file date conflict causing memory data to be wiped. 2011-11-04 23:13:42 +00:00
KHobbits
739d21e0fc Only pull/push data on valid player data. 2011-11-04 23:13:21 +00:00
ElgarL
65b13ebebc Optimize notify test so it's not run as often 2011-11-04 18:20:09 +00:00
ElgarL
bf78620b5d Fix string compares 2011-11-04 18:12:37 +00:00
ElgarL
5086c2e4b7 Notification of being moved to the default group only happens if it's a
demotion/promotion (not on join).
2011-11-04 17:51:29 +00:00
KHobbits
a22d818ce9 Force displayname update on /list.
Tidy duplicate displayname call.
2011-11-04 16:51:00 +00:00
KHobbits
99565064a2 Clear all powertools - /powertool c: 2011-11-04 16:42:03 +00:00
KHobbits
b12b365f2d Removing Reloadall Command
Tidy plugin.yml
2011-11-04 16:20:09 +00:00
KHobbits
6b657aca9a Start logging players last login address. 2011-11-04 15:28:51 +00:00
KHobbits
4360d0b9ae Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-11-04 11:40:33 +00:00
KHobbits
db65324004 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-11-04 11:40:18 +00:00
KHobbits
dd6ae0070b Extra command alias's. 2011-11-04 11:39:31 +00:00
ElgarL
7926792000 Fixed up javadoc comment errors 2011-11-04 09:36:11 +00:00
snowleo
ff8285527a Temporary debug mode using /essentials debug 2011-11-04 02:44:00 +01:00
KHobbits
4ecb31bc93 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-11-04 00:45:03 +00:00
KHobbits
3c41319d72 Alias for 'Everyone' on warp signs. 2011-11-04 00:44:41 +00:00
snowleo
0e9eddd2f9 Fix bug in sign state loop 2011-11-04 01:24:01 +01:00
KHobbits
7d936a639c Adding game mode command for quick toggling (/gm /creative /gamemode) 2011-11-03 23:39:13 +00:00
KHobbits
69ecf026c3 Spanish translation 2011-11-03 23:11:04 +00:00
KHobbits
c05e2f353d Adding gamemode to whois
Fixing exception in unban
2011-11-03 23:10:42 +00:00
KHobbits
90223c6aed Allow proper escaping and use of & symbol in nicks (&& = &). 2011-11-03 22:19:33 +00:00
KHobbits
0f53eee9af Trim long nicknames for use in tab list
Colour Nicknames
Refactor /nick Command
Fix nickother validity checks.
2011-11-03 22:13:50 +00:00
ElgarL
eba96c110b Fix for an error in checkFullUserPermission caused by players
disconnecting mid perms update.
2011-11-03 20:42:34 +00:00
ElgarL
5ef08d2250 Fix for an error in checkFullUserPermission caused by silly requests for
a null perm.
2011-11-03 20:29:30 +00:00
KHobbits
25a13b823f Allow the use of the warp command from the console 2011-11-03 16:17:39 +00:00
ElgarL
ceba3e0899 GM will now check to see if it's data files have been changed at each
scheduled save.
	  If the files have been altered (on disc) it will reload, so long as
the in-memory data hasn't changed.
	  If the files on Disc have changed AND there have been changes to it's
in-memory data it will show a warning.
	  You then MUST issue a '/mansave force' to overwrite the disc files,
or a '/manload' to overwrite the memory data.
2011-11-02 22:33:29 +00:00
KHobbits
9db235056c Code tidy, trigger build id update. 2011-11-01 16:54:36 +00:00
ElgarL
4ee2f557a8 Prevent setting 'minutes' in the config to zero causing an error. 2011-11-01 12:12:32 +00:00
ElgarL
7bdb07536a Added a config.yml setting of 'validate_toggle' for those who prefer
'mantogglevalidate' to always be off.
2011-10-31 20:41:50 +00:00
ElgarL
976cdb7868 Expanded 'canUserBuild()' to include inheritance and subgroups. 2011-10-31 20:20:57 +00:00
ElgarL
1606260680 Fixed an error on 'manucheckv'. If the users doesn't have the variable
it fell through causing an exception.
Added checking of subgroups for Info nodes.
2011-10-31 20:07:21 +00:00
ElgarL
2e24240c49 Added Info node support to Global Groups. 2011-10-31 17:23:24 +00:00
ElgarL
1d477d8414 Typo's and formatting 2011-10-31 09:14:58 +00:00
ElgarL
40683e2429 Global Groups yml and class 2011-10-31 08:34:57 +00:00
ElgarL
45e19d724d Added Global Groups
Defined in groupmanager/globalgroups.yml.
Create groups in the yml with a g: prefix, then inherit in the worlds
groups files.
2011-10-31 08:34:07 +00:00
ElgarL
e85e721b4b Fixed GM loading world data files twice at startup.
Improved error reporting for invalid groups.yml
2011-10-31 02:06:25 +00:00
okamosy
1efc273d94 Merge branch 'master' of github.com:essentials/Essentials into ess 2011-10-30 21:30:21 +00:00
okamosy
a7e046e892 EssChat update part 1. 2011-10-30 21:29:56 +00:00
KHobbits
01a9d4adfe Debug messages: Execution time on reload/enable.
~ Probably needs removed later?
2011-10-30 05:38:17 +00:00
KHobbits
d6d5bd5e11 Removing translations for portal actions. 2011-10-30 01:26:05 +00:00
KHobbits
33c40c2367 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-10-30 01:37:40 +01:00
KHobbits
3150b73336 Cleanup last references to portal management in Essentials. 2011-10-30 01:37:18 +01:00
snowleo
f575ce6f92 XMPP: Don't send messages from spy users back to them. 2011-10-30 00:18:55 +02:00
KHobbits
49e2d69efb More message, in /me 2011-10-29 10:36:30 +01:00
KHobbits
7d1c19ba41 Updating actions to allow translations, and colour. 2011-10-29 09:38:32 +01:00
KHobbits
62818065c4 Tidy the XML a little and test a library property. 2011-10-29 04:31:56 +01:00
KHobbits
071175e013 More teamcity fixes. 2011-10-29 02:50:57 +01:00
KHobbits
fac66b07c2 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-10-29 02:49:03 +01:00
KHobbits
30c0158153 Will teamcity like this change? 2011-10-29 02:48:42 +01:00
KHobbits
24e0769961 Lets try a adding a few dependencies. 2011-10-29 02:31:05 +01:00
KHobbits
c90869cf44 Updating build order. 2011-10-29 02:23:13 +01:00
KHobbits
b0e4fdbaf1 Adding the handler to the (painful) list of permissions systems we support. 2011-10-29 02:16:29 +01:00
KHobbits
0c1da5cf3e File formatting. 2011-10-29 02:09:11 +01:00
KHobbits
7ae4fe70a1 GM permission handler...
Look mum, no bridge.
2011-10-29 02:06:27 +01:00
KHobbits
1c254ce2f5 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-10-28 22:07:43 +01:00
ElgarL
fd936c582a Fixed GM to recognize Superperm child nodes.
If you add a node like Towny.admin GM will now correctly report on
all child nodes.
2011-10-28 18:43:29 +01:00
snowleo
091c58dde3 Removing never used ErrorHandler and UpdateTimer from Essentials Core, they are now in EssentialsUpdate 2011-10-27 18:45:27 +02:00
KHobbits
9b7623322d Sneaking in an option to disable prefix/suffix selectively.
(This will probably be removed during ess chat rewrite).
2011-10-27 06:17:18 +01:00
KHobbits
2fc130c3d4 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-10-27 05:48:45 +01:00
KHobbits
681d278530 Altering PEX prefix/suffix. 2011-10-27 05:47:55 +01:00
snowleo
1e63f1f7be Don't block /essentialsupdate command after selfupdate 2011-10-27 01:18:59 +02:00
ElgarL
7770c0b99c v 1.5:
- Fixed opOverrides and bukkit_perms_override to read the correct
entries.
	- Better commenting in config.yml
2011-10-27 00:04:54 +01:00
snowleo
aa678a6bfa After the selfupdate, check for the bukkit version. We will not automatically update bukkit, so the player is displayed a message, if he tries to update or install. 2011-10-27 00:41:12 +02:00
snowleo
569f813428 Close file input on exception 2011-10-27 00:08:48 +02:00
snowleo
1de5cb6dbd Crop after 15KB and add a note, that it's cropped by the upload. 2011-10-27 00:06:15 +02:00
snowleo
19dfef1a4f Some cleanup, refactoring of EssentialsHelp class 2011-10-27 00:03:16 +02:00
snowleo
ddfa6092a5 Abort update text 2011-10-26 22:27:43 +02:00
snowleo
7ef9b23633 Reload after installation 2011-10-26 22:23:30 +02:00
snowleo
0be5233b89 Removing automatic updates
It's a bad idea to automatically overwrite files, without asking the player first.

This would be triggered by the selfupdate after the reload.
2011-10-26 22:17:27 +02:00
snowleo
652ff80deb The state machine now handles both manual updating and installation. 2011-10-26 22:14:24 +02:00
snowleo
da01d35e2b Basic automatic updates downloader 2011-10-26 20:25:09 +02:00
snowleo
c15d26acc0 Cleanup 2011-10-26 20:24:46 +02:00
snowleo
83ea6dd721 Cleanup 2011-10-26 20:23:28 +02:00
snowleo
3f876b04c6 The work process is done async to the server loop. 2011-10-26 19:54:38 +02:00
snowleo
4c3eef8514 Abort the installation wizard if a runtime exception happens 2011-10-26 19:46:40 +02:00
snowleo
0dc7b73337 Cleanly resume the installation, if the player quits the game and reconnects
If the installation is already running in background after the wizard, it will not stop, if the player quits the game.
2011-10-26 19:39:01 +02:00
snowleo
4fc08153ad Advanced mode 2011-10-26 18:18:58 +02:00
snowleo
91b6a19250 Allow states to be automatically added to the state map.
They have to have a Constructor that accept the StateMap as argument, otherwise a RuntimeException is thrown.
2011-10-26 17:42:39 +02:00
KHobbits
d8a40db32c Few more states in EssentialsUpdate 2011-10-26 16:26:26 +01:00
KHobbits
7895a2fc5a Fixing invsee error. 2011-10-26 06:02:54 +01:00
KHobbits
eaad3f0350 Extra triggers for /sell inventory 2011-10-26 03:32:38 +01:00
KHobbits
8b913691d6 Improved readability of /sell
~translations need checking~
2011-10-26 03:05:09 +01:00
KHobbits
1b1501c504 Cleanup debug message, code tidy. 2011-10-25 22:18:28 +01:00
KHobbits
bb7183deeb Only prevent AFK heal, if freeze player is enabled. 2011-10-25 16:21:56 +01:00
KHobbits
2604cfdc38 Fix health event name. 2011-10-24 17:46:53 +01:00
KHobbits
6c263cbce4 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-10-24 17:00:05 +01:00
KHobbits
f843123f7e AFK users shouldn't heal from full hunger. 2011-10-24 15:37:44 +01:00
snowleo
3f0b308e70 Cleanup 2011-10-23 23:22:04 +02:00
snowleo
f753c5ca23 Minor changes because we use a map instead of a list 2011-10-23 23:20:18 +02:00
snowleo
2506b24392 Another state added 2011-10-23 23:13:30 +02:00
snowleo
b573516470 Less chance for C&P error 2011-10-23 23:11:47 +02:00
snowleo
7a7232c832 Moving the link between the states from the constructor of the state machine to the states classes. 2011-10-23 23:08:42 +02:00
KHobbits
443ae7fcce Automatically unAFK on interaction. 2011-10-23 21:51:38 +01:00
snowleo
7888471982 Statemachine for installation wizard (WIP) 2011-10-23 21:45:01 +02:00
snowleo
08df7b96c7 Merge branch 'refs/heads/master' into release
Conflicts:
	EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
2011-10-22 11:55:01 +02:00
snowleo
1b4b78d6e6 Fix Test 2011-10-21 01:36:13 +02:00
snowleo
86f29b28c1 Use of lomboks delegate on player wrapping 2011-10-21 01:23:35 +02:00
snowleo
eea502da36 CB#1337
B#953
2011-10-21 00:12:03 +02:00
snowleo
2bfa45bf57 Merge branch 'refs/heads/groupmanager' 2011-10-21 00:04:40 +02:00
snowleo
b512878223 Cleanup 2011-10-19 18:17:19 +02:00
snowleo
0d0111658d Moved all config options to new Settings classes 2011-10-19 17:52:07 +02:00
snowleo
aaf5c334b7 Cleanup 2011-10-19 14:47:32 +02:00
snowleo
bf03c6c8a1 Merge pull request #30 from tustin2121/master
Porting Some Player-Only Commands to the Console
2011-10-19 05:38:56 -07:00
Tim P
35121d9c4b Minor fixes. Basic testing shows all works. 2011-10-18 23:08:06 -04:00
Tim P
e96d33cb8b Made a concerted effort to change the messages.properties in the various languages
to the new format for weather.
- Incidently, there was an error in the _da translation - the message for the key
  weatherSun did not have a "in your world" clause. This is added with the "your
  world" clause changed, like it is everywhere.
2011-10-18 22:01:23 -04:00
Tim P
6736672639 Made a couple commands available for the console (ones that make sense to be able to
access from the command line).
2011-10-18 12:12:41 -04:00
KHobbits
fe7c02063e Save the ban reason, not the command name. 2011-10-18 05:35:21 +01:00
KHobbits
ea634acc3c Removing debugging. 2011-10-18 02:21:26 +01:00
KHobbits
f0f479f115 More debugging 2011-10-18 02:11:22 +01:00
KHobbits
e58813d028 Adding a debug note. 2011-10-18 01:55:35 +01:00
ElgarL
2951cca559 Added data.save.hours setting to config. This allow control over how
long backups are retained.
2011-10-16 08:58:45 +01:00
snowleo
75cb6f2186 Updated german translation by HDS 2011-10-16 09:39:06 +02:00
ElgarL
fff6601237 Simplified config.yml while retaining backwards compatibility. 2011-10-16 03:35:55 +01:00
ElgarL
9a1084ede9 Fixed reading world mirrors from the config. 2011-10-16 01:23:25 +01:00
snowleo
6106993e7e Revert bed fix, because it's fixed in Bukkit now. Thanks to feildmaster 2011-10-15 10:49:51 +02:00
snowleo
cd821bb669 Test if objects can be read from yaml in the original sort 2011-10-15 01:15:01 +02:00
snowleo
febb7916dd Correctly fix the N/S direction 2011-10-15 01:15:01 +02:00
KHobbits
5e7523bf20 Moving apikey outside main file.
Keep the actual key in local repo ;)
2011-10-13 20:45:57 +01:00
KHobbits
a030998d14 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-10-13 17:20:03 +01:00
KHobbits
0e14518c15 Made a silly little upload script, for uploading things to dev bukkit. 2011-10-13 17:19:25 +01:00
snowleo
33b12bf612 New storage system for settings (WIP) 2011-10-13 01:40:11 +02:00
KHobbits
7034524790 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-10-12 17:10:31 +01:00
snowleo
64a00d64fd Cleanup 2011-10-12 12:20:02 +02:00
snowleo
d187c58f30 Replacing martyr with Pircbot 1.5 2011-10-12 05:00:36 +02:00
snowleo
ea192ddd6d EssentialsUpdate WIP 2011-10-12 03:14:26 +02:00
ElgarL
ae8500fad4 Added a config setting - bukkit_perms_override: false
Enable to allow default Bukkit based permissions to remain enabled,
unless directly negated within GroupManager.
2011-10-12 00:16:53 +01:00
KHobbits
eee2edacdc Fixing typo in release build. 2011-10-11 22:51:30 +01:00
ElgarL
f4a8752ee0 v 1.4:
- Updated for Bukkits new YamlConfiguration.
	- Cleared remaining Cast errors cause by object cloning.
2011-10-11 22:05:21 +01:00
KHobbits
a0da1d63a4 Merge branch 'essmaster' into essrelease 2011-10-11 20:06:23 +01:00
KHobbits
1b34ed4073 Fixing german translation error. 2011-10-11 20:05:38 +01:00
KHobbits
015e07efd8 Merge remote branch 'remotes/ess/master' into essrelease 2011-10-11 17:52:56 +01:00
ElgarL
01a9f491b9 Added two new permission nodes - groupmanager.notify.self &
groupmanager.notify.other
	  These allow players/admins to be notified when players are moved
between groups.
2011-10-11 13:10:29 +01:00
snowleo
997fb1e28f Merge branch 'master' into groupmanager 2011-10-11 12:51:53 +02:00
snowleo
7a03eeca1b Changes for new Bukkit 2011-10-11 12:49:10 +02:00
snowleo
717a714392 CB#1317
B#941
2011-10-11 12:49:10 +02:00
ElgarL
8448ab3e96 Removed null supression in GroupManager.java 2011-10-11 01:07:52 +01:00
ElgarL
9468d8b3ec Merge branch 'groupmanager' of
https://elgarl@github.com/essentials/Essentials.git into groupmanager

Conflicts:
	EssentialsGroupManager/src/Changelog.txt
2011-10-11 01:05:48 +01:00
ElgarL
8aba67f610 Fixed manudelsub not correctly selecting the group to remove. 2011-10-11 01:03:38 +01:00
KHobbits
8d86179229 Changing essentials URL, we should at least give one that works, although bukkitdev would probably be better. 2011-10-11 00:37:03 +01:00
ElgarL
0410e8f851 Fixed manudelsub not correctly selecting the group to remove. 2011-10-11 00:34:17 +01:00
KHobbits
647165cc30 Merge remote branch 'remotes/ess/master' into essrelease 2011-10-10 17:21:48 +01:00
snowleo
ead83fc938 Fix NPE in BUY signs 2011-10-10 11:40:20 +03:00
snowleo
51c4893c4d Merge branch 'master' into release 2011-10-10 00:30:47 +02:00
snowleo
6ded4a3d5e Fix of the recharge code, also the maximum line length on signs is 15 not 16! 2011-10-10 00:27:55 +02:00
snowleo
65527e93d9 Merge branch 'master' into release 2011-10-09 23:52:15 +02:00
snowleo
f1d505cdeb Reverting ementalos change on freeze-afk, hopefully fixing the flickering. 2011-10-09 23:45:46 +02:00
snowleo
31da2dfc93 Cleanup 2011-10-09 23:31:13 +02:00
snowleo
6b63b52f7a Notch decided that the sun rises north and sets south.
"Corrected" values for /getpos and /compass
2011-10-09 23:23:00 +02:00
snowleo
56adecb506 Prevent that long lines are stored on the sign 2011-10-09 23:00:58 +02:00
snowleo
2859e367d4 Allow players to recharge trade signs without breaking them.
Also don't give out items, if their inventory is full.
2011-10-09 22:52:11 +02:00
snowleo
593d5def78 Don't spill out items, if inventory is full on buy signs. 2011-10-09 22:25:30 +02:00
KHobbits
f233e8410d Edited Essentials/src/items.csv via GitHub 2011-10-09 22:10:40 +02:00
snowleo
d4171f7de1 Allow to disable the death messages of minecraft 2011-10-09 20:59:06 +02:00
snowleo
fb52bf9982 Corrected datavalues for pistons 2011-10-09 20:57:34 +02:00
snowleo
f4802894d3 Cancel early, not late 2011-10-09 20:14:41 +02:00
snowleo
a73d79893d Prevent players with essentials.sleepingignored permission from going to bed. Prevents a bug in bukkit. 2011-10-09 20:10:21 +02:00
snowleo
dc8defe8db Merge branch 'master' into release 2011-10-09 17:54:59 +02:00
snowleo
9524cd0543 Allow players with essentials.signs.trade.override permission break invalid trade signs. 2011-10-09 17:06:32 +02:00
snowleo
d075b14e4f Throw RuntimeException instead of NPE, if the api is called before Essentials is loaded. 2011-10-09 16:53:01 +02:00
snowleo
cc77b7d0aa Easier version of /banip username 2011-10-09 16:44:35 +02:00
snowleo
d7775153d0 Fix pull request of damage request 2011-10-09 16:43:58 +02:00
snowleo
ac46099f96 Merge pull request #29 from zzbomb/patch-1
Improved to operate like.. "banip <IP|Username>" bans the specified IP or
2011-10-09 07:07:15 -07:00
snowleo
63e6bf8ff3 Merge pull request #27 from feildmaster/patch-1
Fires an event before "killing."
2011-10-09 07:06:45 -07:00
snowleo
359b22d4ed Merge pull request #28 from feildmaster/patch-2
Edited Priority to "High" of chat listener
2011-10-09 07:05:55 -07:00
snowleo
03af1afc07 Merge branch 'master' into release 2011-10-08 19:43:07 +02:00
snowleo
bde34ee59a Fix NPE in /repair 2011-10-08 19:41:41 +02:00
zzbomb
71da92dd66 Improved to operate like.. "banip <IP|Username>" bans the specified IP or the IP of the user specified. 2011-10-08 10:04:07 -03:00
snowleo
e7aeb27a78 We can get the console command sender from server object now. 2011-10-06 11:54:09 +02:00
snowleo
cd7fc90406 Merge branch 'master' into release 2011-10-04 23:07:30 +02:00
snowleo
dc0bf293ec Register 1.5 2011-10-04 23:06:06 +02:00
snowleo
49d61b7f16 Merge branch 'master' into release 2011-10-04 22:20:10 +02:00
snowleo
d3dace3cd3 Merge branch 'master' into groupmanager 2011-10-04 22:19:40 +02:00
snowleo
9fc92f3528 Since it will be released, it needs a new version number 2011-10-04 22:19:23 +02:00
snowleo
d4af9804d5 Removing obsolete Nether portal code.
If you want more control over the worlds, I recommend using Multiverse.
/world command still exists, it can be used to switch between worlds. The default ratio of 8 is used for nether.
2011-10-04 21:58:47 +02:00
snowleo
1f85d12714 Merge branch 'master' into release 2011-10-04 21:34:28 +02:00
snowleo
0ee6985c56 Null check for probably corrupted worlds 2011-10-04 21:33:09 +02:00
ElgarL
5cdce48906 Comment config.yml to prevent creation of world4 data files 2011-10-04 15:59:26 +01:00
KHobbits
e815b280ca Updating Readme 2011-10-04 15:56:43 +01:00
KHobbits
d64c15e309 Merge branch 'essmaster' into essrelease 2011-10-04 14:40:12 +01:00
KHobbits
9c6d49a9e2 Nick length patch 2011-10-04 14:39:40 +01:00
KHobbits
40f1309d7e Revert "Less dupe code on last commit."
This reverts commit 52e674459f.
2011-10-04 10:27:58 +01:00
KHobbits
52e674459f Less dupe code on last commit. 2011-10-04 10:16:35 +01:00
KHobbits
e71eba3d1f Fix for /tjail not teleporting users back due to cooldown. 2011-10-04 10:13:44 +01:00
KHobbits
2d95db79df Merge branch 'essmaster' into essrelease 2011-10-04 09:51:51 +01:00
KHobbits
df0d773b24 Merge branch 'essmaster' into groupmanager 2011-10-04 09:43:34 +01:00
KHobbits
7058c31014 Updating bPermissions 2011-10-04 09:43:00 +01:00
KHobbits
f74abc4af4 Updating bpermissions to latest. 2011-10-04 09:39:02 +01:00
KHobbits
8954cf111c Adding unjail alias to tjail. 2011-10-04 09:23:44 +01:00
KHobbits
07c8537d07 FoodLevelChange event, update. 2011-10-04 09:05:04 +01:00
KHobbits
a58ba8e931 Add hunger replenish to /heal (Do we want to add a toggle?) 2011-10-04 08:34:06 +01:00
KHobbits
fd43a6898e Adding list name to /nick support. 2011-10-04 07:21:09 +01:00
KHobbits
c97e69cd71 Removing a few restrictions on manuadd, it shouldnt be a clone of manpromote after all. 2011-10-04 06:55:42 +01:00
KHobbits
7a27be54f8 Updating to CB 1240
Bukkit 875
2011-10-04 06:54:45 +01:00
KHobbits
6ce0793134 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-10-03 10:19:31 +01:00
KHobbits
b9e3e5f7e5 Safe location fix:
x and z needs floor, while y should be round.
2011-10-03 09:58:46 +01:00
feildmaster
c2c4ee93a1 Edited Priority to "High"
Adds compatibility to plugins that adds text to the current "format."
2011-10-03 03:45:38 -05:00
feildmaster
9e97c93fa1 Fires an event before "killing."
Can be made cancel-able.
Could also be written to add "suicide" (if sender == player)
2011-10-03 03:40:42 -05:00
KHobbits
786dcae29e Updating safe teleport locations to include 1.8 blocks. 2011-10-03 08:08:05 +01:00
KHobbits
64de3475e5 Fixing mail argument errors. 2011-10-03 06:42:38 +01:00
ElgarL
679ae9756a Fix for Bukkit passing a null To location on a player Portaling 2011-10-02 18:00:42 +01:00
ElgarL
e5c02b3481 Added the ability to handle unknown worlds at server start.
(GM will create the data files for any worlds it finds which are not
in the config.yml)
2011-10-01 21:07:39 +01:00
ElgarL
9d4e553cf8 Moved events into GMWorldListener
Better error output
2011-10-01 17:58:44 +01:00
ElgarL
51878fa4ba Missed Event class 2011-10-01 17:07:34 +01:00
ElgarL
899e354260 Added event handling to manage new world creation at runtime. 2011-10-01 17:06:14 +01:00
ElgarL
eb12a3e426 Fix for loading of worlds not in the config
Fix for folder creation of unique worlds
2011-10-01 16:22:04 +01:00
ElgarL
59c4cf2738 Attempt to stop GM wiping groups/users yml's on a bad shut down. 2011-10-01 13:54:28 +01:00
ElgarL
b022a83694 Rewrote Config loading to use Bukkits Configuration features
Added an opOverride setting in config.
	  If present and set to false, op's will not get overriding permissions
in GroupManager.
	  (one op will not be able to alter another op's settings)
GM will now create all relevant world data files for non mirrored
worlds.
	  (for all worlds named in config.yml)
2011-10-01 13:44:06 +01:00
ElgarL
5cfb600708 Fixed an issue with superperms where plugins define perms with
inheritance after the root perms
2011-10-01 11:22:19 +01:00
KHobbits
ba67ed976b Allow different 'sets' of multiple homes, definable by permission.
- Not sure I like this, but it does seem to work
- changed config key for backwards compatibility (config node sets value on failure).
2011-10-01 10:08:58 +01:00
KHobbits
857f8a4aec Adding MOTD flags to config.yml
Setting config.yml 'warn-on-build-disallow: true' - should reduce number of confused support requests.
2011-10-01 05:02:32 +01:00
KHobbits
27b0a1b651 Patching /unlimited to not give items if player is in creative mode. 2011-10-01 04:57:49 +01:00
KHobbits
d9c859ba1e Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-09-30 20:18:08 +01:00
ElgarL
e6d1617599 Changed priority if Registered events to lowest. 2011-09-30 08:51:09 +01:00
snowleo
f5bf895a0e Don't set last location if it's invalid 2011-09-30 02:11:13 +02:00
snowleo
da63f575e3 Deprecation our TargetBlock class:
There is a function in bukkit that we should use instead
user.getTargetBlock(...)
2011-09-30 01:09:00 +02:00
snowleo
7cdca6800a Kits timeout are now saved in user data 2011-09-30 00:53:25 +02:00
snowleo
331aaa1111 Allow the deletion of broken homes 2011-09-30 00:27:53 +02:00
snowleo
c97fb64d0a Allow delhome for offline users 2011-09-30 00:15:57 +02:00
snowleo
cbe352a4dd Fix god mode enabled after afk player quit the game 2011-09-30 00:09:48 +02:00
snowleo
4ff9d4f90f More exceptions thrown 2011-09-29 23:59:25 +02:00
snowleo
42498a1417 Correctly throw exceptions if mob spawn protection is on 2011-09-29 23:59:24 +02:00
snowleo
1011475bf0 Only afk people, if they have essentials.afk permission. 2011-09-29 23:59:24 +02:00
KHobbits
469e484f06 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-09-29 22:52:10 +01:00
snowleo
d4ccabfb86 Corrected plurals of new creatures and removed Monster creature, because it can't be spawned anymore 2011-09-29 23:36:49 +02:00
KHobbits
7cec201a3f Merge remote branch 'remotes/ess/master' into essrelease 2011-09-29 00:43:42 +01:00
KHobbits
46bb5b0817 Merge branch 'essmaster' into essrelease 2011-09-29 00:40:16 +01:00
snowleo
b18da4aea6 Fixing line endings 2011-09-29 01:38:56 +02:00
KHobbits
c2d4604d4f Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-09-29 00:34:10 +01:00
KHobbits
e1801d6d40 Hiding the nether options, that are going to be removed in a future release. 2011-09-29 00:33:55 +01:00
ementalo
e06e8cddcf Fix freezeafk so that moving with mouse does not teleport you about. Add check for if some takes the ground away from you 2011-09-29 00:24:52 +01:00
snowleo
821a7bf104 Allow both essentials.build and permissions.build in PermissionsBukkit 2011-09-29 01:10:54 +02:00
KHobbits
9a72cab6fb Merge branch 'essmaster' into essrelease 2011-09-27 02:01:52 +01:00
KHobbits
feec946422 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-09-27 02:01:18 +01:00
ElgarL
4f54480e25 Update to 1.2 2011-09-27 01:59:01 +01:00
KHobbits
ce6586e0bb Make sure we don't bounce people with expired tempbans. 2011-09-26 23:37:00 +01:00
KHobbits
4500fbee4d Merge branch 'essmaster' into essrelease 2011-09-26 23:06:02 +01:00
KHobbits
0bf6ef5c58 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-09-26 22:54:34 +01:00
KHobbits
223ae8c87b BanIP fixed, work around for isBanned. 2011-09-26 22:37:14 +01:00
ElgarL
7ce7d9b8ea Optimized getAllPlayersPermissions and fixed pushing unknown perms to
superperms.
2011-09-26 21:52:32 +01:00
ElgarL
a3f878083c Fix for GM not checking inheritance for known superperms nodes. 2011-09-26 21:24:12 +01:00
KHobbits
f7b30b83b3 Updating for register 1.3 2011-09-26 03:20:56 +01:00
KHobbits
a43b5124e6 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-09-25 15:02:01 +01:00
ElgarL
ae0e9f5058 Fixed silly error with isLoaded() 2011-09-25 03:14:38 +01:00
KHobbits
8ab4128a39 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-09-24 21:41:28 +01:00
ElgarL
be76bce80b Fix for if the scheduler fails 2011-09-24 19:18:22 +01:00
ElgarL
e145fd43c2 Forgot to push task 2011-09-24 19:11:59 +01:00
ElgarL
f88eb95219 Added a BukkitPermsUpdateTask to only update superperms once on a
load/reload.
2011-09-24 19:10:55 +01:00
KHobbits
503cf779a4 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-09-24 17:36:10 +01:00
ElgarL
28e4bb8302 Removed superperms update on plugins unloading. Unneeded and created
undesired lag on shutdown.
2011-09-24 17:33:25 +01:00
KHobbits
11428a8217 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-09-24 16:01:04 +01:00
ElgarL
65186ff9da manulistp <name> + now only lists perms with a value of true 2011-09-24 15:55:53 +01:00
ElgarL
4ca12d3b38 Final fix for lag on manload 2011-09-24 15:48:01 +01:00
ElgarL
ed9fc1540e manulistp now accepts an additional + to list ALL Superperms
effective permissions (/manulistp <name> +).
manucheckp also outputs superperms results.
2011-09-24 15:26:55 +01:00
KHobbits
a819a09b6e Adjusting behavior of 'spawn-if-no-home'. 2011-09-24 03:31:20 +01:00
KHobbits
f230439ed3 Minor typing errors in messages.properties 2011-09-24 03:19:05 +01:00
KHobbits
542b30fca6 Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-09-24 03:18:25 +01:00
ElgarL
6546a0b6b4 Fixed wasteful updating of perms on a manload. 2011-09-24 02:53:38 +01:00
ElgarL
6e9e74a145 Fix for null in PLAYER_TELEPORT for bukkit perms. 2011-09-24 02:47:01 +01:00
KHobbits
f9a30d4848 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-09-22 17:51:10 +01:00
KHobbits
5f27e184d4 Fix for home names containing invalid characters. 2011-09-22 17:50:42 +01:00
ementalo
b0e2e4e1e7 Throw correct exceptions Test #943 2011-09-22 17:29:00 +01:00
KHobbits
33a477ff1e Merge branch 'essmaster' into essrelease 2011-09-22 15:29:47 +01:00
KHobbits
ed9043c184 Adding extra creature types to prevent spawn setting. 2011-09-22 15:08:55 +01:00
snowleo
8cb22e5222 Merge branch 'master' into release 2011-09-22 10:47:58 +02:00
snowleo
7bcafee89f Missing file for last commit 2011-09-22 10:47:39 +02:00
snowleo
18dcbc2ce7 Correctly implement food level on god mode 2011-09-22 10:46:23 +02:00
snowleo
2e91767f69 New Methods in Player 2011-09-22 10:39:43 +02:00
snowleo
470a770b14 CB#1185
B#855
2011-09-22 10:33:30 +02:00
snowleo
d5b95bdc1c BPermissions 1.6.0
Prefix/suffix support for bPermissions
Star permissions are now done by bPermissions
2011-09-22 01:03:54 +02:00
snowleo
31265be21c Merge pull request #26 from codename-B/patch-2
So... it's just some updates.
2011-09-21 15:52:36 -07:00
Ben
e2f8779466 So... it's just some updates. 2011-09-22 00:50:26 +02:00
KHobbits
cb26734c34 Merge pull request #25 from codename-B/patch-1
Edited Essentials/src/examples/bpermissions.yml via GitHub
2011-09-21 13:34:24 -07:00
KHobbits
999d1a0a18 Update to cb #1181 2011-09-21 21:29:31 +01:00
Ben
6b36c712ab Edited Essentials/src/examples/bpermissions.yml via GitHub 2011-09-21 22:26:30 +02:00
snowleo
04855b249c CB#1173
Merge branch 'groupmanager'

Conflicts:
	lib/bukkit-0.0.1-SNAPSHOT.jar
	lib/craftbukkit-0.0.1-SNAPSHOT.jar
2011-09-21 21:38:52 +02:00
ElgarL
ed67d67db0 - Update to handle 'getDescription().getPermissions(') returning a
list (CB 1172).
2011-09-21 16:23:47 +01:00
snowleo
999609a7ee Merge branch 'groupmanager' 2011-09-21 14:30:27 +02:00
ElgarL
a04e5b4a47 - Reverted WorldHolder static change to maintain backward plugin
compatability.
2011-09-21 12:30:11 +01:00
snowleo
a2950c74cb New config setting: protect.prevent.enderman-pickup
Defaults to false
2011-09-21 02:30:58 +02:00
snowleo
86aabb7a95 Added enderman pickup to sign protection 2011-09-21 02:29:51 +02:00
snowleo
ac0515eb5c CB#1163
B#847
2011-09-21 02:10:40 +02:00
snowleo
b9c70cf071 Food for Godmode: There is no event for food yet, so we have to update it manually.
Test #939
2011-09-20 19:29:04 +02:00
snowleo
25dacffa12 Heal-Signs sets food level to full and removes fire
Test #938
2011-09-20 18:27:26 +02:00
KHobbits
7ac5ec1177 Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-09-20 15:13:08 +01:00
ElgarL
9803a0efe4 All GroupManager commands issued by players are now echoed in the
console.
2011-09-20 14:49:42 +01:00
snowleo
630a149392 Add missing ; 2011-09-20 15:53:26 +03:00
snowleo
cffd84ee69 Merge pull request #24 from eXeC64/master
Fixed bug where players are unable to remove their own chest protection.
2011-09-20 05:44:50 -07:00
KHobbits
48bc00a01d Merge remote branch 'remotes/ess/groupmanager' into essmaster 2011-09-20 13:36:55 +01:00
Harry Jeffery
4dc2d07e29 Fixed bug preventing players from removing their own signs 2011-09-20 12:33:42 +01:00
ElgarL
7562c7777c Fix for pushing perms of non superperms supporting plugins 2011-09-20 10:35:05 +01:00
ementalo
512d6a34be do not show socialspy for own actions. Test #732 2011-09-20 00:15:13 +01:00
ElgarL
96be35a4d2 - Push updates to superperms for all valid GM commands. 2011-09-19 22:51:07 +01:00
ementalo
2a7e48bdb1 cleanup of *.properties 2011-09-19 22:48:29 +01:00
ementalo
dc2cf220e5 Added new command /powertooltoggle, enables / disables all powertools assigned (does not remove them) Test #919 2011-09-19 22:41:39 +01:00
snowleo
5506312b83 Ignore ComputationExceptions while loading users async 2011-09-18 22:18:54 +02:00
snowleo
b6a2d7397d Allow yaw & pitch in /tppos 2011-09-18 03:34:05 +02:00
snowleo
455c003440 Updated german translation from ThatGangsta on IRC 2011-09-18 03:29:48 +02:00
snowleo
c32b2af96b Fix GroupBridge build 2011-09-18 02:02:09 +02:00
snowleo
cef91f7c01 Fix GroupBridge build 2011-09-18 01:58:57 +02:00
snowleo
cf4eb31973 The correct ant variable from TeamCity 2011-09-18 01:27:39 +02:00
snowleo
c5830e8e82 Using ant properties 2011-09-18 01:25:04 +02:00
snowleo
272f22b61a One build file for all configurations 2011-09-18 01:07:43 +02:00
snowleo
6f9ac11bd7 Removed PermissionsCommands from BuildAll 2011-09-18 00:50:05 +02:00
snowleo
5043ab702d Automatic updates for future versions of items.csv
We also update all 1.7.3 versions of items.csv
2011-09-18 00:49:34 +02:00
snowleo
ac1729af37 New animals for spawner and spawnmob 2011-09-17 19:50:57 +02:00
snowleo
45f7ee08f2 GroupManager 1.1
Merge branch 'groupmanager'

Conflicts:
	EssentialsGroupManager/src/plugin.yml
	EssentialsGroupManager/src/users.yml
2011-09-17 13:19:47 +02:00
snowleo
a0115bee96 New items.csv by andrewkm 2011-09-17 13:17:10 +02:00
snowleo
acf30b559c New methods in player and server interface. 2011-09-17 13:14:34 +02:00
snowleo
14a2990d0a CB#1137
B#837
2011-09-17 13:10:10 +02:00
ElgarL
f270dd1a6b Read from group not user for setting superperms 2011-09-16 20:15:25 +01:00
KHobbits
b47a0ba0c9 Quickfix: Slightly changing syntax to stop conflict - This needs to be properly addressed 2011-09-15 07:08:05 +02:00
snowleo
9f896ca747 Merge branch 'bukkitupdate' 2011-09-15 00:34:29 +02:00
snowleo
ae12db8d4b Fix getSafePosition once again.
This time: Fix the rare case where the double number is slightly below the actual number (like 1.9999999998)

Also: Fix the case, when the player teleports somewhere in a 2 block high space and on the floor is something like rails.
2011-09-11 04:17:55 +02:00
okamosy
a255481251 added a clearall option to powertools 2011-09-10 10:39:35 +01:00
okamosy
5b2b8dd2e3 Merge branch 'master' of github.com:essentials/Essentials 2011-09-10 09:39:15 +01:00
KHobbits
3dd4d9d19e Move 'spawnifnospawn' check to home decision tree. 2011-09-09 14:23:42 +01:00
snowleo
a518cb4be2 Updates for banning
Removing the ban workaround

We might remove the ban commands completely.
2011-09-07 22:34:53 +02:00
snowleo
dec8a1a41f CB#1089
B#823
2011-09-07 22:07:31 +02:00
ElgarL
f777767db1 Doh, jumped a version 2011-09-06 10:19:11 +01:00
ElgarL
58443c0afd Final tidy up of superperms for GM 1.2 2011-09-06 10:13:32 +01:00
ElgarL
307d0f36f5 removed unneeded include 2011-09-06 10:12:15 +01:00
ElgarL
8055eda75c - Fixed BukkitPerms population. Wasn't correctly setting superperms. 2011-09-06 10:11:21 +01:00
snowleo
7f0d17cb70 Using the correct player object for dispatching the command on powertool use. 2011-09-05 22:59:37 +02:00
snowleo
a20490316a Merge branch 'master' into release 2011-09-05 14:15:07 +02:00
snowleo
9c6f4db546 Fix afk not disabled after command use 2011-09-05 04:14:02 +02:00
snowleo
91bb6e7bef Merge branch 'master' into release 2011-09-04 20:47:46 +02:00
snowleo
5af4ed0084 Ignore more local branches 2011-09-04 20:45:59 +02:00
ElgarL
275f42a97f Push to Build dev version 2011-09-04 02:09:11 +01:00
ElgarL
82b6b319b2 - Fix for an infinite loop bug with the new Bukkit Perms during a new
user creation.
2011-09-03 17:53:34 +01:00
ElgarL
88703a92c7 - Fix for Users.yml containing only 'users:' causing a crash.
- GroupManager will now generate a fresh Users and Groups yml if either
file is empty.
2011-09-03 16:13:43 +01:00
ElgarL
d8361bcb89 Minor change to GM's config.yml to make it slightly easier to understand
mirroring
2011-09-03 15:41:23 +01:00
ElgarL
d8f317db82 - Invalid groups assigned to players in users.yml will no longer cause
a crash. GM will now set them to the default group instead.
2011-09-03 15:29:44 +01:00
ElgarL
c262ac67d7 Damn typos 2011-09-03 14:39:10 +01:00
ElgarL
5a4f64d393 correct typo on setDefaulttWorldHandler 2011-09-03 14:33:47 +01:00
Steve
081d3f5152 - GroupManager will now attempt to select the default world when using
commands instead of failing and telling you to use '/manselect <world>'.
2011-09-03 14:24:32 +01:00
ElgarL
ff3332098f - Fixed users being able to use 'manuadd' to add users to higher groups
than their own.
	- Added SuperPerms support so GM will update adn provide the
permissions to plugins which only support Bukkit Perms.
	- Added more helpful output to errors on argument lengths.
2011-09-03 11:33:14 +01:00
ElgarL
9e0a10ba80 Bukkit Superperms support 2011-09-02 23:07:23 +01:00
snowleo
dc7fd1304c Cross world move check 2011-09-02 17:16:46 +02:00
KHobbits
2134fcc7af Throwing an error on /sethome if you cant set multiple homes. 2011-09-02 15:58:25 +01:00
snowleo
4555148e1c Disabling update check for now, we have to find a better solution. 2011-09-02 16:28:34 +02:00
snowleo
8317797274 Prevent that hidden players broadcast afk messages
Prevent that moving players triggers unafk too early, they can now move within a radius of 3 blocks from the position where they went afk.
2011-09-02 16:16:15 +02:00
KHobbits
61a377bc26 fix failed edit on github 2011-09-02 09:40:14 +02:00
KHobbits
a755ca4e0e Edited Essentials/src/com/earth2me/essentials/perm/Permissions2Handler.java via GitHub 2011-09-02 09:35:26 +02:00
snowleo
b0c20fa83c Merge branch 'master' into release 2011-09-02 00:05:05 +02:00
snowleo
e12e931364 Restore tempban functionality 2011-09-01 17:55:13 +02:00
snowleo
0d625d64c4 items.csv changes by andrewkm 2011-09-01 17:54:05 +02:00
snowleo
4cf1e4d3b5 Merge branch 'master' into release 2011-09-01 16:35:47 +02:00
snowleo
9cdb0e0f74 Prevent afk message after login, also don't show afk message on logout. 2011-09-01 15:29:45 +02:00
snowleo
1df5a15a1d Sample permissions for PermissionsBukkit, PermissionsEx and bPermissions 2011-09-01 13:47:49 +02:00
snowleo
f10ad3de53 Copy&Paste Bugs are always stupid 2011-09-01 11:52:52 +02:00
snowleo
1843cf1e58 Cleanup 2011-08-31 13:03:01 +02:00
snowleo
b0a7845093 Cleaner checkPermissions() 2011-08-31 13:02:21 +02:00
snowleo
fc9d8cbdaa Using base instead of our wrapped player for permission check. 2011-08-31 12:51:59 +02:00
Steve
818472dc58 added PermissionHandler.class and .project/.classpath so this will build
in eclipse
2011-08-31 01:56:31 +01:00
snowleo
92b6c42a92 Minor rewrite of Permissions package, all the stuff is now in one place. 2011-08-30 23:26:23 +02:00
snowleo
fc329284c3 Merge branch 'master' into release 2011-08-30 09:46:49 +02:00
snowleo
e406d0c094 Missing nochargeexception in /home and /world 2011-08-30 09:46:31 +02:00
KHobbits
60e2c57a33 Adding throw to prevent double charge. 2011-08-30 03:42:31 +01:00
snowleo
731d177b6a NoChargeException for teleport commands 2011-08-30 03:15:50 +02:00
snowleo
fd563364e5 /help now supports multiple permissions for a command in plugin.yml
Also minor cleanup
2011-08-30 03:15:10 +02:00
snowleo
a401dc0d16 First update check is done 10 minutes after server start. 2011-08-30 02:36:16 +02:00
snowleo
c155374e55 Catch NPE in /powertool, also cleanup 2011-08-30 01:14:03 +02:00
Steve
e2584d6b89 Test commit to see if push works
Updated plugin.yml to alpha-6 for GM
2011-08-29 21:15:33 +01:00
snowleo
8809014a85 Merge branch 'master' into release 2011-08-29 20:43:49 +02:00
snowleo
b1bb8c48fc Fix compatibility issues with Citizens 2011-08-28 23:51:10 +02:00
snowleo
566c2a620e Cleanup 2011-08-28 14:24:31 +02:00
snowleo
f3efe29baa If PermissionsBukkit or bPermissions is detected, we don't need the config switch. 2011-08-28 14:12:27 +02:00
snowleo
53056fa1ab Updates to Plugin listener 2011-08-28 13:57:36 +02:00
snowleo
17a5081a77 Adding support for two more permission systems. 2011-08-28 13:47:20 +02:00
snowleo
a7054ccb40 Revert "Testing yaml annotations"
This reverts commit 8c99f49a90.
2011-08-28 06:24:34 +02:00
snowleo
db88b67337 Another build fix 2011-08-28 06:17:43 +02:00
snowleo
9eb2d11e63 Allow the build server to build again. 2011-08-28 06:16:01 +02:00
snowleo
5ee8b6efe2 Disabling broken test 2011-08-28 05:21:12 +02:00
snowleo
8c99f49a90 Testing yaml annotations 2011-08-28 05:12:13 +02:00
snowleo
2cecb3dd2f Oops, these too. 2011-08-27 23:54:23 +02:00
snowleo
600237c5d2 Forgot this one 2011-08-27 23:38:21 +02:00
snowleo
362c2bbf48 Correctly charge for the use of commands.
We now first test, if the user could pay it, do the stuff and then charge him. If the command throws an exception, the user will not be charged.
2011-08-27 23:14:49 +02:00
snowleo
cd18881dec Fixes to auto afk 2011-08-27 22:29:57 +02:00
snowleo
bcf16e7eb6 Display which permission system is used. 2011-08-27 21:13:33 +02:00
snowleo
2ca0a8b9da Less use of Craftbukkit code, so less things will break on MC update.
Added try/catch around the tnt and creeper protection code. The event will now always canceled, even if our fake explosion code fails.
2011-08-27 20:39:54 +02:00
snowleo
5572b03cad Cleanup & output result of backup command 2011-08-27 17:50:44 +02:00
snowleo
f76afa66a2 Protect detector/powered rails 2011-08-27 17:11:15 +02:00
okamosy
f3f68d1c2e Merge branch 'master' of github.com:essentials/Essentials 2011-08-27 16:10:47 +01:00
okamosy
73a16d3f50 fixed home commands syntax to match multi-home 2011-08-27 16:10:35 +01:00
snowleo
12bf86baac Protect detector/powered rails 2011-08-27 17:09:43 +02:00
snowleo
08d2bd9a80 Prevent that wrong ids are used in /kit 2011-08-27 17:01:01 +02:00
snowleo
b06988514d Disable /nick if change-displayname is disabled
Some translations
2011-08-27 16:56:45 +02:00
snowleo
2cc1e0604f Another fix for /repair 2011-08-27 16:21:29 +02:00
snowleo
38e1054313 Cleanup of repair command and allow different charges for each item. 2011-08-27 16:19:23 +02:00
snowleo
fc22c1d2a5 Prevent kick for floating while afk & frozen 2011-08-27 15:43:26 +02:00
snowleo
c784dc96c2 Fixes for afk 2011-08-27 15:30:56 +02:00
snowleo
0fd07785fb Cleanup of EssentialsConf and delete empty files or files that are corrupt. 2011-08-27 15:30:30 +02:00
snowleo
f7cd8d492a Auto-AFK, AFK-Kick and freeze afk players 2011-08-27 13:59:49 +02:00
KHobbits
b73ca7db0a Powertool fix. 2011-08-27 02:54:45 +01:00
okamosy
061084241a Merge branch 'master' of github.com:essentials/Essentials 2011-08-26 21:03:25 +01:00
okamosy
ffe19e60c5 Cleaned up todo lists 2011-08-26 21:03:09 +01:00
KHobbits
85bf61f2ad Merge branch 'master' of github.com:essentials/Essentials into essmaster 2011-08-26 05:14:03 +01:00
KHobbits
d38f95a2bd Adding essentials.delhome.others to allow people to delete other peoples homes. 2011-08-26 05:13:38 +01:00
snowleo
751de18eaa PVP protection for arrows and other projectiles. Needs cleanup. 2011-08-26 04:46:08 +02:00
snowleo
d0cb64bddc Correctly catch signs ignition 2011-08-25 17:37:54 +02:00
KHobbits
ef857bfe96 Make home throw an exception if the world doesn't exist.
Add multiverse/missing world support to home upgrade.
2011-08-24 05:18:35 +01:00
KHobbits
560ea0d383 Skip default home if it's invalid. 2011-08-24 03:49:35 +01:00
KHobbits
13056601b7 Fixing NPE on Entity Listener (Powertool). 2011-08-24 03:09:27 +01:00
KHobbits
767362c9d8 Essentials.sethome.others doesn't imply essentials.sethome.multiple.
Restore essentials.home.others permission check.
2011-08-24 02:48:38 +01:00
okamosy
c7903459ac updated to use corrected joinList function. 2011-08-23 23:40:48 +01:00
okamosy
18b6c3436f Updated joinList to properly handle lists of lists. 2011-08-23 23:40:41 +01:00
okamosy
ab6bc94456 Added util function concat(List) and concat(string, list) to concatenate lists into a string.
Updated powertool to use new concat method.
2011-08-23 23:40:27 +01:00
okamosy
0c6e4e57d9 Merge branch 'master' of github.com:khobbits/Essentials 2011-08-23 22:58:48 +01:00
okamosy
b341da7f27 updated to use corrected joinList function. 2011-08-23 22:58:19 +01:00
KHobbits
d616408a77 Join full server patch. 2011-08-23 22:35:15 +01:00
okamosy
003c961b47 Merge branch 'master' of github.com:khobbits/Essentials 2011-08-23 19:48:09 +01:00
okamosy
a72adb5216 Updated joinList to properly handle lists of lists. 2011-08-23 19:47:50 +01:00
KHobbits
80e26bd03e Merge branch 'master' of github.com:essentials/Essentials 2011-08-23 18:16:33 +01:00
KHobbits
34e23e64f8 Fix to repair in plugin.yml 2011-08-23 18:15:45 +01:00
KHobbits
2fc41d7078 Homes tolower.
Max homes fix.
2011-08-23 15:37:09 +01:00
snowleo
33d74d0762 midnight = 12am
noon = 12pm
2011-08-23 15:36:54 +01:00
snowleo
daaf966f20 midnight = 12am
noon = 12pm
2011-08-23 13:22:11 +02:00
KHobbits
1697ca939a Adding delhome
Making sethome allow redefine
2011-08-23 07:04:33 +01:00
KHobbits
e2ea780fd3 Adding Home upgrade script.
Tidying up home code.
2011-08-23 06:09:34 +01:00
KHobbits
98e888e14d Merge branch 'master' of github.com:essentials/Essentials 2011-08-23 03:43:14 +01:00
KHobbits
cd0fc36315 Added multiple homes.
Permissions currently: essentials.sethome.multiple and essentials.sethome.multiple.unlimited
New config setting: multiple-homes (default value 5)
2011-08-23 03:42:32 +01:00
snowleo
a82c8a50b6 Update check for Essentials 2011-08-23 02:46:19 +02:00
snowleo
63c1cf8627 Show filename on yaml error 2011-08-23 01:28:01 +02:00
okamosy
188a052fdd Merge branch 'master' of github.com:khobbits/Essentials 2011-08-22 22:55:55 +01:00
okamosy
adafafd5ae Added util function concat(List) and concat(string, list) to concatenate lists into a string.
Updated powertool to use new concat method.
2011-08-22 22:10:23 +01:00
KHobbits
64dad0e888 Merge branch 'master' of github.com:essentials/Essentials 2011-08-22 18:45:46 +01:00
snowleo
5b0794c583 Merge branch 'master' into release 2011-08-21 21:44:58 +02:00
snowleo
a6d8597314 Cleanup 2011-08-21 21:30:01 +02:00
snowleo
804711e83a Pages for /warp command 2011-08-21 21:27:36 +02:00
snowleo
cdb7e3ccbe Wait 1 second after deactivation of protect to allow the database to close. 2011-08-21 21:27:22 +02:00
okamosy
0507167a19 Removed commented-out code 2011-08-21 20:06:25 +01:00
okamosy
9127025ec3 Completed changing powertool config from tokenized string to lists 2011-08-21 19:33:37 +01:00
snowleo
e6ba80ef18 Merge branch 'master' into release 2011-08-21 20:22:28 +02:00
okamosy
f63dbe6454 added config upgrade for powertools 2011-08-21 19:02:01 +01:00
okamosy
31136f971c Merge branch 'master' of github.com:khobbits/Essentials 2011-08-21 17:53:39 +01:00
okamosy
ed98f6f7a2 converted powertool config to use lists instead of tokenized strings
Powertool update
2011-08-21 17:52:58 +01:00
KHobbits
ccbded514b Fixing trade sign messages
Unifying tree/spawnmob code for block selection
Adding TL notes
2011-08-21 17:08:32 +01:00
okamosy
8d1ad411b7 Merge branch 'master' of github.com:khobbits/Essentials 2011-08-21 02:53:10 +01:00
okamosy
8be8e23509 Added ability to assign multiple powertools to an item
Added option to list commands assigned powertools
2011-08-21 02:50:48 +01:00
KHobbits
aefc9b9942 Merge branch 'master' of github.com:khobbits/Essentials 2011-08-20 21:58:55 +01:00
KHobbits
73e7e2330e Fixing trade message to be more user friendly. 2011-08-20 21:58:26 +01:00
okamosy
5e2eecd550 added charge command
fixed formatting
2011-08-20 21:23:44 +01:00
KHobbits
5b19f4408e Merge branch 'master' of github.com:khobbits/Essentials 2011-08-20 20:55:21 +01:00
KHobbits
c644f95d8b Switching trade sign flag 2011-08-20 20:54:54 +01:00
okamosy
92bf728f30 Added command repair [hand|all]
fixed if statements in commandsell
2011-08-20 20:49:17 +01:00
okamosy
a900575e09 Merge branch 'master' of github.com:khobbits/Essentials 2011-08-20 18:11:56 +01:00
okamosy
4e68807f9e Reformatted ptime and time messages
fixed typo in plugin
2011-08-20 18:09:55 +01:00
KHobbits
a7101b6e2c Updating default permissions. 2011-08-20 18:06:43 +01:00
KHobbits
89832479d9 Translation for tpall + tidy. 2011-08-20 16:44:42 +01:00
KHobbits
cbfb6e42db Check jail first, before setting. 2011-08-19 12:16:28 +01:00
KHobbits
3d7770f462 Success message on /spawner
Switch to use mob class.
2011-08-19 12:06:35 +01:00
snowleo
0a1a14590c Merge branch 'master' into release 2011-08-19 02:32:56 +02:00
snowleo
3fb48aa565 Removed unused users map 2011-08-19 02:32:34 +02:00
snowleo
33c67a9c0d Merge branch 'master' into release 2011-08-19 02:10:36 +02:00
snowleo
521f5f6c07 Protection signs: First check for ownership, then for allowed users. 2011-08-19 01:43:39 +02:00
snowleo
025ecf330d Corrected german translation. 2011-08-19 01:30:10 +02:00
snowleo
ab812a9b2c Merge branch 'master' into release 2011-08-19 01:06:52 +02:00
snowleo
8de2a5d3a2 Added KHobbits to authors 2011-08-19 01:06:15 +02:00
snowleo
3a2b0f9195 Merge branch 'master' into release 2011-08-19 00:42:26 +02:00
KHobbits
dfa505d6a3 Changing default prefix behavior to be a little smarter. 2011-08-17 17:40:11 +01:00
KHobbits
2ccc8f9a62 Adding command cost for !shout and ?question. 2011-08-17 15:28:58 +01:00
KHobbits
219385112b Adding instructions to accept tpaall. 2011-08-17 14:27:27 +01:00
KHobbits
b626c36d78 Adding /tpaall - Teleport here request to all players. 2011-08-17 14:19:47 +01:00
KHobbits
28e0d22060 Removing advice to move to perm3 2011-08-15 22:58:50 +02:00
ementalo
ac3ed038a7 #RB 1060 Updates 2011-08-15 20:36:43 +01:00
snowleo
af08deb444 Merge branch 'master' into groupmanager 2011-08-14 22:05:08 +02:00
snowleo
6719b62223 Update Permissions3.jar in lib folder to 3.1.6 2011-08-14 21:57:21 +02:00
snowleo
9ff6f21c7b GroupManager update to Permissions 3.1.6 API done by ElgarL 2011-08-14 21:56:40 +02:00
snowleo
8883b88efd Update Permissions3.jar in lib folder to 3.1.6 2011-08-14 21:55:22 +02:00
KHobbits
bd047fe6bf Merge pull request #22 from okamosy/master
Adding hidden players to tpo/unlimited update
2011-08-11 13:01:01 -07:00
okamosy
316649284d Added ability to clear entire list of of unlimited items
Fixed permission bug with per item spawning
General unlimited cleanup
2011-08-11 20:47:51 +01:00
okamosy
404ce653e4 Added support for teleporting to hidden players
Permission: essentials.teleport.hidden
2011-08-11 15:52:34 +01:00
KHobbits
8fc27edeed Merge pull request #1 from okamosy/master
added error message
2011-08-11 07:08:39 -07:00
okamosy
8dccf1798a added error message when attempting to pay a user that isn't online 2011-08-11 15:03:08 +01:00
snowleo
fda8b2b743 Catch NPE while login of new player 2011-08-11 13:43:04 +02:00
snowleo
45162f70b1 Allow the use of the world spawn in EssentialsSpawn for new players. 2011-08-11 13:32:11 +02:00
KHobbits
d7db16c305 Fix help for plugins which miss command descriptions. 2011-08-11 06:56:33 +01:00
KHobbits
7e314f5d01 Todo/alias. 2011-08-11 05:20:43 +01:00
KHobbits
82b53572a4 Fix unbanning players who don't have user files. 2011-08-11 04:38:00 +01:00
KHobbits
8f6d2a28a6 Updating /help for static ptime. 2011-08-11 03:34:07 +01:00
KHobbits
58a8427db9 Fix sethome/seen for invalid players. 2011-08-11 03:33:45 +01:00
KHobbits
78b4e087e7 Stop searching for tp location after a chunk. 2011-08-11 03:33:09 +01:00
KHobbits
83c2e1de15 /ptime list output message change 2011-08-11 03:04:57 +01:00
KHobbits
3c2cdd812e Removing hole in floor, tp cop-out.
This should force the code to find an suitable tp location.
- Not sure how well this will effect performance, but wanted to test it.
2011-08-11 02:59:40 +01:00
KHobbits
78a4c8fe44 Add '@' prefix to time, to fix the time, rather than relative. 2011-08-10 15:06:42 +01:00
KHobbits
2241e07975 Merge diff from krnlyng:
Adjust item spawn, to allow for match native names.
2011-08-10 10:45:24 +01:00
KHobbits
59d83f21e8 Fixing annoying text match. 2011-08-10 12:35:04 +06:00
KHobbits
6465e98c6c Fixing omission on last patches. 2011-08-10 12:05:05 +06:00
KHobbits
9b9bdc4ac6 Patch around broken bukkit method. 2011-08-10 11:36:09 +06:00
KHobbits
de1dcbf0e4 Trim help message to fit on 1 line.
Added old time alias.
2011-08-10 10:46:33 +06:00
KHobbits
9068beec56 Fixing display timezone if the server isn't running GMT+1 2011-08-10 10:41:03 +06:00
KHobbits
95e86f15d2 Added method to list users fixed time. 2011-08-10 05:25:45 +01:00
KHobbits
00bd80f168 Adjust times a little bit to be more realistic? 2011-08-10 04:54:03 +01:00
snowleo
0dac02713d Allow other plugins to use the same first line on signs as essentials. Just make sure that the player, who creates the sign does not have essentials.signs.signname.create or essentials.signs.create.signname permission. 2011-08-08 22:40:54 +02:00
snowleo
d40ccdba45 Reverting some changes to /time command 2011-08-08 18:21:38 +02:00
snowleo
ec5e2afe51 Revert "Prevent closing already closed statements"
This reverts commit 9c2af4adbf.
2011-08-08 18:14:20 +02:00
snowleo
1d89353cf1 Some fixes to the time code by me 2011-08-08 17:51:16 +02:00
snowleo
178d89ce5f Some fixes to the time code by me 2011-08-08 17:49:32 +02:00
snowleo
0a7f448f90 Correct code format for file DescParseTickFormat 2011-08-08 17:46:12 +02:00
snowleo
9a1993a506 Corrected permission testing a bit 2011-08-08 17:01:03 +02:00
snowleo
05df617381 Part of oloflarsson new time command
Semi complete awesome time command. This is missing: Help text, I18N.
2011-08-08 17:00:04 +02:00
snowleo
3d7896f2e3 Fixes to jail 2011-08-08 16:42:56 +02:00
snowleo
bb17a568f0 Minor cleanup 2011-08-08 16:32:59 +02:00
snowleo
fa69490c6d XMPP: Let xmpp users see xmpp messages from other xmpp users. 2011-08-08 16:30:32 +02:00
snowleo
39f4e42f7b XMPP: reconnect to server, if connection is broken. 2011-08-08 16:03:00 +02:00
snowleo
9c2af4adbf Prevent closing already closed statements 2011-08-08 15:56:23 +02:00
snowleo
fd67d5254d Fix /spawner with PigZombie 2011-08-08 15:34:32 +02:00
snowleo
633113038b Prevent muted players from using /msg 2011-08-08 15:34:10 +02:00
snowleo
c41b0621bd Fix essentials.joinfullserver 2011-08-08 15:24:38 +02:00
snowleo
1df180392d Limiting the length of the name on signs to 13 instead of 14 2011-08-08 15:13:27 +02:00
snowleo
d97df275f1 Restrict sign protections to valid signs only 2011-08-08 15:07:26 +02:00
snowleo
932caafa3e Users are now loaded async, so we have a new internal structure where they are saved.
I also did some cleanup on the classes that I worked on.

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

it's possible that /balancetop now needs more time to finish, if not all users are loaded into memory.
2011-08-08 14:40:40 +02:00
snowleo
d5254a2885 Changes to build-impl by Netbeans 2011-08-08 14:40:39 +02:00
KHobbits
48fada9ef3 Adding extra alias's to plugin.yml 2011-08-08 10:41:26 +01:00
KHobbits
80d896a874 Updating register to latest build. 2011-08-08 10:20:04 +01:00
KHobbits
9b1a684316 Adding new register methods. 2011-08-08 10:17:13 +01:00
KHobbits
809e82f778 More register libs 2011-08-08 10:02:18 +01:00
KHobbits
7f7988d3da Making /help <string> match the plugin name. 2011-08-08 09:23:48 +01:00
KHobbits
67eee34626 Merge branch 'master' of github.com:essentials/Essentials 2011-07-28 03:49:10 +01:00
KHobbits
19deac02b6 Removing failed translation. 2011-07-28 03:47:42 +01:00
KHobbits
c2995ca906 Merge pull request #21 from khobbits/master
rainbow sheep
2011-07-27 17:20:16 -07:00
KHobbits
4c610d2a02 adding sheep:random to /spawnmob 2011-07-28 01:15:47 +01:00
KHobbits
2f8f5bf1fc Merge pull request #20 from khobbits/master
Ban changes
2011-07-27 06:28:57 -07:00
KHobbits
23e59178e6 Adjusting the config file to mention the help permission 2011-07-27 14:26:04 +01:00
KHobbits
1f4c0aabc2 Adding a permission for unhiding help. 2011-07-27 14:25:41 +01:00
snowleo
7d38b1a513 Merge branch 'master' into release 2011-07-27 01:04:37 +02:00
snowleo
9cbd55533d Allow fractions of 1 2011-07-27 01:04:21 +02:00
snowleo
f1efe2e1d2 Fix for money exploit on trade signs 2011-07-27 01:00:55 +02:00
KHobbits
a0c9226473 fixing lost revision. 2011-07-26 14:28:23 +01:00
KHobbits
9f6647c93e Adding tempban/kick broadcast permissions and adding a banned by to the broadcast.
Adding tempban/kick broadcast permissions and adding a banned by to the broadcast.
Merge branch 'master' of github.com:khobbits/Essentials

Conflicts:
	Essentials/src/messages.properties
	Essentials/src/messages_da.properties
	Essentials/src/messages_en.properties
	Essentials/src/messages_fr.properties
	Essentials/src/messages_nl.properties
Merge branch 'master' of github.com:khobbits/Essentials
2011-07-26 14:23:14 +01:00
ementalo
b4487b5a13 double quoting ' 2011-07-26 10:35:55 +02:00
ementalo
fe00df5fde Merge pull request #19 from khobbits/master
Xesxen's Dutch translation.
2011-07-26 01:34:32 -07:00
KHobbits
2d8d58b9dd Edited Essentials/src/plugin.yml via GitHub 2011-07-25 23:25:07 -07:00
KHobbits
a77c6363a2 Edited Essentials/src/messages_nl.properties via GitHub 2011-07-25 19:24:14 -07:00
KHobbits
44a7f7ee2e Edited Essentials/src/messages_nl.properties via GitHub 2011-07-25 19:20:42 -07:00
snowleo
dcf2d45cdf Another obsolete file 2011-07-24 23:33:48 +02:00
snowleo
c9686b1a73 Removed useless files 2011-07-24 23:30:11 +02:00
snowleo
e5f40f5b6f Edited README.markdown via GitHub 2011-07-24 14:25:12 -07:00
snowleo
de498087fa Correcting all line endings to LF 2011-07-24 23:19:12 +02:00
KHobbits
57f0965182 Added plural alias for kit & warp 2011-07-24 12:47:59 -07:00
snowleo
44e55e01c8 Added code guidelines to all projects, so we don't need them globally.
Compress jar files
Don't copy lib files into dist folders
Removed vendor names
Changed all java versions to 1.6 to make it consistent.
2011-07-24 04:07:28 +02:00
snowleo
374fc322cc If add-prefix-suffix is not set in config and EssentialsChat is installed, it will default to true now for backwards compatibility. 2011-07-24 00:41:54 +02:00
snowleo
1a603170d2 Merge branch 'master' into release 2011-07-23 22:34:43 +02:00
snowleo
72f7e67065 SuperpermsBridge fail 2011-07-23 13:17:22 -07:00
snowleo
84f26effaa Merge branch 'master' into release 2011-07-23 20:06:00 +02:00
snowleo
6feeaa7563 Master and Release branch are now identical again.
Removed warning for an older bukkit version.
2011-07-23 20:05:44 +02:00
snowleo
4fa964b25e NPE check in PlayerInteract 2011-07-23 19:13:05 +02:00
snowleo
6b6f42208e Merge branch 'master' into release 2011-07-23 03:11:14 +02:00
snowleo
9bd3111fab More german translations 2011-07-23 03:10:53 +02:00
snowleo
09c0f848ae Merge branch 'master' into release 2011-07-23 03:07:38 +02:00
snowleo
d10ac03358 German translation for muted 2011-07-23 03:07:21 +02:00
snowleo
bd1157604a Merge branch 'master' into release 2011-07-23 02:39:37 +02:00
snowleo
3b749c6a68 Readded some code, so that the user is not checked, if he is next to himself. 2011-07-23 02:07:25 +02:00
snowleo
9b0b37ee81 Fix Util.getSafeDestination() to use int instead of double. 2011-07-23 02:06:13 +02:00
snowleo
d7c10d1975 Separate config setting for prefix/suffix 2011-07-23 01:43:02 +02:00
snowleo
13c7cf2570 Added more default permissions for players to config.yml 2011-07-23 01:29:31 +02:00
snowleo
4c2954b185 Removed quotes from translation files 2011-07-23 01:13:55 +02:00
snowleo
56663f7bf4 Missing space in Spawnmob message 2011-07-23 01:10:22 +02:00
snowleo
d427acbd15 Don't give out a full stack on /unlimited, instead either 2 or 1, if the max stack size is 1 2011-07-23 01:03:45 +02:00
snowleo
26fec73328 Now the cleanup 2011-07-23 00:53:55 +02:00
snowleo
20d448b5cf Revert "minor cleanup"
This reverts commit e1425f5e25.

Don't mess with the line endings!
2011-07-23 00:50:52 +02:00
snowleo
544fb7faf9 Add white color after each name to prevent coloration of the next name. 2011-07-23 00:47:02 +02:00
ementalo
e1425f5e25 minor cleanup 2011-07-22 23:33:33 +01:00
ementalo
172d6ee8a7 Merge pull request #17 from Macel/master
Added translations to plugin help command failure log messages
2011-07-22 15:13:47 -07:00
Robert Meany
72e32913bd *First Commit - Please verify I did everything right* - Added translations
to plugin help command failure log messagets.
2011-07-22 13:53:06 -04:00
ementalo
5230c73ed5 SignProtection code fix number 92324 2011-07-22 17:16:08 +01:00
ementalo
6396689991 SignProtection another fix 2011-07-22 17:03:55 +01:00
ementalo
5e64fe97de fix of my fix 2011-07-22 16:56:41 +01:00
ementalo
8ef7005e20 Test #725 fix for Protection signs created before 2.5 2011-07-22 14:07:04 +01:00
ementalo
8fe40c8d87 Test #723 essentials.ban.notify - only people with this permission get notified on ban 2011-07-22 12:36:49 +01:00
snowleo
bb78f0d908 Merge branch 'master' into release 2011-07-21 02:58:39 +02:00
snowleo
1375b4985d /unlimited: Instead of 2, give the player a full stack 2011-07-21 02:58:20 +02:00
snowleo
590b761295 Merge branch 'master' into release 2011-07-21 02:52:25 +02:00
snowleo
a9b0537b92 EssentialsChat: The user should see his own message
Corrected radius
2011-07-21 02:42:54 +02:00
snowleo
f0ab3c70ae Merge branch 'master' into release 2011-07-21 02:29:45 +02:00
snowleo
c73d73e9f7 Null pointer check for Perm 2.7.4 prefix/suffix 2011-07-21 02:09:54 +02:00
snowleo
1c88ad3f90 Merge pull request #15 from khobbits/patch-3
Not sure how well this would work, but its probably worth giving the user at least two of the item to combat client lag, if you try and build something with unlimited, but you only have 1 item, client lag prevents you from doing so quickly, because you need to wait for the server to give you back the item.
2011-07-20 16:44:51 -07:00
snowleo
1f127a7775 Merge pull request #16 from Brettflan/master
Fix for local chat, leftover Factions cleanup
2011-07-20 16:43:41 -07:00
Brettflan
8de179d772 Fix for local chat not working (instead acting just like global chat) 2011-07-20 18:08:02 -05:00
Brettflan
64445a57f0 Removed leftovers from initial Factions integration 2011-07-20 18:06:58 -05:00
snowleo
8f78e75ba5 Merge branch 'master' into release 2011-07-21 00:31:39 +02:00
snowleo
e70f23af23 Updated VanishNoPickup:
vanish player if they are set as hidden on join
2011-07-20 23:58:41 +02:00
snowleo
292f68af80 Updated VanishNoPickup
Correctly save hidden users
Allow /vanish hide playername from console
2011-07-20 23:48:21 +02:00
snowleo
2fbef9cf12 Merge branch 'master' into release 2011-07-20 23:18:34 +02:00
snowleo
af1146e8a0 Fix /time for players without essentials.time.world 2011-07-20 23:18:09 +02:00
snowleo
2ee14dea30 Merge branch 'master' into release 2011-07-20 23:09:40 +02:00
snowleo
5f17e258ea Updated VanishNoPickup
Moved /noaggro command to /vanish aggro
2011-07-20 23:08:47 +02:00
snowleo
4ac11fe54f Merge branch 'master' into release 2011-07-20 22:37:43 +02:00
snowleo
d45731edb7 VanishNoPickup 1.9.12+essentials2 2011-07-20 22:35:59 +02:00
snowleo
a56fb0c195 Merge branch 'master' into release 2011-07-20 22:22:02 +02:00
snowleo
fa2fa54fe2 Don't return offline players with getPlayer() 2011-07-20 22:14:56 +02:00
snowleo
e8ff59b9aa Prevent players to create correct signs with essentials.signs.color permission. 2011-07-20 22:04:02 +02:00
snowleo
ea221d05c7 Don't teleport to offline users. 2011-07-20 22:03:15 +02:00
snowleo
cdff1649c3 Show player not found message, if no unhidden player is found in /msg 2011-07-20 21:36:23 +02:00
snowleo
ea3a2f030c Native support for PermissionsEx 2011-07-20 20:42:19 +02:00
snowleo
2a34bf0796 Merge branch 'master' into release 2011-07-20 18:40:04 +02:00
snowleo
3fdda556d3 Revert "I don't think we need this anymore."
This reverts commit afdc46e277.

Also inverted it, so it works now again.
2011-07-20 18:36:29 +02:00
snowleo
4d830805ea Spawnmob sign 2011-07-20 18:20:12 +02:00
snowleo
309a983d8f Cleanup 2011-07-20 18:19:26 +02:00
snowleo
165a71cd23 Added VanishNoPickup 1.9.12+essentials1 2011-07-20 17:25:32 +02:00
KHobbits
f522e31909 Not sure how well this would work, but its probably worth giving the user at least two of the item to combat client lag, if you try and build something with unlimited, but you only have 1 item, client lag prevents you from doing so quickly, because you need to wait for the server to give you back the item. 2011-07-20 08:15:40 -07:00
snowleo
4dc1c8a559 Socialspy for aliases of commands
Adding tell as alias of msg
2011-07-20 17:11:59 +02:00
snowleo
88b8baa4ee Fix: Unmute players, even if they have essentials.mute.exempt permission 2011-07-20 17:10:55 +02:00
snowleo
3d38330a24 Merge branch 'master' into release 2011-07-20 12:13:24 +02:00
snowleo
d8aef06f46 More changes to the EssentialsChat API for Factions 2011-07-20 12:12:49 +02:00
snowleo
747b0a4d0e Merge branch 'master' into release 2011-07-19 12:09:48 +02:00
snowleo
17ba7e2a3d Fix duplicated logger messages in GM after reload 2011-07-19 12:04:06 +02:00
snowleo
78434312c8 Merge branch 'master' into release 2011-07-19 11:42:18 +02:00
snowleo
625164dac2 The event.getPlayer() is needed for the hook. 2011-07-19 11:29:16 +02:00
snowleo
17f3bc4494 Rewritten Factions hook, so we don't need Factions in our code. 2011-07-19 11:26:23 +02:00
snowleo
adc446dfa5 Removing the annoying c3p0 start message. 2011-07-19 11:11:59 +02:00
snowleo
9e89425dab Close database connections on plugin deactivation 2011-07-19 10:34:02 +02:00
snowleo
20752cc534 Merge branch 'master' into release 2011-07-19 01:52:44 +02:00
snowleo
e3be177ed4 /tempban and /ban have the same problem as /tjail
new permissions:
essentials.ban.offline
essentials.tempban.offline
2011-07-19 01:32:48 +02:00
snowleo
b355e663d9 user.dispose() should be called on every quit. 2011-07-19 01:27:56 +02:00
snowleo
2dda972f74 We can't test for essentials.jail.exempt, if the player is offline, so added a new permission essentials.togglejail.offline 2011-07-19 01:27:16 +02:00
snowleo
ab7c7a5824 More fixes to /tjail
Don't prevent unjailing an admin
Fix time change
2011-07-19 01:12:19 +02:00
snowleo
3d0da9df93 Another fix for /tjail offline players 2011-07-19 00:59:43 +02:00
snowleo
f9934bb38f Merge branch 'master' into release 2011-07-19 00:47:14 +02:00
snowleo
4a0afb9dd8 Send helpop messages to console 2011-07-19 00:46:41 +02:00
snowleo
8b210b34ec Merge branch 'master' into release 2011-07-19 00:42:10 +02:00
snowleo
c244c0995e {UNIQUE} player count for motd 2011-07-19 00:10:33 +02:00
snowleo
9557b25344 show hidden for /whois 2011-07-19 00:09:30 +02:00
snowleo
256beda998 Always use lowercase if accessing users map. 2011-07-19 00:02:35 +02:00
ementalo
258669849e only check hidden if !offline, compare user with offlineplayer class 2011-07-18 22:49:27 +01:00
ementalo
a9c0385d3e Add yet another way to get a user from our users list, Don't teleport an offline player when jailed
Added playerjoin to jaillistener to teleport a player on login
2011-07-18 22:16:58 +01:00
snowleo
c1ac4f375d NPE fix in InventoryWorkaround 2011-07-18 22:39:01 +02:00
snowleo
b7c205cd7a Merge branch 'master' into release 2011-07-18 20:55:31 +02:00
snowleo
f0e01dbd91 Workaround for the crippled bukkit permissions.
Splits the node at . and checks for * permissions on all levels.
2011-07-18 13:18:28 +02:00
snowleo
64f27c9b53 New config settings for Protect:
protect.prevent.tnt-playerdamage
protect.prevent.fireball-fire
protect.prevent.fireball-playerdamage
2011-07-18 07:22:28 +02:00
snowleo
afdc46e277 I don't think we need this anymore. 2011-07-18 06:19:40 +02:00
snowleo
0c767e597c Removed " from language files 2011-07-18 06:14:00 +02:00
snowleo
069fbe7df0 Fix: Player staying afk if moving 2011-07-18 06:08:13 +02:00
snowleo
16ec40f6b9 Merge branch 'master' of https://github.com/essentials/Essentials 2011-07-18 05:45:24 +02:00
snowleo
6b0c09990b Only show hidden player count, if it's more than 0 2011-07-18 05:45:05 +02:00
snowleo
66ea0e080f Merge pull request #14 from khobbits/patch-2
Missing commands in config.yml
2011-07-17 20:37:31 -07:00
snowleo
08eb239a2a Fix InventoryWorkaround.addItem() not using the combined list. 2011-07-18 04:59:47 +02:00
snowleo
cf419fe209 Append the event and not the word event to trade log 2011-07-18 04:58:55 +02:00
snowleo
92253b3141 Log location of /sell and signs 2011-07-18 04:49:38 +02:00
snowleo
ba7a447259 Missing return in /time reset command 2011-07-18 04:42:10 +02:00
snowleo
c68f0d2e0c Fix player still being in user list after he was deleted. 2011-07-18 03:54:33 +02:00
snowleo
259d51a45a Added option to hide player from /list /who ... login message.
This is for other plugins, that want to hide a player.
Use IEssentials.getUser(Player p).setHidden(boolean)
2011-07-18 03:42:21 +02:00
KHobbits
fcc22e57ed Edited Essentials/src/config.yml via GitHub 2011-07-17 18:09:34 -07:00
snowleo
83a3797773 Merge branch 'master' into release 2011-07-18 02:30:16 +02:00
snowleo
cd4c21378c Split build and use protection 2011-07-18 02:30:05 +02:00
snowleo
c17c6072b6 Merge branch 'master' into release 2011-07-18 01:49:45 +02:00
snowleo
f5f04b032a Protect Rails and other signs from pistons 2011-07-18 01:39:41 +02:00
snowleo
d2e1b2435f Cleaned deprecated functions 2011-07-18 01:17:24 +02:00
snowleo
6733d177df Piston push blacklist 2011-07-18 01:05:42 +02:00
snowleo
424781c4a7 Protection of signs against pistons 2011-07-18 00:50:03 +02:00
snowleo
15c088e6de Bukkit Permission system
New config setting: use-bukkit-permissions
2011-07-18 00:30:39 +02:00
ementalo
ef4433c9fd CB #1000 Bukkit #700 2011-07-17 22:31:12 +01:00
ementalo
51e0b61fbb Test #706. essentials.mute.exempt - messages for mute players 2011-07-17 00:13:57 +01:00
ementalo
ee8d90bbb2 Merge branch 'master' of github.com:essentials/Essentials 2011-07-17 00:08:30 +01:00
ementalo
6384a562c8 essentials.mute.exempt prevents muting, send messages when a player is muted to the muted 2011-07-16 23:53:53 +01:00
snowleo
c18b9db182 Merge branch 'master' into release 2011-07-16 17:04:46 +02:00
snowleo
a710cd2a95 Fixes to EssentialsProtect that will remove conflicts with WorldGuard and other protection plugins. 2011-07-16 17:04:25 +02:00
snowleo
270b3e689f Merge branch 'master' into release 2011-07-16 16:53:13 +02:00
snowleo
ee92e48eb3 mute for offline users 2011-07-16 16:52:50 +02:00
snowleo
dd12c271a1 Merge branch 'master' into release 2011-07-16 14:04:49 +02:00
snowleo
fdf93d3dd4 Register API #8f66f7dcae80945250301a9d9e644a74ab28d0b6
Supports BOSE7
2011-07-16 14:04:30 +02:00
snowleo
e4df8c8314 Fixing merge error 2011-07-16 13:32:10 +02:00
snowleo
370d207ce4 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
2011-07-16 13:25:12 +02:00
snowleo
455fbd8170 Disable old message about iconomy not being enabled before essentials 2011-07-16 05:56:35 +02:00
snowleo
4a1a611c02 fix kickexempt 2011-07-16 05:55:52 +02:00
snowleo
845a4054e3 Revert to correct class loader 2011-07-16 05:06:08 +02:00
snowleo
9b2bcacebe restricted-commands have been removed from config.yml
Now we have a whitelist: player-commands
2011-07-16 04:05:43 +02:00
snowleo
88e0038b30 Log free signs.
We don't how much the user takes out of the free sign, so we log the maximum value.
Also corrected the stack sizes.
2011-07-16 03:51:12 +02:00
snowleo
1676b4f785 Colored signs with &0-f
Permissions: essentials.signs.color
2011-07-16 03:23:58 +02:00
snowleo
dde22a9bf4 Revert broken ban reason for /tempban 2011-07-16 03:11:52 +02:00
snowleo
07aadf0463 German language file corrections 2011-07-16 02:54:35 +02:00
snowleo
2edb9a10c6 Fixing the UnitTests 2011-07-16 02:45:12 +02:00
snowleo
a1e8c6b8e3 Merge branch 'master' of https://github.com/essentials/Essentials 2011-07-16 02:38:46 +02:00
snowleo
b715d016bb Created an interface for settings. 2011-07-16 02:38:22 +02:00
ementalo
8c96a03a76 Merge pull request #12 from khobbits/master
Tidy plugins.yml, tidy help.
2011-07-15 17:12:29 -07:00
ementalo
a9ac052381 This change did not commit 2011-07-16 01:09:28 +01:00
ementalo
e7ed20fb7c Test #393 adding optional ban reason with tempban /tempban player time reason, also adding essentials.tempban.exempt 2011-07-16 01:05:11 +01:00
snowleo
a3f5b24d2c Fix merge error 2011-07-16 01:35:30 +02:00
snowleo
06334f9b48 Merge branch 'master' of https://github.com/essentials/Essentials 2011-07-16 01:33:33 +02:00
snowleo
616b880e13 Heavy cleanup of all classes
ItemDb is not static anymore
Essentials.getStatic() removed
2011-07-16 01:33:22 +02:00
ementalo
63ae2c4873 offline player validation for banning 2011-07-15 22:58:03 +01:00
ementalo
9af708740b Merge branch 'master' of github.com:essentials/Essentials 2011-07-15 22:51:43 +01:00
ementalo
ab79a25040 fixing offline player permissions check-ups.
Ban for offline players.
2 new permissions nodes. essentials.ban.exempt and essentials.kick.exempt. People with this permission cannot be banned / kicked
2011-07-15 22:48:42 +01:00
snowleo
372f88757b Cleanup of Essentials class
Moved all ban stuff to BanWorkaround
2011-07-15 23:39:56 +02:00
snowleo
47d4b083c2 Fix #682 line numbers of trade signs corrected 2011-07-15 22:02:43 +02:00
KHobbits
970db678b3 Format. 2011-07-15 20:59:40 +01:00
snowleo
5d479e8fe1 Test #683
fix for unbreakable sign
2011-07-15 21:58:24 +02:00
KHobbits
54c7ab58c7 Adding a failure message for help search 2011-07-15 20:56:58 +01:00
snowleo
05a0059b22 Cleanup of Essentials Block and Player Listeners
Removed old sign code
Moved some jail stuff to the JailPlayerListener
Jail Events now have low priority, so that events are cancelled early.
2011-07-15 21:49:52 +02:00
KHobbits
c17507975c Adjust the help for more alias' 2011-07-15 20:44:37 +01:00
snowleo
c67a417ab8 Fix /time command:
Removed essentials.time.player permission (this is now default)
Added essentials.time.others permission
Admins can now set the time of players
Added reset option, that sets the time of the player to the world time
2011-07-15 21:16:06 +02:00
snowleo
cac183f8ec Broadcast message on kick/ban 2011-07-15 20:49:47 +02:00
snowleo
0a91264bcc Moved user.setDisplayName() from EssentialsChat to Essentials
Added new config: change-displayname (default to true)
It allows users to disable the setDisplayName, if they have other plugins that modify the display name
Updated user.getNick() to use StringBuilder
2011-07-15 20:35:09 +02:00
snowleo
07436c0ee8 New permission: essentials.sleepingignored 2011-07-15 20:13:52 +02:00
snowleo
c8fcef6f60 /balance in console for offline users 2011-07-15 20:06:34 +02:00
snowleo
46fe38c03e Log Protection alerts to the console
Also added the world name, which was missing.
2011-07-15 19:52:29 +02:00
snowleo
58502947e5 Disable /unlimited for fire block 2011-07-15 19:38:27 +02:00
snowleo
938ff3adc2 Correct sorting 2011-07-15 19:29:06 +02:00
ementalo
5355d07268 actually remove sorting methods 2011-07-15 17:50:48 +01:00
ementalo
cc87310860 balancetop only braodcasts to the issuer now, fix messages, remove util sortingmethods 2011-07-15 17:47:36 +01:00
ementalo
a4d2054bf0 balance top output to chat 2011-07-15 16:15:29 +01:00
ementalo
f936341c39 Test #383 added balance top. Hardlimit max of 10 users at the moment. /balancetop retrieves all 10 /balancetop <1-10> retrieves the top number you specify 2011-07-15 15:43:39 +01:00
ementalo
16c28f8059 fix messages when /eco'ing others 2011-07-14 23:27:04 +01:00
ementalo
7ce5b03ebe Test #614 fix for socialspy 2011-07-14 22:58:36 +01:00
snowleo
22622d7b89 Signcolors also has High, so we have to use Highest 2011-07-10 14:14:40 -07:00
snowleo
6c5e601c49 Fix signcolors bug 2011-07-10 14:11:50 -07:00
ementalo
177a033221 add thy shears forsooth 2011-07-09 23:48:26 +01:00
ementalo
44ac802537 add missing items 2011-07-09 22:52:43 +01:00
ementalo
1596cf17da updated items.csv by necrodoom 2011-07-09 20:26:23 +01:00
ementalo
38fae15f75 merge went odd 2011-07-09 12:52:46 +01:00
ementalo
09317cfe53 CB# 974 2011-07-09 12:45:41 +01:00
ementalo
af86736c7c Merge pull request #11 from khobbits/patch-1
Add support for permissions: in plugin.yml files
2011-07-09 03:36:34 -07:00
KHobbits
87f5f5b1a3 Edited Essentials/src/com/earth2me/essentials/commands/Commandhelp.java via GitHub 2011-07-08 19:51:48 -07:00
ementalo
dd1231ca36 fix take message for ec 2011-07-08 12:49:57 +01:00
ementalo
d3eefba087 fixing eco command player argument. must be careful with c&p :/ 2011-07-08 12:38:54 +01:00
ementalo
6c09217489 missed this from checkin oops 2011-07-08 12:29:06 +01:00
ementalo
2230159dae /balance offline players. Send message to initiator of eco commands 2011-07-08 12:24:32 +01:00
ementalo
b33f18cac7 update signs after trades 2011-07-08 12:00:18 +01:00
ementalo
79aa26d907 copy and paste argument fix 2011-07-08 10:39:49 +01:00
ementalo
799cb318f8 /eco offline players 2011-07-08 10:37:40 +01:00
snowleo
1a715bd40b Fix save inventory after logout for new players. 2011-07-08 02:19:59 +02:00
snowleo
9e040af32b NPE fix for offline users in UserData
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1583 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-07-08 02:16:23 +02:00
snowleo
10b7f19f05 Set priority to Highest to prevent item dupe with trade signs. 2011-07-08 02:10:42 +02:00
ementalo
af5966c19a missing translation 2011-07-08 00:06:14 +01:00
ementalo
d3f42b4561 Test #304 set the location using the setters location, not the players location.
Support for offlline players
2011-07-07 22:24:50 +01:00
ementalo
b33651e102 use full english for disconnect to spare eyeballs 2011-07-07 21:43:44 +01:00
ementalo
e5027ad590 #539 new config . remove-god-on-discon if people discon with godmode on it will be turned off on quit. 2011-07-07 21:37:55 +01:00
ementalo
207f2ba0f3 remove null check for user in toggle jail. this is handled when we get user 2011-07-07 21:08:42 +01:00
ementalo
ffce2c202d Merge branch 'master' of github.com:essentials/Essentials 2011-07-07 21:05:46 +01:00
ementalo
56c384824a #571 test jailing offline players. Person needs to have visited the server at least once and have a players.yml file 2011-07-07 21:05:08 +01:00
snowleo
2261c19408 Return boolean on sendMessage (XMPP) 2011-07-07 21:25:15 +02:00
snowleo
d0f1638142 Missing signs in sign list: balance and weather 2011-07-07 19:35:55 +02:00
snowleo
4a6828592e /spawnmob command: Show error message if EssentialsProtect will prevent spawning of creature. 2011-07-07 19:22:57 +02:00
snowleo
145786e604 Fix a bug with temp banning offline users 2011-07-07 19:11:57 +02:00
snowleo
2b28185e70 New permission: essentials.signs.trade.override
Allows admins to break trade sign of other players.
2011-07-07 19:00:31 +02:00
snowleo
29470f8edc Merge branch 'master' of https://github.com/essentials/Essentials 2011-07-07 18:54:52 +02:00
snowleo
63ade8339b Prevent loops generated by logging directly to xmpp 2011-07-07 18:54:25 +02:00
snowleo
c39894e78f Merge pull request #10 from khobbits/master
Fixing help
2011-07-07 07:03:33 -07:00
KHobbits
aabeb3e8a3 Fixing help 2011-07-07 05:19:11 +01:00
KHobbits
265ce75dc5 Merge branch 'master' of github.com:khobbits/Essentials
Conflicts:
	Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
2011-07-07 04:14:50 +01:00
snowleo
52f8582096 Added a comment to config that the item-spawn-blacklist will be ignored, if permission-based-item-spawn is set to true. 2011-07-06 02:59:16 -07:00
snowleo
a4be55f68a Missing config for last commit 2011-07-06 03:13:03 +02:00
snowleo
2822a885ce Basic logging of trade/buy/sell signs and sell command 2011-07-06 02:58:59 +02:00
snowleo
92ae54e961 Fix /realname 2011-07-06 01:55:15 +02:00
snowleo
e6ee51df4c Prevent oversized lines on trade signs 2011-07-06 01:39:24 +02:00
snowleo
ef4a3df168 Now fireball explosion prevention has it's own config settings (was catched by tnt explosion prevention before) 2011-07-06 01:24:54 +02:00
snowleo
4a2a8f2ce0 Bounce projectiles, if they are cancelled. 2011-07-06 01:13:03 +02:00
snowleo
20cfc2d87e Weather sign 2011-07-06 00:55:05 +02:00
snowleo
8039f941f6 Run the sign break event with the lowest priority, so it won't restore if other plugins cancel the event. 2011-07-06 00:14:06 +02:00
snowleo
c07cef7de8 Set sleeping ignored for afk players & disable afk mode on login 2011-07-06 00:05:44 +02:00
snowleo
79640a26e0 Merge branch 'master' of https://github.com/essentials/Essentials 2011-07-05 23:50:50 +02:00
snowleo
8e043d27c3 Limiting the amount of money a player can have.
The maximum limit is 10 trillions.
2011-07-05 23:50:31 +02:00
snowleo
da918ee3d1 Merge pull request #9 from khobbits/patch-2
essentials.back.ondeath would be useless without essentials.back
2011-07-05 08:06:03 -07:00
KHobbits
4e521bb952 essentials.back.ondeath would be useless without essentials.back 2011-07-03 06:58:20 -07:00
ementalo
9d3af208d2 fixes #654 - user is no longer afk on chat or command use 2011-07-03 00:05:46 +01:00
ementalo
d85d8cb712 Merge branch 'master' of github.com:essentials/Essentials 2011-07-02 23:54:43 +01:00
ementalo
d6cc04018b fixes #475. User is no longer afk if they move. others can set afk /afk playername. needs essentials.afk.others 2011-07-02 23:53:54 +01:00
snowleo
4dfc998aa3 Added softdepend: Factions to EssentialsChat 2011-07-02 15:42:28 -07:00
snowleo
0c124d23b8 Merge pull request #8 from Brettflan/master
Implemented Factions plugin hooks to EssentialsChat for proper chat integration between them (master/dev branch)
2011-07-02 15:41:17 -07:00
Brettflan
ad7b7b8cc0 Implemented Factions hooks for proper chat integration with it (master/dev branch) 2011-07-02 17:34:49 -05:00
snowleo
4c918277fe Edited README.markdown via GitHub 2011-07-02 15:12:43 -07:00
snowleo
e92a72db9e Merge pull request #6 from khobbits/patch-1
Updated groups.yml
2011-07-02 14:57:45 -07:00
snowleo
c76958585e Prevent signs created by plugins like SignColours 2011-07-02 13:16:44 +02:00
snowleo
54a8ef91ce Fix: No cooldown for all /tpo commands
TP-Delay: Player can move around roughly in the 9 blocks surrounding them.
2011-07-02 13:12:10 +02:00
snowleo
18fe40876c Update of bukkit version number in essentials class 2011-07-02 01:13:44 +02:00
snowleo
01cf72b3fc CB# 953
B# 754
2011-07-02 01:12:59 +02:00
snowleo
4439c9d2ff Update of bukkit version number in essentials class 2011-07-02 01:10:48 +02:00
snowleo
8fc74bf13c CB# 953
B# 754
2011-07-02 01:09:19 +02:00
snowleo
08f858deba More names for pistons (items.csv)
Fix for /unlimited and pistons
2011-07-01 10:58:50 +02:00
snowleo
9b315a0fa7 More names for pistons (items.csv)
Fix for /unlimited and pistons
2011-07-01 10:52:59 +02:00
snowleo
a6e7647b07 Fix Protection signs 2011-07-01 01:33:35 +02:00
snowleo
77a48c8a2e Fix Trade signs 2011-07-01 01:33:09 +02:00
snowleo
6b98e7bf67 Fix Groups for warp signs 2011-07-01 01:32:49 +02:00
snowleo
bf6f83dadc Always cancel interact with sign. 2011-07-01 01:32:13 +02:00
snowleo
e30a4d41ad Don't add items with an amount of 0 or lower to the inventory. 2011-07-01 01:31:20 +02:00
snowleo
9121209799 Fix for a bug in getTrade() of Signs that would return the quantity of items as money. 2011-06-30 23:27:00 +02:00
snowleo
7818753d96 Don't place a block, if interacting with a sign. 2011-06-30 22:57:39 +02:00
snowleo
ae88f3a1f3 Only act on right click, otherwise signs can't be destroyed. 2011-06-30 22:55:00 +02:00
snowleo
22230a0557 Fix: Blocks can't be broken. 2011-06-30 22:50:22 +02:00
snowleo
40dbb4f421 Updated items.csv 2011-06-30 19:17:58 +02:00
snowleo
c13215baf0 Updated items.csv 2011-06-30 19:16:50 +02:00
snowleo
64527138a0 CB #946
B #750
2011-06-30 18:57:36 +02:00
snowleo
902a0c2c56 Renamed functions 2011-06-30 18:54:05 +02:00
snowleo
c75baa2064 CB #946
B #750
2011-06-30 18:43:23 +02:00
KHobbits
e040ec1e8d Query:
- does essentials.back.ondeath work without essentials.back, and vice versa?
- should we swap signs.protection.override? to signs.override.protection?
2011-06-29 02:33:11 -07:00
ementalo
cb09f41969 Updating for huge renames in #939 2011-06-28 23:32:30 +01:00
ementalo
522089a211 sethome for others, missed from commit 2011-06-28 10:13:18 +01:00
ementalo
b6a6b7192f admin can set others homes. needs "essentials.sethome.others" permission 2011-06-28 10:10:29 +01:00
ementalo
1a17c9ea8d move socialspy handler to commandpreprocess 2011-06-28 09:29:40 +01:00
snowleo
0e0b95afc6 Fix /spawner command
The name had to be first letter uppercase, the rest lowercase
2011-06-27 11:57:03 +02:00
snowleo
a30ce5cbd3 Another fix to /spawnmob
Merged for release
2011-06-27 11:53:57 +02:00
snowleo
2dd135fe13 Another fix to /spawnmob 2011-06-27 11:46:57 +02:00
snowleo
8affeb7a72 Fix Mop spawning 2011-06-26 18:15:20 +02:00
snowleo
6800b9a46e Renamed getInteger method name to getIntegerPositive. 2011-06-26 18:14:59 +02:00
snowleo
496f2ea19f Deprecating the old sign code and adding the new code.
Please test everything without EssentialsProtect. The signs should protect themselves.
2011-06-26 16:17:45 +02:00
snowleo
6a6b0b7754 Missing onBlockPlace event for Protection sign 2011-06-26 16:06:19 +02:00
snowleo
34db81cc51 Corrected all commands of PermCommands
onCommand now supports the change of the permissions prefix
2011-06-26 15:47:28 +02:00
snowleo
d668466c59 Protection signs and
new Listeners for the signs
2011-06-26 15:31:13 +02:00
snowleo
7c1d49203f Corrected the output of /gc
It's now max, total and free
2011-06-26 12:16:50 +02:00
snowleo
019fad82e4 Copy&Paste is bad. 2011-06-26 02:00:57 +02:00
snowleo
3f698c7955 Fix for Register inside Essentials 2011-06-26 01:43:59 +02:00
snowleo
1161c4e647 SEVERE error messages for other plugins, that try to manually enable Essentials, FakePermissions or GroupManager 2011-06-26 01:43:19 +02:00
snowleo
05119da8e2 Fix: Player was unable to use any commands, if his money was negative. 2011-06-25 22:23:11 +02:00
snowleo
d7b7329f25 Updated bukkit version number in Essentials class 2011-06-25 16:46:41 +02:00
snowleo
5670bcc713 Cleanup of KHobbits commit 2011-06-25 16:46:02 +02:00
KHobbits
2926ec5ea4 Searchable help.
Toggle commands with no permissions.
2011-06-25 22:39:46 +08:00
snowleo
5fefce5972 Remove the restriction of EssEcoApi to not use iConomy or BOSE 2011-06-25 15:35:47 +02:00
snowleo
93f333d907 Remove the restriction of EssEcoApi to not use iConomy or BOSE 2011-06-25 15:34:33 +02:00
snowleo
ad819ac386 Same in messages.properties 2011-06-25 15:19:45 +02:00
snowleo
6ae0743f59 Merge pull request #3 from khobbits/patch-1
Fixing Typo in messages_en.properties
2011-06-25 06:18:13 -07:00
snowleo
44a448412e Don't connect to example.com, the default value 2011-06-25 15:17:10 +02:00
snowleo
054343875b Merge branch 'bukkitupdate' 2011-06-25 15:00:08 +02:00
snowleo
2619e79479 Merge branch 'bukkitupdate' into release 2011-06-25 14:27:30 +02:00
snowleo
a00c671b99 Craftbukkit #928
Bukkit #743
2011-06-25 14:26:19 +02:00
snowleo
a837c3c0e5 Added info of change to version.
idea by TheRec
2011-06-25 14:23:49 +02:00
snowleo
d2024e8776 Show better warning for iConomy. The loading problem still exists. 2011-06-25 14:19:56 +02:00
snowleo
8123eec1b4 GroupManager fix (The commands didn't work)
This is the last fix for GroupManager, we will switch to Permissions 3 soon.
2011-06-25 14:18:45 +02:00
KHobbits
29233cbe2a Searchable help.
Toggle commands with no permissions.
2011-06-24 15:29:49 +01:00
KHobbits
c3f67cfc8a Fixing Typo 2011-06-24 15:25:08 +01:00
KHobbits
49a2075480 Fixing Typo 2011-06-24 05:13:37 -07:00
snowleo
014c98f617 More permissions that should be restricted to ops 2011-06-23 20:44:18 +02:00
snowleo
d8e129e3f4 Fix /spawner command
The name had to be first letter uppercase, the rest lowercase
2011-06-23 20:14:59 +02:00
snowleo
1aecf7b7b0 Cleanup 2011-06-23 19:34:51 +02:00
snowleo
60b89c6e3c Fix unbreakable blocks 2011-06-23 15:57:52 +02:00
snowleo
8e6cd89017 /antioch now uses bukkit code 2011-06-23 15:02:05 +02:00
snowleo
26ee0ed8fd Cleanup 2011-06-23 14:58:37 +02:00
snowleo
e0d850a574 Better /nuke command, now accepts playernames as argument 2011-06-23 14:58:26 +02:00
snowleo
a968c21333 New command /fireball 2011-06-23 14:14:24 +02:00
snowleo
50ac21466f Updated /spawnmob to use bukkit code
Less code that breaks with future minecraft updates.
2011-06-23 14:10:27 +02:00
snowleo
5dc1a70bcb Merge branch 'bukkitupdate'
Conflicts:
	EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
2011-06-23 13:49:37 +02:00
snowleo
909190ef4f Update to /time command:
Supports player time now.

New permissions:
essentials.time.world (if the user is allowed to change the time of the world)
essentials.time.player (if the user is allowed to change his own time)

Backwards incompatibility!
2011-06-23 13:31:23 +02:00
snowleo
bceaf01595 Added TargetReasons of wolfs 2011-06-23 13:14:26 +02:00
snowleo
8b7246f8f0 Update of classes because of bukkit changes 2011-06-23 12:44:16 +02:00
snowleo
98a60d72e4 Bukkit #740 CB #921 2011-06-23 12:39:48 +02:00
snowleo
9c5a1bd702 Check java version to be at least 1.6 2011-06-23 12:38:21 +02:00
snowleo
419e779951 Merge branch 'master' of https://github.com/essentials/Essentials 2011-06-23 12:23:42 +02:00
snowleo
b0ed17e20f Only get data from valid rows
Fixes #641
2011-06-23 12:22:52 +02:00
jessenic
86a842a331 Adding a command deprecated notice for players 2011-06-22 07:44:01 +08:00
jessenic
6a1cbe203d Deleting my name xD 2011-06-22 07:44:01 +08:00
jessenic
11d3ed621b Fixing typo in EssentialsPermissionsCommands plugin.yml. And adding my name there :P 2011-06-22 07:44:00 +08:00
snowleo
b5df68541d Translation error (german) 2011-06-19 13:09:29 +02:00
snowleo
1e8a3971fc Moved some code from EssentialsSign to SignTrade, because it's only needed there. 2011-06-13 15:15:19 +02:00
snowleo
7406d9404c Trade sign 2011-06-13 15:05:31 +02:00
snowleo
c38191951c Renamed the Charge class to Trade 2011-06-13 15:05:11 +02:00
snowleo
d660b23ce4 Use the new Workaround in buy signs. 2011-06-12 22:58:37 +02:00
snowleo
9bdef55f26 Workaround methods are static 2011-06-12 22:57:43 +02:00
snowleo
4878ef929f Use the correct maxStackSize, when adding things to the inventory. 2011-06-12 22:55:08 +02:00
snowleo
80055bb63f Limit buy signs amount to a full inventory of a player. 2011-06-12 22:40:25 +02:00
snowleo
0c4d4688f0 Sell & Buy Sign 2011-06-12 22:33:47 +02:00
snowleo
e1a624b3e7 To make things consistent:
permissions: essentials.signs.break.signname and essentials.signs.signname.break
2011-06-12 21:58:09 +02:00
snowleo
eba9a3acea Updated french translation by Nelo 2011-06-12 18:41:50 +02:00
snowleo
2abf96aa48 Correct header 2011-06-12 18:31:33 +02:00
snowleo
0bcd0e7b2c Sort all messages, so diffs are easier. 2011-06-12 18:30:24 +02:00
snowleo
2f58115792 Fix for calling command for plugins that are loaded after Essentials. 2011-06-12 17:52:46 +02:00
snowleo
da547981a8 Prevent lava bucket placed in air (far away from user)
event.isCancelled() does not return the expected value
2011-06-12 16:15:50 +02:00
snowleo
627a75657c Another missing part 2011-06-12 14:54:56 +02:00
snowleo
ba6ef52438 The permission is essentials.protect.ownerinfo 2011-06-12 14:32:28 +02:00
snowleo
fd2ed8cc43 Fix for Craftbukkit Bug 912 2011-06-12 02:59:34 +02:00
snowleo
05b2e36e51 Merge branch 'master' of https://github.com/essentials/Essentials 2011-06-12 02:48:50 +02:00
snowleo
501118f784 Fix for Craftbukkit Bug 912 2011-06-12 02:47:50 +02:00
ementalo
00f4586500 Protect: Remove protection when attached block is destroyed 2011-06-11 16:05:14 +01:00
snowleo
2e6062fcb8 Merge branch 'master' of https://github.com/essentials/Essentials 2011-06-11 13:03:10 +02:00
snowleo
57c913c916 Merge branch 'release'
Conflicts:
	.gitignore
	lib/bukkit-0.0.1-SNAPSHOT.jar
2011-06-11 13:02:34 +02:00
snowleo
34e4584911 Update version number of Bukkit 2011-06-11 12:42:00 +02:00
snowleo
4b06d53535 Update for the changes in Bukkit 2011-06-11 12:36:17 +02:00
snowleo
76ed9277de CB #860 B#716 2011-06-11 12:27:42 +02:00
snowleo
69f4bbc333 Ignore all build files 2011-06-11 12:25:55 +02:00
snowleo
a053e89e1f gitignore for .DS_Store files 2011-06-11 12:25:33 +02:00
ementalo
3f736d9713 Protect: Get block owners on right click block only 2011-06-11 08:37:05 +01:00
snowleo
7caef4feba Merge pull request #2 from khobbits/master
gm aliases
2011-06-08 17:28:01 -07:00
KHobbits
aa1e0cdc59 Adding group permission alias 2011-06-08 17:41:48 +01:00
KHobbits
776cf202a6 Adding user permission alias 2011-06-08 17:36:43 +01:00
KHobbits
74da9b5ee9 Adding manload 2011-06-08 17:32:37 +01:00
KHobbits
b3afc15d5f Adding some GM aliases 2011-06-08 17:20:51 +01:00
snowleo
685e9ce76f Catch NumberFormatException 2011-06-08 03:44:16 +02:00
snowleo
c6f75a2242 Cleanup 2011-06-08 03:40:00 +02:00
snowleo
4461153f73 The sign permissions will be:
essentials.signs.create.*
essentials.signs.use.*
essentials.signs.break.*
2011-06-08 03:30:32 +02:00
snowleo
1b984f60a5 Refactoring of the signs
Todo: Eco signs, Protection signs

New permission: essentials.signs.[signname].break
2011-06-08 03:18:33 +02:00
snowleo
ce8d75df94 Added developer readme and settings. 2011-06-07 23:01:28 +02:00
snowleo
40a919c9aa Fix save inventory after logout for new players. 2011-06-07 22:18:57 +02:00
snowleo
ca6957bec1 Remove unused imports 2011-06-07 22:17:55 +02:00
snowleo
396ee62393 Fix dependency
Loading from lib won't work, so back to the old method.
2011-06-07 21:55:31 +02:00
snowleo
2ab7214afc The rest of Wundarks commit, cleaned 2011-06-07 01:55:39 +02:00
Wundark
53d4f8cd91 Added [Time] Sign 2011-06-07 07:46:42 +08:00
Wundark
6adcce7d9b Changed MOTD 2011-06-07 07:33:13 +08:00
snowleo
b9fb85751c Merge branch 'permissions3' 2011-06-07 01:23:37 +02:00
snowleo
0a57b22ea6 ignore build directories 2011-06-07 01:23:07 +02:00
snowleo
85e9ba171c Fix the tests. 2011-06-07 01:11:00 +02:00
snowleo
95e7c8009f Only import what we really need. 2011-06-07 01:08:31 +02:00
snowleo
8581c28acf Bukkit #704 2011-06-07 01:07:16 +02:00
snowleo
fb6f13cc88 Cleanup
/manuadd command
2011-06-07 00:54:36 +02:00
snowleo
cc22792d79 Permissions 3.1.4
Added Code for Perm2, Perm3 and Config Permissions
Cleaned EssentialsChat
2011-06-07 00:24:39 +02:00
snowleo
275c865de3 Major cleanup of the Protect code 2011-06-06 22:29:08 +02:00
snowleo
3586bffc3a Ignore all build files 2011-06-06 14:16:56 +02:00
snowleo
3172152a09 gitignore for .DS_Store files 2011-06-06 12:08:54 +00:00
snowleo
1cd99baaee cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1593 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-06 12:06:41 +00:00
snowleo
e70551e344 cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1592 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-06 12:04:37 +00:00
snowleo
fcfef828a1 cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1591 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-06 12:02:33 +00:00
snowleo
710b024428 Cleaned InventoryWorkaround
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1590 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-06 12:01:56 +00:00
snowleo
df9c58d508 Rewrote TargetBlock
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1589 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-06 12:01:23 +00:00
snowleo
e383808fda Pull-Request #1 by mrapple
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1588 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-05 23:56:52 +00:00
ementalo
3aa78a78df [trunk] Protect, add missing listener
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1587 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-05 21:36:47 +00:00
ementalo
3c05ce0d63 [trunk] Protect, more merges
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1586 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-05 19:09:29 +00:00
snowleo
c6ab274f2e NPE fix for offline users in UserData
That one was correct, otherwise the inventory will be deleted by offline changes.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1585 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-05 00:03:44 +00:00
snowleo
952ca66f8d NPE fix for offline users in UserData
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1584 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-05 00:01:15 +00:00
snowleo
bfd502b812 NPE fix for offline users in UserData
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1583 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-05 00:00:41 +00:00
ementalo
8bad78402a [trunk] Protect, move some bits about
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1582 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-03 21:03:08 +00:00
ementalo
9734dd4d27 [trunk] Protect, merging changes in
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1581 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-03 20:56:29 +00:00
snowleo
02280e4d07 Fix Spawner
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1580 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-03 20:11:20 +00:00
ementalo
91c80d45e6 [trunk] Adding dependancy checker, need to fix timings as Protect tries to use it before the file system finishes
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1579 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-03 14:23:55 +00:00
ementalo
36ee673798 [trunk] Fix the build, bundling the c3p0 jar inside protect for the moment
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1578 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-03 07:57:35 +00:00
snowleo
d5d8aac5ea Fixes for XMPP: Prevent loops on errors
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1577 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-03 03:57:41 +00:00
snowleo
1f2a611047 Fixes for XMPP: display minecraft username for players that have set their address using /setxmpp, others will have the jabber address next to the message
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1576 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-03 02:22:32 +00:00
snowleo
965b533eca Fixes for XMPP: display message on /setxmpp, ignore resource on xmpp addresses, reconnect on reload
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1575 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-03 01:50:40 +00:00
ementalo
d0b1d02a15 [trunk] Protect refactors (formally known as 3.0) needs ***EXTENSIVE*** testing
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1574 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 23:09:59 +00:00
ementalo
90963f75e2 [trunk] fix class not found
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1573 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 22:01:57 +00:00
snowleo
d89f126e0b Code cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1572 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 14:23:50 +00:00
snowleo
b00ad8f57f timePattern for dutch translation
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1571 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 14:04:24 +00:00
snowleo
0f83fb9dce More cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1570 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 13:59:02 +00:00
snowleo
4d3e7147aa Code cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1569 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 13:49:58 +00:00
snowleo
1e064fe3b0 Stupid Netbeans is stupid.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1568 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 13:31:52 +00:00
snowleo
492cd66e27 Missing file for EssentialsXMPP
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1566 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 13:25:57 +00:00
snowleo
50a287af39 Smack 3.2.0
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1565 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 13:24:51 +00:00
snowleo
a235f350cc Added EssentialsXMPP from newplugins branch.
Updated to work with trunk.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1564 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 13:24:26 +00:00
snowleo
395f65dc4a Cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1563 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 13:22:24 +00:00
snowleo
adbf9c4853 items.csv by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1562 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 11:50:17 +00:00
snowleo
a1ec0cbd7b May death rain upon them
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1561 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 11:43:25 +00:00
ementalo
5b884aecdc Dutch translations by Geertje123
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1560 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-02 11:26:58 +00:00
ementalo
3d4524186b [trunk] remove softdepend, is busted in bukkit
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1559 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 16:22:14 +00:00
ementalo
fdf1f51413 [trunk] softdepend, hopefully works and sorts concurrent errors
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1558 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 15:49:27 +00:00
ementalo
56512613fb [trunk] revert
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1557 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 15:29:21 +00:00
ementalo
4d753d4b1e [trunk] quickfix for concurrent issues
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1556 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 15:10:59 +00:00
snowleo
641ec230d6 Missed some parts for the last commits
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1555 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 11:26:12 +00:00
snowleo
4d6cb03708 Several bug fixes and cleanup.
Found using PMD and FindBugs.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1554 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 10:52:41 +00:00
snowleo
8acb65a5f8 Several bug fixes and cleanup.
Found using PMD and FindBugs.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1553 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 10:40:12 +00:00
ementalo
9e919b199e [trunk] RB #818, re-enable nether, nether needs testing
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1552 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 09:20:03 +00:00
snowleo
1dae594baf Removed iConomyBridges. Promote the use of Register instead.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1551 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-06-01 08:12:51 +00:00
snowleo
e061780dde French translation
updated danish timePattern string

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1550 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-31 20:52:07 +00:00
snowleo
c690542d6c Fix: 1 day displayed additionally on 31th of month
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1549 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-31 20:36:43 +00:00
snowleo
df8d393845 CB#817
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1548 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-31 18:08:04 +00:00
snowleo
bb7c963d71 CB#816
Multiworld-Nether disabled 

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1547 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-31 07:45:19 +00:00
ementalo
d54d95b4e1 [trunk]Danish Translation by papand13
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1546 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-29 14:11:48 +00:00
snowleo
694345e8d0 First code for the update and error report stuff. Disabled until finished.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1545 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-28 03:29:11 +00:00
snowleo
9877a40dee Updated items.csv by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1544 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-28 00:13:11 +00:00
snowleo
542f4046b9 CB#815
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1543 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-28 00:10:43 +00:00
snowleo
5e208e462e Added missing spawner command to plugin.yml
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1542 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-28 00:08:23 +00:00
ementalo
80d81b4951 [trunk] fix /spawn issue.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1541 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-27 21:34:30 +00:00
ementalo
9b1e8e9841 [trunk] Initial fix to allow plugins to override essentials commands, looking into better way
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1540 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-26 20:11:11 +00:00
ementalo
042780d5e5 [trunk] Register 1.7
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1539 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-26 18:57:41 +00:00
snowleo
e776db66fe CB#812
Fix for change in the minecraft class structure.
Do not use this yet!

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1538 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-26 14:50:13 +00:00
snowleo
ca198fbe74 Updated items.csv for 1.6 by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1537 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-26 14:34:31 +00:00
snowleo
e58375e055 Fix kickall command
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1535 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-26 00:25:12 +00:00
ementalo
4e52af963a new items.csv by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1534 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-24 12:40:14 +00:00
snowleo
54471ec187 Show file name, if there is an exception in the user upgrade code.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1533 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-23 10:59:26 +00:00
snowleo
d5312b08d5 Removed duplicated message.
Command costs are double values now

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1532 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-23 09:55:23 +00:00
snowleo
626eeb6fb6 Don't charge if the cost is 0.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1531 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-23 09:42:33 +00:00
snowleo
c47c6d6a68 Copy&Paste bug in trade signs
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1530 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-23 09:23:03 +00:00
snowleo
52e8b7ea65 CB#803
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1529 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 22:15:30 +00:00
snowleo
a9112b5316 Fix array out of bounds exception handling on warp and trade signs.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1528 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 22:08:40 +00:00
snowleo
8d21a2a833 Warp sign: Shorter error, so it won't get cut off.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1527 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 21:51:55 +00:00
snowleo
9bb81d4f51 Add stuff directly to inventory to prevent theft by standing next to the sign, while someone breaks it.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1526 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 21:43:47 +00:00
snowleo
bcbfee3dde Workaround for bukkit bug again.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1525 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 21:29:04 +00:00
snowleo
702bf14df7 Revoke last commit. It's not broken.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1524 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 21:01:23 +00:00
snowleo
da7c2ee256 Bukkit broke the command override.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1523 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 20:54:25 +00:00
snowleo
09dcd5cd24 Comment about Register plugin inside Essentials Eco api
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1522 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 20:30:19 +00:00
snowleo
07a4fa9836 More debug messages, if debug: true is set.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1521 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 20:27:09 +00:00
snowleo
38ba163a36 cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1520 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 20:06:17 +00:00
snowleo
629586dc0b cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1519 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 20:05:47 +00:00
snowleo
0fd0409847 cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1518 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 19:55:20 +00:00
snowleo
9324cfd64a Ignore teleport delay on portals,
fix cooldown not working if delay is disabled,
fix cooldown for teleport.now()

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1517 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 19:41:22 +00:00
snowleo
e328b37a97 Don't hurt god players with lightning.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1516 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 19:23:03 +00:00
snowleo
52ea77de9d Catch exceptions while loading warps.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1515 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 19:19:42 +00:00
snowleo
dd738117c3 Typo in english translation
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1514 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 19:15:35 +00:00
snowleo
8fb573d89e Sign lines with color only support 13 characters. Fixes the trade signs for users with names longer than 13 characters.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1513 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 19:13:59 +00:00
snowleo
805394ff5c Refactoring: New Charge class
user.canAfford(String), user.canAfford(EssentialsCommand), user.charge(String), user.charge(EssentialsCommand) have been removed.
Teleport class has been changed to use the Charge class.
This also fixes some bugs, like the one with warp signs.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1512 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 18:53:23 +00:00
snowleo
fda91f3afc Cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1511 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 18:20:32 +00:00
snowleo
15b8cd41e3 Cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1510 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 17:32:24 +00:00
snowleo
585d719bdc Fix that dropItem drops Stack that are over MaxStackSize.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1509 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 17:29:59 +00:00
snowleo
ae6b537296 Changed default message format to
msgFormat = §7[{0}§7 -> {1}§7] §f{2}

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1508 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 17:02:53 +00:00
ementalo
b81f6913b2 commit the jar
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1507 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-21 19:19:59 +00:00
ementalo
9839ced07d [trunk] Recommended build #798
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1506 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-21 15:40:06 +00:00
snowleo
d9cb5da09a Removed plugin command from Essentials. It's useless at the moment.
If you want to reload the config files use /essentials.
If you update jar files, restart the server.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1505 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-19 19:32:55 +00:00
snowleo
dd1def6867 Only update config, if there are worth values.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1504 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-16 21:43:43 +00:00
ementalo
4ecce3fb04 [trunk] Register 1.5
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1503 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-16 20:48:19 +00:00
ementalo
e2abf4a87e [trunk] debug a error when processing help permissions nodes
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1502 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-16 19:59:23 +00:00
snowleo
d72690a04a More testing
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1501 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-16 09:46:10 +00:00
snowleo
6f0a139ab6 Fix _setMoney failing on upgrade.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1500 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-16 08:55:20 +00:00
snowleo
6c2b47c206 Various translation bugfixes
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1499 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-16 08:40:28 +00:00
snowleo
5e0f048273 Fix /home player for offline players
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1498 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 21:33:50 +00:00
snowleo
a940e29ad5 Fix /home player for offline players
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1497 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 21:27:54 +00:00
snowleo
3ba637d980 Reverting to old behavior for nether creation. If you use other multiworld plugins, make sure you setup the nether correctly there too.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1496 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 18:31:36 +00:00
snowleo
4a9d3940ef Missing stuff for /ignore
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1495 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 18:28:19 +00:00
snowleo
3d8ac7c4a0 ß => ss
Minecraft can't display ß

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1494 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 18:08:15 +00:00
snowleo
30ee6ef856 German translation finished.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1493 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 18:03:35 +00:00
snowleo
a36dbf55a0 Small fix so that the player gets a reply, even if he is ignored
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1492 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 16:54:25 +00:00
snowleo
894f50f0d0 Catch class cast exceptions in EssentialsConf
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1491 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 16:26:34 +00:00
snowleo
9a043f5567 Add the tag Essentials to the payment messages.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1490 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 15:56:43 +00:00
snowleo
d793be8ef0 More fixes for the trade signs
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1489 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 15:49:53 +00:00
snowleo
5c7a293c81 Register v1.2
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1488 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 15:23:31 +00:00
snowleo
ce7b3a622d Fix for muted translation
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1487 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 14:56:06 +00:00
snowleo
4de57f9334 Partly translated to german
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1486 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 14:39:36 +00:00
snowleo
dfccde9792 Removed unused translation usage
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1485 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 14:04:22 +00:00
snowleo
de43d196d0 Fix noPlayerFound => playerNotFound
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1484 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 14:02:22 +00:00
snowleo
d0e5ea95ce Fix /r if noone talked to you before.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1483 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 13:39:33 +00:00
snowleo
8bd67f5b7d Fix Mail display in case not enough arguments are supplied
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1482 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 13:34:11 +00:00
snowleo
e546c6bc0b Always close files.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1481 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 13:19:04 +00:00
snowleo
b571bc9724 More translation stuff.
Check if the version of a translation file is up to date with essentials version.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1480 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 13:18:38 +00:00
snowleo
1418708fa4 Added permissions to bypass EssentialsProtect damage protection.
Change for admin!
Since we don't want to murder all admins, I added another permission:
essentials.protect.damage.disable
Since all admins get this by using '*', all those damage permissions are disabled
Don't use - -essentials.protect.damage.* as I stated in the last commit.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1479 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 12:33:17 +00:00
snowleo
21a62e515f Missing part for the /ignore command
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1478 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 12:27:23 +00:00
snowleo
2a5d313530 More translation stuff.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1477 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 12:23:47 +00:00
snowleo
f2f6c3fdaa Added permissions to bypass EssentialsProtect damage protection.
As admin you want to disable this with
- -essentials.protect.damage.*

New permissions:
essentials.protect.damage.contact
essentials.protect.damage.lava
essentials.protect.damage.tnt
essentials.protect.damage.creeper
essentials.protect.damage.projectiles
essentials.protect.damage.fall
essentials.protect.damage.suffocation
essentials.protect.damage.fire
essentials.protect.damage.drowning
essentials.protect.damage.lightning

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1476 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 12:10:24 +00:00
snowleo
36520c5e27 Always create nether if it's enabled in config.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1475 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 11:42:15 +00:00
snowleo
bdc72d1ae5 New feature allows a user to ignore other players
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1474 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 11:40:46 +00:00
snowleo
e78ed3ad5d /home: Allows to go to offline players home.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1473 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 02:39:59 +00:00
snowleo
b691348223 Fix money and amount display of all signs
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1472 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 02:07:20 +00:00
snowleo
22def57fa6 Finally all commands translated.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1471 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-15 01:30:54 +00:00
snowleo
462455ac6b More translation stuff
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1470 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 23:32:28 +00:00
snowleo
f05292dd2d More translation stuff
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1469 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 23:30:56 +00:00
snowleo
2784d3fbb6 Cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1468 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 23:07:55 +00:00
snowleo
763fd611c0 Fix problem with offline users. Store all usernames in lower case.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1467 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 23:07:29 +00:00
snowleo
cfe528187a Fix translation error in god
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1466 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 17:29:31 +00:00
snowleo
880ec1b3d9 Fix translation error in gc
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1465 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 17:27:49 +00:00
snowleo
20455ab3c0 Socialspy: catch /r messages
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1464 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 11:29:21 +00:00
snowleo
4a75929811 We now ignore the case, when we read the kits from config.yml.
Beware, that permissions always have to be lowercase.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1463 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 11:20:05 +00:00
snowleo
38ec110761 Ignore exceptions on bulk /sell
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1462 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 10:57:55 +00:00
snowleo
9b8461a03d Fix that isNew and isNPC are not read from user file.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1461 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 10:54:18 +00:00
snowleo
e9b0745587 Using default group for users with unknown group.
Ignore double users.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1460 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 10:42:18 +00:00
snowleo
f5fa331c2c Update to Register v1.0
Removed softDepend because of a bukkit bug.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1459 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 10:14:58 +00:00
snowleo
91812224cc Remove old files
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1458 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 02:31:52 +00:00
snowleo
d469602a25 Register v0.6
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1457 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 02:16:47 +00:00
snowleo
74fcf51712 Register v0.6
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1456 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 02:16:05 +00:00
snowleo
8ffb8bdfc8 Don't load worlds on startup for Upgrade process, use FakeWorld instead.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1455 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-14 02:02:15 +00:00
snowleo
f86ebef670 Move Register stuff inside Essentials
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1454 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 23:39:18 +00:00
snowleo
79facdf889 Add Register as dependency for all projects.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1453 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 23:14:03 +00:00
snowleo
1bd3424454 Moving all libs to one directory.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1452 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 23:09:21 +00:00
snowleo
f4f88eebaa Remove Essentials from Register to prevent recursion.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1451 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 22:58:25 +00:00
snowleo
54e4c44061 Translation files have to be the same.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1450 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 22:52:50 +00:00
snowleo
b649d6fa8b Basic lib folder
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1449 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 22:44:13 +00:00
snowleo
9e0df029b7 Fix path to lib folder
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1448 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 22:42:33 +00:00
snowleo
2dce7743ba Fix path to lib folder
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1447 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 22:41:02 +00:00
snowleo
344f1c251d Fix path to Register.jar
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1446 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 22:22:17 +00:00
snowleo
e2f4fbc5de Remove wrong Register.jar from lib
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1445 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 22:19:00 +00:00
snowleo
b2e5cf4c6b Register included inside Essentials with different packagename to prevent recursion.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1444 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 22:13:10 +00:00
snowleo
7b315d63a1 Register included inside Essentials with different packagename to prevent recursion
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1443 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 22:08:44 +00:00
ementalo
083003f38a [trunk] make user matching a bit less random
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1442 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 21:10:49 +00:00
snowleo
a91cb068fc Essentials has now a function setRegisterFallback() instead of setiConomyFallback()
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1441 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 20:54:42 +00:00
snowleo
882eeab0f6 case-sensitive filesystems :D
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1440 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 20:45:22 +00:00
snowleo
ba32cada1b Catch the case, if the user does not have a account with Register
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1439 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 20:41:49 +00:00
snowleo
cd08072d7d Added Support for Register.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1438 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 20:36:41 +00:00
snowleo
6bbb102b5a Added License info. Essentials is GPLv3
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1437 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 19:58:30 +00:00
snowleo
ec4253174a Unit Tests for Economy API
Finally fixed the Currency format

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1436 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 19:18:22 +00:00
snowleo
771136efbf Op users now have access to all GroupManager commands.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1435 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 17:36:41 +00:00
snowleo
fc084bf2d3 The default group does not have build rights.
Op users always have build rights.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1434 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 17:29:20 +00:00
snowleo
eb58dee17c The default values for fire spread in config.yml have been changed to true.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1433 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 17:15:45 +00:00
snowleo
c3b2664cd5 Fix Tests
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1432 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 17:04:14 +00:00
snowleo
b88b8c2045 Rewritten Economy API. Please update your plugins.
This Economy API is now supported by Essentials.
Do not use NPC Accounts as bank accounts. Bank accounts are not supported yet.
New config: currency-symbol

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1431 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 16:57:45 +00:00
snowleo
627a50b507 Make sure, we will never give a null as respawn location.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1430 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 14:31:07 +00:00
snowleo
9104562846 Prevent userdata creation, when the player is already rejected by another plugin.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1429 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 13:55:44 +00:00
KimKandor
ae1dee628f Updated command override section concerning worldguard /KK
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1428 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 13:16:47 +00:00
snowleo
74a5023422 Fix player kick if home is not set on respawn.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1427 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 09:18:25 +00:00
snowleo
d82cd07bce Update motd on reload.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1426 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-13 09:15:24 +00:00
snowleo
cffb493415 Reverting to old way of displaying currency.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1425 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-11 23:12:52 +00:00
ementalo
6e5a56fb50 [trunk] translations = T's
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1424 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-11 22:42:48 +00:00
snowleo
30a5198abb Finally get rid of all dependency problems.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1423 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-11 22:30:34 +00:00
ementalo
6f79a84587 [trunk] translations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1422 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-11 21:53:01 +00:00
snowleo
c11cd990d3 Another typo in translation
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1421 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-11 21:33:14 +00:00
ementalo
3f45eb6d9b [trunk] temp double fix, we should probably change doubles to decimals in prices
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1420 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-11 15:11:07 +00:00
snowleo
81dfdb102a IConfExternal is abstract class for other jars, because the interface is not accessible.
Forgot to remove the import.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1419 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 22:02:42 +00:00
snowleo
dbefd52bbd Creating info.txt, if it does not exist.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1418 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 21:58:08 +00:00
snowleo
6d03a81a04 IConfExternal is abstract class for other jars, because the interface is not accessible.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1417 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 21:53:27 +00:00
ementalo
771f0aad0c [trunk] translations - halfway there
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1416 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 21:52:07 +00:00
snowleo
d083325402 Permission essentials.balance.other is now essentials.balance.others
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1415 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 21:36:50 +00:00
snowleo
4d1a4adee1 Fix EssentialsProtect not loading correctly, because Essentials is not loaded first.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1414 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 21:34:01 +00:00
snowleo
dab4c60175 Permission essentials.balance.other is now essentials.balance.others
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1413 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 21:30:31 +00:00
snowleo
334399d035 Add support for info_username.txt and info_groupname.txt.
Fix color in chapter names. Use &[0-9a-f] as color codes.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1412 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 21:26:38 +00:00
snowleo
e9f21506ad Reload Users and Protect on /essentials reload.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1411 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 21:14:38 +00:00
snowleo
402b26531d Don't change color of op if setting is set to none.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1410 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 20:40:32 +00:00
snowleo
a28e08e3eb Fix translation
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1409 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 20:05:52 +00:00
snowleo
bc79d5acfc More translation stuff. Translated Spawn, Chat, Protect, GeoIP
Protect is only partly translated (sql stuff is not translated)
EssentialsSpawn is changed to use the onCommand from Essentials jar, since that is more up to date.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1408 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 19:57:59 +00:00
snowleo
0671150c42 More translation stuff. Essentials namespace is now translated.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1407 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 19:02:59 +00:00
snowleo
2d9919f5e0 PlayerWrapper: new base functions of cb#766
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1406 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 18:21:09 +00:00
ementalo
6eb1cec1b7 [trunk] add the rb jar XD
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1405 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 18:18:10 +00:00
ementalo
c1653669b1 [trunk] fix give args
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1404 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 13:50:15 +00:00
ementalo
78af2f65c9 [trunk] RB #766
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1403 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-10 12:23:18 +00:00
snowleo
d3328c6c2b Update Inventory after /item and /give. Hopefully fixes too many items bug.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1402 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 23:46:05 +00:00
snowleo
1f59dc28ce Fixing minor typo that breaks the tests.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1401 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 21:52:47 +00:00
snowleo
c6ef90875e More translation stuff
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1400 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 21:45:35 +00:00
ementalo
32369f973b [trunk] translations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1399 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 21:37:02 +00:00
ementalo
335e2fabc3 [trunk] translations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1398 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 21:12:49 +00:00
snowleo
1427599007 More translation stuff
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1397 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 21:07:00 +00:00
snowleo
bb7ddea328 sugarcane fix by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1396 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 20:47:57 +00:00
snowleo
2443fce432 More translation stuff
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1395 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 20:46:25 +00:00
snowleo
ad504147a0 Time diff: Parse numbers as seconds
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1394 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 19:51:53 +00:00
ementalo
aedb0ecfce [trunk] import cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1393 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 14:21:20 +00:00
snowleo
cd199302c2 Log items that are sold using /sell
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1392 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 09:31:36 +00:00
snowleo
14adadeaa6 Short sapling names by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1391 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 09:19:25 +00:00
snowleo
e24b321eba Minor fix on give and item
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1390 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 09:00:29 +00:00
snowleo
27311f669b cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1389 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 03:11:59 +00:00
snowleo
0b2e31522d cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1388 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 02:48:30 +00:00
snowleo
34ff56329c [trunk] Translation of Essentials to other languages. This is just a start, many strings needs to be added.
Console doesn't show umlauts, but in game chat does.
New config property: locale

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1387 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 02:47:19 +00:00
snowleo
e5c5d7ed11 [trunk] Translation of Essentials to other languages. This is just a start, many strings needs to be added.
Console doesn't show umlauts, but in game chat does.
New config property: locale

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1386 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 02:42:20 +00:00
snowleo
a02f0da2b3 [trunk] ItemDb.get(): Added support for other seperation characters : + ' , ; .
added support for itemname:data, e.g. wool:7

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1385 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 00:48:21 +00:00
snowleo
8016fa480d [trunk] Updated /item and /give to support the new ItemDb.get()
Heal sign supports data items too.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1384 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 00:37:05 +00:00
snowleo
035e8ba225 [trunk] Rewritten ItemDb.get(), removed the getUnsafe function.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1383 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 00:22:45 +00:00
snowleo
aa124109c2 [trunk] Add compatibility with backpack plugin.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1382 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 00:12:58 +00:00
snowleo
d474962558 [trunk] Fix formatCurrency and roundDouble (it breaks on non-us locales)
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1381 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 23:57:44 +00:00
snowleo
1b8fef0bf1 [trunk] Don't show /back message on death if command is disabled
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1380 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 23:38:40 +00:00
snowleo
fae5c8624c [trunk] Fix chargeFor on teleports
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1379 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 23:28:23 +00:00
snowleo
f51cbf2d34 [trunk] New config property: nether.ratio, defaults to 16.
Please update use1to1ratio to ratio: 1.0

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1378 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 22:57:38 +00:00
snowleo
8714949169 [trunk] warp sign: Only charge the user, if he is authorized to use the sign.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1377 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 22:45:10 +00:00
snowleo
531acfd5bb [trunk] Help: first test for help_username.txt, then help_groupname.txt and then help.txt, to allow help files for seperate groups and users.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1376 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 22:37:38 +00:00
snowleo
2d5a5218b4 Updated authors.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1375 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 22:25:27 +00:00
snowleo
5d31c3cfa3 iConomy 5.0 support
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1374 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 22:23:04 +00:00
xeology
816e840ba8 API Changes.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1373 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 19:53:05 +00:00
xeology
9c218d86b7 API Changes.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1372 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 19:40:24 +00:00
xeology
c78184e0f6 Bug fixes on API.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1371 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 19:25:44 +00:00
xeology
97df4ae43d Attempted fix on API overwriting values.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1370 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 19:09:04 +00:00
ementalo
35786859b1 [trunk] cleanup debug messaging
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1369 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 13:03:03 +00:00
xeology
cb621ee873 Fixed bad Main class. -iConomy Bridge4
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1368 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 03:37:46 +00:00
ementalo
e87a506af9 [trunk] if ops name is empty handling
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1367 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-08 00:06:28 +00:00
ementalo
7cb6e969af [trunk] socialspy fix
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1366 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-07 23:58:14 +00:00
ementalo
9efa54fbc3 [trunk] I have gone insane. [trade] sign fixes
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1365 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-07 23:06:03 +00:00
ementalo
d53be400cf [trunk] metadata support in itemsdb.java, allows worth commands with metadata
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1364 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-07 13:03:45 +00:00
ementalo
45a1ffdb64 [trunk] fix /sell inventory / blocks chat spam
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1363 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-07 12:11:56 +00:00
ementalo
0aade09809 [trunk] remove debug code
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1362 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-07 11:17:14 +00:00
ementalo
aec008418c [trunk] more trade sign fixes, upon breaking
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1361 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-07 11:13:26 +00:00
ementalo
609a2e6171 [trunk]missed a rouge $
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1360 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-07 10:58:51 +00:00
ementalo
f4d0f5b672 [trunk]various trade sign fixes
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1359 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-07 10:58:00 +00:00
ementalo
82a1e7460a [trunk] possible tpa fix, can't test
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1358 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-06 23:58:06 +00:00
ementalo
9ec06d2787 [trunk] heal others fixed
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1357 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-06 23:37:18 +00:00
ementalo
e3ce8518f1 [trunk] cleanup double $
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1356 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-06 21:08:58 +00:00
ementalo
774fe7a2e8 [trunk] fix doubles in signs and output display
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1355 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-06 20:55:12 +00:00
ementalo
dbf85f2bcf [trunk] fix none ops colour option
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1354 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-06 20:19:44 +00:00
ementalo
0fb3d15d8a [trunk] fix formatting of sell
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1353 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-06 19:50:14 +00:00
xeology
585c61bc77 Compatability fix with API.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1352 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-06 01:36:26 +00:00
ementalo
19ba12da77 [trunk] standardising the currency settings
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1351 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-05 22:13:05 +00:00
xeology
773eebdaf3 Removed indentations.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1350 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-05 19:39:44 +00:00
xeology
d4437163bd currnceyName > currencyName in config.yml . . . I need to lrn2spell
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1349 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-05 19:22:39 +00:00
ementalo
b7064d572a [trunk] cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1348 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-05 10:10:31 +00:00
xeology
f4cd897ff8 Fixed offline player data changes rollingback on relogin. Need to reproccess OfflinePlayer as a user, not declare it as a user. Tested and works perfectly.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1347 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-05 04:32:32 +00:00
ementalo
def1f0948a [trunk] EssentialsProtect :- fix owner spam on arm swing, will only show on right-click now
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1346 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-05 00:05:22 +00:00
ementalo
5d80a0e1c7 [trunk] /sell inventory, /sell blocks fixes
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1345 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 23:33:32 +00:00
ementalo
04c1e42d10 [trunk warps should charge only once, and not when an exception happens
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1344 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 23:19:17 +00:00
ementalo
bb0c199d8e [trunk] Untested - /sell inventory sells all your inventory minus armour stuff, /sell blocks sells blocks only
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1343 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 16:22:38 +00:00
ementalo
24b0f3208e [trunk] adding support to warp other players to warps, this requires the essentials.warp.otherplayers permission
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1342 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 15:53:32 +00:00
ementalo
cb24f6a2d3 [trunk/ Groupmanager] change the groups.yml so the default config will let default build.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1341 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 15:00:42 +00:00
ementalo
337e3e8277 [trunk] formatting monies and signs. signs still need some work to incorporate doubles
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1340 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 14:23:22 +00:00
ementalo
88ee42d089 [trunk] {MAILS} in motd will show how many mails
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1339 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 11:23:45 +00:00
ementalo
2f3048f171 [trunk] new socialspy command. if toggled will show the output of /msg and /mail in the chat for the toggle persons. usage /socialspy to turn on, /socialspy again to turn off
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1338 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 10:39:56 +00:00
ementalo
7137ffc5a9 [trunk] rules from console
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1337 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 10:06:47 +00:00
ementalo
8763ac1261 [trunk] lightning <playername> from the console
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1336 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 10:01:31 +00:00
xeology
11b0d48cd0 Reverse Compatibility is impossible as of now until a method to dynamically change code (or how it works) in external plugins is found. Removed Redundant and useless packages.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1335 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-04 02:34:44 +00:00
ementalo
89f0bfb5c5 [trunk] warps should once again charge if setup in command costs
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1334 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-03 23:39:10 +00:00
ementalo
cb55472fe6 [trunk/protect] Adding warning for changes coming soon to protect in regards to worldguard
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1332 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-03 21:37:36 +00:00
xeology
71b7c1d524 Cleaned up my format . . .
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1328 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-03 05:22:03 +00:00
xeology
fe49c10c05 Working with ico 5.0 plugins. Not sure about banks . . no plugins to test it with . . . yet! Reverse compatability broken, ico decided to switch packages.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1327 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-03 04:29:37 +00:00
xeology
3a90e39be0 Fixed currency/plural.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1326 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-03 04:05:28 +00:00
ementalo
4f19593af3 [trunk]fix nullpointer on mails after you clear them and try to send mails
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1325 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 23:10:24 +00:00
xeology
5b4ecb6cc1 EXPIRIMENTAL Essentials Iconomy Bridge for iConomy 5.0. This has reverse compatability and is tested but unsure of 5.0 API, needs testing but no 5.0 API plugins yet!
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1324 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 22:54:38 +00:00
ementalo
6e6b2df308 [trunk]fix nullpointer on mails after you clear them
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1323 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 22:51:57 +00:00
ementalo
9b5b0cdcd7 [trunk] word spacing on mute / tempban
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1322 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 22:30:48 +00:00
snowleo
86478459ba Cleanup of the iConomyBridge Code
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1321 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 18:22:17 +00:00
snowleo
061af61dda [trunk] Delete temp files, if they are not needed.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1320 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 16:59:25 +00:00
snowleo
23e1bc811a [trunk] Stop the server instead of reloading, since reloading does not unload worlds.
This for compatibility to other multiworld plugins, since we load all unloaded worlds as normal worlds.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1319 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 16:57:19 +00:00
xeology
f1ed1510b4 Fixed last minute screw up.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1318 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 10:09:43 +00:00
xeology
150f1b03ff Fixes dependencies for icoBridge
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1317 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 10:09:07 +00:00
xeology
98fef1131b FayConomy is now EssentialsiConomyBridge, done and ported, fully functional. Relies on EcoAPI!
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1316 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 09:56:40 +00:00
xeology
966ef1ce32 Fixed API ALOT, added bypass on iconomy calls for ico-bridge.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1315 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 09:55:22 +00:00
xeology
d485a1cc20 git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1314 e251c2fe-e539-e718-e476-b85c1f46cddb 2011-05-02 05:28:30 +00:00
xeology
4e557b0350 EssentialsiConomyBridge.jar replaces the iConomy.jar dependency. Project updated.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1313 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 05:26:36 +00:00
xeology
8a7caf49a2 EssentialsiConomyBridge.jar replaces the iConomy.jar dependency.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1312 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 05:22:42 +00:00
xeology
63e0c12551 Integrated EcoAPI at EcoAPI.java
Fixed worth's ugly decimal display, does math with decimals now also!

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1311 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 03:56:51 +00:00
snowleo
200284faf5 [trunk] Check for null in /sell
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1310 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 02:15:19 +00:00
snowleo
5918f6b879 [trunk] /item /give, new permissions
- essentials.itemspawn.item-all
  - essentials.itemspawn.item-[itemname]
  - essentials.itemspawn.item-[itemid]
  - essentials.give.item-all
  - essentials.give.item-[itemname]
  - essentials.give.item-[itemid]
these have to be activated  with permission-based-item-spawn: true in config.yml

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1309 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 01:49:38 +00:00
xeology
d8d4c1df6d Fixed ugly decimals in messages and in balance.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1308 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 01:23:57 +00:00
snowleo
33c9e596c4 [trunk] Eco: removed useless converting string => double => string
Missing brackets added

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1307 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 00:46:15 +00:00
ementalo
25d77eff59 [trunk] formatting
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1306 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 00:37:57 +00:00
xeology
9d41ffcc62 Made signs double compatible and fixed Sign Colours Permissions bypass exploit in Eco Signs.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1305 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 00:25:39 +00:00
snowleo
d9294d6cbb [trunk] Fix converting to new home format.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1304 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-02 00:20:57 +00:00
snowleo
0e4de9e17e [trunk] Upgrade:
- move users.yml to users.yml.old
- handle filesystems that ignore case

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1303 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 22:58:54 +00:00
snowleo
7663c0ac9d [trunk] Another fix for upgrading the home locations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1302 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 22:35:26 +00:00
snowleo
0da67593a4 [trunk] Fix bug on upgrade the home locations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1301 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 21:58:38 +00:00
snowleo
3a83d59afb This is a big refactoring of the user class and more.
Many commands have been cleaned.

File changes:
- all user data has been moved from users.yml to userdata folder
- all files in userdata folder are lower case
Both changes should be done automatically.

Class changes:
- Moved all user data functions to UserData class
- Moved all user teleport functions to Teleport class
- Moved the user list to Essentials class
- Less static functions for better testing
- EssentialsCommand now has ess Property (Essentials class)
- New NotEnoughArgumentsException, that will show command description and syntax

New commands:
- /seen, shows the last login or logout
- /tempban, temporarily ban someone
- /tjail and mute, temporarily option added

Other changes:
- ban reason is saved
- don't show "You have xxx mail" on login, if user doesn't have essentials.mail permission
-  time will be parsed: years, months (mo), weeks, days, hours, minutes (m), seconds, these can be shortened and combined, example: 2 days 5h 30m

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1300 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 21:07:30 +00:00
snowleo
36808a2cba [trunk] Geoip: New permission essentials.geoip.show, that allow the player to see the location of other players.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1299 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 19:38:25 +00:00
snowleo
77cc3c7d97 [trunk] New items.csv by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1298 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 19:13:12 +00:00
snowleo
448b32f43c [trunk] Fix unknown itemids to crash clients.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1297 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 19:09:38 +00:00
snowleo
02a718374e [trunk] /kickall <reason>, the reason is now optional, also fixes that only the first word is send as kick message.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1296 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 18:37:58 +00:00
snowleo
c0f1af3714 [trunk] GeoIP: New permission: essentials.geoip.hide
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1295 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 11:57:57 +00:00
snowleo
1df39a282f [trunk] Fix the seperate stacks with /unlimited for all data items.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1294 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 11:32:17 +00:00
snowleo
8476c920a3 Empty project for Fayconomy
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1293 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 11:06:17 +00:00
snowleo
1aa4cb68bb EssentialsGeoIP is now officially part of Essentials
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1292 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-01 11:04:34 +00:00
snowleo
5b4514d86b [trunk/GroupManager] Correct error message on failing to load users file.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1291 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-30 18:12:46 +00:00
ementalo
18d8fd7ffa RB #740
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1290 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-29 09:35:58 +00:00
ementalo
ca52b41800 [trunk] add new config setting warn-on-smite: true setting this to false will not tell people they are smited when using /lightning
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1289 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-29 08:48:29 +00:00
ementalo
7d29e7b20c [trunk] fix /home playername. Look out for any case sesitive weirdness
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1288 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-28 22:52:08 +00:00
ementalo
70e0f9627b [trunk] test the svn bot
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1287 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-28 00:32:47 +00:00
ementalo
7b18918c68 [trunk] remove chat spam from lightning
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1286 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-27 19:28:40 +00:00
ementalo
6d731887b1 [trunk] Update items.csv by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1285 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-27 15:44:07 +00:00
ementalo
28f322c0a6 [trunk] added new config settings to disable weather. you can disable storm / thunder and lightning seperately.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1284 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-27 01:33:45 +00:00
ementalo
b08b69af95 [trunk] sky alias
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1283 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-27 00:42:53 +00:00
ementalo
275c5f00a2 [trunk] lightning strikes where you look if you do not pass an arg. fixed health taking
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1282 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-27 00:16:23 +00:00
ementalo
d7fd2689c4 [trunk] fix /weather and /thunder args
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1281 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 22:46:34 +00:00
ementalo
cc5eb6e3e1 [trunk] cleanup, prevent lightning fire spread
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1280 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 21:36:51 +00:00
ementalo
e2173660c5 [trunk] lightning, not as harsh, will take 5 hearts.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1279 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 12:48:24 +00:00
ementalo
9ed39895b3 [trunk] weather / thunder refactor, added /lightning. usage: /lightning [player] it will zap them and kill them. You can also zap yourself.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1278 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 12:39:57 +00:00
ementalo
0601176f55 [trunk] weather / thunder refactor
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1277 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 12:13:39 +00:00
snowleo
ec24a1cd93 [trunk] New items.csv by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1276 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 11:04:02 +00:00
snowleo
c3b3e7e845 [trunk] /unlimited:
- Reset durability on some data items to prevent second stacks
- Double Step gives Step

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1275 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 10:47:59 +00:00
ementalo
a157bb449a [trunk] do'h
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1274 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 10:36:53 +00:00
ementalo
5eb2f84c37 Rcommended #733
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1273 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 09:14:38 +00:00
snowleo
fce3e6b65d CB 731
Adding new craftbukkit because it fixes one of the bugs I reported.

Mysql and sqlite are included in craftbukkit, we don't need to add the libs to our jars.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1272 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-26 02:05:22 +00:00
zenexer
6f54f19ed0 Code cleanup; deprecated /nuble
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1271 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-24 22:13:14 +00:00
ementalo
592edca859 delete
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1270 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-24 20:49:02 +00:00
zenexer
4e979a6a51 Let's get to the bottom of this ban error.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1269 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-24 01:24:37 +00:00
ceulemansl
7d42ad2b87 updatedplugin.yml
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1268 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-23 01:21:54 +00:00
ceulemansl
a710aa61c0 small CB build fix
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1267 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-23 00:45:10 +00:00
ceulemansl
3c9e2985ff added thunder,
usage: /thunder <true/false> [duration]

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1266 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-23 00:43:27 +00:00
Zenexer
08c3ce0719 CB 711
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1265 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-23 00:30:59 +00:00
ceulemansl
cdbc33f032 added wheather,
usage /weather <sun/storm> [time in seconds]

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1264 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-23 00:26:10 +00:00
ceulemansl
10e73c1f52 added wheather,
usage /weather <sun/storm> [time in seconds]

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1263 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-23 00:24:29 +00:00
Zenexer
be12264e9b CB 711
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1262 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-23 00:20:55 +00:00
snowleo
bd282f3470 CB 699
Finally fixes creeper.isPowered()

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1261 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 18:05:07 +00:00
snowleo
372359c9cf CB 698
Fixes creeper.isPowered()

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1260 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 17:52:31 +00:00
snowleo
deb9821dfc New option for /spawnmob
/spawnmob creeper:powered 1

Creates a creeper that is charged by a ligthning.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1259 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 17:03:44 +00:00
snowleo
568a5561fc CB 697
Fixes spawning of web and new rails.
New config: Disable Lightning damage for players.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1258 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 16:58:02 +00:00
snowleo
fb2c0d2852 Fix item drop on trade signs, if player inventory is full.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1257 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 16:37:37 +00:00
snowleo
72064bebe1 Typo
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1255 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 15:00:07 +00:00
snowleo
2b788d4dfd Removed reference to EssentialsHome, we don't have that anymore
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1254 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 14:41:43 +00:00
snowleo
52ed15bd58 Fix signs for names > 14 char length.
This can be exploited by creating a user with the same first 14 characters.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1253 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 14:08:01 +00:00
snowleo
0153661bae Fix signs for names > 14 char length.
This can be exploited by creating a user with the same first 14 characters.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1252 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 11:59:22 +00:00
snowleo
f8c26fcfcb Use the correct nether in case there are more worlds loaded.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1251 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 11:48:07 +00:00
snowleo
df5fecdc93 New items.csv for 1.5 by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1250 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 10:43:19 +00:00
snowleo
028c832ea3 Prevent to give air.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1249 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 10:08:44 +00:00
snowleo
39f807f8b9 Missed one function rename of the wolf entity
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1248 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 09:45:59 +00:00
snowleo
8adc7f8d3c Craftbukkit 689 / MC 1.5
Testing only, do not release until 689 or higher is recommended

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1247 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 09:33:25 +00:00
snowleo
4bc7b56809 Updated build-impl by Netbeans 7.0
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1246 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-21 09:29:31 +00:00
zenexer
030474fec8 Added /e aliases for most commands
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1245 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-20 19:00:22 +00:00
ementalo
c648e345d9 [trunk] args length fix
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1244 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-19 10:52:24 +00:00
ementalo
4c7bd8c96a [trunk] add optional playername param to home. Players with "essentials.homes.others" permission can teleport to other players homes.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1243 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-19 10:49:17 +00:00
ementalo
7ad287d215 Craftbukkit recommended #684
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1242 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-19 10:04:51 +00:00
Zenexer
bbddb7048e Settings are now in trunk
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1241 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-18 01:01:34 +00:00
ementalo
7cbc982fc4 [trunk] cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1239 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-17 14:42:59 +00:00
snowleo
7d8a34c3bd [trunk] Throw errors on upgrade rename fail.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1238 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-17 00:08:09 +00:00
snowleo
6918e7561b [trunk] Catch the case where the upgrade is called before the config.yml file exists.
We don't need to update then.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1237 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 23:41:11 +00:00
snowleo
d31d439592 [trunk] Less spam on command errors by default
Added new debug setting to config.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1236 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 23:18:00 +00:00
zenexer
9108906090 Formatting
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1235 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 19:13:53 +00:00
zenexer
5203b90ed0 git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1234 e251c2fe-e539-e718-e476-b85c1f46cddb 2011-04-16 19:05:31 +00:00
snowleo
7a4c625691 [trunk] EssentialsConf: getDouble(): do not change the config on get() if the value is not set
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1233 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 17:26:32 +00:00
snowleo
6d1bb4028f [trunk] EssentialsUpgrade: rename backup to .upgradebackup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1232 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 16:49:56 +00:00
snowleo
e74ca6a69c [trunk] Protection signs: Last character from group was cut off.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1231 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 16:24:45 +00:00
snowleo
8bba355ca5 [trunk] Protection signs: Only owner of signs can destroy the signs.
This is also guarded by EssentialsProtect.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1230 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 16:16:04 +00:00
snowleo
ba4f17831a [trunk] Protection signs: Only owner of signs can destroy the signs.
This is also guarded by EssentialsProtect.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1229 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:53:36 +00:00
snowleo
9aea32469a [trunk] /sell hand will sell the item in hand.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1228 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:39:58 +00:00
snowleo
1d947652d5 [trunk] /setworth: support double
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1227 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:36:37 +00:00
snowleo
76b4a5e8ac [trunk] /sell: fix negative value
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1226 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:33:52 +00:00
snowleo
df37b86a57 [trunk] Worth: Don't default to 0.0, default to NaN.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1225 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:25:48 +00:00
snowleo
ceb75175b2 [trunk] Better log of command errors
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1224 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:25:06 +00:00
snowleo
47f0c903cb [trunk] NPE in /sell
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1223 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:21:17 +00:00
snowleo
aed820a246 [trunk] /sell itemname amount
New syntax for sell command, proposed by KimKandor
It won't sell the items in hand anymore.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1222 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:15:46 +00:00
snowleo
a289cfb795 [trunk] /sell itemname amount
New syntax for sell command, proposed by KimKandor
It won't sell the items in hand anymore.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1221 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:12:45 +00:00
snowleo
473271b076 [trunk] /sell itemname amount
New syntax for sell command, proposed by KimKandor
It won't sell the items in hand anymore.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1220 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:11:44 +00:00
snowleo
b17bb09b2b [trunk] /sell itemname amount
New syntax for sell command, proposed by KimKandor
It won't sell the items in hand anymore.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1219 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 15:11:20 +00:00
snowleo
278a4d3ad3 [trunk] Bukkit-Bug: http://leaky.bukkit.org/issues/668
changed getData().getData() to getDurability()

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1218 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 14:39:31 +00:00
snowleo
ed697cf5ac [trunk] Update user data if a command from /powertool is removed
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1217 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 13:41:36 +00:00
snowleo
dd8508cad4 [trunk] Removed useless loadClasses() method from Essentials.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1216 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 13:38:02 +00:00
snowleo
f4c4189ee8 [trunk] New mechanism for upgrading config files. This will be extended in the future.
New worth.yml autogenerated from the previous values.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1215 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 13:36:09 +00:00
snowleo
0819de6e15 [trunk] Group inheritance for warp signs
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1214 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 07:05:46 +00:00
snowleo
c5474e4cb6 [trunk] Groups for Protection signs.
Group inheritance.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1213 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 07:01:18 +00:00
snowleo
24b0034c51 [trunk] Worth/Sell: Support for double values as prices and more important: support for data items.
the yaml structure has changed, there is a fallback to the old structure.

This code is untested.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1212 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 06:45:37 +00:00
snowleo
dfa79b66b4 [trunk] Worth/Sell: Support for double values as prices and more important: support for data items.
the yaml structure has changed, there is a fallback to the old structure.

This code is untested.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1211 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 06:28:56 +00:00
snowleo
87807c0071 [trunk] Cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1210 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 06:00:27 +00:00
snowleo
f4d1689c10 [trunk] Cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1209 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 05:59:59 +00:00
snowleo
db8a1ca44c [trunk] /worth: don't access config directly, don't reload config after save and use getPrice() method.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1208 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 05:57:16 +00:00
snowleo
698a260694 [trunk] 1 to 1 ratio in Nether: The code is in two places. Also fixes 1/16=0 error using /world command.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1207 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 05:52:58 +00:00
snowleo
7c874c2dba [trunk] Groups for Protection signs.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1206 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 05:36:32 +00:00
ementalo
5bc4f35e96 [trunk] restore a users saved inventory if they use invsee then logout
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1205 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 00:54:31 +00:00
ementalo
b1a4566437 forgot to return
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1204 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 00:46:53 +00:00
ementalo
2f4d91f960 [trunk] moved the worth-id: cost out to their own file "worth.yml" some default values will be created. If you have values in config.yml already then they need to be copied to this new file. Added a setworth command that can change / add worth values.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1203 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-16 00:42:43 +00:00
ementalo
fd610407d8 [trunk] change the ability to nick others to permission node "essentials.nick.others"
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1202 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 23:21:40 +00:00
ementalo
e4ce785721 [trunk] new setting use-1to1-ratio if true sets the nether offset when using world to 1:1 else defaults to normal nether ratio
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1201 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 23:06:29 +00:00
ementalo
85c8ae8665 [trunk] fix setting for prevent-block-on-rails
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1200 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 21:56:40 +00:00
ementalo
4678ec7d10 [trunk] fixing node setting for warn-on-build-disallow. This needs to be in the protect: section under the disable: best place is to put it under the build: true node
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1199 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 21:18:32 +00:00
ementalo
be51bc1938 [trunk] case insensitive items from items csv when using /item and /give
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1198 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 21:11:41 +00:00
ementalo
f1383bad05 [trunk] change the way we prevent jailed players teleporting, should fix conflict with nocheat
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1197 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 20:13:16 +00:00
ementalo
52291b2741 [trunk] emoney
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1196 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 19:47:17 +00:00
ementalo
37ad3477da [trunk] remove ServerList section
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1195 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 16:42:53 +00:00
snowleo
f3d152b966 Removing private directory again.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1194 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 06:55:39 +00:00
zenexer
b900116cc8 Added overridden-commands. Commands beginning with /e will also give Essentials precedence.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1193 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-15 01:41:42 +00:00
ementalo
23237064e0 cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1192 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-14 22:53:36 +00:00
snowleo
8ea0d4e025 [trunk] Don't forget to update the minBukkitBuildVersion in Essentials class.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1191 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-14 22:16:01 +00:00
snowleo
73769fa00f [trunk] Do not rely on getItemInHand();
Bukkit-Bug: http://leaky.bukkit.org/issues/663

Fixes issue with data items and /unlimited

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1190 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-14 22:11:35 +00:00
ementalo
384722f469 [trunk] add setting warn-on-build-disallow to protect. setting this will give users with build:false a warning
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1189 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-14 21:14:16 +00:00
ementalo
f7b41f7de4 RB #677
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1188 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-14 10:36:17 +00:00
ementalo
1a0d192714 [trunk] adding new setting to send a person to spawn if /home is used with no home set
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1187 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-14 09:36:25 +00:00
ementalo
d2028214ef recommend # 674
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1186 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-13 12:37:56 +00:00
ementalo
8261c0d9c9 new RB #647,
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1185 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-13 12:21:39 +00:00
snowleo
22f1fdf5ec [trunk] God/Heal: New aliases /egod and /eheal
Also fix: /money and /bal for /balance

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1184 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-12 20:29:32 +00:00
snowleo
4e6206a668 No private folders please!
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1183 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-12 20:28:52 +00:00
snowleo
f506f43b13 [trunk] God/Heal: New aliases /egod and /eheal
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1182 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-12 19:39:38 +00:00
zenexer
94fb11f436 Added /ifo and /about as aliases for /info
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1181 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-12 03:14:01 +00:00
zenexer
9b493b76eb Added ability to disable nicknames by adding /nick to the disabled commands list
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1180 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-12 02:21:53 +00:00
zenexer
546dc12ea6 Added /realname
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1179 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-11 17:38:40 +00:00
snowleo
2fa346a81b [trunk] Antioch: Removed restriction to op users.
People want use the command, so we don't need this artificial restriction.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1178 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-11 11:23:10 +00:00
snowleo
b529b17fea [trunk] Protect: new prevent.portal-creation
If enabled, players can't create portals using fire.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1177 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-11 10:49:45 +00:00
snowleo
dd4a22c379 [trunk] getSaveDestination: floor location and center the player on the block
Less chance to get stuck in walls

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1176 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-11 08:58:16 +00:00
ementalo
5d17db19b4 [trunk] updated csv by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1175 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-11 08:48:40 +00:00
snowleo
bee1ef4f5c [trunk] UserData: Catch null location in getHome
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1174 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-11 00:35:56 +00:00
snowleo
e5da64f249 [trunk] Config: added all possible values to prevent spawning
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1173 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-11 00:10:18 +00:00
snowleo
1f942449ab [trunk] UserTest/Home: We can't test home without a running server.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1172 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 23:43:02 +00:00
snowleo
70b0f22d34 [trunk] Home: Catch world not loaded/unknown in server.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1171 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 23:35:07 +00:00
snowleo
4a2bd54b6c [trunk] GroupManager: Support utf-8 for saving files.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1170 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 22:55:11 +00:00
ementalo
5adb15f9ba [trunk] add alias of ci to cleaninventory
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1169 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 21:21:34 +00:00
snowleo
27c0f9cfa3 [trunk] added woodenstair, woodstair, wstair to item.csv
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1168 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 21:00:50 +00:00
snowleo
9e518d33d3 [trunk] change portal exit position for fixed getSavePosition
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1167 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 20:51:39 +00:00
snowleo
f76b9fd263 [trunk] getSaveDestination: round location and center the player on the block
Less chance to get stuck in walls

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1166 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 20:09:04 +00:00
snowleo
3a7d092056 [trunk] New permissions:
essentials.nocommandcost.all
essentials.nocommandcost.[commandname]

Don't charge a user for a command.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1165 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 19:44:12 +00:00
snowleo
f9d890469d [trunk] New /info command, reads text from info.txt.
Chapters are supported. Each line that starts with #name creates a chapter named name. Name does not support spaces and ignores case.

If info.txt contains chapters and no chapter is selected with /info command, then it will either print the file until the first chapter or if the first line is a chapter, it will return a list of all chapters.


git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1164 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 19:29:37 +00:00
snowleo
b5268c9797 [trunk] Backported some code from 3.0 branch: Correct the protection of signs and rails.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1163 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 18:17:53 +00:00
zenexer
58b625ae98 Updated according to necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1162 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 16:48:25 +00:00
zenexer
9c31085f30 Updated according to necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1161 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-10 16:36:57 +00:00
ementalo
214468c66e updated items.csv
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1160 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-09 19:36:11 +00:00
snowleo
8d8dba4e7e [trunk] tpall command
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1159 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-09 00:58:41 +00:00
snowleo
40f4aedd27 [trunk] New permission essentials.protect.ownerinfo shows the owner of each block, was essentials.protect.admin before.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1158 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-08 16:35:32 +00:00
snowleo
fe298d2f58 [trunk] empty fields in Inventory now return null instead of Material.AIR
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1157 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-08 11:45:14 +00:00
snowleo
0be847fba4 [trunk] empty fields in Inventory now return null instead of Material.AIR
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1156 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-08 11:43:10 +00:00
snowleo
cbf724fcc0 [trunk] Typo in groups.yml
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1155 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-08 11:28:55 +00:00
snowleo
50bfc66bbb [trunk] Replace all CraftInventory with Inventory
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1154 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-08 11:13:33 +00:00
ementalo
f1b7f4a3f8 test libs
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1150 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-08 08:22:19 +00:00
ementalo
35009288d8 New RB #670
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1149 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-08 08:16:28 +00:00
snowleo
834fb48df3 [trunk] Monster don't target players.
new config: protect.prevent.entitytarget
new permission: essentials.protect.entitytarget.bypass

forgot to add it to settings

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1148 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-07 20:44:06 +00:00
snowleo
71b9de15dc [trunk] Monster don't target players.
new config: protect.prevent.entitytarget
new permission: essentials.protect.entitytarget.bypass

forgot to add it to settings

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1147 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-07 20:39:27 +00:00
snowleo
9030ac3608 [trunk] Monster don't target players.
new config: protect.prevent.entitytarget
new permission: essentials.protect.entitytarget.bypass

typo

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1146 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-07 20:37:48 +00:00
snowleo
5817267a9a [trunk] Monster don't target players.
new config: protect.prevent.entitytarget
new permission: essentials.protect.entitytarget.bypass

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1145 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-07 20:32:00 +00:00
snowleo
7b690ae2b5 [trunk] Last heal, Last teleport: Don't error if it's the first time.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1144 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-07 16:57:06 +00:00
snowleo
5c51ce020b [trunk] New base class for User for storing all data.
More data for future use.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1143 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-07 02:59:56 +00:00
snowleo
242d7abd31 [trunk] New base class for User for storing all data.
TODO:
	- Get rid of users.yml
	- Cleanup User class

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1142 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-07 02:21:10 +00:00
snowleo
0d7df77ab4 [trunk] Don't expect the values from yaml to be a specific number format.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1141 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-06 10:32:59 +00:00
snowleo
548bc7d869 [trunk] trying to avoid IllegalAccess errors
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1140 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-06 01:05:41 +00:00
snowleo
5b9802cd8c [trunk] trying to avoid IllegalAccess errors
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1139 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-06 01:02:31 +00:00
snowleo
ae4366d770 [trunk] Fixes tjail if there is a jail stuck in the config.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1138 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-06 00:52:27 +00:00
snowleo
bf923f5a1d [trunk] Fixes failed back after tjail
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1137 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-06 00:50:16 +00:00
snowleo
f57bfcfa00 [trunk] Another IllegalAccess error?
http://pastebin.com/C122fiuQ

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1136 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 23:30:58 +00:00
snowleo
0c02e220ff [trunk] /msg /r Reply to the console. Add /r console command.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1135 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 18:28:18 +00:00
snowleo
a3dc43bcaf [trunk] /msg /r Reply to the console. Add /r console command.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1134 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 18:14:18 +00:00
snowleo
a99800d58e [trunk] EssentialsChat: chat-radius is now multi world compatible.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1133 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 16:59:46 +00:00
snowleo
e1f1ee3bce [trunk] Teleport Cooldown: uncommented code
What was the regression here?

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1132 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 16:53:26 +00:00
snowleo
bb38260759 [trunk] Jail: Directly send player to Jail.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1131 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 16:46:06 +00:00
snowleo
9f1504739d [trunk] Hopefully fixes java.lang.IllegalAccessError in EssentialsBlockListener
Force the hidden classes to load by the same ClassLoader.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1130 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 16:31:38 +00:00
snowleo
3885fd99e9 [trunk] /msg /r Reply to the console. Add /r console command.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1129 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 15:57:54 +00:00
snowleo
fac328b5a3 [trunk] /list: Reset color after [AFK]
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1128 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 15:54:59 +00:00
snowleo
6fe78b0752 [trunk] /plugin commands are broken.
see http://leaky.bukkit.org/issues/641 for details
Disabled all commands except /plugin list
/plugin load, /plugin reload and /plugin enable will call server.reload() function.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1127 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-05 15:53:29 +00:00
snowleo
2236494110 [trunk] Unlimited: Displayed wrong name
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1126 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 19:48:59 +00:00
snowleo
6be3f1913d [trunk] Unlimited: Fix for list
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1125 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 17:58:02 +00:00
snowleo
ce357dfb10 [trunk] Clear Inventory: Fix "Player not found" message
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1124 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 15:38:25 +00:00
snowleo
7eb32d3ea9 [trunk] Unlimited: fix unlimited.item-all permission
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1123 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 15:11:42 +00:00
snowleo
de5a3a99b2 [trunk] Unlimited: removed the - from names, so that the names correspond with the ones in items.csv.
Now its:

essentials.unlimited.item-waterbucket instead of item-water-bucket

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1122 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 15:02:07 +00:00
snowleo
cc9a34295f [trunk] Unlimited: allow permissions with ids instead of names:
essentials.unlimited.item-1

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1121 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 14:51:19 +00:00
snowleo
72b234c84f [trunk] Unlimited: List unlimited items with /unlimited list <player>
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1120 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 14:40:16 +00:00
snowleo
abb4a8eeb3 [trunk] Unlimited: List unlimited items with /unlimited list <player>
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1119 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 14:27:06 +00:00
snowleo
2cbbbbaf59 [trunk] Unlimited: Breaking change!
In favor for a much easier system, the config.yml settings have been removed.

New permissions:
essentials.unlimited: activates the /unlimited command
essentials.unlimited.others: allows to give unlimited stacks to others
essentials.unlimited.item-all: Access to all items
essentials.unlimited.item-bucket: Access to all buckets
essentials.unlimited.item-[itemname]: Access to specific item
item names are from https://github.com/Bukkit/Bukkit/blob/master/src/main/java/org/bukkit/Material.java
lower case, with - instead of _

All other essentials.unlimited.* permissions have been removed.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1118 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 14:16:00 +00:00
snowleo
0550c900a3 [trunk] Unlimited: Better config documentation
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1117 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 13:25:02 +00:00
snowleo
f0739930d4 [trunk] Unlimited: Display a message when user already has permissions to avoid confusion.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1116 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 13:06:01 +00:00
snowleo
92f8193268 [trunk] Unlimited: Don't run on canceled place.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1115 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 12:46:19 +00:00
snowleo
2c64431982 [trunk] Refactoring & cleanup of /spawnmob
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1114 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 02:58:41 +00:00
snowleo
62c3473584 [trunk] New /powertool command
Disable spam message for {player} commands

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1113 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 01:55:27 +00:00
snowleo
828cb46ca8 [trunk] New /powertool command
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1112 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-04 01:26:45 +00:00
snowleo
8081b665d0 [trunk] /unlimited: Only give out one item, if the inventory does not contain one.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1111 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 20:52:23 +00:00
snowleo
31a85d8ec9 [trunk] Renamed infinite to unlimited
Please change your permissions and config if you have used this.

New Command: /unlimited [item] <player>
Allows a player to enable unlimited placing for one item. Can be used on other players.
The permission essentials.unlimited.placing still enables it for all items.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1110 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 20:39:39 +00:00
snowleo
a52d1394ad [trunk] Renamed infinite to unlimited
Please change your permissions and config if you have used this.

New Command: /unlimited [item] <player>
Allows a player to enable unlimited placing for one item. Can be used on other players.
The permission essentials.unlimited.placing still enables it for all items.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1109 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 20:31:18 +00:00
snowleo
6f14379740 [trunk] Renamed infinite to unlimited
Please change your permissions and config if you have used this.

New Command: /unlimited [item] <player>
Allows a player to enable unlimited placing for one item. Can be used on other players.
The permission essentials.unlimited.placing still enables it for all items.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1108 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 20:21:20 +00:00
snowleo
9eec83bfb3 [trunk] Default config changed:
protect.alert.on-use: empty now
protect.disable.build: true

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1107 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 18:16:23 +00:00
snowleo
a11ccddaef [trunk] Cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1106 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 17:16:02 +00:00
snowleo
df80b68f78 [trunk] Spawn angry or tamed wolf
/spawnmob wolf:angry
/spawnmob wolf:tamed

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1105 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 17:10:19 +00:00
snowleo
5b615382da [trunk] Fixes slime:size
1 is smallest
Also added wool color for sheeps: Use color name (like white, red, blue) 
Example: /spawnmob sheep:blue

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1104 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 16:32:33 +00:00
snowleo
be9cd2464f [trunk] Typo in config
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1103 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 16:01:21 +00:00
snowleo
af33b4fff7 [trunk] Removed debug message "Kit is timed"
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1102 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 14:53:22 +00:00
snowleo
3daf709523 [trunk] Removed unused imports
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1101 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 14:31:30 +00:00
snowleo
4130a7d103 [trunk] Infinite placement of blocks, egg throws, buckets
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1100 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 14:25:10 +00:00
snowleo
7c67bac051 [trunk] Drop items from Buy Signs if the inventory is full
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1099 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 13:38:25 +00:00
snowleo
01200b9b20 [trunk] Warp signs
Since we can charge for warping now, Free is wrong, changed to Everyone.
So if you want everyone to use the sign use either "Everyone" or leave the third line empty.
In the latter case per Warp permission may apply, if enabled and the user needs essentials.signs.warp.use permission.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1098 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 12:15:22 +00:00
snowleo
d8e88a42cd [trunk] Warp signs
4th line: charge money or items

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1097 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 12:02:33 +00:00
snowleo
b07e44afa1 [trunk] Warp signs
PerWarpPermissions

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1096 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 01:19:50 +00:00
snowleo
40c00a0647 [trunk] Warp signs
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1095 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-03 01:12:55 +00:00
ceulemansl
8cecbb4f08 [Warp] signes.
Format:
    [Warp]
    warp-name
    Free/group/empty(then need permission to use)

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1094 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-02 23:21:45 +00:00
ceulemansl
b074c9c72c [Warp] signes.
Format:
    [Warp]
    warp-name
    Free/group/empty(then need permission to use)

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1093 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-02 23:21:28 +00:00
snowleo
f7d24f72a7 [trunk] Trim whitespaces from names in item lists in config.yml
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1092 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-02 09:46:13 +00:00
snowleo
8a47117c43 [trunk] Prevent explosions near protected objects
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1091 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-02 02:43:58 +00:00
snowleo
97cdc2b808 [trunk] Readded [balance] and [heal] sign code that was lost
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1090 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-02 00:41:58 +00:00
snowleo
b37bf315ba [trunk] teleportTo replaced with teleport; craftbukkit deprecated
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1089 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 23:39:18 +00:00
snowleo
e64f29cb15 [trunk] Fixed multiworld support for /home
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1088 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 23:35:10 +00:00
snowleo
4827e298b2 [trunk] Prevent scam (air, zero items) signs and prevent stacks size lower than 1 with /give and /item
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1087 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 23:06:44 +00:00
snowleo
5811ced6b2 [trunk] Cleanup
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1086 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 22:55:28 +00:00
snowleo
193b94c842 [trunk] Handle suffix with a size of 0 or 1.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1085 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 22:46:27 +00:00
snowleo
992d309b5c [trunk] Item lists in settings are now stored as Integer lists.
Also: Names from items.csv now work in item lists.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1084 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 22:06:00 +00:00
snowleo
59be793e9e [trunk] CraftBukkit: new recommended build 617
Fixes Sign bug (sign won't change)

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1081 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 20:11:55 +00:00
ementalo
f3468d6d5b Temp fix for coloured suffixes
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1076 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 10:15:49 +00:00
snowleo
66c6635486 [trunk] New 1.4 items.csv by necrodoom
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1075 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 04:13:38 +00:00
snowleo
6504bdf977 [trunk] CraftBukkit new recommended build 612
Compatibility with MC 1.4

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1069 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 02:16:07 +00:00
snowleo
48e8029681 [trunk] Ignore dist & build
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1063 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 01:36:47 +00:00
snowleo
795f3b8d19 [trunk] Correcting path for c3p0
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1059 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 01:21:30 +00:00
snowleo
864635ece1 [trunk] Remove private directories.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1055 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-04-01 00:18:15 +00:00
ementalo
4efc2b80b1 NULL item is when we click on stuff like doors.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1053 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-31 22:39:08 +00:00
ementalo
5c59f4728d Fix NPE where players trigger creature spawn
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1052 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-31 22:20:53 +00:00
ementalo
a1c78d06b9 wolf spawn
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1051 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-31 21:48:46 +00:00
Zenexer
0c7a2f4b1f Fixed priorities
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1046 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-31 12:05:42 +00:00
Zenexer
0dd84217e0 We shouldn't be canceling Priority.Monitor events; switched to Priority.Lowest.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1045 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-31 11:59:43 +00:00
Zenexer
df3b904ec3 Temporary fix for teleportation
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1044 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 20:22:07 +00:00
Zenexer
3cac88911c Updated for CB 602
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1043 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 17:58:00 +00:00
Zenexer
557f2325ee git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1041 e251c2fe-e539-e718-e476-b85c1f46cddb 2011-03-30 16:57:05 +00:00
zenexer
1beef49109 Updated for bukkit 600+
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1039 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 16:40:44 +00:00
Zenexer
e58a2aba02 git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1038 e251c2fe-e539-e718-e476-b85c1f46cddb 2011-03-30 16:38:56 +00:00
ementalo
50e1b5a940 remove
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1037 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 14:31:54 +00:00
ementalo
09403c7ad3 gah
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1036 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 14:28:46 +00:00
ementalo
714e836f87 2.1 v
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1035 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 14:22:14 +00:00
Zenexer
57eb9a7811 Fixed merge error
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1034 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 14:08:12 +00:00
Zenexer
b1745aa4c8 Deprecated Serverlist
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1030 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 13:39:00 +00:00
snowleo
965e42e033 Commit 993
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1029 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 13:34:15 +00:00
snowleo
09bc9e98f3 Commit 994 996
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1028 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 13:31:01 +00:00
snowleo
f42c5ee312 Commit 1001
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1027 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 13:28:57 +00:00
snowleo
d869f01d08 Commit 1002
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1026 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 13:28:15 +00:00
Zenexer
3f7be285c5 Deprecated Serverlist
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1025 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 13:16:54 +00:00
snowleo
57c93a2187 Revert to 1013
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1022 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 12:58:01 +00:00
snowleo
e7eafa8114 Revert to 1013
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1021 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 12:56:34 +00:00
Zenexer
5aca17d707 Updated merged jars to add c3p0
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1020 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 12:22:10 +00:00
ementalo
31b23920e0 latest RB #602
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1018 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 07:49:29 +00:00
Zenexer
2b191534a8 Renamed 2.1 -> trunk
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1017 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 04:04:57 +00:00
Zenexer
71c5e8c54e 2.1 prerelease, part 2 of 3
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk2.1@1015 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-30 04:03:21 +00:00
KimKandor
4dc5824a8d Updated to more normal settings including essentials permission nodes.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1000 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-22 13:42:45 +00:00
KimKandor
2f88d64ab7 Updated to more normal settings including essentials permission nodes.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@999 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-22 13:40:44 +00:00
snowleo
22379f7663 [2.1] Adding world name to location of whois
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@997 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-21 15:50:35 +00:00
snowleo
97adf699ca [trunk] Fix for ticket #161. Reset the color to white after away.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@995 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-21 15:39:57 +00:00
snowleo
ffd5bf1970 [trunk] Fix NPE in EssentialsConf on closing the stream.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@989 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-21 12:51:26 +00:00
snowleo
6a3fc06046 [trunk] Corrected log names in items.csv
by necrodoom

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@987 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-20 12:41:46 +00:00
snowleo
4e8bba1e75 Testcommit
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@980 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-20 01:36:03 +00:00
snowleo
95bfe6d942 Testcommit to trunk for merge
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@978 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-20 01:32:07 +00:00
snowleo
b3808f71ae Testmerge from 2.1 to trunk
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@976 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-20 00:41:19 +00:00
snowleo
59d0415c7d Moving all files to trunk.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@969 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-03-19 22:39:51 +00:00
snowleo
ea668bf9d0 git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@968 e251c2fe-e539-e718-e476-b85c1f46cddb 2011-03-19 22:36:16 +00:00
446 changed files with 82996 additions and 0 deletions

53
.gitignore vendored Normal file
View File

@@ -0,0 +1,53 @@
.DS_Store
/BuildAll/nbproject/private/
/EssentialsProtect/nbproject/private/
/EssentialsChat/nbproject/private/
/EssentialsGroupBridge/nbproject/private/
/EssentialsGeoIP/nbproject/private/
/EssentialsSpawn/nbproject/private/
/EssentialsXMPP/nbproject/private/
/EssentialsGroupManager/nbproject/private/
/BuildAll/build/
/EssentialsGroupBridge/dist/
/EssentialsGroupBridge/build/
/EssentialsGeoIP/dist/
/EssentialsGeoIP/build/
/EssentialsGroupManager/build/
/EssentialsGroupManager/dist/
/BuildAll/dist/
/EssentialsChat/build/
/EssentialsChat/dist/
/EssentialsSpawn/build/
/EssentialsSpawn/dist/
/EssentialsXMPP/dist/
/EssentialsXMPP/build/
/EssentialsProtect/dist/
/EssentialsProtect/build/
/EssentialsPermissionsCommands/nbproject/private/
/EssentialsPermissionsCommands/build/
/EssentialsPermissionsCommands/dist/
/Essentials/nbproject/private/
/Essentials/dist/
/Essentials/build/
/YamlAnnotations/
/EssentialsUpdate/nbproject/private/
/EssentialsRelease/
/EssentialsUpdate/dist/
/EssentialsUpdate/build/
/WebPush/apikey.php
/WebPush/nbproject/private
/EssentialsGroupManager/bin
/EssentialsGroupManager/.externalToolBuilders
/EssentialsAntiBuild/nbproject/private/
/EssentialsAntiBuild/dist/
/EssentialsAntiBuild/build/
/jars
/out
.idea/
*.iml
target/
dependency-reduced-pom.xml
/Essentials/config.yml
/Essentials/userdata/testplayer1.yml
/Essentials/usermap.csv
/Essentials/userdata

18
.travis.yml Normal file
View File

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

144
Essentials/pom.xml Normal file
View File

@@ -0,0 +1,144 @@
<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.ess3</groupId>
<artifactId>EssentialsParent</artifactId>
<version>2.x-SNAPSHOT</version>
</parent>
<artifactId>Essentials</artifactId>
<url>http://ess3.net/</url>
<organization>
<name>Essentials Team</name>
<url>http://ess3.net/</url>
</organization>
<licenses>
<license>
<name>GPLv3</name>
<url>http://www.gnu.org/copyleft/gpl.html</url>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/essentials/Essentials.git</connection>
<developerConnection>scm:git:https://github.com/essentials/Essentials.git</developerConnection>
<url>https://github.com/essentials/Essentials</url>
</scm>
<issueManagement>
<system>JIRA</system>
<url>http://essentials3.atlassian.net</url>
</issueManagement>
<ciManagement>
<system>TeamCity</system>
<url>http://ci.ess3.net/</url>
</ciManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.7.2-R0.3-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/bukkit.jar</systemPath>
</dependency>
<dependency>
<groupId>BOSEconomy</groupId>
<artifactId>BOSEconomy</artifactId>
<version>v0.7.8.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/BOSEconomy.jar</systemPath>
</dependency>
<dependency>
<groupId>de.bananaco</groupId>
<artifactId>bPermissions</artifactId>
<version>v2.12-DEV</version>
</dependency>
<dependency>
<groupId>iConomy</groupId>
<artifactId>iConomy5</artifactId>
<version>5</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/iCo5.jar</systemPath>
</dependency>
<dependency>
<groupId>iConomy</groupId>
<artifactId>iConomy6</artifactId>
<version>6</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/iCo6.jar</systemPath>
</dependency>
<dependency>
<groupId>net.ess3</groupId>
<artifactId>GroupManager</artifactId>
<version>${project.version}</version>
<scope>system</scope>
<systemPath>${project.basedir}/../EssentialsGroupManager/dist/EssentialsGroupManager.jar</systemPath>
</dependency>
<dependency>
<groupId>MultiCurrency</groupId>
<artifactId>MultiCurrency</artifactId>
<version>2.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/MultiCurrency.jar</systemPath>
</dependency>
<dependency>
<groupId>com.platymuus</groupId>
<artifactId>bukkit-permissions</artifactId>
<version>2.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/PermissionsBukkit.jar</systemPath>
</dependency>
<dependency>
<groupId>ru.tehkode</groupId>
<artifactId>PermissionsEx</artifactId>
<version>1.20.4</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/PermissionsEx.jar</systemPath>
</dependency>
<dependency>
<groupId>Privileges</groupId>
<artifactId>Privileges</artifactId>
<version>1.8.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/Privileges.jar</systemPath>
</dependency>
<dependency>
<groupId>SimplyPerms</groupId>
<artifactId>SimplyPerms</artifactId>
<version>1.7.6</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/SimplyPerms.jar</systemPath>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>Vault</artifactId>
<version>1.2.32</version>
</dependency>
<dependency>
<groupId>zPermissions</groupId>
<artifactId>zPermissions</artifactId>
<version>1.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/zPermissions.jar</systemPath>
</dependency>
</dependencies>
</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

@@ -0,0 +1,139 @@
package com.earth2me.essentials;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.IEssentials;
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("Essentials");
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 PluginCommand pc)
{
final String altString = pc.getPlugin().getName() + ":" + pc.getLabel();
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, "Essentials: Alternative command " + label + " found, using " + altString);
}
disabledList.put(label, altString);
}
public Map<String, String> disabledCommands()
{
return disabledList;
}
}

View File

@@ -0,0 +1,168 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.IEssentials;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Backup implements Runnable
{
private static final Logger LOGGER = Logger.getLogger("Essentials");
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 (!ess.getOnlinePlayers().isEmpty())
{
ess.runTaskAsynchronously(new Runnable()
{
@Override
public void run()
{
startTask();
}
});
}
}
public void onPlayerJoin()
{
startTask();
}
public synchronized void stopTask()
{
running = false;
if (taskId != -1)
{
server.getScheduler().cancelTask(taskId);
}
taskId = -1;
}
private synchronized 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, tl("backupStarted"));
final CommandSender cs = server.getConsoleSender();
server.dispatchCommand(cs, "save-all");
server.dispatchCommand(cs, "save-off");
ess.runTaskAsynchronously(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();
ess.runTaskAsynchronously(new Runnable()
{
@Override
public void run()
{
try
{
final BufferedReader reader = new BufferedReader(new InputStreamReader(child.getInputStream()));
try
{
String line;
do
{
line = reader.readLine();
if (line != null)
{
LOGGER.log(Level.INFO, line);
}
}
while (line != null);
}
finally
{
reader.close();
}
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
}
});
child.waitFor();
}
catch (InterruptedException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
finally
{
class BackupEnableSaveTask implements Runnable
{
@Override
public void run()
{
server.dispatchCommand(cs, "save-on");
if (ess.getOnlinePlayers().isEmpty())
{
stopTask();
}
active = false;
LOGGER.log(Level.INFO, tl("backupFinished"));
}
}
ess.scheduleSyncDelayedTask(new BackupEnableSaveTask());
}
}
});
}
}

View File

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

View File

@@ -0,0 +1,61 @@
package com.earth2me.essentials;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CommandSource implements IReplyTo
{
private CommandSource replyTo = null;
protected CommandSender sender;
public CommandSource(final CommandSender base)
{
this.sender = base;
}
public final CommandSender getSender()
{
return sender;
}
public final Player getPlayer()
{
if (sender instanceof Player)
{
return (Player)sender;
}
return null;
}
public final boolean isPlayer()
{
return (sender instanceof Player);
}
public final CommandSender setSender(final CommandSender base)
{
return this.sender = base;
}
public void sendMessage(String message)
{
if (!message.isEmpty())
{
sender.sendMessage(message);
}
}
@Override
public void setReplyTo(final CommandSource user)
{
replyTo = user;
}
@Override
public CommandSource getReplyTo()
{
return replyTo;
}
}

View File

@@ -0,0 +1,38 @@
package com.earth2me.essentials;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public final class Console implements IReplyTo
{
private static final Console instance = new Console();
private CommandSource replyTo;
public final static String NAME = "Console";
private Console()
{
}
public static CommandSender getCommandSender(Server server) throws Exception
{
return server.getConsoleSender();
}
@Override
public void setReplyTo(CommandSource user)
{
replyTo = user;
}
@Override
public CommandSource getReplyTo()
{
return replyTo;
}
public static Console getConsoleReplyTo()
{
return instance;
}
}

View File

@@ -0,0 +1,180 @@
package com.earth2me.essentials;
import com.earth2me.essentials.utils.NumberUtil;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.bukkit.enchantments.Enchantment;
public class Enchantments
{
private static final Map<String, Enchantment> ENCHANTMENTS = new HashMap<String, Enchantment>();
private static final Map<String, Enchantment> ALIASENCHANTMENTS = new HashMap<String, Enchantment>();
static
{
ENCHANTMENTS.put("alldamage", Enchantment.DAMAGE_ALL);
ALIASENCHANTMENTS.put("alldmg", Enchantment.DAMAGE_ALL);
ENCHANTMENTS.put("sharpness", Enchantment.DAMAGE_ALL);
ALIASENCHANTMENTS.put("sharp", Enchantment.DAMAGE_ALL);
ALIASENCHANTMENTS.put("dal", Enchantment.DAMAGE_ALL);
ENCHANTMENTS.put("ardmg", Enchantment.DAMAGE_ARTHROPODS);
ENCHANTMENTS.put("baneofarthropods", Enchantment.DAMAGE_ARTHROPODS);
ALIASENCHANTMENTS.put("baneofarthropod", Enchantment.DAMAGE_ARTHROPODS);
ALIASENCHANTMENTS.put("arthropod", Enchantment.DAMAGE_ARTHROPODS);
ALIASENCHANTMENTS.put("dar", Enchantment.DAMAGE_ARTHROPODS);
ENCHANTMENTS.put("undeaddamage", Enchantment.DAMAGE_UNDEAD);
ENCHANTMENTS.put("smite", Enchantment.DAMAGE_UNDEAD);
ALIASENCHANTMENTS.put("du", Enchantment.DAMAGE_UNDEAD);
ENCHANTMENTS.put("digspeed", Enchantment.DIG_SPEED);
ENCHANTMENTS.put("efficiency", Enchantment.DIG_SPEED);
ALIASENCHANTMENTS.put("minespeed", Enchantment.DIG_SPEED);
ALIASENCHANTMENTS.put("cutspeed", Enchantment.DIG_SPEED);
ALIASENCHANTMENTS.put("ds", Enchantment.DIG_SPEED);
ALIASENCHANTMENTS.put("eff", Enchantment.DIG_SPEED);
ENCHANTMENTS.put("durability", Enchantment.DURABILITY);
ALIASENCHANTMENTS.put("dura", Enchantment.DURABILITY);
ENCHANTMENTS.put("unbreaking", Enchantment.DURABILITY);
ALIASENCHANTMENTS.put("d", Enchantment.DURABILITY);
ENCHANTMENTS.put("thorns", Enchantment.THORNS);
ENCHANTMENTS.put("highcrit", Enchantment.THORNS);
ALIASENCHANTMENTS.put("thorn", Enchantment.THORNS);
ALIASENCHANTMENTS.put("highercrit", Enchantment.THORNS);
ALIASENCHANTMENTS.put("t", Enchantment.THORNS);
ENCHANTMENTS.put("fireaspect", Enchantment.FIRE_ASPECT);
ENCHANTMENTS.put("fire", Enchantment.FIRE_ASPECT);
ALIASENCHANTMENTS.put("meleefire", Enchantment.FIRE_ASPECT);
ALIASENCHANTMENTS.put("meleeflame", Enchantment.FIRE_ASPECT);
ALIASENCHANTMENTS.put("fa", Enchantment.FIRE_ASPECT);
ENCHANTMENTS.put("knockback", Enchantment.KNOCKBACK);
ALIASENCHANTMENTS.put("kback", Enchantment.KNOCKBACK);
ALIASENCHANTMENTS.put("kb", Enchantment.KNOCKBACK);
ALIASENCHANTMENTS.put("k", Enchantment.KNOCKBACK);
ALIASENCHANTMENTS.put("blockslootbonus", Enchantment.LOOT_BONUS_BLOCKS);
ENCHANTMENTS.put("fortune", Enchantment.LOOT_BONUS_BLOCKS);
ALIASENCHANTMENTS.put("fort", Enchantment.LOOT_BONUS_BLOCKS);
ALIASENCHANTMENTS.put("lbb", Enchantment.LOOT_BONUS_BLOCKS);
ALIASENCHANTMENTS.put("mobslootbonus", Enchantment.LOOT_BONUS_MOBS);
ENCHANTMENTS.put("mobloot", Enchantment.LOOT_BONUS_MOBS);
ENCHANTMENTS.put("looting", Enchantment.LOOT_BONUS_MOBS);
ALIASENCHANTMENTS.put("lbm", Enchantment.LOOT_BONUS_MOBS);
ALIASENCHANTMENTS.put("oxygen", Enchantment.OXYGEN);
ENCHANTMENTS.put("respiration", Enchantment.OXYGEN);
ALIASENCHANTMENTS.put("breathing", Enchantment.OXYGEN);
ENCHANTMENTS.put("breath", Enchantment.OXYGEN);
ALIASENCHANTMENTS.put("o", Enchantment.OXYGEN);
ENCHANTMENTS.put("protection", Enchantment.PROTECTION_ENVIRONMENTAL);
ALIASENCHANTMENTS.put("prot", Enchantment.PROTECTION_ENVIRONMENTAL);
ENCHANTMENTS.put("protect", Enchantment.PROTECTION_ENVIRONMENTAL);
ALIASENCHANTMENTS.put("p", Enchantment.PROTECTION_ENVIRONMENTAL);
ALIASENCHANTMENTS.put("explosionsprotection", Enchantment.PROTECTION_EXPLOSIONS);
ALIASENCHANTMENTS.put("explosionprotection", Enchantment.PROTECTION_EXPLOSIONS);
ALIASENCHANTMENTS.put("expprot", Enchantment.PROTECTION_EXPLOSIONS);
ALIASENCHANTMENTS.put("blastprotection", Enchantment.PROTECTION_EXPLOSIONS);
ALIASENCHANTMENTS.put("bprotection", Enchantment.PROTECTION_EXPLOSIONS);
ALIASENCHANTMENTS.put("bprotect", Enchantment.PROTECTION_EXPLOSIONS);
ENCHANTMENTS.put("blastprotect", Enchantment.PROTECTION_EXPLOSIONS);
ALIASENCHANTMENTS.put("pe", Enchantment.PROTECTION_EXPLOSIONS);
ALIASENCHANTMENTS.put("fallprotection", Enchantment.PROTECTION_FALL);
ENCHANTMENTS.put("fallprot", Enchantment.PROTECTION_FALL);
ENCHANTMENTS.put("featherfall", Enchantment.PROTECTION_FALL);
ALIASENCHANTMENTS.put("featherfalling", Enchantment.PROTECTION_FALL);
ALIASENCHANTMENTS.put("pfa", Enchantment.PROTECTION_FALL);
ALIASENCHANTMENTS.put("fireprotection", Enchantment.PROTECTION_FIRE);
ALIASENCHANTMENTS.put("flameprotection", Enchantment.PROTECTION_FIRE);
ENCHANTMENTS.put("fireprotect", Enchantment.PROTECTION_FIRE);
ALIASENCHANTMENTS.put("flameprotect", Enchantment.PROTECTION_FIRE);
ENCHANTMENTS.put("fireprot", Enchantment.PROTECTION_FIRE);
ALIASENCHANTMENTS.put("flameprot", Enchantment.PROTECTION_FIRE);
ALIASENCHANTMENTS.put("pf", Enchantment.PROTECTION_FIRE);
ENCHANTMENTS.put("projectileprotection", Enchantment.PROTECTION_PROJECTILE);
ENCHANTMENTS.put("projprot", Enchantment.PROTECTION_PROJECTILE);
ALIASENCHANTMENTS.put("pp", Enchantment.PROTECTION_PROJECTILE);
ENCHANTMENTS.put("silktouch", Enchantment.SILK_TOUCH);
ALIASENCHANTMENTS.put("softtouch", Enchantment.SILK_TOUCH);
ALIASENCHANTMENTS.put("st", Enchantment.SILK_TOUCH);
ENCHANTMENTS.put("waterworker", Enchantment.WATER_WORKER);
ENCHANTMENTS.put("aquaaffinity", Enchantment.WATER_WORKER);
ALIASENCHANTMENTS.put("watermine", Enchantment.WATER_WORKER);
ALIASENCHANTMENTS.put("ww", Enchantment.WATER_WORKER);
ALIASENCHANTMENTS.put("firearrow", Enchantment.ARROW_FIRE);
ENCHANTMENTS.put("flame", Enchantment.ARROW_FIRE);
ENCHANTMENTS.put("flamearrow", Enchantment.ARROW_FIRE);
ALIASENCHANTMENTS.put("af", Enchantment.ARROW_FIRE);
ENCHANTMENTS.put("arrowdamage", Enchantment.ARROW_DAMAGE);
ENCHANTMENTS.put("power", Enchantment.ARROW_DAMAGE);
ALIASENCHANTMENTS.put("arrowpower", Enchantment.ARROW_DAMAGE);
ALIASENCHANTMENTS.put("ad", Enchantment.ARROW_DAMAGE);
ENCHANTMENTS.put("arrowknockback", Enchantment.ARROW_KNOCKBACK);
ALIASENCHANTMENTS.put("arrowkb", Enchantment.ARROW_KNOCKBACK);
ENCHANTMENTS.put("punch", Enchantment.ARROW_KNOCKBACK);
ALIASENCHANTMENTS.put("arrowpunch", Enchantment.ARROW_KNOCKBACK);
ALIASENCHANTMENTS.put("ak", Enchantment.ARROW_KNOCKBACK);
ALIASENCHANTMENTS.put("infinitearrows", Enchantment.ARROW_INFINITE);
ENCHANTMENTS.put("infarrows", Enchantment.ARROW_INFINITE);
ENCHANTMENTS.put("infinity", Enchantment.ARROW_INFINITE);
ALIASENCHANTMENTS.put("infinite", Enchantment.ARROW_INFINITE);
ALIASENCHANTMENTS.put("unlimited", Enchantment.ARROW_INFINITE);
ALIASENCHANTMENTS.put("unlimitedarrows", Enchantment.ARROW_INFINITE);
ALIASENCHANTMENTS.put("ai", Enchantment.ARROW_INFINITE);
ENCHANTMENTS.put("luck", Enchantment.LUCK);
ALIASENCHANTMENTS.put("luckofsea", Enchantment.LUCK);
ALIASENCHANTMENTS.put("luckofseas", Enchantment.LUCK);
ALIASENCHANTMENTS.put("rodluck", Enchantment.LUCK);
ENCHANTMENTS.put("lure", Enchantment.LURE);
ALIASENCHANTMENTS.put("rodlure", Enchantment.LURE);
}
public static Enchantment getByName(String name)
{
Enchantment enchantment;
if (NumberUtil.isInt(name))
{
enchantment = Enchantment.getById(Integer.parseInt(name));
}
else
{
enchantment = Enchantment.getByName(name.toUpperCase(Locale.ENGLISH));
}
if (enchantment == null)
{
enchantment = ENCHANTMENTS.get(name.toLowerCase(Locale.ENGLISH));
}
if (enchantment == null)
{
enchantment = ALIASENCHANTMENTS.get(name.toLowerCase(Locale.ENGLISH));
}
return enchantment;
}
public static Set<Entry<String, Enchantment>> entrySet()
{
return ENCHANTMENTS.entrySet();
}
}

View File

@@ -0,0 +1,990 @@
/*
* 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.tl;
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.commands.QuietAbortException;
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 com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.SimpleTextInput;
import com.earth2me.essentials.utils.DateUtil;
import com.google.common.base.Function;
import com.google.common.base.Throwables;
import com.google.common.collect.Iterables;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.ess3.api.Economy;
import net.ess3.api.IEssentials;
import net.ess3.api.IItemDb;
import net.ess3.api.IJails;
import net.ess3.api.ISettings;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.command.BlockCommandSender;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.HandlerList;
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.plugin.java.JavaPluginLoader;
import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
import org.yaml.snakeyaml.error.YAMLException;
public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
{
public static final int BUKKIT_VERSION = 3050;
private static final Logger LOGGER = Logger.getLogger("Essentials");
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 final transient List<String> vanishedPlayers = new ArrayList<String>();
private transient Method oldGetOnlinePlayers;
public Essentials()
{
}
public Essentials(final Server server)
{
super(new JavaPluginLoader(server), new PluginDescriptionFile("Essentials", "", "com.earth2me.essentials.Essentials"), null, null);
}
@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();
i18n.updateLocale("en");
LOGGER.log(Level.INFO, tl("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);
userMap = new UserMap(this);
permissionsHandler = new PermissionsHandler(this, false);
Economy.setEss(this);
confList = new ArrayList<IConf>();
jails = new Jails(this);
registerListeners(server.getPluginManager());
}
@Override
public void onEnable()
{
try
{
LOGGER.setParent(this.getLogger());
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, tl("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)
{
wrongVersion();
this.setEnabled(false);
return;
}
}
else
{
LOGGER.log(Level.INFO, tl("bukkitFormatChanged"));
LOGGER.log(Level.INFO, getServer().getVersion());
LOGGER.log(Level.INFO, getServer().getBukkitVersion());
}
execTimer.mark("BukkitCheck");
for (Method method : Server.class.getDeclaredMethods())
{
if (method.getName().endsWith("getOnlinePlayers") && method.getReturnType() == Player[].class)
{
oldGetOnlinePlayers = method;
break;
}
}
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");
userMap = new UserMap(this);
confList.add(userMap);
execTimer.mark("Init(Usermap)");
upgrade.afterSettings();
execTimer.mark("Upgrade2");
i18n.updateLocale(settings.getLocale());
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)");
jails = new Jails(this);
confList.add(jails);
reload();
}
catch (YAMLException exception)
{
if (pm.getPlugin("EssentialsUpdate") != null)
{
LOGGER.log(Level.SEVERE, tl("essentialsHelp2"));
}
else
{
LOGGER.log(Level.SEVERE, tl("essentialsHelp1"));
}
handleCrash(exception);
return;
}
backup = new Backup(this);
permissionsHandler = new PermissionsHandler(this, settings.useBukkitPermissions());
alternativeCommandsHandler = new AlternativeCommandsHandler(this);
timer = new EssentialsTimer(this);
scheduleSyncRepeatingTask(timer, 1000, 50);
Economy.setEss(this);
execTimer.mark("RegHandler");
final MetricsStarter metricsStarter = new MetricsStarter(this);
if (metricsStarter.getStart() != null && metricsStarter.getStart() == true)
{
runTaskLaterAsynchronously(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 {0}", timeroutput);
}
}
catch (NumberFormatException ex)
{
handleCrash(ex);
}
catch (Error ex)
{
handleCrash(ex);
throw ex;
}
}
@Override
public void saveConfig()
{
// We don't use any of the bukkit config writing, as this breaks our config file formatting.
}
private void registerListeners(PluginManager pm)
{
HandlerList.unregisterAll(this);
if (getSettings().isDebug())
{
LOGGER.log(Level.INFO, "Registering Listeners");
}
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);
pm.registerEvents(tntListener, this);
jails.resetListener();
}
@Override
public void onDisable()
{
for (User user : getOnlineUsers())
{
if (user.isVanished())
{
user.setVanished(false);
user.sendMessage(tl("unvanishedReload"));
}
user.stopTransaction();
}
cleanupOpenInventories();
if (i18n != null)
{
i18n.onDisable();
}
if (backup != null)
{
backup.stopTask();
}
Economy.setEss(null);
Trade.closeLog();
getUserMap().getUUIDMap().forceWriteUUIDMap();
HandlerList.unregisterAll(this);
}
@Override
public void reload()
{
Trade.closeLog();
for (IConf iConf : confList)
{
iConf.reloadConfig();
execTimer.mark("Reload(" + iConf.getClass().getSimpleName() + ")");
}
i18n.updateLocale(settings.getLocale());
final PluginManager pm = getServer().getPluginManager();
registerListeners(pm);
}
@Override
public List<String> onTabComplete(CommandSender sender,
Command command,
String commandLabel,
String[] args)
{
// 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)
{
try
{
TabCompleter completer = pc.getTabCompleter();
if (completer != null)
{
return completer.onTabComplete(sender, command, commandLabel, args);
}
}
catch (final Exception ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
}
return null;
}
@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 cSender, 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);
try
{
return pc.execute(cSender, commandLabel, args);
}
catch (final Exception ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
cSender.sendMessage(ChatColor.RED + "An internal error occurred while attempting to perform this command");
return true;
}
}
}
try
{
User user = null;
Block bSenderBlock = null;
if (cSender instanceof Player)
{
user = getUser((Player)cSender);
}
else if (cSender instanceof BlockCommandSender)
{
BlockCommandSender bsender = (BlockCommandSender)cSender;
bSenderBlock = bsender.getBlock();
}
if (bSenderBlock != null)
{
Bukkit.getLogger().log(Level.INFO, "CommandBlock at {0},{1},{2} issued server command: /{3} {4}", new Object[]
{
bSenderBlock.getX(), bSenderBlock.getY(), bSenderBlock.getZ(), commandLabel, EssentialsCommand.getFinalArg(args, 0)
});
}
else if (user == null)
{
Bukkit.getLogger().log(Level.INFO, "{0} issued server command: /{1} {2}", new Object[]
{
cSender.getName(), commandLabel, EssentialsCommand.getFinalArg(args, 0)
});
}
CommandSource sender = new CommandSource(cSender);
// New mail notification
if (user != null && !getSettings().isCommandDisabled("mail") && !command.getName().equals("mail") && user.isAuthorized("essentials.mail"))
{
final List<String> mail = user.getMails();
if (mail != null && !mail.isEmpty())
{
user.sendMessage(tl("youHaveNewMail", mail.size()));
}
}
//Print version even if admin command is not available #easteregg
if (commandLabel.equalsIgnoreCase("essversion"))
{
sender.sendMessage("This server is running Essentials " + getDescription().getVersion());
return true;
}
// 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(tl("commandNotLoaded", commandLabel));
LOGGER.log(Level.SEVERE, tl("commandNotLoaded", commandLabel), ex);
return true;
}
// Check authorization
if (user != null && !user.isAuthorized(cmd, permissionPrefix))
{
LOGGER.log(Level.INFO, tl("deniedAccessCommand", user.getName()));
user.sendMessage(tl("noAccessCommand"));
return true;
}
if (user != null && user.isJailed() && !user.isAuthorized(cmd, "essentials.jail.allow."))
{
if (user.getJailTimeout() > 0)
{
user.sendMessage(tl("playerJailedFor", user.getName(), DateUtil.formatDateDiff(user.getJailTimeout())));
}
else
{
user.sendMessage(tl("jailMessage"));
}
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 (QuietAbortException 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 (Exception ex)
{
showError(sender, ex, commandLabel);
return true;
}
}
catch (Throwable ex)
{
LOGGER.log(Level.SEVERE, tl("commandFailed", commandLabel), ex);
return true;
}
}
public void cleanupOpenInventories()
{
for (User user : getOnlineUsers())
{
if (user.isRecipeSee())
{
user.getBase().getOpenInventory().getTopInventory().clear();
user.getBase().getOpenInventory().close();
user.setRecipeSee(false);
}
if (user.isInvSee() || user.isEnderSee())
{
user.getBase().getOpenInventory().close();
user.setInvSee(false);
user.setEnderSee(false);
}
}
}
@Override
public void showError(final CommandSource sender, final Throwable exception, final String commandLabel)
{
sender.sendMessage(tl("errorWithMessage", exception.getMessage()));
if (getSettings().isDebug())
{
LOGGER.log(Level.INFO, tl("errorCallingCommand", commandLabel), exception);
}
}
public static void wrongVersion()
{
LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *");
LOGGER.log(Level.SEVERE, tl("notRecommendedBukkit"));
LOGGER.log(Level.SEVERE, tl("requiredBukkit", Integer.toString(BUKKIT_VERSION)));
LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *");
}
@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;
}
@Override
public Metrics getMetrics()
{
return metrics;
}
@Override
public void setMetrics(Metrics metrics)
{
this.metrics = metrics;
}
@Deprecated
@Override
public User getUser(final Object base)
{
if (base instanceof Player)
{
return getUser((Player)base);
}
if (base instanceof org.bukkit.OfflinePlayer)
{
return getUser(((org.bukkit.OfflinePlayer)base).getUniqueId());
}
if (base instanceof UUID)
{
return getUser((UUID)base);
}
if (base instanceof String)
{
return getOfflineUser((String)base);
}
return null;
}
//This will return null if there is not a match.
@Override
public User getUser(final String base)
{
return getOfflineUser(base);
}
//This will return null if there is not a match.
@Override
public User getUser(final UUID base)
{
return userMap.getUser(base);
}
//This will return null if there is not a match.
@Override
public User getOfflineUser(final String name)
{
final User user = userMap.getUser(name);
if (user != null && user.getBase() instanceof OfflinePlayer)
{
//This code should attempt to use the last known name of a user, if Bukkit returns name as null.
final String lastName = user.getLastAccountName();
if (lastName != null)
{
((OfflinePlayer)user.getBase()).setName(lastName);
}
else
{
((OfflinePlayer)user.getBase()).setName(name);
}
}
return user;
}
//This will create a new user if there is not a match.
@Override
public User getUser(final Player base)
{
if (base == null)
{
return null;
}
if (userMap == null)
{
LOGGER.log(Level.WARNING, "Essentials userMap not initialized");
return null;
}
User user = userMap.getUser(base.getUniqueId());
if (user == null)
{
if (getSettings().isDebug())
{
LOGGER.log(Level.INFO, "Constructing new userfile from base player {0}", base.getName());
}
user = new User(base, this);
}
else
{
user.update(base);
}
return user;
}
private void handleCrash(Throwable exception)
{
final PluginManager pm = getServer().getPluginManager();
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 : getOnlinePlayers())
{
player.sendMessage("Essentials failed to load, read the log file.");
}
this.setEnabled(false);
}
@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 String message)
{
return broadcastMessage(null, null, message, true);
}
@Override
public int broadcastMessage(final IUser sender, final String message)
{
return broadcastMessage(sender, null, message, false);
}
@Override
public int broadcastMessage(final String permission, final String message)
{
return broadcastMessage(null, permission, message, false);
}
private int broadcastMessage(final IUser sender, final String permission, final String message, final boolean keywords)
{
if (sender != null && sender.isHidden())
{
return 0;
}
IText broadcast = new SimpleTextInput(message);
final Collection<Player> players = getOnlinePlayers();
for (Player player : players)
{
final User user = getUser(player);
if ((permission == null && (sender == null || !user.isIgnoredPlayer(sender)))
|| (permission != null && user.isAuthorized(permission)))
{
if (keywords)
{
broadcast = new KeywordReplacer(broadcast, new CommandSource(player), this, false);
}
for (String messageText : broadcast.getLines())
{
user.sendMessage(messageText);
}
}
}
return players.size();
}
@Override
public BukkitTask runTaskAsynchronously(final Runnable run)
{
return this.getScheduler().runTaskAsynchronously(this, run);
}
@Override
public BukkitTask runTaskLaterAsynchronously(final Runnable run, final long delay)
{
return this.getScheduler().runTaskLaterAsynchronously(this, run, delay);
}
@Override
public BukkitTask runTaskTimerAsynchronously(final Runnable run, final long delay, final long period)
{
return this.getScheduler().runTaskTimerAsynchronously(this, run, delay, period);
}
@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 IItemDb 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;
}
@Override
public Collection<Player> getOnlinePlayers()
{
try
{
return (Collection<Player>)getServer().getOnlinePlayers(); // Needed for sanity here, the Bukkit API is a bit broken in the sense it only allows subclasses of Player to this list
}
catch (NoSuchMethodError ex)
{
try
{
return Arrays.asList((Player[])oldGetOnlinePlayers.invoke(getServer()));
}
catch (InvocationTargetException ex1)
{
throw Throwables.propagate(ex.getCause());
}
catch (IllegalAccessException ex1)
{
throw new RuntimeException("Error invoking oldGetOnlinePlayers", ex1);
}
}
}
@Override
public Iterable<User> getOnlineUsers()
{
return Iterables.transform(getOnlinePlayers(), new Function<Player, User>()
{
@Override
public User apply(Player player)
{
return getUser(player);
}
});
}
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

@@ -0,0 +1,71 @@
package com.earth2me.essentials;
import com.earth2me.essentials.utils.LocationUtil;
import java.util.Locale;
import net.ess3.api.IEssentials;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.block.BlockState;
import org.bukkit.block.CreatureSpawner;
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.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 = LocationUtil.convertBlockToItem(event.getBlockPlaced());
if (is == null)
{
return;
}
if (is.getType() == Material.MOB_SPAWNER && event.getItemInHand() != null && event.getPlayer() != null
&& event.getItemInHand().getType() == Material.MOB_SPAWNER)
{
final BlockState blockState = event.getBlockPlaced().getState();
if (blockState instanceof CreatureSpawner)
{
final CreatureSpawner spawner = (CreatureSpawner)blockState;
final EntityType type = EntityType.fromId(event.getItemInHand().getData().getData());
if (type != null && Mob.fromBukkitType(type) != null)
{
if (ess.getUser(event.getPlayer()).isAuthorized("essentials.spawnerconvert." + Mob.fromBukkitType(type).name().toLowerCase(Locale.ENGLISH)))
{
spawner.setSpawnedType(type);
}
}
}
}
final User user = ess.getUser(event.getPlayer());
if (user.hasUnlimited(is) && user.getBase().getGameMode() == GameMode.SURVIVAL)
{
class UnlimitedItemSpawnTask implements Runnable
{
@Override
public void run()
{
user.getBase().getInventory().addItem(is);
user.getBase().updateInventory();
}
}
ess.scheduleSyncDelayedTask(new UnlimitedItemSpawnTask());
}
}
}

View File

@@ -0,0 +1,859 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.google.common.io.Files;
import java.io.*;
import java.math.BigDecimal;
import java.math.MathContext;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CoderResult;
import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.InvalidWorldException;
import org.bukkit.*;
import org.bukkit.OfflinePlayer;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector;
public class EssentialsConf extends YamlConfiguration
{
protected static final Logger LOGGER = Logger.getLogger("Essentials");
protected final File configFile;
protected String templateName = null;
protected static final Charset UTF8 = Charset.forName("UTF-8");
private Class<?> resourceClass = EssentialsConf.class;
private static final ExecutorService EXECUTOR_SERVICE = Executors.newSingleThreadExecutor();
private final AtomicInteger pendingDiskWrites = new AtomicInteger(0);
private final AtomicBoolean transaction = new AtomicBoolean(false);
public EssentialsConf(final File configFile)
{
super();
this.configFile = configFile.getAbsoluteFile();
}
private final byte[] bytebuffer = new byte[1024];
public synchronized void load()
{
if (pendingDiskWrites.get() != 0)
{
LOGGER.log(Level.INFO, "File {0} not read, because it''s not yet written to disk.", configFile);
return;
}
if (!configFile.getParentFile().exists())
{
if (!configFile.getParentFile().mkdirs())
{
LOGGER.log(Level.SEVERE, tl("failedToCreateConfig", configFile.toString()));
}
}
// This will delete files where the first character is 0. In most cases they are broken.
if (configFile.exists() && configFile.length() != 0)
{
try
{
final InputStream input = new FileInputStream(configFile);
try
{
if (input.read() == 0)
{
input.close();
configFile.delete();
}
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
finally
{
try
{
input.close();
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
}
}
catch (FileNotFoundException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
}
if (!configFile.exists())
{
if (legacyFileExists())
{
convertLegacyFile();
}
else if (altFileExists())
{
convertAltFile();
}
else if (templateName != null)
{
LOGGER.log(Level.INFO, tl("creatingConfigFromTemplate", configFile.toString()));
createFromTemplate();
}
else
{
return;
}
}
try
{
final FileInputStream inputStream = new FileInputStream(configFile);
try
{
long startSize = configFile.length();
if (startSize > Integer.MAX_VALUE)
{
throw new InvalidConfigurationException("File too big");
}
ByteBuffer buffer = ByteBuffer.allocate((int)startSize);
int length;
while ((length = inputStream.read(bytebuffer)) != -1)
{
if (length > buffer.remaining())
{
ByteBuffer resize = ByteBuffer.allocate(buffer.capacity() + length - buffer.remaining());
int resizePosition = buffer.position();
buffer.rewind();
resize.put(buffer);
resize.position(resizePosition);
buffer = resize;
}
buffer.put(bytebuffer, 0, length);
}
buffer.rewind();
final CharBuffer data = CharBuffer.allocate(buffer.capacity());
CharsetDecoder decoder = UTF8.newDecoder();
CoderResult result = decoder.decode(buffer, data, true);
if (result.isError())
{
buffer.rewind();
data.clear();
LOGGER.log(Level.INFO, "File " + configFile.getAbsolutePath().toString() + " is not utf-8 encoded, trying " + Charset.defaultCharset().displayName());
decoder = Charset.defaultCharset().newDecoder();
result = decoder.decode(buffer, data, true);
if (result.isError())
{
throw new InvalidConfigurationException("Invalid Characters in file " + configFile.getAbsolutePath().toString());
}
else
{
decoder.flush(data);
}
}
else
{
decoder.flush(data);
}
final int end = data.position();
data.rewind();
super.loadFromString(data.subSequence(0, end).toString());
}
finally
{
inputStream.close();
}
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
}
catch (InvalidConfigurationException ex)
{
File broken = new File(configFile.getAbsolutePath() + ".broken." + System.currentTimeMillis());
configFile.renameTo(broken);
LOGGER.log(Level.SEVERE, "The file " + configFile.toString() + " is broken, it has been renamed to " + broken.toString(), ex.getCause());
}
}
public boolean legacyFileExists()
{
return false;
}
public void convertLegacyFile()
{
LOGGER.log(Level.SEVERE, "Unable to import legacy config file.");
}
public boolean altFileExists()
{
return false;
}
public void convertAltFile()
{
LOGGER.log(Level.SEVERE, "Unable to import alt config file.");
}
private void createFromTemplate()
{
InputStream istr = null;
OutputStream ostr = null;
try
{
istr = resourceClass.getResourceAsStream(templateName);
if (istr == null)
{
LOGGER.log(Level.SEVERE, tl("couldNotFindTemplate", templateName));
return;
}
ostr = new FileOutputStream(configFile);
byte[] buffer = new byte[1024];
int length = 0;
length = istr.read(buffer);
while (length > 0)
{
ostr.write(buffer, 0, length);
length = istr.read(buffer);
}
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, tl("failedToWriteConfig", configFile.toString()), ex);
}
finally
{
try
{
if (istr != null)
{
istr.close();
}
}
catch (IOException ex)
{
Logger.getLogger(EssentialsConf.class.getName()).log(Level.SEVERE, null, ex);
}
try
{
if (ostr != null)
{
ostr.close();
}
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, tl("failedToCloseConfig", configFile.toString()), ex);
}
}
}
public void setTemplateName(final String templateName)
{
this.templateName = templateName;
}
public File getFile()
{
return configFile;
}
public void setTemplateName(final String templateName, final Class<?> resClass)
{
this.templateName = templateName;
this.resourceClass = resClass;
}
public void startTransaction()
{
transaction.set(true);
}
public void stopTransaction()
{
transaction.set(false);
save();
}
public void save()
{
try
{
save(configFile);
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
}
}
public void saveWithError() throws IOException
{
save(configFile);
}
@Override
public synchronized void save(final File file) throws IOException
{
if (!transaction.get())
{
delayedSave(file);
}
}
//This may be aborted if there are stagnant requests sitting in queue.
//This needs fixed to discard outstanding save requests.
public synchronized void forceSave()
{
try
{
Future<?> future = delayedSave(configFile);
if (future != null)
{
future.get();
}
}
catch (InterruptedException ex)
{
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
}
catch (ExecutionException ex)
{
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
}
}
public synchronized void cleanup()
{
forceSave();
}
private Future<?> delayedSave(final File file)
{
if (file == null)
{
throw new IllegalArgumentException("File cannot be null");
}
final String data = saveToString();
if (data.length() == 0)
{
return null;
}
Future<?> future = EXECUTOR_SERVICE.submit(new WriteRunner(configFile, data, pendingDiskWrites));
return future;
}
private static class WriteRunner implements Runnable
{
private final File configFile;
private final String data;
private final AtomicInteger pendingDiskWrites;
private WriteRunner(final File configFile, final String data, final AtomicInteger pendingDiskWrites)
{
this.configFile = configFile;
this.data = data;
this.pendingDiskWrites = pendingDiskWrites;
}
@Override
public void run()
{
//long startTime = System.nanoTime();
synchronized (configFile)
{
if (pendingDiskWrites.get() > 1)
{
// Writes can be skipped, because they are stored in a queue (in the executor).
// Only the last is actually written.
pendingDiskWrites.decrementAndGet();
//LOGGER.log(Level.INFO, configFile + " skipped writing in " + (System.nanoTime() - startTime) + " nsec.");
return;
}
try
{
Files.createParentDirs(configFile);
if (!configFile.exists())
{
try
{
LOGGER.log(Level.INFO, tl("creatingEmptyConfig", configFile.toString()));
if (!configFile.createNewFile())
{
LOGGER.log(Level.SEVERE, tl("failedToCreateConfig", configFile.toString()));
return;
}
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, tl("failedToCreateConfig", configFile.toString()), ex);
return;
}
}
final FileOutputStream fos = new FileOutputStream(configFile);
try
{
final OutputStreamWriter writer = new OutputStreamWriter(fos, UTF8);
try
{
writer.write(data);
}
finally
{
writer.close();
}
}
finally
{
fos.close();
}
}
catch (IOException e)
{
LOGGER.log(Level.SEVERE, e.getMessage(), e);
}
finally
{
//LOGGER.log(Level.INFO, configFile + " written to disk in " + (System.nanoTime() - startTime) + " nsec.");
pendingDiskWrites.decrementAndGet();
}
}
}
}
public boolean hasProperty(final String path)
{
return isSet(path);
}
public Location getLocation(final String path, final Server server) throws InvalidWorldException
{
final String worldString = (path == null ? "" : path + ".") + "world";
final String worldName = getString(worldString);
if (worldName == null || worldName.isEmpty())
{
return null;
}
final World world = server.getWorld(worldName);
if (world == null)
{
throw new InvalidWorldException(worldName);
}
return new Location(world,
getDouble((path == null ? "" : path + ".") + "x", 0),
getDouble((path == null ? "" : path + ".") + "y", 0),
getDouble((path == null ? "" : path + ".") + "z", 0),
(float)getDouble((path == null ? "" : path + ".") + "yaw", 0),
(float)getDouble((path == null ? "" : path + ".") + "pitch", 0));
}
public void setProperty(final String path, final Location loc)
{
set((path == null ? "" : path + ".") + "world", loc.getWorld().getName());
set((path == null ? "" : path + ".") + "x", loc.getX());
set((path == null ? "" : path + ".") + "y", loc.getY());
set((path == null ? "" : path + ".") + "z", loc.getZ());
set((path == null ? "" : path + ".") + "yaw", loc.getYaw());
set((path == null ? "" : path + ".") + "pitch", loc.getPitch());
}
@Override
public ItemStack getItemStack(final String path)
{
final ItemStack stack = new ItemStack(
Material.valueOf(getString(path + ".type", "AIR")),
getInt(path + ".amount", 1),
(short)getInt(path + ".damage", 0));
final ConfigurationSection enchants = getConfigurationSection(path + ".enchant");
if (enchants != null)
{
for (String enchant : enchants.getKeys(false))
{
final Enchantment enchantment = Enchantment.getByName(enchant.toUpperCase(Locale.ENGLISH));
if (enchantment == null)
{
continue;
}
final int level = getInt(path + ".enchant." + enchant, enchantment.getStartLevel());
stack.addUnsafeEnchantment(enchantment, level);
}
}
return stack;
/*
* ,
* (byte)getInt(path + ".data", 0)
*/
}
public void setProperty(final String path, final ItemStack stack)
{
final Map<String, Object> map = new HashMap<String, Object>();
map.put("type", stack.getType().toString());
map.put("amount", stack.getAmount());
map.put("damage", stack.getDurability());
Map<Enchantment, Integer> enchantments = stack.getEnchantments();
if (!enchantments.isEmpty())
{
Map<String, Integer> enchant = new HashMap<String, Integer>();
for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet())
{
enchant.put(entry.getKey().getName().toLowerCase(Locale.ENGLISH), entry.getValue());
}
map.put("enchant", enchant);
}
// getData().getData() is broken
//map.put("data", stack.getDurability());
set(path, map);
}
public void setProperty(String path, List object)
{
set(path, new ArrayList(object));
}
public void setProperty(String path, Map object)
{
set(path, new LinkedHashMap(object));
}
public Object getProperty(String path)
{
return get(path);
}
public void setProperty(final String path, final BigDecimal bigDecimal)
{
set(path, bigDecimal.toString());
}
public void setProperty(String path, Object object)
{
set(path, object);
}
public void removeProperty(String path)
{
set(path, null);
}
@Override
public synchronized Object get(String path)
{
return super.get(path);
}
@Override
public synchronized Object get(String path, Object def)
{
return super.get(path, def);
}
public synchronized BigDecimal getBigDecimal(final String path, final BigDecimal def)
{
final String input = super.getString(path);
return toBigDecimal(input, def);
}
public static BigDecimal toBigDecimal(final String input, final BigDecimal def)
{
if (input == null || input.isEmpty())
{
return def;
}
else
{
try
{
return new BigDecimal(input, MathContext.DECIMAL128);
}
catch (NumberFormatException e)
{
return def;
}
catch (ArithmeticException e)
{
return def;
}
}
}
@Override
public synchronized boolean getBoolean(String path)
{
return super.getBoolean(path);
}
@Override
public synchronized boolean getBoolean(String path, boolean def)
{
return super.getBoolean(path, def);
}
@Override
public synchronized List<Boolean> getBooleanList(String path)
{
return super.getBooleanList(path);
}
@Override
public synchronized List<Byte> getByteList(String path)
{
return super.getByteList(path);
}
@Override
public synchronized List<Character> getCharacterList(String path)
{
return super.getCharacterList(path);
}
@Override
public synchronized ConfigurationSection getConfigurationSection(String path)
{
return super.getConfigurationSection(path);
}
@Override
public synchronized double getDouble(String path)
{
return super.getDouble(path);
}
@Override
public synchronized double getDouble(final String path, final double def)
{
return super.getDouble(path, def);
}
@Override
public synchronized List<Double> getDoubleList(String path)
{
return super.getDoubleList(path);
}
@Override
public synchronized List<Float> getFloatList(String path)
{
return super.getFloatList(path);
}
@Override
public synchronized int getInt(String path)
{
return super.getInt(path);
}
@Override
public synchronized int getInt(String path, int def)
{
return super.getInt(path, def);
}
@Override
public synchronized List<Integer> getIntegerList(String path)
{
return super.getIntegerList(path);
}
@Override
public synchronized ItemStack getItemStack(String path, ItemStack def)
{
return super.getItemStack(path, def);
}
@Override
public synchronized Set<String> getKeys(boolean deep)
{
return super.getKeys(deep);
}
@Override
public synchronized List<?> getList(String path)
{
return super.getList(path);
}
@Override
public synchronized List<?> getList(String path, List<?> def)
{
return super.getList(path, def);
}
@Override
public synchronized long getLong(String path)
{
return super.getLong(path);
}
@Override
public synchronized long getLong(final String path, final long def)
{
return super.getLong(path, def);
}
@Override
public synchronized List<Long> getLongList(String path)
{
return super.getLongList(path);
}
public synchronized Map<String, Object> getMap()
{
return map;
}
@Override
public synchronized List<Map<?, ?>> getMapList(String path)
{
return super.getMapList(path);
}
@Override
public synchronized OfflinePlayer getOfflinePlayer(String path)
{
return super.getOfflinePlayer(path);
}
@Override
public synchronized OfflinePlayer getOfflinePlayer(String path, OfflinePlayer def)
{
return super.getOfflinePlayer(path, def);
}
@Override
public synchronized List<Short> getShortList(String path)
{
return super.getShortList(path);
}
@Override
public synchronized String getString(String path)
{
return super.getString(path);
}
@Override
public synchronized String getString(String path, String def)
{
return super.getString(path, def);
}
@Override
public synchronized List<String> getStringList(String path)
{
return super.getStringList(path);
}
@Override
public synchronized Map<String, Object> getValues(boolean deep)
{
return super.getValues(deep);
}
@Override
public synchronized Vector getVector(String path)
{
return super.getVector(path);
}
@Override
public synchronized Vector getVector(String path, Vector def)
{
return super.getVector(path, def);
}
@Override
public synchronized boolean isBoolean(String path)
{
return super.isBoolean(path);
}
@Override
public synchronized boolean isConfigurationSection(String path)
{
return super.isConfigurationSection(path);
}
@Override
public synchronized boolean isDouble(String path)
{
return super.isDouble(path);
}
@Override
public synchronized boolean isInt(String path)
{
return super.isInt(path);
}
@Override
public synchronized boolean isItemStack(String path)
{
return super.isItemStack(path);
}
@Override
public synchronized boolean isList(String path)
{
return super.isList(path);
}
@Override
public synchronized boolean isLong(String path)
{
return super.isLong(path);
}
@Override
public synchronized boolean isOfflinePlayer(String path)
{
return super.isOfflinePlayer(path);
}
@Override
public synchronized boolean isSet(String path)
{
return super.isSet(path);
}
@Override
public synchronized boolean isString(String path)
{
return super.isString(path);
}
@Override
public synchronized boolean isVector(String path)
{
return super.isVector(path);
}
@Override
public synchronized void set(String path, Object value)
{
super.set(path, value);
}
}

View File

@@ -0,0 +1,226 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import net.ess3.api.IEssentials;
import org.bukkit.Material;
import org.bukkit.entity.*;
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 static final Logger LOGGER = Logger.getLogger("Essentials");
private static final transient Pattern powertoolPlayer = Pattern.compile("\\{player\\}");
private final IEssentials ess;
public EssentialsEntityListener(IEssentials ess)
{
this.ess = ess;
}
// This method does something undocumented reguarding certain bucket types #EasterEgg
@EventHandler(priority = EventPriority.LOW)
public void onEntityDamage(final EntityDamageByEntityEvent event)
{
final Entity eAttack = event.getDamager();
final Entity eDefend = event.getEntity();
if (eAttack instanceof Player)
{
final User attacker = ess.getUser((Player)eAttack);
if (eDefend instanceof Player)
{
onPlayerVsPlayerDamage(event, (Player)eDefend, attacker);
}
else if (eDefend instanceof Ageable)
{
final ItemStack hand = attacker.getBase().getItemInHand();
if (hand != null && hand.getType() == Material.MILK_BUCKET)
{
((Ageable)eDefend).setBaby();
hand.setType(Material.BUCKET);
attacker.getBase().setItemInHand(hand);
attacker.getBase().updateInventory();
event.setCancelled(true);
}
}
attacker.updateActivity(true);
}
else if (eAttack instanceof Projectile && eDefend instanceof Player)
{
final Projectile projectile = (Projectile)event.getDamager();
//This should return a ProjectileSource on 1.7.3 beta +
final Object shooter = projectile.getShooter();
if (shooter instanceof Player)
{
final User attacker = ess.getUser((Player)shooter);
onPlayerVsPlayerDamage(event, (Player)eDefend, attacker);
attacker.updateActivity(true);
}
}
}
private void onPlayerVsPlayerDamage(final EntityDamageByEntityEvent event, final Player defender, final User attacker)
{
if (ess.getSettings().getLoginAttackDelay() > 0
&& (System.currentTimeMillis() < (attacker.getLastLogin() + ess.getSettings().getLoginAttackDelay()))
&& !attacker.isAuthorized("essentials.pvpdelay.exempt"))
{
event.setCancelled(true);
}
if (!defender.equals(attacker.getBase()) && (attacker.hasInvulnerabilityAfterTeleport() || ess.getUser(defender).hasInvulnerabilityAfterTeleport()))
{
event.setCancelled(true);
}
if (attacker.isGodModeEnabled() && !attacker.isAuthorized("essentials.god.pvp"))
{
event.setCancelled(true);
}
if (attacker.isHidden() && !attacker.isAuthorized("essentials.vanish.pvp"))
{
event.setCancelled(true);
}
onPlayerVsPlayerPowertool(event, defender, attacker);
}
private void onPlayerVsPlayerPowertool(final EntityDamageByEntityEvent event, final Player defender, final User attacker)
{
final List<String> commandList = attacker.getPowertool(attacker.getBase().getItemInHand());
if (commandList != null && !commandList.isEmpty())
{
for (final String tempCommand : commandList)
{
final String command = powertoolPlayer.matcher(tempCommand).replaceAll(defender.getName());
if (command != null && !command.isEmpty() && !command.equals(tempCommand))
{
class PowerToolInteractTask implements Runnable
{
@Override
public void run()
{
attacker.getServer().dispatchCommand(attacker.getBase(), command);
LOGGER.log(Level.INFO, String.format("[PT] %s issued server command: /%s", attacker.getName(), command));
}
}
ess.scheduleSyncDelayedTask(new PowerToolInteractTask());
event.setCancelled(true);
return;
}
}
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityDamage(final EntityDamageEvent event)
{
if (event.getEntity() instanceof Player && ess.getUser((Player)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((Player)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(tl("backAfterDeath"));
}
if (!ess.getSettings().areDeathMessagesEnabled())
{
event.setDeathMessage("");
}
}
@EventHandler(priority = EventPriority.LOW)
public void onPlayerDeathExpEvent(final PlayerDeathEvent event)
{
final User user = ess.getUser(event.getEntity());
if (user.isAuthorized("essentials.keepxp"))
{
event.setKeepLevel(true);
event.setDroppedExp(0);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onFoodLevelChange(final FoodLevelChangeEvent event)
{
if (event.getEntity() instanceof Player)
{
final User user = ess.getUser((Player)event.getEntity());
if (user.isGodModeEnabled())
{
if (user.isGodModeEnabledRaw())
{
user.getBase().setFoodLevel(20);
user.getBase().setSaturation(10);
}
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((Player)event.getEntity()).isAfk() && ess.getSettings().getFreezeAfkPlayers())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPotionSplashEvent(final PotionSplashEvent event)
{
for (LivingEntity entity : event.getAffectedEntities())
{
if (entity instanceof Player && ess.getUser((Player)entity).isGodModeEnabled())
{
event.setIntensity(entity, 0d);
}
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityShootBow(EntityShootBowEvent event)
{
if (event.getEntity() instanceof Player)
{
final User user = ess.getUser((Player)event.getEntity());
if (user.isAfk())
{
user.updateActivity(true);
}
}
}
}

View File

@@ -0,0 +1,777 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
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 com.earth2me.essentials.utils.LocationUtil;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.IEssentials;
import org.bukkit.GameMode;
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.*;
import org.bukkit.event.player.PlayerLoginEvent.Result;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
public class EssentialsPlayerListener implements Listener
{
private static final Logger LOGGER = Logger.getLogger("Essentials");
private final transient IEssentials ess;
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();
if (ess.getSettings().isTeleportInvulnerability())
{
user.enableInvulnerabilityAfterTeleport();
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerChat(final AsyncPlayerChatEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isMuted())
{
event.setCancelled(true);
user.sendMessage(tl("voiceSilenced"));
LOGGER.info(tl("mutedUserSpeaks", user.getName()));
}
try
{
final Iterator<Player> it = event.getRecipients().iterator();
while (it.hasNext())
{
final User u = ess.getUser(it.next());
if (u.isIgnoredPlayer(user))
{
it.remove();
}
}
}
catch (UnsupportedOperationException ex)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "Ignore could not block chat due to custom chat plugin event.", ex);
}
else
{
ess.getLogger().info("Ignore could not block chat due to custom chat plugin event.");
}
}
user.updateActivity(true);
user.setDisplayNick();
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerMove(final PlayerMoveEvent event)
{
if (event.getFrom().getBlockX() == event.getTo().getBlockX()
&& event.getFrom().getBlockZ() == event.getTo().getBlockZ()
&& event.getFrom().getBlockY() == event.getTo().getBlockY())
{
return;
}
if (!ess.getSettings().cancelAfkOnMove() && !ess.getSettings().getFreezeAfkPlayers())
{
event.getHandlers().unregister(this);
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, "Unregistering move listener");
}
return;
}
final User user = ess.getUser(event.getPlayer());
if (user.isAfk() && ess.getSettings().getFreezeAfkPlayers())
{
final Location from = event.getFrom();
final Location origTo = event.getTo();
final Location to = origTo.clone();
if (ess.getSettings().cancelAfkOnMove() && origTo.getY() >= from.getBlockY() + 1)
{
user.updateActivity(true);
return;
}
to.setX(from.getX());
to.setY(from.getY());
to.setZ(from.getZ());
try
{
event.setTo(LocationUtil.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.HIGHEST)
public void onPlayerQuit(final PlayerQuitEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (ess.getSettings().allowSilentJoinQuit() && user.isAuthorized("essentials.silentquit"))
{
event.setQuitMessage(null);
}
else if (ess.getSettings().isCustomQuitMessage() && event.getQuitMessage() != null)
{
final Player player = event.getPlayer();
event.setQuitMessage(
ess.getSettings().getCustomQuitMessage()
.replace("{PLAYER}", player.getDisplayName())
.replace("{USERNAME}", player.getName()));
}
if (ess.getSettings().removeGodOnDisconnect() && user.isGodModeEnabled())
{
user.setGodModeEnabled(false);
}
if (user.isVanished())
{
user.setVanished(false);
}
user.setLogoutLocation();
if (user.isRecipeSee())
{
user.getBase().getOpenInventory().getTopInventory().clear();
}
for (HumanEntity viewer : user.getBase().getInventory().getViewers())
{
if (viewer instanceof Player)
{
User uviewer = ess.getUser((Player)viewer);
if (uviewer.isInvSee())
{
uviewer.getBase().closeInventory();
}
}
}
user.updateActivity(false);
user.dispose();
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerJoin(final PlayerJoinEvent event)
{
final String joinMessage = event.getJoinMessage();
ess.runTaskAsynchronously(new Runnable()
{
@Override
public void run()
{
delayedJoin(event.getPlayer(), joinMessage);
}
});
if (ess.getSettings().allowSilentJoinQuit() || ess.getSettings().isCustomJoinMessage())
{
event.setJoinMessage(null);
}
}
public void delayedJoin(final Player player, final String message)
{
if (!player.isOnline())
{
return;
}
ess.getBackup().onPlayerJoin();
final User dUser = ess.getUser(player);
if (dUser.isNPC())
{
dUser.setNPC(false);
}
final long currentTime = System.currentTimeMillis();
dUser.checkMuteTimeout(currentTime);
dUser.updateActivity(false);
IText tempInput = null;
if (!ess.getSettings().isCommandDisabled("motd"))
{
try
{
tempInput = new TextInput(dUser.getSource(), "motd", true, ess);
}
catch (IOException ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.WARNING, ex.getMessage(), ex);
}
else
{
LOGGER.log(Level.WARNING, ex.getMessage());
}
}
}
final IText input = tempInput;
class DelayJoinTask implements Runnable
{
@Override
public void run()
{
final User user = ess.getUser(player);
if (!user.getBase().isOnline())
{
return;
}
user.startTransaction();
user.setLastAccountName(user.getBase().getName());
user.setLastLogin(currentTime);
user.setDisplayNick();
updateCompass(user);
if (!ess.getVanishedPlayers().isEmpty() && !user.isAuthorized("essentials.vanish.see"))
{
for (String p : ess.getVanishedPlayers())
{
Player toVanish = ess.getServer().getPlayerExact(p);
if (toVanish != null && toVanish.isOnline())
{
user.getBase().hidePlayer(toVanish);
}
}
}
if (user.isAuthorized("essentials.sleepingignored"))
{
user.getBase().setSleepingIgnored(true);
}
if (ess.getSettings().allowSilentJoinQuit() && (user.isAuthorized("essentials.silentjoin") || user.isAuthorized("essentials.silentjoin.vanish")))
{
if (user.isAuthorized("essentials.silentjoin.vanish"))
{
user.setVanished(true);
}
}
else if (message == null)
{
//NOOP
}
else if (ess.getSettings().isCustomJoinMessage())
{
ess.getServer().broadcastMessage(
ess.getSettings().getCustomJoinMessage()
.replace("{PLAYER}", player.getDisplayName())
.replace("{USERNAME}", player.getName()));
}
else if (ess.getSettings().allowSilentJoinQuit())
{
ess.getServer().broadcastMessage(message);
}
if (input != null && user.isAuthorized("essentials.motd"))
{
final IText output = new KeywordReplacer(input, user.getSource(), ess);
final TextPager pager = new TextPager(output, true);
pager.showPage("1", null, "motd", user.getSource());
}
if (!ess.getSettings().isCommandDisabled("mail") && user.isAuthorized("essentials.mail"))
{
final List<String> mail = user.getMails();
if (mail.isEmpty())
{
user.sendMessage(tl("noNewMail"));
}
else
{
user.sendMessage(tl("youHaveNewMail", mail.size()));
}
}
if (user.isAuthorized("essentials.fly.safelogin"))
{
user.getBase().setFallDistance(0);
if (LocationUtil.shouldFly(user.getLocation()))
{
user.getBase().setAllowFlight(true);
user.getBase().setFlying(true);
user.getBase().sendMessage(tl("flyMode", tl("enabled"), user.getDisplayName()));
}
}
if (!user.isAuthorized("essentials.speed"))
{
user.getBase().setFlySpeed(0.1f);
user.getBase().setWalkSpeed(0.2f);
}
user.stopTransaction();
}
}
ess.scheduleSyncDelayedTask(new DelayJoinTask());
}
// Makes the compass item ingame always point to the first essentials home. #EasterEgg
private void updateCompass(final User user)
{
Location loc = user.getHome(user.getLocation());
if (loc == null)
{
loc = user.getBase().getBedSpawnLocation();
}
if (loc != null)
{
final Location updateLoc = loc;
user.getBase().setCompassTarget(updateLoc);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerLogin(final PlayerLoginEvent event)
{
switch (event.getResult())
{
case KICK_FULL:
final User kfuser = ess.getUser(event.getPlayer());
if (kfuser.isAuthorized("essentials.joinfullserver"))
{
event.allow();
return;
}
event.disallow(Result.KICK_FULL, tl("serverFull"));
break;
default:
break;
}
}
@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 && (event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND))
{
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.getBase().getInventory().addItem(stack);
user.getBase().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.getBase().updateInventory();
}
});
}
}
@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 (ess.getSettings().getSocialSpyCommands().contains(cmd) || ess.getSettings().getSocialSpyCommands().contains("*"))
{
for (User spyer : ess.getOnlineUsers())
{
if (spyer.isSocialSpyEnabled() && !player.equals(spyer.getBase()))
{
spyer.sendMessage(player.getDisplayName() + " : " + event.getMessage());
}
}
}
else if (!cmd.equalsIgnoreCase("afk"))
{
final User user = ess.getUser(player);
user.updateActivity(true);
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerChangedWorldFlyReset(final PlayerChangedWorldEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.getBase().getGameMode() != GameMode.CREATIVE && !user.isAuthorized("essentials.fly"))
{
user.getBase().setFallDistance(0f);
user.getBase().setAllowFlight(false);
}
if (!user.isAuthorized("essentials.speed"))
{
user.getBase().setFlySpeed(0.1f);
user.getBase().setWalkSpeed(0.2f);
}
else
{
if (user.getBase().getFlySpeed() > ess.getSettings().getMaxFlySpeed() && !user.isAuthorized("essentials.speed.bypass"))
{
user.getBase().setFlySpeed((float)ess.getSettings().getMaxFlySpeed());
}
else
{
user.getBase().setFlySpeed(user.getBase().getFlySpeed() * 0.99999f);
}
if (user.getBase().getWalkSpeed() > ess.getSettings().getMaxWalkSpeed() && !user.isAuthorized("essentials.speed.bypass"))
{
user.getBase().setWalkSpeed((float)ess.getSettings().getMaxWalkSpeed());
}
else
{
user.getBase().setWalkSpeed(user.getBase().getWalkSpeed() * 0.99999f);
}
}
}
@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(tl("noGodWorldWarning"));
}
if (!user.getWorld().getName().equals(newWorld))
{
user.sendMessage(tl("currentWorld", newWorld));
}
if (user.isVanished())
{
user.setVanished(user.isAuthorized("essentials.vanish"));
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerInteract(final PlayerInteractEvent event)
{
switch (event.getAction())
{
case RIGHT_CLICK_BLOCK:
if (!event.isCancelled() && event.getClickedBlock().getType() == Material.BED_BLOCK && ess.getSettings().getUpdateBedAtDaytime())
{
User player = ess.getUser(event.getPlayer());
if (player.isAuthorized("essentials.sethome.bed"))
{
player.getBase().setBedSpawnLocation(event.getClickedBlock().getLocation());
player.sendMessage(tl("bedSet", player.getLocation().getWorld().getName(), player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()));
}
}
break;
case LEFT_CLICK_AIR:
if (event.getPlayer().isFlying())
{
final User user = ess.getUser(event.getPlayer());
if (user.isFlyClickJump())
{
useFlyClickJump(user);
return;
}
}
case LEFT_CLICK_BLOCK:
if (event.getItem() != null && event.getItem().getType() != Material.AIR)
{
final User user = ess.getUser(event.getPlayer());
user.updateActivity(true);
if (user.hasPowerTools() && user.arePowerToolsEnabled() && usePowertools(user, event.getItem().getTypeId()))
{
event.setCancelled(true);
}
}
break;
default:
break;
}
}
// This method allows the /jump lock feature to work, allows teleporting while flying #EasterEgg
private void useFlyClickJump(final User user)
{
try
{
final Location otarget = LocationUtil.getTarget(user.getBase());
class DelayedClickJumpTask implements Runnable
{
@Override
public void run()
{
Location loc = user.getLocation();
loc.setX(otarget.getX());
loc.setZ(otarget.getZ());
while (LocationUtil.isBlockDamaging(loc.getWorld(), loc.getBlockX(), loc.getBlockY() - 1, loc.getBlockZ()))
{
loc.setY(loc.getY() + 1d);
}
user.getBase().teleport(loc, TeleportCause.PLUGIN);
}
}
ess.scheduleSyncDelayedTask(new DelayedClickJumpTask());
}
catch (Exception ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.WARNING, ex.getMessage(), ex);
}
}
}
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.getBase().chat(command.substring(2));
}
else
{
used = true;
class PowerToolUseTask implements Runnable
{
@Override
public void run()
{
user.getServer().dispatchCommand(user.getBase(), command);
LOGGER.log(Level.INFO, String.format("[PT] %s issued server command: /%s", user.getName(), command));
}
}
ess.scheduleSyncDelayedTask(new PowerToolUseTask());
}
}
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, ignoreCancelled = true)
public void onInventoryClickEvent(final InventoryClickEvent event)
{
Player refreshPlayer = null;
final Inventory top = event.getView().getTopInventory();
final InventoryType type = top.getType();
if (type == InventoryType.PLAYER)
{
final User user = ess.getUser((Player)event.getWhoClicked());
final InventoryHolder invHolder = top.getHolder();
if (invHolder != null && invHolder instanceof HumanEntity)
{
final User invOwner = ess.getUser((Player)invHolder);
if (user.isInvSee() && (!user.isAuthorized("essentials.invsee.modify")
|| invOwner.isAuthorized("essentials.invsee.preventmodify")
|| !invOwner.getBase().isOnline()))
{
event.setCancelled(true);
refreshPlayer = user.getBase();
}
}
}
else if (type == InventoryType.ENDER_CHEST)
{
final User user = ess.getUser((Player)event.getWhoClicked());
if (user.isEnderSee() && (!user.isAuthorized("essentials.enderchest.modify")))
{
event.setCancelled(true);
refreshPlayer = user.getBase();
}
}
else if (type == InventoryType.WORKBENCH)
{
User user = ess.getUser((Player)event.getWhoClicked());
if (user.isRecipeSee())
{
event.setCancelled(true);
refreshPlayer = user.getBase();
}
}
else if (type == InventoryType.CHEST && top.getSize() == 9)
{
final User user = ess.getUser((Player)event.getWhoClicked());
final InventoryHolder invHolder = top.getHolder();
if (invHolder != null && invHolder instanceof HumanEntity && user.isInvSee())
{
event.setCancelled(true);
refreshPlayer = user.getBase();
}
}
if (refreshPlayer != null)
{
final Player player = refreshPlayer;
ess.scheduleSyncDelayedTask(new Runnable()
{
@Override
public void run()
{
player.updateInventory();
}
}, 1);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onInventoryCloseEvent(final InventoryCloseEvent event)
{
Player refreshPlayer = null;
final Inventory top = event.getView().getTopInventory();
final InventoryType type = top.getType();
if (type == InventoryType.PLAYER)
{
final User user = ess.getUser((Player)event.getPlayer());
user.setInvSee(false);
refreshPlayer = user.getBase();
}
else if (type == InventoryType.ENDER_CHEST)
{
final User user = ess.getUser((Player)event.getPlayer());
user.setEnderSee(false);
refreshPlayer = user.getBase();
}
else if (type == InventoryType.WORKBENCH)
{
final User user = ess.getUser((Player)event.getPlayer());
if (user.isRecipeSee())
{
user.setRecipeSee(false);
event.getView().getTopInventory().clear();
refreshPlayer = user.getBase();
}
}
else if (type == InventoryType.CHEST && top.getSize() == 9)
{
final InventoryHolder invHolder = top.getHolder();
if (invHolder != null && invHolder instanceof HumanEntity)
{
final User user = ess.getUser((Player)event.getPlayer());
user.setInvSee(false);
refreshPlayer = user.getBase();
}
}
if (refreshPlayer != null)
{
final Player player = refreshPlayer;
ess.scheduleSyncDelayedTask(new Runnable()
{
@Override
public void run()
{
player.updateInventory();
}
}, 1);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPlayerFishEvent(final PlayerFishEvent event)
{
final User user = ess.getUser(event.getPlayer());
user.updateActivity(true);
}
}

View File

@@ -0,0 +1,65 @@
package com.earth2me.essentials;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import java.util.logging.Level;
import net.ess3.api.IEssentials;
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)
{
if (event.getPlugin().getName().equals("EssentialsChat"))
{
ess.getSettings().setEssentialsChatActive(true);
}
ess.getPermissionsHandler().checkPermissions();
ess.getAlternativeCommandsHandler().addPlugin(event.getPlugin());
if (!Methods.hasMethod() && Methods.setMethod(ess.getServer().getPluginManager()))
{
ess.getLogger().log(Level.INFO, "Payment method found (" + Methods.getMethod().getLongName() + " version: " + ess.getPaymentMethod().getMethod().getVersion() + ")");
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginDisable(final PluginDisableEvent event)
{
if (event.getPlugin().getName().equals("EssentialsChat"))
{
ess.getSettings().setEssentialsChatActive(false);
}
PermissionsHandler permHandler = ess.getPermissionsHandler();
if (permHandler != null)
{
permHandler.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 && Methods.hasMethod() && Methods.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

@@ -0,0 +1,125 @@
package com.earth2me.essentials;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Set;
import java.util.UUID;
import java.util.logging.Level;
import net.ess3.api.IEssentials;
import org.bukkit.entity.Player;
public class EssentialsTimer implements Runnable
{
private final transient IEssentials ess;
private final transient Set<UUID> onlineUsers = new HashSet<UUID>();
private transient long lastPoll = System.nanoTime();
private final LinkedList<Double> history = new LinkedList<Double>();
private int skip1 = 0;
private int skip2 = 0;
private final long maxTime = 10 * 1000000;
private final long tickInterval = 50;
EssentialsTimer(final IEssentials ess)
{
this.ess = ess;
history.add(20d);
}
@Override
public void run()
{
final long startTime = System.nanoTime();
final long currentTime = System.currentTimeMillis();
long timeSpent = (startTime - lastPoll) / 1000;
if (timeSpent == 0)
{
timeSpent = 1;
}
if (history.size() > 10)
{
history.remove();
}
double tps = tickInterval * 1000000.0 / timeSpent;
if (tps <= 21)
{
history.add(tps);
}
lastPoll = startTime;
int count = 0;
for (Player player : ess.getOnlinePlayers())
{
count++;
if (skip1 > 0)
{
skip1--;
continue;
}
if (count % 10 == 0)
{
if (System.nanoTime() - startTime > maxTime / 2)
{
skip1 = count - 1;
break;
}
}
try
{
final User user = ess.getUser(player);
onlineUsers.add(user.getBase().getUniqueId());
user.setLastOnlineActivity(currentTime);
user.checkActivity();
}
catch (Exception e)
{
ess.getLogger().log(Level.WARNING, "EssentialsTimer Error:", e);
}
}
count = 0;
final Iterator<UUID> iterator = onlineUsers.iterator();
while (iterator.hasNext())
{
count++;
if (skip2 > 0)
{
skip2--;
continue;
}
if (count % 10 == 0)
{
if (System.nanoTime() - startTime > maxTime)
{
skip2 = count - 1;
break;
}
}
final User user = ess.getUser(iterator.next());
if (user.getLastOnlineActivity() < currentTime && user.getLastOnlineActivity() > user.getLastLogout())
{
if (!user.isHidden()) {
user.setLastLogout(user.getLastOnlineActivity());
}
iterator.remove();
continue;
}
user.checkMuteTimeout(currentTime);
user.checkJailTimeout(currentTime);
user.resetInvulnerabilityAfterTeleport();
}
}
public double getAverageTPS()
{
double avg = 0;
for (Double f : history)
{
if (f != null)
{
avg += f;
}
}
return avg / history.size();
}
}

View File

@@ -0,0 +1,781 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.craftbukkit.BanLookup;
import com.earth2me.essentials.craftbukkit.FakeWorld;
import com.earth2me.essentials.settings.Spawns;
import com.earth2me.essentials.storage.YamlStorageWriter;
import com.earth2me.essentials.utils.StringUtil;
import com.google.common.base.Charsets;
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 net.ess3.api.IEssentials;
import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
public class EssentialsUpgrade
{
private final static Logger LOGGER = Logger.getLogger("Essentials");
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 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 (IOException e)
{
LOGGER.log(Level.SEVERE, tl("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(tl("configFileMoveError"));
}
if (!tempFile.renameTo(file))
{
throw new Exception(tl("configFileRenameError"));
}
}
else
{
tempFile.delete();
}
}
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.forceSave();
}
}
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.forceSave();
}
}
catch (RuntimeException ex)
{
LOGGER.log(Level.INFO, "File: " + file.toString());
throw ex;
}
}
doneFile.setProperty("updateUsersHomesFormat", true);
doneFile.save();
}
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 (File listOfFile : listOfFiles)
{
final String filename = listOfFile.getName();
if (!listOfFile.isFile() || !filename.endsWith(".yml"))
{
continue;
}
final String sanitizedFilename = StringUtil.sanitizeFileName(filename.substring(0, filename.length() - 4)) + ".yml";
if (sanitizedFilename.equals(filename))
{
continue;
}
final File tmpFile = new File(listOfFile.getParentFile(), sanitizedFilename + ".tmp");
final File newFile = new File(listOfFile.getParentFile(), sanitizedFilename);
if (!listOfFile.renameTo(tmpFile))
{
LOGGER.log(Level.WARNING, tl("userdataMoveError", filename, sanitizedFilename));
continue;
}
if (newFile.exists())
{
LOGGER.log(Level.WARNING, tl("duplicatedUserdata", filename, sanitizedFilename));
continue;
}
if (!tmpFile.renameTo(newFile))
{
LOGGER.log(Level.WARNING, tl("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(tl("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(tl("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();
}
private void uuidFileChange()
{
if (doneFile.getBoolean("uuidFileChange", false))
{
return;
}
Boolean ignoreUFCache = doneFile.getBoolean("ignore-userfiles-cache", false);
final File userdir = new File(ess.getDataFolder(), "userdata");
if (!userdir.exists())
{
return;
}
int countFiles = 0;
int countReqFiles = 0;
for (String string : userdir.list())
{
if (!string.endsWith(".yml") || string.length() < 5)
{
continue;
}
countFiles++;
final String name = string.substring(0, string.length() - 4);
UUID uuid = null;
try
{
uuid = UUID.fromString(name);
}
catch (IllegalArgumentException ex)
{
countReqFiles++;
}
if (countFiles > 100)
{
break;
}
}
if (countReqFiles < 1)
{
return;
}
ess.getLogger().info("#### Starting Essentials UUID userdata conversion in a few seconds. ####");
ess.getLogger().info("We recommend you take a backup of your server before upgrading from the old username system.");
try
{
Thread.sleep(15000);
}
catch (InterruptedException ex)
{
// NOOP
}
uuidFileConvert(ess, ignoreUFCache);
doneFile.setProperty("uuidFileChange", true);
doneFile.save();
}
public static void uuidFileConvert(IEssentials ess, Boolean ignoreUFCache)
{
ess.getLogger().info("Starting Essentials UUID userdata conversion");
final File userdir = new File(ess.getDataFolder(), "userdata");
if (!userdir.exists())
{
return;
}
int countFiles = 0;
int countFails = 0;
int countEssCache = 0;
int countBukkit = 0;
ess.getLogger().info("Found " + userdir.list().length + " files to convert...");
for (String string : userdir.list())
{
if (!string.endsWith(".yml") || string.length() < 5)
{
continue;
}
final int showProgress = countFiles % 250;
if (showProgress == 0)
{
ess.getUserMap().getUUIDMap().forceWriteUUIDMap();
ess.getLogger().info("Converted " + countFiles + "/" + userdir.list().length);
}
countFiles++;
String name = string.substring(0, string.length() - 4);
EssentialsUserConf config;
UUID uuid = null;
try
{
uuid = UUID.fromString(name);
}
catch (IllegalArgumentException ex)
{
File file = new File(userdir, string);
EssentialsConf conf = new EssentialsConf(file);
conf.load();
conf.setProperty("lastAccountName", name);
conf.save();
String uuidConf = ignoreUFCache ? "force-uuid" : "uuid";
String uuidString = conf.getString(uuidConf, null);
for (int i = 0; i < 4; i++)
{
try
{
uuid = UUID.fromString(uuidString);
countEssCache++;
break;
}
catch (Exception ex2)
{
if (conf.getBoolean("npc", false))
{
uuid = UUID.nameUUIDFromBytes(("NPC:" + name).getBytes(Charsets.UTF_8));
break;
}
org.bukkit.OfflinePlayer player = ess.getServer().getOfflinePlayer(name);
uuid = player.getUniqueId();
}
if (uuid != null)
{
countBukkit++;
break;
}
}
if (uuid != null)
{
conf.forceSave();
config = new EssentialsUserConf(name, uuid, new File(userdir, uuid + ".yml"));
config.convertLegacyFile();
ess.getUserMap().trackUUID(uuid, name, false);
continue;
}
countFails++;
}
}
ess.getUserMap().getUUIDMap().forceWriteUUIDMap();
ess.getLogger().info("Converted " + countFiles + "/" + countFiles + ". Conversion complete.");
ess.getLogger().info("Converted via cache: " + countEssCache + " :: Converted via lookup: " + countBukkit + " :: Failed to convert: " + countFails);
ess.getLogger().info("To rerun the conversion type /essentials uuidconvert");
}
public void banFormatChange()
{
if (doneFile.getBoolean("banFormatChange", false))
{
return;
}
ess.getLogger().info("Starting Essentials ban format conversion");
final File userdir = new File(ess.getDataFolder(), "userdata");
if (!userdir.exists())
{
return;
}
int countFiles = 0;
ess.getLogger().info("Found " + userdir.list().length + " files to convert...");
for (String string : userdir.list())
{
if (!string.endsWith(".yml") || string.length() < 5)
{
continue;
}
final int showProgress = countFiles % 250;
if (showProgress == 0)
{
ess.getLogger().info("Converted " + countFiles + "/" + userdir.list().length);
}
countFiles++;
final File pFile = new File(userdir, string);
final EssentialsConf conf = new EssentialsConf(pFile);
conf.load();
String banReason;
Long banTimeout;
try
{
banReason = conf.getConfigurationSection("ban").getString("reason");
}
catch (NullPointerException n)
{
banReason = null;
}
final String playerName = conf.getString("lastAccountName");
if (playerName != null && playerName.length() > 1 && banReason != null && banReason.length() > 1)
{
try
{
if (conf.getConfigurationSection("ban").contains("timeout"))
{
banTimeout = Long.parseLong(conf.getConfigurationSection("ban").getString("timeout"));
}
else
{
banTimeout = 0L;
}
}
catch (NumberFormatException n)
{
banTimeout = 0L;
}
if (BanLookup.isBanned(ess, playerName))
{
updateBan(playerName, banReason, banTimeout);
}
}
conf.removeProperty("ban");
conf.save();
}
doneFile.setProperty("banFormatChange", true);
doneFile.save();
ess.getLogger().info("Ban format update complete.");
}
private void updateBan(String playerName, String banReason, Long banTimeout)
{
if (banTimeout == 0)
{
Bukkit.getBanList(BanList.Type.NAME).addBan(playerName, banReason, null, Console.NAME);
}
else
{
Bukkit.getBanList(BanList.Type.NAME).addBan(playerName, banReason, new Date(banTimeout), Console.NAME);
}
}
public void beforeSettings()
{
if (!ess.getDataFolder().exists())
{
ess.getDataFolder().mkdirs();
}
moveMotdRulesToFile("motd");
moveMotdRulesToFile("rules");
}
public void afterSettings()
{
sanitizeAllUserFilenames();
updateUsersPowerToolsFormat();
updateUsersHomesFormat();
deleteOldItemsCsv();
updateSpawnsToNewSpawnsConfig();
updateJailsToNewJailsConfig();
uuidFileChange();
banFormatChange();
warnMetrics();
}
}

View File

@@ -0,0 +1,76 @@
package com.earth2me.essentials;
import com.google.common.base.Charsets;
import com.google.common.io.Files;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import java.util.UUID;
import java.util.logging.Level;
import org.bukkit.Bukkit;
public class EssentialsUserConf extends EssentialsConf
{
public final String username;
public final UUID uuid;
public EssentialsUserConf(final String username, final UUID uuid, final File configFile)
{
super(configFile);
this.username = username;
this.uuid = uuid;
}
@Override
public boolean legacyFileExists()
{
final File file = new File(configFile.getParentFile(), username + ".yml");
return file.exists();
}
@Override
public void convertLegacyFile()
{
final File file = new File(configFile.getParentFile(), username + ".yml");
try
{
Files.move(file, new File(configFile.getParentFile(), uuid + ".yml"));
}
catch (IOException ex)
{
Bukkit.getLogger().log(Level.WARNING, "Failed to migrate user: " + username, ex);
}
setProperty("lastAccountName", username);
}
private File getAltFile()
{
final UUID fn = UUID.nameUUIDFromBytes(("OfflinePlayer:" + username.toLowerCase(Locale.ENGLISH)).getBytes(Charsets.UTF_8));
return new File(configFile.getParentFile(), fn.toString() + ".yml");
}
@Override
public boolean altFileExists()
{
if (username.equals(username.toLowerCase()))
{
return false;
}
return getAltFile().exists();
}
@Override
public void convertAltFile()
{
try
{
Files.move(getAltFile(), new File(configFile.getParentFile(), uuid + ".yml"));
}
catch (IOException ex)
{
Bukkit.getLogger().log(Level.WARNING, "Failed to migrate user: " + username, ex);
}
}
}

View File

@@ -0,0 +1,89 @@
package com.earth2me.essentials;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
public class ExecuteTimer
{
private final transient List<ExecuteRecord> times;
private final transient DecimalFormat decimalFormat = new DecimalFormat("#0.000", DecimalFormatSymbols.getInstance(Locale.US));
public ExecuteTimer()
{
times = new ArrayList<ExecuteRecord>();
}
public void start()
{
times.clear();
mark("start");
}
public void mark(final String label)
{
if (!times.isEmpty() || "start".equals(label))
{
times.add(new ExecuteRecord(label, System.nanoTime()));
}
}
public String end()
{
final StringBuilder output = new StringBuilder();
output.append("execution time: ");
String mark;
long time0 = 0;
long time1 = 0;
long time2 = 0;
double duration;
for (ExecuteRecord pair : times)
{
mark = (String)pair.getMark();
time2 = (Long)pair.getTime();
if (time1 > 0)
{
duration = (time2 - time1)/1000000.0;
output.append(mark).append(": ").append(decimalFormat.format(duration)).append("ms - ");
}
else
{
time0 = time2;
}
time1 = time2;
}
duration = (time1 - time0)/1000000.0;
output.append("Total: ").append(decimalFormat.format(duration)).append("ms");
times.clear();
return output.toString();
}
private static class ExecuteRecord
{
private final String mark;
private final long time;
public ExecuteRecord(final String mark, final long time)
{
this.mark = mark;
this.time = time;
}
public String getMark()
{
return mark;
}
public long getTime()
{
return time;
}
}
}

View File

@@ -0,0 +1,218 @@
package com.earth2me.essentials;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.MessageFormat;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import net.ess3.api.IEssentials;
import org.bukkit.Bukkit;
public class I18n implements net.ess3.api.II18n
{
private static I18n instance;
private static final String MESSAGES = "messages";
private final transient Locale defaultLocale = Locale.getDefault();
private transient Locale currentLocale = defaultLocale;
private transient ResourceBundle customBundle;
private transient ResourceBundle localeBundle;
private final transient ResourceBundle defaultBundle;
private transient Map<String, MessageFormat> messageFormatCache = new HashMap<String, MessageFormat>();
private final transient IEssentials ess;
private static final Pattern NODOUBLEMARK = Pattern.compile("''");
private static final ResourceBundle NULL_BUNDLE = new ResourceBundle()
{
public Enumeration<String> getKeys()
{
return null;
}
protected Object handleGetObject(String key)
{
return null;
}
};
public I18n(final IEssentials ess)
{
this.ess = ess;
defaultBundle = ResourceBundle.getBundle(MESSAGES, Locale.ENGLISH);
localeBundle = defaultBundle;
customBundle = NULL_BUNDLE;
}
public void onEnable()
{
instance = this;
}
public void onDisable()
{
instance = null;
}
@Override
public Locale getCurrentLocale()
{
return currentLocale;
}
private String translate(final String string)
{
try
{
try
{
return customBundle.getString(string);
}
catch (MissingResourceException ex)
{
return localeBundle.getString(string);
}
}
catch (MissingResourceException ex)
{
Logger.getLogger("Essentials").log(Level.WARNING, String.format("Missing translation key \"%s\" in translation file %s", ex.getKey(), localeBundle.getLocale().toString()), ex);
return defaultBundle.getString(string);
}
}
public static String tl(final String string, final Object... objects)
{
if (instance == null)
{
return "";
}
if (objects.length == 0)
{
return NODOUBLEMARK.matcher(instance.translate(string)).replaceAll("'");
}
else
{
return instance.format(string, objects);
}
}
public String format(final String string, final Object... objects)
{
String format = translate(string);
MessageFormat messageFormat = messageFormatCache.get(format);
if (messageFormat == null)
{
try
{
messageFormat = new MessageFormat(format);
}
catch (IllegalArgumentException e)
{
ess.getLogger().log(Level.SEVERE, "Invalid Translation key for '" + string + "': " + e.getMessage());
format = format.replaceAll("\\{(\\D*?)\\}", "\\[$1\\]");
messageFormat = new MessageFormat(format);
}
messageFormatCache.put(format, messageFormat);
}
return messageFormat.format(objects);
}
public void updateLocale(final String loc)
{
if (loc != null && !loc.isEmpty())
{
final String[] parts = loc.split("[_\\.]");
if (parts.length == 1)
{
currentLocale = new Locale(parts[0]);
}
if (parts.length == 2)
{
currentLocale = new Locale(parts[0], parts[1]);
}
if (parts.length == 3)
{
currentLocale = new Locale(parts[0], parts[1], parts[2]);
}
}
ResourceBundle.clearCache();
messageFormatCache = new HashMap<String, MessageFormat>();
Logger.getLogger("Essentials").log(Level.INFO, String.format("Using locale %s", currentLocale.toString()));
try
{
localeBundle = ResourceBundle.getBundle(MESSAGES, currentLocale);
}
catch (MissingResourceException ex)
{
localeBundle = NULL_BUNDLE;
}
try
{
customBundle = ResourceBundle.getBundle(MESSAGES, currentLocale, new FileResClassLoader(I18n.class.getClassLoader(), ess));
}
catch (MissingResourceException ex)
{
customBundle = NULL_BUNDLE;
}
}
public static String capitalCase(final String input)
{
return input == null || input.length() == 0
? input
: input.toUpperCase(Locale.ENGLISH).charAt(0)
+ input.toLowerCase(Locale.ENGLISH).substring(1);
}
private static class FileResClassLoader extends ClassLoader
{
private final transient File dataFolder;
FileResClassLoader(final ClassLoader classLoader, final IEssentials ess)
{
super(classLoader);
this.dataFolder = ess.getDataFolder();
}
@Override
public URL getResource(final String string)
{
final File file = new File(dataFolder, string);
if (file.exists())
{
try
{
return file.toURI().toURL();
}
catch (MalformedURLException ex)
{
}
}
return null;
}
@Override
public InputStream getResourceAsStream(final String string)
{
final File file = new File(dataFolder, string);
if (file.exists())
{
try
{
return new FileInputStream(file);
}
catch (FileNotFoundException ex)
{
}
}
return null;
}
}
}

View File

@@ -0,0 +1,6 @@
package com.earth2me.essentials;
public interface IConf
{
public void reloadConfig();
}

View File

@@ -0,0 +1,99 @@
package com.earth2me.essentials;
import com.earth2me.essentials.api.IItemDb;
import com.earth2me.essentials.api.IJails;
import com.earth2me.essentials.api.IWarps;
import com.earth2me.essentials.metrics.Metrics;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import java.util.Collection;
import java.util.List;
import java.util.UUID;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
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);
@Deprecated
User getUser(Object base);
User getUser(UUID base);
User getUser(String base);
User getUser(Player base);
I18n getI18n();
User getOfflineUser(String name);
World getWorld(String name);
int broadcastMessage(String message);
int broadcastMessage(IUser sender, String message);
int broadcastMessage(String permission, String message);
ISettings getSettings();
BukkitScheduler getScheduler();
IJails getJails();
IWarps getWarps();
Worth getWorth();
Backup getBackup();
Methods getPaymentMethod();
BukkitTask runTaskAsynchronously(Runnable run);
BukkitTask runTaskLaterAsynchronously(Runnable run, long delay);
BukkitTask runTaskTimerAsynchronously(Runnable run, long delay, long period);
int scheduleSyncDelayedTask(Runnable run);
int scheduleSyncDelayedTask(Runnable run, long delay);
int scheduleSyncRepeatingTask(Runnable run, long delay, long period);
TNTExplodeListener getTNTListener();
PermissionsHandler getPermissionsHandler();
AlternativeCommandsHandler getAlternativeCommandsHandler();
void showError(CommandSource sender, Throwable exception, String commandLabel);
IItemDb getItemDb();
UserMap getUserMap();
Metrics getMetrics();
void setMetrics(Metrics metrics);
EssentialsTimer getTimer();
List<String> getVanishedPlayers();
Collection<Player> getOnlinePlayers();
Iterable<User> getOnlineUsers();
}

View File

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

View File

@@ -0,0 +1,16 @@
package com.earth2me.essentials;
public interface IReplyTo
{
/**
* Sets the user to reply to
* @param user
*/
public void setReplyTo(CommandSource user);
/**
* Gets the user the sender should reply to
* @return
*/
public CommandSource getReplyTo();
}

View File

@@ -0,0 +1,218 @@
package com.earth2me.essentials;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.signs.EssentialsSign;
import com.earth2me.essentials.textreader.IText;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.ChatColor;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.EventPriority;
public interface ISettings extends IConf
{
boolean areSignsDisabled();
IText getAnnounceNewPlayerFormat();
boolean getAnnounceNewPlayers();
String getNewPlayerKit();
String getBackupCommand();
long getBackupInterval();
String getChatFormat(String group);
int getChatRadius();
char getChatShout();
char getChatQuestion();
BigDecimal getCommandCost(IEssentialsCommand cmd);
BigDecimal getCommandCost(String label);
String getCurrencySymbol();
int getOversizedStackSize();
int getDefaultStackSize();
double getHealCooldown();
Set<String> getSocialSpyCommands();
Map<String, Object> getKit(String name);
ConfigurationSection getKits();
String getLocale();
String getNewbieSpawn();
String getNicknamePrefix();
ChatColor getOperatorColor() throws Exception;
boolean getPerWarpPermission();
boolean getProtectBoolean(final String configName, boolean def);
int getProtectCreeperMaxHeight();
List<Integer> getProtectList(final String configName);
boolean getProtectPreventSpawn(final String creatureName);
String getProtectString(final String configName);
boolean getRespawnAtHome();
Set getMultipleHomes();
int getHomeLimit(String set);
int getHomeLimit(User user);
int getSpawnMobLimit();
BigDecimal getStartingBalance();
boolean isTeleportSafetyEnabled();
double getTeleportCooldown();
double getTeleportDelay();
boolean hidePermissionlessHelp();
boolean isCommandDisabled(final IEssentialsCommand cmd);
boolean isCommandDisabled(String label);
boolean isCommandOverridden(String name);
boolean isDebug();
boolean isEcoDisabled();
boolean isTradeInStacks(int id);
List<Integer> itemSpawnBlacklist();
List<EssentialsSign> enabledSigns();
boolean permissionBasedItemSpawn();
boolean showNonEssCommandsInHelp();
boolean warnOnBuildDisallow();
boolean warnOnSmite();
BigDecimal getMaxMoney();
BigDecimal getMinMoney();
boolean isEcoLogEnabled();
boolean isEcoLogUpdateEnabled();
boolean removeGodOnDisconnect();
boolean changeDisplayName();
boolean changePlayerListName();
boolean isPlayerCommand(String string);
boolean useBukkitPermissions();
boolean addPrefixSuffix();
boolean disablePrefix();
boolean disableSuffix();
long getAutoAfk();
long getAutoAfkKick();
boolean getFreezeAfkPlayers();
boolean cancelAfkOnMove();
boolean cancelAfkOnInteract();
boolean areDeathMessagesEnabled();
void setDebug(boolean debug);
Set<String> getNoGodWorlds();
boolean getUpdateBedAtDaytime();
boolean allowUnsafeEnchantments();
boolean getRepairEnchanted();
boolean isWorldTeleportPermissions();
boolean isWorldHomePermissions();
boolean registerBackInListener();
boolean getDisableItemPickupWhileAfk();
EventPriority getRespawnPriority();
long getTpaAcceptCancellation();
boolean isMetricsEnabled();
void setMetricsEnabled(boolean metricsEnabled);
long getTeleportInvulnerability();
boolean isTeleportInvulnerability();
long getLoginAttackDelay();
int getSignUsePerSecond();
double getMaxFlySpeed();
double getMaxWalkSpeed();
int getMailsPerMinute();
long getEconomyLagWarning();
long getPermissionsLagWarning();
void setEssentialsChatActive(boolean b);
long getMaxTempban();
Map<String, Object> getListGroupConfig();
int getMaxNickLength();
int getMaxUserCacheCount();
boolean allowSilentJoinQuit();
boolean isCustomJoinMessage();
String getCustomJoinMessage();
boolean isCustomQuitMessage();
String getCustomQuitMessage();
}

View File

@@ -0,0 +1,9 @@
package com.earth2me.essentials;
import org.bukkit.Location;
public interface ITarget
{
public Location getLocation();
}

View File

@@ -0,0 +1,144 @@
package com.earth2me.essentials;
import com.earth2me.essentials.commands.IEssentialsCommand;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.ess3.api.ITeleport;
import net.ess3.api.MaxMoneyException;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public interface IUser
{
boolean isAuthorized(String node);
boolean isAuthorized(IEssentialsCommand cmd);
boolean isAuthorized(IEssentialsCommand cmd, String permissionPrefix);
void healCooldown() throws Exception;
void giveMoney(BigDecimal value) throws MaxMoneyException;
void giveMoney(final BigDecimal value, final CommandSource initiator) throws MaxMoneyException;
void payUser(final User reciever, final BigDecimal value) throws Exception;
void takeMoney(BigDecimal value);
void takeMoney(final BigDecimal value, final CommandSource initiator);
boolean canAfford(BigDecimal value);
Boolean canSpawnItem(final int itemId);
void setLastLocation();
void setLogoutLocation();
void requestTeleport(final User player, final boolean here);
ITeleport getTeleport();
BigDecimal getMoney();
void setMoney(final BigDecimal value) throws MaxMoneyException;
void setAfk(final boolean set);
/**
* 'Hidden' Represents when a player is hidden from others. This status includes when the player is hidden via other
* supported plugins. Use isVanished() if you want to check if a user is vanished by Essentials.
*
* @return If the user is hidden or not
* @see isVanished
*/
boolean isHidden();
void setHidden(boolean vanish);
boolean isGodModeEnabled();
String getGroup();
boolean inGroup(final String group);
boolean canBuild();
long getTeleportRequestTime();
void enableInvulnerabilityAfterTeleport();
void resetInvulnerabilityAfterTeleport();
boolean hasInvulnerabilityAfterTeleport();
/**
* 'Vanished' Represents when a player is hidden from others by Essentials. This status does NOT include when the
* player is hidden via other plugins. Use isHidden() if you want to check if a user is vanished by any supported
* plugin.
*
* @return If the user is vanished or not
* @see isHidden
*/
boolean isVanished();
void setVanished(boolean vanish);
boolean isIgnoreExempt();
public void sendMessage(String message);
/*
* UserData
*/
Location getHome(String name) throws Exception;
Location getHome(Location loc) throws Exception;
List<String> getHomes();
void setHome(String name, Location loc);
void delHome(String name) throws Exception;
boolean hasHome();
Location getLastLocation();
Location getLogoutLocation();
long getLastTeleportTimestamp();
void setLastTeleportTimestamp(long time);
String getJail();
void setJail(String jail);
List<String> getMails();
void addMail(String mail);
boolean isAfk();
void setConfigProperty(String node, Object object);
Set<String> getConfigKeys();
Map<String, Object> getConfigMap();
Map<String, Object> getConfigMap(String node);
/*
* PlayerExtension
*/
Player getBase();
CommandSource getSource();
public String getName();
}

View File

@@ -0,0 +1,313 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.NumberUtil;
import com.earth2me.essentials.utils.StringUtil;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.ess3.api.IEssentials;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
public class ItemDb implements IConf, net.ess3.api.IItemDb
{
private final transient IEssentials ess;
private final transient Map<String, Integer> items = new HashMap<String, Integer>();
private final transient Map<ItemData, List<String>> names = new HashMap<ItemData, List<String>>();
private final transient Map<ItemData, String> primaryName = new HashMap<ItemData, String>();
private final transient Map<String, Short> durabilities = new HashMap<String, Short>();
private final transient ManagedFile file;
private final transient Pattern splitPattern = Pattern.compile("((.*)[:+',;.](\\d+))");
public ItemDb(final IEssentials ess)
{
this.ess = ess;
file = new ManagedFile("items.csv", ess);
}
@Override
public void reloadConfig()
{
final List<String> lines = file.getLines();
if (lines.isEmpty())
{
return;
}
durabilities.clear();
items.clear();
names.clear();
primaryName.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]);
final short data = parts.length > 2 && !parts[2].equals("0") ? Short.parseShort(parts[2]) : 0;
String itemName = parts[0].toLowerCase(Locale.ENGLISH);
durabilities.put(itemName, data);
items.put(itemName, numeric);
ItemData itemData = new ItemData(numeric, data);
if (names.containsKey(itemData))
{
List<String> nameList = names.get(itemData);
nameList.add(itemName);
Collections.sort(nameList, new LengthCompare());
}
else
{
List<String> nameList = new ArrayList<String>();
nameList.add(itemName);
names.put(itemData, nameList);
primaryName.put(itemData, itemName);
}
}
}
@Override
public ItemStack get(final String id, final int quantity) throws Exception
{
final ItemStack retval = get(id.toLowerCase(Locale.ENGLISH));
retval.setAmount(quantity);
return retval;
}
@Override
public ItemStack get(final String id) throws Exception
{
int itemid = 0;
String itemname = null;
short metaData = 0;
Matcher parts = splitPattern.matcher(id);
if (parts.matches())
{
itemname = parts.group(2);
metaData = Short.parseShort(parts.group(3));
}
else
{
itemname = id;
}
if (NumberUtil.isInt(itemname))
{
itemid = Integer.parseInt(itemname);
}
else if (NumberUtil.isInt(id))
{
itemid = Integer.parseInt(id);
}
else
{
itemname = itemname.toLowerCase(Locale.ENGLISH);
}
if (itemid < 1)
{
if (items.containsKey(itemname))
{
itemid = items.get(itemname);
if (durabilities.containsKey(itemname) && metaData == 0)
{
metaData = durabilities.get(itemname);
}
}
else if (Material.getMaterial(itemname.toUpperCase(Locale.ENGLISH)) != null)
{
Material bMaterial = Material.getMaterial(itemname.toUpperCase(Locale.ENGLISH));
itemid = bMaterial.getId();
}
else
{
try
{
Material bMaterial = Bukkit.getUnsafe().getMaterialFromInternalName(itemname.toLowerCase(Locale.ENGLISH));
itemid = bMaterial.getId();
}
catch (Throwable throwable)
{
throw new Exception(tl("unknownItemName", itemname), throwable);
}
}
}
if (itemid < 1)
{
throw new Exception(tl("unknownItemName", itemname));
}
final Material mat = Material.getMaterial(itemid);
if (mat == null)
{
throw new Exception(tl("unknownItemId", itemid));
}
final ItemStack retval = new ItemStack(mat);
retval.setAmount(mat.getMaxStackSize());
retval.setDurability(metaData);
return retval;
}
@Override
public List<ItemStack> getMatching(User user, String[] args) throws Exception
{
List<ItemStack> is = new ArrayList<ItemStack>();
if (args.length < 1)
{
is.add(user.getBase().getItemInHand());
}
else if (args[0].equalsIgnoreCase("hand"))
{
is.add(user.getBase().getItemInHand());
}
else if (args[0].equalsIgnoreCase("inventory") || args[0].equalsIgnoreCase("invent") || args[0].equalsIgnoreCase("all"))
{
for (ItemStack stack : user.getBase().getInventory().getContents())
{
if (stack == null || stack.getType() == Material.AIR)
{
continue;
}
is.add(stack);
}
}
else if (args[0].equalsIgnoreCase("blocks"))
{
for (ItemStack stack : user.getBase().getInventory().getContents())
{
if (stack == null || stack.getTypeId() > 255 || stack.getType() == Material.AIR)
{
continue;
}
is.add(stack);
}
}
else
{
is.add(get(args[0]));
}
if (is.isEmpty() || is.get(0).getType() == Material.AIR)
{
throw new Exception(tl("itemSellAir"));
}
return is;
}
@Override
public String names(ItemStack item)
{
ItemData itemData = new ItemData(item.getTypeId(), item.getDurability());
List<String> nameList = names.get(itemData);
if (nameList == null)
{
itemData = new ItemData(item.getTypeId(), (short)0);
nameList = names.get(itemData);
if (nameList == null)
{
return null;
}
}
if (nameList.size() > 15)
{
nameList = nameList.subList(0, 14);
}
return StringUtil.joinList(", ", nameList);
}
@Override
public String name(ItemStack item)
{
ItemData itemData = new ItemData(item.getTypeId(), item.getDurability());
String name = primaryName.get(itemData);
if (name == null)
{
itemData = new ItemData(item.getTypeId(), (short)0);
name = primaryName.get(itemData);
if (name == null)
{
return null;
}
}
return name;
}
static class ItemData
{
final private int itemNo;
final private short itemData;
ItemData(final int itemNo, final short itemData)
{
this.itemNo = itemNo;
this.itemData = itemData;
}
public int getItemNo()
{
return itemNo;
}
public short getItemData()
{
return itemData;
}
@Override
public int hashCode()
{
return (31 * itemNo) ^ itemData;
}
@Override
public boolean equals(Object o)
{
if (o == null)
{
return false;
}
if (!(o instanceof ItemData))
{
return false;
}
ItemData pairo = (ItemData)o;
return this.itemNo == pairo.getItemNo()
&& this.itemData == pairo.getItemData();
}
}
class LengthCompare implements java.util.Comparator<String>
{
public LengthCompare()
{
super();
}
@Override
public int compare(String s1, String s2)
{
return s1.length() - s2.length();
}
}
}

View File

@@ -0,0 +1,340 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.storage.AsyncStorageObjectHolder;
import java.io.File;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.IEssentials;
import net.ess3.api.IUser;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.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 net.ess3.api.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);
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, "Registering Jail listener");
}
}
@Override
public File getStorageFile()
{
return new File(ess.getDataFolder(), "jail.yml");
}
@Override
public void finishRead()
{
checkRegister();
}
@Override
public void finishWrite()
{
checkRegister();
}
public void resetListener()
{
enabled = false;
checkRegister();
}
private void checkRegister()
{
if (enabled == false && getCount() > 0)
{
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(tl("jailNotExist"));
}
Location loc = getData().getJails().get(jailName.toLowerCase(Locale.ENGLISH));
if (loc == null || loc.getWorld() == null)
{
throw new Exception(tl("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.getBase().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 onJailBlockBreak(final BlockBreakEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onJailBlockPlace(final BlockPlaceEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onJailBlockDamage(final BlockDamageEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onJailEntityDamageByEntity(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((Player)damager);
if (user != null && user.isJailed())
{
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onJailPlayerInteract(final PlayerInteractEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onJailPlayerRespawn(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, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onJailPlayerTeleport(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, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
user.sendMessage(tl("jailMessage"));
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onJailPlayerJoin(final PlayerJoinEvent event)
{
final User user = ess.getUser(event.getPlayer());
final long currentTime = System.currentTimeMillis();
user.checkJailTimeout(currentTime);
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, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, tl("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
user.sendMessage(tl("jailMessage"));
}
}
}

View File

@@ -0,0 +1,293 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import static com.earth2me.essentials.I18n.capitalCase;
import com.earth2me.essentials.Trade.OverflowType;
import com.earth2me.essentials.commands.NoChargeException;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.SimpleTextInput;
import com.earth2me.essentials.utils.DateUtil;
import com.earth2me.essentials.utils.NumberUtil;
import java.math.BigDecimal;
import java.util.*;
import java.util.logging.Level;
import net.ess3.api.IEssentials;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.inventory.ItemStack;
public class Kit
{
final IEssentials ess;
final String kitName;
final Map<String, Object> kit;
final Trade charge;
public Kit(final String kitName, final IEssentials ess) throws Exception
{
this.kitName = kitName;
this.ess = ess;
this.kit = ess.getSettings().getKit(kitName);
this.charge = new Trade("kit-" + kitName, new Trade("kit-kit", ess), ess);
if (kit == null)
{
throw new Exception(tl("kitNotFound"));
}
}
//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 kitItem : kits.getKeys(false))
{
if (user == null)
{
list.append(" ").append(capitalCase(kitItem));
}
else if (user.isAuthorized("essentials.kits." + kitItem.toLowerCase(Locale.ENGLISH)))
{
String cost = "";
String name = capitalCase(kitItem);
BigDecimal costPrice = new Trade("kit-" + kitItem.toLowerCase(Locale.ENGLISH), ess).getCommandCost(user);
if (costPrice.signum() > 0)
{
cost = tl("kitCost", NumberUtil.displayCurrency(costPrice, ess));
}
Kit kit = new Kit(kitItem, ess);
if (kit.getNextUse(user) != 0)
{
name = tl("kitDelay", name);
}
list.append(" ").append(name).append(cost);
}
}
return list.toString().trim();
}
catch (Exception ex)
{
throw new Exception(tl("kitError"), ex);
}
}
public String getName()
{
return kitName;
}
public void checkPerms(final User user) throws Exception
{
if (!user.isAuthorized("essentials.kits." + kitName))
{
throw new Exception(tl("noKitPermission", "essentials.kits." + kitName));
}
}
public void checkDelay(final User user) throws Exception
{
long nextUse = getNextUse(user);
if (nextUse == 0L)
{
return;
}
else if (nextUse < 0L)
{
user.sendMessage(tl("kitOnce"));
throw new NoChargeException();
}
else
{
user.sendMessage(tl("kitTimed", DateUtil.formatDateDiff(nextUse)));
throw new NoChargeException();
}
}
public void checkAffordable(final User user) throws Exception
{
charge.isAffordableFor(user);
}
public void setTime(final User user) throws Exception
{
final Calendar time = new GregorianCalendar();
user.setKitTimestamp(kitName, time.getTimeInMillis());
}
public void chargeUser(final User user) throws Exception
{
charge.charge(user);
}
public long getNextUse(final User user) throws Exception
{
if (user.isAuthorized("essentials.kit.exemptdelay"))
{
return 0L;
}
final Calendar time = new GregorianCalendar();
double delay = 0;
try
{
// Make sure delay is valid
delay = kit.containsKey("delay") ? ((Number)kit.get("delay")).doubleValue() : 0.0d;
}
catch (Exception e)
{
throw new Exception(tl("kitError2"));
}
// When was the last kit used?
final long lastTime = user.getKitTimestamp(kitName);
// When can be use the kit again?
final Calendar delayTime = new GregorianCalendar();
delayTime.setTimeInMillis(lastTime);
delayTime.add(Calendar.SECOND, (int)delay);
delayTime.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
if (lastTime == 0L || lastTime > time.getTimeInMillis())
{
// If we have no record of kit use, or its corrupted, give them benifit of the doubt.
return 0L;
}
else if (delay < 0d)
{
// If the kit has a negative kit time, it can only be used once.
return -1;
}
else if (delayTime.before(time))
{
// If the kit was used in the past, but outside the delay time, it can be used.
return 0L;
}
else
{
// If the kit has been used recently, return the next time it can be used.
return delayTime.getTimeInMillis();
}
}
public List<String> getItems(final User user) throws Exception
{
if (kit == null)
{
throw new Exception(tl("kitNotFound"));
}
try
{
final List<String> itemList = new ArrayList<String>();
final Object kitItems = kit.get("items");
if (kitItems instanceof List)
{
for (Object item : (List)kitItems)
{
if (item instanceof String)
{
itemList.add(item.toString());
continue;
}
throw new Exception("Invalid kit item: " + item.toString());
}
return itemList;
}
throw new Exception("Invalid item list");
}
catch (Exception e)
{
ess.getLogger().log(Level.WARNING, "Error parsing kit " + kitName + ": " + e.getMessage());
throw new Exception(tl("kitError2"), e);
}
}
public void expandItems(final User user) throws Exception
{
expandItems(user, getItems(user));
}
public void expandItems(final User user, final List<String> items) throws Exception
{
try
{
IText input = new SimpleTextInput(items);
IText output = new KeywordReplacer(input, user.getSource(), ess);
boolean spew = false;
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments();
for (String kitItem : output.getLines())
{
if (kitItem.startsWith(ess.getSettings().getCurrencySymbol()))
{
BigDecimal value = new BigDecimal(kitItem.substring(ess.getSettings().getCurrencySymbol().length()).trim());
Trade t = new Trade(value, ess);
t.pay(user, OverflowType.DROP);
continue;
}
final String[] parts = kitItem.split(" +");
final ItemStack parseStack = ess.getItemDb().get(parts[0], parts.length > 1 ? Integer.parseInt(parts[1]) : 1);
if (parseStack.getType() == Material.AIR)
{
continue;
}
final MetaItemStack metaStack = new MetaItemStack(parseStack);
if (parts.length > 2)
{
// We pass a null sender here because kits should not do perm checks
metaStack.parseStringMeta(null, allowUnsafe, parts, 2, ess);
}
final Map<Integer, ItemStack> overfilled;
final boolean allowOversizedStacks = user.isAuthorized("essentials.oversizedstacks");
if (allowOversizedStacks)
{
overfilled = InventoryWorkaround.addOversizedItems(user.getBase().getInventory(), ess.getSettings().getOversizedStackSize(), metaStack.getItemStack());
}
else
{
overfilled = InventoryWorkaround.addItems(user.getBase().getInventory(), metaStack.getItemStack());
}
for (ItemStack itemStack : overfilled.values())
{
int spillAmount = itemStack.getAmount();
if (!allowOversizedStacks)
{
itemStack.setAmount(spillAmount < itemStack.getMaxStackSize() ? spillAmount : itemStack.getMaxStackSize());
}
while (spillAmount > 0)
{
user.getWorld().dropItemNaturally(user.getLocation(), itemStack);
spillAmount -= itemStack.getAmount();
}
spew = true;
}
}
user.getBase().updateInventory();
if (spew)
{
user.sendMessage(tl("kitInvFull"));
}
}
catch (Exception e)
{
user.getBase().updateInventory();
ess.getLogger().log(Level.WARNING, e.getMessage());
throw new Exception(tl("kitError2"), e);
}
}
}

View File

@@ -0,0 +1,20 @@
package com.earth2me.essentials;
import org.bukkit.Location;
public class LocationTarget implements ITarget
{
private final Location location;
LocationTarget(Location location)
{
this.location = location;
}
@Override
public Location getLocation()
{
return location;
}
}

View File

@@ -0,0 +1,228 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import java.io.*;
import java.math.BigInteger;
import java.security.DigestInputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import net.ess3.api.IEssentials;
import org.bukkit.Bukkit;
public class ManagedFile
{
private static final int BUFFERSIZE = 1024 * 8;
private final transient File file;
public ManagedFile(final String filename, final IEssentials ess)
{
file = new File(ess.getDataFolder(), filename);
if (file.exists())
{
try
{
if (checkForVersion(file, ess.getDescription().getVersion()) && !file.delete())
{
throw new IOException("Could not delete file " + file.toString());
}
}
catch (IOException ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
if (!file.exists())
{
try
{
copyResourceAscii("/" + filename, file);
}
catch (IOException ex)
{
Bukkit.getLogger().log(Level.SEVERE, tl("itemsCsvNotLoaded"), ex);
}
}
}
public static void copyResourceAscii(final String resourceName, final File file) throws IOException
{
final InputStreamReader reader = new InputStreamReader(ManagedFile.class.getResourceAsStream(resourceName));
try
{
final MessageDigest digest = getDigest();
final DigestOutputStream digestStream = new DigestOutputStream(new FileOutputStream(file), digest);
try
{
final OutputStreamWriter writer = new OutputStreamWriter(digestStream);
try
{
final char[] buffer = new char[BUFFERSIZE];
do
{
final int length = reader.read(buffer);
if (length >= 0)
{
writer.write(buffer, 0, length);
}
else
{
break;
}
}
while (true);
writer.write("\n");
writer.flush();
final BigInteger hashInt = new BigInteger(1, digest.digest());
digestStream.on(false);
digestStream.write('#');
digestStream.write(hashInt.toString(16).getBytes());
}
finally
{
writer.close();
}
}
finally
{
digestStream.close();
}
}
finally
{
reader.close();
}
}
public static boolean checkForVersion(final File file, final String version) throws IOException
{
if (file.length() < 33)
{
return false;
}
final BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
try
{
final byte[] buffer = new byte[(int)file.length()];
int position = 0;
do
{
final int length = bis.read(buffer, position, Math.min((int)file.length() - position, BUFFERSIZE));
if (length < 0)
{
break;
}
position += length;
}
while (position < file.length());
final ByteArrayInputStream bais = new ByteArrayInputStream(buffer);
if (bais.skip(file.length() - 33) != file.length() - 33)
{
return false;
}
final BufferedReader reader = new BufferedReader(new InputStreamReader(bais));
try
{
String hash = reader.readLine();
if (hash != null && hash.matches("#[a-f0-9]{32}"))
{
hash = hash.substring(1);
bais.reset();
final String versionline = reader.readLine();
if (versionline != null && versionline.matches("#version: .+"))
{
final String versioncheck = versionline.substring(10);
if (!versioncheck.equalsIgnoreCase(version))
{
bais.reset();
final MessageDigest digest = getDigest();
final DigestInputStream digestStream = new DigestInputStream(bais, digest);
try
{
final byte[] bytes = new byte[(int)file.length() - 33];
digestStream.read(bytes);
final BigInteger correct = new BigInteger(hash, 16);
final BigInteger test = new BigInteger(1, digest.digest());
if (correct.equals(test))
{
return true;
}
else
{
Bukkit.getLogger().warning("File " + file.toString() + " has been modified by user and file version differs, please update the file manually.");
}
}
finally
{
digestStream.close();
}
}
}
}
}
finally
{
reader.close();
}
}
finally
{
bis.close();
}
return false;
}
public static MessageDigest getDigest() throws IOException
{
try
{
return MessageDigest.getInstance("MD5");
}
catch (NoSuchAlgorithmException ex)
{
throw new IOException(ex);
}
}
public List<String> getLines()
{
try
{
final BufferedReader reader = new BufferedReader(new FileReader(file));
try
{
final List<String> lines = new ArrayList<String>();
do
{
final String line = reader.readLine();
if (line == null)
{
break;
}
else
{
lines.add(line);
}
}
while (true);
return lines;
}
finally
{
reader.close();
}
}
catch (IOException ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
return Collections.emptyList();
}
}
}

View File

@@ -0,0 +1,577 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.textreader.BookInput;
import com.earth2me.essentials.textreader.BookPager;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.utils.FormatUtil;
import com.earth2me.essentials.utils.NumberUtil;
import java.util.*;
import java.util.regex.Pattern;
import com.google.common.base.Joiner;
import java.util.logging.Level;
import net.ess3.api.IEssentials;
import org.bukkit.Color;
import org.bukkit.DyeColor;
import org.bukkit.FireworkEffect;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.*;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
public class MetaItemStack
{
private static final Map<String, DyeColor> colorMap = new HashMap<String, DyeColor>();
private static final Map<String, FireworkEffect.Type> fireworkShape = new HashMap<String, FireworkEffect.Type>();
static
{
for (DyeColor color : DyeColor.values())
{
colorMap.put(color.name(), color);
}
for (FireworkEffect.Type type : FireworkEffect.Type.values())
{
fireworkShape.put(type.name(), type);
}
}
private final transient Pattern splitPattern = Pattern.compile("[:+',;.]");
private ItemStack stack;
private FireworkEffect.Builder builder = FireworkEffect.builder();
private PotionEffectType pEffectType;
private PotionEffect pEffect;
private boolean validFirework = false;
private boolean validPotionEffect = false;
private boolean validPotionDuration = false;
private boolean validPotionPower = false;
private boolean completePotion = false;
private int power = 1;
private int duration = 120;
public MetaItemStack(final ItemStack stack)
{
this.stack = stack.clone();
}
public ItemStack getItemStack()
{
return stack;
}
public boolean isValidFirework()
{
return validFirework;
}
public boolean isValidPotion()
{
return validPotionEffect && validPotionDuration && validPotionPower;
}
public FireworkEffect.Builder getFireworkBuilder()
{
return builder;
}
public PotionEffect getPotionEffect()
{
return pEffect;
}
public boolean completePotion()
{
return completePotion;
}
private void resetPotionMeta()
{
pEffect = null;
pEffectType = null;
validPotionEffect = false;
validPotionDuration = false;
validPotionPower = false;
completePotion = true;
}
public boolean canSpawn(final IEssentials ess)
{
try
{
ess.getServer().getUnsafe().modifyItemStack(stack, "{}");
return true;
}
catch (NullPointerException npe)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "Itemstack is invalid", npe);
}
return false;
}
catch (NoSuchMethodError nsme)
{
return true;
}
catch (Throwable throwable)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "Itemstack is invalid", throwable);
}
return false;
}
}
public void parseStringMeta(final CommandSource sender, final boolean allowUnsafe, String[] string, int fromArg, final IEssentials ess) throws Exception
{
if (string[fromArg].startsWith("{") && hasMetaPermission(sender, "vanilla", false, true, ess))
{
try
{
stack = ess.getServer().getUnsafe().modifyItemStack(stack, Joiner.on(' ').join(Arrays.asList(string).subList(fromArg, string.length)));
}
catch (NullPointerException npe)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "Itemstack is invalid", npe);
}
}
catch (NoSuchMethodError nsme)
{
throw new Exception(tl("noMetaJson"), nsme);
}
catch (Throwable throwable)
{
throw new Exception(throwable.getMessage(), throwable);
}
}
else
{
for (int i = fromArg; i < string.length; i++)
{
addStringMeta(sender, allowUnsafe, string[i], ess);
}
if (validFirework)
{
if (!hasMetaPermission(sender, "firework", true, true, ess))
{
throw new Exception(tl("noMetaFirework"));
}
FireworkEffect effect = builder.build();
FireworkMeta fmeta = (FireworkMeta)stack.getItemMeta();
fmeta.addEffect(effect);
if (fmeta.getEffects().size() > 1 && !hasMetaPermission(sender, "firework-multiple", true, true, ess))
{
throw new Exception(tl("multipleCharges"));
}
stack.setItemMeta(fmeta);
}
}
}
public void addStringMeta(final CommandSource sender, final boolean allowUnsafe, final String string, final IEssentials ess) throws Exception
{
final String[] split = splitPattern.split(string, 2);
if (split.length < 1)
{
return;
}
if (split.length > 1 && split[0].equalsIgnoreCase("name") && hasMetaPermission(sender, "name", false, true, ess))
{
final String displayName = FormatUtil.replaceFormat(split[1].replace('_', ' '));
final ItemMeta meta = stack.getItemMeta();
meta.setDisplayName(displayName);
stack.setItemMeta(meta);
}
else if (split.length > 1 && (split[0].equalsIgnoreCase("lore") || split[0].equalsIgnoreCase("desc")) && hasMetaPermission(sender, "lore", false, true, ess))
{
final List<String> lore = new ArrayList<String>();
for (String line : split[1].split("\\|"))
{
lore.add(FormatUtil.replaceFormat(line.replace('_', ' ')));
}
final ItemMeta meta = stack.getItemMeta();
meta.setLore(lore);
stack.setItemMeta(meta);
}
else if (split.length > 1 && (split[0].equalsIgnoreCase("player") || split[0].equalsIgnoreCase("owner")) && stack.getType() == Material.SKULL_ITEM && hasMetaPermission(sender, "head", false, true, ess))
{
if (stack.getDurability() == 3)
{
final String owner = split[1];
final SkullMeta meta = (SkullMeta)stack.getItemMeta();
meta.setOwner(owner);
stack.setItemMeta(meta);
}
else
{
throw new Exception(tl("onlyPlayerSkulls"));
}
}
else if (split.length > 1 && split[0].equalsIgnoreCase("book") && stack.getType() == Material.WRITTEN_BOOK
&& (hasMetaPermission(sender, "book", true, true, ess) || hasMetaPermission(sender, "chapter-" + split[1].toLowerCase(Locale.ENGLISH), true, true, ess)))
{
final BookMeta meta = (BookMeta)stack.getItemMeta();
final IText input = new BookInput("book", true, ess);
final BookPager pager = new BookPager(input);
List<String> pages = pager.getPages(split[1]);
meta.setPages(pages);
stack.setItemMeta(meta);
}
else if (split.length > 1 && split[0].equalsIgnoreCase("author") && stack.getType() == Material.WRITTEN_BOOK && hasMetaPermission(sender, "author", false, true, ess))
{
final String author = FormatUtil.replaceFormat(split[1]);
final BookMeta meta = (BookMeta)stack.getItemMeta();
meta.setAuthor(author);
stack.setItemMeta(meta);
}
else if (split.length > 1 && split[0].equalsIgnoreCase("title") && stack.getType() == Material.WRITTEN_BOOK && hasMetaPermission(sender, "title", false, true, ess))
{
final String title = FormatUtil.replaceFormat(split[1].replace('_', ' '));
final BookMeta meta = (BookMeta)stack.getItemMeta();
meta.setTitle(title);
stack.setItemMeta(meta);
}
else if (split.length > 1 && split[0].equalsIgnoreCase("power") && stack.getType() == Material.FIREWORK && hasMetaPermission(sender, "firework-power", false, true, ess))
{
final int power = NumberUtil.isInt(split[1]) ? Integer.parseInt(split[1]) : 0;
final FireworkMeta meta = (FireworkMeta)stack.getItemMeta();
meta.setPower(power > 3 ? 4 : power);
stack.setItemMeta(meta);
}
else if (stack.getType() == Material.FIREWORK) //WARNING - Meta for fireworks will be ignored after this point.
{
addFireworkMeta(sender, false, string, ess);
}
else if (stack.getType() == Material.POTION) //WARNING - Meta for potions will be ignored after this point.
{
addPotionMeta(sender, false, string, ess);
}
else if (split.length > 1 && (split[0].equalsIgnoreCase("color") || split[0].equalsIgnoreCase("colour"))
&& (stack.getType() == Material.LEATHER_BOOTS
|| stack.getType() == Material.LEATHER_CHESTPLATE
|| stack.getType() == Material.LEATHER_HELMET
|| stack.getType() == Material.LEATHER_LEGGINGS))
{
final String[] color = split[1].split("(\\||,)");
if (color.length == 3)
{
final int red = NumberUtil.isInt(color[0]) ? Integer.parseInt(color[0]) : 0;
final int green = NumberUtil.isInt(color[1]) ? Integer.parseInt(color[1]) : 0;
final int blue = NumberUtil.isInt(color[2]) ? Integer.parseInt(color[2]) : 0;
final LeatherArmorMeta meta = (LeatherArmorMeta)stack.getItemMeta();
meta.setColor(Color.fromRGB(red, green, blue));
stack.setItemMeta(meta);
}
else
{
throw new Exception(tl("leatherSyntax"));
}
}
else
{
parseEnchantmentStrings(sender, allowUnsafe, split, ess);
}
}
public void addFireworkMeta(final CommandSource sender, final boolean allowShortName, final String string, final IEssentials ess) throws Exception
{
if (stack.getType() == Material.FIREWORK)
{
final String[] split = splitPattern.split(string, 2);
if (split.length < 2)
{
return;
}
if (split[0].equalsIgnoreCase("color") || split[0].equalsIgnoreCase("colour") || (allowShortName && split[0].equalsIgnoreCase("c")))
{
if (validFirework)
{
if (!hasMetaPermission(sender, "firework", true, true, ess))
{
throw new Exception(tl("noMetaFirework"));
}
FireworkEffect effect = builder.build();
FireworkMeta fmeta = (FireworkMeta)stack.getItemMeta();
fmeta.addEffect(effect);
if (fmeta.getEffects().size() > 1 && !hasMetaPermission(sender, "firework-multiple", true, true, ess))
{
throw new Exception(tl("multipleCharges"));
}
stack.setItemMeta(fmeta);
builder = FireworkEffect.builder();
}
List<Color> primaryColors = new ArrayList<Color>();
String[] colors = split[1].split(",");
for (String color : colors)
{
if (colorMap.containsKey(color.toUpperCase()))
{
validFirework = true;
primaryColors.add(colorMap.get(color.toUpperCase()).getFireworkColor());
}
else
{
throw new Exception(tl("invalidFireworkFormat", split[1], split[0]));
}
}
builder.withColor(primaryColors);
}
else if (split[0].equalsIgnoreCase("shape") || split[0].equalsIgnoreCase("type") || (allowShortName && (split[0].equalsIgnoreCase("s") || split[0].equalsIgnoreCase("t"))))
{
FireworkEffect.Type finalEffect = null;
split[1] = (split[1].equalsIgnoreCase("large") ? "BALL_LARGE" : split[1]);
if (fireworkShape.containsKey(split[1].toUpperCase()))
{
finalEffect = fireworkShape.get(split[1].toUpperCase());
}
else
{
throw new Exception(tl("invalidFireworkFormat", split[1], split[0]));
}
if (finalEffect != null)
{
builder.with(finalEffect);
}
}
else if (split[0].equalsIgnoreCase("fade") || (allowShortName && split[0].equalsIgnoreCase("f")))
{
List<Color> fadeColors = new ArrayList<Color>();
String[] colors = split[1].split(",");
for (String color : colors)
{
if (colorMap.containsKey(color.toUpperCase()))
{
fadeColors.add(colorMap.get(color.toUpperCase()).getFireworkColor());
}
else
{
throw new Exception(tl("invalidFireworkFormat", split[1], split[0]));
}
}
if (!fadeColors.isEmpty())
{
builder.withFade(fadeColors);
}
}
else if (split[0].equalsIgnoreCase("effect") || (allowShortName && split[0].equalsIgnoreCase("e")))
{
String[] effects = split[1].split(",");
for (String effect : effects)
{
if (effect.equalsIgnoreCase("twinkle"))
{
builder.flicker(true);
}
else if (effect.equalsIgnoreCase("trail"))
{
builder.trail(true);
}
else
{
throw new Exception(tl("invalidFireworkFormat", split[1], split[0]));
}
}
}
}
}
public void addPotionMeta(final CommandSource sender, final boolean allowShortName, final String string, final IEssentials ess) throws Exception
{
if (stack.getType() == Material.POTION)
{
final String[] split = splitPattern.split(string, 2);
if (split.length < 2)
{
return;
}
if (split[0].equalsIgnoreCase("effect") || (allowShortName && split[0].equalsIgnoreCase("e")))
{
pEffectType = Potions.getByName(split[1]);
if (pEffectType != null && pEffectType.getName() != null)
{
if (hasMetaPermission(sender, "potions." + pEffectType.getName().toLowerCase(Locale.ENGLISH), true, false, ess))
{
validPotionEffect = true;
}
else
{
throw new Exception(tl("noPotionEffectPerm", pEffectType.getName().toLowerCase(Locale.ENGLISH)));
}
}
else
{
throw new Exception(tl("invalidPotionMeta", split[1]));
}
}
else if (split[0].equalsIgnoreCase("power") || (allowShortName && split[0].equalsIgnoreCase("p")))
{
if (NumberUtil.isInt(split[1]))
{
validPotionPower = true;
power = Integer.parseInt(split[1]);
if (power > 0 && power < 4)
{
power -= 1;
}
}
else
{
throw new Exception(tl("invalidPotionMeta", split[1]));
}
}
else if (split[0].equalsIgnoreCase("duration") || (allowShortName && split[0].equalsIgnoreCase("d")))
{
if (NumberUtil.isInt(split[1]))
{
validPotionDuration = true;
duration = Integer.parseInt(split[1]) * 20; //Duration is in ticks by default, converted to seconds
}
else
{
throw new Exception(tl("invalidPotionMeta", split[1]));
}
}
if (isValidPotion())
{
PotionMeta pmeta = (PotionMeta)stack.getItemMeta();
pEffect = pEffectType.createEffect(duration, power);
if (pmeta.getCustomEffects().size() > 1 && !hasMetaPermission(sender, "potions.multiple", true, false, ess))
{
throw new Exception(tl("multiplePotionEffects"));
}
pmeta.addCustomEffect(pEffect, true);
stack.setItemMeta(pmeta);
resetPotionMeta();
}
}
}
private void parseEnchantmentStrings(final CommandSource sender, final boolean allowUnsafe, final String[] split, final IEssentials ess) throws Exception
{
final Enchantment enchantment = Enchantments.getByName(split[0]);
if (enchantment == null || !hasMetaPermission(sender, "enchantments." + enchantment.getName().toLowerCase(Locale.ENGLISH), false, false, ess))
{
return;
}
int level = -1;
if (split.length > 1)
{
try
{
level = Integer.parseInt(split[1]);
}
catch (NumberFormatException ex)
{
level = -1;
}
}
if (level < 0 || (!allowUnsafe && level > enchantment.getMaxLevel()))
{
level = enchantment.getMaxLevel();
}
addEnchantment(sender, allowUnsafe, enchantment, level);
}
public void addEnchantment(final CommandSource sender, final boolean allowUnsafe, final Enchantment enchantment, final int level) throws Exception
{
if (enchantment == null)
{
throw new Exception(tl("enchantmentNotFound"));
}
try
{
if (stack.getType().equals(Material.ENCHANTED_BOOK))
{
EnchantmentStorageMeta meta = (EnchantmentStorageMeta)stack.getItemMeta();
if (level == 0)
{
meta.removeStoredEnchant(enchantment);
}
else
{
meta.addStoredEnchant(enchantment, level, allowUnsafe);
}
stack.setItemMeta(meta);
}
else // all other material types besides ENCHANTED_BOOK
{
if (level == 0)
{
stack.removeEnchantment(enchantment);
}
else
{
if (allowUnsafe)
{
stack.addUnsafeEnchantment(enchantment, level);
}
else
{
stack.addEnchantment(enchantment, level);
}
}
}
}
catch (Exception ex)
{
throw new Exception("Enchantment " + enchantment.getName() + ": " + ex.getMessage(), ex);
}
}
public Enchantment getEnchantment(final User user, final String name) throws Exception
{
final Enchantment enchantment = Enchantments.getByName(name);
if (enchantment == null)
{
return null;
}
final String enchantmentName = enchantment.getName().toLowerCase(Locale.ENGLISH);
if (!hasMetaPermission(user, "enchantments." + enchantmentName, true, false))
{
throw new Exception(tl("enchantmentPerm", enchantmentName));
}
return enchantment;
}
private boolean hasMetaPermission(final CommandSource sender, final String metaPerm, final boolean graceful, final boolean includeBase, final IEssentials ess) throws Exception
{
final User user = sender != null && sender.isPlayer() ? ess.getUser(sender.getPlayer()) : null;
return hasMetaPermission(user, metaPerm, graceful, includeBase);
}
private boolean hasMetaPermission(final User user, final String metaPerm, final boolean graceful, final boolean includeBase) throws Exception
{
final String permBase = includeBase ? "essentials.itemspawn.meta-" : "essentials.";
if (user == null || user.isAuthorized(permBase + metaPerm))
{
return true;
}
if (graceful)
{
return false;
}
else
{
throw new Exception(tl("noMetaPerm", metaPerm));
}
}
}

View File

@@ -0,0 +1,138 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
// Suffixes can be appended on the end of a mob name to make it plural
// Entities without a suffix, will default to 's'
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),
HORSE("Horse", Enemies.FRIENDLY, EntityType.HORSE),
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),
WITHER("Wither", Enemies.ENEMY, EntityType.WITHER),
BAT("Bat", Enemies.FRIENDLY, EntityType.BAT),
WITCH("Witch", Enemies.ENEMY, EntityType.WITCH),
BOAT("Boat", Enemies.NEUTRAL, EntityType.BOAT),
MINECART("Minecart", Enemies.NEUTRAL, EntityType.MINECART),
MINECART_CHEST("ChestMinecart", Enemies.NEUTRAL, EntityType.MINECART_CHEST),
MINECART_FURNACE("FurnaceMinecart", Enemies.NEUTRAL, EntityType.MINECART_FURNACE),
MINECART_TNT("TNTMinecart", Enemies.NEUTRAL, EntityType.MINECART_TNT),
MINECART_HOPPER("HopperMinecart", Enemies.NEUTRAL, EntityType.MINECART_HOPPER),
MINECART_MOB_SPAWNER("SpawnerMinecart", Enemies.NEUTRAL, EntityType.MINECART_MOB_SPAWNER),
ENDERCRYSTAL("EnderCrystal", Enemies.NEUTRAL, EntityType.ENDER_CRYSTAL),
EXPERIENCEORB("ExperienceOrb", Enemies.NEUTRAL, EntityType.EXPERIENCE_ORB);
public static final Logger logger = Logger.getLogger("Essentials");
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>();
private static final Map<EntityType, Mob> bukkitMap = new HashMap<EntityType, Mob>();
static
{
for (Mob mob : Mob.values())
{
hashMap.put(mob.name.toLowerCase(Locale.ENGLISH), mob);
bukkitMap.put(mob.bukkitType, mob);
}
}
public static Set<String> getMobList()
{
return Collections.unmodifiableSet(hashMap.keySet());
}
public Entity spawn(final World world, final Server server, final Location loc) throws MobException
{
final Entity entity = world.spawn(loc, (Class<? extends Entity>)this.bukkitType.getEntityClass());
if (entity == null)
{
logger.log(Level.WARNING, tl("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 Mob fromBukkitType(final EntityType type)
{
return bukkitMap.get(type);
}
public static class MobException extends Exception
{
private static final long serialVersionUID = 1L;
}
}

View File

@@ -0,0 +1,351 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.StringUtil;
import java.util.*;
import java.util.logging.Logger;
import org.bukkit.DyeColor;
import org.bukkit.Material;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.ExperienceOrb;
import org.bukkit.entity.Horse;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Ocelot;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Player;
import org.bukkit.entity.Skeleton;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Tameable;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.Zombie;
import org.bukkit.inventory.EntityEquipment;
import org.bukkit.inventory.ItemStack;
import org.bukkit.material.Colorable;
public enum MobData
{
BABY_AGEABLE("baby", Ageable.class, Data.BABY, true),
ADULT_AGEABLE("adult", Ageable.class, Data.ADULT, true),
BABY_PIG("piglet", EntityType.PIG, Data.BABY, false),
BABY_WOLF("puppy", EntityType.WOLF, Data.BABY, false),
BABY_CHICKEN("chick", EntityType.CHICKEN, Data.BABY, false),
BABY_HORSE("colt", EntityType.HORSE, Data.BABY, false),
BABY_OCELOT("kitten", EntityType.OCELOT, Data.BABY, false),
BABY_SHEEP("lamb", EntityType.SHEEP, Data.BABY, false),
BABY_COW("calf", EntityType.COW.getEntityClass(), Data.BABY, false),
BABY_VILLAGER("child", EntityType.VILLAGER, Data.BABY, false),
TAMED_TAMEABLE("tamed", Tameable.class, Data.TAMED, true),
TAME_TAMEABLE("tame", Tameable.class, Data.TAMED, false),
RANDOM_SHEEP("random", EntityType.SHEEP, Data.COLORABLE, true),
COLORABLE_SHEEP("", StringUtil.joinList(DyeColor.values()).toLowerCase(Locale.ENGLISH), EntityType.SHEEP, Data.COLORABLE, true),
DONKEY_HORSE("donkey", EntityType.HORSE, Horse.Variant.DONKEY, true),
MULE_HORSE("mule", EntityType.HORSE, Horse.Variant.MULE, true),
SKELETON_HORSE("skeleton", EntityType.HORSE, Horse.Variant.SKELETON_HORSE, true),
UNDEAD_HORSE("undead", EntityType.HORSE, Horse.Variant.UNDEAD_HORSE, true),
ZOMBIE_HORSE("zombie", EntityType.HORSE, Horse.Variant.UNDEAD_HORSE, false),
POLKA_HORSE("polka", EntityType.HORSE, Horse.Style.BLACK_DOTS, true),
SOOTY_HORSE("sooty", EntityType.HORSE, Horse.Style.BLACK_DOTS, false),
BLAZE_HORSE("blaze", EntityType.HORSE, Horse.Style.WHITE, true),
SOCKS_HORSE("socks", EntityType.HORSE, Horse.Style.WHITE, false),
LEOPARD_HORSE("leopard", EntityType.HORSE, Horse.Style.WHITE_DOTS, true),
APPALOOSA_HORSE("appaloosa", EntityType.HORSE, Horse.Style.WHITE_DOTS, false),
PAINT_HORSE("paint", EntityType.HORSE, Horse.Style.WHITEFIELD, true),
MILKY_HORSE("milky", EntityType.HORSE, Horse.Style.WHITEFIELD, false),
SPLOTCHY_HORSE("splotchy", EntityType.HORSE, Horse.Style.WHITEFIELD, false),
BLACK_HORSE("black", EntityType.HORSE, Horse.Color.BLACK, true),
CHESTNUT_HORSE("chestnut", EntityType.HORSE, Horse.Color.CHESTNUT, true),
LIVER_HORSE("liver", EntityType.HORSE, Horse.Color.CHESTNUT, false),
CREAMY_HORSE("creamy", EntityType.HORSE, Horse.Color.CREAMY, true),
FLAXEN_HORSE("flaxen", EntityType.HORSE, Horse.Color.CREAMY, false),
GRAY_HORSE("gray", EntityType.HORSE, Horse.Color.GRAY, true),
DAPPLE_HORSE("dapple", EntityType.HORSE, Horse.Color.GRAY, false),
BUCKSKIN_HORSE("buckskin", EntityType.HORSE, Horse.Color.DARK_BROWN, true),
DARKBROWN_HORSE("darkbrown", EntityType.HORSE, Horse.Color.DARK_BROWN, false),
DARK_HORSE("dark", EntityType.HORSE, Horse.Color.DARK_BROWN, false),
DBROWN_HORSE("dbrown", EntityType.HORSE, Horse.Color.DARK_BROWN, false),
BAY_HORSE("bay", EntityType.HORSE, Horse.Color.BROWN, true),
BROWN_HORSE("brown", EntityType.HORSE, Horse.Color.BROWN, false),
CHEST_HORSE("chest", EntityType.HORSE, Data.CHEST, true),
SADDLE_HORSE("saddle", EntityType.HORSE, Data.HORSESADDLE, true),
GOLD_ARMOR_HORSE("goldarmor", EntityType.HORSE, Material.GOLD_BARDING, true),
DIAMOND_ARMOR_HORSE("diamondarmor", EntityType.HORSE, Material.DIAMOND_BARDING, true),
ARMOR_HORSE("armor", EntityType.HORSE, Material.IRON_BARDING, true),
SIAMESE_CAT("siamese", EntityType.OCELOT, Ocelot.Type.SIAMESE_CAT, true),
WHITE_CAT("white", EntityType.OCELOT, Ocelot.Type.SIAMESE_CAT, false),
RED_CAT("red", EntityType.OCELOT, Ocelot.Type.RED_CAT, true),
ORANGE_CAT("orange", EntityType.OCELOT, Ocelot.Type.RED_CAT, false),
TABBY_CAT("tabby", EntityType.OCELOT, Ocelot.Type.RED_CAT, false),
BLACK_CAT("black", EntityType.OCELOT, Ocelot.Type.BLACK_CAT, true),
TUXEDO_CAT("tuxedo", EntityType.OCELOT, Ocelot.Type.BLACK_CAT, false),
VILLAGER_ZOMBIE("villager", EntityType.ZOMBIE.getEntityClass(), Data.VILLAGER, true),
BABY_ZOMBIE("baby", EntityType.ZOMBIE.getEntityClass(), Data.BABYZOMBIE, true),
ADULT_ZOMBIE("adult", EntityType.ZOMBIE.getEntityClass(), Data.ADULTZOMBIE, true),
DIAMOND_SWORD_ZOMBIE("diamondsword", EntityType.ZOMBIE.getEntityClass(), Material.DIAMOND_SWORD, true),
GOLD_SWORD_ZOMBIE("goldsword", EntityType.ZOMBIE.getEntityClass(), Material.GOLD_SWORD, true),
IRON_SWORD_ZOMBIE("ironsword", EntityType.ZOMBIE.getEntityClass(), Material.IRON_SWORD, true),
STONE_SWORD_ZOMBIE("stonesword", EntityType.ZOMBIE.getEntityClass(), Material.STONE_SWORD, false),
SWORD_ZOMBIE("sword", EntityType.ZOMBIE.getEntityClass(), Material.STONE_SWORD, true),
DIAMOND_SWORD_SKELETON("diamondsword", EntityType.SKELETON, Material.DIAMOND_SWORD, true),
GOLD_SWORD_SKELETON("goldsword", EntityType.SKELETON, Material.GOLD_SWORD, true),
IRON_SWORD_SKELETON("ironsword", EntityType.SKELETON, Material.IRON_SWORD, true),
STONE_SWORD_SKELETON("stonesword", EntityType.SKELETON, Material.STONE_SWORD, false),
SWORD_SKELETON("sword", EntityType.SKELETON, Material.STONE_SWORD, true),
BOW_SKELETON("bow", EntityType.SKELETON, Material.BOW, true),
WHITHER_SKELETON("wither", EntityType.SKELETON, Data.WITHER, true),
POWERED_CREEPER("powered", EntityType.CREEPER, Data.ELECTRIFIED, true),
ELECTRIC_CREEPER("electric", EntityType.CREEPER, Data.ELECTRIFIED, false),
CHARGED_CREEPER("charged", EntityType.CREEPER, Data.ELECTRIFIED, false),
SADDLE_PIG("saddle", EntityType.PIG, Data.PIGSADDLE, true),
ANGRY_WOLF("angry", EntityType.WOLF, Data.ANGRY, true),
RABID_WOLF("rabid", EntityType.WOLF, Data.ANGRY, false),
FARMER_VILLAGER("farmer", EntityType.VILLAGER, Villager.Profession.FARMER, true),
LIBRARIAN_VILLAGER("librarian", EntityType.VILLAGER, Villager.Profession.LIBRARIAN, true),
PRIEST_VILLAGER("priest", EntityType.VILLAGER, Villager.Profession.PRIEST, true),
FATHER_VILLAGER("father", EntityType.VILLAGER, Villager.Profession.PRIEST, false),
SMITH_VILLAGER("smith", EntityType.VILLAGER, Villager.Profession.BLACKSMITH, true),
BUTCHER_VILLAGER("butcher", EntityType.VILLAGER, Villager.Profession.BUTCHER, true),
SIZE_SLIME("", "<1-100>", EntityType.SLIME.getEntityClass(), Data.SIZE, true),
NUM_EXPERIENCE_ORB("", "<1-2000000000>", EntityType.EXPERIENCE_ORB, Data.EXP, true);
public enum Data
{
ADULT,
BABY,
CHEST,
ADULTZOMBIE,
BABYZOMBIE,
VILLAGER,
HORSESADDLE,
PIGSADDLE,
ELECTRIFIED,
WITHER,
ANGRY,
TAMED,
COLORABLE,
EXP,
SIZE;
}
public static final Logger logger = Logger.getLogger("Essentials");
private MobData(String n, Object type, Object value, boolean isPublic)
{
this.nickname = n;
this.matched = n;
this.helpMessage = n;
this.type = type;
this.value = value;
this.isPublic = isPublic;
}
private MobData(String n, String h, Object type, Object value, boolean isPublic)
{
this.nickname = n;
this.matched = n;
this.helpMessage = h;
this.type = type;
this.value = value;
this.isPublic = isPublic;
}
final private String nickname;
final private String helpMessage;
final private Object type;
final private Object value;
final private boolean isPublic;
private String matched;
public static LinkedHashMap<String, MobData> getPossibleData(final Entity spawned, boolean publicOnly)
{
LinkedHashMap<String, MobData> mobList = new LinkedHashMap<String, MobData>();
for (MobData data : MobData.values())
{
if (data.type instanceof EntityType && spawned.getType().equals(data.type) && ((publicOnly && data.isPublic) || !publicOnly))
{
mobList.put(data.nickname.toLowerCase(Locale.ENGLISH), data);
}
else if (data.type instanceof Class && ((Class)data.type).isAssignableFrom(spawned.getClass()) && ((publicOnly && data.isPublic) || !publicOnly))
{
mobList.put(data.nickname.toLowerCase(Locale.ENGLISH), data);
}
}
return mobList;
}
public static List<String> getValidHelp(final Entity spawned)
{
List<String> output = new ArrayList<String>();
LinkedHashMap<String, MobData> posData = getPossibleData(spawned, true);
for (MobData data : posData.values())
{
output.add(data.helpMessage);
}
return output;
}
public static MobData fromData(final Entity spawned, final String name)
{
if (name.isEmpty())
{
return null;
}
LinkedHashMap<String, MobData> posData = getPossibleData(spawned, false);
for (String data : posData.keySet())
{
if (name.contains(data))
{
return posData.get(data);
}
}
return null;
}
public String getMatched()
{
return this.matched;
}
public void setData(final Entity spawned, final Player target, final String rawData) throws Exception
{
if (this.value.equals(Data.ANGRY))
{
((Wolf)spawned).setAngry(true);
}
else if (this.value.equals(Data.ADULT))
{
((Ageable)spawned).setAdult();
}
else if (this.value.equals(Data.BABY))
{
((Ageable)spawned).setBaby();
}
else if (this.value.equals(Data.ADULTZOMBIE))
{
((Zombie)spawned).setBaby(false);
}
else if (this.value.equals(Data.BABYZOMBIE))
{
((Zombie)spawned).setBaby(true);
}
else if (this.value.equals(Data.CHEST))
{
((Horse)spawned).setTamed(true);
((Horse)spawned).setCarryingChest(true);
}
else if (this.value.equals(Data.ELECTRIFIED))
{
((Creeper)spawned).setPowered(true);
}
else if (this.value.equals(Data.HORSESADDLE))
{
final Horse horse = ((Horse)spawned);
horse.setTamed(true);
horse.setOwner(target);
horse.getInventory().setSaddle(new ItemStack(Material.SADDLE, 1));
}
else if (this.value.equals(Data.PIGSADDLE))
{
((Pig)spawned).setSaddle(true);
}
else if (this.value.equals(Data.TAMED))
{
final Tameable tameable = ((Tameable)spawned);
tameable.setTamed(true);
tameable.setOwner(target);
}
else if (this.value.equals(Data.VILLAGER))
{
((Zombie)spawned).setVillager(this.value.equals(Data.VILLAGER));
}
else if (this.value.equals(Data.WITHER))
{
((Skeleton)spawned).setSkeletonType(Skeleton.SkeletonType.WITHER);
}
else if (this.value.equals(Data.COLORABLE))
{
final String color = rawData.toUpperCase(Locale.ENGLISH);
try
{
if (color.equals("RANDOM"))
{
final Random rand = new Random();
((Colorable)spawned).setColor(DyeColor.values()[rand.nextInt(DyeColor.values().length)]);
}
else if (!color.isEmpty())
{
((Colorable)spawned).setColor(DyeColor.valueOf(color));
}
this.matched = rawData;
}
catch (Exception e)
{
throw new Exception(tl("sheepMalformedColor"), e);
}
}
else if (this.value.equals(Data.EXP))
{
try
{
((ExperienceOrb)spawned).setExperience(Integer.parseInt(rawData));
this.matched = rawData;
}
catch (NumberFormatException e)
{
throw new Exception(tl("invalidNumber"), e);
}
}
else if (this.value.equals(Data.SIZE))
{
try
{
((Slime)spawned).setSize(Integer.parseInt(rawData));
this.matched = rawData;
}
catch (NumberFormatException e)
{
throw new Exception(tl("slimeMalformedSize"), e);
}
}
else if (this.value instanceof Horse.Color)
{
((Horse)spawned).setColor((Horse.Color)this.value);
}
else if (this.value instanceof Horse.Style)
{
((Horse)spawned).setStyle((Horse.Style)this.value);
}
else if (this.value instanceof Horse.Variant)
{
((Horse)spawned).setVariant((Horse.Variant)this.value);
}
else if (this.value instanceof Ocelot.Type)
{
((Ocelot)spawned).setCatType((Ocelot.Type)this.value);
}
else if (this.value instanceof Villager.Profession)
{
((Villager)spawned).setProfession((Villager.Profession)this.value);
}
else if (this.value instanceof Material)
{
if (this.type.equals(EntityType.HORSE))
{
((Horse)spawned).setTamed(true);
((Horse)spawned).getInventory().setArmor(new ItemStack((Material)this.value, 1));
}
else if (this.type.equals(EntityType.ZOMBIE.getEntityClass()) || this.type.equals(EntityType.SKELETON))
{
final EntityEquipment invent = ((LivingEntity)spawned).getEquipment();
invent.setItemInHand(new ItemStack((Material)this.value, 1));
invent.setItemInHandDropChance(0.1f);
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
package com.earth2me.essentials;
import lombok.Delegate;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.World;
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
{
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;
}
public Server getServer()
{
return base.getServer();
}
public World getWorld() {
return base.getWorld();
}
public Location getLocation() {
return base.getLocation();
}
}

View File

@@ -0,0 +1,156 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.FormatUtil;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import org.bukkit.Server;
import org.bukkit.entity.Player;
public class PlayerList
{
// Cosmetic list formatting
public static String listUsers(final IEssentials ess, final List<User> users, final String seperator)
{
final StringBuilder groupString = new StringBuilder();
Collections.sort(users);
boolean needComma = false;
for (User user : users)
{
if (needComma)
{
groupString.append(seperator);
}
needComma = true;
if (user.isAfk())
{
groupString.append(tl("listAfkTag"));
}
if (user.isHidden())
{
groupString.append(tl("listHiddenTag"));
}
user.setDisplayNick();
groupString.append(user.getDisplayName());
groupString.append("\u00a7f");
}
return groupString.toString();
}
// Produce a user summary: There are 5 out of maximum 10 players online.
public static String listSummary(final IEssentials ess, final User user, final boolean showHidden)
{
Server server = ess.getServer();
int playerHidden = 0;
int hiddenCount = 0;
for (User onlinePlayer : ess.getOnlineUsers())
{
if (onlinePlayer.isHidden() || (user != null && !user.getBase().canSee(onlinePlayer.getBase())))
{
playerHidden++;
if (showHidden || user.getBase().canSee(onlinePlayer.getBase()))
{
hiddenCount++;
}
}
}
String online;
if (hiddenCount > 0)
{
online = tl("listAmountHidden", ess.getOnlinePlayers().size() - playerHidden, hiddenCount, server.getMaxPlayers());
}
else
{
online = tl("listAmount", ess.getOnlinePlayers().size() - playerHidden, server.getMaxPlayers());
}
return online;
}
// Build the basic player list, divided by groups.
public static Map<String, List<User>> getPlayerLists(final IEssentials ess, final User sender, final boolean showHidden)
{
Server server = ess.getServer();
final Map<String, List<User>> playerList = new HashMap<String, List<User>>();
for (User onlineUser : ess.getOnlineUsers())
{
if ((sender == null && !showHidden && onlineUser.isHidden()) ||
(sender != null && !showHidden && !sender.getBase().canSee(onlineUser.getBase())))
{
continue;
}
final String group = FormatUtil.stripFormat(FormatUtil.stripEssentialsFormat(onlineUser.getGroup().toLowerCase()));
List<User> list = playerList.get(group);
if (list == null)
{
list = new ArrayList<User>();
playerList.put(group, list);
}
list.add(onlineUser);
}
return playerList;
}
// Handle the merging of groups
public static List<User> getMergedList(final IEssentials ess, final Map<String, List<User>> playerList, final String groupName)
{
final Set<String> configGroups = ess.getSettings().getListGroupConfig().keySet();
final List<User> users = new ArrayList<User>();
for (String configGroup : configGroups)
{
if (configGroup.equalsIgnoreCase(groupName))
{
String[] groupValues = ess.getSettings().getListGroupConfig().get(configGroup).toString().trim().split(" ");
for (String groupValue : groupValues)
{
groupValue = groupValue.toLowerCase(Locale.ENGLISH);
if (groupValue == null || groupValue.isEmpty())
{
continue;
}
List<User> u = playerList.get(groupValue.trim());
if (u == null || u.isEmpty())
{
continue;
}
playerList.remove(groupValue);
users.addAll(u);
}
}
}
return users;
}
// Output a playerlist of just a single group, /list <groupname>
public static String listGroupUsers(final IEssentials ess, final Map<String, List<User>> playerList, final String groupName) throws Exception
{
final List<User> users = getMergedList(ess, playerList, groupName);
final List<User> groupUsers = playerList.get(groupName);
if (groupUsers != null && !groupUsers.isEmpty())
{
users.addAll(groupUsers);
}
if (users == null || users.isEmpty())
{
throw new Exception(tl("groupDoesNotExist"));
}
final StringBuilder displayGroupName = new StringBuilder();
displayGroupName.append(Character.toTitleCase(groupName.charAt(0)));
displayGroupName.append(groupName.substring(1));
return outputFormat(displayGroupName.toString(), listUsers(ess, users, ", "));
}
// Build the output string
public static String outputFormat(final String group, final String message)
{
final StringBuilder outputString = new StringBuilder();
outputString.append(tl("listGroupTag", FormatUtil.replaceFormat(group)));
outputString.append(message);
return outputString.toString();
}
}

View File

@@ -0,0 +1,22 @@
package com.earth2me.essentials;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public class PlayerTarget implements ITarget
{
private final String name;
public PlayerTarget(Player entity)
{
this.name = entity.getName();
}
@Override
public Location getLocation()
{
return Bukkit.getServer().getPlayerExact(name).getLocation();
}
}

View File

@@ -0,0 +1,145 @@
package com.earth2me.essentials;
import com.earth2me.essentials.utils.NumberUtil;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.bukkit.potion.PotionEffectType;
public class Potions
{
private static final Map<String, PotionEffectType> POTIONS = new HashMap<String, PotionEffectType>();
private static final Map<String, PotionEffectType> ALIASPOTIONS = new HashMap<String, PotionEffectType>();
static
{
POTIONS.put("speed", PotionEffectType.SPEED);
ALIASPOTIONS.put("fast", PotionEffectType.SPEED);
ALIASPOTIONS.put("runfast", PotionEffectType.SPEED);
ALIASPOTIONS.put("sprint", PotionEffectType.SPEED);
ALIASPOTIONS.put("swift", PotionEffectType.SPEED);
POTIONS.put("slowness", PotionEffectType.SLOW);
ALIASPOTIONS.put("slow", PotionEffectType.SLOW);
ALIASPOTIONS.put("sluggish", PotionEffectType.SLOW);
POTIONS.put("haste", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("superpick", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("quickmine", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("digspeed", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("digfast", PotionEffectType.FAST_DIGGING);
ALIASPOTIONS.put("sharp", PotionEffectType.FAST_DIGGING);
POTIONS.put("fatigue", PotionEffectType.SLOW_DIGGING);
ALIASPOTIONS.put("slow", PotionEffectType.SLOW_DIGGING);
ALIASPOTIONS.put("dull", PotionEffectType.SLOW_DIGGING);
POTIONS.put("strength", PotionEffectType.INCREASE_DAMAGE);
ALIASPOTIONS.put("strong", PotionEffectType.INCREASE_DAMAGE);
ALIASPOTIONS.put("bull", PotionEffectType.INCREASE_DAMAGE);
ALIASPOTIONS.put("attack", PotionEffectType.INCREASE_DAMAGE);
POTIONS.put("heal", PotionEffectType.HEAL);
ALIASPOTIONS.put("healthy", PotionEffectType.HEAL);
ALIASPOTIONS.put("instaheal", PotionEffectType.HEAL);
POTIONS.put("harm", PotionEffectType.HARM);
ALIASPOTIONS.put("harming", PotionEffectType.HARM);
ALIASPOTIONS.put("injure", PotionEffectType.HARM);
ALIASPOTIONS.put("damage", PotionEffectType.HARM);
ALIASPOTIONS.put("inflict", PotionEffectType.HARM);
POTIONS.put("jump", PotionEffectType.JUMP);
ALIASPOTIONS.put("leap", PotionEffectType.JUMP);
POTIONS.put("nausea", PotionEffectType.CONFUSION);
ALIASPOTIONS.put("sick", PotionEffectType.CONFUSION);
ALIASPOTIONS.put("sickness", PotionEffectType.CONFUSION);
ALIASPOTIONS.put("confusion", PotionEffectType.CONFUSION);
POTIONS.put("regeneration", PotionEffectType.REGENERATION);
ALIASPOTIONS.put("regen", PotionEffectType.REGENERATION);
POTIONS.put("resistance", PotionEffectType.DAMAGE_RESISTANCE);
ALIASPOTIONS.put("dmgresist", PotionEffectType.DAMAGE_RESISTANCE);
ALIASPOTIONS.put("armor", PotionEffectType.DAMAGE_RESISTANCE);
POTIONS.put("fireresist", PotionEffectType.FIRE_RESISTANCE);
ALIASPOTIONS.put("fireresistance", PotionEffectType.FIRE_RESISTANCE);
ALIASPOTIONS.put("resistfire", PotionEffectType.FIRE_RESISTANCE);
POTIONS.put("waterbreath", PotionEffectType.WATER_BREATHING);
ALIASPOTIONS.put("waterbreathing", PotionEffectType.WATER_BREATHING);
POTIONS.put("invisibility", PotionEffectType.INVISIBILITY);
ALIASPOTIONS.put("invisible", PotionEffectType.INVISIBILITY);
ALIASPOTIONS.put("invis", PotionEffectType.INVISIBILITY);
ALIASPOTIONS.put("vanish", PotionEffectType.INVISIBILITY);
ALIASPOTIONS.put("disappear", PotionEffectType.INVISIBILITY);
POTIONS.put("blindness", PotionEffectType.BLINDNESS);
ALIASPOTIONS.put("blind", PotionEffectType.BLINDNESS);
POTIONS.put("nightvision", PotionEffectType.NIGHT_VISION);
ALIASPOTIONS.put("vision", PotionEffectType.NIGHT_VISION);
POTIONS.put("hunger", PotionEffectType.HUNGER);
ALIASPOTIONS.put("hungry", PotionEffectType.HUNGER);
ALIASPOTIONS.put("starve", PotionEffectType.HUNGER);
POTIONS.put("weakness", PotionEffectType.WEAKNESS);
ALIASPOTIONS.put("weak", PotionEffectType.WEAKNESS);
POTIONS.put("poison", PotionEffectType.POISON);
ALIASPOTIONS.put("venom", PotionEffectType.POISON);
POTIONS.put("wither", PotionEffectType.WITHER);
ALIASPOTIONS.put("decay", PotionEffectType.WITHER);
POTIONS.put("healthboost", PotionEffectType.HEALTH_BOOST);
ALIASPOTIONS.put("boost", PotionEffectType.HEALTH_BOOST);
POTIONS.put("absorption", PotionEffectType.ABSORPTION);
ALIASPOTIONS.put("absorb", PotionEffectType.ABSORPTION);
POTIONS.put("saturation", PotionEffectType.SATURATION);
ALIASPOTIONS.put("food", PotionEffectType.SATURATION);
POTIONS.put("waterbreathing", PotionEffectType.WATER_BREATHING);
ALIASPOTIONS.put("underwaterbreathing", PotionEffectType.WATER_BREATHING);
ALIASPOTIONS.put("waterbreath", PotionEffectType.WATER_BREATHING);
ALIASPOTIONS.put("underwaterbreath", PotionEffectType.WATER_BREATHING);
ALIASPOTIONS.put("air", PotionEffectType.WATER_BREATHING);
}
public static PotionEffectType getByName(String name)
{
PotionEffectType peffect;
if (NumberUtil.isInt(name))
{
peffect = PotionEffectType.getById(Integer.parseInt(name));
}
else
{
peffect = PotionEffectType.getByName(name.toUpperCase(Locale.ENGLISH));
}
if (peffect == null)
{
peffect = POTIONS.get(name.toLowerCase(Locale.ENGLISH));
}
if (peffect == null)
{
peffect = ALIASPOTIONS.get(name.toLowerCase(Locale.ENGLISH));
}
return peffect;
}
public static Set<Entry<String, PotionEffectType>> entrySet()
{
return POTIONS.entrySet();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,323 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.Mob.MobException;
import com.earth2me.essentials.utils.LocationUtil;
import com.earth2me.essentials.utils.StringUtil;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import net.ess3.api.IEssentials;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
import org.bukkit.entity.*;
import org.bukkit.inventory.EntityEquipment;
import org.bukkit.inventory.ItemStack;
public class SpawnMob
{
public static String mobList(final User user)
{
final Set<String> mobList = Mob.getMobList();
final Set<String> availableList = new HashSet<String>();
for (String mob : mobList)
{
if (user.isAuthorized("essentials.spawnmob." + mob.toLowerCase(Locale.ENGLISH)))
{
availableList.add(mob);
}
}
if (availableList.isEmpty())
{
availableList.add(tl("none"));
}
return StringUtil.joinList(availableList);
}
public static List<String> mobParts(final String mobString)
{
String[] mobParts = mobString.split(",");
List<String> mobs = new ArrayList<String>();
for (String mobPart : mobParts)
{
String[] mobDatas = mobPart.split(":");
mobs.add(mobDatas[0]);
}
return mobs;
}
public static List<String> mobData(final String mobString)
{
String[] mobParts = mobString.split(",");
List<String> mobData = new ArrayList<String>();
for (String mobPart : mobParts)
{
String[] mobDatas = mobPart.split(":");
if (mobDatas.length == 1)
{
if (mobPart.contains(":"))
{
mobData.add("");
}
else
{
mobData.add(null);
}
}
else
{
mobData.add(mobDatas[1]);
}
}
return mobData;
}
// This method spawns a mob where the user is looking, owned by user
public static void spawnmob(final IEssentials ess, final Server server, final User user, final List<String> parts, final List<String> data, int mobCount) throws Exception
{
final Block block = LocationUtil.getTarget(user.getBase()).getBlock();
if (block == null)
{
throw new Exception(tl("unableToSpawnMob"));
}
spawnmob(ess, server, user.getSource(), user, block.getLocation(), parts, data, mobCount);
}
// This method spawns a mob at target, owned by target
public static void spawnmob(final IEssentials ess, final Server server, final CommandSource sender, final User target, final List<String> parts, final List<String> data, int mobCount) throws Exception
{
spawnmob(ess, server, sender, target, target.getLocation(), parts, data, mobCount);
}
// This method spawns a mob at loc, owned by target
public static void spawnmob(final IEssentials ess, final Server server, final CommandSource sender, final User target, final Location loc, final List<String> parts, final List<String> data, int mobCount) throws Exception
{
final Location sloc = LocationUtil.getSafeDestination(loc);
for (int i = 0; i < parts.size(); i++)
{
Mob mob = Mob.fromName(parts.get(i));
checkSpawnable(ess, sender, mob);
}
final int serverLimit = ess.getSettings().getSpawnMobLimit();
int effectiveLimit = serverLimit / parts.size();
if (effectiveLimit < 1)
{
effectiveLimit = 1;
while (parts.size() > serverLimit)
{
parts.remove(serverLimit);
}
}
if (mobCount > effectiveLimit)
{
mobCount = effectiveLimit;
sender.sendMessage(tl("mobSpawnLimit"));
}
Mob mob = Mob.fromName(parts.get(0)); // Get the first mob
try
{
for (int i = 0; i < mobCount; i++)
{
spawnMob(ess, server, sender, target, sloc, parts, data);
}
sender.sendMessage(mobCount * parts.size() + " " + mob.name.toLowerCase(Locale.ENGLISH) + mob.suffix + " " + tl("spawned"));
}
catch (MobException e1)
{
throw new Exception(tl("unableToSpawnMob"), e1);
}
catch (NumberFormatException e2)
{
throw new Exception(tl("numberRequired"), e2);
}
catch (NullPointerException np)
{
throw new Exception(tl("soloMob"), np);
}
}
private static void spawnMob(final IEssentials ess, final Server server, final CommandSource sender, final User target, final Location sloc, List<String> parts, List<String> data) throws Exception
{
Mob mob;
Entity spawnedMob = null;
Entity spawnedMount;
for (int i = 0; i < parts.size(); i++)
{
if (i == 0)
{
mob = Mob.fromName(parts.get(i));
spawnedMob = mob.spawn(sloc.getWorld(), server, sloc);
defaultMobData(mob.getType(), spawnedMob);
if (data.get(i) != null)
{
changeMobData(sender, mob.getType(), spawnedMob, data.get(i).toLowerCase(Locale.ENGLISH), target);
}
}
int next = (i + 1);
if (next < parts.size()) //If it's the last mob in the list, don't set the mount
{
Mob mMob = Mob.fromName(parts.get(next));
spawnedMount = mMob.spawn(sloc.getWorld(), server, sloc);
defaultMobData(mMob.getType(), spawnedMount);
if (data.get(next) != null)
{
changeMobData(sender, mMob.getType(), spawnedMount, data.get(next).toLowerCase(Locale.ENGLISH), target);
}
spawnedMob.setPassenger(spawnedMount);
spawnedMob = spawnedMount;
}
}
}
private static void checkSpawnable(IEssentials ess, CommandSource sender, Mob mob) throws Exception
{
if (mob == null)
{
throw new Exception(tl("invalidMob"));
}
if (ess.getSettings().getProtectPreventSpawn(mob.getType().toString().toLowerCase(Locale.ENGLISH)))
{
throw new Exception(tl("disabledToSpawnMob"));
}
if (sender.isPlayer() && !ess.getUser(sender.getPlayer()).isAuthorized("essentials.spawnmob." + mob.name.toLowerCase(Locale.ENGLISH)))
{
throw new Exception(tl("noPermToSpawnMob"));
}
}
private static void changeMobData(final CommandSource sender, final EntityType type, final Entity spawned, final String inputData, final User target) throws Exception
{
String data = inputData;
if (data.isEmpty())
{
sender.sendMessage(tl("mobDataList", StringUtil.joinList(MobData.getValidHelp(spawned))));
}
if (spawned instanceof Zombie)
{
((Zombie)spawned).setBaby(false);
}
else if(spawned instanceof Ageable)
{
((Ageable)spawned).setAdult();
}
if (spawned instanceof Zombie || type == EntityType.SKELETON)
{
if (inputData.contains("armor") || inputData.contains("armour"))
{
final EntityEquipment invent = ((LivingEntity)spawned).getEquipment();
if (inputData.contains("noarmor") || inputData.contains("noarmour"))
{
invent.clear();
}
else if (inputData.contains("diamond"))
{
invent.setBoots(new ItemStack(Material.DIAMOND_BOOTS, 1));
invent.setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
invent.setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
invent.setHelmet(new ItemStack(Material.DIAMOND_HELMET, 1));
}
else if (inputData.contains("gold"))
{
invent.setBoots(new ItemStack(Material.GOLD_BOOTS, 1));
invent.setLeggings(new ItemStack(Material.GOLD_LEGGINGS, 1));
invent.setChestplate(new ItemStack(Material.GOLD_CHESTPLATE, 1));
invent.setHelmet(new ItemStack(Material.GOLD_HELMET, 1));
}
else if (inputData.contains("leather"))
{
invent.setBoots(new ItemStack(Material.LEATHER_BOOTS, 1));
invent.setLeggings(new ItemStack(Material.LEATHER_LEGGINGS, 1));
invent.setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE, 1));
invent.setHelmet(new ItemStack(Material.LEATHER_HELMET, 1));
}
else
{
invent.setBoots(new ItemStack(Material.IRON_BOOTS, 1));
invent.setLeggings(new ItemStack(Material.IRON_LEGGINGS, 1));
invent.setChestplate(new ItemStack(Material.IRON_CHESTPLATE, 1));
invent.setHelmet(new ItemStack(Material.IRON_HELMET, 1));
}
invent.setBootsDropChance(0f);
invent.setLeggingsDropChance(0f);
invent.setChestplateDropChance(0f);
invent.setHelmetDropChance(0f);
}
}
MobData newData = MobData.fromData(spawned, data);
while (newData != null)
{
newData.setData(spawned, target.getBase(), data);
data = data.replace(newData.getMatched(), "");
newData = MobData.fromData(spawned, data);
}
}
private static void defaultMobData(final EntityType type, final Entity spawned)
{
if (type == EntityType.SKELETON)
{
final EntityEquipment invent = ((LivingEntity)spawned).getEquipment();
invent.setItemInHand(new ItemStack(Material.BOW, 1));
invent.setItemInHandDropChance(0.1f);
invent.setBoots(new ItemStack(Material.GOLD_BOOTS, 1));
invent.setBootsDropChance(0.0f);
}
if (type == EntityType.PIG_ZOMBIE)
{
final PigZombie zombie = ((PigZombie)spawned);
zombie.setVillager(false);
final EntityEquipment invent = zombie.getEquipment();
invent.setItemInHand(new ItemStack(Material.GOLD_SWORD, 1));
invent.setItemInHandDropChance(0.1f);
invent.setBoots(new ItemStack(Material.GOLD_BOOTS, 1));
invent.setBootsDropChance(0.0f);
}
if (type == EntityType.ZOMBIE)
{
final Zombie zombie = ((Zombie)spawned);
zombie.setVillager(false);
final EntityEquipment invent = zombie.getEquipment();
invent.setBoots(new ItemStack(Material.GOLD_BOOTS, 1));
invent.setBootsDropChance(0.0f);
}
if (type == EntityType.HORSE)
{
((Horse)spawned).setJumpStrength(1.2);
}
}
}

View File

@@ -0,0 +1,62 @@
package com.earth2me.essentials;
import net.ess3.api.IEssentials;
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, 200);
return;
}
if (timer != -1)
{
ess.getScheduler().cancelTask(timer);
timer = ess.scheduleSyncDelayedTask(this, 200);
}
}
@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

@@ -0,0 +1,296 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.DateUtil;
import com.earth2me.essentials.utils.LocationUtil;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.GregorianCalendar;
import net.ess3.api.IEssentials;
import net.ess3.api.IUser;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public class Teleport implements net.ess3.api.ITeleport
{
private final IUser teleportOwner;
private final IEssentials ess;
private TimedTeleport timedTeleport;
public Teleport(IUser user, IEssentials ess)
{
this.teleportOwner = user;
this.ess = ess;
}
public void cooldown(boolean check) throws Exception
{
final Calendar time = new GregorianCalendar();
if (teleportOwner.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 teleportPlayer could have been used that would allow another use.
final long earliestLong = earliestTime.getTimeInMillis();
// When was the last teleportPlayer used?
final Long lastTime = teleportOwner.getLastTeleportTimestamp();
if (lastTime > time.getTimeInMillis())
{
// This is to make sure time didn't get messed up on last teleportPlayer use.
// If this happens, let's give the user the benifit of the doubt.
teleportOwner.setLastTeleportTimestamp(time.getTimeInMillis());
return;
}
else if (lastTime > earliestLong && !teleportOwner.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(tl("timeBeforeTeleport", DateUtil.formatDateDiff(time.getTimeInMillis())));
}
}
// if justCheck is set, don't update lastTeleport; we're just checking
if (!check)
{
teleportOwner.setLastTeleportTimestamp(time.getTimeInMillis());
}
}
private void warnUser(final IUser user, final double delay)
{
Calendar c = new GregorianCalendar();
c.add(Calendar.SECOND, (int)delay);
c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
user.sendMessage(tl("dontMoveMessage", DateUtil.formatDateDiff(c.getTimeInMillis())));
}
//The now function is used when you want to skip tp delay when teleporting someone to a location or player.
@Override
public void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception
{
if (cooldown)
{
cooldown(false);
}
final ITarget target = new LocationTarget(loc);
now(teleportOwner, target, cause);
}
@Override
public void now(Player entity, boolean cooldown, TeleportCause cause) throws Exception
{
if (cooldown)
{
cooldown(false);
}
final ITarget target = new PlayerTarget(entity);
now(teleportOwner, target, cause);
teleportOwner.sendMessage(tl("teleporting", target.getLocation().getWorld().getName(), target.getLocation().getBlockX(), target.getLocation().getBlockY(), target.getLocation().getBlockZ()));
}
protected void now(IUser teleportee, ITarget target, TeleportCause cause) throws Exception
{
cancel(false);
teleportee.setLastLocation();
final Location loc = target.getLocation();
if (LocationUtil.isBlockUnsafeForUser(teleportee, loc.getWorld(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()))
{
if (ess.getSettings().isTeleportSafetyEnabled())
{
if (teleportee.getBase().isInsideVehicle())
{
teleportee.getBase().leaveVehicle();
}
teleportee.getBase().teleport(LocationUtil.getSafeDestination(teleportee, loc), cause);
}
else
{
throw new Exception(tl("unsafeTeleportDestination", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
}
}
else
{
if (teleportee.getBase().isInsideVehicle())
{
teleportee.getBase().leaveVehicle();
}
teleportee.getBase().teleport(LocationUtil.getRoundedDestination(loc), cause);
}
}
//The teleportPlayer function is used when you want to normally teleportPlayer someone to a location or player.
//This method is nolonger used internally and will be removed.
@Deprecated
@Override
public void teleport(Location loc, Trade chargeFor) throws Exception
{
teleport(loc, chargeFor, TeleportCause.PLUGIN);
}
@Override
public void teleport(Location loc, Trade chargeFor, TeleportCause cause) throws Exception
{
teleport(teleportOwner, new LocationTarget(loc), chargeFor, cause);
}
//This is used when teleporting to a player
@Override
public void teleport(Player entity, Trade chargeFor, TeleportCause cause) throws Exception
{
ITarget target = new PlayerTarget(entity);
teleportOwner.sendMessage(tl("teleportToPlayer", entity.getDisplayName()));
teleport(teleportOwner, target, chargeFor, cause);
}
//This is used when teleporting to stored location
@Override
public void teleportPlayer(IUser teleportee, Location loc, Trade chargeFor, TeleportCause cause) throws Exception
{
teleport(teleportee, new LocationTarget(loc), chargeFor, cause);
}
//This is used on /tphere
@Override
public void teleportPlayer(IUser teleportee, Player entity, Trade chargeFor, TeleportCause cause) throws Exception
{
ITarget target = new PlayerTarget(entity);
teleport(teleportee, target, chargeFor, cause);
teleportee.sendMessage(tl("teleporting", target.getLocation().getWorld().getName(), target.getLocation().getBlockX(), target.getLocation().getBlockY(), target.getLocation().getBlockZ()));
teleportOwner.sendMessage(tl("teleporting", target.getLocation().getWorld().getName(), target.getLocation().getBlockX(), target.getLocation().getBlockY(), target.getLocation().getBlockZ()));
}
private void teleport(IUser teleportee, ITarget target, Trade chargeFor, TeleportCause cause) throws Exception
{
double delay = ess.getSettings().getTeleportDelay();
Trade cashCharge = chargeFor;
if (chargeFor != null)
{
chargeFor.isAffordableFor(teleportOwner);
//This code is to make sure that commandcosts are checked in the initial world, and not in the resulting world.
if (!chargeFor.getCommandCost(teleportOwner).equals(BigDecimal.ZERO))
{
//By converting a command cost to a regular cost, the command cost permission isn't checked when executing the charge after teleport.
cashCharge = new Trade(chargeFor.getCommandCost(teleportOwner), ess);
}
}
cooldown(true);
if (delay <= 0 || teleportOwner.isAuthorized("essentials.teleport.timer.bypass")
|| teleportee.isAuthorized("essentials.teleport.timer.bypass"))
{
cooldown(false);
now(teleportee, target, cause);
if (cashCharge != null)
{
cashCharge.charge(teleportOwner);
}
return;
}
cancel(false);
warnUser(teleportee, delay);
initTimer((long)(delay * 1000.0), teleportee, target, cashCharge, cause, false);
}
//The respawn function is a wrapper used to handle tp fallback, on /jail and /home
@Override
public void respawn(final Trade chargeFor, TeleportCause cause) throws Exception
{
double delay = ess.getSettings().getTeleportDelay();
if (chargeFor != null)
{
chargeFor.isAffordableFor(teleportOwner);
}
cooldown(true);
if (delay <= 0 || teleportOwner.isAuthorized("essentials.teleport.timer.bypass"))
{
cooldown(false);
respawnNow(teleportOwner, cause);
if (chargeFor != null)
{
chargeFor.charge(teleportOwner);
}
return;
}
cancel(false);
warnUser(teleportOwner, delay);
initTimer((long)(delay * 1000.0), teleportOwner, null, chargeFor, cause, true);
}
protected void respawnNow(IUser teleportee, TeleportCause cause) throws Exception
{
final Player player = teleportee.getBase();
Location bed = player.getBedSpawnLocation();
if (bed != null)
{
now(teleportee, new LocationTarget(bed), cause);
}
else
{
if (ess.getSettings().isDebug())
{
ess.getLogger().info("Could not find bed spawn, forcing respawn event.");
}
final PlayerRespawnEvent pre = new PlayerRespawnEvent(player, player.getWorld().getSpawnLocation(), false);
ess.getServer().getPluginManager().callEvent(pre);
now(teleportee, new LocationTarget(pre.getRespawnLocation()), cause);
}
}
//The warp function is a wrapper used to teleportPlayer a player to a /warp
@Override
public void warp(IUser teleportee, String warp, Trade chargeFor, TeleportCause cause) throws Exception
{
Location loc = ess.getWarps().getWarp(warp);
teleportee.sendMessage(tl("warpingTo", warp, loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
if (!teleportee.equals(teleportOwner))
{
teleportOwner.sendMessage(tl("warpingTo", warp, loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
}
teleport(teleportee, new LocationTarget(loc), chargeFor, cause);
}
//The back function is a wrapper used to teleportPlayer a player /back to their previous location.
@Override
public void back(Trade chargeFor) throws Exception
{
final Location loc = teleportOwner.getLastLocation();
teleportOwner.sendMessage(tl("backUsageMsg", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
teleport(teleportOwner, new LocationTarget(loc), chargeFor, TeleportCause.COMMAND);
}
//This function is used to throw a user back after a jail sentence
@Override
public void back() throws Exception
{
now(teleportOwner, new LocationTarget(teleportOwner.getLastLocation()), TeleportCause.COMMAND);
}
//If we need to cancelTimer a pending teleportPlayer call this method
private void cancel(boolean notifyUser)
{
if (timedTeleport != null)
{
timedTeleport.cancelTimer(notifyUser);
timedTeleport = null;
}
}
private void initTimer(long delay, IUser teleportUser, ITarget target, Trade chargeFor, TeleportCause cause, boolean respawn)
{
timedTeleport = new TimedTeleport(teleportOwner, ess, this, delay, teleportUser, target, chargeFor, cause, respawn);
}
}

View File

@@ -0,0 +1,177 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import java.util.UUID;
import net.ess3.api.IEssentials;
import net.ess3.api.IUser;
import org.bukkit.Location;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public class TimedTeleport implements Runnable
{
private static final double MOVE_CONSTANT = 0.3;
private final IUser teleportOwner;
private final IEssentials ess;
private final Teleport teleport;
private final UUID timer_teleportee;
private int timer_task = -1;
private final long timer_started; // time this task was initiated
private final long timer_delay; // how long to delay the teleportPlayer
private double timer_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 final long timer_initX;
private final long timer_initY;
private final long timer_initZ;
private final ITarget timer_teleportTarget;
private final boolean timer_respawn;
private final boolean timer_canMove;
private final Trade timer_chargeFor;
private final TeleportCause timer_cause;
public TimedTeleport(IUser user, IEssentials ess, Teleport teleport, long delay, IUser teleportUser, ITarget target, Trade chargeFor, TeleportCause cause, boolean respawn)
{
this.teleportOwner = user;
this.ess = ess;
this.teleport = teleport;
this.timer_started = System.currentTimeMillis();
this.timer_delay = delay;
this.timer_health = teleportUser.getBase().getHealth();
this.timer_initX = Math.round(teleportUser.getBase().getLocation().getX() * MOVE_CONSTANT);
this.timer_initY = Math.round(teleportUser.getBase().getLocation().getY() * MOVE_CONSTANT);
this.timer_initZ = Math.round(teleportUser.getBase().getLocation().getZ() * MOVE_CONSTANT);
this.timer_teleportee = teleportUser.getBase().getUniqueId();
this.timer_teleportTarget = target;
this.timer_chargeFor = chargeFor;
this.timer_cause = cause;
this.timer_respawn = respawn;
this.timer_canMove = user.isAuthorized("essentials.teleport.timer.move");
timer_task = ess.runTaskTimerAsynchronously(this, 20, 20).getTaskId();
}
@Override
public void run()
{
if (teleportOwner == null || !teleportOwner.getBase().isOnline() || teleportOwner.getBase().getLocation() == null)
{
cancelTimer(false);
return;
}
final IUser teleportUser = ess.getUser(this.timer_teleportee);
if (teleportUser == null || !teleportUser.getBase().isOnline())
{
cancelTimer(false);
return;
}
final Location currLocation = teleportUser.getBase().getLocation();
if (currLocation == null)
{
cancelTimer(false);
return;
}
if (!timer_canMove
&& (Math.round(currLocation.getX() * MOVE_CONSTANT) != timer_initX
|| Math.round(currLocation.getY() * MOVE_CONSTANT) != timer_initY
|| Math.round(currLocation.getZ() * MOVE_CONSTANT) != timer_initZ
|| teleportUser.getBase().getHealth() < timer_health))
{
// user moved, cancelTimer teleportPlayer
cancelTimer(true);
return;
}
class DelayedTeleportTask implements Runnable
{
@Override
public void run()
{
timer_health = teleportUser.getBase().getHealth(); // in case user healed, then later gets injured
final long now = System.currentTimeMillis();
if (now > timer_started + timer_delay)
{
try
{
teleport.cooldown(false);
}
catch (Exception ex)
{
teleportOwner.sendMessage(tl("cooldownWithMessage", ex.getMessage()));
if (teleportOwner != teleportUser)
{
teleportUser.sendMessage(tl("cooldownWithMessage", ex.getMessage()));
}
}
try
{
cancelTimer(false);
teleportUser.sendMessage(tl("teleportationCommencing"));
try
{
if (timer_chargeFor != null)
{
timer_chargeFor.isAffordableFor(teleportOwner);
}
if (timer_respawn)
{
teleport.respawnNow(teleportUser, timer_cause);
}
else
{
teleport.now(teleportUser, timer_teleportTarget, timer_cause);
}
if (timer_chargeFor != null)
{
timer_chargeFor.charge(teleportOwner);
}
}
catch (Exception ex)
{
}
}
catch (Exception ex)
{
ess.showError(teleportOwner.getSource(), ex, "\\ teleport");
}
}
}
}
ess.scheduleSyncDelayedTask(new DelayedTeleportTask());
}
//If we need to cancelTimer a pending teleportPlayer call this method
public void cancelTimer(boolean notifyUser)
{
if (timer_task == -1)
{
return;
}
try
{
ess.getServer().getScheduler().cancelTask(timer_task);
if (notifyUser)
{
teleportOwner.sendMessage(tl("pendingTeleportCancelled"));
if (timer_teleportee != null && !timer_teleportee.equals(teleportOwner.getBase().getUniqueId()))
{
ess.getUser(timer_teleportee).sendMessage(tl("pendingTeleportCancelled"));
}
}
}
finally
{
timer_task = -1;
}
}
}

View File

@@ -0,0 +1,452 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import com.earth2me.essentials.craftbukkit.SetExpFix;
import com.earth2me.essentials.utils.NumberUtil;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.IEssentials;
import net.ess3.api.IUser;
import net.ess3.api.MaxMoneyException;
import org.bukkit.Location;
import org.bukkit.entity.Item;
import org.bukkit.inventory.ItemStack;
public class Trade
{
private final transient String command;
private final transient Trade fallbackTrade;
private final transient BigDecimal money;
private final transient ItemStack itemStack;
private final transient Integer exp;
private final transient IEssentials ess;
public enum TradeType
{
MONEY,
EXP,
ITEM
}
public enum OverflowType
{
ABORT,
DROP,
RETURN
}
public Trade(final String command, final IEssentials ess)
{
this(command, null, null, null, null, ess);
}
public Trade(final String command, final Trade fallback, final IEssentials ess)
{
this(command, fallback, null, null, null, ess);
}
@Deprecated
public Trade(final double money, final com.earth2me.essentials.IEssentials ess)
{
this(null, null, BigDecimal.valueOf(money), null, null, (IEssentials)ess);
}
public Trade(final BigDecimal money, final IEssentials ess)
{
this(null, null, money, null, null, ess);
}
public Trade(final ItemStack items, final IEssentials ess)
{
this(null, null, null, items, null, ess);
}
public Trade(final int exp, final IEssentials ess)
{
this(null, null, null, null, exp, ess);
}
private Trade(final String command, final Trade fallback, final BigDecimal money, final ItemStack item, final Integer exp, final IEssentials ess)
{
this.command = command;
this.fallbackTrade = fallback;
this.money = money;
this.itemStack = item;
this.exp = exp;
this.ess = ess;
}
public void isAffordableFor(final IUser user) throws ChargeException
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "checking if " + user.getName() + " can afford charge.");
}
if (getMoney() != null
&& getMoney().signum() > 0
&& !user.canAfford(getMoney()))
{
throw new ChargeException(tl("notEnoughMoney", NumberUtil.displayCurrency(getMoney(), ess)));
}
if (getItemStack() != null
&& !user.getBase().getInventory().containsAtLeast(itemStack, itemStack.getAmount()))
{
throw new ChargeException(tl("missingItems", getItemStack().getAmount(), ess.getItemDb().name(getItemStack())));
}
BigDecimal money;
if (command != null && !command.isEmpty()
&& (money = getCommandCost(user)).signum() > 0
&& !user.canAfford(money))
{
throw new ChargeException(tl("notEnoughMoney", NumberUtil.displayCurrency(money, ess)));
}
if (exp != null && exp > 0
&& SetExpFix.getTotalExperience(user.getBase()) < exp)
{
throw new ChargeException(tl("notEnoughExperience"));
}
}
public boolean pay(final IUser user) throws MaxMoneyException
{
return pay(user, OverflowType.ABORT) == null;
}
public Map<Integer, ItemStack> pay(final IUser user, final OverflowType type) throws MaxMoneyException
{
if (getMoney() != null && getMoney().signum() > 0)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "paying user " + user.getName() + " via trade " + getMoney().toPlainString());
}
user.giveMoney(getMoney());
}
if (getItemStack() != null)
{
// This stores the would be overflow
Map<Integer, ItemStack> overFlow = InventoryWorkaround.addAllItems(user.getBase().getInventory(), getItemStack());
if (overFlow != null)
{
switch (type)
{
case ABORT:
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "abort paying " + user.getName() + " itemstack " + getItemStack().toString() + " due to lack of inventory space ");
}
return overFlow;
case RETURN:
// Pay the user the items, and return overflow
final Map<Integer, ItemStack> returnStack = InventoryWorkaround.addItems(user.getBase().getInventory(), getItemStack());
user.getBase().updateInventory();
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "paying " + user.getName() + " partial itemstack " + getItemStack().toString() + " with overflow " + returnStack.get(0).toString());
}
return returnStack;
case DROP:
// Pay the users the items directly, and drop the rest, will always return no overflow.
final Map<Integer, ItemStack> leftOver = InventoryWorkaround.addItems(user.getBase().getInventory(), getItemStack());
final Location loc = user.getBase().getLocation();
for (ItemStack loStack : leftOver.values())
{
final int maxStackSize = loStack.getType().getMaxStackSize();
final int stacks = loStack.getAmount() / maxStackSize;
final int leftover = loStack.getAmount() % maxStackSize;
final Item[] itemStacks = new Item[stacks + (leftover > 0 ? 1 : 0)];
for (int i = 0; i < stacks; i++)
{
final ItemStack stack = loStack.clone();
stack.setAmount(maxStackSize);
itemStacks[i] = loc.getWorld().dropItem(loc, stack);
}
if (leftover > 0)
{
final ItemStack stack = loStack.clone();
stack.setAmount(leftover);
itemStacks[stacks] = loc.getWorld().dropItem(loc, stack);
}
}
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "paying " + user.getName() + " partial itemstack " + getItemStack().toString() + " and dropping overflow " + leftOver.get(0).toString());
}
}
}
else if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "paying " + user.getName() + " itemstack " + getItemStack().toString());
}
user.getBase().updateInventory();
}
if (getExperience() != null)
{
SetExpFix.setTotalExperience(user.getBase(), SetExpFix.getTotalExperience(user.getBase()) + getExperience());
}
return null;
}
public void charge(final IUser user) throws ChargeException
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "attempting to charge user " + user.getName());
}
if (getMoney() != null)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "charging user " + user.getName() + " money " + getMoney().toPlainString());
}
if (!user.canAfford(getMoney()) && getMoney().signum() > 0)
{
throw new ChargeException(tl("notEnoughMoney", NumberUtil.displayCurrency(getMoney(), ess)));
}
user.takeMoney(getMoney());
}
if (getItemStack() != null)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "charging user " + user.getName() + " itemstack " + getItemStack().toString());
}
if (!user.getBase().getInventory().containsAtLeast(getItemStack(), getItemStack().getAmount()))
{
throw new ChargeException(tl("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " ")));
}
user.getBase().getInventory().removeItem(getItemStack());
user.getBase().updateInventory();
}
if (command != null)
{
final BigDecimal cost = getCommandCost(user);
if (!user.canAfford(cost) && cost.signum() > 0)
{
throw new ChargeException(tl("notEnoughMoney", NumberUtil.displayCurrency(cost, ess)));
}
user.takeMoney(cost);
}
if (getExperience() != null)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "charging user " + user.getName() + " exp " + getExperience());
}
final int experience = SetExpFix.getTotalExperience(user.getBase());
if (experience < getExperience() && getExperience() > 0)
{
throw new ChargeException(tl("notEnoughExperience"));
}
SetExpFix.setTotalExperience(user.getBase(), experience - getExperience());
}
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "charge user " + user.getName() + " completed");
}
}
public BigDecimal getMoney()
{
return money;
}
public ItemStack getItemStack()
{
return itemStack;
}
public Integer getExperience()
{
return exp;
}
public TradeType getType()
{
if (getExperience() != null)
{
return TradeType.EXP;
}
if (getItemStack() != null)
{
return TradeType.ITEM;
}
return TradeType.MONEY;
}
public BigDecimal getCommandCost(final IUser user)
{
BigDecimal cost = BigDecimal.ZERO;
if (command != null && !command.isEmpty())
{
cost = ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command);
if (cost.signum() == 0 && fallbackTrade != null)
{
cost = fallbackTrade.getCommandCost(user);
}
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "calculated command (" + command + ") cost for " + user.getName() + " as " + cost);
}
}
if (cost.signum() != 0 && (user.isAuthorized("essentials.nocommandcost.all")
|| user.isAuthorized("essentials.nocommandcost." + command)))
{
return BigDecimal.ZERO;
}
return cost;
}
private static FileWriter fw = null;
public static void log(String type, String subtype, String event, String sender, Trade charge, String receiver, Trade pay, Location loc, IEssentials ess)
{
//isEcoLogUpdateEnabled() - This refers to log entries with no location, ie API updates #EasterEgg
//isEcoLogEnabled() - This refers to log entries with with location, ie /pay /sell and eco signs.
if ((loc == null && !ess.getSettings().isEcoLogUpdateEnabled())
|| (loc != null && !ess.getSettings().isEcoLogEnabled()))
{
return;
}
if (fw == null)
{
try
{
fw = new FileWriter(new File(ess.getDataFolder(), "trade.log"), true);
}
catch (IOException ex)
{
Logger.getLogger("Essentials").log(Level.SEVERE, null, ex);
}
}
StringBuilder sb = new StringBuilder();
sb.append(type).append(",").append(subtype).append(",").append(event).append(",\"");
sb.append(DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL).format(new Date()));
sb.append("\",\"");
if (sender != null)
{
sb.append(sender);
}
sb.append("\",");
if (charge == null)
{
sb.append("\"\",\"\",\"\"");
}
else
{
if (charge.getItemStack() != null)
{
sb.append(charge.getItemStack().getAmount()).append(",");
sb.append(charge.getItemStack().getType().toString()).append(",");
sb.append(charge.getItemStack().getDurability());
}
if (charge.getMoney() != null)
{
sb.append(charge.getMoney()).append(",");
sb.append("money").append(",");
sb.append(ess.getSettings().getCurrencySymbol());
}
if (charge.getExperience() != null)
{
sb.append(charge.getExperience()).append(",");
sb.append("exp").append(",");
sb.append("\"\"");
}
}
sb.append(",\"");
if (receiver != null)
{
sb.append(receiver);
}
sb.append("\",");
if (pay == null)
{
sb.append("\"\",\"\",\"\"");
}
else
{
if (pay.getItemStack() != null)
{
sb.append(pay.getItemStack().getAmount()).append(",");
sb.append(pay.getItemStack().getType().toString()).append(",");
sb.append(pay.getItemStack().getDurability());
}
if (pay.getMoney() != null)
{
sb.append(pay.getMoney()).append(",");
sb.append("money").append(",");
sb.append(ess.getSettings().getCurrencySymbol());
}
if (pay.getExperience() != null)
{
sb.append(pay.getExperience()).append(",");
sb.append("exp").append(",");
sb.append("\"\"");
}
}
if (loc == null)
{
sb.append(",\"\",\"\",\"\",\"\"");
}
else
{
sb.append(",\"");
sb.append(loc.getWorld().getName()).append("\",");
sb.append(loc.getBlockX()).append(",");
sb.append(loc.getBlockY()).append(",");
sb.append(loc.getBlockZ()).append(",");
}
sb.append("\n");
try
{
fw.write(sb.toString());
fw.flush();
}
catch (IOException ex)
{
Logger.getLogger("Essentials").log(Level.SEVERE, null, ex);
}
}
public static void closeLog()
{
if (fw != null)
{
try
{
fw.close();
}
catch (IOException ex)
{
Logger.getLogger("Essentials").log(Level.SEVERE, null, ex);
}
fw = null;
}
}
}

View File

@@ -0,0 +1,212 @@
package com.earth2me.essentials;
import com.google.common.io.Files;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.regex.Pattern;
import org.bukkit.Bukkit;
public class UUIDMap
{
private final transient net.ess3.api.IEssentials ess;
private File userList;
private final transient Pattern splitPattern = Pattern.compile(",");
private static final ExecutorService EXECUTOR_SERVICE = Executors.newSingleThreadExecutor();
private final AtomicInteger pendingDiskWrites = new AtomicInteger(0);
public UUIDMap(final net.ess3.api.IEssentials ess)
{
this.ess = ess;
userList = new File(ess.getDataFolder(), "usermap.csv");
}
public void loadAllUsers(final ConcurrentSkipListMap<String, UUID> names, final ConcurrentSkipListMap<UUID, ArrayList<String>> history)
{
try
{
if (!userList.exists())
{
userList.createNewFile();
}
synchronized (pendingDiskWrites)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "Reading usermap from disk");
}
names.clear();
history.clear();
final BufferedReader reader = new BufferedReader(new FileReader(userList));
try
{
while (true)
{
final String line = reader.readLine();
if (line == null)
{
break;
}
else
{
final String[] values = splitPattern.split(line);
if (values.length == 2)
{
final String name = values[0];
final UUID uuid = UUID.fromString(values[1]);
names.put(name, uuid);
if (!history.containsKey(uuid))
{
final ArrayList<String> list = new ArrayList<String>();
list.add(name);
history.put(uuid, list);
}
else
{
final ArrayList<String> list = history.get(uuid);
if (!list.contains(name))
{
list.add(name);
}
}
}
}
}
}
finally
{
reader.close();
}
}
}
catch (IOException ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
public void writeUUIDMap()
{
_writeUUIDMap();
}
public void forceWriteUUIDMap()
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "Forcing usermap write to disk");
}
try
{
Future<?> future = _writeUUIDMap();;
if (future != null)
{
future.get();
}
}
catch (InterruptedException ex)
{
ess.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
catch (ExecutionException ex)
{
ess.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
public Future<?> _writeUUIDMap()
{
final ConcurrentSkipListMap<String, UUID> names = ess.getUserMap().getNames();
if (names.size() < 1)
{
return null;
}
pendingDiskWrites.incrementAndGet();
Future<?> future = EXECUTOR_SERVICE.submit(new WriteRunner(ess.getDataFolder(), userList, names, pendingDiskWrites));
return future;
}
private static class WriteRunner implements Runnable
{
private final File location;
private final File endFile;
private final ConcurrentSkipListMap<String, UUID> names;
private final AtomicInteger pendingDiskWrites;
private WriteRunner(final File location, final File endFile, final ConcurrentSkipListMap<String, UUID> names, final AtomicInteger pendingDiskWrites)
{
this.location = location;
this.endFile = endFile;
this.names = names;
this.pendingDiskWrites = pendingDiskWrites;
}
@Override
public void run()
{
synchronized (pendingDiskWrites)
{
if (pendingDiskWrites.get() > 1)
{
pendingDiskWrites.decrementAndGet();
return;
}
File configFile = null;
try
{
configFile = File.createTempFile("usermap", ".tmp.csv", location);
final BufferedWriter bWriter = new BufferedWriter(new FileWriter(configFile));
for (Map.Entry<String, UUID> entry : names.entrySet())
{
bWriter.write(entry.getKey() + "," + entry.getValue().toString());
bWriter.newLine();
}
bWriter.close();
Files.move(configFile, endFile);
}
catch (IOException ex)
{
try
{
if (configFile != null && configFile.exists())
{
Files.move(configFile, new File(endFile.getParentFile(), "usermap.bak.csv"));
}
}
catch (Exception ex2)
{
Bukkit.getLogger().log(Level.SEVERE, ex2.getMessage(), ex2);
}
Bukkit.getLogger().log(Level.WARNING, ex.getMessage(), ex);
}
finally
{
pendingDiskWrites.decrementAndGet();
}
}
}
}
}

View File

@@ -0,0 +1,898 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.register.payment.Method;
import com.earth2me.essentials.register.payment.Methods;
import com.earth2me.essentials.utils.DateUtil;
import com.earth2me.essentials.utils.FormatUtil;
import com.earth2me.essentials.utils.NumberUtil;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.IEssentials;
import net.ess3.api.MaxMoneyException;
import net.ess3.api.events.AfkStatusChangeEvent;
import net.ess3.api.events.UserBalanceUpdateEvent;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
public class User extends UserData implements Comparable<User>, IReplyTo, net.ess3.api.IUser
{
private static final Logger logger = Logger.getLogger("Essentials");
private CommandSource replyTo = null;
private transient UUID teleportRequester;
private transient boolean teleportRequestHere;
private transient Location teleportLocation;
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 boolean rightClickJump = false;
private transient Location afkPosition = null;
private boolean invSee = false;
private boolean recipeSee = false;
private boolean enderSee = false;
private transient long teleportInvulnerabilityTimestamp = 0;
public User(final Player base, final IEssentials ess)
{
super(base, ess);
teleport = new Teleport(this, ess);
if (isAfk())
{
afkPosition = this.getLocation();
}
if (this.getBase().isOnline())
{
lastOnlineActivity = System.currentTimeMillis();
}
}
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)
{
final boolean result = isAuthorizedCheck(node);
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "checking if " + base.getName() + " has " + node + " - " + result);
}
return result;
}
private boolean isAuthorizedCheck(final String node)
{
if (base instanceof OfflinePlayer)
{
return false;
}
try
{
return ess.getPermissionsHandler().hasPermission(base, node);
}
catch (Exception ex)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.SEVERE, "Permission System Error: " + ess.getPermissionsHandler().getName() + " returned: " + ex.getMessage(), ex);
}
else
{
ess.getLogger().log(Level.SEVERE, "Permission System Error: " + ess.getPermissionsHandler().getName() + " returned: " + ex.getMessage());
}
return false;
}
}
@Override
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(tl("timeBeforeHeal", DateUtil.formatDateDiff(cooldownTime.getTimeInMillis())));
}
}
setLastHealTimestamp(now.getTimeInMillis());
}
@Override
public void giveMoney(final BigDecimal value) throws MaxMoneyException
{
giveMoney(value, (CommandSource)null);
}
@Override
public void giveMoney(final BigDecimal value, final CommandSource initiator) throws MaxMoneyException
{
if (value.signum() == 0)
{
return;
}
setMoney(getMoney().add(value));
sendMessage(tl("addedToAccount", NumberUtil.displayCurrency(value, ess)));
if (initiator != null)
{
initiator.sendMessage(tl("addedToOthersAccount", NumberUtil.displayCurrency(value, ess), this.getDisplayName(), NumberUtil.displayCurrency(getMoney(), ess)));
}
}
@Override
public void payUser(final User reciever, final BigDecimal value) throws ChargeException, MaxMoneyException
{
if (value.signum() == 0)
{
return;
}
if (canAfford(value))
{
setMoney(getMoney().subtract(value));
reciever.setMoney(reciever.getMoney().add(value));
sendMessage(tl("moneySentTo", NumberUtil.displayCurrency(value, ess), reciever.getDisplayName()));
reciever.sendMessage(tl("moneyRecievedFrom", NumberUtil.displayCurrency(value, ess), getDisplayName()));
}
else
{
throw new ChargeException(tl("notEnoughMoney", NumberUtil.displayCurrency(value, ess)));
}
}
@Override
public void takeMoney(final BigDecimal value)
{
takeMoney(value, (CommandSource)null);
}
@Override
public void takeMoney(final BigDecimal value, final CommandSource initiator)
{
if (value.signum() == 0)
{
return;
}
try
{
setMoney(getMoney().subtract(value));
}
catch (MaxMoneyException ex)
{
ess.getLogger().log(Level.WARNING, "Invalid call to takeMoney, total balance can't be more than the max-money limit.", ex);
}
sendMessage(tl("takenFromAccount", NumberUtil.displayCurrency(value, ess)));
if (initiator != null)
{
initiator.sendMessage(tl("takenFromOthersAccount", NumberUtil.displayCurrency(value, ess), this.getDisplayName(), NumberUtil.displayCurrency(getMoney(), ess)));
}
}
@Override
public boolean canAfford(final BigDecimal cost)
{
return canAfford(cost, true);
}
public boolean canAfford(final BigDecimal cost, final boolean permcheck)
{
if (cost.signum() <= 0)
{
return true;
}
final BigDecimal remainingBalance = getMoney().subtract(cost);
if (!permcheck || isAuthorized("essentials.eco.loan"))
{
return (remainingBalance.compareTo(ess.getSettings().getMinMoney()) >= 0);
}
return (remainingBalance.signum() >= 0);
}
public void dispose()
{
ess.runTaskAsynchronously(new Runnable()
{
@Override
public void run()
{
_dispose();
}
});
}
private void _dispose()
{
if (!base.isOnline())
{
this.base = new OfflinePlayer(getConfigUUID(), ess.getServer());
}
cleanup();
}
@Override
public Boolean canSpawnItem(final int itemId)
{
return !ess.getSettings().itemSpawnBlacklist().contains(itemId);
}
@Override
public void setLastLocation()
{
setLastLocation(this.getLocation());
}
@Override
public void setLogoutLocation()
{
setLogoutLocation(this.getLocation());
}
@Override
public void requestTeleport(final User player, final boolean here)
{
teleportRequestTime = System.currentTimeMillis();
teleportRequester = player == null ? null : player.getBase().getUniqueId();
teleportRequestHere = here;
if (player == null)
{
teleportLocation = null;
}
else
{
teleportLocation = here ? player.getLocation() : this.getLocation();
}
}
public UUID getTeleportRequest()
{
return teleportRequester;
}
public boolean isTpRequestHere()
{
return teleportRequestHere;
}
public Location getTpRequestLocation()
{
return teleportLocation;
}
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 if (nick.equalsIgnoreCase(getName())) {
nickname = nick;
}
else
{
nickname = ess.getSettings().getNicknamePrefix() + nick;
suffix = "§r";
}
if (this.getBase().isOp())
{
try
{
final ChatColor opPrefix = ess.getSettings().getOperatorColor();
if (opPrefix != null && opPrefix.toString().length() > 0)
{
prefix.insert(0, opPrefix.toString());
suffix = "§r";
}
}
catch (Exception e)
{
}
}
if (ess.getSettings().addPrefixSuffix())
{
//These two extra toggles are not documented, because they are mostly redundant #EasterEgg
if (!ess.getSettings().disablePrefix())
{
final String ptext = ess.getPermissionsHandler().getPrefix(base).replace('&', '§');
prefix.insert(0, ptext);
suffix = "§r";
}
if (!ess.getSettings().disableSuffix())
{
final String stext = ess.getPermissionsHandler().getSuffix(base).replace('&', '§');
suffix = stext + "§r";
suffix = suffix.replace("§f§f", "§f").replace("§f§r", "§r").replace("§r§r", "§r");
}
}
final String strPrefix = prefix.toString();
String output = strPrefix + nickname + suffix;
if (!longnick && output.length() > 16)
{
output = strPrefix + nickname;
}
if (!longnick && output.length() > 16)
{
output = FormatUtil.lastCode(strPrefix) + nickname;
}
if (!longnick && output.length() > 16)
{
output = FormatUtil.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())
{
this.getBase().setDisplayName(getNick(true));
if (ess.getSettings().changePlayerListName())
{
String name = getNick(false);
try
{
this.getBase().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.");
}
}
}
}
}
public String getDisplayName()
{
return super.getBase().getDisplayName() == null ? super.getBase().getName() : super.getBase().getDisplayName();
}
@Override
public Teleport getTeleport()
{
return teleport;
}
public long getLastOnlineActivity()
{
return lastOnlineActivity;
}
public void setLastOnlineActivity(final long timestamp)
{
lastOnlineActivity = timestamp;
}
@Override
public BigDecimal getMoney()
{
final long start = System.nanoTime();
final BigDecimal value = _getMoney();
final long elapsed = System.nanoTime() - start;
if (elapsed > ess.getSettings().getEconomyLagWarning())
{
ess.getLogger().log(Level.INFO, "Lag Notice - Slow Economy Response - Request took over {0}ms!", elapsed / 1000000.0);
}
return value;
}
private BigDecimal _getMoney()
{
if (ess.getSettings().isEcoDisabled())
{
if (ess.getSettings().isDebug())
{
ess.getLogger().info("Internal economy functions disabled, aborting balance check.");
}
return BigDecimal.ZERO;
}
if (Methods.hasMethod())
{
try
{
final Method method = Methods.getMethod();
if (!method.hasAccount(this.getName()))
{
throw new Exception();
}
final Method.MethodAccount account = Methods.getMethod().getAccount(this.getName());
return BigDecimal.valueOf(account.balance());
}
catch (Exception ex)
{
}
}
return super.getMoney();
}
@Override
public void setMoney(final BigDecimal value) throws MaxMoneyException
{
if (ess.getSettings().isEcoDisabled())
{
if (ess.getSettings().isDebug())
{
ess.getLogger().info("Internal economy functions disabled, aborting balance change.");
}
return;
}
final BigDecimal oldBalance = _getMoney();
if (Methods.hasMethod())
{
try
{
final Method method = Methods.getMethod();
if (!method.hasAccount(this.getName()))
{
throw new Exception();
}
final Method.MethodAccount account = Methods.getMethod().getAccount(this.getName());
account.set(value.doubleValue());
}
catch (Exception ex)
{
}
}
super.setMoney(value, true);
ess.getServer().getPluginManager().callEvent(new UserBalanceUpdateEvent(this.getBase(), oldBalance, value));
Trade.log("Update", "Set", "API", getName(), new Trade(value, ess), null, null, null, ess);
}
public void updateMoneyCache(final BigDecimal value)
{
if (ess.getSettings().isEcoDisabled())
{
return;
}
if (Methods.hasMethod() && super.getMoney() != value)
{
try
{
super.setMoney(value, false);
}
catch (MaxMoneyException ex)
{
// We don't want to throw any errors here, just updating a cache
}
}
}
@Override
public void setAfk(final boolean set)
{
final AfkStatusChangeEvent afkEvent = new AfkStatusChangeEvent(this, set);
ess.getServer().getPluginManager().callEvent(afkEvent);
if (afkEvent.isCancelled())
{
return;
}
this.getBase().setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : set);
if (set && !isAfk())
{
afkPosition = this.getLocation();
}
else if (!set && isAfk())
{
afkPosition = null;
}
_setAfk(set);
}
public boolean toggleAfk()
{
setAfk(!isAfk());
return isAfk();
}
@Override
public boolean isHidden()
{
return hidden;
}
public boolean isHidden(final Player player)
{
return hidden || !player.canSee(getBase());
}
@Override
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(tl("haveBeenReleased"));
setJail(null);
try
{
getTeleport().back();
}
catch (Exception ex)
{
try
{
getTeleport().respawn(null, TeleportCause.PLUGIN);
}
catch (Exception ex1)
{
}
}
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(tl("canTalkAgain"));
setMuted(false);
return true;
}
return false;
}
public void updateActivity(final boolean broadcast)
{
if (isAfk() && ess.getSettings().cancelAfkOnInteract())
{
setAfk(false);
if (broadcast && !isHidden())
{
setDisplayNick();
final String msg = tl("userIsNotAway", getDisplayName());
if (!msg.isEmpty())
{
ess.broadcastMessage(this, msg);
}
}
}
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 = tl("autoAfkKickReason", autoafkkick / 60.0);
lastActivity = 0;
this.getBase().kickPlayer(kickReason);
for (User user : ess.getOnlineUsers())
{
if (user.isAuthorized("essentials.kick.notify"))
{
user.sendMessage(tl("playerKicked", Console.NAME, getName(), kickReason));
}
}
}
final long autoafk = ess.getSettings().getAutoAfk();
if (!isAfk() && autoafk > 0 && lastActivity + autoafk * 1000 < System.currentTimeMillis() && isAuthorized("essentials.afk.auto"))
{
setAfk(true);
if (!isHidden())
{
setDisplayNick();
final String msg = tl("userIsAway", getDisplayName());
if (!msg.isEmpty())
{
ess.broadcastMessage(this, msg);
}
}
}
}
public Location getAfkPosition()
{
return afkPosition;
}
@Override
public boolean isGodModeEnabled()
{
return (super.isGodModeEnabled() && !ess.getSettings().getNoGodWorlds().contains(this.getLocation().getWorld().getName()))
|| (isAfk() && ess.getSettings().getFreezeAfkPlayers());
}
public boolean isGodModeEnabledRaw()
{
return super.isGodModeEnabled();
}
@Override
public String getGroup()
{
final String result = ess.getPermissionsHandler().getGroup(base);
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "looking up groupname of " + base.getName() + " - " + result);
}
return result;
}
@Override
public boolean inGroup(final String group)
{
final boolean result = ess.getPermissionsHandler().inGroup(base, group);
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "checking if " + base.getName() + " is in group " + group + " - " + result);
}
return result;
}
@Override
public boolean canBuild()
{
if (this.getBase().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;
}
public boolean isEnderSee()
{
return enderSee;
}
public void setEnderSee(final boolean set)
{
enderSee = set;
}
@Override
public void enableInvulnerabilityAfterTeleport()
{
final long time = ess.getSettings().getTeleportInvulnerability();
if (time > 0)
{
teleportInvulnerabilityTimestamp = System.currentTimeMillis() + time;
}
}
@Override
public void resetInvulnerabilityAfterTeleport()
{
if (teleportInvulnerabilityTimestamp != 0
&& teleportInvulnerabilityTimestamp < System.currentTimeMillis())
{
teleportInvulnerabilityTimestamp = 0;
}
}
@Override
public boolean hasInvulnerabilityAfterTeleport()
{
return teleportInvulnerabilityTimestamp != 0 && teleportInvulnerabilityTimestamp >= System.currentTimeMillis();
}
public boolean canInteractVanished()
{
return isAuthorized("essentials.vanish.interact");
}
@Override
public boolean isVanished()
{
return vanished;
}
@Override
public void setVanished(final boolean set)
{
vanished = set;
if (set)
{
for (User user : ess.getOnlineUsers())
{
if (!user.isAuthorized("essentials.vanish.see"))
{
user.getBase().hidePlayer(getBase());
}
}
setHidden(true);
ess.getVanishedPlayers().add(getName());
if (isAuthorized("essentials.vanish.effect"))
{
this.getBase().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false));
}
}
else
{
for (Player p : ess.getOnlinePlayers())
{
p.showPlayer(getBase());
}
setHidden(false);
ess.getVanishedPlayers().remove(getName());
if (isAuthorized("essentials.vanish.effect"))
{
this.getBase().removePotionEffect(PotionEffectType.INVISIBILITY);
}
}
}
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();
}
public boolean isFlyClickJump()
{
return rightClickJump;
}
public void setRightClickJump(boolean rightClickJump)
{
this.rightClickJump = rightClickJump;
}
@Override
public boolean isIgnoreExempt()
{
return this.isAuthorized("essentials.chat.ignoreexempt");
}
public boolean isRecipeSee()
{
return recipeSee;
}
public void setRecipeSee(boolean recipeSee)
{
this.recipeSee = recipeSee;
}
@Override
public void sendMessage(String message)
{
if (!message.isEmpty())
{
base.sendMessage(message);
}
}
@Override
public void setReplyTo(final CommandSource user)
{
replyTo = user;
}
@Override
public CommandSource getReplyTo()
{
return replyTo;
}
@Override
public int compareTo(final User other)
{
return FormatUtil.stripFormat(getDisplayName()).compareToIgnoreCase(FormatUtil.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();
}
@Override
public CommandSource getSource()
{
return new CommandSource(getBase());
}
@Override
public String getName()
{
return this.getBase().getName();
}
}

View File

@@ -0,0 +1,972 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.NumberUtil;
import com.earth2me.essentials.utils.StringUtil;
import java.io.File;
import java.math.BigDecimal;
import java.util.*;
import net.ess3.api.IEssentials;
import net.ess3.api.InvalidWorldException;
import net.ess3.api.MaxMoneyException;
import org.bukkit.Location;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public abstract class UserData extends PlayerExtension implements IConf
{
protected final transient IEssentials ess;
private final EssentialsUserConf config;
private final File folder;
protected UserData(Player base, IEssentials ess)
{
super(base);
this.ess = ess;
folder = new File(ess.getDataFolder(), "userdata");
if (!folder.exists())
{
folder.mkdirs();
}
String filename;
try
{
filename = base.getUniqueId().toString();
}
catch (Throwable ex)
{
ess.getLogger().warning("Falling back to old username system for " + base.getName());
filename = base.getName();
}
config = new EssentialsUserConf(base.getName(), base.getUniqueId(), new File(folder, filename + ".yml"));
reloadConfig();
}
public final void reset()
{
config.forceSave();
config.getFile().delete();
if (config.username != null)
{
ess.getUserMap().removeUser(config.username);
}
}
public final void cleanup()
{
config.cleanup();
}
@Override
public final void reloadConfig()
{
config.load();
money = _getMoney();
unlimited = _getUnlimited();
powertools = _getPowertools();
homes = _getHomes();
lastLocation = _getLastLocation();
lastTeleportTimestamp = _getLastTeleportTimestamp();
lastHealTimestamp = _getLastHealTimestamp();
jail = _getJail();
mails = _getMails();
teleportEnabled = _getTeleportEnabled();
godmode = _getGodModeEnabled();
muted = _getMuted();
muteTimeout = _getMuteTimeout();
jailed = _getJailed();
jailTimeout = _getJailTimeout();
lastLogin = _getLastLogin();
lastLogout = _getLastLogout();
lastLoginAddress = _getLastLoginAddress();
afk = _getAfk();
geolocation = _getGeoLocation();
isSocialSpyEnabled = _isSocialSpyEnabled();
isNPC = _isNPC();
arePowerToolsEnabled = _arePowerToolsEnabled();
kitTimestamps = _getKitTimestamps();
nickname = _getNickname();
ignoredPlayers = _getIgnoredPlayers();
logoutLocation = _getLogoutLocation();
lastAccountName = _getLastAccountName();
}
private BigDecimal money;
private BigDecimal _getMoney()
{
BigDecimal result = ess.getSettings().getStartingBalance();
BigDecimal maxMoney = ess.getSettings().getMaxMoney();
BigDecimal minMoney = ess.getSettings().getMinMoney();
if (config.hasProperty("money"))
{
result = config.getBigDecimal("money", result);
}
if (result.compareTo(maxMoney) > 0)
{
result = maxMoney;
}
if (result.compareTo(minMoney) < 0)
{
result = minMoney;
}
return result;
}
public BigDecimal getMoney()
{
return money;
}
public void setMoney(BigDecimal value, boolean throwError) throws MaxMoneyException
{
BigDecimal maxMoney = ess.getSettings().getMaxMoney();
BigDecimal minMoney = ess.getSettings().getMinMoney();
if (value.compareTo(maxMoney) > 0)
{
if (throwError)
{
throw new MaxMoneyException();
}
money = maxMoney;
}
else
{
money = value;
}
if (money.compareTo(minMoney) < 0)
{
money = minMoney;
}
config.setProperty("money", money);
stopTransaction();
}
private Map<String, Object> homes;
private Map<String, Object> _getHomes()
{
if (config.isConfigurationSection("homes"))
{
return config.getConfigurationSection("homes").getValues(false);
}
return new HashMap<String, Object>();
}
private String getHomeName(String search)
{
if (NumberUtil.isInt(search))
{
try
{
search = getHomes().get(Integer.parseInt(search) - 1);
}
catch (NumberFormatException e)
{
}
catch (IndexOutOfBoundsException e)
{
}
}
return search;
}
public Location getHome(String name) throws Exception
{
String search = getHomeName(name);
return config.getLocation("homes." + search, this.getBase().getServer());
}
public Location getHome(final Location world)
{
try
{
if (getHomes().isEmpty())
{
return null;
}
Location loc;
for (String home : getHomes())
{
loc = config.getLocation("homes." + home, this.getBase().getServer());
if (world.getWorld() == loc.getWorld())
{
return loc;
}
}
loc = config.getLocation("homes." + getHomes().get(0), this.getBase().getServer());
return loc;
}
catch (InvalidWorldException ex)
{
return null;
}
}
public List<String> getHomes()
{
return new ArrayList<String>(homes.keySet());
}
public void setHome(String name, Location loc)
{
//Invalid names will corrupt the yaml
name = StringUtil.safeString(name);
homes.put(name, loc);
config.setProperty("homes." + name, loc);
config.save();
}
public void delHome(String name) throws Exception
{
String search = getHomeName(name);
if (!homes.containsKey(search))
{
search = StringUtil.safeString(search);
}
if (homes.containsKey(search))
{
homes.remove(search);
config.removeProperty("homes." + search);
config.save();
}
else
{
throw new Exception(tl("invalidHome", search));
}
}
public boolean hasHome()
{
if (config.hasProperty("home"))
{
return true;
}
return false;
}
private String nickname;
public String _getNickname()
{
return config.getString("nickname");
}
public String getNickname()
{
return nickname;
}
public void setNickname(String nick)
{
nickname = nick;
config.setProperty("nickname", nick);
config.save();
}
private List<Integer> unlimited;
private List<Integer> _getUnlimited()
{
return config.getIntegerList("unlimited");
}
public List<Integer> getUnlimited()
{
return unlimited;
}
public boolean hasUnlimited(ItemStack stack)
{
return unlimited.contains(stack.getTypeId());
}
public void setUnlimited(ItemStack stack, boolean state)
{
if (unlimited.contains(stack.getTypeId()))
{
unlimited.remove(Integer.valueOf(stack.getTypeId()));
}
if (state)
{
unlimited.add(stack.getTypeId());
}
config.setProperty("unlimited", unlimited);
config.save();
}
private Map<String, Object> powertools;
private Map<String, Object> _getPowertools()
{
if (config.isConfigurationSection("powertools"))
{
return config.getConfigurationSection("powertools").getValues(false);
}
return new HashMap<String, Object>();
}
public void clearAllPowertools()
{
powertools.clear();
config.setProperty("powertools", powertools);
config.save();
}
@SuppressWarnings("unchecked")
public List<String> getPowertool(ItemStack stack)
{
return (List<String>)powertools.get("" + stack.getTypeId());
}
@SuppressWarnings("unchecked")
public List<String> getPowertool(int id)
{
return (List<String>)powertools.get("" + id);
}
public void setPowertool(ItemStack stack, List<String> commandList)
{
if (commandList == null || commandList.isEmpty())
{
powertools.remove("" + stack.getTypeId());
}
else
{
powertools.put("" + stack.getTypeId(), commandList);
}
config.setProperty("powertools", powertools);
config.save();
}
public boolean hasPowerTools()
{
return !powertools.isEmpty();
}
private Location lastLocation;
private Location _getLastLocation()
{
try
{
return config.getLocation("lastlocation", this.getBase().getServer());
}
catch (InvalidWorldException e)
{
return null;
}
}
public Location getLastLocation()
{
return lastLocation;
}
public void setLastLocation(Location loc)
{
if (loc == null || loc.getWorld() == null)
{
return;
}
lastLocation = loc;
config.setProperty("lastlocation", loc);
config.save();
}
private Location logoutLocation;
private Location _getLogoutLocation()
{
try
{
return config.getLocation("logoutlocation", this.getBase().getServer());
}
catch (InvalidWorldException e)
{
return null;
}
}
public Location getLogoutLocation()
{
return logoutLocation;
}
public void setLogoutLocation(Location loc)
{
if (loc == null || loc.getWorld() == null)
{
return;
}
logoutLocation = loc;
config.setProperty("logoutlocation", loc);
config.save();
}
private long lastTeleportTimestamp;
private long _getLastTeleportTimestamp()
{
return config.getLong("timestamps.lastteleport", 0);
}
public long getLastTeleportTimestamp()
{
return lastTeleportTimestamp;
}
public void setLastTeleportTimestamp(long time)
{
lastTeleportTimestamp = time;
config.setProperty("timestamps.lastteleport", time);
config.save();
}
private long lastHealTimestamp;
private long _getLastHealTimestamp()
{
return config.getLong("timestamps.lastheal", 0);
}
public long getLastHealTimestamp()
{
return lastHealTimestamp;
}
public void setLastHealTimestamp(long time)
{
lastHealTimestamp = time;
config.setProperty("timestamps.lastheal", time);
config.save();
}
private String jail;
private String _getJail()
{
return config.getString("jail");
}
public String getJail()
{
return jail;
}
public void setJail(String jail)
{
if (jail == null || jail.isEmpty())
{
this.jail = null;
config.removeProperty("jail");
}
else
{
this.jail = jail;
config.setProperty("jail", jail);
}
config.save();
}
private List<String> mails;
private List<String> _getMails()
{
return config.getStringList("mail");
}
public List<String> getMails()
{
return mails;
}
public void setMails(List<String> mails)
{
if (mails == null)
{
config.removeProperty("mail");
mails = _getMails();
}
else
{
config.setProperty("mail", mails);
}
this.mails = mails;
config.save();
}
public void addMail(String mail)
{
mails.add(mail);
setMails(mails);
}
private boolean teleportEnabled;
private boolean _getTeleportEnabled()
{
return config.getBoolean("teleportenabled", true);
}
public boolean isTeleportEnabled()
{
return teleportEnabled;
}
public void setTeleportEnabled(boolean set)
{
teleportEnabled = set;
config.setProperty("teleportenabled", set);
config.save();
}
private List<String> ignoredPlayers;
public List<String> _getIgnoredPlayers()
{
return Collections.synchronizedList(config.getStringList("ignore"));
}
public void setIgnoredPlayers(List<String> players)
{
if (players == null || players.isEmpty())
{
ignoredPlayers = Collections.synchronizedList(new ArrayList<String>());
config.removeProperty("ignore");
}
else
{
ignoredPlayers = players;
config.setProperty("ignore", players);
}
config.save();
}
@Deprecated
public boolean isIgnoredPlayer(final String userName)
{
final IUser user = ess.getUser(userName);
if (user == null || !user.getBase().isOnline())
{
return false;
}
return isIgnoredPlayer(user);
}
public boolean isIgnoredPlayer(IUser user)
{
return (ignoredPlayers.contains(user.getName().toLowerCase(Locale.ENGLISH)) && !user.isIgnoreExempt());
}
public void setIgnoredPlayer(IUser user, boolean set)
{
if (set)
{
ignoredPlayers.add(user.getName().toLowerCase(Locale.ENGLISH));
}
else
{
ignoredPlayers.remove(user.getName().toLowerCase(Locale.ENGLISH));
}
setIgnoredPlayers(ignoredPlayers);
}
private boolean godmode;
private boolean _getGodModeEnabled()
{
return config.getBoolean("godmode", false);
}
public boolean isGodModeEnabled()
{
return godmode;
}
public void setGodModeEnabled(boolean set)
{
godmode = set;
config.setProperty("godmode", set);
config.save();
}
private boolean muted;
public boolean _getMuted()
{
return config.getBoolean("muted", false);
}
public boolean getMuted()
{
return muted;
}
public boolean isMuted()
{
return muted;
}
public void setMuted(boolean set)
{
muted = set;
config.setProperty("muted", set);
config.save();
}
private long muteTimeout;
private long _getMuteTimeout()
{
return config.getLong("timestamps.mute", 0);
}
public long getMuteTimeout()
{
return muteTimeout;
}
public void setMuteTimeout(long time)
{
muteTimeout = time;
config.setProperty("timestamps.mute", time);
config.save();
}
private boolean jailed;
private boolean _getJailed()
{
return config.getBoolean("jailed", false);
}
public boolean isJailed()
{
return jailed;
}
public void setJailed(boolean set)
{
jailed = set;
config.setProperty("jailed", set);
config.save();
}
public boolean toggleJailed()
{
boolean ret = !isJailed();
setJailed(ret);
return ret;
}
private long jailTimeout;
private long _getJailTimeout()
{
return config.getLong("timestamps.jail", 0);
}
public long getJailTimeout()
{
return jailTimeout;
}
public void setJailTimeout(long time)
{
jailTimeout = time;
config.setProperty("timestamps.jail", time);
config.save();
}
private long lastLogin;
private long _getLastLogin()
{
return config.getLong("timestamps.login", 0);
}
public long getLastLogin()
{
return lastLogin;
}
private void _setLastLogin(long time)
{
lastLogin = time;
config.setProperty("timestamps.login", time);
}
public void setLastLogin(long time)
{
_setLastLogin(time);
if (base.getAddress() != null && base.getAddress().getAddress() != null)
{
_setLastLoginAddress(base.getAddress().getAddress().getHostAddress());
}
config.save();
}
private long lastLogout;
private long _getLastLogout()
{
return config.getLong("timestamps.logout", 0);
}
public long getLastLogout()
{
return lastLogout;
}
public void setLastLogout(long time)
{
lastLogout = time;
config.setProperty("timestamps.logout", time);
config.save();
}
private String lastLoginAddress;
private String _getLastLoginAddress()
{
return config.getString("ipAddress", "");
}
public String getLastLoginAddress()
{
return lastLoginAddress;
}
private void _setLastLoginAddress(String address)
{
lastLoginAddress = address;
config.setProperty("ipAddress", address);
}
private boolean afk;
private boolean _getAfk()
{
return config.getBoolean("afk", false);
}
public boolean isAfk()
{
return afk;
}
public void _setAfk(boolean set)
{
afk = set;
config.setProperty("afk", set);
config.save();
}
private boolean newplayer;
private String geolocation;
private String _getGeoLocation()
{
return config.getString("geolocation");
}
public String getGeoLocation()
{
return geolocation;
}
public void setGeoLocation(String geolocation)
{
if (geolocation == null || geolocation.isEmpty())
{
this.geolocation = null;
config.removeProperty("geolocation");
}
else
{
this.geolocation = geolocation;
config.setProperty("geolocation", geolocation);
}
config.save();
}
private boolean isSocialSpyEnabled;
private boolean _isSocialSpyEnabled()
{
return config.getBoolean("socialspy", false);
}
public boolean isSocialSpyEnabled()
{
return isSocialSpyEnabled;
}
public void setSocialSpyEnabled(boolean status)
{
isSocialSpyEnabled = status;
config.setProperty("socialspy", status);
config.save();
}
private boolean isNPC;
private boolean _isNPC()
{
return config.getBoolean("npc", false);
}
public boolean isNPC()
{
return isNPC;
}
private String lastAccountName = null;
public String getLastAccountName()
{
return lastAccountName;
}
public String _getLastAccountName()
{
return config.getString("lastAccountName", null);
}
public void setLastAccountName(String lastAccountName)
{
this.lastAccountName = lastAccountName;
config.setProperty("lastAccountName", lastAccountName);
config.save();
ess.getUserMap().trackUUID(getConfigUUID(), lastAccountName, true);
}
public void setNPC(boolean set)
{
isNPC = set;
config.setProperty("npc", set);
config.save();
}
private boolean arePowerToolsEnabled;
public boolean arePowerToolsEnabled()
{
return arePowerToolsEnabled;
}
public void setPowerToolsEnabled(boolean set)
{
arePowerToolsEnabled = set;
config.setProperty("powertoolsenabled", set);
config.save();
}
public boolean togglePowerToolsEnabled()
{
boolean ret = !arePowerToolsEnabled();
setPowerToolsEnabled(ret);
return ret;
}
private boolean _arePowerToolsEnabled()
{
return config.getBoolean("powertoolsenabled", true);
}
private Map<String, Long> kitTimestamps;
private Map<String, Long> _getKitTimestamps()
{
if (config.isConfigurationSection("timestamps.kits"))
{
final ConfigurationSection section = config.getConfigurationSection("timestamps.kits");
final Map<String, Long> timestamps = new HashMap<String, Long>();
for (String command : section.getKeys(false))
{
if (section.isLong(command))
{
timestamps.put(command.toLowerCase(Locale.ENGLISH), section.getLong(command));
}
else if (section.isInt(command))
{
timestamps.put(command.toLowerCase(Locale.ENGLISH), (long)section.getInt(command));
}
}
return timestamps;
}
return new HashMap<String, Long>();
}
public long getKitTimestamp(String name)
{
name = name.replace('.', '_').replace('/', '_');
if (kitTimestamps != null && kitTimestamps.containsKey(name))
{
return kitTimestamps.get(name);
}
return 0l;
}
public void setKitTimestamp(final String name, final long time)
{
kitTimestamps.put(name.toLowerCase(Locale.ENGLISH), time);
config.setProperty("timestamps.kits", kitTimestamps);
config.save();
}
public void setConfigProperty(String node, Object object)
{
final String prefix = "info.";
node = prefix + node;
if (object instanceof Map)
{
config.setProperty(node, (Map)object);
}
else if (object instanceof List)
{
config.setProperty(node, (List<String>)object);
}
else if (object instanceof Location)
{
config.setProperty(node, (Location)object);
}
else if (object instanceof ItemStack)
{
config.setProperty(node, (ItemStack)object);
}
else
{
config.setProperty(node, object);
}
config.save();
}
public Set<String> getConfigKeys()
{
if (config.isConfigurationSection("info"))
{
return config.getConfigurationSection("info").getKeys(true);
}
return new HashSet<String>();
}
public Map<String, Object> getConfigMap()
{
if (config.isConfigurationSection("info"))
{
return config.getConfigurationSection("info").getValues(true);
}
return new HashMap<String, Object>();
}
public Map<String, Object> getConfigMap(String node)
{
if (config.isConfigurationSection("info." + node))
{
return config.getConfigurationSection("info." + node).getValues(true);
}
return new HashMap<String, Object>();
}
public UUID getConfigUUID()
{
return config.uuid;
}
public void save()
{
config.save();
}
public void startTransaction()
{
config.startTransaction();
}
public void stopTransaction()
{
config.stopTransaction();
}
}

View File

@@ -0,0 +1,270 @@
package com.earth2me.essentials;
import com.earth2me.essentials.utils.StringUtil;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.RemovalCause;
import com.google.common.cache.RemovalListener;
import com.google.common.cache.RemovalNotification;
import com.google.common.util.concurrent.UncheckedExecutionException;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.ExecutionException;
import net.ess3.api.IEssentials;
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;
private final transient ConcurrentSkipListSet<UUID> keys = new ConcurrentSkipListSet<UUID>();
private final transient ConcurrentSkipListMap<String, UUID> names = new ConcurrentSkipListMap<String, UUID>();
private final transient ConcurrentSkipListMap<UUID, ArrayList<String>> history = new ConcurrentSkipListMap<UUID, ArrayList<String>>();
private UUIDMap uuidMap;
public UserMap(final IEssentials ess)
{
super();
this.ess = ess;
uuidMap = new UUIDMap(ess);
//RemovalListener<UUID, User> remListener = new UserMapRemovalListener();
//users = CacheBuilder.newBuilder().maximumSize(ess.getSettings().getMaxUserCacheCount()).softValues().removalListener(remListener).build(this);
users = CacheBuilder.newBuilder().maximumSize(ess.getSettings().getMaxUserCacheCount()).softValues().build(this);
}
private void loadAllUsersAsync(final IEssentials ess)
{
ess.runTaskAsynchronously(new Runnable()
{
@Override
public void run()
{
synchronized (users)
{
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);
try
{
keys.add(UUID.fromString(name));
}
catch (IllegalArgumentException ex)
{
//Ignore these users till they rejoin.
}
}
uuidMap.loadAllUsers(names, history);
}
}
});
}
public boolean userExists(final UUID uuid)
{
return keys.contains(uuid);
}
public User getUser(final String name)
{
try
{
final String sanitizedName = StringUtil.safeString(name);
if (names.containsKey(sanitizedName))
{
final UUID uuid = names.get(sanitizedName);
return getUser(uuid);
}
final File userFile = getUserFileFromString(sanitizedName);
if (userFile.exists())
{
ess.getLogger().info("Importing user " + name + " to usermap.");
User user = new User(new OfflinePlayer(sanitizedName, ess.getServer()), ess);
trackUUID(user.getBase().getUniqueId(), user.getName(), true);
return user;
}
return null;
}
catch (UncheckedExecutionException ex)
{
return null;
}
}
public User getUser(final UUID uuid)
{
try
{
return users.get(uuid.toString());
}
catch (ExecutionException ex)
{
return null;
}
catch (UncheckedExecutionException ex)
{
return null;
}
}
public void trackUUID(final UUID uuid, final String name, boolean replace)
{
if (uuid != null)
{
keys.add(uuid);
if (name != null && name.length() > 0)
{
final String keyName = StringUtil.safeString(name);
if (!names.containsKey(keyName))
{
names.put(keyName, uuid);
uuidMap.writeUUIDMap();
}
else if (!names.get(keyName).equals(uuid))
{
if (replace)
{
ess.getLogger().info("Found new UUID for " + name + ". Replacing " + names.get(keyName).toString() + " with " + uuid.toString());
names.put(keyName, uuid);
uuidMap.writeUUIDMap();
}
else
{
if (ess.getSettings().isDebug())
{
ess.getLogger().info("Found old UUID for " + name + " (" + uuid.toString() + "). Not adding to usermap.");
}
}
}
}
}
}
@Override
public User load(final String stringUUID) throws Exception
{
UUID uuid = UUID.fromString(stringUUID);
Player player = ess.getServer().getPlayer(uuid);
if (player != null)
{
final User user = new User(player, ess);
trackUUID(uuid, user.getName(), true);
return user;
}
final File userFile = getUserFileFromID(uuid);
if (userFile.exists())
{
player = new OfflinePlayer(uuid, ess.getServer());
final User user = new User(player, ess);
((OfflinePlayer)player).setName(user.getLastAccountName());
trackUUID(uuid, user.getName(), false);
return user;
}
throw new Exception("User not found!");
}
@Override
public void reloadConfig()
{
getUUIDMap().forceWriteUUIDMap();
loadAllUsersAsync(ess);
}
public void invalidateAll()
{
users.invalidateAll();
}
public void removeUser(final String name)
{
if (names == null)
{
ess.getLogger().warning("Name collection is null, cannot remove user.");
return;
}
UUID uuid = names.get(name);
if (uuid != null)
{
keys.remove(uuid);
users.invalidate(uuid);
}
names.remove(name);
names.remove(StringUtil.safeString(name));
}
public Set<UUID> getAllUniqueUsers()
{
return Collections.unmodifiableSet(keys.clone());
}
public int getUniqueUsers()
{
return keys.size();
}
protected ConcurrentSkipListMap<String, UUID> getNames()
{
return names;
}
protected ConcurrentSkipListMap<UUID, ArrayList<String>> getHistory()
{
return history;
}
public List<String> getUserHistory(final UUID uuid)
{
return history.get(uuid);
}
public UUIDMap getUUIDMap()
{
return uuidMap;
}
private File getUserFileFromID(final UUID uuid)
{
final File userFolder = new File(ess.getDataFolder(), "userdata");
return new File(userFolder, uuid.toString() + ".yml");
}
public File getUserFileFromString(final String name)
{
final File userFolder = new File(ess.getDataFolder(), "userdata");
return new File(userFolder, StringUtil.sanitizeFileName(name) + ".yml");
}
// class UserMapRemovalListener implements RemovalListener
// {
// @Override
// public void onRemoval(final RemovalNotification notification)
// {
// Object value = notification.getValue();
// if (value != null)
// {
// ((User)value).cleanup();
// }
// }
// }
}

View File

@@ -0,0 +1,180 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.commands.WarpNotFoundException;
import com.earth2me.essentials.utils.StringUtil;
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.InvalidNameException;
import net.ess3.api.InvalidWorldException;
import org.bukkit.Location;
import org.bukkit.Server;
public class Warps implements IConf, net.ess3.api.IWarps
{
private static final Logger logger = Logger.getLogger("Essentials");
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();
}
@Override
public boolean isEmpty()
{
return warpPoints.isEmpty();
}
@Override
public Collection<String> getList()
{
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;
}
@Override
public Location getWarp(String warp) throws WarpNotFoundException, InvalidWorldException
{
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(warp));
if (conf == null)
{
throw new WarpNotFoundException();
}
return conf.getLocation(null, server);
}
@Override
public void setWarp(String name, Location loc) throws Exception
{
String filename = StringUtil.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(tl("similarWarpExist"));
}
conf = new EssentialsConf(confFile);
warpPoints.put(new StringIgnoreCase(name), conf);
}
conf.setProperty(null, loc);
conf.setProperty("name", name);
try
{
conf.saveWithError();
}
catch (IOException ex)
{
throw new IOException(tl("invalidWarpName"));
}
}
@Override
public void removeWarp(String name) throws Exception
{
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name));
if (conf == null)
{
throw new Exception(tl("warpNotExist"));
}
if (!conf.getFile().delete())
{
throw new Exception(tl("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, tl("loadWarpError", filename), ex);
}
}
}
}
}
//This is here for future 3.x api support. Not implemented here becasue storage is handled differently
@Override
public File getWarpFile(String name) throws InvalidNameException
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getCount()
{
return getList().size();
}
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

@@ -0,0 +1,176 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import java.io.File;
import java.math.BigDecimal;
import java.util.Locale;
import java.util.logging.Logger;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.inventory.ItemStack;
public class Worth implements IConf
{
private final EssentialsConf config;
public Worth(File dataFolder)
{
config = new EssentialsConf(new File(dataFolder, "worth.yml"));
config.setTemplateName("/worth.yml");
config.load();
}
public BigDecimal getPrice(ItemStack itemStack)
{
String itemname = itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
BigDecimal result;
//First check for matches with item name
result = config.getBigDecimal("worth." + itemname + "." + itemStack.getDurability(), BigDecimal.ONE.negate());
if (result.signum() < 0)
{
final ConfigurationSection itemNameMatch = config.getConfigurationSection("worth." + itemname);
if (itemNameMatch != null && itemNameMatch.getKeys(false).size() == 1)
{
result = config.getBigDecimal("worth." + itemname + ".0", BigDecimal.ONE.negate());
}
}
if (result.signum() < 0)
{
result = config.getBigDecimal("worth." + itemname + ".*", BigDecimal.ONE.negate());
}
if (result.signum() < 0)
{
result = config.getBigDecimal("worth." + itemname, BigDecimal.ONE.negate());
}
//Now we should check for item ID
if (result.signum() < 0)
{
result = config.getBigDecimal("worth." + itemStack.getTypeId() + "." + itemStack.getDurability(), BigDecimal.ONE.negate());
}
if (result.signum() < 0)
{
final ConfigurationSection itemNumberMatch = config.getConfigurationSection("worth." + itemStack.getTypeId());
if (itemNumberMatch != null && itemNumberMatch.getKeys(false).size() == 1)
{
result = config.getBigDecimal("worth." + itemStack.getTypeId() + ".0", BigDecimal.ONE.negate());
}
}
if (result.signum() < 0)
{
result = config.getBigDecimal("worth." + itemStack.getTypeId() + ".*", BigDecimal.ONE.negate());
}
if (result.signum() < 0)
{
result = config.getBigDecimal("worth." + itemStack.getTypeId(), BigDecimal.ONE.negate());
}
//This is to match the old worth syntax
if (result.signum() < 0)
{
result = config.getBigDecimal("worth-" + itemStack.getTypeId(), BigDecimal.ONE.negate());
}
if (result.signum() < 0)
{
return null;
}
return result;
}
public int getAmount(IEssentials ess, User user, ItemStack is, String[] args, boolean isBulkSell) throws Exception
{
if (is == null || is.getType() == Material.AIR)
{
throw new Exception(tl("itemSellAir"));
}
int id = is.getTypeId();
int amount = 0;
if (args.length > 1)
{
try
{
amount = Integer.parseInt(args[1].replaceAll("[^0-9]", ""));
}
catch (NumberFormatException ex)
{
throw new NotEnoughArgumentsException(ex);
}
if (args[1].startsWith("-"))
{
amount = -amount;
}
}
boolean stack = args.length > 1 && args[1].endsWith("s");
boolean requireStack = ess.getSettings().isTradeInStacks(id);
if (requireStack && !stack)
{
throw new Exception(tl("itemMustBeStacked"));
}
int max = 0;
for (ItemStack s : user.getBase().getInventory().getContents())
{
if (s == null || !s.isSimilar(is))
{
continue;
}
max += s.getAmount();
}
if (stack)
{
amount *= is.getType().getMaxStackSize();
}
if (amount < 1)
{
amount += max;
}
if (requireStack)
{
amount -= amount % is.getType().getMaxStackSize();
}
if (amount > max || amount < 1)
{
if (!isBulkSell)
{
user.sendMessage(tl("itemNotEnough2"));
user.sendMessage(tl("itemNotEnough3"));
throw new Exception(tl("itemNotEnough1"));
}
else
{
return amount;
}
}
return amount;
}
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

@@ -0,0 +1,464 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.EssentialsConf;
import com.earth2me.essentials.EssentialsUserConf;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import static com.earth2me.essentials.api.Economy.add;
import static com.earth2me.essentials.api.Economy.divide;
import static com.earth2me.essentials.api.Economy.format;
import static com.earth2me.essentials.api.Economy.getMoneyExact;
import static com.earth2me.essentials.api.Economy.hasEnough;
import static com.earth2me.essentials.api.Economy.hasLess;
import static com.earth2me.essentials.api.Economy.hasMore;
import static com.earth2me.essentials.api.Economy.multiply;
import static com.earth2me.essentials.api.Economy.setMoney;
import static com.earth2me.essentials.api.Economy.substract;
import com.earth2me.essentials.utils.NumberUtil;
import com.earth2me.essentials.utils.StringUtil;
import com.google.common.base.Charsets;
import java.io.File;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.ess3.api.IEssentials;
import net.ess3.api.MaxMoneyException;
/**
* Instead of using this api directly, we recommend to use the register plugin: http://bit.ly/RegisterMethod
*/
public class Economy
{
public Economy()
{
}
private static final Logger logger = Logger.getLogger("Essentials");
private static IEssentials ess;
private static final String noCallBeforeLoad = "Essentials API is called before Essentials is loaded.";
public static final MathContext MATH_CONTEXT = MathContext.DECIMAL128;
/**
* @param aEss the ess to set
*/
public static void setEss(IEssentials aEss)
{
ess = aEss;
}
private static void createNPCFile(String name)
{
File folder = new File(ess.getDataFolder(), "userdata");
name = StringUtil.safeString(name);
if (!folder.exists())
{
folder.mkdirs();
}
UUID npcUUID = UUID.nameUUIDFromBytes(("NPC:" + name).getBytes(Charsets.UTF_8));
EssentialsUserConf npcConfig = new EssentialsUserConf(name, npcUUID, new File(folder, npcUUID.toString() + ".yml"));
npcConfig.load();
npcConfig.setProperty("npc", true);
npcConfig.setProperty("lastAccountName", name);
npcConfig.setProperty("money", ess.getSettings().getStartingBalance());
npcConfig.forceSave();
ess.getUserMap().trackUUID(npcUUID, name, false);
}
private static void deleteNPC(String name)
{
User user = ess.getUser(name);
user.reset();
}
private static User getUserByName(String name)
{
if (ess == null)
{
throw new RuntimeException(noCallBeforeLoad);
}
if (name == null)
{
throw new RuntimeException("Economy username cannot be null");
}
return ess.getUser(name);
}
/**
* Returns the balance of a user
*
* @param name Name of the user
* @return balance
* @throws UserDoesNotExistException
*/
@Deprecated
public static double getMoney(String name) throws UserDoesNotExistException
{
return getMoneyExact(name).doubleValue();
}
public static BigDecimal getMoneyExact(String name) throws UserDoesNotExistException
{
User user = getUserByName(name);
if (user == null)
{
throw new UserDoesNotExistException(name);
}
return user.getMoney();
}
/**
* Sets the balance of a user
*
* @param name Name of the user
* @param balance The balance you want to set
* @throws UserDoesNotExistException If a user by that name does not exists
* @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
@Deprecated
public static void setMoney(String name, double balance) throws UserDoesNotExistException, NoLoanPermittedException
{
try
{
setMoney(name, BigDecimal.valueOf(balance));
}
catch (ArithmeticException e)
{
logger.log(Level.WARNING, "Failed to set balance of " + name + " to " + balance + ": " + e.getMessage(), e);
}
}
public static void setMoney(String name, BigDecimal balance) throws UserDoesNotExistException, NoLoanPermittedException
{
User user = getUserByName(name);
if (user == null)
{
throw new UserDoesNotExistException(name);
}
if (balance.compareTo(ess.getSettings().getMinMoney()) < 0)
{
throw new NoLoanPermittedException();
}
if (balance.signum() < 0 && !user.isAuthorized("essentials.eco.loan"))
{
throw new NoLoanPermittedException();
}
try
{
user.setMoney(balance);
}
catch (MaxMoneyException ex)
{
//TODO: Update API to show max balance errors
}
Trade.log("API", "Set", "API", name, new Trade(balance, ess), null, null, null, ess);
}
/**
* Adds money to the balance of a user
*
* @param name Name of the user
* @param amount The money you want to add
* @throws UserDoesNotExistException If a user by that name does not exists
* @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
@Deprecated
public static void add(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException
{
try
{
add(name, BigDecimal.valueOf(amount));
}
catch (ArithmeticException e)
{
logger.log(Level.WARNING, "Failed to add " + amount + " to balance of " + name + ": " + e.getMessage(), e);
}
}
public static void add(String name, BigDecimal amount) throws UserDoesNotExistException, NoLoanPermittedException, ArithmeticException
{
BigDecimal result = getMoneyExact(name).add(amount, MATH_CONTEXT);
setMoney(name, result);
Trade.log("API", "Add", "API", name, new Trade(amount, ess), null, null, null, ess);
}
/**
* Substracts money from the balance of a user
*
* @param name Name of the user
* @param amount The money you want to substract
* @throws UserDoesNotExistException If a user by that name does not exists
* @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
@Deprecated
public static void subtract(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException
{
try
{
substract(name, BigDecimal.valueOf(amount));
}
catch (ArithmeticException e)
{
logger.log(Level.WARNING, "Failed to substract " + amount + " of balance of " + name + ": " + e.getMessage(), e);
}
}
public static void substract(String name, BigDecimal amount) throws UserDoesNotExistException, NoLoanPermittedException, ArithmeticException
{
BigDecimal result = getMoneyExact(name).subtract(amount, MATH_CONTEXT);
setMoney(name, result);
Trade.log("API", "Subtract", "API", name, new Trade(amount, ess), null, null, null, ess);
}
/**
* Divides the balance of a user by a value
*
* @param name Name of the user
* @param value The balance is divided by this value
* @throws UserDoesNotExistException If a user by that name does not exists
* @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
@Deprecated
public static void divide(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException
{
try
{
divide(name, BigDecimal.valueOf(amount));
}
catch (ArithmeticException e)
{
logger.log(Level.WARNING, "Failed to divide balance of " + name + " by " + amount + ": " + e.getMessage(), e);
}
}
public static void divide(String name, BigDecimal amount) throws UserDoesNotExistException, NoLoanPermittedException, ArithmeticException
{
BigDecimal result = getMoneyExact(name).divide(amount, MATH_CONTEXT);
setMoney(name, result);
Trade.log("API", "Divide", "API", name, new Trade(amount, ess), null, null, null, ess);
}
/**
* Multiplies the balance of a user by a value
*
* @param name Name of the user
* @param value The balance is multiplied by this value
* @throws UserDoesNotExistException If a user by that name does not exists
* @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
@Deprecated
public static void multiply(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException
{
try
{
multiply(name, BigDecimal.valueOf(amount));
}
catch (ArithmeticException e)
{
logger.log(Level.WARNING, "Failed to multiply balance of " + name + " by " + amount + ": " + e.getMessage(), e);
}
}
public static void multiply(String name, BigDecimal amount) throws UserDoesNotExistException, NoLoanPermittedException, ArithmeticException
{
BigDecimal result = getMoneyExact(name).multiply(amount, MATH_CONTEXT);
setMoney(name, result);
Trade.log("API", "Multiply", "API", name, new Trade(amount, ess), null, null, null, ess);
}
/**
* Resets the balance of a user to the starting balance
*
* @param name Name of the user
* @throws UserDoesNotExistException If a user by that name does not exists
* @throws NoLoanPermittedException If the user is not allowed to have a negative balance
*/
public static void resetBalance(String name) throws UserDoesNotExistException, NoLoanPermittedException
{
if (ess == null)
{
throw new RuntimeException(noCallBeforeLoad);
}
setMoney(name, ess.getSettings().getStartingBalance());
Trade.log("API", "Reset", "API", name, new Trade(BigDecimal.ZERO, ess), null, null, null, ess);
}
/**
* @param name Name of the user
* @param amount The amount of money the user should have
* @return true, if the user has more or an equal amount of money
* @throws UserDoesNotExistException If a user by that name does not exists
*/
@Deprecated
public static boolean hasEnough(String name, double amount) throws UserDoesNotExistException
{
try
{
return hasEnough(name, BigDecimal.valueOf(amount));
}
catch (ArithmeticException e)
{
logger.log(Level.WARNING, "Failed to compare balance of " + name + " with " + amount + ": " + e.getMessage(), e);
return false;
}
}
public static boolean hasEnough(String name, BigDecimal amount) throws UserDoesNotExistException, ArithmeticException
{
return amount.compareTo(getMoneyExact(name)) <= 0;
}
/**
* @param name Name of the user
* @param amount The amount of money the user should have
* @return true, if the user has more money
* @throws UserDoesNotExistException If a user by that name does not exists
*/
@Deprecated
public static boolean hasMore(String name, double amount) throws UserDoesNotExistException
{
try
{
return hasMore(name, BigDecimal.valueOf(amount));
}
catch (ArithmeticException e)
{
logger.log(Level.WARNING, "Failed to compare balance of " + name + " with " + amount + ": " + e.getMessage(), e);
return false;
}
}
public static boolean hasMore(String name, BigDecimal amount) throws UserDoesNotExistException, ArithmeticException
{
return amount.compareTo(getMoneyExact(name)) < 0;
}
/**
* @param name Name of the user
* @param amount The amount of money the user should not have
* @return true, if the user has less money
* @throws UserDoesNotExistException If a user by that name does not exists
*/
@Deprecated
public static boolean hasLess(String name, double amount) throws UserDoesNotExistException
{
try
{
return hasLess(name, BigDecimal.valueOf(amount));
}
catch (ArithmeticException e)
{
logger.log(Level.WARNING, "Failed to compare balance of " + name + " with " + amount + ": " + e.getMessage(), e);
return false;
}
}
public static boolean hasLess(String name, BigDecimal amount) throws UserDoesNotExistException, ArithmeticException
{
return amount.compareTo(getMoneyExact(name)) > 0;
}
/**
* Test if the user has a negative balance
*
* @param name Name of the user
* @return true, if the user has a negative balance
* @throws UserDoesNotExistException If a user by that name does not exists
*/
public static boolean isNegative(String name) throws UserDoesNotExistException
{
return getMoneyExact(name).signum() < 0;
}
/**
* Formats the amount of money like all other Essentials functions. Example: $100000 or $12345.67
*
* @param amount The amount of money
* @return Formatted money
*/
@Deprecated
public static String format(double amount)
{
try
{
return format(BigDecimal.valueOf(amount));
}
catch (NumberFormatException e)
{
logger.log(Level.WARNING, "Failed to display " + amount + ": " + e.getMessage(), e);
return "NaN";
}
}
public static String format(BigDecimal amount)
{
if (ess == null)
{
throw new RuntimeException(noCallBeforeLoad);
}
return NumberUtil.displayCurrency(amount, ess);
}
/**
* Test if a player exists to avoid the UserDoesNotExistException
*
* @param name Name of the user
* @return true, if the user exists
*/
public static boolean playerExists(String name)
{
return getUserByName(name) != null;
}
/**
* Test if a player is a npc
*
* @param name Name of the player
* @return true, if it's a npc
* @throws UserDoesNotExistException
*/
public static boolean isNPC(String name) throws UserDoesNotExistException
{
User user = getUserByName(name);
if (user == null)
{
throw new UserDoesNotExistException(name);
}
return user.isNPC();
}
/**
* Creates dummy files for a npc, if there is no player yet with that name.
*
* @param name Name of the player
* @return true, if a new npc was created
*/
public static boolean createNPC(String name)
{
User user = getUserByName(name);
if (user == null)
{
createNPCFile(name);
return true;
}
return false;
}
/**
* Deletes a user, if it is marked as npc.
*
* @param name Name of the player
* @throws UserDoesNotExistException
*/
public static void removeNPC(String name) throws UserDoesNotExistException
{
User user = getUserByName(name);
if (user == null)
{
throw new UserDoesNotExistException(name);
}
deleteNPC(name);
}
}

View File

@@ -0,0 +1,13 @@
package com.earth2me.essentials.api;
import java.util.Locale;
public interface II18n
{
/**
* Gets the current locale setting
* @return the current locale, if not set it will return the default locale
*/
Locale getCurrentLocale();
}

View File

@@ -0,0 +1,20 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.User;
import java.util.List;
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;
public String names(ItemStack item);
public String name(ItemStack item);
List<ItemStack> getMatching(User user, String[] args) throws Exception;
}

View File

@@ -0,0 +1,53 @@
package com.earth2me.essentials.api;
import java.util.Collection;
import net.ess3.api.IUser;
import org.bukkit.Location;
public interface IJails extends IReload
{
/**
* Gets the location of the jail with the given name
* @param jailName The name of the jail
* @return the location of the jail
* @throws Exception if the jail does not exist
*/
Location getJail(String jailName) throws Exception;
/**
* Gets a list of jails by names
* @return a list of jails, if there are none the list will be empty
* @throws Exception
*/
Collection<String> getList() throws Exception;
/**
* Gets the number of jails
* @return the size of the list of jails
*/
int getCount();
/**
* Remove the jail with the given name
* @param jail the jail to remove
* @throws Exception if the jail does not exist
*/
void removeJail(String jail) throws Exception;
/**
* Attempts to send the given user to the given jail
* @param user the user to send to jail
* @param jail the jail to send the user to
* @throws Exception if the user is offline or jail does not exist
*/
void sendToJail(IUser user, String jail) throws Exception;
/**
* Set a new jail with the given name and location
* @param jailName the name of the jail being set
* @param loc the location of the jail being set
* @throws Exception
*/
void setJail(String jailName, Location loc) throws Exception;
}

View File

@@ -0,0 +1,7 @@
package com.earth2me.essentials.api;
public interface IReload
{
void onReload();
}

View File

@@ -0,0 +1,112 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.Trade;
import net.ess3.api.IUser;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent;
public interface ITeleport
{
/**
* Used to skip teleportPlayer delay when teleporting someone to a location or player.
*
* @param loc - Where should the player end up
* @param cooldown - If cooldown should be enforced
* @param cause - The reported teleportPlayer cause
* @throws Exception
*/
void now(Location loc, boolean cooldown, PlayerTeleportEvent.TeleportCause cause) throws Exception;
/**
* Used to skip teleportPlayer delay when teleporting someone to a location or player.
*
* @param entity - Where should the player end up
* @param cooldown - If cooldown should be enforced
* @param cause - The reported teleportPlayer cause
* @throws Exception
*/
void now(Player entity, boolean cooldown, PlayerTeleportEvent.TeleportCause cause) throws Exception;
@Deprecated
void teleport(Location loc, Trade chargeFor) throws Exception;
/**
* Teleport a player to a specific location
*
* @param loc - Where should the player end up
* @param chargeFor - What the user will be charged if teleportPlayer is successful
* @param cause - The reported teleportPlayer cause
* @throws Exception
*/
void teleport(Location loc, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause) throws Exception;
/**
* Teleport a player to a specific player
*
* @param entity - Where should the player end up
* @param chargeFor - What the user will be charged if teleportPlayer is successful
* @param cause - The reported teleportPlayer cause
* @throws Exception
*/
void teleport(Player entity, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause) throws Exception;
/**
* Teleport a player to a specific location
*
* @param otherUser - Which user will be teleported
* @param loc - Where should the player end up
* @param chargeFor - What the user will be charged if teleportPlayer is successful
* @param cause - The reported teleportPlayer cause
* @throws Exception
*/
void teleportPlayer(IUser otherUser, Location loc, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause) throws Exception;
/**
* Teleport a player to a specific player
*
* @param otherUser - Which user will be teleported
* @param entity - Where should the player end up
* @param chargeFor - What the user will be charged if teleportPlayer is successful
* @param cause - The reported teleportPlayer cause
* @throws Exception
*/
void teleportPlayer(IUser otherUser, Player entity, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause) throws Exception;
/**
* Teleport wrapper used to handle tp fallback on /jail and /home
*
* @param chargeFor - What the user will be charged if teleportPlayer is successful
* @param cause - The reported teleportPlayer cause
* @throws Exception
*/
public void respawn(final Trade chargeFor, PlayerTeleportEvent.TeleportCause cause) throws Exception;
/**
* Teleport wrapper used to handle /warp teleports
*
* @param otherUser - Which user will be teleported
* @param warp - The name of the warp the user will be teleported too.
* @param chargeFor - What the user will be charged if teleportPlayer is successful
* @param cause - The reported teleportPlayer cause
* @throws Exception
*/
public void warp(IUser otherUser, String warp, Trade chargeFor, PlayerTeleportEvent.TeleportCause cause) throws Exception;
/**
* Teleport wrapper used to handle /back teleports
*
* @param chargeFor - What the user will be charged if teleportPlayer is successful
* @throws Exception
*/
public void back(Trade chargeFor) throws Exception;
/**
* Teleport wrapper used to handle throwing user home after a jail sentence
*
* @throws Exception
*/
public void back() throws Exception;
}

View File

@@ -0,0 +1,68 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.IConf;
import com.earth2me.essentials.commands.WarpNotFoundException;
import java.io.File;
import java.util.Collection;
import org.bukkit.Location;
public interface IWarps extends IConf
{
/**
* Get a warp by name
*
* @param warp - Warp name
* @return - Location the warp is set to
* @throws WarpNotFoundException When the warp is not found
* @throws InvalidWorldException When the world the warp is in is not found
*/
Location getWarp(String warp) throws WarpNotFoundException, net.ess3.api.InvalidWorldException;
/**
* Gets a list of warps
*
* @return - A {@link Collection} of warps
*/
Collection<String> getList();
/**
* Gets the number of warps
*
* @return the size of the list of warps
*/
int getCount();
/**
* Delete a warp from the warp DB
*
* @param name - Name of warp
* @throws Exception
*/
void removeWarp(String name) throws Exception;
/**
* Set a warp
*
* @param name - Name of warp
* @param loc - Location of warp
* @throws Exception
*/
void setWarp(String name, Location loc) throws Exception;
/**
* Check to see if the file is empty
*
* @return
*/
boolean isEmpty();
/**
* Get a warp file note: this is not yet implemented, as 3.x uses different storage methods
*
* @param name - name of file
* @return - an instance of the file
* @throws InvalidNameException - When the file is not found
*/
File getWarpFile(String name) throws net.ess3.api.InvalidNameException;
}

View File

@@ -0,0 +1,16 @@
package com.earth2me.essentials.api;
public class InvalidNameException extends Exception
{
/**
* NOTE: This is not implemented yet, just here for future 3.x api support
* Allow serialization of the InvalidNameException exception
*/
private static final long serialVersionUID = 1485321420293663139L;
public InvalidNameException(Throwable thrwbl)
{
super(thrwbl);
}
}

View File

@@ -0,0 +1,20 @@
package com.earth2me.essentials.api;
import static com.earth2me.essentials.I18n.tl;
public class InvalidWorldException extends Exception
{
private final String world;
public InvalidWorldException(final String world)
{
super(tl("invalidWorld"));
this.world = world;
}
public String getWorld()
{
return this.world;
}
}

View File

@@ -0,0 +1,7 @@
package com.earth2me.essentials.api;
public class NoLoanPermittedException extends net.ess3.api.NoLoanPermittedException
{
}

View File

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

View File

@@ -0,0 +1,71 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
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 = getPlayer(server, user, args, 0);
toggleAfk(afkUser);
}
else
{
toggleAfk(user);
}
}
@Override
public void run(Server server, CommandSource sender, String commandLabel, String[] args) throws Exception
{
if (args.length > 0)
{
User afkUser = getPlayer(server, args, 0, true, false);
toggleAfk(afkUser);
}
else
{
throw new NotEnoughArgumentsException();
}
}
private void toggleAfk(User user)
{
user.setDisplayNick();
String msg = "";
if (!user.toggleAfk())
{
//user.sendMessage(_("markedAsNotAway"));
if (!user.isHidden())
{
msg = tl("userIsNotAway", user.getDisplayName());
}
user.updateActivity(false);
}
else
{
//user.sendMessage(_("markedAsAway"));
if (!user.isHidden())
{
msg = tl("userIsAway", user.getDisplayName());
}
}
if (!msg.isEmpty())
{
ess.broadcastMessage(user, msg);
}
}
}

View File

@@ -0,0 +1,29 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.LocationUtil;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.entity.TNTPrimed;
// This command has a in theme message that only shows if you supply a parameter #EasterEgg
public class Commandantioch extends EssentialsCommand
{
public Commandantioch()
{
super("antioch");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0)
{
ess.broadcastMessage(user, "...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,");
ess.broadcastMessage(user, "who being naughty in My sight, shall snuff it.");
}
final Location loc = LocationUtil.getTarget(user.getBase());
loc.getWorld().spawn(loc, TNTPrimed.class);
}
}

View File

@@ -0,0 +1,33 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
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.getLastLocation() == null)
{
throw new Exception(tl("noLocationFound"));
}
if (user.getWorld() != user.getLastLocation().getWorld() && ess.getSettings().isWorldTeleportPermissions()
&& !user.isAuthorized("essentials.worlds." + user.getLastLocation().getWorld().getName()))
{
throw new Exception(tl("noPerm", "essentials.worlds." + user.getLastLocation().getWorld().getName()));
}
final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().back(charge);
throw new NoChargeException();
}
}

View File

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

View File

@@ -0,0 +1,49 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.NumberUtil;
import java.math.BigDecimal;
import org.bukkit.Server;
public class Commandbalance extends EssentialsCommand
{
public Commandbalance()
{
super("balance");
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
User target = getPlayer(server, args, 0, true, true);
sender.sendMessage(tl("balanceOther", target.isHidden() ? target.getName() : target.getDisplayName(), NumberUtil.displayCurrency(target.getMoney(), ess)));
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length == 1 && user.isAuthorized("essentials.balance.others"))
{
final User target = getPlayer(server, args, 0, true, true);
final BigDecimal bal = target.getMoney();
user.sendMessage(tl("balanceOther", target.isHidden() ? target.getName() : target.getDisplayName(), NumberUtil.displayCurrency(bal, ess)));
}
else if (args.length < 2)
{
final BigDecimal bal = user.getMoney();
user.sendMessage(tl("balance", NumberUtil.displayCurrency(bal, ess)));
}
else
{
throw new NotEnoughArgumentsException();
}
}
}

View File

@@ -0,0 +1,199 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.textreader.SimpleTextInput;
import com.earth2me.essentials.textreader.TextPager;
import com.earth2me.essentials.utils.NumberUtil;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.bukkit.Server;
public class Commandbalancetop extends EssentialsCommand
{
public Commandbalancetop()
{
super("balancetop");
}
private static final int CACHETIME = 2 * 60 * 1000;
public static final int MINUSERS = 50;
private static final SimpleTextInput cache = new SimpleTextInput();
private static long cacheage = 0;
private static final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
int page = 0;
boolean force = false;
if (args.length > 0)
{
try
{
page = Integer.parseInt(args[0]);
}
catch (NumberFormatException ex)
{
if (args[0].equalsIgnoreCase("force")
&& (!sender.isPlayer() || ess.getUser(sender.getPlayer()).isAuthorized("essentials.balancetop.force")))
{
force = true;
}
}
}
if (!force && lock.readLock().tryLock())
{
try
{
if (cacheage > System.currentTimeMillis() - CACHETIME)
{
outputCache(sender, commandLabel, page);
return;
}
if (ess.getUserMap().getUniqueUsers() > MINUSERS)
{
sender.sendMessage(tl("orderBalances", ess.getUserMap().getUniqueUsers()));
}
}
finally
{
lock.readLock().unlock();
}
ess.runTaskAsynchronously(new Viewer(sender, commandLabel, page, force));
}
else
{
if (ess.getUserMap().getUniqueUsers() > MINUSERS)
{
sender.sendMessage(tl("orderBalances", ess.getUserMap().getUniqueUsers()));
}
ess.runTaskAsynchronously(new Viewer(sender, commandLabel, page, force));
}
}
private static void outputCache(final CommandSource sender, String command, int page)
{
final Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(cacheage);
final DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
sender.sendMessage(tl("balanceTop", format.format(cal.getTime())));
new TextPager(cache).showPage(Integer.toString(page), null, "balancetop", sender);
}
private class Calculator implements Runnable
{
private final transient Viewer viewer;
private final boolean force;
public Calculator(final Viewer viewer, final boolean force)
{
this.viewer = viewer;
this.force = force;
}
@Override
public void run()
{
lock.writeLock().lock();
try
{
if (force || cacheage <= System.currentTimeMillis() - CACHETIME)
{
cache.getLines().clear();
final Map<String, BigDecimal> balances = new HashMap<String, BigDecimal>();
BigDecimal totalMoney = BigDecimal.ZERO;
if (ess.getSettings().isEcoDisabled())
{
if (ess.getSettings().isDebug())
{
ess.getLogger().info("Internal economy functions disabled, aborting baltop.");
}
}
else
{
for (UUID u : ess.getUserMap().getAllUniqueUsers())
{
final User user = ess.getUserMap().getUser(u);
if (user != null)
{
final BigDecimal userMoney = user.getMoney();
user.updateMoneyCache(userMoney);
totalMoney = totalMoney.add(userMoney);
final String name = user.isHidden() ? user.getName() : user.getDisplayName();
balances.put(name, userMoney);
}
}
}
final List<Map.Entry<String, BigDecimal>> sortedEntries = new ArrayList<Map.Entry<String, BigDecimal>>(balances.entrySet());
Collections.sort(sortedEntries, new Comparator<Map.Entry<String, BigDecimal>>()
{
@Override
public int compare(final Entry<String, BigDecimal> entry1, final Entry<String, BigDecimal> entry2)
{
return entry2.getValue().compareTo(entry1.getValue());
}
});
cache.getLines().add(tl("serverTotal", NumberUtil.displayCurrency(totalMoney, ess)));
int pos = 1;
for (Map.Entry<String, BigDecimal> entry : sortedEntries)
{
cache.getLines().add(pos + ". " + entry.getKey() + ", " + NumberUtil.displayCurrency(entry.getValue(), ess));
pos++;
}
cacheage = System.currentTimeMillis();
}
}
finally
{
lock.writeLock().unlock();
}
ess.runTaskAsynchronously(viewer);
}
}
private class Viewer implements Runnable
{
private final transient CommandSource sender;
private final transient int page;
private final transient boolean force;
private final transient String commandLabel;
public Viewer(final CommandSource sender, final String commandLabel, final int page, final boolean force)
{
this.sender = sender;
this.page = page;
this.force = force;
this.commandLabel = commandLabel;
}
@Override
public void run()
{
lock.readLock().lock();
try
{
if (!force && cacheage > System.currentTimeMillis() - CACHETIME)
{
outputCache(sender, commandLabel, page);
return;
}
}
finally
{
lock.readLock().unlock();
}
ess.runTaskAsynchronously(new Calculator(new Viewer(sender, commandLabel, page, false), force));
}
}
}

View File

@@ -0,0 +1,80 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import com.earth2me.essentials.Console;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.OfflinePlayer;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.FormatUtil;
import java.util.logging.Level;
import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.Server;
public class Commandban extends EssentialsCommand
{
public Commandban()
{
super("ban");
}
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
boolean nomatch = false;
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
User user;
try
{
user = getPlayer(server, args, 0, true, true);
}
catch (PlayerNotFoundException e)
{
nomatch = true;
user = ess.getUser(new OfflinePlayer(args[0], ess.getServer()));
}
if (!user.getBase().isOnline())
{
if (sender.isPlayer() && !ess.getUser(sender.getPlayer()).isAuthorized("essentials.ban.offline"))
{
throw new Exception(tl("banExemptOffline"));
}
}
else
{
if (user.isAuthorized("essentials.ban.exempt") && sender.isPlayer())
{
throw new Exception(tl("banExempt"));
}
}
final String senderName = sender.isPlayer() ? sender.getPlayer().getDisplayName() : Console.NAME;
String banReason;
if (args.length > 1)
{
banReason = FormatUtil.replaceFormat(getFinalArg(args, 1).replace("\\n", "\n").replace("|", "\n"));
}
else
{
banReason = tl("defaultBanReason");
}
ess.getServer().getBanList(BanList.Type.NAME).addBan(user.getName(), banReason, null, senderName);
String banDisplay = tl("banFormat", banReason, senderName);
user.getBase().kickPlayer(banDisplay);
server.getLogger().log(Level.INFO, tl("playerBanned", senderName, user.getName(), banDisplay));
if (nomatch)
{
sender.sendMessage(tl("userUnknown", user.getName()));
}
ess.broadcastMessage("essentials.ban.notify", tl("playerBanned", senderName, user.getName(), banReason));
}
}

View File

@@ -0,0 +1,70 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import com.earth2me.essentials.Console;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.FormatUtil;
import java.util.logging.Level;
import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.Server;
//TODO: Add kick to online players matching ip ban.
public class Commandbanip extends EssentialsCommand
{
public Commandbanip()
{
super("banip");
}
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
final String senderName = sender.isPlayer() ? sender.getPlayer().getDisplayName() : Console.NAME;
String ipAddress;
if (FormatUtil.validIP(args[0]))
{
ipAddress = args[0];
}
else
{
try
{
User player = getPlayer(server, args, 0, true, true);
ipAddress = player.getLastLoginAddress();
}
catch (PlayerNotFoundException ex)
{
ipAddress = args[0];
}
}
if (ipAddress.isEmpty())
{
throw new PlayerNotFoundException();
}
String banReason;
if (args.length > 1)
{
banReason = FormatUtil.replaceFormat(getFinalArg(args, 1).replace("\\n", "\n").replace("|", "\n"));
}
else
{
banReason = tl("defaultBanReason");
}
ess.getServer().getBanList(BanList.Type.IP).addBan(ipAddress, banReason, null, senderName);
server.getLogger().log(Level.INFO, tl("playerBanIpAddress", senderName, ipAddress, banReason));
ess.broadcastMessage("essentials.ban.notify", tl("playerBanIpAddress", senderName, ipAddress, banReason));
}
}

View File

@@ -0,0 +1,51 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.LocationUtil;
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 = LocationUtil.getTarget(user.getBase());
final Location safeLocation = LocationUtil.getSafeDestination(loc);
final boolean success = user.getWorld().generateTree(safeLocation, tree);
if (success)
{
user.sendMessage(tl("bigTreeSuccess"));
}
else
{
throw new Exception(tl("bigTreeFailure"));
}
}
}

View File

@@ -0,0 +1,92 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BookMeta;
public class Commandbook extends EssentialsCommand
{
public Commandbook()
{
super("book");
}
//TODO: Translate this
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
final ItemStack item = user.getBase().getItemInHand();
final String player = user.getName();
if (item.getType() == Material.WRITTEN_BOOK)
{
BookMeta bmeta = (BookMeta)item.getItemMeta();
if (args.length > 1 && args[0].equalsIgnoreCase("author"))
{
if (user.isAuthorized("essentials.book.author") && (isAuthor(bmeta, player) || user.isAuthorized("essentials.book.others")))
{
bmeta.setAuthor(args[1]);
item.setItemMeta(bmeta);
user.sendMessage(tl("bookAuthorSet", getFinalArg(args, 1)));
}
else
{
throw new Exception(tl("denyChangeAuthor"));
}
}
else if (args.length > 1 && args[0].equalsIgnoreCase("title"))
{
if (user.isAuthorized("essentials.book.title") && (isAuthor(bmeta, player) || user.isAuthorized("essentials.book.others")))
{
bmeta.setTitle(args[1]);
item.setItemMeta(bmeta);
user.sendMessage(tl("bookTitleSet", getFinalArg(args, 1)));
}
else
{
throw new Exception(tl("denyChangeTitle"));
}
}
else
{
if (isAuthor(bmeta, player) || user.isAuthorized("essentials.book.others"))
{
ItemStack newItem = new ItemStack(Material.BOOK_AND_QUILL, item.getAmount());
newItem.setItemMeta(bmeta);
user.getBase().setItemInHand(newItem);
user.sendMessage(tl("editBookContents"));
}
else
{
throw new Exception(tl("denyBookEdit"));
}
}
}
else if (item.getType() == Material.BOOK_AND_QUILL)
{
BookMeta bmeta = (BookMeta)item.getItemMeta();
if (!user.isAuthorized("essentials.book.author"))
{
bmeta.setAuthor(player);
}
ItemStack newItem = new ItemStack(Material.WRITTEN_BOOK, item.getAmount());
newItem.setItemMeta(bmeta);
user.getBase().setItemInHand(newItem);
user.sendMessage(tl("bookLocked"));
}
else
{
throw new Exception(tl("holdBook"));
}
}
private boolean isAuthor(BookMeta bmeta, String player)
{
String author = bmeta.getAuthor();
return author != null && author.equalsIgnoreCase(player);
}
}

View File

@@ -0,0 +1,48 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
import org.bukkit.event.block.BlockBreakEvent;
public class Commandbreak extends EssentialsCommand
{
public Commandbreak()
{
super("break");
}
//TODO: Switch to use util class
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
final Block block = user.getBase().getTargetBlock(null, 20);
if (block == null)
{
throw new NoChargeException();
}
if (block.getType() == Material.AIR)
{
throw new NoChargeException();
}
if (block.getType() == Material.BEDROCK && !user.isAuthorized("essentials.break.bedrock"))
{
throw new Exception(tl("noBreakBedrock"));
}
//final List<ItemStack> list = (List<ItemStack>)block.getDrops();
//final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase(), list);
final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase());
server.getPluginManager().callEvent(event);
if (event.isCancelled())
{
throw new NoChargeException();
}
else
{
block.setType(Material.AIR);
}
}
}

View File

@@ -0,0 +1,38 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.FormatUtil;
import org.bukkit.Server;
public class Commandbroadcast extends EssentialsCommand
{
public Commandbroadcast()
{
super("broadcast");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
sendBroadcast(user.getDisplayName(), args);
}
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
sendBroadcast(sender.getSender().getName(), args);
}
private void sendBroadcast(final String name, final String[] args) throws NotEnoughArgumentsException
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
ess.broadcastMessage(tl("broadcast", FormatUtil.replaceFormat(getFinalArg(args, 0)).replace("\\n", "\n"), name));
}
}

View File

@@ -0,0 +1,33 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commandburn extends EssentialsCommand
{
public Commandburn()
{
super("burn");
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
if (args[0].trim().length() < 2)
{
throw new NotEnoughArgumentsException();
}
User user = getPlayer(server, sender, args, 0);
user.getBase().setFireTicks(Integer.parseInt(args[1]) * 20);
sender.sendMessage(tl("burnMsg", user.getDisplayName(), Integer.parseInt(args[1])));
}
}

View File

@@ -0,0 +1,161 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.NumberUtil;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Locale;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class Commandclearinventory extends EssentialsCommand
{
public Commandclearinventory()
{
super("clearinventory");
}
private static final int BASE_AMOUNT = 100000;
private static final int EXTENDED_CAP = 8;
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
parseCommand(server, user.getSource(), args, user.isAuthorized("essentials.clearinventory.others"), user.isAuthorized("essentials.clearinventory.all") || user.isAuthorized("essentials.clearinventory.multiple"));
}
@Override
protected void run(Server server, CommandSource sender, String commandLabel, String[] args) throws Exception
{
parseCommand(server, sender, args, true, true);
}
private void parseCommand(Server server, CommandSource sender, String[] args, boolean allowOthers, boolean allowAll) throws Exception
{
Collection<Player> players = new ArrayList<Player>();
int offset = 0;
if (sender.isPlayer())
{
players.add(sender.getPlayer());
}
if (allowAll && args.length > 0 && args[0].contentEquals("*"))
{
sender.sendMessage(tl("inventoryClearingFromAll"));
offset = 1;
players = ess.getOnlinePlayers();
}
else if (allowOthers && args.length > 0 && args[0].trim().length() > 2)
{
offset = 1;
players = server.matchPlayer(args[0].trim());
}
if (players.size() < 1)
{
throw new PlayerNotFoundException();
}
for (Player player : players)
{
clearHandler(sender, player, args, offset, players.size() < EXTENDED_CAP);
}
}
protected void clearHandler(CommandSource sender, Player player, String[] args, int offset, boolean showExtended) throws Exception
{
short data = -1;
int type = -1;
int amount = -1;
if (args.length > (offset + 1) && NumberUtil.isInt(args[(offset + 1)]))
{
amount = Integer.parseInt(args[(offset + 1)]);
}
if (args.length > offset)
{
if (args[offset].equalsIgnoreCase("**"))
{
type = -2;
}
else if (!args[offset].equalsIgnoreCase("*"))
{
final String[] split = args[offset].split(":");
final ItemStack item = ess.getItemDb().get(split[0]);
type = item.getTypeId();
if (split.length > 1 && NumberUtil.isInt(split[1]))
{
data = Short.parseShort(split[1]);
}
else
{
data = item.getDurability();
}
}
}
if (type == -1) // type -1 represents wildcard or all items
{
if (showExtended)
{
sender.sendMessage(tl("inventoryClearingAllItems", player.getDisplayName()));
}
player.getInventory().clear();
}
else if (type == -2) // type -2 represents double wildcard or all items and armor
{
if (showExtended)
{
sender.sendMessage(tl("inventoryClearingAllArmor", player.getDisplayName()));
}
player.getInventory().clear();
player.getInventory().setArmorContents(null);
}
else
{
if (data == -1) // data -1 means that all subtypes will be cleared
{
ItemStack stack = new ItemStack(type);
if (showExtended)
{
sender.sendMessage(tl("inventoryClearingAllStack", stack.getType().toString().toLowerCase(Locale.ENGLISH), player.getDisplayName()));
}
player.getInventory().clear(type, data);
}
else if (amount == -1) // amount -1 means all items will be cleared
{
ItemStack stack = new ItemStack(type, BASE_AMOUNT, data);
ItemStack removedStack = player.getInventory().removeItem(stack).get(0);
final int removedAmount = (BASE_AMOUNT - removedStack.getAmount());
if (removedAmount > 0 || showExtended)
{
sender.sendMessage(tl("inventoryClearingStack", removedAmount, stack.getType().toString().toLowerCase(Locale.ENGLISH), player.getDisplayName()));
}
}
else
{
if (amount < 0)
{
amount = 1;
}
ItemStack stack = new ItemStack(type, amount, data);
if (player.getInventory().containsAtLeast(stack, amount))
{
sender.sendMessage(tl("inventoryClearingStack", amount, stack.getType().toString().toLowerCase(Locale.ENGLISH), player.getDisplayName()));
player.getInventory().removeItem(stack);
}
else
{
if (showExtended)
{
sender.sendMessage(tl("inventoryClearFail", player.getDisplayName(), amount, stack.getType().toString().toLowerCase(Locale.ENGLISH)));
}
}
}
}
}
}

View File

@@ -0,0 +1,58 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commandcompass extends EssentialsCommand
{
public Commandcompass()
{
super("compass");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
final int bearing = (int)(user.getLocation().getYaw() + 180 + 360) % 360;
String dir;
if (bearing < 23)
{
dir = "N";
}
else if (bearing < 68)
{
dir = "NE";
}
else if (bearing < 113)
{
dir = "E";
}
else if (bearing < 158)
{
dir = "SE";
}
else if (bearing < 203)
{
dir = "S";
}
else if (bearing < 248)
{
dir = "SW";
}
else if (bearing < 293)
{
dir = "W";
}
else if (bearing < 338)
{
dir = "NW";
}
else
{
dir = "N";
}
user.sendMessage(tl("compassBearing", dir, bearing));
}
}

View File

@@ -0,0 +1,221 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import java.util.*;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.ShapelessRecipe;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.Trade.OverflowType;
import com.earth2me.essentials.User;
import net.ess3.api.MaxMoneyException;
public class Commandcondense extends EssentialsCommand
{
public Commandcondense()
{
super("condense");
}
private Map<ItemStack, SimpleRecipe> condenseList = new HashMap<ItemStack, SimpleRecipe>();
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
List<ItemStack> is = new ArrayList<ItemStack>();
boolean validateReverse = false;
if (args.length > 0)
{
is = ess.getItemDb().getMatching(user, args);
}
else
{
for (ItemStack stack : user.getBase().getInventory().getContents())
{
if (stack == null || stack.getType() == Material.AIR)
{
continue;
}
is.add(stack);
}
validateReverse = true;
}
boolean didConvert = false;
for (final ItemStack itemStack : is)
{
if (condenseStack(user, itemStack, validateReverse))
{
didConvert = true;
}
}
user.getBase().updateInventory();
if (didConvert)
{
user.sendMessage(tl("itemsConverted"));
}
else
{
user.sendMessage(tl("itemsNotConverted"));
throw new NoChargeException();
}
}
private boolean condenseStack(final User user, final ItemStack stack, final boolean validateReverse) throws ChargeException, MaxMoneyException
{
final SimpleRecipe condenseType = getCondenseType(stack);
if (condenseType != null)
{
final ItemStack input = condenseType.getInput();
final ItemStack result = condenseType.getResult();
if (validateReverse)
{
boolean pass = false;
for (Recipe revRecipe : ess.getServer().getRecipesFor(input))
{
if (getStackOnRecipeMatch(revRecipe, result) != null)
{
pass = true;
break;
}
}
if (!pass)
{
return false;
}
}
int amount = 0;
for (final ItemStack contents : user.getBase().getInventory().getContents())
{
if (contents != null && contents.isSimilar(stack))
{
amount += contents.getAmount();
}
}
int output = ((amount / input.getAmount()) * result.getAmount());
amount -= amount % input.getAmount();
if (amount > 0)
{
input.setAmount(amount);
result.setAmount(output);
final Trade remove = new Trade(input, ess);
final Trade add = new Trade(result, ess);
remove.charge(user);
add.pay(user, OverflowType.DROP);
return true;
}
}
return false;
}
private SimpleRecipe getCondenseType(final ItemStack stack)
{
if (condenseList.containsKey(stack))
{
return condenseList.get(stack);
}
final Iterator<Recipe> intr = ess.getServer().recipeIterator();
while (intr.hasNext())
{
final Recipe recipe = intr.next();
final Collection<ItemStack> recipeItems = getStackOnRecipeMatch(recipe, stack);
if (recipeItems != null && (recipeItems.size() == 4 || recipeItems.size() == 9)
&& (recipeItems.size() > recipe.getResult().getAmount()))
{
final ItemStack input = stack.clone();
input.setAmount(recipeItems.size());
final SimpleRecipe newRecipe = new SimpleRecipe(recipe.getResult(), input);
condenseList.put(stack, newRecipe);
return newRecipe;
}
}
condenseList.put(stack, null);
return null;
}
private Collection<ItemStack> getStackOnRecipeMatch(final Recipe recipe, final ItemStack stack)
{
final Collection<ItemStack> inputList;
if (recipe instanceof ShapedRecipe)
{
ShapedRecipe sRecipe = (ShapedRecipe)recipe;
inputList = sRecipe.getIngredientMap().values();
}
else if (recipe instanceof ShapelessRecipe)
{
ShapelessRecipe slRecipe = (ShapelessRecipe)recipe;
inputList = slRecipe.getIngredientList();
}
else
{
return null;
}
boolean match = true;
Iterator<ItemStack> iter = inputList.iterator();
while (iter.hasNext())
{
ItemStack inputSlot = iter.next();
if (inputSlot == null)
{
iter.remove();
continue;
}
if (inputSlot.getDurability() == Short.MAX_VALUE)
{
inputSlot.setDurability((short)0);
}
if (!inputSlot.isSimilar(stack))
{
match = false;
}
}
if (match)
{
return inputList;
}
return null;
}
private class SimpleRecipe implements Recipe
{
private ItemStack result;
private ItemStack input;
private SimpleRecipe(ItemStack result, ItemStack input)
{
this.result = result;
this.input = input;
}
@Override
public ItemStack getResult()
{
return result.clone();
}
public ItemStack getInput()
{
return input.clone();
}
}
}

View File

@@ -0,0 +1,45 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
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 com.earth2me.essentials.utils.NumberUtil;
import org.bukkit.Server;
public class Commandcustomtext extends EssentialsCommand
{
public Commandcustomtext()
{
super("customtext");
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (sender.isPlayer())
{
ess.getUser(sender.getPlayer()).setDisplayNick();
}
final IText input = new TextInput(sender, "custom", true, ess);
final IText output = new KeywordReplacer(input, sender, ess);
final TextPager pager = new TextPager(output);
String chapter = commandLabel;
String page;
if (commandLabel.equalsIgnoreCase("customtext") && args.length > 0 && !NumberUtil.isInt(commandLabel))
{
chapter = args[0];
page = args.length > 1 ? args[1] : null;
}
else
{
page = args.length > 0 ? args[0] : null;
}
pager.showPage(chapter, page, null, sender);
}
}

View File

@@ -0,0 +1,62 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import java.util.Locale;
import org.bukkit.Server;
public class Commanddelhome extends EssentialsCommand
{
public Commanddelhome()
{
super("delhome");
}
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
User user = ess.getUser(sender.getPlayer());
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, true);
name = expandedArg[1];
}
else if (user == null)
{
throw new NotEnoughArgumentsException();
}
else
{
name = expandedArg[0];
}
if (name.equalsIgnoreCase("bed"))
{
throw new Exception(tl("invalidHomeName"));
}
user.delHome(name.toLowerCase(Locale.ENGLISH));
sender.sendMessage(tl("deleteHome", name));
}
}

View File

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

View File

@@ -0,0 +1,26 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import org.bukkit.Server;
public class Commanddelwarp extends EssentialsCommand
{
public Commanddelwarp()
{
super("delwarp");
}
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
ess.getWarps().removeWarp(args[0]);
sender.sendMessage(tl("deleteWarp", args[0]));
}
}

View File

@@ -0,0 +1,32 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
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(tl("depthAboveSea", depth));
}
else if (depth < 0)
{
user.sendMessage(tl("depthBelowSea", (-depth)));
}
else
{
user.sendMessage(tl("depth"));
}
}
}

View File

@@ -0,0 +1,124 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.NumberUtil;
import java.math.BigDecimal;
import java.util.Locale;
import net.ess3.api.MaxMoneyException;
import org.bukkit.Server;
public class Commandeco extends EssentialsLoopCommand
{
Commandeco.EcoCommands cmd;
BigDecimal amount;
public Commandeco()
{
super("eco");
}
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
BigDecimal startingBalance = ess.getSettings().getStartingBalance();
try
{
cmd = Commandeco.EcoCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH));
amount = (cmd == Commandeco.EcoCommands.RESET) ? startingBalance : new BigDecimal(args[2].replaceAll("[^0-9\\.]", ""));
}
catch (Exception ex)
{
throw new NotEnoughArgumentsException(ex);
}
loopOfflinePlayers(server, sender, false, true, args[1], args);
if (cmd == Commandeco.EcoCommands.RESET || cmd == Commandeco.EcoCommands.SET)
{
if (args[1].contentEquals("**"))
{
server.broadcastMessage(tl("resetBalAll", NumberUtil.displayCurrency(amount, ess)));
}
else if (args[1].contentEquals("*"))
{
server.broadcastMessage(tl("resetBal", NumberUtil.displayCurrency(amount, ess)));
}
}
}
@Override
protected void updatePlayer(final Server server, final CommandSource sender, final User player, final String[] args) throws NotEnoughArgumentsException, ChargeException, MaxMoneyException
{
switch (cmd)
{
case GIVE:
player.giveMoney(amount, sender);
break;
case TAKE:
take(amount, player, sender);
break;
case RESET:
case SET:
set(amount, player, sender);
break;
}
}
private void take(BigDecimal amount, final User player, final CommandSource sender) throws ChargeException
{
BigDecimal money = player.getMoney();
BigDecimal minBalance = ess.getSettings().getMinMoney();
if (money.subtract(amount).compareTo(minBalance) > 0)
{
player.takeMoney(amount, sender);
}
else if (sender == null)
{
try
{
player.setMoney(minBalance);
}
catch (MaxMoneyException ex)
{
// Take shouldn't be able to throw a max money exception
}
player.sendMessage(tl("takenFromAccount", NumberUtil.displayCurrency(player.getMoney(), ess)));
}
else
{
throw new ChargeException(tl("insufficientFunds"));
}
}
private void set(BigDecimal amount, final User player, final CommandSource sender) throws MaxMoneyException
{
BigDecimal minBalance = ess.getSettings().getMinMoney();
BigDecimal maxBalance = ess.getSettings().getMaxMoney();
boolean underMinimum = (amount.compareTo(minBalance) < 0);
boolean aboveMax = (amount.compareTo(maxBalance) > 0);
player.setMoney(underMinimum ? minBalance : aboveMax ? maxBalance : amount);
player.sendMessage(tl("setBal", NumberUtil.displayCurrency(player.getMoney(), ess)));
if (sender != null)
{
sender.sendMessage(tl("setBalOthers", player.getDisplayName(), NumberUtil.displayCurrency(player.getMoney(), ess)));
}
}
private enum EcoCommands
{
GIVE, TAKE, SET, RESET
}
}

View File

@@ -0,0 +1,80 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Enchantments;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.MetaItemStack;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.StringUtil;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import org.bukkit.Material;
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.getBase().getItemInHand();
if (stack == null || stack.getType() == Material.AIR)
{
throw new Exception(tl("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.enchantments." + enchantmentName) && entry.getValue().canEnchantItem(stack)))
{
enchantmentslist.add(entry.getKey());
//enchantmentslist.add(enchantmentName);
}
}
throw new NotEnoughArgumentsException(tl("enchantments", StringUtil.joinList(enchantmentslist.toArray())));
}
int level = -1;
if (args.length > 1)
{
try
{
level = Integer.parseInt(args[1]);
}
catch (NumberFormatException ex)
{
level = -1;
}
}
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments() && user.isAuthorized("essentials.enchantments.allowunsafe");
final MetaItemStack metaStack = new MetaItemStack(stack);
final Enchantment enchantment = metaStack.getEnchantment(user, args[0]);
metaStack.addEnchantment(user.getSource(), allowUnsafe, enchantment, level);
user.getBase().getInventory().setItemInHand(metaStack.getItemStack());
user.getBase().updateInventory();
final String enchantmentName = enchantment.getName().toLowerCase(Locale.ENGLISH);
if (level == 0)
{
user.sendMessage(tl("enchantmentRemoved", enchantmentName.replace('_', ' ')));
}
else
{
user.sendMessage(tl("enchantmentApplied", enchantmentName.replace('_', ' ')));
}
}
}

View File

@@ -0,0 +1,32 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commandenderchest extends EssentialsCommand
{
public Commandenderchest()
{
super("enderchest");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.enderchest.others"))
{
final User invUser = getPlayer(server, user, args, 0);
user.getBase().closeInventory();
user.getBase().openInventory(invUser.getBase().getEnderChest());
user.setEnderSee(true);
}
else
{
user.getBase().closeInventory();
user.getBase().openInventory(user.getBase().getEnderChest());
user.setEnderSee(false);
}
}
}

View File

@@ -0,0 +1,382 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import com.earth2me.essentials.EssentialsUpgrade;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.UserMap;
import com.earth2me.essentials.metrics.Metrics;
import com.earth2me.essentials.utils.DateUtil;
import com.earth2me.essentials.utils.NumberUtil;
import com.google.common.base.Charsets;
import java.io.IOException;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
// This command has 4 undocumented behaviours #EasterEgg
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 CommandSource 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("reset"))
{
run_reset(server, sender, commandLabel, args);
}
else if (args[0].equalsIgnoreCase("opt-out"))
{
run_optout(server, sender, commandLabel, args);
}
else if (args[0].equalsIgnoreCase("cleanup"))
{
run_cleanup(server, sender, commandLabel, args);
}
else if (args[0].equalsIgnoreCase("uuidconvert"))
{
run_uuidconvert(server, sender, commandLabel, args);
}
else if (args[0].equalsIgnoreCase("uuidtest"))
{
run_uuidtest(server, sender, commandLabel, args);
}
else
{
run_reload(server, sender, commandLabel, args);
}
}
//If you do not supply an argument this command will list 'overridden' commands.
private void run_disabled(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
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(tl("blockList"));
sender.sendMessage(disabledCommands.toString());
}
}
private void run_reset(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new Exception("/<command> reset <player>");
}
final User user = getPlayer(server, args, 1, true, true);
user.reset();
sender.sendMessage("Reset Essentials userdata for player: " + user.getDisplayName());
}
private void run_debug(final Server server, final CommandSource 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 CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
ess.reload();
sender.sendMessage(tl("essentialsReload", ess.getDescription().getVersion()));
}
private void run_nya(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
final Map<String, Float> noteMap = new HashMap<String, Float>();
noteMap.put("1F#", 0.5f);
noteMap.put("1G", 0.53f);
noteMap.put("1G#", 0.56f);
noteMap.put("1A", 0.6f);
noteMap.put("1A#", 0.63f);
noteMap.put("1B", 0.67f);
noteMap.put("1C", 0.7f);
noteMap.put("1C#", 0.76f);
noteMap.put("1D", 0.8f);
noteMap.put("1D#", 0.84f);
noteMap.put("1E", 0.9f);
noteMap.put("1F", 0.94f);
noteMap.put("2F#", 1.0f);
noteMap.put("2G", 1.06f);
noteMap.put("2G#", 1.12f);
noteMap.put("2A", 1.18f);
noteMap.put("2A#", 1.26f);
noteMap.put("2B", 1.34f);
noteMap.put("2C", 1.42f);
noteMap.put("2C#", 1.5f);
noteMap.put("2D", 1.6f);
noteMap.put("2D#", 1.68f);
noteMap.put("2E", 1.78f);
noteMap.put("2F", 1.88f);
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(",");
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 == null || note.isEmpty())
{
return;
}
for (Player onlinePlayer : ess.getOnlinePlayers())
{
onlinePlayer.playSound(onlinePlayer.getLocation(), Sound.NOTE_PIANO, 1, 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 final String[] consoleMoo = new String[]
{
" (__)",
" (oo)",
" /------\\/",
" / | ||",
" * /\\---/\\",
" ~~ ~~",
"....\"Have you mooed today?\"..."
};
private final String[] playerMoo = new String[]
{
" (__)",
" (oo)",
" /------\\/",
" / | | |",
" * /\\---/\\",
" ~~ ~~",
"....\"Have you mooed today?\"..."
};
private void run_moo(final Server server, final CommandSource sender, final String command, final String args[])
{
if (args.length == 2 && args[1].equals("moo"))
{
for (String s : consoleMoo)
{
logger.info(s);
}
for (Player player : ess.getOnlinePlayers())
{
player.sendMessage(playerMoo);
player.playSound(player.getLocation(), Sound.COW_IDLE, 1, 1.0f);
}
}
else
{
if (sender.isPlayer())
{
sender.getSender().sendMessage(playerMoo);
final Player player = sender.getPlayer();
player.playSound(player.getLocation(), Sound.COW_IDLE, 1, 1.0f);
}
else
{
sender.getSender().sendMessage(consoleMoo);
}
}
}
private void run_optout(final Server server, final CommandSource 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") + " for all plugins.");
}
catch (IOException ex)
{
sender.sendMessage("Unable to modify 'plugins/PluginMetrics/config.yml': " + ex.getMessage());
}
}
private void run_cleanup(final Server server, final CommandSource sender, final String command, final String args[]) throws Exception
{
if (args.length < 2 || !NumberUtil.isInt(args[1]))
{
sender.sendMessage("This sub-command will delete users who havent logged in in the last <days> days.");
sender.sendMessage("Optional parameters define the minium amount required to prevent deletion.");
sender.sendMessage("Unless you define larger default values, this command wil ignore people who have more than 0 money/homes.");
throw new Exception("/<command> cleanup <days> [money] [homes]");
}
sender.sendMessage(tl("cleaning"));
final long daysArg = Long.parseLong(args[1]);
final double moneyArg = args.length >= 3 ? Double.parseDouble(args[2].replaceAll("[^0-9\\.]", "")) : 0;
final int homesArg = args.length >= 4 && NumberUtil.isInt(args[3]) ? Integer.parseInt(args[3]) : 0;
final UserMap userMap = ess.getUserMap();
ess.runTaskAsynchronously(new Runnable()
{
@Override
public void run()
{
Long currTime = System.currentTimeMillis();
for (UUID u : userMap.getAllUniqueUsers())
{
final User user = ess.getUserMap().getUser(u);
if (user == null)
{
continue;
}
long lastLog = user.getLastLogout();
if (lastLog == 0)
{
lastLog = user.getLastLogin();
}
if (lastLog == 0)
{
user.setLastLogin(currTime);
}
if (user.isNPC())
{
continue;
}
long timeDiff = currTime - lastLog;
long milliDays = daysArg * 24L * 60L * 60L * 1000L;
int homeCount = user.getHomes().size();
double moneyCount = user.getMoney().doubleValue();
if ((lastLog == 0) || (timeDiff < milliDays)
|| (homeCount > homesArg) || (moneyCount > moneyArg))
{
continue;
}
if (ess.getSettings().isDebug())
{
ess.getLogger().info("Deleting user: " + user.getName() + " Money: " + moneyCount + " Homes: " + homeCount + " Last seen: " + DateUtil.formatDateDiff(lastLog));
}
user.reset();
}
sender.sendMessage(tl("cleaned"));
}
});
}
private void run_uuidconvert(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
sender.sendMessage("Starting Essentials UUID userdata conversion, this may lag the server.");
Boolean ignoreUFCache = (args.length > 2 && args[1].toLowerCase(Locale.ENGLISH).contains("ignore"));
EssentialsUpgrade.uuidFileConvert(ess, ignoreUFCache);
sender.sendMessage("UUID conversion complete, check your server log for more information.");
}
private void run_uuidtest(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new Exception("/<command> uuidtest <name>");
}
String name = args[1];
sender.sendMessage("Looking up UUID for " + name);
UUID onlineUUID = null;
for (Player player : ess.getOnlinePlayers())
{
if (player.getName().equalsIgnoreCase(name))
{
onlineUUID = player.getUniqueId();
break;
}
}
UUID essUUID = ess.getUserMap().getUser(name).getConfigUUID();
org.bukkit.OfflinePlayer player = ess.getServer().getOfflinePlayer(name);
UUID bukkituuid = player.getUniqueId();
sender.sendMessage("Bukkit Lookup: " + bukkituuid.toString());
if (onlineUUID != null && onlineUUID != bukkituuid)
{
sender.sendMessage("Online player: " + onlineUUID.toString());
}
if (essUUID != null && essUUID != bukkituuid)
{
sender.sendMessage("Essentials config: " + essUUID.toString());
}
UUID npcuuid = UUID.nameUUIDFromBytes(("NPC:" + name).getBytes(Charsets.UTF_8));
sender.sendMessage("NPC UUID: " + npcuuid.toString());
UUID offlineuuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8));
sender.sendMessage("Offline Mode UUID: " + offlineuuid.toString());
}
}

View File

@@ -0,0 +1,205 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import com.earth2me.essentials.craftbukkit.SetExpFix;
import com.earth2me.essentials.utils.NumberUtil;
import java.util.List;
import java.util.Locale;
import org.bukkit.Server;
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.getSource(), user);
}
else if (args.length > 1 && args[0].equalsIgnoreCase("set") && user.isAuthorized("essentials.exp.set"))
{
if (args.length == 3 && user.isAuthorized("essentials.exp.set.others"))
{
expMatch(server, user.getSource(), args[1], args[2], false);
}
else
{
setExp(user.getSource(), user, args[1], false);
}
}
else if (args.length > 1 && args[0].equalsIgnoreCase("give") && user.isAuthorized("essentials.exp.give"))
{
if (args.length == 3 && user.isAuthorized("essentials.exp.give.others"))
{
expMatch(server, user.getSource(), args[1], args[2], true);
}
else
{
setExp(user.getSource(), user, args[1], true);
}
}
else if (args[0].equalsIgnoreCase("show"))
{
if (args.length >= 2 && user.isAuthorized("essentials.exp.others"))
{
String match = args[1].trim();
showMatch(server, user.getSource(), match);
}
else
{
showExp(user.getSource(), user);
}
}
else
{
if (args.length >= 1 && NumberUtil.isInt(args[0].toLowerCase(Locale.ENGLISH).replace("l", "")) && user.isAuthorized("essentials.exp.give"))
{
if (args.length >= 2 && user.isAuthorized("essentials.exp.give.others"))
{
expMatch(server, user.getSource(), args[1], args[0], true);
}
else
{
setExp(user.getSource(), user, args[0], true);
}
}
else if (args.length >= 1 && user.isAuthorized("essentials.exp.others"))
{
String match = args[0].trim();
showMatch(server, user.getSource(), match);
}
else
{
showExp(user.getSource(), user);
}
}
}
@Override
public void run(final Server server, final CommandSource 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 && NumberUtil.isInt(args[0].toLowerCase(Locale.ENGLISH).replace("l", "")))
{
match = args[1].trim();
expMatch(server, sender, match, args[0], true);
}
else if (args.length == 1)
{
match = args[0].trim();
}
showMatch(server, sender, match);
}
}
private void showMatch(final Server server, final CommandSource sender, final String match) throws PlayerNotFoundException
{
boolean skipHidden = sender.isPlayer() && !ess.getUser(sender.getPlayer()).canInteractVanished();
boolean foundUser = false;
final List<Player> matchedPlayers = server.matchPlayer(match);
for (Player matchPlayer : matchedPlayers)
{
final User player = ess.getUser(matchPlayer);
if (skipHidden && player.isHidden(sender.getPlayer()) && !sender.getPlayer().canSee(matchPlayer))
{
continue;
}
foundUser = true;
showExp(sender, player);
}
if (!foundUser)
{
throw new PlayerNotFoundException();
}
}
private void expMatch(final Server server, final CommandSource sender, final String match, String amount, final boolean give) throws NotEnoughArgumentsException, PlayerNotFoundException
{
boolean skipHidden = sender.isPlayer() && !ess.getUser(sender.getPlayer()).canInteractVanished();
boolean foundUser = false;
final List<Player> matchedPlayers = server.matchPlayer(match);
for (Player matchPlayer : matchedPlayers)
{
final User player = ess.getUser(matchPlayer);
if (skipHidden && player.isHidden(sender.getPlayer()) && !sender.getPlayer().canSee(matchPlayer))
{
continue;
}
foundUser = true;
setExp(sender, player, amount, give);
}
if (!foundUser)
{
throw new PlayerNotFoundException();
}
}
private void showExp(final CommandSource sender, final User target)
{
sender.sendMessage(tl("exp", target.getDisplayName(), SetExpFix.getTotalExperience(target.getBase()), target.getBase().getLevel(), SetExpFix.getExpUntilNextLevel(target.getBase())));
}
//TODO: Limit who can give negative exp?
private void setExp(final CommandSource sender, final User target, String strAmount, final boolean give) throws NotEnoughArgumentsException
{
long amount;
strAmount = strAmount.toLowerCase(Locale.ENGLISH);
if (strAmount.contains("l"))
{
strAmount = strAmount.replaceAll("l", "");
int neededLevel = Integer.parseInt(strAmount);
if (give)
{
neededLevel += target.getBase().getLevel();
}
amount = (long)SetExpFix.getExpToLevel(neededLevel);
SetExpFix.setTotalExperience(target.getBase(), 0);
}
else
{
amount = Long.parseLong(strAmount);
if (amount > Integer.MAX_VALUE || amount < Integer.MIN_VALUE)
{
throw new NotEnoughArgumentsException();
}
}
if (give)
{
amount += SetExpFix.getTotalExperience(target.getBase());
}
if (amount > Integer.MAX_VALUE)
{
amount = (long)Integer.MAX_VALUE;
}
if (amount < 0l)
{
amount = 0l;
}
SetExpFix.setTotalExperience(target.getBase(), (int)amount);
sender.sendMessage(tl("expSet", target.getDisplayName(), amount));
}
}

View File

@@ -0,0 +1,52 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.entity.Player;
public class Commandext extends EssentialsLoopCommand
{
public Commandext()
{
super("ext");
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
loopOnlinePlayers(server, sender, true, true, args[0], null);
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
extPlayer(user.getBase());
user.sendMessage(tl("extinguish"));
return;
}
loopOnlinePlayers(server, user.getSource(), true, true, args[0], null);
}
@Override
protected void updatePlayer(final Server server, final CommandSource sender, final User player, final String[] args)
{
extPlayer(player.getBase());
sender.sendMessage(tl("extinguishOthers", player.getDisplayName()));
}
private void extPlayer(final Player player)
{
player.setFireTicks(0);
}
}

View File

@@ -0,0 +1,76 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.FoodLevelChangeEvent;
public class Commandfeed extends EssentialsLoopCommand
{
public Commandfeed()
{
super("feed");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (!user.isAuthorized("essentials.feed.cooldown.bypass"))
{
user.healCooldown();
}
if (args.length > 0 && user.isAuthorized("essentials.feed.others"))
{
loopOnlinePlayers(server, user.getSource(), true, true, args[0], null);
return;
}
feedPlayer(user.getBase());
user.sendMessage(tl("feed"));
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
loopOnlinePlayers(server, sender, true, true, args[0], null);
}
@Override
protected void updatePlayer(final Server server, final CommandSource sender, final User player, final String[] args) throws PlayerExemptException
{
try
{
feedPlayer(player.getBase());
sender.sendMessage(tl("feedOther", player.getDisplayName()));
}
catch (QuietAbortException e)
{
//Handle Quietly
}
}
private void feedPlayer(final Player player) throws QuietAbortException
{
final int amount = 30;
final FoodLevelChangeEvent flce = new FoodLevelChangeEvent(player, amount);
ess.getServer().getPluginManager().callEvent(flce);
if (flce.isCancelled())
{
throw new QuietAbortException();
}
player.setFoodLevel(flce.getFoodLevel() > 20 ? 20 : flce.getFoodLevel());
player.setSaturation(10);
player.setExhaustion(0F);
}
}

View File

@@ -0,0 +1,58 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.entity.*;
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
{
Class<? extends Entity> type = Fireball.class;
Projectile projectile;
int speed = 2;
if (args.length > 0)
{
if (args[0].equalsIgnoreCase("small"))
{
type = SmallFireball.class;
}
else if (args[0].equalsIgnoreCase("arrow"))
{
type = Arrow.class;
}
else if (args[0].equalsIgnoreCase("skull"))
{
type = WitherSkull.class;
}
else if (args[0].equalsIgnoreCase("egg"))
{
type = Egg.class;
}
else if(args[0].equalsIgnoreCase("snowball"))
{
type = Snowball.class;
}
else if(args[0].equalsIgnoreCase("expbottle"))
{
type = ThrownExpBottle.class;
}
else if(args[0].equalsIgnoreCase("large"))
{
type = LargeFireball.class;
}
}
final Vector direction = user.getBase().getEyeLocation().getDirection().multiply(speed);
projectile = (Projectile)user.getWorld().spawn(user.getBase().getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), type);
projectile.setShooter(user.getBase());
projectile.setVelocity(direction);
}
}

View File

@@ -0,0 +1,152 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.MetaItemStack;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.NumberUtil;
import java.util.regex.Pattern;
import org.bukkit.FireworkEffect;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Firework;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.FireworkMeta;
import org.bukkit.util.Vector;
//This command has quite a complicated syntax, in theory it has 4 seperate syntaxes which are all variable:
//
//1: /firework clear - This clears all of the effects on a firework stack
//
//2: /firework power <int> - This changes the base power of a firework
//
//3: /firework fire - This 'fires' a copy of the firework held.
//3: /firework fire <int> - This 'fires' a number of copies of the firework held.
//3: /firework fire <other> - This 'fires' a copy of the firework held, in the direction you are looking, #easteregg
//
//4: /firework [meta] - This will add an effect to the firework stack held
//4: /firework color:<color> - The minimum you need to set an effect is 'color'
//4: Full Syntax: color:<color[,color,..]> [fade:<color[,color,..]>] [shape:<shape>] [effect:<effect[,effect]>]
//4: Possible Shapes: star, ball, large, creeper, burst
//4: Possible Effects trail, twinkle
public class Commandfirework extends EssentialsCommand
{
public Commandfirework()
{
super("firework");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
final ItemStack stack = user.getBase().getItemInHand();
if (stack.getType() == Material.FIREWORK)
{
if (args.length > 0)
{
if (args[0].equalsIgnoreCase("clear"))
{
FireworkMeta fmeta = (FireworkMeta)stack.getItemMeta();
fmeta.clearEffects();
stack.setItemMeta(fmeta);
user.sendMessage(tl("fireworkEffectsCleared"));
}
else if (args.length > 1 && (args[0].equalsIgnoreCase("power") || (args[0].equalsIgnoreCase("p"))))
{
FireworkMeta fmeta = (FireworkMeta)stack.getItemMeta();
try
{
int power = Integer.parseInt(args[1]);
fmeta.setPower(power > 3 ? 4 : power);
}
catch (NumberFormatException e)
{
throw new Exception(tl("invalidFireworkFormat", args[1], args[0]));
}
stack.setItemMeta(fmeta);
}
else if ((args[0].equalsIgnoreCase("fire") || (args[0].equalsIgnoreCase("f")))
&& user.isAuthorized("essentials.firework.fire"))
{
int amount = 1;
boolean direction = false;
if (args.length > 1)
{
if (NumberUtil.isInt(args[1]))
{
final int serverLimit = ess.getSettings().getSpawnMobLimit();
amount = Integer.parseInt(args[1]);
if (amount > serverLimit)
{
amount = serverLimit;
user.sendMessage(tl("mobSpawnLimit"));
}
}
else
{
direction = true;
}
}
for (int i = 0; i < amount; i++)
{
Firework firework = (Firework)user.getWorld().spawnEntity(user.getLocation(), EntityType.FIREWORK);
FireworkMeta fmeta = (FireworkMeta)stack.getItemMeta();
if (direction)
{
final Vector vector = user.getBase().getEyeLocation().getDirection().multiply(0.070);
if (fmeta.getPower() > 1)
{
fmeta.setPower(1);
}
firework.setVelocity(vector);
}
firework.setFireworkMeta(fmeta);
}
}
else
{
final MetaItemStack mStack = new MetaItemStack(stack);
for (String arg : args)
{
try
{
mStack.addFireworkMeta(user.getSource(), true, arg, ess);
}
catch (Exception e)
{
user.sendMessage(tl("fireworkSyntax"));
throw e;
}
}
if (mStack.isValidFirework())
{
FireworkMeta fmeta = (FireworkMeta)mStack.getItemStack().getItemMeta();
FireworkEffect effect = mStack.getFireworkBuilder().build();
if (fmeta.getEffects().size() > 0 && !user.isAuthorized("essentials.firework.multiple"))
{
throw new Exception(tl("multipleCharges"));
}
fmeta.addEffect(effect);
stack.setItemMeta(fmeta);
}
else
{
user.sendMessage(tl("fireworkSyntax"));
throw new Exception(tl("fireworkColor"));
}
}
}
else
{
throw new NotEnoughArgumentsException();
}
}
else
{
throw new Exception(tl("holdFirework"));
}
}
}

View File

@@ -0,0 +1,69 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commandfly extends EssentialsToggleCommand
{
public Commandfly()
{
super("fly", "essentials.fly.others");
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
toggleOtherPlayers(server, sender, args);
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length == 1)
{
Boolean toggle = matchToggleArgument(args[0]);
if (toggle == null && user.isAuthorized(othersPermission))
{
toggleOtherPlayers(server, user.getSource(), args);
}
else
{
togglePlayer(user.getSource(), user, toggle);
}
}
else if (args.length == 2 && user.isAuthorized(othersPermission))
{
toggleOtherPlayers(server, user.getSource(), args);
}
else
{
togglePlayer(user.getSource(), user, null);
}
}
@Override
void togglePlayer(CommandSource sender, User user, Boolean enabled)
{
if (enabled == null)
{
enabled = !user.getBase().getAllowFlight();
}
user.getBase().setFallDistance(0f);
user.getBase().setAllowFlight(enabled);
if (!user.getBase().getAllowFlight())
{
user.getBase().setFlying(false);
}
user.sendMessage(tl("flyMode", tl(enabled ? "enabled" : "disabled"), user.getDisplayName()));
if (!sender.isPlayer() || !sender.getPlayer().equals(user.getBase()))
{
sender.sendMessage(tl("flyMode", tl(enabled ? "enabled" : "disabled"), user.getDisplayName()));
}
}
}

View File

@@ -0,0 +1,136 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import java.util.List;
import java.util.Locale;
import org.bukkit.GameMode;
import org.bukkit.Server;
import org.bukkit.entity.Player;
public class Commandgamemode extends EssentialsCommand
{
public Commandgamemode()
{
super("gamemode");
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
GameMode gameMode;
if (args.length == 0)
{
throw new NotEnoughArgumentsException();
}
else if (args.length == 1)
{
gameMode = matchGameMode(commandLabel);
gamemodeOtherPlayers(server, sender, gameMode, args[0]);
}
else if (args.length == 2)
{
gameMode = matchGameMode(args[0].toLowerCase(Locale.ENGLISH));
gamemodeOtherPlayers(server, sender, gameMode, args[1]);
}
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
GameMode gameMode;
if (args.length == 0)
{
gameMode = matchGameMode(commandLabel);
}
else if (args.length > 1 && args[1].trim().length() > 2 && user.isAuthorized("essentials.gamemode.others"))
{
gameMode = matchGameMode(args[0].toLowerCase(Locale.ENGLISH));
gamemodeOtherPlayers(server, user.getSource(), gameMode, args[1]);
return;
}
else
{
try
{
gameMode = matchGameMode(args[0].toLowerCase(Locale.ENGLISH));
}
catch (NotEnoughArgumentsException e)
{
if (user.isAuthorized("essentials.gamemode.others"))
{
gameMode = matchGameMode(commandLabel);
gamemodeOtherPlayers(server, user.getSource(), gameMode, args[0]);
return;
}
throw new NotEnoughArgumentsException();
}
}
if (gameMode == null)
{
gameMode = user.getBase().getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : user.getBase().getGameMode() == GameMode.CREATIVE ? GameMode.ADVENTURE : GameMode.SURVIVAL;
}
user.getBase().setGameMode(gameMode);
user.sendMessage(tl("gameMode", tl(user.getBase().getGameMode().toString().toLowerCase(Locale.ENGLISH)), user.getDisplayName()));
}
private void gamemodeOtherPlayers(final Server server, final CommandSource sender, final GameMode gameMode, final String name) throws NotEnoughArgumentsException, PlayerNotFoundException
{
if (name.trim().length() < 2 || gameMode == null)
{
throw new NotEnoughArgumentsException(tl("gameModeInvalid"));
}
boolean skipHidden = sender.isPlayer() && !ess.getUser(sender.getPlayer()).canInteractVanished();
boolean foundUser = false;
final List<Player> matchedPlayers = server.matchPlayer(name);
for (Player matchPlayer : matchedPlayers)
{
final User player = ess.getUser(matchPlayer);
if (skipHidden && player.isHidden(sender.getPlayer()) && !sender.getPlayer().canSee(matchPlayer))
{
continue;
}
foundUser = true;
player.getBase().setGameMode(gameMode);
sender.sendMessage(tl("gameMode", tl(player.getBase().getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
}
if (!foundUser)
{
throw new PlayerNotFoundException();
}
}
private GameMode matchGameMode(String modeString) throws NotEnoughArgumentsException
{
GameMode mode = null;
if (modeString.equalsIgnoreCase("gmc") || modeString.equalsIgnoreCase("egmc")
|| modeString.contains("creat") || modeString.equalsIgnoreCase("1") || modeString.equalsIgnoreCase("c"))
{
mode = GameMode.CREATIVE;
}
else if (modeString.equalsIgnoreCase("gms") || modeString.equalsIgnoreCase("egms")
|| modeString.contains("survi") || modeString.equalsIgnoreCase("0") || modeString.equalsIgnoreCase("s"))
{
mode = GameMode.SURVIVAL;
}
else if (modeString.equalsIgnoreCase("gma") || modeString.equalsIgnoreCase("egma")
|| modeString.contains("advent") || modeString.equalsIgnoreCase("2") || modeString.equalsIgnoreCase("a"))
{
mode = GameMode.ADVENTURE;
}
else if (modeString.equalsIgnoreCase("gmt") || modeString.equalsIgnoreCase("egmt")
|| modeString.contains("toggle") || modeString.contains("cycle") || modeString.equalsIgnoreCase("t"))
{
mode = null;
}
else
{
throw new NotEnoughArgumentsException();
}
return mode;
}
}

View File

@@ -0,0 +1,79 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.utils.DateUtil;
import com.earth2me.essentials.utils.NumberUtil;
import java.lang.management.ManagementFactory;
import java.util.List;
import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Chunk;
import org.bukkit.Server;
import org.bukkit.World;
public class Commandgc extends EssentialsCommand
{
public Commandgc()
{
super("gc");
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
double tps = ess.getTimer().getAverageTPS();
ChatColor color;
if (tps >= 18.0)
{
color = ChatColor.GREEN;
}
else if (tps >= 15.0)
{
color = ChatColor.YELLOW;
}
else
{
color = ChatColor.RED;
}
sender.sendMessage(tl("uptime", DateUtil.formatDateDiff(ManagementFactory.getRuntimeMXBean().getStartTime())));
sender.sendMessage(tl("tps", "" + color + NumberUtil.formatDouble(tps)));
sender.sendMessage(tl("gcmax", (Runtime.getRuntime().maxMemory() / 1024 / 1024)));
sender.sendMessage(tl("gctotal", (Runtime.getRuntime().totalMemory() / 1024 / 1024)));
sender.sendMessage(tl("gcfree", (Runtime.getRuntime().freeMemory() / 1024 / 1024)));
List<World> worlds = server.getWorlds();
for (World w : worlds)
{
String worldType = "World";
switch (w.getEnvironment())
{
case NETHER:
worldType = "Nether";
break;
case THE_END:
worldType = "The End";
break;
}
int tileEntities = 0;
try
{
for (Chunk chunk : w.getLoadedChunks())
{
tileEntities += chunk.getTileEntities().length;
}
}
catch (java.lang.ClassCastException ex)
{
Bukkit.getLogger().log(Level.SEVERE, "Corrupted chunk data on world " + w, ex);
}
sender.sendMessage(tl("gcWorld", worldType, w.getName(), w.getLoadedChunks().length, w.getEntities().size(), tileEntities));
}
}
}

View File

@@ -0,0 +1,53 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.bukkit.Location;
import org.bukkit.Server;
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, user, args, 0);
outputPosition(user.getSource(), otherUser.getLocation(), user.getLocation());
return;
}
outputPosition(user.getSource(), user.getLocation(), null);
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
final User user = getPlayer(server, args, 0, true, false);
outputPosition(sender, user.getLocation(), null);
}
private void outputPosition(final CommandSource sender, final Location coords, final Location distance)
{
sender.sendMessage(tl("currentWorld", coords.getWorld().getName()));
sender.sendMessage(tl("posX", coords.getBlockX()));
sender.sendMessage(tl("posY", coords.getBlockY()));
sender.sendMessage(tl("posZ", coords.getBlockZ()));
sender.sendMessage(tl("posYaw", (coords.getYaw() + 180 + 360) % 360));
sender.sendMessage(tl("posPitch", coords.getPitch()));
if (distance != null && coords.getWorld().equals(distance.getWorld()))
{
sender.sendMessage(tl("distance", coords.distance(distance)));
}
}
}

View File

@@ -0,0 +1,122 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.MetaItemStack;
import com.earth2me.essentials.User;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import com.earth2me.essentials.utils.NumberUtil;
import java.util.Locale;
import java.util.Map;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;
public class Commandgive extends EssentialsCommand
{
public Commandgive()
{
super("give");
}
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
ItemStack stack = ess.getItemDb().get(args[1]);
final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
if (sender.isPlayer()
&& (ess.getSettings().permissionBasedItemSpawn()
? (!ess.getUser(sender.getPlayer()).isAuthorized("essentials.itemspawn.item-all")
&& !ess.getUser(sender.getPlayer()).isAuthorized("essentials.itemspawn.item-" + itemname)
&& !ess.getUser(sender.getPlayer()).isAuthorized("essentials.itemspawn.item-" + stack.getTypeId()))
: (!ess.getUser(sender.getPlayer()).isAuthorized("essentials.itemspawn.exempt")
&& !ess.getUser(sender.getPlayer()).canSpawnItem(stack.getTypeId()))))
{
throw new Exception(tl("cantSpawnItem", itemname));
}
final User giveTo = getPlayer(server, sender, args, 0);
try
{
if (args.length > 3 && NumberUtil.isInt(args[2]) && NumberUtil.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());
}
}
catch (NumberFormatException e)
{
throw new NotEnoughArgumentsException();
}
MetaItemStack metaStack = new MetaItemStack(stack);
if (!metaStack.canSpawn(ess))
{
throw new Exception(tl("unableToSpawnItem", itemname));
}
if (args.length > 3)
{
boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments();
if (allowUnsafe && sender.isPlayer() && !ess.getUser(sender.getPlayer()).isAuthorized("essentials.enchantments.allowunsafe"))
{
allowUnsafe = false;
}
int metaStart = NumberUtil.isInt(args[3]) ? 4 : 3;
if (args.length > metaStart)
{
metaStack.parseStringMeta(sender, allowUnsafe, args, metaStart, ess);
}
stack = metaStack.getItemStack();
}
if (stack.getType() == Material.AIR)
{
throw new Exception(tl("cantSpawnItem", "Air"));
}
final String itemName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
sender.sendMessage(tl("giveSpawn", stack.getAmount(), itemName, giveTo.getDisplayName()));
Map<Integer, ItemStack> leftovers;
if (giveTo.isAuthorized("essentials.oversizedstacks"))
{
leftovers = InventoryWorkaround.addOversizedItems(giveTo.getBase().getInventory(), ess.getSettings().getOversizedStackSize(), stack);
}
else
{
leftovers = InventoryWorkaround.addItems(giveTo.getBase().getInventory(), stack);
}
for (ItemStack item : leftovers.values())
{
sender.sendMessage(tl("giveSpawnFailure", item.getAmount(), itemName, giveTo.getDisplayName()));
}
giveTo.getBase().updateInventory();
}
}

View File

@@ -0,0 +1,76 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.CommandSource;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import net.ess3.api.events.GodStatusChangeEvent;
import org.bukkit.Server;
public class Commandgod extends EssentialsToggleCommand
{
public Commandgod()
{
super("god", "essentials.god.others");
}
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
toggleOtherPlayers(server, sender, args);
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length == 1)
{
Boolean toggle = matchToggleArgument(args[0]);
if (toggle == null && user.isAuthorized(othersPermission))
{
toggleOtherPlayers(server, user.getSource(), args);
}
else
{
togglePlayer(user.getSource(), user, toggle);
}
}
else if (args.length == 2 && user.isAuthorized(othersPermission))
{
toggleOtherPlayers(server, user.getSource(), args);
}
else
{
togglePlayer(user.getSource(), user, null);
}
}
@Override
void togglePlayer(CommandSource sender, User user, Boolean enabled)
{
if (enabled == null)
{
enabled = !user.isGodModeEnabled();
}
final User controller = sender.isPlayer() ? ess.getUser(sender.getPlayer()) : null;
final GodStatusChangeEvent godEvent = new GodStatusChangeEvent(controller, user, enabled);
ess.getServer().getPluginManager().callEvent(godEvent);
if (!godEvent.isCancelled())
{
user.setGodModeEnabled(enabled);
if (enabled && user.getBase().getHealth() != 0)
{
user.getBase().setHealth(user.getBase().getMaxHealth());
user.getBase().setFoodLevel(20);
}
user.sendMessage(tl("godMode", enabled ? tl("enabled") : tl("disabled")));
if (!sender.isPlayer() || !sender.getPlayer().equals(user.getBase()))
{
sender.sendMessage(tl("godMode", tl(enabled ? "godEnabledFor" : "godDisabledFor", user.getDisplayName())));
}
}
}
}

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