Compare commits

...
3457 Commits
Author SHA1 Message Date
Josh Roy 0b7e7801d0 Release 2.19.1 (#4681) 2021-12-14 19:16:08 +00:00
Josh Roy 840035944a Truncate Discord interaction messages to proper length (#4686) 2021-12-14 18:46:59 +00:00
Josh RoyandMD 20a7d1c7ee Add DiscordRelayEvent to edit relayed Discord->MC messages (#4656)
Implements the event suggested in #4580.

Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-12-14 16:26:57 +00:00
pop4959 253185bd0e Remove ignore teleport metadata 2021-12-12 22:23:56 +00:00
Josh Roy dae519494e Fix stack overflow when disabling commands from other addons (#4680) 2021-12-11 19:16:23 -08:00
Josh Roy dc27af78bf Update to MC 1.18.1 2021-12-11 12:13:50 +00:00
Flask Bot 41861a8551 New Crowdin updates (#4467) 2021-12-04 14:53:26 +00:00
Josh Roy 9b629e42d8 Bump JDA + discord-webhooks dependencies (#4655) 2021-12-04 14:47:40 +00:00
7794634d37 Add support for multiple queued TPA requests (#3801)
This PR adds support for players to receive multiple teleport requests, which are queued and can be managed independently of one another.

All commands should retain their current behavior but have some new additions;
* `/tpaccept`: now allows you to specify a player or `*` to accept a specific player's or all players' teleport request(s) respectively.
  - Using a wildcard will only accept all tpahere requests, as players can't teleport to multiple places simultaneously.
* `/tpdeny`: now allows you to specify a player or `*` to deny a specific player's or all players' teleport request(s) respectively.

This PR also adds a new setting for the maximum amount of pending TPA requests a user can have at once.
```yml
# The maximum amount of simultaneous tpa requests that can be pending for any given user.
# Once at this threshold, any new tpa requests will bump the oldest tpa requests out of queue.
# Defaults to 5.
tpa-max-amount: 5
```

Closes #3769
Closes #1550

Co-authored-by: Mariell Hoversholm <proximyst@proximy.st>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-12-04 14:40:06 +00:00
Josh Roy d091d6902c Fix safelogin support with 1.18 world heights (#4667)
Fixes #4665.
2021-12-03 20:31:36 +00:00
MD c45c741210 Bump supported version to 1.18 release 2021-11-30 16:33:05 +00:00
MD e35c65b976 Refactor world info provider; only clamp to logical height when already below
Fixes #4657.
2021-11-30 16:33:05 +00:00
MDandJason 0983167740 Port remaining groovy build logic to kotlin
Co-authored-by: Jason <11360596+jpenilla@users.noreply.github.com>
2021-11-30 16:33:05 +00:00
1509cf8978 Support 0>y>256 for safe/random teleports (#4641)
Co-authored-by: pop4959 <pop4959@gmail.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-11-30 16:33:05 +00:00
MD c0082ee734 Update to Gradle 7.3 and toolchain to JDK 17 2021-11-30 16:33:05 +00:00
Flask Bot db2ec1b436 Update items.json for Minecraft 1.18 2021-11-30 16:33:05 +00:00
Josh Roy 7a1e50d10f Fix reflection mappings for the ServerStateProvider in 1.18 2021-11-30 16:33:05 +00:00
Josh Roy b6ba1768a1 Mark 1.18 as a supported version 2021-11-30 16:33:05 +00:00
Josh Roy c38dd997d2 Update Spigot to 1.18 2021-11-30 16:33:05 +00:00
Josh Roy f8ca1bae5d Fix offline player error in /playtime for versions < 1.15.2 (#4649) 2021-11-25 19:50:49 +00:00
Josh Roy 3c60bcf2de Allow unsafe homes when force-disable-teleport-safety is enabled (#4650) 2021-11-25 19:47:42 +00:00
Josh Roy 3f857e3183 Fix DiscordUtil#getOrCreateWebhook using webhooks without tokens 2021-11-25 14:03:56 -05:00
Josh Roy 668c9634ca Ensure JDA is started before allowing calls to the JDA object 2021-11-25 14:03:56 -05:00
nik2143andJosh Roy 51c49b0de6 Set a metadata value for vanished players (#4646)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-11-24 09:57:55 -05:00
Lax 5723dac6ba Send discord config in dump even when plugin is disabled 2021-11-17 19:15:02 -05:00
Josh Roy 680d3230ea Add /discord command to display invite code (#4620) 2021-11-06 19:18:37 -04:00
Josh Roy 8f679de352 Add offline user support to /playtime (#4619) 2021-11-06 15:41:38 -07:00
Josh Roy 86d435eee1 Move UUID below alts in /seen (#4615) 2021-11-06 13:50:56 -07:00
Bobcat00andBobcat00 e4cf965bae Add translation for /list real name (#4614)
Co-authored-by: Bobcat00 <Bobcat00@users.noreply.github.com>
2021-11-05 22:24:21 +00:00
Andre_601 78c846a0a8 Minor typo corrections for EssentialsXDiscord (#4603) 2021-11-01 21:41:58 -04:00
pop4959andJosh Roy c466c9c370 Add metadata value to bypass last location setting on teleport (#4597)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-10-31 17:25:18 -04:00
Josh Roy 6994005a5f Fix light blocks being considering solid (#4601) 2021-10-30 22:25:03 -07:00
Josh Roy e43f06bfa6 Add /mail sendtempall (#4561)
Implements #4558
2021-10-24 16:45:01 +00:00
Josh Roy 9601687190 Add console regex filter for discord module (#4534) 2021-10-24 12:12:42 -04:00
Josh Roy 2ed94f1048 Add provider to use new Paper advancement API (#4588)
Paper added in PaperMC/Paper@40ee634
2021-10-24 14:27:07 +00:00
Josh Roy 70045c30f3 Migrate reflection in MetaItemStack to a provider (#4592) 2021-10-24 15:17:06 +01:00
Josh Roy ce88c0e1e4 Fix kit issues with potions in 1.8 (#4591)
Fixes #2867
2021-10-24 14:12:20 +00:00
Josh Roy 494e82e581 Fix ability to delete warps in unloaded worlds (#4590)
Fixes #4584.
2021-10-24 15:05:10 +01:00
MelluhandJosh Roy edd15132fd Add playtime command (#4562)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-10-23 15:29:37 -04:00
Tadhg BoyleandJosh Roy add664441e Add notify messages to jail command (#4576)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-10-23 15:18:51 -04:00
Josh Roy 58b0fb089f Improve error message when primary channel is improperly defined (#4586)
* Improve message verboseness when primary channel is improperly defined

* Clarify primary channel behavior
2021-10-20 13:09:56 +01:00
Josh Roy 90e4845627 Remove config reloads on world load/unload (#4573)
Since the Configurate rewrite, we hold locations using `LazyLocation`, which is converted to a `Location` with world lookups on demand; as such we no longer need to reload configs on each world load since invalid locations will now softly fail.
2021-10-13 18:41:48 +01:00
Josh RoyandMD 43f4d306be Add discordbroadcast command (#4541)
* Add discordbroadcast command

* Update EssentialsDiscord/src/main/resources/plugin.yml

Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

* Add emoji parsing/tab complete for discordbroadcast command

Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-10-11 15:54:55 -04:00
Josh Roy cb7d9baf7a Fix exception while running vanilla commands for chat command relay (#4552)
Fixes #4545
2021-10-11 19:32:41 +00:00
Josh Roy f3aea5e6ec Improve error message for updater checker rate limit (#4560)
Fixes #4556
2021-10-11 20:06:18 +01:00
Josh Roy a7a1fcd98c Fix Discord token regex censor pattern (#4563)
Discord changed their token format again
2021-10-07 09:22:41 +01:00
ef8bcc8bc4 Add kits subfolder to allow for multiple kit files (#4407)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-10-02 19:14:41 -04:00
MDandJosh Roy b3692d18b0 Update plugin.yml authors to reflect EssentialsX contributions (#4551)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-09-28 15:49:55 -04:00
Josh Roy a7b2b675d5 Add essentials.seen.uuid permission to show uuids in seen (#4531)
Adds `essentials.seen.uuid` permission requirement to show uuids in `/seen`. People were complaining this cluttered it so whatever. Also adds said permission to the `essentials.seen.extra` permission group.

Closes #4499.
2021-09-28 13:13:50 +00:00
Josh RoyandMD 7d7a8e47ac Fix verbose command usages not being disabled properly (#4530)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-09-28 13:09:04 +00:00
MDandJosh Roy f0da17b75c Asynchronously filter commands on Paper when possible (#4460)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-09-15 17:23:31 -04:00
Josh Roy d86b471402 Add action message type (#4520)
Adds a message type which will show when a player runs the /action (/me) command.

Message Type:
```yml
# Configure which Discord channels different messages will be sent to.
# You can either use the names of the channels listed above or just the id of a channel.
# If an invalid channel is used, the primary channel will be used instead.
#
# To disable a message from showing, use 'none' as the channel name.
message-types:
  ...
  # Action messages sent when a player runs the /me or /action commands.
  action: primary
```

Message Format:
```yml
# The following entries allow you to customize the formatting of messages sent by the plugin.
# Each message has a description of how it is used along with placeholders that can be used.
messages:
  ...
  # This is the message sent to Discord when a player runs the /me or /action command.
  # The following placeholders can be used here:
  # - {username}: The name of the user who ran the command
  # - {displayname}: The display name of the user who ran the command
  # - {action}: The action (message) the user used in the command.
  # ... PlaceholderAPI placeholders are also supported here too!
  action: ":person_biking: {displayname} *{action}*"
```
2021-09-15 14:52:14 +00:00
Josh Roy 767508fb87 Fix bed spawn setting when waking up villagers (#4524)
Fixes #4461.
2021-09-15 15:40:23 +01:00
LaxandJosh Roy c85d772e1b Add /ess dump all as alias for /ess dump * (#4517)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-09-08 17:48:47 -04:00
MDandJosh Roy fde6524e46 Fix error with commands ending in single colon (#4508)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-09-01 13:37:46 -04:00
b2886969f0 Update to bStats v2 (#4350)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-09-01 13:33:43 -04:00
Josh RoyandMD 19ca5186e4 Replace unneeded inputs with new /ess dump in issue template (#4479)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-09-01 13:26:54 +01:00
Josh Roy b86a34c909 Prepare for 2.19.1 dev builds (#4505) 2021-09-01 12:55:37 +01:00
MD d145fbc5cc Require forceSign property even on releases 2021-08-31 21:27:35 +01:00
Josh Roy 3ca960e31b Release 2.19.0 2021-08-31 13:04:34 -04:00
MD 8bbaf7da68 Update Gradle to 7.2; set run-paper to 1.17.1 with toolchain (#4496)
:chatting:
2021-08-31 16:53:09 +01:00
Josh Roy 14c2ab5ddd Add online mode data for /ess dump (#4497)
EssentialsX/Website#60
2021-08-31 15:34:10 +00:00
Josh Roy 6f20a789f9 Delete (& backup) invalid NPC accounts created by poor econ code (#4490)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

my magnum opus

---

* Delete (& backup) invalid NPC accounts created by poor econ code

* Add feedback for large migrations

* Improve feedback messages

- Improve the wording of console messages
- Include details about how to resume purging userdata in case it gets interrupted
- Scale the message delay based on the number of userdata files to be processed
- Always cancel the repeating task and shut down the executor when we're done

* Update Essentials/src/main/java/com/earth2me/essentials/EssentialsUpgrade.java

* Add less ranty context to rant

At least I had caffeine before writing this
2021-08-31 16:28:44 +01:00
Josh Roy 4bee15956a Fix economy usernames being unsanitized in some places (#4484)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

This PR fixes various issues with NPC accounts:
- Fixes some NPC account names not being sanitised
- Fixes wrong keys being used when manually generating a NPC account file
- Adds some debug logging to `UserMap` name lookups
2021-08-28 17:32:45 +01:00
pop4959andJosh Roy e4c179f5ed Allow auto equip in nbt serialized kits (#4491)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-08-28 11:46:38 -04:00
Josh Roy 4811eb1558 Fix /ess dump on 1.8.8 (#4489)
Fixes #4487

pain
2021-08-27 21:50:41 +01:00
Josh Roy 69850d82c8 Fix NoClassDefFoundError on < 1.12 with Discord execute command (#4478) 2021-08-26 16:12:52 -04:00
Josh Roy df88a89c14 Add missing translation for argument pipe color (#4480) 2021-08-26 16:09:16 -04:00
Josh Roy c746a1ce17 Bump Configurate (#4475)
Some performance improvements, <3 zml
2021-08-24 11:35:53 +01:00
Flask Bot ecdaed7d11 New Crowdin updates (#4281) 2021-08-19 20:11:35 +00:00
CyberKitsuneandMD c062651821 Add option for tab complete to use displaynames (#4432)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

This feature adds a new configuration option, `change-tab-complete-name`

When `change-tab-complete-name` is turned on, `getPlayers()` in `EssentialsCommand` will use `getDisplayName()` instead of `getName()`; populating the list with display names instead of player names.

Closes #4431.
2021-08-19 20:00:06 +00:00
Josh RoyandMD 3692740762 Add /ess dump command to generate a debug dump output (#4361)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

Command usage: /essentials dump [config] [discord] [kits] [log]

Either of the optional args can be used to add the given data to the dump.

Related: EssentialsX/Website#51
2021-08-19 20:35:19 +01:00
Josh Roy 1179caab88 Fix bot-command-relay option not ignoring itself (#4453) 2021-08-12 12:37:19 +01:00
Josh Roy 35b1a284f3 Fix improper MOTD delay check (#4454) 2021-08-10 10:51:33 -04:00
Josh RoyandMD 36432c65e9 Fix NPE on webhooks messages with show-webhook-messages enabled (#4452)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

Fixes #4451.
2021-08-09 21:30:30 +00:00
Josh Roy 871e718f63 Add online/unique placeholders to join/leave formats for discord (#4427) 2021-08-09 16:23:49 -04:00
Josh Roy 42293596f3 Add config option to disable verbose usage strings (#4396)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

```yml
# Whether or not Essentials should show detailed command usages.
# If set to false, Essentials will collapse all usages in to one single usage message.
verbose-command-usages: true
```

This PR also fixes a regression in legacy usage strings where the `<command>` wasn't replaced.
2021-08-09 19:56:38 +00:00
Josh Roy ac8a13f039 Add name parameter for Discord avatar URL (#4369)
Allows offline mode/Geyser users to configure their own avatar URL using a service that accepts usernames.
2021-08-09 19:48:43 +00:00
Josh RoyandMD d56ecaacdc Allow world name fallback for LazyLocation (#4428)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-08-09 20:39:55 +01:00
Josh Roy 14fbfe360e Allow disabling MOTD task and cancel on player logout (#4411)
This PR allows setting `delay-motd` to a negative value in `config.yml` to disable the MOTD join task without disabling `/motd`, and fixes an issue where delayed MOTD tasks would run even after a player logged out (in case someone previously set an insanely high MOTD delay to "disable" the MOTD on join).

Fixes #4408.
2021-08-09 20:22:09 +01:00
Josh Roy 5334a3fd34 Move update check message out of MOTD task (#4410)
Update message will now show after mail, and will not be affected by insane MOTD delays.
2021-08-09 19:14:15 +00:00
Josh Roy 2fa9c6486e Fix disabled-commands not removing aliases (#4399)
Fixes #4383, an issue where only the main command name is disabled instead of the alias specified in `config.yml`.
2021-08-09 18:59:36 +00:00
Josh Roy c221e96122 Make discord chat format world name use world alias (#4419) 2021-08-09 19:57:03 +01:00
Josh Roy 26c016fea2 Add config option to allow webhooks/bots to send commands (#4442)
```yml
# Console relay settings
# The console relay sends every message shown in the console to a Discord channel.
console:
  ...
  # Set to true if bots/webhooks should be able to send commands through the command relay.
  bot-command-relay: false
```
2021-08-09 18:48:01 +00:00
Josh Roy b6a08ec712 Fix force-disable-teleport-safety enforcing world border (#4371) 2021-08-09 18:44:13 +00:00
Josh Roy 9179c6c1e2 Update EssXDiscord tutorial for new developer mode location (#4409) 2021-08-09 19:38:04 +01:00
Josh Roy 3f9aceb922 Add DiscordService#sendChatMessage
Allows plugins to send messages to the chat channel via API using the format from our config
2021-08-07 17:37:02 -07:00
Josh Roy 3da8efae49 Fix incorrect parameter name for allowGroupMentions 2021-08-07 17:37:02 -07:00
Josh Roy b84207f955 Fix regression in invalid home check (#4425) 2021-08-02 11:23:40 -04:00
1stGlitchandJosh Roy f57de40668 Fix invalid mob data in spawnmob on versions < 1.17 (#4376)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-08-02 10:33:49 -04:00
Daniil ZandJosh Roy e95df57642 Fix barrier considered as unsafe block to teleport (#4348)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-08-02 10:22:07 -04:00
Josh Roy aaddb2af1f Fix remaining Configurate nullability issues (#4370) 2021-08-02 12:32:41 +00:00
Josh Roy 082950cc18 Fix bStats becoming a transitive dependency (#4426) 2021-08-02 13:21:53 +01:00
triagonal 90828965df Fix NPE during reload with invalid discord bot tokens (#4417) 2021-07-31 10:19:20 -04:00
Josh Roy 17e026f9aa Require MessageType's start with a letter
May cause issues with YML serialization as it can get finicky with keys starting with numbers.
2021-07-28 16:24:09 -07:00
Josh Roy f1d7e50dc0 Don't warn about unregistered channel-id based MessageType's
You shouldn't be registering these, there is no point for a user to configure where these go because it would be ignored.
2021-07-28 16:24:09 -07:00
Josh Roy e2cb7b2102 Fix advanced relay breaking when multiple channels were defined 2021-07-28 16:24:09 -07:00
Josh Roy 28578a5d8a Fix some typos in the tutorial 2021-07-28 16:24:09 -07:00
Josh Roy 0d8e90b8da Move FakeServer to 1.8 provider (#4395)
Moving this removes the need to needlessly update the FakeServer class with new methods when upstream changes it.
2021-07-27 21:23:20 +01:00
Josh Roy 1556b911b2 Fix webhook messages being parsed unnecessarily (#4346)
This wasted CPU time parsing responses from Discord that we will never use, plus caused problems when parsing webhooks that our library couldn't parse correctly (MinnDevelopment/discord-webhooks#36).
2021-07-11 20:36:46 +01:00
MD eed73e3157 Cache overridden-commands and player-commands in Settings (#4345) 2021-07-11 12:25:25 -04:00
triagonal c020526b1e Strip formatting in webhook name (#4344) 2021-07-11 09:57:46 -04:00
Josh Roy cca98e817f Add show-displayname option 2021-07-10 11:08:51 -04:00
Josh Roy 46a8a7d04c Remove join/quit message null checks
If you don't want to see them, don't configure them.
2021-07-10 11:08:51 -04:00
Josh Roy d4ddc87d81 Fix less strict length check on messageQueue add rather than iteration 2021-07-10 11:08:51 -04:00
Chew b473460ffc Use native Discord timestamps for console timestamps 2021-07-10 11:08:51 -04:00
Josh Roy db027bced3 Add option to log channels to console 2021-07-10 11:08:51 -04:00
Josh Roy 12cc0b99f9 Fix some minor grammer issues in config 2021-07-10 11:08:51 -04:00
Josh Roy 15cac529c5 Improve death message validation
Now takes gamerules in to account and will not send blank or null death messages.
2021-07-10 11:08:51 -04:00
Josh Roy feed2d6a45 Fix improper bitwise logic in DiscordUtil#getRoleColorFormat 2021-07-10 11:08:51 -04:00
Josh Roy b516db669c Fix prefixes/suffixes not stripping hex format 2021-07-10 11:08:51 -04:00
Josh Roy 3bc58264ea Add advancement message type 2021-07-10 11:08:51 -04:00
Josh Roy 0a0416ae38 Fix disabling a single command causing all commands to be disabled 2021-07-10 11:08:51 -04:00
Josh Roy d244956b4b Ensure no JDA code is called during invalid shutdown 2021-07-10 11:08:51 -04:00
Josh Roy 37e3730e9d Add fake vanish join/leave + exclude vanished messages 2021-07-10 11:08:51 -04:00
triagonal 48532a0ae6 Fix NPE in UserData#getLogoutLocation (#4341) 2021-07-10 09:17:26 -04:00
Josh Roy 0b6b0f9c61 Fix NPE with custom join messages (#4334)
This fixes a bug in #4290 in which custom join messages would throw a NullPointerException if the user hasn't changed their username.
2021-07-09 16:33:44 +00:00
Josh Roy 435ac80ff9 Fix delay not working in /spawn (#4335) 2021-07-09 11:55:52 -04:00
triagonal a098055fc9 Fix NPE when teleporting offline players (#4332) 2021-07-08 09:24:40 -04:00
cba5063b33 Add config option to change discord show-avatar url (#4330)
Co-authored-by: T41US <adityakomp@gmail.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-07-07 19:55:43 +00:00
AnsandrandJosh Roy 3787b80286 Add UserTeleportSpawnEvent (#4328)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-07-07 14:52:49 -04:00
pop4959andJosh Roy 2858bd3784 Add role placeholder to Discord message format (#4329)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-07-07 11:55:25 -04:00
OliviaandJosh Roy ff58d8e443 Add config option for new username join messages (#4290)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-07-07 15:46:54 +00:00
Josh Roy 5e178943a0 Update to Minecraft 1.17.1 (#4324) 2021-07-06 18:34:40 +01:00
triagonal 33ca3b2981 Fix behavior of itemdb command on legacy versions (#4320) 2021-07-05 21:29:24 -07:00
triagonal 8c8c85d753 Fix server shutdown not setting logout location (#4318) 2021-07-05 15:47:42 -04:00
Josh Roy 6535edf4e0 Fix MailMessageSerializer not handling null UUIDs (#4314) 2021-07-03 19:32:34 -04:00
Josh Roy 7e25570344 Remove usage of java.awt.Color (#4312)
This fixes issues on headless JREs which lack java.awt classes.
2021-07-03 20:46:09 +01:00
Josh Roy 409210ccde Fix issues with 3rd-party Vault economy providers (#4303)
Turns out that when you depend on a plugin, get this, the plugin will load before you. So we need to rework how we do things here.

Fixes #4075
Fixes #4304
2021-07-03 16:54:01 +01:00
Josh Roy 555a62c582 Fix baltop something having a null name for offline players 2021-07-03 01:04:59 -04:00
Josh Roy 36a070be4c Fix Configurate conversions not saving 2021-07-03 01:04:59 -04:00
Josh Roy d903e40a53 Fix weird behavior with legacy mails (#4307) 2021-07-02 21:52:49 -07:00
Josh Roy d78729f343 Disallow empty discord filters (#4298) 2021-07-01 15:59:35 -07:00
Josh Roy a55289196b Add server start/stop messages 2021-07-01 15:56:46 -04:00
Josh Roy 3505b47d8f Fix vanilla command execution on discord 2021-07-01 15:56:46 -04:00
Josh Roy 11836e6662 Ensure MessageFormat's are clean before parsing 2021-07-01 15:56:46 -04:00
Josh Roy 4ce38bde36 Allow uppercase variables 2021-07-01 15:56:46 -04:00
Josh Roy 711f701d62 Fix typo in mail tab complete (#4296) 2021-07-01 19:22:48 +00:00
triagonal 94c509b1e2 Prevent exception when retrieving enchantments (#4297) 2021-07-01 15:18:05 -04:00
triagonalandJosh Roy 5c08a0e72c Ignore case when matching custom item aliases (#4295)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-07-01 16:30:08 +00:00
Josh Roy 9c451271e0 Rework Mail System (#3710)
* New `/mail sendtemp <time diff> <message>` command to send mail that will self-destruct after time diff.
* New `/mail clear <number>` command to clear a specific mail item.
* `/mail read` now tracks which mails you read and won't nag you about them.
* A bunch of other flexibility since we store actual data instead of strings
2021-07-01 11:23:32 -04:00
Josh Roy 55db6c2476 Fix afk list NPE (#4294) 2021-07-01 16:15:24 +01:00
0861427bf3 Discord Module (#3844)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: pop4959 <pop4959@gmail.com>
Co-authored-by: Riley Park <riley.park@meino.net>
Co-authored-by: Jason <11360596+jpenilla@users.noreply.github.com>
2021-07-01 09:43:35 -04:00
Josh Roy 9d3bf337e1 Improve itemlore and itemname tab completion (#4280)
- Improve tab completion for itemname and itemlore
- Improve air type matching
- Fix incorrect /itemlore usage messages
2021-06-28 20:19:02 +01:00
Flask BotandMD 4e4eb35240 New Crowdin updates (#4182)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-06-27 14:46:04 +01:00
Josh Roy e7e3f58c8f Fix missing translation param in ice command 2021-06-27 14:40:14 +01:00
pop4959andJosh Roy c18830ce75 Fix pickup delay with essentials.build.pickup permission (#4273)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-06-27 02:36:28 +00:00
triagonal 3f36a52685 Prevent NPEs in /powertool (#4276)
This PR fixes a long-standing bug where using the `a:` or `r:` modes in `/powertool` with no commands already set on the item would result in an NPE. To prevent this, the powertool command list is now immediately initialized if it doesn't exist upon retrieval.
2021-06-26 20:11:03 +00:00
Josh Roy 64eb39a417 Add serialization support to kits (#3248)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

This PR makes use of Paper's item serialization to serialize items into base64 allowing for all items to be properly stored without needing to manual write in special cases for every complex item. There is a config option to disable using this new serialization and use the legacy ItemDB serializer since the new serializer removes the ability to manually edit/read kits.

Defaults to not enabled

Note: The new serializer places an @ sign in front of items serialized by the new format in order to quickly determine what is serialized by the new serializer and also to retain backward compatibility with the old serializer.

Att #3114
Att #2867
Att #1694
Att #31
Att #1283
2021-06-26 20:03:27 +00:00
MD 736ecae5ff Add missing FakeServer methods 2021-06-26 20:34:04 +01:00
Flask Bot 6bd4a6a037 Update items.json from generator 2021-06-26 20:34:04 +01:00
Josh Roy 4271938c3a Add ice commmand #EasterEgg 2021-06-26 20:34:04 +01:00
Josh RoyandMD e1441c1d33 Update mobs and NMS usage to 1.17
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-06-26 20:34:04 +01:00
triagonal 9bd35a2cd2 Fix regression in /back behavior (#4264) 2021-06-23 08:44:47 -04:00
triagonal d4e194fbf7 Fix NPE when RTP center isn't set (#4251) 2021-06-19 12:23:00 -04:00
Josh Roy 003d556f3d Fix incomplete cooldowns being added to data (#4249) 2021-06-18 19:28:10 -04:00
triagonal 1da3b3f08e Implement home cleanup utility (#4244) 2021-06-18 11:24:43 -04:00
Josh Roy f08c176b68 Fix invalid home locations giving blank errors (#4240) 2021-06-17 20:28:07 +01:00
Josh Roy 780aadedf2 Fix invalid empty value for BigDecimal (#4237) 2021-06-14 22:15:25 -04:00
Josh Roy 3fe279e229 Fix NPE in UserData#getHome (#4234) 2021-06-14 07:28:42 -04:00
Josh Roy c43af5d3d9 Fix NPE for list group (#4230) 2021-06-12 14:34:58 -07:00
DebugandJosh Roy 65b80200bd Fix incorrect behavior from last PR (#4228)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-06-12 14:14:19 -04:00
DebugandJosh Roy 6e5a41a880 Add option to hide balances <=0 from baltop (#4226)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-06-12 12:31:39 -04:00
Daniil ZandJosh Roy fa87c74b56 Allow enchants on fireworks/charges/potions/banners (#3882)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-06-11 11:13:43 -04:00
antiPerson 8142da608c Fix damage from exploding beds being cancelled (#3874) 2021-06-11 15:06:12 +00:00
Debug eacc748b09 Fix /book command not supporting multi-word title & author (#4180) 2021-06-11 15:00:21 +00:00
Josh Roy def41802b8 Fix broken cooldowns causing exceptions (#4219) 2021-06-09 21:20:51 -04:00
Josh Roy 38dcdff659 Fix invalid mail key (#4218) 2021-06-09 17:03:29 +01:00
Josh Roy bd9540cea3 Fix EssentialsSpawn not defaulting on default group (#4217)
Fix regression from #4072, tested in #essx-support on MOSS
2021-06-09 14:54:47 +01:00
triagonal 0d71fe65f6 Prevent getting jail worlds before world load (#4216) 2021-06-09 08:34:14 -04:00
Josh Roy 54c70581a2 Add config option to respawn jailed players to spawn (#4132) 2021-06-08 21:04:30 -04:00
pop4959 3abddd6f84 Fix tab complete on /enchant failing on empty key (#4215) 2021-06-08 20:50:17 -04:00
Josh Roy 8e712bc827 Fix empty paths with Configurate (#4214) 2021-06-09 00:42:45 +01:00
Jason 2018149395 Clean up Bukkit API exclusion, use dep constraint for SnakeYAML (#4213) 2021-06-08 23:36:43 +01:00
Josh Roy ecea17195a Fix parsing of command cooldowns with invalid data (#4212) 2021-06-08 16:51:47 -04:00
Josh Roy a28d0823b2 Fix invalid CommandCooldowns causing NPEs (#4210)
* Fix invalid CommandCooldowns causing NPEs

* Add Map support
2021-06-08 12:40:52 -04:00
Josh Roy 6e6561a267 Minimize (#4209) 2021-06-07 23:48:18 -04:00
Josh Roy 8b1db22a53 Fix setting of locations to LazyLocations + Shade CheckerQual (#4208) 2021-06-07 23:30:37 -04:00
Josh Roy 3d09ea386b Fix remaining uses of Location over LazyLocation (#4206) 2021-06-07 22:23:13 +00:00
Josh Roy 300daea4f9 Lazy load locations in Configurate (#4203) 2021-06-07 15:52:12 -04:00
Josh Roy 7653da0e4f Migrate to Configurate (#4072)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: Riley Park <riley.park@meino.net>
Co-authored-by: zml <zml@aoeu.xyz>

Migrates all uses of SnakeYAML and Bukkit's Configuration API to Sponge's Configurate.

Configurate enables us to the do the following stuff:
* Serialize YAML off the main thread
* (in the future) Automatically update our config
* (in the future) Manipulate comments in configs
* Be epic

This commit also *finally* strips out the 3.x storage/object mapping system in favour of Configurate's object mapper.
2021-06-07 13:49:33 +01:00
JasonandJosh Roy 19b4da07b9 Clean up gradle build scripts
Adds run-paper plugin support as well as moves majority of logic to kotlin build scrips

Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-06-07 08:17:39 -04:00
Josh Roy ff9f93fba4 Fix sleeping ignored vanish setting overriding permission (#4201) 2021-06-06 16:12:07 -07:00
Josh Roy fed26071ac Add option to ignore vanished players from sleeping (#4200) 2021-06-06 17:05:16 -04:00
Josh Roy a4fbfbef02 Fix offline player account creation (#4199)
This bug occurs when a player has joined before EssentialsX was installed and a player account creation is requested through Vault while they are offline.

Fixes #4195
2021-06-06 19:40:55 +01:00
Josh RoyandMD 347751a826 Fix branch name when building main branch on GH (#4193)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

Fixes #4191.
2021-06-03 17:03:14 +01:00
Josh Roy fbb3a9a0a4 Fix various NPC account lookup issues (#4188) 2021-06-01 15:47:39 -04:00
Josh Roy f8f1facf43 Check legacy "NPC:" UUIDs in VaultEconomyProvider#hasAccount (#4178) 2021-05-31 15:12:06 +00:00
Flask BotandMD 0d6441d0b6 New Crowdin updates (#4145)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-05-29 23:18:25 +01:00
Josh Roy a009b2f9b5 Only use convert spawners tagged by the give command (#3963) 2021-05-28 14:29:52 -04:00
Josh RoyandMD 7852aedabd Add book page serialization (#4048)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

Allows serialization of books in `/createkit`. Closes #31.
2021-05-28 18:52:18 +01:00
Josh RoyandMD b2d7d1b4cb Add prevent-type permissions for /itemname (#4133)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

Adds `essentials.itemname.prevent-type.<material_name>` permissions. Closes #4044.
2021-05-28 17:35:33 +00:00
Josh Roy ec50b28f4b Add ItemStack 1.8.8+ cross-version PersistentDataContainer (#4143)
This PR itself does nothing on its own but creates the underlying backbone I need to make a less hacky solution in #3963 lmfao.

This PR creates a provider which uses NBT on 1.8.8-1.13 to mimic the exact structure of a PersistentDataContainer on 1.14+ which will allow us make any possible upgrades (which don't die from the lack of DFU on >1.13) work as expected. Additionally, this does not use reflection on modern Minecraft versions and thus will not need to be maintained/updated on MC version updates.

In the future, we will need to find a way to store data on tile entities (signs namely) so that we are able to store UUIDs on signs for future plans, but for now ItemStacks work to fix our spawner issues.
2021-05-28 11:23:44 +00:00
Josh Roy 4ed36d9bbe Add support for dev/rc/beta/alpha build types (#4177)
🍍
2021-05-27 21:16:26 +01:00
l1ttleO 887772a428 Add {PREFIX} and {SUFFIX} to custom join/quit messages (#4169) 2021-05-21 13:28:22 -04:00
MDandJosh Roy e9169b890d Set Gradle toolchain to JDK 16 (#4168)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-05-21 13:15:47 +00:00
MDandJosh Roy b716c04d96 Fix minor issue with server support minor issue fix (#4166)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-05-21 07:24:39 -04:00
l1ttleO 2d3cbc9783 Fix Java version command in pull request templates (#4167) 2021-05-21 07:15:05 -04:00
Josh Roy 23a497abf6 Update Gradle to 7.0.2; misc build improvements (#4148)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

* Bumped Gradle to 7.0.2
* Now uses Java 16 for compiling to prepare for MC 1.17
  * Release target is still set to 8 however
* Bumped Actions versions
* Bumped indra version(s)
* Switched from grgit to indra-git
* Fix PR GitHub Actions jars having invalid branch names
2021-05-19 12:34:00 +01:00
Pretty Princess Sailoriae d00b90cd61 Fix formatting issue in with comma-separated lists (#4157) 2021-05-17 10:12:14 -04:00
Jason f4fe8808a4 Remove the /itemdb alias suggestion (#4152) 2021-05-14 19:26:23 -04:00
Josh Roy 02193b0523 Fix ClassNotFoundException when vault is missing (#4151) 2021-05-14 17:33:25 +01:00
Josh Roy c9310ea429 Fix a minor issue with support status detection (#4150) 2021-05-14 16:01:50 +00:00
Josh Roy c76e4239bb Ensure NPC userdata creation for Citizen NPCs (#4149)
https://github.com/CitizensDev/Citizens2/blob/0ddfcbd0fa99678934e7b086f1a7b92e6a1bc49e/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HumanController.java#L36-L40

why????????????????????????????????????????????????????????????
2021-05-13 22:30:37 +01:00
Josh Roy 8a8d45c91e Fix vault provider account creation (#4147)
Removed an extraneous name->uuid check
  This check swallowed any warnings spit out by UserMap#trackUUID causing problems
  for plugins which didn't check the success of this method and thus leading to
  possible stack overflow exceptions or other unexpected behavior

Actually save accounts created with VaultEconomyProvider#createPlayerAccount
  Complete oversight as I was under the impression tracking the UUID would create
  the files for us.
2021-05-13 00:52:26 +00:00
Josh Roy 071f99560e Migrate to new Vault provider and economy integration (#3975)
This commit:
- Implements a new provider for VaultAPI's `Economy`
  - The legacy provider built into Vault uses player names, and has not changed since Vault was invented in 1864.
  - This properly supports UUIDs and works more predictably with EssentialsX.
- Replaces the Register method economy abstraction layer abstraction layer with a new `EconomyLayer` economy abstraction layer abstraction layer.
  - This opens the pathway for future economy abstraction layers to be supported.
  - This change also removes dubiously-licensed code from the project.

For users encountering userdata issues on this build, see this FAQ entry:
https://github.com/EssentialsX/Essentials/issues/3956#issuecomment-779254544

Fixes #4110.
Closes #3344.
Closes #2401.
2021-05-10 19:36:09 +00:00
Josh Royandtriagonal 8b23c2c4cd Add helpful command argument descriptions (#4057)
Co-authored-by: triagonal <10545540+triagonal@users.noreply.github.com>
2021-05-10 18:36:30 +00:00
Josh Taylor 0d640d1215 Fix netlify deploy message (#4141) 2021-05-05 09:36:43 -04:00
MD b4d63857ce Fix Javadoc preparation step (#4140) 2021-05-05 08:32:49 -04:00
Josh RoyandMariell Hoversholm 4976484d91 Unformat item lore and name when serializing items (#4095)
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-05-02 16:18:35 -04:00
Josh Roy 16627d10b6 Add way for time and weather signs to display the time/weather (#4131) 2021-05-02 19:34:38 +00:00
Josh Roy 83ca7d2574 Prevent stack overflow when finding an EssX cmd as alternative (#4128) 2021-05-02 15:08:18 -04:00
Josh Roy 956afc0382 Fix kit-auto-equip not working on versions < 1.14 (#4130) 2021-05-02 19:03:43 +00:00
MDandJosh Roy 312ff110ec [CI-SKIP] Automatically publish 2.x javadocs (#4083)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-05-01 16:37:24 -04:00
NotMyFault 214d07c468 [CI-SKIP] Address template deprecations (#4125) 2021-04-25 16:45:04 +00:00
l1ttleOandJosh Roy 2c68d1b866 Fix /pay working on vanished players (#4114)
Vanished players are now treated as offline players.

Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-04-18 10:08:07 -04:00
Josh Roy 5171215817 Fix various trade sign issues (#4056)
Fixes various bugs with line length validation and fixes issues with overfilled stacks.
2021-04-14 12:24:24 -04:00
Jason 195148a2a2 Fix disabled commands not marking the command map as dirty (#4108) 2021-04-12 19:08:19 -04:00
pop4959andJosh Roy edf664e19a Unregister disabled commands (#4026)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-04-07 21:37:21 -04:00
Suyeol Jeon 0668e4c48a Fix regression in permission based item spawning (#4100) 2021-04-03 11:38:04 -04:00
triagonal d75787726c Add some extra keywords (#4098) 2021-03-29 13:07:55 -04:00
triagonal 1e0d7fb0a3 Add missing respawn-at-home-bed config option (#4071)
This PR adds a missing config option that was accidentally left out in #3802 (thank you @mibby for the heads up).
2021-03-20 16:09:59 +00:00
Josh Roy 454698bf98 Fix delayed futures never being completed correctly (#4066)
This PR fixes issues related to timed teleports. All timed teleports before this PR would create their own future to send back to the AsyncTeleport api causing the futures returned in the base methods never being completed.

This PR pases the future returned in AsyncTeleport methods to the timed teleport and completes it after the timed teleport has been completed.

Fixes #4065.
2021-03-20 15:48:40 +00:00
Josh Roy bfeb0ef2ad Fix update check on 3+ digit build numbers (#4069) 2021-03-19 00:14:45 -04:00
Josh Roy 1cf2b11f1e Improve currency validation in signs (#3987)
Sanitise currency strings in more cases when handling signs. Should fix #3979.
2021-03-13 16:36:18 +00:00
Josh Roy 0ce4029483 Change createkit to use paste.gg (#4049) 2021-03-09 21:28:07 -05:00
Josh Roy 504e82e9fd Update FakeWorld (#4043) 2021-03-08 15:39:52 -08:00
Josh Roy eca6a9f247 Improve update checker startup message logging (#4039)
* Use plugin logger for update checker
* Use info log level when update checker is disabled

Closes #4038.
2021-03-06 23:52:10 +00:00
Josh Roy 94d4385d41 Fix list command exposing groups with vanished players (#4032)
Fixes #4018.
2021-03-06 19:42:59 +00:00
Josh Roy c41bb0ec42 Delay GeoIP join task to ensure display name is set (#3968)
Delays the GeoIP join messages by 2 ticks to ensure the user's display name has been set by Essentials' `DelayedJoin` task.

Fixes #2388.
2021-03-06 19:22:00 +00:00
Josh Roy 00b71cafc9 Add netherite related items to spawnmob (#4031)
Allows spawning skeletons and zombies with netherite armor and swords. Fixes #4029.
2021-03-06 19:06:31 +00:00
MD 3cd69dabe9 Fix metrics initialising before update checker (#4037)
This PR fixes an issue introduced in #3855, where bStats inits before the update checker and so fails to grab the current release branch.
2021-03-07 03:58:35 +11:00
Josh Roy 10fa3b5a31 Add update checker (#3855)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

Adds an update checker to Essentials that will check for the latest version on startup, on player join (permission is `essentials.updatecheck`), or manually with `/ess version`.

On startup, the update checker will fetch build information from a resource generated at compile time and determine if the build is a dev or stable build. If it's a stable build, the update checker will only check for a new release; while a dev build will check for any new commits.

There are 6 different types of messages the update checker will return;
* Identical: The current build is the latest stable release or latest dev build. This message is only shown in the `/ess version` command.
* Behind: If the current build is stable, it's an entire stable build behind, otherwise it's one or more dev builds behind.
* Diverged: The current build was made from a branch other than `2.x` and is also one or more dev builds behind the latest commit on `2.x`.
* Diverged Latest: The current build was made from a branch other than `2.x` but is based on the latest commit from `2.x`.
* Unknown: The current build either has invalid build information or was customly built. This message is show everywhere but on player join.
* Error: There was an error while fetching the latest version information.

Update checks can be disabled using the `update-check` option in `config.yml`.
2021-03-06 16:29:42 +00:00
Josh Roy b43790e9d2 Fix failing gradle build (#4025)
Paper has recently added adventure as a first part library, and thus has shaded it in. Adventure is on maven central, so we must add it in order for Essentials to build.
2021-03-02 04:52:05 +00:00
Frank van der HeijdenandJosh Roy ee5f4b9b42 Fix some futures in AsyncTeleport never completing (#4016)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-02-27 11:19:28 -05:00
MD e5db842dd6 Document XMPP config and require server TLS by default (#4002)
Small changes related to #3962.
2021-02-21 10:46:32 -05:00
Josh Roy 657a11b1f4 Add permission to adjust delay in /spawner command (#3964) 2021-02-21 08:59:57 -05:00
Josh Roy 0ef1e23c69 Show UUIDs in /seen (#3906) 2021-02-21 13:57:19 +00:00
Josh Roy 141512f2f7 Fix afk message being sent when event cancelled (#3915) 2021-02-21 13:54:02 +00:00
Josh Roy 671983724a Fix invalid configuration section for world aliases (#4000) 2021-02-21 00:09:34 -05:00
Josh Roy 81571fc014 Add /toggleshout command (#3965)
Adds a command to toggle shout mode of a user allowing them not to have to prefix all their messages with `!` if they're shouting a lot.

Closes #3958.
2021-02-20 16:37:16 +00:00
Frank van der Heijden f806409d80 Add support for commands.yml aliases in command cooldowns (#3744)
Fixes #2058.
2021-02-20 16:30:07 +00:00
Josh RoyandMD f3c347424b Add new signs for recently added virtual commands (#3961)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

Closes #3919.
2021-02-20 15:59:30 +00:00
Josh Roy 8cbd9b7935 Add /editsign copy + paste (#3989)
Adds `copy` and `paste` subcommands to `/editsign` to allow users to copy and paste the contents of signs without having to use the tab-completion output of `/editsign set`.

The `/editsign copy` command will also perform format-permission checks to ensure the user copying the sign has the proper permission to use said formatting.

Closes #3973.
2021-02-19 15:13:49 +00:00
Josh Roy 158d273dbe Allow blank currency symbols (#3946)
Fixes a behavior previously possible before c6de771

I wrote the proper logic in c6de771 to handle blank currency symbols but forgot to remove the Settings check that was preventing blank currency symbols.

Fixes #3945.
2021-02-19 14:58:42 +00:00
Josh Roy 1258d2f0a1 Fix further incorrect messages for jail countdowns (#3941)
Fixes #3939, fixes #3940.
2021-02-16 13:56:57 +00:00
Josh Roy 36422ab22b Add Baltop API (#3702)
Co-authored-by: Mariell <proximyst@proximyst.com>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

This moves storage of balances from the baltop command into the UserMap. This was needed by Glare to able to get a hold of all users balances without causing jvm hell on the usermap.

To access this API as an end user;
```java
import net.essentialsx.api.v2.services.BalanceTop;
//...
BalanceTop api = Bukkit.getServer().getServicesManager().load(BalanceTop.class);
```

Closes #3100, closes #3540
2021-02-15 15:43:10 +00:00
MD 191cea7fb3 Update issue template for new config format (#3982)
This PR updates the issue form to the new schema, which will be introduced on February 19th.

The legacy issue form will be used until the switchover date.
2021-02-15 11:51:26 +00:00
Josh Roy f8cc0e41d1 Update FakeWorld (#3985) 2021-02-12 17:36:38 -08:00
MD f29f9e1aba Relocate GeoIP dependencies (#3976)
Relocates jackson, javatar and the MaxMind database libraries to avoid conflicts with other plugins.
2021-02-10 09:27:56 -05:00
MD 34fdcf8f6f Improve logging of dangerous userdata edge cases (#3969)
This commit improves the logging of a few edge cases that can lead to loss of userdata:
- Third-party plugins forcing creation of a NPC account which could not be found on the usermap, even if the account file exists
- UserMap#trackUUID being called with a conflicting UUID but replace set to false
2021-02-08 15:50:57 +00:00
Josh Roy adef08af3e Add world aliases for Chat (#3912)
Allows world names to be overridden with a defined value from the config in EssentialsX Chat.

Closes #1793.
2021-02-05 20:31:13 +00:00
Josh Roy 1301e8fc99 Show custom item aliases in /itemdb (#3907)
Shows items from the custom_items.yml resolver in /itemdb.

Closes #3686.
2021-02-05 20:27:33 +00:00
Josh Roy eee1c0628b Add API packages (#3938)
Adds packages for future EssentialsX 2.x API and services.
2021-02-05 20:13:03 +00:00
MD 9ce839c9d8 Update issue chooser with forms and Discussions links (#3936)
Co-authored-by: triagonal <10545540+triagonal@users.noreply.github.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>

This commit:
- Introduces a bug reporting form
- Moves feature requests and support requests to Discussions
- Adds a default PR template instructing people to use the correct template
- Adds GitHub Sponsors and Open Collective to the Sponsor button
2021-02-05 19:58:26 +00:00
Josh Roy 401fc4d2eb Fix AntiBuild performing place checks for block state changes (#3914)
Bukkit sometimes decides that state changes are also a block placement. Work around this by comparing the previous block state with the new block type.

Fixes #3150.
2021-02-05 19:44:43 +00:00
Josh Roy 4e7f1377bf Infer jail name when the server only has one jail configured (#3911)
Closes #1122.
2021-02-05 19:39:20 +00:00
Josh Royanddarbyjack fccf796eeb Add /kitreset command (#3909)
Co-authored-by: darbyjack <admin@glaremasters.me>

Closes #163. Ports #2645, which had its branch messed up by merges.
2021-02-05 19:35:38 +00:00
Josh Roy 500edb7860 Add config option to disable message social spy (#3910)
Adds a config option to allow to prevent socialspy from reading private messages. Useful if all you want from social spy is to read commands defined in the list.

Closes #1095.
2021-02-05 19:02:26 +00:00
pop4959andJosh Roy cb168b0c8a Add support for material tags in enchant signs (#3694)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>

Closes #3653.
2021-02-05 18:57:32 +00:00
Simon 74131f816c Update VersionUtil Support Status Check (#3954)
Removed AirplaneLite as an unsupported fork as they removed their concerning patch.
2021-02-02 09:15:01 -05:00
luisc99andJosh Roy f1ef21eb0d Fix duplicate nickname check with custom display names (#3922)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-01-28 10:08:38 -05:00
DaniilandJosh Roy 79406613c1 Add /alts alias for /seen (#3931)
Adds `essentials.alts` also to allow server admins to not give mods the ips of users.

Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-01-28 09:29:50 -05:00
Josh Roy 89c1e3b60d Fix invalid formatted jail time strings in whois/seen (#3917)
Fixes #3916, a "slight" discrepancy on jail time reporting in whois and seen commands
2021-01-23 17:41:24 -05:00
224634d8d2 Improve VersionUtil version checks (#3812)
Co-authored-by: Dylan Xaldin <Puremin0rez515@gmail.com>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2021-01-19 07:40:05 -05:00
Josh Roy e42d37e86d Fix various problems with firework meta (de)serialization (#3905)
Adds support for parsing fireworks charges (would previously cause exceptions due to illegal casts to FireworkMeta) and fixes createkit from producing invalid color values

Thanks to triagonal for reporting the exception caused by createkit.

Fixes #1283.
2021-01-19 07:30:09 -05:00
DaniilandJosh Roy 191c9e9302 Fix bPermissions not showing up as unsupported (#3928)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-01-18 21:22:04 -05:00
Daniil a482ddf0f6 Fix warp deleting message not showing (#3927)
Fixes #3926
2021-01-18 21:18:13 -05:00
Josh Roy 7245e84f00 Update to 1.16.5 (#3923) 2021-01-16 01:56:56 -05:00
DaniilandJosh Roy e287600c34 Add option to disable custom server-full message (#3899)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-01-11 00:10:07 -05:00
vk2gpz 817585a9a6 Properly detect enchantments with improper names (#3900) 2021-01-09 15:26:07 -05:00
triagonal eae8bc05c9 Prevent sending usage info when executing alternative commands (#3904) 2021-01-09 13:47:58 -05:00
Josh Roy 026d279556 Add option to only count online jailed time (#3705)
Adds `jail-online-time` config option to only count a player's online time to the jail cap.

This also fixes memory leak in `EssentialsTimer` which I found in the process of testing.

Closes #429.
2021-01-08 20:43:32 +00:00
Josh Roy 8177893e28 Add auto armor equip for kits (#3629)
Adds a config option to have player auto-equip armor from kits.

Also adds a performance improvement for all uses of EnumUtil#getAllMatching by switching it to an EnumSet.

Closes #347, closes #3452.
2021-01-08 20:39:32 +00:00
Josh Roy 70de83827d Allow paying offline users via /pay (#3625)
Closes #3577.
2021-01-08 20:35:00 +00:00
JoshuaandJosh Roy 5af9536db1 Add WarpModifyEvent (#3875)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-01-08 15:20:03 -05:00
Josh Roy cb7b2dabf5 Block removing hats with curse of binding using direct-hat (#3895)
Fixed loophole that allowed users to bypass curse of binding when using direct hat feature.

Related to #3299, which added similar checks to `/hat`.
2021-01-08 20:11:35 +00:00
LuukandJRoy 01987a0374 Fix AbstractItemDb#getMatching improper block filtering (#3691)
Co-authored-by: JRoy <joshroy126@gmail.com>
2021-01-03 12:45:32 -05:00
Josh Roy 5528b5b92c Allow users to middle click in armor invsee (#3893) 2021-01-02 15:36:12 -05:00
RyanandJosh Roy 1838354b70 Add ending user balance as a final field in trade.log (#3721)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-01-02 00:12:53 -05:00
1f1edd9b23 Add UserKickEvent (#3490)
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>
Co-authored-by: JRoy <joshroy126@gmail.com>
2021-01-02 00:04:13 -05:00
kmecppandJRoy 2b7a4364b1 Don't lowercase item names in IItemDb#get(String, int) (#3636)
Co-authored-by: JRoy <joshroy126@gmail.com>
2021-01-01 23:16:24 -05:00
2f45d3edf3 Add API to register enchantment names/aliases (#3669)
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>
Co-authored-by: JRoy <joshroy126@gmail.com>
2021-01-01 23:11:22 -05:00
Olivia a20d20574e Add TransactionEvent for successful transactions (#3649) 2021-01-01 22:45:52 -05:00
pop4959andJosh Roy d78832498e Fix warp messages sending incorrectly with teleport delays (#3696)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-01-01 22:06:09 -05:00
MDandJosh Roy e2c6170eba Add option to disable players respawning at beds (#3802)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-01-01 22:02:55 -05:00
powercas_gamerandJosh Roy 6864af762c Update plugin.yml (#3832)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
2021-01-01 21:58:59 -05:00
OmegaWeaponDev a8daa2160f Separate option to cancel afk on chat from interact (#3863) 2020-12-31 19:20:08 -05:00
triagonal b84aaa1dab Fix behaviour of /list when showing real names (#3858) 2020-12-31 19:14:39 -05:00
Josh Roy c6de77130f Rework Currency Symbol Parsing (#3628)
* Made currency symbol standardized in Kit 
  * Kits should be in a standardized format.
  * Having monetary rewards in kits should not break based off of a config value oriented around currency display (suffix).
  * Additionally, the dollar sign should be the standard money symbol which works on all servers and should not be tied to the server's individual currency symbol.
  * Note that the server's individual currency symbol will still work but probably should not be used due its volatility.
* Reworked config currency symbol parsing in Settings 
  * Simplifies the number of actions needed to sanitize the input.
  * Now just defaults to `$` if the currency-symbol cannot be parsed.
* Removed symbol-suffixed parsing in NumberUtil#sanitizeCurrencyString
2020-12-30 15:37:30 -05:00
Josh Roy 02ba924f33 Fix AlternativeCommandsHandler not detecting some aliases (#3856) 2020-12-30 11:59:38 -08:00
Josh Roy 318df64e54 Fix Improper Use of Event API (#3853)
* Fix Improper Use of Event API

* Checkstyle OOOO
2020-12-21 18:35:58 +00:00
Josh Roy cb45867de8 Remove Jenkins from README (#3850)
EssX website is PogU, Jenkins is PogO
2020-12-21 15:21:36 +00:00
Jason c4ca0e51e2 Add restart note to respawn listener priority option (#3789) 2020-12-20 20:41:26 -08:00
triagonal 7bb12fd33c Fix incorrect radius check in /me command (#3848) 2020-12-20 20:08:11 -08:00
MD 001213ee2c Update bStats Metrics class to 1.8 (#3845)
Replace modified bStats Metrics 1.7 class with official 1.8 artifact. 1.8 adds random submit intervals and changes the way submissions are scheduled, and our custom modifications are no longer needed as we now use the plugin ID.
2020-12-19 16:27:07 +00:00
Josh Roy f320705216 Fix build script not working when git repo isn't cloned (#3831) 2020-12-13 20:54:54 -08:00
Josh Roy d4ed77fdc6 Update FakeServer (#3829) 2020-12-13 18:11:29 -08:00
Josh Roy ef1202923e Fix command handler not finding dynamically registered commands (#3816)
Fixes #3815.
2020-12-12 13:50:34 +00:00
e1e98f5048 Add /warpinfo command (#3820)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2020-12-11 16:38:10 +00:00
MD 5bb3cc88e5 Dispatch commands on main thread when run from XMPP (#3803)
This PR fixes an issue reported on Discord, where commands executed through XMPP are dispatched async from the XMPP listener thread.
2020-12-11 16:36:29 +00:00
Josh Roy 43eff69a2f Fix incompatibility on TacoSpigot and derivatives (#3817)
The countless support tickets from users of TacoSpigot (and forks of it)
have become so numerous it's not worth holding our ground on this. Taco fucked up
by going against upstream revision numbers, but as they're defunct, it's not
going to change now. We will not fix server implementations that do this in the
future, but hopefully they have all learned their lesson to use proper
versioning. The way md_5 intended.
2020-12-11 16:31:40 +00:00
Roman Zabaluev 450da59057 Allow console name to be translated (#3700)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>

Closes #2756. 

Notes:
- I've kept original name for internal purposes (storing bans, etc), just in case user wants to rename it to something unbearable;
- User can message console via both names (since he can try both, duh);
- Some refactoring. Just a little.
2020-12-11 16:29:48 +00:00
Josh Roy dda4d58a23 Move paperlib off snapshot (#3808) 2020-12-02 19:44:35 +00:00
Josh Roy f5d5ed9844 Fix respawn anchor explosion protection (#3778)
Fixes #3723, where respawn anchors explode at charges > 0 when glowstone isn't in the players hand, or at charges = 4 on right click regardless of item.
2020-12-02 19:43:01 +00:00
MD 2342d53dba Revert Spanish translation spam 2020-11-30 16:33:24 +00:00
MD 005d83c6fe Fix checkstyle-idea default settings 2020-11-30 15:01:14 +00:00
Flask Bot 8c4fb3fefb New Crowdin updates (#3793) 2020-11-28 11:10:49 +00:00
MD b0fa0d1ec8 Remove mavenLocal repo from default repositories 2020-11-26 12:39:52 +00:00
MD 2ce5797d5e Update metrics warnings 2020-11-26 12:26:08 +00:00
MD c2617e5a1d Fix javadoc warning suppression 2020-11-26 01:19:16 +00:00
MD 3f73e31d9e Suppress deprecation and javadoc warnings by default 2020-11-26 01:12:58 +00:00
MD 84a48adbdd Change resolution strategy to refresh snapshot dependencies more frequently 2020-11-26 01:04:11 +00:00
MD 63c29a318e Implement missing FakeWorld methods 2020-11-26 00:42:26 +00:00
MD 69748fd72e Make resource processing depend on version string 2020-11-26 00:38:27 +00:00
MD 35278c6e90 Upload GH artifacts before publish 2020-11-25 20:43:23 +00:00
MD 088fc35435 Mark gradlew as executable 2020-11-25 20:37:45 +00:00
MD 4baad6b89c Fix missing "s" which prevented GH Actions deployment 2020-11-25 20:33:33 +00:00
Josh Roy 9a23f806fe Refactor Project to Gradle (#3720)
Gradle is better than Maven, don't @ me. okay but actually it's [faster](https://www.youtube.com/watch?v=atuFSv2bLa8&feature=youtu.be&t=77), compiles and tests in parallel more efficiently, and more epic stuff).
2020-11-25 20:24:24 +00:00
powercas_gamer 82b466db0b update website links in config.yml (#3779)
Updates the website links in the config.yml to `essentialsx.net` instead of `essentialsx.cf`
2020-11-18 10:23:45 +00:00
JRoy a6edf04a60 Release 2.18.2 2020-11-16 11:32:40 +00:00
Josh Roy 3ba675a899 Allow users to modify existing homes when over homes limit (#3776)
Fixes #3761
2020-11-15 17:40:34 +00:00
pop4959 1fed7a9a3a Fix tab completion for delhome (#3775)
There was a minor issue with one line of code in delhome which was causing the user's homes not to be listed since the condition was effectively reversed. This was also causing an NPE for console senders attempting to tab complete.

Fixes #3774
2020-11-14 22:50:48 +00:00
80fb91b6d7 Fix /clear <player> <item> not clearing offhand (#3715)
Co-authored-by: Kenichycmd <kenichycmd@gmail.com>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
2020-11-09 16:43:55 +00:00
Josh Roy 5b0c2a4131 Use ray-tracing based target block for 1.13.2+ (#3763)
Uses new method of ray-tracing to target block instead of using BlockIterator which doesn't respect the player looking at a different y-level. Falls back to old BlockIterator method on server versions older than 1.13.2

Fixes #3756.
2020-11-09 16:38:02 +00:00
Josh Roy bb43e8f7b6 Add option to prevent replying from vanished players (#3703)
Closes #2066
2020-11-09 12:25:16 +00:00
Josh Roy 4d9a10147a Split backup command by space (#3762)
Splits command sent to ProcessBuilder by spaces. Fixes backup commands with arguments

Fixes #3759
2020-11-09 08:52:35 +00:00
Josh Roy ea4f5cf919 Update to 1.16.4 (#3753) 2020-11-02 13:36:48 -08:00
dependabot[bot] 295bc9f76d Bump junit from 4.12 to 4.13.1 (#3726)
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-23 00:19:54 +01:00
MD 327806d9a1 Add new PR templates and revamp issue templates (#3711)
Adds new PR templates and revamps the existing issue templates to (hopefully) make the PR/issue submission easier to understand.
2020-10-23 00:19:04 +01:00
Josh Roy 80e7558fc0 Move some tab complete messages to debug mode only (#3739) 2020-10-22 12:15:02 -07:00
md678685 9cda59511e Consolidate permissions default setup into single class 2020-10-19 21:27:05 +01:00
md678685 c12a031918 Add more specific platform support messages 2020-10-19 21:26:38 +01:00
Alexander SöderbergandMD a4f580e319 Make HelpInput use the known command map (#3675)
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

This PR makes HelpInput use knownCommands in the command map, rather than relying on plugin descriptions. This means that commands that have been registered programmatically (or impromptu) will be recognized and displayed in the help menu.

The ugly reflection is due to Spigot not exposing the command map getter. This has been tested on Spigot 1.8, 1.16.3 and Paper 1.16.3 with plugins that register commands directly to the command map.
2020-10-19 15:27:40 +01:00
md678685 583bf88207 Implement ConsoleCommandSender methods 2020-10-19 15:06:50 +01:00
montlikadani a5f8e83e03 Remove redundant checks in the tree command (#3716) 2020-10-13 00:47:12 -07:00
Alexander Söderberg e2f17f11d3 Tab-complete plugin names in /help (#3713)
Plugin names are accepted as input to `/essentials:help`, but they are not completed. This makes it easier to lookup plugin commands.
2020-10-07 11:54:30 -07:00
md678685 4f8c040d06 Add link to Register license notice 2020-10-05 17:34:55 +01:00
Josh Roy af1d068022 Add more inventory commands (#3704)
Add more commands to access virtual crafting inventories (on platforms with the required APIs).

Closes #3195 and #108.
2020-10-05 14:45:33 +01:00
Andre_601andMD 1bd8d1c85c Update old EssentialsX URLs in issue templates (#3678)
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

This updates the old essentialsx.github.io domains to the new essentialsx.net one.
2020-10-05 14:20:17 +01:00
pop4959 d7fc859d14 Use username instead of nickname in console /sell messages (#3693)
Closes #3662

This PR changes the default placeholder `{0}` to username. Display name can still be used with `{5}`.

Before change:
messages.properties
`itemSoldConsole=\u00a7e{0} \u00a7asold\u00a7e {1}\u00a7a for \u00a7e{2} \u00a7a({3} items at {4} each).`
console
`[Essentials] ~test sold dirt for $64 (64 items at $1 each).`

After change:
messages.properties
`itemSoldConsole=\u00a7e{0} \u00a7asold\u00a7e {1}\u00a7a for \u00a7e{2} \u00a7a({3} items at {4} each).`
console
`[Essentials] pop4959 sold dirt for $64 (64 items at $1 each).`

messages.properties
`itemSoldConsole=\u00a7e{5} \u00a7asold\u00a7e {1}\u00a7a for \u00a7e{2} \u00a7a({3} items at {4} each).`
console
`[Essentials] ~test sold dirt for $64 (64 items at $1 each).`
2020-10-05 09:50:56 +01:00
Ryan ac953cd114 Remove sign color codes from trade.log (#3699)
Started looking into #3116 but noticed this issue and wanted to fix it first.

Also added a comment as to why the username is truncated as this took me a long time to figure out and seemed arbitrary. Probably could truncate the username later for trade signs only as other signs don't require any username to be present on the sign. However, for now I simply opted to document.
2020-10-05 09:47:12 +01:00
md678685 6e6dd041d5 Add Javadocs to most API classes 2020-10-04 19:59:42 +01:00
md678685 9b3c8a9df2 Reformat and fix Checkstyle violations 2020-10-04 19:59:42 +01:00
md678685 234a481b0d Add Checkstyle rules and suppressions
This commit adds Checkstyle rules for EssentialsX, based on those from the adventure library (https://github.com/KyoriPowered/adventure/tree/master/.checkstyle).

It also makes Checkstyle passes mandatory for a GH build to pass.
2020-10-04 19:59:42 +01:00
pop4959 89b3c9233e Bump Paperlib version (#3695) 2020-10-03 12:29:43 -07:00
Josh Roy 5d61a43fe1 Add balanceTopLine i18n translation string (#3626) 2020-09-25 19:16:12 -07:00
Olivia 29d5ccf751 Fix /lightning ignoring essentials.lightning.others (#3671) 2020-09-13 17:23:50 -07:00
l1ttleO fde0665593 Update Readme to list 1.16.3 as a supported version (#3666) 2020-09-12 10:58:54 -07:00
l1ttleO 29541b0995 Bump supported server version to 1.16.3 (#3664) 2020-09-12 10:37:18 -07:00
Josh Roy 05f31c5ddf Fix time command throwing exceptions when used in console (#3622)
Fixes #3621
2020-09-09 16:00:13 +01:00
JRoy f89840545d Revert clearinventory command to pre-command-refactor
This command is too big to rewrite without a behavior change
2020-09-09 15:52:59 +01:00
JRoy 18534f8576 Fix inverted messages in Commandpaytoggle 2020-09-09 15:52:38 +01:00
JRoy 1382a05dc8 Fix IEssentials#getOnlineUsers ABI breakage 2020-09-09 15:52:37 +01:00
JRoy 1671d4839c Clean up some tab completes that I missed 2020-09-09 15:52:29 +01:00
Josh Roy 4d2fbd04c5 Fix /sell and /worth messages displaying {1} instead of the item(s) value (#3656) 2020-09-08 12:36:05 -07:00
md678685 dc6b9b89cd Handle funky bStats classloading correctly
Fixes bStats for plugins that do funky classloading things, like AntiVPN.
2020-08-29 20:37:20 +01:00
Josh Roy 76f36aa895 [CI-SKIP] Some issue template updates (#3623)
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

* Forces use of issue templates
* Auto-labels issue templates
* Links to discord in the issue-create matrix as a better form of troubleshooting
2020-08-29 17:21:22 +01:00
Josh Roy fa835e9c64 Fix tablist name getting reset after AFK status change (#3624)
Fixes #3606.
2020-08-29 16:03:49 +01:00
md678685 c8dc874a56 Release 2.18.1 2020-08-23 17:18:31 +01:00
Josh Roy b3a6307052 Fix miscellaneous command permission bugs (#3616)
Fixes #3612, in which `/list`'s tab complete previously revealed the presence of vanished players in certain groups, and fixes #3613 in which `/time set` did not properly check whether the player had permission to change the time.
2020-08-22 20:07:21 +01:00
pop4959 3ca0181b79 Update block damaging checks in teleportation safety (#3537)
This PR updates and improves LocationUtil#isBlockDamaging. Notably, the lava check is fixed (it was not working on older versions of Minecraft), many newer materials that were missing damage checks have been added, and the code is a bit cleaner. I've tested this code on MC 1.8 and 1.16 and everything should work correctly.
2020-08-22 18:37:15 +01:00
pop4959 98557dcecf Add world border checking to teleportation safety (#3536)
Fixes #3499. Please see that issue for discussion about the bug.

Fix demonstration with `/tppos`: https://imgur.com/a/Mo4okQa
2020-08-22 17:51:23 +01:00
MD 3351092c79 Add "amplifier" potion meta attribute (#3614)
Adds an `amplifier:<value>` potion meta attribute to MetaItemStack that applies a raw amplifier value, instead of translating inputs between 1 and 3 to match their vanilla names like `power:<value>` does. This matches the Mojang `/effect` command, which doesn't translate any potion effect amplifiers, and allows for creation of level IV potions (using `amplifier:3` instead of a `power` value) through EssentialsX without breaking existing usages of `power:<value>`.

More context for this commit can be found at https://github.com/EssentialsX/Essentials/pull/3592#issuecomment-678656107.

Closes #3592 and fixes #3589.
2020-08-22 17:40:40 +01:00
pop4959 68cd509d41 Fix /bigtree command on versions 1.12 and prior (#3569)
Fixes #3549.

Replaces the `Block#isPassable` check with `Material#isSolid`, which is compatible with all versions through 1.8 to 1.16.
2020-08-22 17:01:50 +01:00
xtomyserrax 5fa65b42ae Fix creeper player damage being cancelled incorrectly (#3604)
Previously, disabling creeper explosion block damage with the `protect.prevent.creeper-explosion` setting would also prevent players getting hurt. This fixes this, meaning servers can disable creeper block damage while still allowing players to take damage from creeper explosions.
2020-08-22 16:55:32 +01:00
Andre_601 bdae259a1d Update links in readme (#3596)
This PR updates several links:

- https://essentialsx.cf -> https://essentialsx.net
- Wiki links (Either github.io links or GitHub Wiki links) now point to their corresponding pages on the actual wiki (https://essentialsx.net/wiki/Home.html)
2020-08-22 16:49:50 +01:00
Jason fea86ea70e Add config note regarding displayname (#3535) 2020-08-22 14:15:24 +01:00
Josh Roy 1133770aeb Fix changing players' gamemodes from the console (#3590)
Fixes #3587 which was introduced by #3337.
2020-08-21 16:37:54 +01:00
MD 2c462106bc Fix blacklisted blocks being pulled by pistons (#3610)
Closes #3609.
2020-08-21 16:31:34 +01:00
triagonal bd1e624c91 clarify piston blacklist config comment 2020-08-21 23:00:56 +10:00
triagonal 6875fa4c7e fix blacklisted blocks being pulled by sticky piston 2020-08-21 23:00:18 +10:00
pop4959 def5f2155d Fix compilation issues on latest Spigot/Paper (#3607) 2020-08-20 19:24:42 +01:00
triagonal 73d2457fea Fix regression with teleportation commands where command cost gets charged twice (#3601) 2020-08-16 14:40:58 -07:00
MD bc52ca856e Update to 1.16.2 (#3586) 2020-08-11 23:12:41 +01:00
Flask Bot 18ccea320a Update items.json from generator
Note: this action was performed by a human (@md678685) under the
Flask-Bot account.
2020-08-11 23:06:07 +01:00
Josh Roy f6cb9ff470 Improve command codestyle (#3337)
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

Fixes #3579 (async `/skull` command)
Fixes #3336 (improve codestyle of commands)
Partially addresses #3339 (`/spawn` and `/setspawn` are now hidden from tabcomplete)
Closes #3087 (`/paytoggle` is now a loop command)
2020-08-11 19:09:22 +01:00
pop4959 14c6c2a055 Fix spawner delay feature (#3239)
Closes #1332

The spawner delay feature has been broken in Essentials for as long as anyone can remember. The reasons for this are mentioned in the issue above.

This PR fixes this by changing the command to utilize new API for setting the minimum and maximum spawn delay on spawners. This API was added in 1.12.2, so all supported versions before that (1.8.8 thru 1.12.1) require NMS to function properly. I'm aware that Essentials avoids NMS for maintainability reasons, however that should not be of much concern here since all versions 1.12.2 and later are going to be using the Bukkit API. Hence, no NMS updates will be necessary.

Also let me know if you want the NMS code refactored somewhere else. I saw the net.ess3.nms packages, but I wasn't sure where this would fit into the organisation of that.

Tested on:
1.8.8, 1.9.4, 1.10.2, 1.11.2 (NMS)
1.12.2, 1.15.2 (Bukkit API)
2020-08-05 20:47:42 +01:00
pop4959 68d0aa9688 Improve GeoIP errors/warnings (#3568)
Aims to provide a better and less confusing error for users of GeoIP who have not configured properly (which is more common now after the license key requirement). Seems like a lot of people miss the initial error on startup, and so this may help a bit.

Closes #3561.
2020-08-04 16:22:14 +01:00
MD 1ef4e15a4d Fix regression in /tpaccept (#3567)
d9bf099c3d introduced a regression where `/tpaccept` no longer unconditionally cancels the teleportation request when it is accepted. This restores the previous request cancellation behaviour.

Fixes #3563.
2020-08-04 16:20:24 +01:00
latiku d35b4b9128 Don't send chat messages if they only contain formatting codes (#3505)
Closes #3442.

When a player with the appropriate permission node to use color formatting codes sends a message with nothing but valid formatting code, a message with an empty line is sent. This PR solves this issue by checking if the final formatted message is just a color code, and if so, cancels the event.

Below are some attached screenshots with debug messages containing the event's raw message, the event message after it is formatted, and in the case of the "before" screenshot, the message sent in-game. 

Before: https://user-images.githubusercontent.com/47498808/87505823-7a8c5080-c62f-11ea-99b4-29fc6eaff042.png

After: https://user-images.githubusercontent.com/47498808/87505857-8c6df380-c62f-11ea-95f8-dd59dadaf27c.png
2020-08-04 15:38:53 +01:00
Zefferis 6995be7dbd Updated website in plugin.yml files (#3528)
Replaced "http://tiny.cc/EssentialsCommands" with "https://essentialsx.net"
2020-08-04 15:35:34 +01:00
uf0h f9de6763d3 Use playerNeverOnServer message where appropriate (#3489)
### Use `playerNeverOnServer` message where it should be used:

### https://github.com/EssentialsX/Essentials/pull/3489/commits/309e1c470d4bcfe2a2186f9720ce33f26441b802 
`playerNeverOnServer=\u00a74Player\u00a7c {0} \u00a74was never on this server.` is currently used in the **Commandmail** class at [Line 61](https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/com/earth2me/essentials/commands/Commandmail.java#L61), [Line 116](https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/com/earth2me/essentials/commands/Commandmail.java#L116) and [Line 129](https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/com/earth2me/essentials/commands/Commandmail.java#L129) however is **not called** as PlayerNotFoundException is thrown by `#getPlayer` breaking current execution (below).
```
Commandmail#run() throws Exception {
...
    User u = getPlayer(server, args[1], true, true); // throws PlayerNotFoundException
        if (u == null) {
            throw new Exception(tl("playerNeverOnServer", args[1]));
    } 
...
}
```

Before changes:
![bm](https://user-images.githubusercontent.com/24858857/87236993-6b679180-c3e8-11ea-83a7-002194f5c467.png)
After changes:
![mailafter](https://user-images.githubusercontent.com/24858857/87237060-3576dd00-c3e9-11ea-8020-d5a80a958ca0.png)

--------------------------

**Commandseen** currently throws the default PlayerNotFoundException `playerNotFound` message for players that have not logged on to the server where it would be more appropriate to use the `playerNeverOnServer` message.

```
Commandseen#run throws Exception {
...
    AsyncRunnable#run() {
        User userFromBukkit = ess.getUserMap().getUserFromBukkit(args[0]);  <-- ***
        try {
            if (userFromBukkit != null) {                             <--- ***
                showUserSeen(userFromBukkit);
            } else {
                showUserSeen(getPlayer(server, sender, args, 0)); <--- ***
            }
        } catch (Exception e) {
            ess.showError(sender, e, commandLabel);
        }
    }
    private void showUserSeen(User user) throws Exception {
        if (user == null) {                                    <--- ***
            throw new PlayerNotFoundException();
        }
        showSeenMessage(server, sender, user, showBan, showIp, showLocation);
    }
...
}
```

**`<-- ***`:**
`usersFromBukkit` null check is performed before `#showUserSeen` so there is no need for another null check.
`EssentialsCommand#getPlayer` throws **NotEnoughArguementsException** or **PlayerNotFoundException** after [arg checks](https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java#L88) and [player checks](https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java#L103). https://github.com/EssentialsX/Essentials/pull/3489#issuecomment-657138524

Before changes:
![sb](https://user-images.githubusercontent.com/24858857/87237038-e9c43380-c3e8-11ea-8294-8f91e8b6f25d.png)
After changes:
![seenafter](https://user-images.githubusercontent.com/24858857/87237067-53444200-c3e9-11ea-92c5-1784b4dcd739.png)

----------------

### 725128e
Catch more specfic exception `PlayerNotFoundException`.

Before changes:
![banbefore](https://user-images.githubusercontent.com/24858857/87237021-c1d4d000-c3e8-11ea-99e4-eb97b5a5ba6d.png)
After changes:
![afterunban](https://user-images.githubusercontent.com/24858857/87237081-8d154880-c3e9-11ea-9d35-a25b8c105969.png)
2020-08-04 15:30:05 +01:00
pop4959 dfce971565 Fix stale tpaccept 2020-08-04 02:37:37 -07:00
Olivia 97e3f32d7f Fix some minor errors in config/docs (#3566) 2020-08-04 01:13:09 -07:00
Cameron Seid c86e1a5973 Update backup comments in config.yml to be less ambiguous (#3553) 2020-07-30 21:58:19 -07:00
md678685 ab545dc44c Fix rare ConcurrentModificationException in quit handler
Copies the list of viewers before iterating over it to fix a rare CME that is *sometimes* thrown. It's not clear *why* this broke - Spigot seems to have changed behaviour in late 1.15 or 1.16?
2020-07-30 14:23:22 +01:00
Josh Roy 11cd57e8fb Add sign text tab completion in editsign command (#3497) 2020-07-28 13:12:07 -07:00
pop4959 b7c18d0785 Add missing getRecipe(NamespacedKey) method to FakeServer (#3530) 2020-07-22 12:02:00 -07:00
Josh Roy 9aec89f381 Properly handle jail respawn in togglejail (#3522) 2020-07-21 16:22:20 -07:00
Josh Roy e34984513d Add config option to respawn at respawn anchors (#3498) 2020-07-17 14:13:30 -07:00
Tim S cedd42f411 Fix how random teleport picks a location (#3480) 2020-07-17 13:56:48 -07:00
untuned c9b75aabb2 include new sign types in definitions (#3487) 2020-07-11 15:21:33 -07:00
pop4959 41ae12ed3d Disable random tp pre-cache by default (#3496) 2020-07-11 12:35:19 -07:00
JakeTS dba35f043d Typo, should be "match" not "maths". (#3488) 2020-07-10 21:10:12 -07:00
md678685 8046b8594a Release 2.18.0
🎉
2020-07-09 20:15:30 +01:00
pop4959 6c64aaefec Fix issue with /remove skeletonhorse (#3477)
Fixes a problem where skeleton trapped horses cannot be killed in commands such as `/remove skeletonhorse` (or even `/remove all`) because they are tamed by non-player entities. There is a separate command for killing tamed entities, however this kills other player-owned entities which is undesirable.

This can be replicated easily by spawning some skeleton traps like so:
`/summon skeleton_horse ~ ~ ~ {SkeletonTrap:1}`
and then attempting to run `/killall skeletonhorse`.

After this small change, any tamed skeleton horses will be retained, but non-player-owned skeleton horses will be removed as appropriate.

Closes #3475.
2020-07-09 19:36:08 +01:00
MD 07fa87dc6a Deny tpahere requests to players without permission to accept (#3478) 2020-07-09 10:45:14 -07:00
pop4959 b58c98bea0 Add jail contexts (#3476)
Someone probably wants these. Also, who in the world decided that `IJails::getList` should throw an exception?

https://user-images.githubusercontent.com/17698576/87005099-57ffc080-c173-11ea-956f-0b64a52c7f40.png

https://user-images.githubusercontent.com/17698576/87005107-5afab100-c173-11ea-8d25-6efde7ee9026.png

https://user-images.githubusercontent.com/17698576/87005382-c5135600-c173-11ea-9335-e80e322afd89.png

https://user-images.githubusercontent.com/17698576/87005299-a44b0080-c173-11ea-8789-f2f0d8b9cc4b.png
2020-07-09 08:41:25 +01:00
zml 08e553bd1a Hide EssX commands from non-core modules in autocomplete (#3473)
quick little thing so people stop complaining
2020-07-09 08:37:41 +01:00
Josh Roy e35fb82bc2 Add UserTeleportHomeEvent (#3403)
Adds an event which allows developers to see & cancel when users attempt to teleport home. This event is needed over `PreTeleportEvent` due to the fact that it would be extremely difficult to accurately filter it by the /home command.

Closes #3401
2020-07-08 19:53:32 +01:00
MD a92ca63ca9 Replace UserTeleportEvent with more sane events (#3192)
This PR replaces UserTeleportEvent with two new teleport events called at different stages:
- TeleportWarmupEvent; called before a user's teleport warmup begins and allows plugins to skip it or prevent a teleportation
- PreTeleportEvent; called after the warmup completes but before any safety checks are carried out

This is a **breaking change** as it removes UserTeleportEvent, but the previous event isn't useful or descriptive in its current form and was only recently introduced, so it's unlikely that many plugins already depend on this.

Closes #2506.
2020-07-08 19:51:00 +01:00
pop4959 cbfad7b320 Choose better elevation for random nether teleport (#3466) 2020-07-07 18:19:53 -07:00
MD c16987fb87 Add config option to hide join/quit messages above X players (#3464) 2020-07-07 15:16:20 -07:00
Flask Bot 477f5a7841 New Crowdin updates (#3462) 2020-07-07 20:41:06 +01:00
md678685 6f149224d1 Fix reporting of economy backend to bStats 2020-07-06 21:15:03 +01:00
Josh Roy 1a6ad2fdb0 Allow for specifying amount to increase itemstack in /more (#3302)
Fixes #2342.
2020-07-06 19:55:07 +01:00
pop4959 76e511a774 Implement random teleport command (#3418)
Adds `/tpr` and `/settpr` commands, which respectively allow you to teleport randomly or set teleportation parameters.

Server owners are expected to set the center with `/settpr` before players can use `/tpr`. They can also set the minimum and maximum range to be teleported from the center (default 0-1000).

Also includes an event where plugins can adjust or cancel the teleport.

Closes #3154.
2020-07-06 19:53:43 +01:00
Josh RoyandMD 9681933ec2 Add mute expiry time in mute messages (#3329)
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

Closes #1211.
2020-07-06 19:52:51 +01:00
711bfed557 Add itemlore command (#3331)
Co-authored-by: pop4959 <pop4959@gmail.com>
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

Adds a command to add to or clear an item's lore.

Closes #1911.
2020-07-06 19:46:57 +01:00
zml 016a1b3421 Handle explicitly denied permissions with no perms plugin (#3419)
to finally end the `/hat` saga, hopefully for good
2020-07-06 19:40:47 +01:00
MD 01b9ec4a42 Allow preventing bed and respawn anchor explosions in Protect (#3453)
Adds `bed-explosion` and `respawn-anchor-explosion` options to the Protect config.
2020-07-06 19:38:07 +01:00
pop4959 9b729dd091 unchange 1.13 naming 2020-07-06 11:34:43 -07:00
triagonal 0a73be2082 Add PrivateMessageSentEvent and fix PrivateMessagePreSendEvent (#3432)
This PR introduces a new private messaging related event `PrivateMessageSentEvent` and fixes a mistake made on my part during the implementation of `PrivateMessagePreSendEvent`.

Recently when attempting to use the pre-send event in order to play a sound to the recipient of a message, I found that the event was not completely adequate for my use case. Between the firing of the pre-send event and the end of the delivery attempt, the message delivery could fail for a number of reasons (e.g. messages toggled off, sender ignored, unreachable recipient) with no straightforward way of determining this using the existing event.

I believe that a second event fired after the message sending attempt has been fully processed will provide a simple method of determining whether or not a message was successfully delivered by including the [`MessageResponse`](https://github.com/EssentialsX/Essentials/blob/60f54ee37d9472848e28d2e64adc2735e10975c1/Essentials/src/com/earth2me/essentials/messaging/IMessageRecipient.java#L84) in the event.

Additionally, I found that when implementing the pre-send event, I mistakenly passed an incorrect reference for the `sender` meaning that currently there's no clean or reliable way to determine if `sender` is the `Console` or a `User` (`instanceof` doesn't work, which leaves checking by name or using reflection).
2020-07-06 19:34:13 +01:00
md678685 c668879070 Add slightly more sanity to Vault code
This subtly changes how backend permissions plugins are reported on
bStats. (Previously, somehow the LP service provider was detected as
originating from Vault...?)
2020-07-06 19:09:20 +01:00
md678685 c4d318b7d0 Deprecate TimedTeleport 2020-07-06 18:49:25 +01:00
pop4959 e7d9dbfbcf Allow preventing bed and respawn anchor explosions in EssentialsProtect 2020-07-05 18:46:23 -07:00
MD 1be3daf0b5 Update bStats Metrics and add wrapper class for new graphs (#3451)
This PR updates the version of the bStats Metrics class to the latest version, supporting plugin IDs in place of just plugin names. It also adds the following graphs:
- Active permissions backend
- Active economy backend
- Whether or not a command has been used as a bar chart (pending bStats backend implementation)
- Version history graph as a multiline graph (also pending bStats impl)

It also removes the weird `getMetrics` and `setMetrics` APIs which should never have been API in the first place.
2020-07-05 19:30:01 +01:00
Josh Roy 8f86849aec Fix 65f8883 breaking offline home listing (#3446) 2020-07-02 18:59:40 -07:00
Josh Roy 0b4ee9e73e Add hidden config to stop throwing errors for passengers (#3445) 2020-07-02 15:30:22 -07:00
Josh Roy 65f88834ba Fix further AME(s) in /home (#3444) 2020-07-02 22:58:40 +01:00
pop4959 024c56efdd Fix recipe command on Paper (#3404) 2020-07-01 15:19:42 -07:00
pop4959 9c487b0aac Match kit name in delkit (#3396)
This allows deleting kits ignoring case; fixes #3370.

I don't know if this is the ideal fix, but everything else for kits seems to nuke the letter casing. Not really sure why in `Kits.java`, the keys needs to get lowercased in a new mock `ConfigurationSection`. It just seems like this would purely make it harder to access the same section again in the real config. Instead, I just added a different method that matches the real config name of the kit (as set in `/createkit`, which currently allows uppercase).
2020-07-01 22:12:43 +01:00
pop4959 d743f928ad Ignore NPCs in EntityCombustByEntityEvent (#3389) 2020-07-01 22:06:49 +01:00
pop4959 07e2fe3af1 Improve suicide and kill commands (#3388)
Fixes #3189 

This PR makes improvements to the suicide and kill commands, namely:
1) Call `EntityDamageEvent` with damage equal to `Float.MAX_VALUE`, which is the amount that is inflicted by `/minecraft:kill`.
2) Removes the calls to `Damageable::damage` which ends up damaging the player with `DamageSource.GENERIC`, and later causing another `EntityDamageEvent` where as a result the last damage cause gets set to `EntityDamageEvent.DamageCause.CUSTOM`. Thus, the `EntityDamageEvent` that Essentials calls gets rendered useless when someone tries to get the damage cause of the player in `PlayerDeathEvent`. Setting health to zero forcibly kills the player without causing damage.
3) Add `getTabCompleteOptions` to the suicide command, as it currently incorrectly suggests players.
2020-07-01 22:04:46 +01:00
pop4959 9f384c71f3 Confirm home replacement when overwriting existing homes (#3338)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

Warns the player that they are trying to replace a home, if they try to set one with the same name, when `confirm-home-overwrite` is set to `true` in the config.

https://user-images.githubusercontent.com/17698576/83004206-3633eb00-9fc4-11ea-9317-fe245fed9cbb.png

Fixes #2038
Closes #2847
2020-07-01 22:03:22 +01:00
Josh Roy 7a5aea0bcf EditSign Command (#3415)
bro so epic bro
2020-07-01 21:58:11 +01:00
Josh Roy b6c9bc1439 Add command + money queues to process after items in kits (#3434)
Fixes #3431
2020-07-01 21:51:10 +01:00
Josh Roy b7f38517ef Fix some reported bugs regarding teleportation. (#3433)
Fixes #3420
Fixes #3430
2020-06-30 17:00:20 +01:00
Josh Roy 60f54ee37d Fix relocation pattern for EssentialsXSpawn (#3427) 2020-06-28 19:14:06 -07:00
Josh Roy adf1273bf9 Fix RGB support in prefixes/suffixes (#3422) 2020-06-28 16:36:17 +01:00
MD 3c79e9e59d Update items.json from generator (#3394)
This PR replaces the current `items.json` file with one generated *solely* by ItemDbGenerator.

In 1.13.x, the `items.json` shipped with EssentialsX was generated using the [genItemsFlat script and data](https://github.com/md678685/essx-scripts). For 1.14 and 1.15, this was merged with the output of [ItemDbGenerator](https://github.com/EssentialsX/ItemDbGenerator), but this is an awkward and unreliable process involving three separate tools. This has now been consolidated into a single tool, which is now on par with the old process.
2020-06-27 22:38:32 +01:00
1ab1b5713e Update to 1.16.1 (#3408)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: md678685 <1917406+md678685@users.noreply.github.com>
Co-authored-by: pop4959 <pop4959@gmail.com>
2020-06-27 12:17:35 -07:00
Flask-Bot edf2f295d1 Update Crowdin configuration file 2020-06-27 16:41:40 +01:00
pop4959 c043416b11 Fix spawner provider on 1.16 (#3412) 2020-06-24 23:25:14 -07:00
Josh Roy 4a471f0a93 Provider Rework (#3407)
Moved providers around, made them make sense, profit
2020-06-24 22:00:59 +01:00
md678685 04a1d8197f Update PaperLib to 1.0.4 2020-06-24 18:08:39 +01:00
Josh Roy d9bf099c3d Reduce sync loads for teleporting (#3102)
This PR reduces the number of sync loads occurring on any teleport caused by essentials.

Fixes #2861
Fixes #2287
Fixes #3274
Fixes #3201
Fixes #2120

Before this PR, essentials would get a block multiple times causing sync loads to check if it was safe to teleport to. Now, the target block's chunk if fetched async with PaperLib and passed along to `LocationUtil#isBlockUnsafeForUser` (which internally calls other LocationUtil methods what that chunk object) resulting in the chunk only loading once, off the main thread. The only operations remaining on the main thread is `LocationUtil#getSafeDestination`. This is due to the method's recursion which would be a pain to move async. **However:** since the chunk was already loaded async, `LocationUtil#getSafeDestination` most of the time won't cause sync chunk loads. The only time it would cause sync chunk loads is with an unsafe location near a chunk border.

-----------------------------------------

* Reduce sync teleporting loads

* Avoid argument re-assigning

* Remove async teleports when unnecessary

* Make exceptions cleaner

* Async all the things

Made an async version of every method with fallbacks for deprecated methods.

* Remove old now fallback method

* Migrate everything to the new async teleport API

* Update ITeleport javadocs

* Fix invoking via async context

* Fix /jail using deprecated method

* Fix jail join handler using deprecated method

* Rename all teleport classes to indicate async

* Remove deprecated methods

* Add (and deprecate) old teleport api

* Revert TimedTeleport.java

* Reduce Diff

* Add legacy sendToJail method

* Reduce Diff Further

* Use getNewExceptionFuture in Commandtpo

* Use getNewExceptionFuture everywhere

* Fix even more usages

* Revert LocationUtil.java

* Fix issue causing unsafe locations to not work properly

* Add deprecated notice in IUser implementation

* Use CompletableFuture#completeExceptionally for exceptions

* Use Essentials' logger in EssentialsCommand#showError

* Return implementation rather than interface

* Avoid possible deadlocks with entity ejections

* Nuke some sync loads with homes

Took 7 hours and 2 PRs to paper but it's here!

* Fix ABI and make the codestyle worse

* Make the codestyle worse because muh diff

* Further ruin the codestyle

* Fix error messages not showing in TimedTeleports

* Improve messages around beds for /home

* Fix #3274

Allow unsafe locations for different worlds + spectator mode

* Fix fly safety operators
2020-06-24 09:52:25 +01:00
Jason d2f2140be9 Fix a messages.properties message (#3391)
It's a small change but I figured more consistency could be nice
2020-06-19 17:15:52 +01:00
pop4959 04f88e460b Add missing tl keys for tempbanip (#3387) 2020-06-16 18:39:22 -07:00
pop4959 d64f73e719 Add support for translating command description and usage (#3284) 2020-06-16 13:39:48 -07:00
Josh Roy 2ab4dcbc11 Add option to remove vanishing items from keepinv users (#3328) 2020-06-15 16:22:00 -07:00
846043e9a0 Add settings to protect items from explosions (#2504)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: pop4959 <pop4959@gmail.com>

Adds protection settings to Protect to block item damage when entities such as wither skulls, fireballs, TNT and creepers explode.

Closes #2284.
2020-06-15 13:54:16 +01:00
MD ea57e4ae01 Add serialize method to ItemResolvers for custom serialization (#3307)
Add an optional `serialize` method to `ItemResolver`s which plugins can implement in order to add custom items to `/createkit`. Also improves ItemResolver docs.

Closes #3305, closes #3216.
2020-06-15 13:46:44 +01:00
Josh Roy 6aa5e5cc4a Add config option to control selling names items with /sell (#3314)
Adds an `allow-selling-named-items` config option, which allows server admins to enable/disable the ability to sell named items with `/sell`.

Closes #1988.
Closes #908.
Closes #2196.
2020-06-15 13:44:46 +01:00
oxygencraft 3e5bd4cf09 Deny teleport requests to players lacking permission to accept (#3361)
This PR will deny any teleport requests to players lacking permission to accept the request (`essentials.tpaccept`).

Closes #1259.
2020-06-15 13:36:13 +01:00
TehBrian 3d096c1f31 Fix inconsistent coloring in messages (#3366)
Fix two inconsistencies that look like this:

https://user-images.githubusercontent.com/32250137/84316124-971d0080-ab38-11ea-8297-73f978e79a57.png

The period's color at the end is out of place. This pull-request fixes that by setting the period's color to `§4` instead of `§6`.
2020-06-15 13:35:13 +01:00
Glare b5b6bce758 Ensure RemoveEffectsOnHeal config setting is actually registered (#3377) 2020-06-13 09:40:42 -07:00
Jasonandtriagonal 46ed8e954f Add config.yml note (#3359)
Co-authored-by: triagonal <10545540+triagonal@users.noreply.github.com>

"The player's bed respawn point is still set by Minecraft even if `update-bed-at-daytime` is set to `false` in config, meaning that the entire feature is indeed ineffective on Minecraft 1.15 and above."
2020-06-10 13:40:05 +01:00
pop4959 cfca2f7550 Mention setworth command in worth.yml (#3364) 2020-06-10 13:37:55 +01:00
MDandJosh Roy a09df9bf3a Add UTF8 support for .properties files (#3358)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>

Based on edaa4f6, this allows messages files to be read in UTF8 without the need for native2ascii conversion. This also removes the native2ascii-maven-plugin, previously used to convert Crowdin translations to a compatible format. I've tested this briefly and it appears to work correctly with both internal translations and custom messages.
2020-06-07 12:06:33 +01:00
Josh Roy dc2462c277 Add option to change disposal title via sign (#3269)
Closes #2628.
2020-06-05 16:16:47 +01:00
md678685 25c7ebcf39 Remove BuildTools script and update README 2020-06-05 15:22:40 +01:00
pop4959 baab65d776 Add support for permission contexts (#3320)
As discussed in #2960. Allows Essentials to register contexts with permission plugins that support them. A working implementation for LuckPerms is included in this PR. PermissionsEx 2 also has support for registering contexts, however it should probably be added at a later date, since as per zml2008 on Discord, the API is not yet stable.

https://user-images.githubusercontent.com/17698576/82718550-f5507500-9c57-11ea-970d-9d5f8bce8037.png
2020-06-03 21:36:27 +01:00
pop4959 9e2b906048 Display date diff correctly (#3292)
There is an age old issue in Essentials which causes date diffs (such as those displayed in teleportation delays, mutes, and temp bans) to display incorrectly to the user when the command is run. After looking into this a bit, it looks like the reason for this is that if there is even a 1 ms time difference between parsing the date diff and displaying it, the time displayed will be truncated by an entire second. This PR fixes this problem by adding 50 ms of buffer time to the date object *only* when it is calculating the date diff string. This is not significant enough to be noticed by users, and allows Essentials code to correctly generate the date diff string as long as it does so within 50 ms of parsing it.

As a theoretical example... lets say a user is muted for 1 year. If 1 ms passed (in code prior to this PR) between parsing and displaying the date diff, then the displayed time will be 11 months, 29 days, 23 hours. This is because 1 year - 1 ms is being truncated down and then Essentials lops off time accuracy beyond the 3 most significant terms. After this PR, the date diff will be parsed normally, but when the display string is being calculated, it will use 1 year + 50 ms (and if 1 ms passed, then that would be 1 year + 49 ms), which gets truncated to 1 year.

As a practical example:
https://user-images.githubusercontent.com/17698576/82106444-d55c0700-96d5-11ea-8290-377442e4f9fe.png

Quite often (I'd say about half of the time) before this PR, the date diff will display like this, when the example command `/mute <player> 1y` is run.

https://user-images.githubusercontent.com/17698576/82106467-063c3c00-96d6-11ea-9da2-3dc1556add14.png

After this PR, the date diff displays correctly every time.

Fixes #3349.
2020-05-30 15:18:16 +01:00
pop4959 9f3c2683ae Clean up providers a bit (#3279) 2020-05-28 12:06:03 -07:00
pop4959 9e01a1a427 Player should not be able to send empty shout/question messages (#3341) 2020-05-28 11:45:05 -07:00
pop4959 db729241c9 Fix issue with eco reset requiring 3 args (#3340) 2020-05-28 11:44:46 -07:00
d5d8c80d74 Protect Armor Stands + Item Frames (#3270)
Co-authored-by: JRoy <joshroy126@gmail.com>
Co-authored-by: AlexTheCoder <alexjmeech@gmail.com>
2020-05-27 12:36:53 -07:00
Josh Roy 4c48ccb422 Block removing hats with curse of binding (#3299) 2020-05-27 12:36:22 -07:00
Josh Roy 53e7c83254 Add tempbanip command (#3291) 2020-05-27 12:35:20 -07:00
Josh Roy fdef1062f0 Add config option to block /pay from ignored users (#3273) 2020-05-27 12:34:11 -07:00
kakd b9f8fc2e11 Option to send coordinate after death (#3207) 2020-05-27 01:58:54 -07:00
Xeyame db410fb3e7 Add missing methods to Commandexp (#3335) 2020-05-26 17:26:58 -07:00
Jason 500dadc760 Update config.yml custom join/quit message comments (#3334) 2020-05-26 16:22:38 -07:00
md678685 7d61953753 Fix spawner provider detection only working on 1.13+
This caused a seemingly-unrelated error where the 1.7/1.8 provider was being used on all versions up until 1.12. Upon further investigation, this line caused a NoSuchFieldError, and since this isn't an Exception it was caught by the outer `catch (Throwable t)` which was intended to catch throwables from the providers rather than the setup of tryProvider.
2020-05-20 19:49:45 +01:00
pop4959 5b9b76d5e7 Fix clearing specific items in clearinventory (#3263)
Fixes #2986
Closes #3050
Closes #3191

Refactors the clearinventory command code in such a way that fixes the problem of not being able to clear all of a specific item on newer server versions. Also re-adds data value support for older server versions that support it, which seemed to have been inadvertently removed in 79bc340.

Checked against 1.8.8, 1.12.2, 1.13.2, 1.15.2.
2020-05-17 21:10:12 +01:00
Josh Roy b9804d8980 Ignore CloudNet v3 SLPE (#3288)
Yet another CloudNet fix.

Fixes #3282
2020-05-17 15:35:31 +01:00
Josh Roy b960ee365a Fix improper target block handing in /tree & /bigtree (#3271) 2020-05-13 15:55:17 -07:00
Josh Roy 302f0acbaa Add permission for storing user's last location on teleportation (#3272) 2020-05-13 15:53:36 -07:00
Glare 8f5b97b9d2 Merge pull request #3277 from pop4959/remove-1.8-spawner-providers-2 2020-05-13 14:29:54 -05:00
pop4959 6371cf7517 Remove 1.8 nms spawner providers from pom 2020-05-13 12:17:37 -07:00
pop4959 e53520aef6 Remove 1.8 NMS spawner providers (#3276)
This PR removes the 1.8 R1 and R2 spawner providers. I was looking into refactoring these to use reflection instead of importing NMS code (in order to avoid requiring buildtools to compile), but after some research it looks like these are actually not even used anymore, in favor of the LegacySpawnerProvider (which Essentials appears to use for 1.8.0-1.12.2). Thus, keeping these is fairly pointless and causes more harm than good. There is no reason to continue including them, nor maintaining them. Essentials currently doesn't even officially support these versions anyway.
2020-05-13 10:56:50 +01:00
triagonal d59fd71ba5 implement PrivateMessagePreSendEvent (#3260)
This PR introduces an event to be called just before a private message is sent to a user. This event provides the message sender, the message recipient, and the contents of the message.

This event provides the possibility for greater customization of private messages, such as playing a sound or displaying a boss bar when a private message is received, or filtering private message content.

Closes #726, closes #2097.
2020-05-13 08:03:28 +01:00
Crash Cringle 4b967a749b Added a command to /eco that allows users to take percentages from pl… (#3080)
* Removed unnecessary formatting

* Fixed spacing around isPercent, removed unnecessary parenthesis, optimized conversion
2020-05-12 21:38:36 -07:00
pop4959 8f88a8dcb3 Allow 1 char name (#3264) 2020-05-12 21:27:33 -07:00
pop4959 a58ba406eb Add offhand slot to invsee equip (#3265) 2020-05-12 21:26:24 -07:00
pop4959 a93ca9b7bc Use world's sea level for depth command (#3268) 2020-05-12 21:05:57 -07:00
Josh Roy 02e6b5f1b3 Fix isStopping MethodHandle invocation on Spigot (#3267)
Fixes #3266.
2020-05-12 20:14:01 +01:00
Josh Roy 63dd5f3f64 Fix age old bug with active status in Backup manager (#3262)
I cannot even reproduce this error but I guess one other person can. Fuck this stupid feature
2020-05-11 18:09:29 -07:00
Alexander Meech a3a50e9cd5 Implement permission node to extinguish other players (#2826)
Implements a specific permission node to restrict access to extinguishing other players, so Extinguish command will match other commands with similar functionality (i.e. /feed)

Fixes #2796
2020-05-11 17:40:24 +01:00
pop4959 8e3c1aaa96 Implement rest command (#3205)
Implements a rest command based on @mart-r's suggestion in #2299. Resetting the time since rest statistic prevents phantoms from coming after you for an hour (real time). The statistic is also set to zero when using a bed. This command cannot be used pre-1.13 because the statistic does not exist (nor would it matter since there are no phantoms).

Closes #2299
2020-05-11 17:11:06 +01:00
Josh Roy 8b71437264 Improve backup functionality (#3258)
Waits for an ongoing backup task to complete in onDisable (and yells at users for `/reload`ing), and adds a `backup.always-run` option to enable always running backups even when no users have logged in since the last backup.

Fixes #3257 and closes #2646.
2020-05-11 16:55:31 +01:00
Josh Roy 61d0ed3f01 Fix invalid charge error when using suffix currency on signs (#3253)
i swear i test my code

Fixes #3252.
2020-05-11 15:20:00 +01:00
Josh Roy fc2b7b63a2 Save player logout times on shutdown (#3157)
Properly save userdata and mark the player's last logout time when the server is shutting down.

Fixes #2764.
2020-05-11 14:53:05 +01:00
kmecpp 96590a3389 Add KitClaimEvent (#3197)
Adds an event fired when a kit is expanded for a user. Fixes #3196.
2020-05-09 21:19:51 +01:00
zml a043de3e44 Add a more helpful error message for xmpp module (#3247)
Rather than spitting out a stacktrace, this gives users some instructions on what to do.

It's a bit spammy so the error messages get noticed, that could be toned down a bit if we just want to be silent on login. Unfortunately a lot of plugins haven't discovered the debug and trace log levels, so a lot of startup warnings (like this one) will get lost in the spam if there aren't other issues.
2020-05-09 13:21:02 +01:00
Josh Roy 81d3900ef6 Cleanup after UUID Ignore List PR (#3227)
Most of these are edge case fixes, but still fixes nonetheless!
2020-05-04 14:32:49 +01:00
Josh Roy fd136384a1 Add null check in ignore command (#3226)
This would only become a problem if a server owner decided to delete a bunch of their userdata. Nonetheless, it doesn't hurt to have the check.

I promise this is the last pull request regarding this 😄
2020-05-04 14:17:08 +01:00
Josh Roy dd5fe117b5 Fix null check in Username->UUID ignore list converter (#3225)
Didn't test with a username that didn't exist and didn't notice this. Null check(s) are now in their proper place.

Fixes #3223.
2020-05-04 13:48:50 +01:00
Josh Roy e9d29f789f Add default enchantment level for enchant sign (#3070)
Defaults the enchantment level on signs to `1` if one is not provided on the sign.

Closes #1497.
2020-05-04 11:10:16 +01:00
Josh Roy 1bc1f646fd Convert ignore list storage to UUID-based (#3209)
As the title describes, this PR converts the ignore list storage from username-based to UUID-based.

Fixes #239.
2020-05-04 11:06:09 +01:00
Josh Roy 8ad55cb634 Add UUID and User based economy methods (#3085)
Adds methods to the Economy API to use UUIDs and User objects. Additionally, deprecates all the username (String) based methods. Backwards compatibility has been maintained and I added User validation to UUID-based methods and null checks in User-based methods
2020-05-04 11:00:25 +01:00
mart-r b19dec120a Don't show hidden players in /balance unless exact name entered (#3218)
Fixes #2305

Not looking for hidden players within the command, yet looking for offline players.
Only matching a hidden player if the name match was exact (i.e not matching nicknames).
2020-05-04 10:36:01 +01:00
pop4959 283c088b21 Add protect option for disabling ender crystal explosions (#3210)
Closes #587.
2020-04-30 20:39:00 +01:00
pop4959 d5ffed09b4 Fix home tab completions (#3206)
Fixes #1337 😎 

This PR fixes tab completions for all of the home commands in Essentials. Prior to this PR, the behavior is approximately as follows:

- `/sethome` has no implementation for completions, and so it provides player names, which isn't very useful, and in my opinion can cause more harm than good by confusing users.
- `/home` and `/delhome` fail to provide valid completions when a user has the `essentials.home.others` permission. The argument syntax is `[player:]<name>` but it tries to complete it as `<player> <name>`. Not only does it not show you suggestions for your own homes, but it proceeds to show you invalid suggestions!

This PR provides completions that accurately reflect the syntax and real behavior of the command, including suggesting homes for player names that are partially matched. It will provide suggestions for all of your own homes, as well as providing suggestions based on how far along you are in the command (players if you haven't specified `:` yet, otherwise a specific player's homes).
2020-04-30 20:26:27 +01:00
Josh Roy b7eec09307 Add config option to make currency symbol as a suffix (#3066)
Adds `currency-symbol-suffix` config option to move the currency symbol as a suffix rather than a prefix.

Closes #2577.
2020-04-25 13:12:55 +01:00
Josh Royandmd678685 23f0f98af3 Cleanup code (#3067)
Co-Authored-By: md678685 <1917406+md678685@users.noreply.github.com>

Basically cleans up a bunch of warnings that are easily suppressed.
2020-04-25 13:08:57 +01:00
Josh Royandmd678685 6bbdbc89a6 Improve MuteStatusChangeEvent (#3068)
Co-Authored-By: md678685 <1917406+md678685@users.noreply.github.com>

Adds getTimestamp and getReason methods to MuteStatusChangeEvent with the apropriate JavaDocs explaining them.

Closes #2459.
2020-04-23 16:28:08 +01:00
zml 12c8623666 Add permissions defaults to plugin.yml for op-affecting commands (#3029)
This aims to reduce the unintended consequences of granting all Essentials permissions or giving a player op, by defaulting permissions some more permissions to false, including `essentials.hat.prevent-type.<type>`. There's also a new essentials.exempt metapermission to have one parent that controls exemption from kick/ban/mute/etc. This will change behaviour for ops to some extent.
2020-04-23 16:15:10 +01:00
mink 2bd6ebd2b1 Config option to toggle disabling flight / speed on world change (#2546)
Closes #2141.

This PR adds the option to toggle whether or not EssentialsX should handle disabling player flight / speed when they switch to a new world, in case server administrators are handling that via a third party plugin.
2020-04-23 16:13:19 +01:00
pop4959 40fb496052 OfflinePlayer getAttackCooldown (#3190)
Fix compile
2020-04-23 12:15:32 +01:00
triagonal b72d822f94 Re-add missing GeoIP license message key (#3186)
This PR re-adds the geoIpLicenseMissing key which was inadvertently removed during the recent mass locale update (#3165).
2020-04-21 19:44:54 +01:00
FourDown 6d92ac9af6 Fix book formatting (#3173) 2020-04-16 17:01:51 -07:00
Josh Roy 47f27a8016 Fix method signature breakage in versions lower than 1.14 (#3175) 2020-04-16 16:55:06 -07:00
Noahandmd678685 849d095e9a Add /ecreative alias to /gamemode (#3101)
* Proper command alias

* Update Essentials/src/plugin.yml

Co-authored-by: md678685 <1917406+md678685@users.noreply.github.com>
2020-04-14 17:30:25 +01:00
Trent Hensler 923f240aa1 New Crowdin translations (#3165)
* New translations messages.properties (Russian)

* New translations messages.properties (Portuguese)

* New translations messages.properties (Hebrew)

* New translations messages.properties (Japanese)

* New translations messages.properties (Latvian)

* New translations messages.properties (Lithuanian)

* New translations messages.properties (Norwegian)

* New translations messages.properties (Polish)

* New translations messages.properties (Portuguese, Brazilian)

* New translations messages.properties (German)

* New translations messages.properties (Romanian)

* New translations messages.properties (Serbian (Latin))

* New translations messages.properties (Slovak)

* New translations messages.properties (Spanish)

* New translations messages.properties (Swedish)

* New translations messages.properties (Thai)

* New translations messages.properties (Greek)

* New translations messages.properties (French)

* New translations messages.properties (Italian)

* New translations messages.properties (Chinese Simplified)

* New translations messages.properties (Turkish)

* New translations messages.properties (Hungarian)

* New translations messages.properties (Vietnamese)

* New translations messages.properties (Korean)

* New translations messages.properties (Basque)

* New translations messages.properties (Bulgarian)

* New translations messages.properties (Chinese Traditional)

* New translations messages.properties (Finnish)

* New translations messages.properties (Chinese Traditional, Hong Kong)

* New translations messages.properties (Croatian)

* New translations messages.properties (Czech)

* New translations messages.properties (Danish)

* New translations messages.properties (Dutch)

* New translations messages.properties (English, United Kingdom)

* New translations messages.properties (English, United States)

* New translations messages.properties (Estonian)

* New translations messages.properties (Ukrainian)
2020-04-14 17:15:19 +01:00
triagonal 8655ff2de3 Add displayname placeholders to self-AFK messages (#3164)
As a result of #2780 (oops) the self-AFK messages can no longer exactly match the regular AFK messages as the placeholder for the player's displayname was left out for the self messages.

This PR adds those placeholders so that those who would prefer that these messages are the same can simply copy their messages from the normal `userIs*Away*` keys to the new `userIs*AwaySelf*` keys.
2020-04-14 11:56:17 +01:00
triagonal 6f61010cf9 Allow toggling public broadcast of AFK messages (#2780)
(description from #2608)

So... I've implemented a system for toggling whether or not AFK messages are broadcasted to the entire server and also changed a few things along the way:

1. I added a config toggle broadcast-afk-message that will change whether AFK messages are broadcast globally or not.
2. In both cases the AFK target now recieves a "self-oriented" message instead of the global default. Basically just says "You are now/no longer AFK". This would be a change from the default behaviour.
3. I created a way to exclude certain IUsers from broadcastMessage messages using an IUser... varargs parameter. I wasn't too sure how to implement the exclusion, but this seemed like a fairly good option.

I'm not too sure if what I've come up with is an optimal solution, but it's been tested and confirmed to work as intended.

closes #2116, closes #959

---

* implement toggle for broadcasting afk message

* add "self-private" AFK messages, implement exclusion system for broadcastMessage

* remove rogue import, clarify config comment

* move excluded collection creation out of loop, use set instead

* use set instead of varargs

* ok but actually use the set this time

* address requested changes

* update missed message section

* move from Collection to Predicate for broadcast exclusion

* update Predicate variable name

* use identity comparison (cleanup)

* clean up unnecessary imports, remove extra spacing
2020-04-13 14:33:37 +01:00
md678685 5082badca4 Improve config.yml comments and structure (#3151)
This PR fixes some issues with the config.yml:
* Adds links to the EssentialsX docs where appropriate
* Moves a couple of settings into their correct locations
* Changes headers to remove the weird implications of modularity (EssentialsHelp isn't a module, it's *one* command)
* Updates support link at top
* Minor grammar nitpicks
2020-04-13 09:06:31 +01:00
Josh Roy 307bd2a35f Prevent tridents from being picked up (#3149) 2020-04-10 12:44:45 -07:00
md678685 a11552f497 Document and clean up API events 2020-04-10 12:00:01 +01:00
Jason 8556caaeb4 Update kits.yml example to be more consistent (#3148)
Follows the note using {USERNAME} instead of {player} to prevent confusion
2020-04-09 17:11:14 +01:00
md678685 7c09012b3d Update /fireball usage and description 2020-04-09 16:40:49 +01:00
Jason eb596caa00 Change {PLAYER} to {USERNAME} in kits.yml comment (#3057)
Avoids confusion between `{PLAYER}` (KeywordReplacer placeholder) and `{player}` (kit-specific placeholder).
2020-04-09 16:00:35 +01:00
HexedHero ab4501aa4c Add check for NPCs to /back listeners (#2833)
Add a check for NPCs to the PlayerTeleportEvent and PlayerDeathEvent to avoid unnecessarily tracking NPCs' `/back` locations.

Closes #2832.
2020-04-09 15:37:51 +01:00
md678685 4b766d373d Fix kit command example
Shhhhh, #2980 isn't real, it can't hurt you
2020-04-09 15:10:43 +01:00
ThatGamerBlue e3574edc5d scripts: fix buildtools script under windows git bash (#3145)
wget is nonfunctional in git bash for windows, so we should use curl instead
(no matter what you pass to wget it fails with the same error)

https://i.imgur.com/YDw68vM.png
2020-04-09 15:05:21 +01:00
Dieter Nuytemans dcb69ddc73 Set sleepingingored default to false (#3141) 2020-04-06 22:18:33 -07:00
pop4959 1d6ad297a4 Add new interface methods to FakeServer (#3140) 2020-04-05 23:13:13 -07:00
Josh Roy 85a5e517c9 Fix passenger check not working on versions below 1.11.2 (#3132) 2020-04-05 02:48:21 +11:00
Radoje17 b08d380643 Added real name boolean option for the /list command (#3117) 2020-04-02 00:06:32 -07:00
Glare ad98fc4121 Implemented uptime placeholder (#3120) 2020-04-01 11:37:55 -07:00
Josh Roy 810689c037 Add passenger dismounting for teleports (#3069)
Add passenger dismounting for teleports
2020-03-31 18:04:44 -07:00
Joe Hirschfeld c007700c59 Merge pull request #3106 from Markyroson/2.x
Make MockBukkit compatible #3105
2020-03-31 00:06:39 -07:00
Joe Hirschfeld 8cc3f6626b Merge pull request #3113 from darbyjack/200-IQ-Protect-Improvements
Fixed my PR pt2
2020-03-30 23:42:54 -07:00
darbyjack a3b8a4adc9 Version to 1.14 2020-03-31 01:40:37 -05:00
Joe Hirschfeld 8f817c089b Merge pull request #3111 from darbyjack/200-IQ-Protect-Improvements
200 IQ Essentials Protect Improvements
2020-03-30 23:32:58 -07:00
Joe Hirschfeld ed4e7794c3 Merge pull request #3063 from schlatt-co/feature/3034
Implement better AfkStatusChangeEvent
2020-03-30 23:15:34 -07:00
darbyjack 6f732d410e Fixed my stupid PR 2020-03-31 01:13:14 -05:00
Joe Hirschfeld 6c8da20883 Merge pull request #3052 from pop4959/fix-zh-CN-geoip-issue
Fix zh-CN GeoIP locale issue
2020-03-30 23:01:50 -07:00
Joe Hirschfeld c7d9ce7f7f Merge pull request #3051 from pop4959/xp-tab-complete-fix
Fix tab completion for Exp command
2020-03-30 22:58:21 -07:00
Joe Hirschfeld 4e7f639076 Merge pull request #3049 from pop4959/near-exempt
Near exclude permission
2020-03-30 22:47:36 -07:00
Joe Hirschfeld b2c3b3a99f Merge pull request #2914 from montlikadani/patch-5
Fix NPE when the user is null in the hidden players
2020-03-30 21:27:39 -07:00
Joe Hirschfeld 77338d66dc Make drop-items-if-full work on Essentials kits (#2820) 2020-03-30 21:11:56 -07:00
Xeyame e2130df596 Add different translation keys for the "me" message (#2805)
* Add different translation keys for the "me" message

* Add proper German "me" translation
2020-03-30 21:10:46 -07:00
montlikadani 2bbe6d6069 Implement message for #2640 (#2721)
* Update Essentials.java

* Update messages.properties

* Update messages.properties
2020-03-30 21:01:15 -07:00
montlikadani c8b8e505f3 Add teleport warmup event to API (#2590)
* Update Teleport.java

* Create UserTeleportEvent.java

* Update Teleport.java

* Add location to event
2020-03-30 20:38:13 -07:00
latiku 89743f9900 implement command teleporting to a player's last known logout location (#2505)
* implement /offlinetp command, teleports to a player's last known logout location

* send a message to /tp user when they try teleporting to an offline player

* getHidden is now false, you are no longer able to teleport to offline players using offline tp

* change /offlinetp to /tpoffline to match essentialsx conventions
2020-03-30 20:35:23 -07:00
latiku dbc0562fb0 permission-based jailed player interactions (#2503) 2020-03-30 20:32:12 -07:00
pop4959 76f4dff14c Fix bed message on some older versions of MC (#3048)
Fixes #3045. Some older versions of MC use "BED_BLOCK" to represent beds.
2020-03-30 08:32:44 +01:00
pop4959 baa2a2f24f Use isAuthorized for permission check 2020-03-29 13:44:33 -07:00
Pokechu22 2ca02911b3 Mention 1.15.2 in the README (#3107) 2020-03-29 12:11:44 -07:00
Markyroson cf48237049 Make MockBukkit compatible #3105 2020-03-29 10:34:16 -07:00
pop4959 adfe2c1975 Update FakeWorld (#3095) 2020-03-26 19:12:07 +11:00
triagonal a782043798 Revert "Add {PLAYER} placeholder with uppercase in kits (#2929)" (#3072)
This reverts commit 90c4a2f53c.
2020-03-14 22:49:48 -07:00
montlikadani 90c4a2f53c Add {PLAYER} placeholder with uppercase in kits (#2929) 2020-03-14 15:17:58 -07:00
pop4959 338b371e4c Implement max mute time feature (#2807) 2020-03-14 15:12:43 -07:00
Glare 347179373d Fixed double local logging (#2755) 2020-03-13 02:33:18 -07:00
montlikadani 3bb45b80b1 Add tab-completer for /spawnmob command (#2661) 2020-03-13 02:30:50 -07:00
Glare e3ec0f3b9b Added in option to remove effects on heal (#2754) 2020-03-13 02:24:29 -07:00
Joel Otero f20572b30c Add speed info to whois (#2952) 2020-03-13 01:10:44 -07:00
Josh Roy 2124cce603 Fix User::payUser(User, BigDecimal, Cause) not properly utilizing Cause (#3064) 2020-03-13 00:39:21 -07:00
JRoy ebf60c1e70 Implement better AfkStatusChangeEvent 2020-03-12 22:08:11 -04:00
pop4959 c31b6c3683 Update FakeWorld + FakeServer (#3061) 2020-03-11 17:20:46 +11:00
pop4959 ffc83343fe Fix zh-CN GeoIP locale issue 2020-03-05 01:08:55 -08:00
pop4959 2554acd304 Fix tab completion for Exp command 2020-03-05 00:31:40 -08:00
pop4959 98239114ad Near exclude permission 2020-03-04 23:23:23 -08:00
md678685 c10b39c1c7 Fix bee spawn egg aliases 2020-03-01 11:16:42 +00:00
montlikadaniandmd678685 20e11465e4 Properly fix error with fireball command (#3040)
Closes #3016.

* Update Commandfireball.java

* Update Commandfireball.java

Co-authored-by: md678685 <1917406+md678685@users.noreply.github.com>
2020-03-01 11:12:55 +00:00
pop4959 46e1b95b33 Add missing OfflinePlayer methods (#3033) 2020-02-23 18:11:57 -08:00
md678685 279d6f16e1 Bump version to 2.17.2
\o/
2020-02-22 10:05:14 +00:00
md678685 a747eccaa3 Fix /fireball on 1.8.8 (#3027)
Dragon fireballs were added in 1.9 and so this previously caused an
error. This PR fixes that (and adds tridents as throwables). Fixes #3016.
2020-02-22 10:03:43 +00:00
md678685 0bafbc3184 Reduce permission check calls in PlayerCommandSendEvent (#3026)
This reduces permissions checks by only checking each command once, not checking each command for each alias.

The impact of this is a near-tenfold reduction in permission checks during this listener, which should slightly improve performance when using LuckPerms (and provide significant improvements on older inefficient permissions plugins).
2020-02-22 10:02:53 +00:00
Edward Wang 8069370b8c Clarify easter egg config description (#3028) 2020-02-21 13:12:09 -08:00
Jason 46f4b92ff7 Update config.yml group-formats (#3025)
Since most (if not all) modern permission plugins only use lowercase group names, the examples should also be lowercase. A note has also been added explaining that group names are case-sensitive.
2020-02-21 12:24:49 +00:00
md678685 d92f5ce71c Add 1.14/1.15 item aliases and fallbacks
Short term replacement for #2897 until ItemDbGenerator is complete:

* Closes #2934 by adding 1.15 items
* Closes #2790 by adding minecraft:sign fallbacks and a "sign" alias
* Closes #2732 by adding aliases and fallbacks for cactus green/green dye, dandelion yellow/yellow dye and rose red/red dye.
2020-02-21 11:11:35 +00:00
Josh Roy 2314bf8bd4 Fix CustomItemResolver causing a StackOverflowError (#3022)
CustomItemResolver was fetching the custom item from the item database instead of the resolved custom item which caused a StackOverflowError.

Fixes #3018.
2020-02-18 20:20:53 +00:00
Jasonandmd678685 7808b21496 Explain how to add commands to kits (#2980)
* Explain how to add commands to kits

* Update Essentials/src/kits.yml

Co-Authored-By: md678685 <1917406+md678685@users.noreply.github.com>

Co-authored-by: md678685 <1917406+md678685@users.noreply.github.com>
2020-02-16 15:39:28 +00:00
triagonal 18ef412211 Add beezooka command (#3003)
This PR introduces the `/beezooka` command as suggested in #2975. The command acts similarly to `/kittycannon` with the exception of the Bee being tamed, instead flying around for a small amount of time before exploding.

Sample usage:
![beezooka](https://user-images.githubusercontent.com/10545540/74099459-11804880-4b78-11ea-9c3d-499b06d912fb.gif)

As Bees do not exist below version 1.15, an error will display when attempting to run the command on such a version:
![image](https://user-images.githubusercontent.com/10545540/74099477-4d1b1280-4b78-11ea-91c2-fa675994a85f.png)

Closes #2975.
2020-02-10 11:46:41 +00:00
md678685 0678328253 Update funding to include Ko-fi link 2020-02-10 11:34:59 +00:00
md678685 5503e1e14c Revert "Split plugin compatibility report into own class"
Revert 6fa5b80c0a, which broke `/ess version`, until this can be fixed.
2020-02-10 09:05:32 +00:00
triagonal 9e89cfa4ed Implement missing FakeWorld methods (#3002) 2020-02-08 21:10:49 -08:00
imDaniX 13f454a022 Properly escape pipe character on item lore (#2994)
Using negative lookbehind instead of negated characters set.

Fixes #2962, fixes #2984
2020-02-07 10:10:54 +00:00
pop4959 129650dade Update FakeServer (#2997) 2020-02-07 12:08:29 +11:00
md678685 6fa5b80c0a Split plugin compatibility report into own class 2020-02-01 21:46:53 +00:00
pop4959 04dfcd0965 Bump supported version to 1.15.2 2020-01-22 09:14:41 +00:00
pop4959 2e818ac709 Properly register entity transform event depending on version (#2942)
Fixes the problem mentioned in #2931 which was introduced in #2836. This is caused as a result of EntityTransformEvent being a relatively new event introduced in Spigot [856adc3e6af](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/856adc3e6afc3e9c0495ac27e38b96b144e54b1e), which was after the update to 1.13.2 in Spigot [f311182396b](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/f311182396bd74b106efebc926ea4d0b92cfba80).

Closes #2931.
2020-01-14 07:54:51 +00:00
pop4959 32ef61197f Fix bed spawn message on 1.15+ (#2943)
Closes #2893

**Tests**
![2020-01-13_14 08 12](https://user-images.githubusercontent.com/17698576/72297425-be66b480-3610-11ea-8421-1ac6881259b8.png)
![2020-01-13_14 10 02](https://user-images.githubusercontent.com/17698576/72297431-c32b6880-3610-11ea-89fc-bdda2d0cec89.png)
2020-01-14 07:50:48 +00:00
md678685 fa06cd8253 Fix Java 9 breakage causing issues on Java 8 2020-01-11 17:03:33 +00:00
pop4959 5020983af5 Update GeoIP (#2926)
This implements the fix suggested by @Bobcat00 in #2919

Users of GeoIP will now be required to register a MaxMind account and create a license to download the database required by the plugin. This license is entered into the new license-key field in the configuration.

---

* Update GeoIP

* Simplify branch

* Update old config detection

* Update geoIpLicenseMissing to point to the EssX wiki
2020-01-11 07:10:40 +00:00
pop4959 f4496b6977 Update FakeWorld again (#2925)
Spigot added some new methods.
2020-01-04 12:32:40 +00:00
montlikadani a1719d651e Update Commandlightning.java 2019-12-31 17:51:21 +01:00
montlikadani e7be2b68a3 Update PlayerList.java 2019-12-31 17:49:46 +01:00
pop4959 552dcb56a1 Improvements for delkit (#2908)
3 improvements for delkit within this PR:

1) Cleaned up unused imports
2) Show actual kit name when deleting instead of memory address (this is the reason originally for making this)
3) Implement tab completion

I've tested to make sure the changes are properly functioning. See below:

Before:
![2019-12-29_01 12 09](https://user-images.githubusercontent.com/17698576/71555204-4bd5c200-29de-11ea-9fe3-eb88db08ef48.png)

After:
![2019-12-29_01 48 50](https://user-images.githubusercontent.com/17698576/71555207-56905700-29de-11ea-9277-271bb0656d64.png)
![2019-12-29_01 48 25](https://user-images.githubusercontent.com/17698576/71555208-58f2b100-29de-11ea-8257-742fa7bb3150.png)
2019-12-31 16:10:38 +00:00
montlikadani e158a65603 Improve scheduler methods to use Java 1.8 lambdas (#2700)
* Update EssentialsPlayerListener.java

* Update Backup.java
2019-12-31 13:58:09 +00:00
CmdrKittens b694e8aaa2 Don't attempt to modify a Map value view (#2910)
md dun goofed
2019-12-29 19:41:17 +00:00
md678685 a2e09121ba Slightly nicer AntiBuild messages 2019-12-26 16:17:10 +00:00
md678685 4ce7dfa8f0 Minor refactor of permissions handlers
* Move `essentials.build` perm check from AntiBuild into default SuperPerms handler
* Don't emulate wildcards for LuckPerms or PEX
* Add `build: true` meta support for LuckPerms (+ other plugins as needed)
2019-12-26 15:08:07 +00:00
md678685 1c4ce7b4bd Don't assume primary group is always present
Fixes a potential issue with PEX 2.0 (and 1.x) where users may not have a primary group.
Closes #2901.
2019-12-26 13:08:38 +00:00
md678685 8a04c1e232 Fix custom_items.yml generation 2019-12-24 23:02:07 +00:00
md678685 6e5d378324 Add methods to set/remove custom aliases 2019-12-24 09:36:15 +00:00
md678685 8e1f3617fd Add custom_items.yml file 2019-12-24 09:36:15 +00:00
Mark Vadeikaandmd678685 2549ed830f Enable control of entity transformations in EssentialsProtect (#2836)
This allows users to prevent any of the following transformations:

- Creeper charging
- Villager infected by zombie villagers
- Villager being cured
- Villagers turning into witches
- Pigs turning into zombie pigmen
- Zombies turning into Drowned (and husks turning into Zombies)
- Mooshrooms switching colors

Configurations are in a new subsection, `protect.prevent.transformation`. All options are disabled by default.

---

* Allow for control of transformations

* Undid removal of villager checking

* Undid removal of villager checking

* Documentation for transformation configs

Co-Authored-By: md678685 <1917406+md678685@users.noreply.github.com>

* Removed duplicate configuration lines

* Updated info about husks drowning

* Changed config names

Co-authored-by: md678685 <1917406+md678685@users.noreply.github.com>
2019-12-23 13:55:05 +00:00
Josh Roy 0ebd64d314 Add a cause enum to UserBalanceUpdateEvent (#2824)
Basically, I just needed this for one of my plugins; otherwise, this could be useful for people using this event who want to see where the user's balance is being updated from.

---

* Add UserBalanceUpdateEvent.Cause
* Add special cause enum
* Add API Cause
2019-12-23 13:16:34 +00:00
Mark Vadeika 843ecb4a42 Escape pipe character on item lore (#2831)
I just adjusted the regex used to split the item lore into multiple lines in order to allow escaping of the pipe character using \|.

Fixes #2830.
2019-12-23 13:15:26 +00:00
md678685 a1a0d34940 Attempt to parse input as UUID in loop commands (#2606)
Related: #2424
2019-12-23 13:06:15 +00:00
md678685 15bb978dab Remove unused VersionUtil constants 2019-12-22 23:55:25 +00:00
md678685 6a7cf39548 Fix wrong filename in ManagedFile error message 2019-12-22 23:53:36 +00:00
pop4959 8ccb70d07d Add phantoms to protect.prevent.spawn (#2806)
Closes #2733.
2019-12-22 22:13:26 +00:00
dashaw92 45461a93b0 Correct unbanip's permission for broadcasts 2019-12-22 22:11:44 +00:00
Joe Hirschfeld b3a54a78bc Save materials in unlimited by name
There was a mistake where materials in unlimited would instead be saved
as a bukkit Material instead of its name. Instead, save it by the name.
2019-12-22 22:10:30 +00:00
AgentTroll a4182b5ff9 Correct check for command cooldowns list in userdata 2019-12-20 12:44:10 +00:00
pop4959 215dcde4b9 Update to 1.15.1 2019-12-19 12:38:18 +00:00
md678685 67b2a9a4f4 Build with GitHub Actions (#2800)
* Add GitHub Actions workflow

* Update workflow

* Run BuildTools in workflow

* Update build.yml

* Add distributionManagement to pom.xml

* Add GitHub registry Maven credentials

* Remove Travis CI config

* mkdir -p

* Remove GitHub package registry push

Didn't work anyway

* Remove distributionManagement

* Cache Maven repo

* Fix step order

* Use JitPack for VaultAPI
2019-12-16 14:23:00 +00:00
Johnny Cao 3b51b23ac2 Block gamemode changes for jailed players (#2875)
Blocks players from experiencing any gamemode changes while they are jailed.

Fixes #1996.
2019-12-12 07:37:13 +00:00
Johnny Cao e0f19f8121 Allow players to set single word AFK message - fixes #2712 (#2876)
Allows players with "essentials.afk.others" to toggle afk themselves with a single word message
2019-12-11 19:20:56 +00:00
Madis Otenurm e720fb528a Crowdin in readme (#2877)
* Crowdin for readme

* Update README.md
2019-12-11 19:04:12 +00:00
md678685 518a5454c6 Add missing FakeWorld methods 2019-12-11 08:48:45 +00:00
Josh Roy 2d9c846084 Update to 1.15 (#2873)
* Compile against 1.15

* Remove achievement related methods for OfflinePlayer

* Add 1.15 to VersionUtil

* Revert "Remove achievement related methods for OfflinePlayer"

This reverts commit d0ab84e0

* Add 1.15 Mobs

* Remove Achievement related methods from OfflinePlayer

This needs more work as this currently breaks > 1.15 support

* Actually this isn't a problem
2019-12-11 07:47:56 +00:00
md678685 59e30f05fc Merge pull request #2871 from AgentTroll/patch-mockito
Update Mockito to allow tests to pass in newer versions of Java
2019-12-10 07:48:07 +00:00
AgentTroll 0f1085a02d Update Mockito to allow tests to pass in newer versions of Java 2019-12-09 20:55:55 -05:00
Glare 882699919e Reimplement spawn-if-no-home config option (#2757)
This reimplements the `spawn-if-no-home` config option from the original Essentials plugin. If set to true, running `/home` without having set a home will send the player to spawn (previous behaviour). If set to false, running `/home` will instead show an error message and not teleport the player anywhere.

Closes #1452.
2019-10-20 09:12:53 +01:00
Ryan f6a70a542e Implements missing createExplosion methods in FakeWorld (#2818) 2019-10-13 14:35:38 -07:00
rye761 785b1fe937 Make drop-items-if-full work on Essentials kits 2019-10-13 17:00:11 -04:00
triagonal bae909ba10 implement missing OfflinePlayer methods 2019-09-24 15:51:43 +01:00
triagonal dbb9757a9f add {USERNAME} placeholder to chat format 2019-09-23 06:20:28 +01:00
md678685 deaeb46ce9 Implement missing FakeWorld methods 2019-08-28 21:14:06 +01:00
md678685 219012bc35 Set item meta in setSkullOwner before returning
*Should* address #2765.
2019-08-28 15:26:23 +01:00
md678685 5f9eb22d23 Fix player head meta on versions below 1.13 2019-08-24 10:05:26 +01:00
md678685 2c33fb6834 Correctly return null for invalid IDs when doing legacy conversion 2019-08-13 15:12:04 +01:00
md678685 8bcef6022b Add max-projectile-speed option
Projectils can load chunks pretty intensively if too fast.
2019-08-05 19:56:25 +01:00
md678685 93d36779f0 Implement regex-based nickname blacklist
Adds `nick-blacklist` list to config which takes phrases or regexes. Users with essentials.nick.blacklist.bypass can bypass the blacklist.
2019-08-05 19:01:48 +01:00
Glare 2502f5e6f2 Check if user has a permission to block putting X item on their head. (#2574)
Closes #2550. 

* Check if user has a permission to block putting X item on their head.
* Forced the material name to be lower case.
* Fixed a typo in the message.
* Updated permission node and added check to the EssentialsPlayerListener.
2019-08-05 16:19:03 +01:00
triagonal 95f2852cf3 Implement toggle for command block logging (#2599)
Just a simple config toggle for whether or not command block commands should be logged.

closes #1153, closes #162

---

* Add toggle for command block logs
* update setting name
2019-08-05 16:17:22 +01:00
md678685 ff9f712d65 Add per-projectile permissions and speed argument to /fireball 2019-08-05 16:12:32 +01:00
Mickey42302 60c4e75a1c Add Dragon Fireballs to "/fireball". 2019-08-05 16:12:32 +01:00
md678685 ccf7c48bf1 Add aliases to /delkit 2019-08-05 15:35:32 +01:00
md678685 65d81eb31e Clean up /essentials 2019-08-05 15:25:55 +01:00
md678685 b97eb12dfc Implement /delkit command
Closes #2709, closes #2719.
2019-08-05 14:06:37 +01:00
md678685 d2724d77df URGENT: critical bug fix 2019-08-02 16:05:41 +01:00
md678685 119b21ac67 Check plugin equals rather than name equals in autocomplete listener 2019-08-01 14:57:48 +01:00
md678685 1ff73b3837 Bump version to 2.17.1 2019-07-30 18:10:27 +01:00
Glare d98f8b3467 Fixed dupe on new builds. (#2696)
Fixes #2695.
2019-07-30 12:56:46 +01:00
md678685 ac8b8861cb Merge remote-tracking branch 'origin/2.x' into 2.x 2019-07-28 16:18:00 +01:00
md678685 22dc5dcebd Fix /r not showing in 1.13+ tab complete
Fixes #2659.
2019-07-28 15:00:49 +01:00
Josh Roy 3c09e72ce4 Bump supported 1.14.x version to 1.14.4 (#2681) 2019-07-20 00:48:13 -07:00
pop4959 fffc3fcac7 Implement missing methods in FakeWorld (#2679) 2019-07-18 11:56:00 -07:00
md678685 bcdbbe9546 Fix wall sign protection on 1.12.2 and below
Fixes #2635.
2019-06-27 15:50:04 +01:00
md678685 19f03cd70e Add missing /tpauto messages
Add messages from #2310 to the `messages.properties` file. Fixes #2634.
2019-06-27 12:00:47 +01:00
md678685 9b7858b830 Update README.md 2019-06-26 22:13:10 +01:00
md678685 8bc55387dd Bump version to 2.17.0 2019-06-26 16:50:11 +01:00
md678685 0584353bfa Bump version to 2.17-pre1 2019-06-26 15:32:08 +01:00
md678685 2938330222 Load and save kit use timestamps consistently
Fixes #2301.

The kit's name was previously sanitised/lowercased when accessed but not when saved. This fixes that. ensuring the kit delay will be reported correctly.

Tested on 1.14.3 - does not appear to break existing kit delays.
2019-06-26 12:54:19 +01:00
md678685 ef7393036e Update to 1.14.3 2019-06-26 11:49:10 +01:00
Josh Roy 0409f5bc4a Update 1.14.3 version string (#2624)
Closes #2624.
2019-06-26 11:48:50 +01:00
Josh Roy 8ff1ebd7c2 Fix version regex on 1.14.3 (#2622) @JRoy 2019-06-25 07:18:16 +01:00
md678685 9089fe8be3 Attempt to fall back to Material.getMaterial(int) below 1.13
Fixes #2615.
2019-06-24 09:41:33 +01:00
Johnny Cao 74d96ce624 Fixes #2121 - Allow players to teleport into a location with water if configured (#2520)
# Description of #2520
This is a continuation of #2457, accidentally hit rebase and recommitted a load of commits from the 2.x log into my repo...

I've reverted the code and added the configuration option, modifying the `LocationUtil#HOLLOW_MATERIALS` as necessary when the config is loaded.

New demo: streamable.com/pm50r
```
[16:01:00 INFO]: Server version: 1.13.2-R0.1-SNAPSHOT git-Spigot-3cb9dcb-77ca7ca (MC: 1.13.2)
[16:01:00 INFO]: EssentialsX version: 2.16.1.154
[16:01:00 INFO]: Vault is not installed. Chat and permissions may not work.
```

# Description of #2457
Fixes #2121.

Prior to the addition of this patch, teleporting from another world through commands such as `/spawn` and `/home` would cause players to be teleported to the surface of the water. After this patch, using the same command will correctly teleport them to the original location.

In seeing that the addition of water would cause the `HOLLOW_MATERIALS` set to be identical to the `TRANSPARENT_MATERIALS`, I have removed the latter's usage and simply added water to the former.

I'm not exactly sure if adding water to `HOLLOW_MATERIALS` is the right decision, but it fixes the issue, and I personally don't really see any point in not having water in the list. I imagine some people might use this as a way to drop players on the surface of the water, but they can fix that issue quite easily by actually going to the surface and setting the location there. I also can see that water is not necessarily a "safe" location because players can drown, but I really see no other alternative. 

The only reason it works like normal in the same world is because the safe location method exempts locations in the same world as the teleporting player, and thus this check is never even performed in the first place for those players anyway.

**Demo**
```
[16:22:49 INFO]: CONSOLE issued server command: /ess version
[16:22:49 INFO]: Server version: 1.13.2-R0.1-SNAPSHOT git-Paper-"16db0e6a" (MC: 1.13.2)
[16:22:49 INFO]: EssentialsX version: 2.16.1.9
[16:22:49 INFO]: LuckPerms version: 4.3.73
[16:22:49 INFO]: Vault is not installed. Chat and permissions may not work.
```
https://streamable.com/71072
2019-06-17 11:28:12 +01:00
md678685 8b7bcbb880 Don't update user activity on physical interactions
Fixes #2578.
2019-06-17 11:06:45 +01:00
md678685 dbd86155fb Only accept square recipes in /condense
Fixes #1194.
2019-06-16 13:28:02 +01:00
md678685 9b77c0802b Switch Travis to openjdk8 2019-06-16 11:25:25 +01:00
md678685 cd7fa79560 Don't warn about CloudNet SLPEs
Fixes #2592.
2019-06-16 11:13:32 +01:00
md678685 10e9879a64 Update to 1.14.x (#2510)
Add support for Spigot/Paper 1.14.2.
2019-06-16 10:15:12 +01:00
md678685 d1dcc47a27 Specify Java 8 for Travis build
Required due to BuildTools not supporting Java 9 or above for MC 1.8.x.
2019-06-16 10:12:35 +01:00
Pokechu22 7a73301a37 Add permissions for individual colors (#1441)
* Add tests for existing format behavior

* Replace formatting implementation

* Add permissions for individual color codes

Resolves #415

* Use format code names

* Fix escaping

* Mockito: test scope only

* Explicitly check the .magic permission

Once I switch to checking if a perm's set in the loop, the explicit check is needed for an * perm.

* Add support for removing individual colors

* Use `obfuscated` as the name for §k

`magic` is still accepted as the group name, so this is not a breaking change.
2019-06-09 15:56:58 +01:00
md678685 e1dec7d9e7 Fix items.json merging 2019-06-09 15:34:24 +01:00
md678685 99fefdb47d Re-add header to items.json 2019-06-09 15:18:16 +01:00
md678685 5ebce8965e Merge 1.13 and 1.14 items.json together
In 2.17.0, [essx-scripts genItemsFlat](https://github.com/md678685/essx-scripts/blob/master/src/genItemsFlat.js) is being replaced with [ItemDbGenerator](https://github.com/md678685/ItemDbGenerator). To ease migration, this is a file generated by merging the 1.14 entries from the new generator into the existing 1.13 file. This will be replaced by an items.json generated entirely by ItemDbGenerator eventually.
2019-06-09 15:10:12 +01:00
md678685 5a0b7285d4 Add FUNDING.yml Patreon link 2019-06-09 13:04:51 +01:00
md678685 829110e89a Implement missing OfflinePlayer methods 2019-06-09 12:59:32 +01:00
md678685 dc1a0b65fa Merge branch 'mc/1.14' of https://github.com/EssentialsX/Essentials into mc/1.14 2019-06-09 12:58:06 +01:00
md678685 b140826e60 Remove unused import in MaterialUtil 2019-06-09 12:21:40 +01:00
md678685 0d9387458d Remove unused import in AFK event 2019-06-09 12:21:25 +01:00
md678685 f2447a9134 Add fallbacks property to ItemData
Allows items.json to specify fallback names for materials on older versions.

Additionally make non-API methods inaccessible, as they shouldn't be needed by other plugins.
2019-05-31 15:57:51 +01:00
md678685 2ea3d8943e Update outdated meme 2019-05-30 19:34:18 +01:00
Drew Mitchell e4cc78a750 Implement PR #1682 - TPA Event (#1727) @DrewAMitchell
* Attempts to implement #1682 - TPARequestEvent
Awaiting further feedback. I've implemented the event, and elected to send a message to the requester of the TPA when the event gets cancelled.
* Fix formatting
* Fix up l18s errors, remove todos
* Clean up for merge
2019-05-30 19:17:57 +01:00
md678685 a08832cfc8 Implement /itemname command (#2573)
Implement /itemname command, across three PRs. Originally implemented by SupaHam, and updated by zsturgess and myself.
2019-05-30 19:16:43 +01:00
md678685 c97918df24 Add safe-usermap-names option to control usermap key sanitisation
This is necessary to stop players with Chinese characters in their username losing their balances.
2019-05-30 18:50:51 +01:00
Glare e9833d1cd2 Implement essentials.balancetop.exclude permission (#2499)
Closes #595.
2019-05-30 15:20:30 +01:00
md678685 111a18585d Allow clearing item names + add locale messages for /itemname 2019-05-30 15:12:52 +01:00
Zac Sturgess 155d3ec938 Update /itemname in plugin.yml
This contains changes from #2555 squashed into one commit.

Closes #2555.
2019-05-30 14:53:15 +01:00
Ali Moghnieh 8bafacbd51 Create /itemname command that names held items.
This contains changes from #672 minus messages, squashed into one commit.

Closes #672.
2019-05-30 14:53:06 +01:00
montlikadani 0e3f48ee54 Improve disposal, /bigtree and /fireball (#2461) @montlikadani
* Allow the Disposal inventory title to be configurable
* Add darkoak to `/bigtree`'s usage message
* Allow potions to be fired with `/fireball`

## Commits
* Update plugin.yml
* Update Commanddisposal.java
* Update messages.properties
* Update Commandfireball.java
* Update SignDisposal.java
* Fix import
* Remove colour code from disposal message
2019-05-30 14:03:12 +01:00
Trent Hensler b566b4a0c6 Update translations from Crowdin (#2571)
* New translations messages.properties (German)
* New translations messages.properties (Romanian)
* New translations messages.properties (Korean)
* New translations messages.properties (Latvian)
* New translations messages.properties (Lithuanian)
* New translations messages.properties (Norwegian)
* New translations messages.properties (Polish)
* New translations messages.properties (Portuguese)
* New translations messages.properties (Portuguese, Brazilian)
* New translations messages.properties (Russian)
* New translations messages.properties (Italian)
* New translations messages.properties (Serbian (Cyrillic))
* New translations messages.properties (Serbian (Latin))
* New translations messages.properties (Slovak)
* New translations messages.properties (Spanish)
* New translations messages.properties (Swedish)
* New translations messages.properties (Thai)
* New translations messages.properties (Turkish)
* New translations messages.properties (Japanese)
* New translations messages.properties (Icelandic)
* New translations messages.properties (Dutch)
* New translations messages.properties (Bulgarian)
* New translations messages.properties (Vietnamese)
* New translations messages.properties (French)
* New translations messages.properties (Hungarian)
* New translations messages.properties (English, United Kingdom)
* New translations messages.properties (English, United States)
* New translations messages.properties (Basque)
* New translations messages.properties (Bosnian)
* New translations messages.properties (Chinese Simplified)
* New translations messages.properties (Hebrew)
* New translations messages.properties (Chinese Traditional)
* New translations messages.properties (Chinese Traditional, Hong Kong)
* New translations messages.properties (Croatian)
* New translations messages.properties (Czech)
* New translations messages.properties (Danish)
* New translations messages.properties (Estonian)
* New translations messages.properties (Finnish)
* New translations messages.properties (Greek)
* New translations messages.properties (Ukrainian)
2019-05-28 17:56:17 +01:00
md678685 a9ed66d5e0 Add essentials.keepinv to plugin.yml 2019-05-28 12:24:07 +01:00
Josh Roy 94131edb32 Bump Bukkit to 1.14.2 (#2569)
* Bump to API 1.14.2

* Update v1_14_2_R01 as latest supported 1.14 build
2019-05-27 23:12:23 +01:00
md678685 e21863956c Fix checking for attached wall signs 2019-05-27 11:51:56 +01:00
md678685 4201e6ef85 Make all events async when not on primary thread
Fixes #2566, fixes #2556, fixes #2545.
2019-05-26 12:08:58 +01:00
Trent Hensler 5deb1de555 Allow AFK status test to pass. 2019-05-22 12:06:27 -07:00
md678685 c65534ebb1 Only make AfkStatusChangeEvent async when off primary thread 2019-05-22 11:39:26 +01:00
md678685 f22efce3ca Use MobCompat entries for other 1.11+ mobs 2019-05-18 23:51:40 +01:00
md678685 5f0909047d Use MobCompat.CAT throughout MobData 2019-05-18 22:45:43 +01:00
md678685 7cc4dc2f07 Make AfkStatusChangeEvent async 2019-05-18 20:56:57 +01:00
md678685 60ebe9e738 Add llama colour support; improve support for old game versions
Fixes issues with /spawnmob on older versions of the game.

(Also add llama colours, which were missing from the 1.11 update.)
2019-05-18 20:56:34 +01:00
minksuki a1297feb9d adds a permission node that keeps a player's inventory on death (#2531) @minksuki
Closes #2524.

Adds a permission node, `essentials.keepinv` so on player death their inventory will not be wiped.
2019-05-15 07:59:48 +01:00
Josh Roy 09598d0173 Update Bukkit to 1.14.1 (#2544)
* Update v1_14_1_R01 as latest supported 1.14 build

* Bump to API 1.14.1
2019-05-14 09:00:22 +01:00
md678685 35fc845040 Fix Metrics plugin name reporting 2019-05-13 19:15:33 +01:00
md678685 e59950966f Fix Metrics package name 2019-05-13 19:14:01 +01:00
md678685 98cc5b33a3 Update bStats Metrics to latest version
Now featuring server brand support!
2019-05-12 16:17:00 +01:00
Julian van Doorn d107d00ac3 Fix spawning shields with enchantments (#2515) @Argetan
* Moved comment to newline for style consistency.
* Fixed issue 2507 by checking if an enchantment is being applied.
* Added a couple newlines for readability.
* Removed faulty ifs).
2019-05-12 13:50:35 +01:00
md678685 ccc000a416 Add Villager variants, pt 2 2019-05-09 22:20:45 +01:00
md678685 7790f8818b Add Villager variants, pt 1 2019-05-09 15:12:51 +01:00
JRoy 72ca629cf1 Add 1.14 Enchantments 2019-05-09 13:36:09 +01:00
md678685 65017d7f5c Fix /kittycannon
The most important command of all!

(This hasn't been tested with 1.13 or below yet.)
2019-05-08 23:29:55 +01:00
md678685 6d4f7afc79 Improve VersionUtil prerelease handling
Actually includes updated regex this time! (I have no idea how I forgot to update it in cfba203981 - I had already written out the regex)

Incorporates part of https://github.com/EssentialsX/Essentials/pull/2523 - thanks @JRoy.
2019-05-08 23:26:40 +01:00
md678685 4fcb032791 Update FakeServer 2019-05-08 23:23:15 +01:00
md678685 0e668fa0f2 Fix plural suffixes for fish and foxes 2019-05-08 23:06:50 +01:00
md678685 68b933a501 Add Ocelot.Type fallbacks for all MobCompat.CatTypes 2019-05-08 23:06:28 +01:00
md678685 5236ad9f64 Remove redundant BABY_FOX 2019-05-08 22:56:25 +01:00
md678685 937c18fe1d Update FakeWorld 2019-05-08 22:43:57 +01:00
md678685 fb48aaba9d Initial cross-version mob compatibility
Incorporates part of https://github.com/EssentialsX/Essentials/pull/2523 - thanks @JRoy.
2019-05-08 22:40:51 +01:00
md678685 365efe4f2d Implement missing FakeWorld and OfflinePlayer methods 2019-05-08 13:49:54 +01:00
md678685 78b2dba42a Bump to API 1.14 2019-05-08 13:49:35 +01:00
Julian van Doorn f793b7607f OS X compatible buildtools.sh (#2513) @Argetan
* OS X compatible buildtools.sh

* Update buildtools.sh
2019-04-30 07:55:54 +01:00
md678685 c567bc22e9 Compile against 1.14-pre5 2019-04-24 14:30:53 +01:00
md678685 d282462547 Use MaterialUtil to check signs 2019-04-24 14:28:15 +01:00
md678685 af4cfd3fe9 Update bStats Metrics to use Gson 2019-04-24 13:54:33 +01:00
md678685 cfba203981 Add prerelease support to VersionUtil 2019-04-24 13:37:43 +01:00
Glare Masters d680ed7363 Check /tpacancel permissions before sending message (#2498)
Fixes #1354.
2019-04-23 09:22:50 +01:00
md678685 69232c0717 Fix missing formatting code in geoipCantFind 2019-04-22 15:24:31 +01:00
latiku b4baa28f01 fix geoip country returning "." if the user is joining from localhost (#2494) @latiku
Implements a check to see if the user's address is `localhost` or `127.0.0.1`, and if so return that the country is unknown.

**Edit by @md678685: fixes #2471.**
2019-04-22 09:38:06 +01:00
md678685 0aa11b58b9 Update items.json
Updated to md678685/essx-scripts@e6394a2884

* Fix overlapping armor/wooden pressure plate aliases
2019-04-19 15:10:10 +01:00
md678685 7b60b562b9 Update items.json
Update items.json to md678685/essx-scripts@581db130ef

Changes:
* Add pressure plate aliases
* Add "mushroomcow" aliases for mooshroom spawners
* Add zombie pigman spawner aliases
2019-04-19 14:49:36 +01:00
montlikadani 6377cbfb2b Remove stale messages and add/change formatting in others (#2486) 2019-04-18 13:25:25 -04:00
montlikadani 3f5f9cc717 Fixed when the mail has already cleared (#2063) 2019-04-18 13:18:42 -04:00
Johnny Cao eac1e9b574 Fixes #1928 - Auto-AFK issue: AFK timer not reset on disconnect (#2458)
Update activity regardless of cancel-afk-on-interact setting
2019-04-17 20:45:07 -04:00
Glare Masters 26d63da7aa [Feature] Implemented a message to say teleporting to home. (#2489)
[Feature] Implemented a message to say teleporting to home.
2019-04-17 19:14:44 -04:00
Joseph Hirschfeld 722181439e Merge pull request #1953 from Xeyame/#1899
Expand /exp command
2019-04-17 12:18:58 -04:00
Joseph Hirschfeld ddcb7041f1 Merge pull request #2455 from AgentTroll/patch-94
Fixes #94 - Player with same first letters conflict
2019-04-17 02:46:20 -04:00
Joseph Hirschfeld 8af33e0ae2 Merge pull request #2166 from mathiascode/commandevents
Use chat instead of dispatchCommand
2019-04-17 02:33:29 -04:00
Joseph Hirschfeld d01e12ac14 Merge pull request #2158 from pop4959/near-fix
Sort /near by nearest player.
2019-04-17 02:31:38 -04:00
Joseph Hirschfeld 8c0aa840ab Merge pull request #1949 from Ichbinjoe/2.x_feature_jail_no_teleport
[Feature] Add config optn. to disable jail free tp
2019-04-17 02:04:16 -04:00
md678685 05118e9498 Merge pull request #2484 from Xeyame/2.x
Allow using environment variable to set xmx flag in buildtools.sh
2019-04-16 15:47:23 +01:00
Xeyame 7838adf833 Allow using environment variable to set xmx flag 2019-04-16 16:34:57 +02:00
md678685 e230cee91e Add new item database API (#2472)
* Allow resolver functions to be added to item databases

* Allow resolvers to add item names to list

* Make getResolverNames package-private
2019-04-15 10:09:16 +01:00
md678685 8e4fc77244 Merge pull request #2469 from N3FS/feature/command-send
Add PlayerCommandSendEvent listener to hide commands in autocomplete
2019-04-15 10:07:49 +01:00
md678685 0d572036f8 New Crowdin translations (#2476)
* New translations messages.properties (English, United States)

* New translations messages.properties (Russian)

* New translations messages.properties (Korean)

* New translations messages.properties (Lithuanian)

* New translations messages.properties (Polish)

* New translations messages.properties (Portuguese)

* New translations messages.properties (Portuguese, Brazilian)

* New translations messages.properties (Romanian)

* New translations messages.properties (Serbian (Cyrillic))

* New translations messages.properties (Italian)

* New translations messages.properties (Serbian (Latin))

* New translations messages.properties (Slovak)

* New translations messages.properties (Spanish)

* New translations messages.properties (Swedish)

* New translations messages.properties (Thai)

* New translations messages.properties (Turkish)

* New translations messages.properties (Ukrainian)

* New translations messages.properties (Japanese)

* New translations messages.properties (Hungarian)

* New translations messages.properties (English, United Kingdom)

* New translations messages.properties (Chinese Traditional, Hong Kong)

* New translations messages.properties (German)

* New translations messages.properties (Norwegian)

* New translations messages.properties (Bulgarian)

* New translations messages.properties (Basque)

* New translations messages.properties (Bosnian)

* New translations messages.properties (Chinese Simplified)

* New translations messages.properties (Chinese Traditional)

* New translations messages.properties (Croatian)

* New translations messages.properties (Hebrew)

* New translations messages.properties (Czech)

* New translations messages.properties (Danish)

* New translations messages.properties (Dutch)

* New translations messages.properties (Estonian)

* New translations messages.properties (Finnish)

* New translations messages.properties (French)

* New translations messages.properties (Greek)

* New translations messages.properties (Vietnamese)
2019-04-07 21:21:29 +01:00
md678685 26fdd0ff6b Fix playerMutedFor[Reason] formatting codes 2019-04-07 21:19:45 +01:00
Trent Hensler 70a4aee930 New translations messages.properties (Vietnamese) 2019-04-07 13:11:55 -07:00
Trent Hensler 3631323aa7 New translations messages.properties (Greek) 2019-04-07 13:11:53 -07:00
Trent Hensler 1fd7d18056 New translations messages.properties (French) 2019-04-07 13:11:51 -07:00
Trent Hensler a60f67cd0a New translations messages.properties (Finnish) 2019-04-07 13:11:49 -07:00
Trent Hensler 5ba781d00e New translations messages.properties (Estonian) 2019-04-07 13:11:46 -07:00
Trent Hensler 17c5d25996 New translations messages.properties (Dutch) 2019-04-07 13:11:44 -07:00
Trent Hensler bd9f271eff New translations messages.properties (Danish) 2019-04-07 13:11:42 -07:00
Trent Hensler 89b4bd2405 New translations messages.properties (Czech) 2019-04-07 13:11:40 -07:00
Trent Hensler 4da9095c59 New translations messages.properties (Hebrew) 2019-04-07 13:11:37 -07:00
Trent Hensler 75e84a5797 New translations messages.properties (Croatian) 2019-04-07 13:11:35 -07:00
Trent Hensler 54d64dbb5f New translations messages.properties (Chinese Traditional) 2019-04-07 13:11:32 -07:00
Trent Hensler 03e746953c New translations messages.properties (Chinese Simplified) 2019-04-07 13:11:30 -07:00
Trent Hensler ec8a51b06c New translations messages.properties (Bosnian) 2019-04-07 13:11:28 -07:00
Trent Hensler 369c08a624 New translations messages.properties (Basque) 2019-04-07 13:11:26 -07:00
Trent Hensler 7a8e5e92d9 New translations messages.properties (Bulgarian) 2019-04-07 13:11:23 -07:00
Trent Hensler 185ec7ff2b New translations messages.properties (Norwegian) 2019-04-07 13:11:21 -07:00
Trent Hensler af986cc7b2 New translations messages.properties (German) 2019-04-07 13:11:18 -07:00
Trent Hensler 25d96ccfa7 New translations messages.properties (Chinese Traditional, Hong Kong) 2019-04-07 13:11:16 -07:00
Trent Hensler b45c42ef22 New translations messages.properties (English, United Kingdom) 2019-04-07 13:11:14 -07:00
Trent Hensler ea2ac3d483 New translations messages.properties (Hungarian) 2019-04-07 13:11:12 -07:00
Trent Hensler 873df96d0d New translations messages.properties (Japanese) 2019-04-07 13:11:10 -07:00
Trent Hensler d69495baa7 New translations messages.properties (Ukrainian) 2019-04-07 13:11:08 -07:00
Trent Hensler 06ff8f24fe New translations messages.properties (Turkish) 2019-04-07 13:11:06 -07:00
Trent Hensler b996608455 New translations messages.properties (Thai) 2019-04-07 13:11:04 -07:00
Trent Hensler 6c1c22132e New translations messages.properties (Swedish) 2019-04-07 13:11:02 -07:00
Trent Hensler 8b326d5852 New translations messages.properties (Spanish) 2019-04-07 13:11:00 -07:00
Trent Hensler dd34f65c98 New translations messages.properties (Slovak) 2019-04-07 13:10:58 -07:00
Trent Hensler 0bd0f853f3 New translations messages.properties (Serbian (Latin)) 2019-04-07 13:10:55 -07:00
Trent Hensler e7a75efaff New translations messages.properties (Italian) 2019-04-07 13:10:53 -07:00
Trent Hensler 2904b50061 New translations messages.properties (Serbian (Cyrillic)) 2019-04-07 13:10:51 -07:00
Trent Hensler 3b6ac632d9 New translations messages.properties (Romanian) 2019-04-07 13:10:48 -07:00
Trent Hensler 9ad3f0e0d7 New translations messages.properties (Portuguese, Brazilian) 2019-04-07 13:10:45 -07:00
Trent Hensler 9529a4ba02 New translations messages.properties (Portuguese) 2019-04-07 13:10:42 -07:00
Trent Hensler 69b9ab097b New translations messages.properties (Polish) 2019-04-07 13:10:40 -07:00
Trent Hensler 4b14c4bcc6 New translations messages.properties (Lithuanian) 2019-04-07 13:10:38 -07:00
Trent Hensler 5154c670c0 New translations messages.properties (Korean) 2019-04-07 13:10:36 -07:00
Trent Hensler 09b699cc9c New translations messages.properties (Russian) 2019-04-07 13:10:34 -07:00
Trent Hensler f2a212e3a4 New translations messages.properties (English, United States) 2019-04-07 13:10:31 -07:00
md678685 19ca946e3b Add Estonian alias to Crowdin config 2019-04-07 21:08:30 +01:00
md678685 e21be39c13 Add Basque alias to Crowdin config 2019-04-07 21:02:42 +01:00
md678685 8fcfff7abd Update Crowdin config 2019-04-07 21:01:22 +01:00
md678685 bcc150a014 Update l10n configs 2019-04-07 20:22:48 +01:00
md678685 3d97e93831 Implement missing OfflinePlayer location methods 2019-04-07 17:06:17 +01:00
md678685 9d93d4db54 Only log removed commands is debug enabled 2019-04-07 17:03:56 +01:00
md678685 0d8aec7eea Add PlayerCommandSendEvent listener to hide commands in autocomplete 2019-03-31 20:35:47 +01:00
md678685 7b165c6c2c Merge pull request #2450 from AgentTroll/patch-2414
Fixes #2414 - Warp signs no permission message
2019-03-15 12:11:17 +00:00
md678685 d3cee314c6 Merge pull request #2451 from AgentTroll/patch-2403
Fixes #2403 - Ability to execute /back for another player
2019-03-15 12:10:33 +00:00
md678685 4395245aab Merge pull request #2454 from AgentTroll/patch-2415
Fixes #2415 - Command for last reply message option
2019-03-15 12:10:10 +00:00
md678685 9d4b0a13c5 Merge remote-tracking branch 'origin/pr/1557' into 2.x 2019-03-15 11:59:35 +00:00
md678685 c908290c27 Simplify willMute condition 2019-03-15 11:58:30 +00:00
md678685 f5c21d1089 Merge branch '2.x' into final_mute_reason_issue#385 2019-03-15 11:52:50 +00:00
Johnny Cao 883fc75f47 Clarifies the last recipient config key 2019-03-10 01:42:10 -08:00
AgentTroll eaac3049af Fix getPlayer(...) for offline players having similar names 2019-03-09 18:50:55 -08:00
AgentTroll f68fb52af1 Add command to toggle reply player functionality 2019-03-09 15:39:45 -08:00
AgentTroll 863bd5a89e Add /back target capability 2019-03-08 22:41:59 -08:00
AgentTroll 50225624a5 Add message for failing sign warp permission check 2019-03-08 15:53:04 -08:00
md678685 25ddaef423 Merge pull request #2329 from triagonal/issue-2311
Implement config option for sleep ignoring AFK players
2019-03-08 22:15:53 +00:00
md678685 585f2bef07 Merge pull request #2310 from pop4959/command-tpauto
Implement tpauto command
2019-03-08 17:19:31 +00:00
md678685 017ea1a4fe Remove unnecessary types 2019-03-08 11:24:42 +00:00
md678685 3b4b5bcd8e Remove Lombok
Remove the (already minimal) usage of Lombok. This will ease development for people who don't already have their IDE set up for Lombok support.

It's also totally unnecessary - it took less than 60 seconds to generate the code needed to replace Lombok annotations in Jails and Spawns.
2019-03-08 11:24:42 +00:00
md678685 f57557b43a Bump version to 2.16.1 2019-03-01 22:45:25 +00:00
md678685 0711fd6f9e Add #version line to allow automatic items.json updates 2019-03-01 12:04:08 +00:00
md678685 b5ecbd1739 Remove Vault repo
Fixes Travis builds and slow builds - Maven pauses while trying to reach the repo and so Travis assumes that the build has failed.
2019-03-01 11:41:29 +00:00
md678685 dda5e4e333 Merge pull request #2402 from Techno3600/patch-1
Pull Request for #2282
2019-03-01 11:32:46 +00:00
pop4959 74b0e71015 More efficient distance calculation 2019-02-26 19:54:19 -08:00
md678685 dde4a36df0 Economy API: Attempt to find users by UUID if username not present (#2432)
Attempt to find user by UUID if username not present. Fixes (maybe) #2400.

https://github.com/EssentialsX/Essentials/issues/2400#issuecomment-466043896
2019-02-22 18:10:36 +00:00
triagonal 31b98fb9f3 allow console to use color codes when sending mail (#2435) @triagonal 2019-02-22 14:34:56 +00:00
kashike 289d34d96c Relocate PaperLib in EssentialsXSpawn too
fixes #2433
2019-02-22 09:58:02 +00:00
md678685 eafd110ed0 Update items.json
Add spawner aliases that end in "spawner".
2019-02-20 14:50:43 +00:00
md678685 e72644abf4 Update items.json
* Add mooshroom spawners
* Add new aliases for red sandstone, sandstone, stone and prismarine variants
2019-02-20 14:42:22 +00:00
md678685 b267103274 Remove getMap(short) method from FakeServer 2019-02-20 12:45:37 +00:00
DoNotSpamPls 3856a690eb Use PaperLib to load chunks and teleport players async (#2409)
* Remove outdated permission plugin handlers, minor test fixes

* Re-add PermissionEX handler

* Use PaperLib to load chunks async whenever possible

* Revert "Use PaperLib to load chunks async whenever possible"

This reverts commit db4df6f3cf.

* Use PaperLib to load chunks and teleport players async

* Resolve some PR issues

* Update PaperLib, return teleport causes

* Remove useless PaperLib usage in LocationUtil

* Fix FakeServer spacing
2019-02-20 12:25:05 +00:00
md678685 f214696664 Check Protect/AntiBuild config materials against Material enum (#2431) 2019-02-20 12:24:30 +00:00
md678685 9e73c29b40 Fix creating and using kits on legacy versions (#2428)
* Attempt to look up legacy items in Material enum
* Use name method when serializing ItemStacks
* Make name uppercase before looking up in Material enum
2019-02-20 12:24:07 +00:00
md678685 aca83bd462 Switch Vault dependency to VaultAPI (#2430)
* Switch Vault dependency to VaultAPI
* Remove direct Vault class usage from VaultEco
2019-02-20 11:28:20 +00:00
md678685 189d6a23c6 Add README section about depending on EssX 2019-02-19 21:58:43 +00:00
md678685 441f88deea Implement missing FakeServer methods 2019-02-17 19:01:47 +00:00
Wiz_Techno 6d6666dace Pull Request for #2282
"Obsolete entries in items.csv should be removed"
2019-01-31 23:14:21 -05:00
Rafał Pokrywka fb779533e6 Replace nbsp with a space when formatting messages (#2394) @ravkr 2019-01-27 12:15:03 +00:00
DoNotSpamPls 7325113a8c Remove outdated permission plugin handlers, minor test fixes (#2367) @DoNotSpamPls
* Remove outdated permission plugin handlers, minor test fixes

* Re-add PermissionEX handler

* Use PaperLib to load chunks async whenever possible

* Revert "Use PaperLib to load chunks async whenever possible"

This reverts commit db4df6f3cf.
2019-01-27 12:14:16 +00:00
Glare Masters 827217823e Add the ability to make spectator gamemode signs (#2386) @darbyjack
Fixes #2383.
2019-01-20 10:14:20 +00:00
md678685 060dfc69f4 Update items.json
Fixed regression of unspawnable items not being marked as such, impacting the alias generation process. This fix also retains the ability to specify non-item blocks in the EssentialsX Protect material lists.
2019-01-12 22:07:03 +00:00
md678685 b831713737 Check whether item is spawnable in FlatItemDb 2019-01-12 21:43:36 +00:00
md678685 7da90b3a6b Load item spawn blacklist after item DB
Partially resolves #2360.
2019-01-12 21:43:36 +00:00
md678685 32540c23ab Add IItemDb#isReady to check if item database is available 2019-01-12 21:43:36 +00:00
md678685 d24b0616f8 Hide ServerListPingEvent exceptions thrown by CB's LegacyPingHandler (#2378)
Fixes #2327.
2019-01-12 17:19:11 +00:00
md678685 9aef2ef883 Update items.json
Add several new aliases. Closes #2348.
2019-01-09 15:10:38 +00:00
md678685 727d473319 Fix Enchantments on 1.12.2 and lower 2019-01-09 14:23:55 +00:00
md678685 8225e51867 Fix XMPP metrics reporting
The XMPP config was being reported as valid when it wasn't valid.
2019-01-09 13:57:18 +00:00
md678685 1ba6c2a596 Properly fix language mappings 2019-01-08 22:19:16 +00:00
md678685 60a166aeb0 Fix language mapping in Crowdin config 2019-01-08 21:45:46 +00:00
md678685 65c2155bca Update Crowdin config
Map most locales to the existing locale files.
2019-01-08 21:36:16 +00:00
md678685 6031c01584 Update Crowdin config
Fix file placement and map locale codes to existing translations
2019-01-08 21:21:35 +00:00
md678685 da8e8c8a25 Update Crowdin config
Crowdin should only use `messages.properties` as the "source" and this file will get copied to all the other language files like `messages_de.properties` for the German translation, `messages_ro.properties` for the Romanian translation etc.
2019-01-08 21:14:56 +00:00
Trent Hensler 70a750a32d Update Crowdin configuration file 2019-01-08 12:48:25 -08:00
md678685 7c63324504 Fix allow-old-id-signs allowing creation of signs with IDs 2019-01-07 22:38:13 +00:00
md678685 dd41b10522 attempt to fix Essentials overriding Skulls (#2356) @kennyrkun 2019-01-05 18:48:33 +00:00
triagonal 7948e764d4 disallow setting bed homes in non-overworld dimensions (#2335) @triagonal 2019-01-05 18:43:27 +00:00
DoNotSpamPls 82ede4530a Lots of little fixes in the Essentials modules (#2337) @DoNotSpamPls
Look at changed files for the changes
2019-01-05 18:42:09 +00:00
md678685 e8ab2db8e8 Improve ServerListPingEvent warning handling 2019-01-05 18:12:04 +00:00
md678685 8882e0214c Add bStats metrics for each EssentialsX module (#2333)
Does what it says on the tin.
2019-01-05 17:48:44 +00:00
md678685 4adb669cdd Add support for spawners with entities on 1.13+ 2019-01-05 17:35:29 +00:00
md678685 7e1d258dd3 Cache BukkitVersion in getServerBukkitVersion 2019-01-05 16:29:11 +00:00
md678685 417fe29e21 Remove duplicated item IDs in messages 2019-01-05 16:28:53 +00:00
md678685 bd8ef2a25d Only show available warps in tab complete
Fixes #2353 by only displaying warps where the player has the permission `essentials.warps.<warp>`.
2019-01-05 15:45:34 +00:00
md678685 fd01b75c33 Wrap UnsafeValues.fromLegacy() in try/catch for older versions
Should address #2352.
2019-01-05 15:27:07 +00:00
md678685 1388755d2a Wrap Enchantment.getByKey in try/catch for older versions
Should address #2351.
2019-01-05 15:17:58 +00:00
md678685 97cc3d0066 Update items.json
* Fix wrong harming potion mapping (fixes #2349)
* Add mob spawner aliases (not complete, related to #2347)
* Closes #2348:
  - Fix log aliases mistakenly pointing to stripped logs
  - Fix sandstone alias
  - Add shorter concrete powder aliases
2019-01-05 15:04:59 +00:00
md678685 694cf7a79e Revert 1.13 API hacks in LegacyItemDb
Earlier changes broke the items.csv database on older versions - this should now be fixed.
2019-01-04 15:01:18 +00:00
md678685 da89efb79f Make VersionUtil not explode when patch is not present 2019-01-03 22:16:14 +00:00
md678685 04ec013407 Update README to reflect 1.13 support 2019-01-03 21:25:48 +00:00
md678685 023cf6a1aa Merge pull request #2278 from EssentialsX/1.13
Full 1.13 support + 2.16.0 release
2019-01-03 20:56:14 +00:00
md678685 f7cbb141f8 Release 2.16.0
🎉
2019-01-03 20:47:24 +00:00
md678685 5690952516 Implement missing OfflinePlayer methods 2019-01-03 20:42:03 +00:00
md678685 e94202c55a Use 1.8-friendly User#getItemInHand method in commands 2019-01-03 20:33:08 +00:00
md678685 aa6ad271a0 Remove redundant metricsEnabled field from Settings 2019-01-03 20:33:08 +00:00
md678685 3b41bb47b6 Improve Travis build script (#2338)
I've added a new script at `scripts/buildtools.sh` that is responsible for:
* Checking whether CraftBukkit 1.8 and 1.8.3 are already available in the local Maven repo
* Downloading BuildTools if not already present
* Running BuildTools if necessary

This improves Travis build times as it now doesn't run BuildTools twice for *every single build*, instead running it only if the Travis cache fails and CraftBukkit is missing for some other reason.
2019-01-01 16:13:50 +00:00
md678685 e7bdb7fabc Improve the wording of the README's "Building" section 2019-01-01 15:42:45 +00:00
md678685 110698223d Travis: make build prep script executable 2019-01-01 15:23:35 +00:00
md678685 437be593b9 Add new build preparation script 2019-01-01 15:10:59 +00:00
md678685 502d37b574 Update Lombok to compile on Java 9+ 2018-12-31 17:44:08 +00:00
md678685 df59f9f859 Merge remote-tracking branch 'origin/2.x' into 1.13 2018-12-31 14:59:12 +00:00
md678685 f436fbab6b Remove redundant BuildTools runs 2018-12-31 14:54:59 +00:00
seema84 8404720501 change typos (#2328) @seema84
* change typos

* format text

* remove double color
2018-12-31 13:08:57 +00:00
md678685 4431d452f1 Bump to 2.16-pre4
Pretty much there now.
2018-12-31 13:02:08 +00:00
md678685 6a529d6671 Update EssentialsX Protect with cross-version enum lookups 2018-12-31 12:54:43 +00:00
md678685 78fca9a67a Updates signs with cross-version enum lookups 2018-12-31 12:53:41 +00:00
md678685 0114b5e4f6 Update several commands with cross-version enum lookups 2018-12-31 12:53:23 +00:00
md678685 5a14a64b6c Add cross-version support to SpawnMob 2018-12-31 12:24:41 +00:00
md678685 b555ea6350 Add cross-version support to MobData 2018-12-31 12:20:05 +00:00
md678685 361ae1dd16 Use constant field for "harp"/"piano" sound 2018-12-31 12:19:22 +00:00
md678685 58117eba88 Remove redundant BuildTools instructions 2018-12-31 12:18:45 +00:00
md678685 6260b49b4f Restore item ID messages in /itemdb 2018-12-31 11:57:15 +00:00
md678685 988239267b Restore durability permissions checks in AntiBuild 2018-12-31 11:56:50 +00:00
md678685 19cffe3872 Restore ID-based charges in /repair 2018-12-31 11:39:08 +00:00
md678685 3b1cef918e Simplify item spawn permission checks; restore ID-based item spawn perms 2018-12-31 11:29:27 +00:00
triagonal 3d004d2a81 change config setting name 2018-12-31 16:42:42 +11:00
triagonal d1bbebad3a updated config comments 2018-12-30 20:49:58 +11:00
triagonal 42714ff8af implement config toggle for afk users bypassing sleep 2018-12-30 20:38:34 +11:00
md678685 3553328f7a Bump to 2.16-pre3 2018-12-29 21:22:08 +00:00
md678685 0202271f00 Add missing FakeWorld methods 2018-12-29 21:16:17 +00:00
md678685 d91d6a419c Update items.json
* Fix incorrect "cobblestone" and "stone" aliases
* Fix stripped log aliases not appearing
* Fix meat/fish aliases pointing to spawn eggs
2018-12-28 16:40:39 +00:00
md678685 5173090474 Update items.json
Adds more minecart, meat, fish and hay aliases.
2018-12-26 21:05:48 +00:00
md678685 c26df8318f Update items.json
* Add more shorter spawn egg aliases
* Add new trapdoor aliases
* Add new infested block aliases and stone brick variants
2018-12-26 19:24:50 +00:00
md678685 7b44f0088a Update items.json
* Add spawn eggs aliases
* Add new aliases for several items and blocks like beetroot, pumpkins and crafting tables
* Remove `WALL_` materials (these are unspawnable)
2018-12-26 18:05:55 +00:00
md678685 aa4d3cc9fd Bump to 2.16-pre2 2018-12-25 00:27:54 +00:00
md678685 246fd03265 Fix typo in README 2018-12-23 23:33:46 +00:00
md678685 55074872fe Add setting to enable item ID recognition on signs
Item IDs can now be enabled for existing signs by manually changing a config option, but there is no facility to create new signs with item IDs.
2018-12-23 23:02:36 +00:00
md678685 28559dda3a Lowercase the provided ID in FlatItemDb#get 2018-12-23 19:45:23 +00:00
md678685 cbcfad5b2e Merge branch '2.x' into 1.13 2018-12-23 19:33:20 +00:00
md678685 a9ad440860 Overhaul AbstractItemDb.serialize to use MaterialUtil methods 2018-12-23 19:32:10 +00:00
md678685 5104463593 Add MaterialUtil.getColorOf 2018-12-23 19:31:33 +00:00
md678685 4b1c51c21d Reword IItemDb#serialize docs 2018-12-23 18:02:38 +00:00
md678685 236ef52980 Improved README (#2293)
I've made several improvements to the README, including:
* Overall rewording to make phrasing feel less awkward
* Added links to Patreon
* More consistent images for links at top
* Consolidated "Why you should use it" and "Other info" into "Why use EssentialsX?"
* More specific about version support
* Moved "Support" section above "Building" and added explanation
* Removed redundant "Commit Guidelines" section
  - It has been totally ignored for years, and it doesn't make much sense to keep it
* Added a new "Contributing" section near the bottom
2018-12-23 17:21:31 +00:00
md678685 f220c5b406 Update Estonian sudoExempt message
Thanks to @Madis0 for [pointing this out and translating it](https://github.com/EssentialsX/Essentials/pull/2228#issuecomment-449586891).
2018-12-22 17:47:39 +00:00
Thomas 9415582fe1 Update messages_nl.properties (#2129) @DutchUser
* Update messages_nl.properties

* Update messages_nl.properties

* Update messages_nl.properties

* Update messages_nl.properties

* Update messages_nl.properties
2018-12-22 17:42:42 +00:00
Sprungente a5a3630727 [Finish] Improving German localization (#2198) @Sprungente
* Improving 

I found some stuff to improve the translation. I'm not done yet but i think it's ready to get an eye on it. 

Hope it will be used :)

Greets Sprungente/enterih

* mistake^^

^

* Part 2

Adding more Improvements
Hope it helps other serverowners^^

* Part 2 fixes

* Part 3 



Notice for me 
a-d finished
\u00f6 ö    \u00e4 ä  \u00fc ü

* Part 4

Notice for me 
a-i finished
\u00f6 ö    \u00e4 ä  \u00fc ü

* Last part 

is line 456
requiredBukkit=\u00a76* \! * Du brauchst mindestens CraftBukkit Build \#{0}, lade es von http\://dl.bukkit.org/downloads/craftbukkit/
still exist? If yes, could a reference to spigot be added?

It's ready to merge. Can i take care on it in the future?

* small polishing

* Update messages_de.properties

* Update messages_de.properties

* Adding new strings 

added strings from #2278
2018-12-22 17:39:44 +00:00
Madis f4c36d9c43 Estonian translation update (#2228)
* Initial improvements

* Half done

* Almost done

* Translation done

* Encode umlauts

* Additional refinements

* Minor fix

* Some more tweaks

* Minor wording change

* 1.13 strings
2018-12-22 17:36:47 +00:00
pop4959 64930e3771 Fix messages & add warning 2018-12-21 01:58:44 -08:00
pop4959 16381234e0 Implement tpauto command 2018-12-19 02:50:30 -08:00
md678685 492005d00a Fix LegacyItemID method override 2018-12-15 19:11:41 +00:00
md678685 149d9b61cc Add methods to facilitate conversion from IDs to new Materials 2018-12-15 18:54:01 +00:00
md678685 77ffb6a3d5 Slightly simplify FlatItemDb 2018-12-15 18:53:06 +00:00
md678685 d95b632884 Merge branch '2.x' into 1.13 2018-12-11 14:31:42 +00:00
md678685 579f554edb Update nickname again after toggling AFK status 2018-12-11 13:26:15 +00:00
md678685 050287f306 Add 1.13 enchantments
Fixes #2254.
2018-12-11 10:04:38 +00:00
md678685 dafe156212 Merge branch '2.x' into 1.13 2018-12-09 15:25:31 +00:00
md678685 48bf264178 Fix discrepancies between default and EN locale 2018-12-09 15:21:07 +00:00
md678685 769dbe8852 Fix BukkitVersion's toString and equals 2018-12-09 15:16:44 +00:00
md678685 67bccb865a Remove colour codes from serverUnsupported in EN locale 2018-12-09 15:16:18 +00:00
md678685 d1e60de04a Ignore kits.yml created during tests 2018-12-09 15:15:55 +00:00
md678685 89d592ce43 Improve item-spawn-blacklist load logging 2018-12-09 14:58:56 +00:00
md678685 c06dda886d Actually use the force-enable-recipe option from the config 2018-12-09 14:58:36 +00:00
md678685 23d92fac63 Bump version to 2.16.0 and release 2.16-pre1 2018-12-09 14:33:53 +00:00
md678685 5922b85290 Move SHIELD to from MetaItemStack to MaterialUtil 2018-12-09 13:47:52 +00:00
md678685 814e5a643e Add SIGNS and SPAWNER to MaterialUtil 2018-12-09 13:47:22 +00:00
md678685 3db3a272d5 Update default kits.yml file
Item IDs are no longer supported in 1.13+, so remove them from the default kits section.
2018-12-09 13:07:11 +00:00
md678685 2d703fbc80 Add damage value support to FlatItemDb
...in case you wanted to give players broken swords, or something?
2018-12-09 13:04:21 +00:00
md678685 b49d3cc21c Remove unnecessary kits file
This is a leftover from dev environments and is *not* the one copied into the jar during build.
2018-12-09 13:02:44 +00:00
md678685 02b5d2357a Add missing FakeServer methods 2018-12-09 12:29:28 +00:00
md678685 1206178eca Use utility methods in MetaItemStack 2018-12-09 12:17:13 +00:00
md678685 3df3f8a812 Add several cross-version item type checks to MaterialUtil 2018-12-09 12:17:13 +00:00
md678685 7049952b07 Load forceEnableRecipe during Settings.reloadConfig 2018-12-09 12:17:13 +00:00
Mark Vadeika a18ce40921 Hiding display names (#2248) @AllTheMegahertz
Prevents a user's nickname from appearing if they are hidden, if `hide-displayname-in-vanish: true` in the config. Closes #2221.

* Does not return display name if user is hidden

* Added hide-displayname-in-vanish field

* Added hideDisplayNameInVanish()

* Changed to only hide display name if specified in config

* Changed hideDisplayNameInVanish to default to false if not specified in config.yml
2018-12-09 11:02:45 +00:00
md678685 6a6383462d Allow admins to force enable /recipe if they want
Add `force-enable-recipe`, which allows server admins to manually enable `/recipe` despite potential duplication exploits. Use this at your own risk!

Related: #1397
2018-12-08 16:41:24 +00:00
md678685 44301fae4f Fix Worth.setPrice on 1.13+; add Javadocs to Worth 2018-12-08 16:32:09 +00:00
md678685 6ee84510ea Update bStats-Metrics 2018-12-06 17:49:08 +00:00
md678685 6ecdc8d7fc Enu-moo-til 2018-12-06 17:44:22 +00:00
md678685 35a2a4d803 Add several version warning messages 2018-12-06 17:41:32 +00:00
md678685 7b67b3b858 Don't send empty line join/quit messages
GitHub meta: fixes #991 fixes #2289
2018-12-06 14:06:25 +00:00
md678685 4011810536 Correctly use LegacyItemDb after detecting version < 1.13 2018-11-19 22:51:07 +00:00
md678685 85ea07c97e Fix VersionUtil regex matching and BukkitVersion.toString 2018-11-19 22:48:33 +00:00
md678685 41b2449cdd Change /enchant's default level from -1 to 1 2018-11-19 21:11:25 +00:00
md678685 ec83a5fff2 Add EntityPickupItemEvent listener to AntiBuild 2018-11-19 20:20:10 +00:00
md678685 ded6f06ed2 Merge remote-tracking branch 'origin/2.x' into 1.13 2018-11-19 19:48:38 +00:00
md678685 2605e050a0 Deduplicate ItemDb code 2018-11-19 19:41:01 +00:00
md678685 19b1e19e42 Remove extraneous imports 2018-11-19 19:30:35 +00:00
md678685 f7a1149cac Port old ItemDb back 2018-11-19 14:13:05 +00:00
md678685 7dd52dab32 Add non-NMS VersionUtil
*Should* work on Glowstone. TODO: use this instead of ReflUtil where appropriate.
2018-11-19 14:12:10 +00:00
md678685 937aec600a Implement more FakeServer methods 2018-11-19 12:52:19 +00:00
md678685 4802053da6 Rename en-GB to en_GB for consistency 2018-11-19 12:51:26 +00:00
md678685 0105dff7ac Update AntiBuild default entries to enum names 2018-11-19 12:49:34 +00:00
md678685 8cc448efcf Remove meta/durability checks from AntiBuild 2018-11-19 11:38:50 +00:00
md678685 982b358bf8 Bump AntiBuild and Protect to api-version: 1.13 2018-11-19 11:28:31 +00:00
md678685 ffc80d61af Implement missing FakeWorld and OfflinePlayer methods 2018-11-19 11:26:05 +00:00
md678685 f55956612c Add messages_en-GB.properties (#2206)
Tins what it does on the say.
2018-11-19 08:38:37 +00:00
md678685 cd3b342d74 Target Bukkit 1.13.2 2018-10-31 15:00:54 +00:00
md678685 ba959586e2 Merge remote-tracking branch 'games647/java9' into 1.13 2018-10-31 14:53:49 +00:00
md678685 4c07e584b7 Default to max stack size 2018-10-31 14:47:45 +00:00
Banbeucmas 280d1215de Adding EssentialsWarpEvent (#1921) @Banbeucmas
* Adding EssentialsWarpEvent for checking if player is wrapping

* Spacing

* Adding Trade parameter

* Refactoring

* Adding #setWarp() to the Event

* Spacing

* Documenting the purpose of the Event

* Javadoc?
2018-10-28 18:53:52 +00:00
md678685 22538ba7c9 Merge branch '1.13' into 2.x_feature_jail_no_teleport 2018-10-28 18:46:53 +00:00
montlikadani a2a95ed840 Added acacia and dark oak tree types (#2001) @montlikadani
* Update Commandbigtree.java

* Update Commandbigtree.java

* Update Commandtree.java
2018-10-28 18:41:46 +00:00
md678685 4bd9461282 Rename help-.md to help.md 2018-10-28 10:54:01 +00:00
md678685 96adef5269 Update issue templates (#2045)
* Update issue templates

Add new issue templates - I didn't even know GitHub had these now

* Remove duplicate bug template

* Remove duplicate feature template

* Update help-.md

* Update report-a-bug.md

* Update request-a-feature.md

* Delete ISSUE_TEMPLATE.md
2018-10-27 15:42:56 +01:00
md678685 9576ea25a6 Use reflection-based detection for pickup listener in player listener (#2151)
Allows the plugin to start up on Glowstone correctly.

Tested on Spigot 1.12.2, Spigot 1.9.4 and Glowstone 2018.7.0, works correctly on all.
2018-10-27 15:37:29 +01:00
md678685 a7fcafb245 Filter out comment lines when loading items.json 2018-10-27 15:00:04 +01:00
md678685 73bb41d579 Merge branch '1.13-items' into 1.13 2018-10-26 15:59:51 +01:00
md678685 0a90d76493 Remove item IDs from Worth 2018-10-15 13:56:36 +01:00
md678685 010981d3c8 Remove ID-based charges in /repair 2018-10-15 13:51:04 +01:00
md678685 3353061e76 Remove ID-based permission checks in /more 2018-10-15 13:49:16 +01:00
md678685 79bc34047b Allow multiple item names in /clearinventory
Allow a comma-separated list of item names in /clearinventory.
2018-10-15 13:46:12 +01:00
md678685 60c90408e7 Remove ID-based permission checks in /give and /item 2018-10-15 13:16:10 +01:00
md678685 1218c3e226 Merge branch '1.13' into 1.13-items 2018-10-13 18:23:58 +01:00
md678685 a05fc9d08e Remove duplicated OfflinePlayer method 2018-10-13 17:14:10 +01:00
md678685 6906ef2154 Merge branch '1.13' into 1.13-items 2018-10-13 16:59:57 +01:00
md678685 7d25e84ebc Merge branch '2.x' into 1.13 2018-10-13 16:59:44 +01:00
md678685 121d935315 Implement missing FakeServer methods 2018-10-13 16:55:49 +01:00
md678685 2f66a866d8 Implement missing FakeWorld and OfflinePlayer methods 2018-10-13 16:55:42 +01:00
md678685 0e088c17a8 Remove IdProvider dependency 2018-10-13 16:45:20 +01:00
md678685 4cd8a6636b Log invalid JSON entries 2018-10-13 16:44:50 +01:00
md678685 5c7fc763fc Formatting 2018-10-13 16:44:24 +01:00
md678685 1e381a59be Throw meaningful exception when item not found 2018-10-13 16:32:21 +01:00
md678685 85111f25cb Use ItemData#equals when finding item name
Avoids accidentally causing an NPE while comparing potion data.
2018-10-13 16:09:45 +01:00
md678685 f78887a02e Remove item IDs from /itemdb 2018-10-13 15:59:25 +01:00
md678685 feba535637 Actually assign the ManagedFile to file 2018-10-13 15:38:45 +01:00
md678685 3262143c73 Implement missing FakeServer methods 2018-10-13 15:30:27 +01:00
md678685 18feb7967a Implement missing FakeWorld and OfflinePlayer methods 2018-10-13 15:26:58 +01:00
md678685 e9b1511117 Remove item ID support in Worth 2018-10-12 17:26:41 +01:00
md678685 177e5f62f7 Remove providers; move JSON support into ItemDb 2018-10-12 17:26:22 +01:00
md678685 f3f4395da7 Reset BuildTools work directory on Travis 2018-10-09 20:32:40 +01:00
md678685 442e46b012 Return to root after BuildTools on Travis 2018-10-09 20:25:36 +01:00
md678685 37d699d05b mkdir -p in Travis 2018-10-09 19:54:31 +01:00
md678685 77ed1e1d4a Ensure Travis runs BuildTools before mvn install 2018-10-09 19:52:42 +01:00
md678685 50e4cd67b5 Fix typo in Travis config 2018-10-09 19:47:57 +01:00
md678685 83a90eb553 Update .travis.yml 2018-10-09 19:45:28 +01:00
md678685 c29599d39a Create .travis.yml 2018-10-09 19:34:07 +01:00
mathias a9fe842242 Use chat instead of dispatchCommand 2018-09-18 16:39:58 +03:00
md678685 692e0adde4 Use MONSTER_EGG in SpawnEggRefl 2018-09-09 16:37:02 +01:00
md678685 cdba518bae Revert "Implement 1.13 item support (#2153)" 2018-09-09 16:35:20 +01:00
md678685 b70b67fa1f Remove unnecessary CraftBukkit dependency 2018-09-09 16:34:15 +01:00
md678685 ff0ca9bc7b Remove unnecessary CraftBukkit dependency 2018-09-05 19:20:18 +01:00
md678685 320bc25d94 Implement 1.13 item support (#2153)
Uses two distinct providers to support items on 1.13 while falling back to `items.csv` for previous versions of Minecraft.
2018-09-05 14:23:16 +01:00
md678685 425e955b5d Update items.json
Add some more aliases to the file
2018-09-05 14:19:09 +01:00
pop4959 33ae9a2597 Fix TropicalFish spawning (#2159)
The name can't have a space in it or it won't be matched by any commands.
2018-09-05 13:26:33 +01:00
pop4959 19913d3612 Implement abstract method Entity::getFacing in OfflinePlayer (#2157) @pop4959
Allows EssentialsX to compile against the latest Spigot version.

Reference: [https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/8ab814cd5c415258aa0ab7617051ee4ea9f4e7bd](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/8ab814cd5c415258aa0ab7617051ee4ea9f4e7bd)
2018-09-05 11:00:27 +01:00
pop4959 0432546746 use less dependencies 2018-09-04 16:53:01 -07:00
pop4959 3395bab928 Sort /near by nearest player. 2018-09-02 23:09:22 -07:00
pop4959 a3eb58724f Add a way to use unsafe nicknames (#2152) @pop4959
Pretty much what the title says. Closes #1630.

This is a fun little feature that I'm sure many people have always wanted. I can understand that the original authors of Essentials were probably concerned about users entering names that cannot display correctly in the chat, and that is understandable.

I have added a new permission "essentials.nick.allowunsafe", which must be given to anyone who is allowed to use characters outside of the alphanumeric set. The name of the permission is inspired from "essentials.enchantments.allowunsafe", which allows unsafe enchantment levels to be applied to items without guaranteed behaviour. Similarly, the permission "essentials.nick.allowunsafe" allows unsafe characters to be entered for the user's nickname without making any guarantee that those characters will show up in chat correctly.
2018-09-02 12:14:26 +01:00
md678685 0afa00779c Add some comments to LegacyItemDbProvider 2018-09-01 19:31:32 +01:00
md678685 17d5545804 Update items.json
Fix incorrect type for Uncraftable Potions
2018-09-01 16:46:55 +01:00
md678685 cd70662f01 Update items.json
Fixes some potions spawning incorrectly where the vanilla name didn't match the Bukkit enum name
2018-09-01 16:27:28 +01:00
md678685 a89c97409b Use potion data when looking up items 2018-09-01 15:48:14 +01:00
md678685 102cb6d949 Merge branch '1.13' into 1.13-items 2018-09-01 10:46:27 +01:00
md678685 6c9c9ad42a Use enum methods throughout plugin for cross-version enum lookups 2018-09-01 10:35:08 +01:00
md678685 acbc96fd55 Add enum utility helpers for Statistic and Material 2018-09-01 10:34:11 +01:00
md678685 ca721c1acb Add V1_13_R2 to ReflUtil 2018-08-27 21:29:30 +01:00
md678685 3bf669c42a ItemDbProvider#resolve returns ItemData
More useful than just returning the Material.
2018-08-27 21:21:06 +01:00
md678685 cdc5f75fcb Remove unnecessary equals method on abstract ItemData 2018-08-27 21:19:36 +01:00
md678685 d74f19970b Strip out legacy ItemDb code, pt 1928371236123897 2018-08-27 21:19:15 +01:00
md678685 2ddde37771 Improve FlatItemData#equals 2018-08-27 21:02:27 +01:00
md678685 c1c422e03d Update items.json 2018-08-27 21:00:57 +01:00
md678685 7608b7d658 Merge branch '1.13' into 1.13-items 2018-08-27 20:01:48 +01:00
md678685 d1d5ae814f Merge branch '2.x' into 1.13 2018-08-27 20:01:01 +01:00
md678685 452fa61717 Change tryProvider test values 2018-08-27 19:58:19 +01:00
md678685 825f697fd2 Update items.json 2018-08-27 19:30:05 +01:00
md678685 4ea71ae88e Implement missing methods in FakeWorld 2018-08-27 14:10:06 +01:00
md678685 bdb32f5878 Bump Bukkit version to 1.13.1 2018-08-27 13:10:15 +01:00
md678685 e3c726b8f6 Log total loaded items on reload 2018-08-27 13:06:27 +01:00
md678685 96c6c7b1ca Add per-provider implementations of ItemData 2018-08-27 11:23:47 +01:00
md678685 634d62f9ef Fix typo in /kickall 2018-08-27 10:30:29 +01:00
md678685 2806156cf4 Add "allow-world-in-broadcastworld" option
Allows players to send broadcasts to a specified world by running `/broadcastworld [world] <message>` if enabled.

This is disabled by default in old configs to avoid confusion between updates.
2018-08-27 10:26:54 +01:00
md678685 e642192461 Kick players in /banip
The four-year-old to-do has finally been done!

Closes #2143.
2018-08-26 22:54:00 +01:00
md678685 959c788f22 Don't kick exempt players when running /kickall 2018-08-26 21:03:17 +01:00
montlikadani cda520589a Revert "Doesn't kick all players if the player has permission (#2145) @montlikadani"
This reverts commit 5c1db129d3.
2018-08-26 20:59:46 +01:00
montlikadani 5c1db129d3 Doesn't kick all players if the player has permission (#2145) @montlikadani
So, if a player has permission (eg, an operator or more), they will not kick them out because of permission.
2018-08-26 20:13:05 +01:00
Leomixer17 c718962426 Update messages_it.properties (#2144) @Leomixer17 2018-08-26 17:07:05 +01:00
Thomas 575a11b645 Updated "createKitSuccess=" (#2133) @DutchUser
* Updated "createKitSuccess="

They have the old one, its now in the "kits.yml" not in "config.yml"

* Update messages_da.properties

* Update messages_de.properties

* Update messages_es.properties

* Update messages_en.properties

* Update messages_et.properties

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Updated "createKitSuccess=

* Updated "createKitSuccess=

* Updated "createKitSuccess=

* Updated "createKitSuccess=

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Updated "createKitSuccess="

* Update messages_vi.properties

Going add the other later today, 

* invalidItemFlagMeta
* noJailsDefined
* openingDisposal
* socialSpyMsgFormat
* socialSpyMutedPrefix
* tempbanJoin
* whoisUuid

* Update messages_vi.properties

* Update messages_vi.properties @md678685

I have no idea why this whole file is in `\u` codes

* Update messages.properties @md678685
2018-08-26 16:12:13 +01:00
Xeyame f97c5fc1ff Make /realname configurable (#1952) @Xeyame
Closes #1810.

@md678685: I've added colour codes to the `realName` messages by default, which was not originally part of this PR.
2018-08-26 15:39:37 +01:00
montlikadani 81397d98b8 Added editable messages (#2072) @montlikadani
**If it is accepted then I will add it to the other message files.**
2018-08-26 15:17:07 +01:00
Leomixer17 82b2ff0b3f Update messages_it.properties (#2142) @Leomixer17 2018-08-26 15:13:33 +01:00
md678685 05fcb7b1aa Refactor to allow items to be added after first load 2018-08-25 18:38:50 +01:00
md678685 c79db98978 Add more debug logging to Settings (#2140)
Adds debug logging for `getChatFormat` and `getCommandCooldownEntry`, which makes it much easier to track down issues with group formats in EssentialsX Chat and command cooldowns respectively.
2018-08-25 18:09:08 +01:00
md678685 303aa77901 Add missing import 2018-08-25 16:55:12 +01:00
md678685 65a4ef7ee5 Use items that actually exist in tryProvider 2018-08-25 16:54:50 +01:00
md678685 1be7fbd8a6 Remove hash comment when rebuilding JSON database 2018-08-25 16:54:09 +01:00
Max Roncace 935b5cfe0f Fix unbreakable attribute for kits (#2071) @caseif
This PR fixes the `unbreakable` attribute on kit items. Previously, Essentials was exclusively using an internal Spigot method to set this on `ItemMeta` objects; however, this solution seems to be non-functional on more recent Spigot builds (1.12.2).

I have altered the `MetaItemStack#setUnbreakable` method to use the native Bukkit method, available for [some time now](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/d986a3f), by default. Essentials will still use the old solution as a fallback in case of an older Bukkit version which does not have native support for the attribute.
2018-08-25 11:33:17 +01:00
md678685 bad02729db Allow /eco take to subtract a user's exact balance 2018-08-24 15:42:17 +01:00
md678685 80f7ded687 SPECTATOR mode is safe for teleporting everywhere. (#2049)
Teleporting in spectator mode is as safe as creative mode for every target.
2018-08-24 15:24:26 +01:00
Max Lee f569b89d8f Round down balance when converting to double (#2135) 2018-08-21 23:45:58 +01:00
md678685 fec655a29c Implement ItemDbProviders, pt 7
Implement getStack and resolve for FlatItemDbProvider
2018-08-19 23:12:27 +01:00
md678685 610774b0b9 Remove default getStack implementation 2018-08-19 23:11:30 +01:00
md678685 9487665fae Use Bukkit PotionData instead of our own 2018-08-19 23:10:23 +01:00
md678685 d5b43b7162 Include JSON files in jar at build time 2018-08-19 23:09:02 +01:00
md678685 718d9d9d3a Initialise provider and file during first reload 2018-08-19 21:55:29 +01:00
md678685 3705dbdd2b Add items.json
TODO: should we auto-download from the CI on build?
2018-08-19 21:43:53 +01:00
md678685 c37d516980 Use MONSTER_EGG in SpawnEggRefl 2018-08-19 21:16:16 +01:00
md678685 b27a6b5b8e Add additional timer marks 2018-08-19 21:11:51 +01:00
md678685 98809fafd7 Strip out legacy ItemDb code, pt 4 2018-08-19 21:10:54 +01:00
md678685 dd9a0de98d Implement ItemDbProviders, pt 6 2018-08-19 20:58:45 +01:00
md678685 de2298cf0a Strip out legacy ItemDb code, pt 3 2018-08-19 20:58:23 +01:00
md678685 56fb8b06cd Add listNames to abstract ItemDbProvider 2018-08-19 20:55:56 +01:00
md678685 3b1eb683e1 Merge branch 'patch-20' into 2.x @montlikadani 2018-08-19 20:17:32 +01:00
md678685 1029305382 Implement ItemDbProviders, pt 5 2018-08-19 19:23:20 +01:00
md678685 9b39509e88 Misc changes 2018-08-19 18:30:44 +01:00
md678685 9da58dde5c Strip out legacy ItemDb code, pt 2 2018-08-19 18:04:13 +01:00
md678685 e2507d2ff1 Implement ItemDbProviders, pt 4 2018-08-19 18:03:53 +01:00
md678685 b867f121c9 Implement ItemDbProviders, pt 3 2018-08-19 17:49:34 +01:00
montlikadani 3c6a869336 Fix iron armor bug (#2054) 2018-08-19 16:57:14 +01:00
RikoDEV f357e76980 Small corrections in the Polish translation (#2103) 2018-08-19 16:56:16 +01:00
gb2233 946a1fbb7c Fixed unicode characters in HU locale (#2130) 2018-08-19 16:55:14 +01:00
Oliver Ni 37acdc18f2 Fix Easter egg config typo (#2124) @oliver-ni
Left clicking mobs with a milk bucket turns them into a baby, not right clicking.
2018-08-16 20:24:53 +01:00
Ali Moghnieh 4dc1d2c50e Merge branch '2.x' into 1.13 2018-08-16 17:47:37 +01:00
Aerodog ed72d117a5 Add {ONLINE} variable to custom join message (#2043) 2018-08-16 17:42:14 +01:00
md678685 a302913130 Clean up unused files 2018-08-15 20:08:22 +01:00
md678685 659f1a271a Merge branch '1.13' into 1.13-items 2018-08-15 19:51:35 +01:00
md678685 3fb4b7958d Strip out legacy ItemDb code, pt 1 2018-08-15 19:50:15 +01:00
md678685 3ef0f20b0d Add tipped arrows support on 1.9/1.10
On a side note, need to investigate why the potion provider is only needed on 1.10 and below - I don't remember what changed in 1.11?
2018-08-15 19:42:12 +01:00
md678685 340baa9703 Add IEssentials#getItemDbProvider method 2018-08-15 19:40:35 +01:00
md678685 0e9232ba81 Remove breaking import 2018-08-15 19:40:08 +01:00
md678685 299afdc6a1 Add V1_13_R1 to ReflUtil 2018-08-15 18:05:44 +01:00
md678685 04feed8524 Add 1.13+ spawn egg provider
Not sure how necessary this is, but I've done it anyway
2018-08-15 17:46:55 +01:00
md678685 773979cb37 Provide ItemDb provider with other providers
Provide providers to the provider that needs the providers. Provider provider provider provide provider.
2018-08-15 16:56:46 +01:00
md678685 c27d05fd4b Fix dependency on IdProvider 2018-08-15 16:40:01 +01:00
md678685 52d814f2cc Properly fix inaccurate playtime measurement
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/b848d8ce633871b52115247b089029749c02f579
2018-08-15 15:26:11 +01:00
md678685 5009b3b545 Revert "Fix playtime calculation"
This reverts commit 4e165d375c.
2018-08-15 15:15:30 +01:00
md678685 4e165d375c Fix playtime calculation 2018-08-14 19:29:28 +01:00
md678685 306f7a7872 Merge pull request #2119 from lagnat/1.13
Add missing methods for OfflinePlayer, FakeWorld, and FakeServer.
2018-08-14 19:20:21 +01:00
md678685 6c11569ac9 Merge branch '2.x' into 1.13 2018-08-14 18:58:06 +01:00
md678685 4be28ba193 Implement ItemDbProviders, pt 2 2018-08-14 18:57:47 +01:00
Steve Green a1e98f898b Add missing methods for OfflinePlayer, FakeWorld, and FakeServer. 2018-08-14 08:35:33 -04:00
md678685 c5376d3088 Implement ItemDbProviders, pt 1 2018-08-10 22:07:02 +01:00
md678685 3e1857b966 Add module for FlattenedProvider 2018-08-08 15:42:29 +01:00
md678685 b8a8232bc3 Wrap all constructScalar calls with reflection
Allows configs to function with both SnakeYAML 1.19 and 1.21.
2018-08-06 18:19:30 +01:00
md678685 504a7aef0f Add 1.13 mobs 2018-08-06 17:09:50 +01:00
md678685 1ddb1822ef Merge branch '2.x' into 1.13 2018-08-05 23:02:11 +01:00
md678685 d3cd4e356d Add missing OfflinePlayer 1.13 methods 2018-08-05 20:51:39 +01:00
md678685 bef440760a Remove deprecated economy libs and support
None of these economy plugins are supported any more, and removing these allows EssentialsX to be used as a dependency without locally `mvn install`ing the plugin.
2018-08-05 20:51:19 +01:00
Ali Moghnieh 768b92749f update bukkit to 1.13-R0.1-SNAPSHOT.
This commit just fixes compilation errors.
2018-07-29 17:39:32 +01:00
DoNotSpamPls 03b25a0f06 Set target to Java 8 (for 1.13) & update Maven plugins (#1922) @DoNotSpamPls
This is the same PR as the last one (PR #1823), but I messed that one up accidently, sorry for that!
2018-07-17 09:38:01 +01:00
md678685 a44775cafb Prevent users being duplicated in the ignore list
Fixes #2064, as well as alleviating the issue encountered in kangarko/ChatControl-Pro#627 for EssentialsX users.
2018-07-17 07:33:14 +01:00
montlikadani 187c4eb371 Update messages_hu.properties 2018-06-28 18:27:02 +02:00
montlikadani 49201b9945 Update messages_hu.properties 2018-06-28 17:48:27 +02:00
montlikadani 6225dc8ed1 Update messages_hu.properties 2018-06-21 14:39:25 +02:00
Brokkonaut aa622f8d27 SPECTATOR mode is safe for teleporting everywhere. 2018-06-18 23:38:54 +02:00
md678685 849efa9756 Merge branch '2.x' of https://github.com/EssentialsX/Essentials into 2.x-upstream 2018-06-15 19:44:45 +01:00
md678685 8aa764f69f Check whether nick equals "off" before formatting
Fixes #1910.
2018-06-15 19:41:56 +01:00
md678685 de57a8c602 Disable EssProtect emergency mode when Ess loads late (#1954)
Related: EssentialsX/Essentials#1951.
2018-06-15 19:21:18 +01:00
md678685 4873beb100 Allow updating the compass target to be optional (#1937)
If `compass-towards-home-perm` is enabled in the EssentialsX config, then the permission `essentials.home.compass` is checked before changing the player's compass target.

Closes #1918.
2018-06-15 19:20:06 +01:00
md678685 27d9f3725a Wrap constructScalar for SnakeYAML 1.21 (#2040)
In theory, fixes #1974, fixes #1975 and fixes #1976, and also means that
Spigot are free to upgrade SnakeYAML to 1.21 again when ready.
2018-06-15 19:18:55 +01:00
md678685 16b2c3dee3 Reset pending confirmations on login (#2033)
On login, resets any pending confirmations for the user. Fixes #2021,
closes #2023.
2018-06-15 19:09:27 +01:00
BaoKunVN 2ced9469d7 Vietnamese Translation (#1824) @BauKunVN 2018-06-13 21:23:00 +01:00
montlikadani 45c806128a Updated the messages_hu.properties file 2018-05-31 20:23:48 +02:00
md678685 3d60aa1747 Fix build errors (#2018)
Fixes build errors caused by the warp owner PRs (#1961 and #2017)
2018-05-28 12:21:23 -07:00
FlashLight34 967bb44d94 Update IWarps.java (#2017) @FlashLight34
Maybe the compilation fails because that :P
2018-05-27 07:33:37 +01:00
Xeyame 7298393ec9 Add permission to bypass other's msgtoggle (#1955) @Xeyame
* Add permission to bypass other's msgtoggle

Also thanks to MD for helping me with the code :)

* Correct comment

* Remove checking for console in favour of the already existing IUser check

* Fix comments, again

* Re add isIgnoreMsg() check

Accidently removed it, sorry

* Combine 2 checks
2018-05-26 20:43:31 +01:00
FlashLight34 817caf299f setwarp owner uuid in yml file (#1961) @FlashLight34
* Update Warps.java

its not a real change i dont know if user.getuuid() exist or onother possible cmd maybe

* Update Warps.java

* Update Commandsetwarp.java

* Update Warps.java

* Update Warps.java

* Update Commandsetwarp.java

* Update Warps.java

* Update Warps.java

* Update Commandsetwarp.java

* Update Warps.java
2018-05-26 20:42:51 +01:00
montlikadani 2ff29dab80 Update Commanddeljail.java (#2002) @montlikadani
When the user entered a word to delete the jail, deleted it, but removed anything because no jail existed.
2018-05-26 20:40:45 +01:00
Brokkonaut 030eb3375b Block ignite only for PvP, not for PvE (#1967) @Brokkonaut
Players with god mode enabled could not ignite mobs with bows while only igniting players should be blocked.
2018-05-26 20:34:31 +01:00
md678685 3237632eb4 Fix versioning of NMS modules (#1971)
Resolves numerous build errors that emerged in 613e852ffd and for some reason didn't cause a build error on ender.zone, but did everywhere else.

Fixes #1970
2018-05-18 01:23:20 -07:00
Joseph Hirschfeld b29f98c525 [Feature] Add world specific /back dest. perms (#1948) @Ichbinjoe
Adds world specific perms for whether a player may use /back to teleport
back to a given world. Adds logic to default
essentials.back.into.<world> permissions for loaded worlds to true to
maintain backwards compatibility.
2018-04-29 15:49:49 +01:00
Joseph Hirschfeld 70387f73f6 [Feature] Add config optn. to disable jail free tp
Adds the teleport-back-when-freed-from-jail configuration option. When
set to true (default), as with previous versions will teleport the
player which was jailed back to their previous position when freed. When
false, Essentials will not teleport the player anywhere, leaving them
where they are.

Closes #1947
2018-04-03 01:27:09 -04:00
Xeyame 7adb931ea8 Expand /exp command 2018-04-02 14:29:43 +02:00
md678685 b2a5280971 Avoid build version being overridden by Jenkins (#1936) 2018-03-29 14:19:19 -07:00
md678685 613e852ffd Implement new versioning as per #1873 (#1882) 2018-03-28 20:00:19 -07:00
Rodrigo Aguilar 823f1c2ee3 cancel-afk-on-interact and cancel-afk-on-move are now separate settings (#1804) 2018-03-26 00:50:42 -07:00
Trent Hensler 7d7c58fa7c Merge branch 'SupaHam-default-confirm-command-prompt' into 2.x 2018-03-26 00:37:08 -07:00
Trent Hensler a468ec5e08 Default setting to be enabled confirm commands by default with commented out list of possible options 2018-03-26 00:24:10 -07:00
Trent Hensler ce1e584266 Merge branch 'default-confirm-command-prompt' of https://github.com/SupaHam/Essentials into SupaHam-default-confirm-command-prompt 2018-03-26 00:19:23 -07:00
Minecrell ecd6c5f81a Avoid using ServerListPingEvent workaround on fixed Paper builds (#1925)
Fixes #1924

PaperMC/Paper#884 has been fixed in recent Paper builds (1368+),
which means the workaround is no longer necessary. Disable it when
running a fixed build.
2018-03-26 00:15:55 -07:00
md678685 61c1485083 Replace vanishedPlayers list with set (#1796)
* Replace vanishedPlayers list with set

Not sure if there is any particular reason to keep it ordered, but for now I've used a LinkedHashSet.

* Change return of new method from Set to Collection

Also makes return of old method an unmodifiable list, but this is just as breaking as just changing the method return type as far as I can see
2018-03-25 22:12:36 +01:00
Thomas D 9f6d0fa2d6 Update messages_nl.properties (#1888) @DutchUser
* Update messages_nl.properties

Changed English lines to Dutch.

* Update messages_nl.properties

* Update messages_nl.properties

* Update messages_nl.properties

* Update messages_nl.properties

* Update messages_nl.properties
2018-03-25 22:02:28 +01:00
RikoDEV 1c398f819e Update messages_pl.properties (#1901) @RikoDEV
Smaller corrections and supplementing the missing translations.
2018-03-25 21:39:14 +01:00
games647 c7000846cd Replace Reflection with setter implementation 2018-03-21 11:16:27 +01:00
Johnny Cao d3c4c2ba6a Fixes #1866 (#1867) 2018-03-20 21:51:16 -07:00
Max Lee 95ac4a4853 Extra permissions for /seen and /whois information (#735)
* Implemented separate permissions for seen extras

* Add an extra permission to the whois command too.
IPs are sensitive information that should only be accessible to an as small as possible amount of people
2018-03-20 21:50:42 -07:00
Luck 0d5da063fb Upload createkit configs to hastebin instead of GitHub Gist (#1916) 2018-03-20 21:42:12 -07:00
md678685 06f04b8fba Update issue template to match actual command (#1892)
Update the issue template to accommodate for the actual `/ess version` command's output.
2018-03-15 11:51:17 -07:00
games647 d24fbc9f55 Remove final modifier to fix illegal reflective access warning
Java 9 runtimes report warnings for reflective access on JRE
classes (in this case Field.modifiers). Future versions of Java
may deny the access completely.

Since we access our own code here, we could just remove the final modifier.
With it's current visibility (of private) it's unlikely that it will be
modified from somewhere else except our Settings class.
2018-03-13 16:46:25 +01:00
games647 7e40d13947 Update lombok and remove antrun to fix compiling with JDK9
* Lombok: Older version resulted in NoSuchFieldEx: pid (fixed since 1.16.8)

* JDK9 no longer has a tools.jar because of it's modular system, but ant is
no longer required. It was introduced in 3e9a2377a8
for GroupManager. Now GM is no longer maintained and removed in
    * 5ca02e6596 (calling the build.xml)
    * fa0bbde236 (removing the remaining module)
2018-03-13 16:06:39 +01:00
md678685 43e520a03e Update issue template for new version command 2018-03-07 07:56:03 +00:00
md678685 4e8e7bec3f Add /ess version subcommand (#1514) 2018-03-06 19:25:51 -08:00
md678685 fe7b6097c9 Fix kit reloading (#1855) 2018-02-17 09:42:58 -08:00
montlikadani 0d634853b6 Updated messages_hu.properties file (#1835) @montlikadani 2018-02-14 19:11:16 +00:00
Lucas2107 29b05eb167 Update messages_fr.properties (#1807) @lucas2107
* Update messages_fr.properties

New translations

* Update messages_fr.properties

* Update messages_fr.properties
2018-02-14 19:09:59 +00:00
Leomixer17 834454491e Update messages_it.properties (#1806) @Leomixer17 2018-02-14 19:08:56 +00:00
Jacek Maciejak a9a80b5766 Update messages_pl.properties (#1803) @RikoDEV 2018-02-14 19:08:37 +00:00
md678685 b21f42ee7c Update issue template 2018-02-13 15:29:57 +00:00
k-jiang d92884800b Fix #1799 locale not found in GeoIP2 database. Optimize code. Clean up old files. (#1817) 2018-02-11 23:44:59 +00:00
Lax e57d0e96e2 Proper version command. (#1838) 2018-02-10 21:45:25 -08:00
md678685 983f3a7935 Clear item in offhand slot in /clearinventory
GitHub fancy things: Fixes #950. Fixes #1426. Fixes #1834.
2018-02-10 16:03:56 +00:00
Trent Hensler 37dfd81cc9 EssentialsX invite link 2018-02-05 21:00:36 -07:00
Lax 05400429db Cancel target event on vanished players. Fixes #1809 (#1829) 2018-02-03 19:26:43 +00:00
Johnny Cao e4a8222d48 Fixes #1794: Hides error message if no MOTD present (#1811)
* Fixes #1794
2018-01-31 17:01:51 -08:00
Johnny Cao fb5ebdb0c2 Fixes #1637: Correctly handle /mail permissions (#1743) @AgentTroll
Fixes #1637

/mail stripped colors from the entire message before as reported by the issue. The desired fix was to only strip the color from the sent message rather than from the entire message format (e.g. prefixes coming before the message itself).

Fixed by formatting only the message before passing it to the localization.

Also had a minor issue with FormatUtil in which it failed to strip ampersand (&)-formatted color codes, which was amended by stripping both VANILLA_*_PATTERN as well as REPLACE_*_PATTERN in FormatUtil#formatString(...). It's not necessary to actualy strip any vanilla (i.e. section-prefixed) color codes since that's already done by FormatUtil#stripFormat(String), but I'd like to keep the changes as non-invasive as possible at the current moment.

Demo: git-Spigot-d20369f-7fc5cd8 (MC: 1.9) (Implementing API version 1.9-R0.1-SNAPSHOT)
https://streamable.com/umyi8

This is my first time contributing so please be gentle :)
2018-01-29 18:01:20 +00:00
Ali Moghnieh 1ef1cd98db Add default toggle for confirm commands in config.yml. 2018-01-28 17:23:43 +00:00
k-jiang d581f48cd1 Detect and update the old config.yml. Fixes #1783. (#1784) 2018-01-28 14:24:30 +00:00
md678685 752565b8f1 Add nickNamesOnlyColorChanges to messages files 2018-01-24 19:23:00 +00:00
md678685 8e61753894 Format prefixes and suffixes properly in Chat
Related: #1792
2018-01-23 08:32:55 +00:00
Trent Hensler ba35efd021 Properly check for empty set 2018-01-22 16:38:01 -08:00
Trent Hensler 09af6ad186 Don't add itemflags if none are present 2018-01-22 16:37:01 -08:00
md678685 16a496c706 Fix args order in GodStatusChangeEvent (#1790)
Fixes #1107
2018-01-22 21:01:12 +00:00
MD678685 71d50f4e1e Properly rename CommandDisposal 2018-01-22 14:56:17 +00:00
md678685 8a815b42d3 Fix disposal command class name
Fixes #1791.
2018-01-22 14:16:11 +00:00
Mitchell Cook d69e3a2f48 [Feature] Added disposal command. (#1729) @Mishyy
Added a portable disposal menu.

Closes #1721, and also closes #310.
2018-01-22 12:58:00 +00:00
md678685 e38b15531d Add jailList and noJailsDefined to messages and Commandjails (#1732)
* Add jailList and noJailsDefined to messages and Commandjails

* Sort message keys alphabetically
2018-01-22 09:20:31 +00:00
U-NIFLHEIM\Lax fcc7c3af78 Per-user toggles disabled by default 2018-01-21 18:40:13 -08:00
Taylor 5f7d226158 Merge pull request #17 from delbertina/mutes385test
Sorted messages files with the -f option and other tweaks ...
2018-01-21 17:02:26 -06:00
md678685 738efe8c50 Add Vault prefix/suffix support to EssXChat (#1663)
* Add Vault prefix/suffix support to EssXChat

Includes an example of how to use it in the config.
2018-01-21 01:37:30 -08:00
delbertina 0897ca57ff Removed redundant line in mute time try-catch. 2018-01-20 22:46:55 -06:00
k-jiang 938f94e130 Upgrade to GeoIP2, add db update. (#1748) 2018-01-20 19:29:48 +00:00
delbertina cfcdb47529 One last tweak. New line at the end of the fr file. 2018-01-18 22:04:35 -06:00
delbertina 76f845f5f4 More tweaks. Newlines and ordering switches. 2018-01-18 22:02:39 -06:00
delbertina c65b7b6462 Fixed error in sorting with number in message name and newlines at end of files. 2018-01-18 21:52:30 -06:00
Trent Hensler ace361af60 Compile against 1.13 preview.
Still a lot of work to do. One thing to note is that I used LEGACY materials in a few spots where I didn't know what the new ones are as I'm not very familiar with the 1.13 update and what it changes.
2018-01-18 17:52:44 -08:00
delbertina 67528b25a8 Sorted messages files with the -f option 2018-01-18 15:18:22 -06:00
Trent Hensler d4138ce843 Match default to what's in the config. Resolves #1775 2018-01-18 10:34:02 -08:00
Trent Hensler 377c716d52 Add itemflag support to kits. Resolves #795.
Syntax is "itemflags:HIDE_ATTRIBUTES,HIDE_ENCHANTS"
2018-01-18 00:26:40 -08:00
Trent Hensler cd43355d4c Move kits to kits.yml (#1774)
* Move kits to kits.yml
We will now use a separate kits.yml file.
Any kits that were defined in the config.yml will be migrated over to the kits.yml file automatically on startup.
2018-01-18 00:25:00 -08:00
CreedTheFreak b096ee9703 Merge remote-tracking branch 'delbertina/mutes385test' into final_mute_reason_issue#385
Merged changes into local branch for pushing up to the pull request of
mute reason.
2018-01-16 17:49:49 -08:00
delbertina 9e2bb0b277 Rebase with sorted messages 2018-01-16 19:27:45 -06:00
CreedTheFreak b8df59ae46 Updated the former pull request to include the specified formatting changes, and small edits to the hasMuteReason and Commandmute dealing with the muteReason. I also included the ability to see the mute reason from the seenOffline method which is identical to the seenOnline code. 2018-01-16 18:21:31 -06:00
delbertina 98f42c6974 Added reason stuff to msg command and deleted reference line in seen command. Oops! 2018-01-16 18:16:34 -06:00
delbertina db19788e21 Added 8 new messages for "...Reason" versions of mute messages and implemented em. 2018-01-16 18:16:33 -06:00
delbertina 67d17472e0 Fixed logic error in hasMuteReason and errors being thrown from seen and whois. 2018-01-16 18:04:22 -06:00
delbertina f68a6eb00d Added space before reason when a muted player tries to talk. 2018-01-16 18:04:22 -06:00
delbertina b5a6df4fe2 Added space when adding reason to string. 2018-01-16 18:04:21 -06:00
delbertina 290379651d Added space when adding reason to string. Dirty :/ 2018-01-16 17:59:14 -06:00
delbertina 6ffbb86169 Changed if else blocks to ternary operators. Not sure if way to avoid weird empty string usage. 2018-01-16 17:54:50 -06:00
delbertina d8b6f87087 Added method hasMuteReason in UserData. 2018-01-16 17:54:50 -06:00
delbertina 7aad95ec08 Changed muteFormat to muteReason.
Removed space at beginning of muteReason.
2018-01-16 17:54:49 -06:00
delbertina 574e1bc1e7 Fixed easy style issues. 2018-01-16 17:48:12 -06:00
CreedTheFreak 081c6f0263 Update plugin.yml mute command usage 2018-01-16 17:48:11 -06:00
delbertina fc590f82a2 Added check to display mute reason when notifying 2018-01-16 17:48:10 -06:00
delbertina 729af4bb4d Added mute format to all msg files 2018-01-16 17:48:09 -06:00
CreedTheFreak c8cb9b3735 fixed some wonky commit thing that happened, thus the following modifications are brought to you by Delbertina. 2018-01-16 17:21:54 -06:00
CreedTheFreak 4f8ea06db1 We have added the ability for the Mute to contain a reason, which is stored for the duration of the mute in the user's data file. Currently we need to add in the mute reason code into some other commands such as /afk and /me and /seen ect. We will also need to fix a problem with the reason when we dont add in a time frame for the mute, which should mute the player indefinatly rather then cancelling the mute and throwing a DataFormat exception. 2018-01-16 17:21:53 -06:00
CreedTheFreak 9378df0ff2 Started work on implementing the mute reason, and decided to write it to the UserData just like the Ban and TempBan reasons 2018-01-16 17:21:52 -06:00
Trent Hensler 1f0f77ff72 Merge pull request #1757 from SupaHam/fix-metaitemstack-keyword-replacer
Allow KeywordReplacer to input replacements with underscore spacers.
2018-01-16 15:12:45 -08:00
Trent Hensler 147c5e0ddf Merge branch '2.x' into fix-metaitemstack-keyword-replacer 2018-01-16 15:11:05 -08:00
DoNotSpamPls 1518db17f8 Delete .travis.yml (#1739) 2018-01-16 15:39:12 +00:00
Johnny Cao ef1e57f445 Performs pagination bounds check. Fixes #1509 (#1754)
Adds pagination bounds check Fixes #1509
2018-01-16 12:56:39 +00:00
Johnny Cao 87c6672212 Add ignore check for /me (#1768). Resolves #1767 2018-01-16 12:33:35 +00:00
Leomixer17 ab087e941e Update messages_cs.properties (#1760) @Leomixer17
Based on #1664 - thanks to @Uranusak for submitting the original PR.
2018-01-11 18:21:20 +00:00
Leomixer17 4f70d623a1 Update messages_pl.properties (#1759)
Includes translations by @RikoDEV.
2018-01-07 17:51:53 +00:00
md678685 ba143f8657 Move instructions to top of issue template
People weren't reading them when they were at the bottom, so they have been moved to the top to encourage people to read them. This has the tradeoff of filling up the Discord webhook embed, so I've added another instruction that doubles as proof of reading the instructions.
2018-01-07 14:55:25 +00:00
Ali Moghnieh b6aea0a5f8 Fix splash potion support for /potion. Resolves #1166 2018-01-07 02:22:31 +00:00
Drew Mitchell 50e2d27d5b Fix NPE in /clearinventory. Fixes #1755 (#1756)
Issue was a NullPointerException due to senderUser not being null-checked. I opted to place the couple of lines of code into the sender.isPlayer() check as opposed to null-checking.
2018-01-07 01:45:19 +00:00
Ali Moghnieh f0bf359df3 Allow KeywordReplacer to input replacements with underscore spacers.
Resolves #1725 and provides a less breaking fix for #1722.

----

Revert "Consume everything after lore as lore in MetaItemStack. Fixes #1722."

This reverts commit 5fa2ce7d9e.
2018-01-07 01:22:42 +00:00
Marten fd6717d06d Fixed a spelling mistake (#1752) @MartenM
Saw this when using the Dutch language file. Decided to update it.
2018-01-06 20:02:39 +00:00
Leomixer17 126046a039 Added missing translations (#1704)
* Added missing translations

* Update messages_da.properties

* Update messages_da.properties

* Update messages_de.properties

* Update messages_en.properties

* Update messages_es.properties

* Update messages_et.properties

* Update messages_fi.properties

* Update messages_fr.properties

* Update messages_hu.properties

* Update messages_ko.properties

* Update messages_lt.properties

* Update messages_nl.properties

* Update messages_nl.properties

* Update messages_pt.properties

* Update messages_pt_BR.properties

* Update messages_ro.properties

* Update messages_ru.properties

* Update messages_sv.properties

* Update messages_tr.properties

* Update messages_zh.properties

* Update messages_zh_HK.properties

* Update messages_zh_TW.properties

* Update messages.properties

* Update messages_da.properties

* Update messages_de.properties

* Update messages_en.properties

* Update messages_es.properties

* Update messages_et.properties

* Update messages_fi.properties

* Update messages_fr.properties

* Update messages_hu.properties

* Update messages_ko.properties

* Update messages_lt.properties

* Update messages_nl.properties

* Update messages_pt.properties

* Update messages_pt_BR.properties

* Update messages_ro.properties

* Update messages_ru.properties

* Update messages_sv.properties

* Update messages_tr.properties

* Update messages_zh.properties

* Update messages_zh_HK.properties

* Update messages_zh_TW.properties
2018-01-06 19:59:50 +00:00
seema84 6705513cb3 Add [world] to /tppos usage (#1744) 2018-01-03 20:39:12 +00:00
Leomixer17 28fb18b6c7 Added a missing translation to messages_it.properties (#1740) 2018-01-02 10:18:36 +00:00
Leomixer17 17bb5fe1da Update messages_it.properties (#1656)
* Update messages_it.properties

* Added missing translation

* Fixed double "="
2018-01-02 00:33:55 +00:00
md678685 3e908b9c01 Update issue template to give clearer instructions 2017-12-31 18:18:28 +00:00
Trent Hensler 8977425475 Merge pull request #1734 from N3FS/sort-messages
Sort messages keys alphabetically
2017-12-29 13:49:30 -06:00
Dylan Keir 8f92e3f217 Fix JDK9 issue (#1713) 2017-12-29 14:46:09 +00:00
md678685 f07f132cfd Sort messages keys alphabetically 2017-12-28 13:56:14 +00:00
CreedTheFreak 3444c8b0d6 Merge branch 'mute_reason_changes' into final_mute_reason_issue#385
Updating local changes made on mute_reason_changes into the final branch
2017-12-26 17:20:40 -08:00
CreedTheFreak 822315a279 Updated the former pull request to include the specified formatting changes, and small edits to the hasMuteReason and Commandmute dealing with the muteReason. I also included the ability to see the mute reason from the seenOffline method which is identical to the seenOnline code. 2017-12-26 16:09:46 -08:00
CreedTheFreak 732da86710 Merge remote-tracking branch 'magnarisa/final_mute_reason_issue#385' into mute_reason_changes
Updated a clean branch with the changes we have made so far.
2017-12-26 08:23:53 -08:00
CreedTheFreak 5fbc412542 Merge remote-tracking branch 'upstream/2.x' into final_mute_reason_issue#385 2017-12-26 08:16:46 -08:00
Trent Hensler cd7e0963ce Merge pull request #1724 from Drkmaster83/2.x
Implements PR#1516 - TPPos World-Teleport Permissions
2017-12-25 18:24:01 -06:00
Drkmaster83 9dc58948b2 Implements PR#1516 - TPPos World-Teleport Permissions
https://github.com/EssentialsX/Essentials/issues/1516
Considerations:
• TPPos on a target doesn't consider the target's world access permissions, reminiscent of the TP A to B command.
2017-12-25 01:08:08 -06:00
CreedTheFreak f0b262cbd5 Merge pull request #15 from delbertina/mutes385
Added 8 new messages for "...Reason" versions of mute messages
2017-12-23 22:13:57 -08:00
delbertina ff37ef3bc5 Added reason stuff to msg command and deleted reference line in seen command. Oops! 2017-12-24 00:03:36 -06:00
CreedTheFreak 68fab2c328 Merge branch 'mutes385' of https://github.com/delbertina/Essentials into final_mute_reason_issue#385
Testing PR Changes
2017-12-23 22:03:01 -08:00
CreedTheFreak f9d81c4302 Merge branch 'mutes385' of https://github.com/delbertina/Essentials into final_mute_reason_issue#385
Testing PR
2017-12-23 21:51:21 -08:00
Ali Moghnieh d16e67c51e Remove debug message. 2017-12-22 20:01:58 +00:00
Ali Moghnieh 5fa2ce7d9e Consume everything after lore as lore in MetaItemStack. Fixes #1722. 2017-12-22 19:50:33 +00:00
Ali Moghnieh 0a0c45238c Merge branch '2.x' of github.com:EssentialsX/Essentials into 2.x 2017-12-22 19:46:41 +00:00
delbertina 3d33bbc33d Added 8 new messages for "...Reason" versions of mute messages and implemented em. 2017-12-20 00:35:51 -06:00
Trent Hensler ea36ee37a2 Use correct value 2017-12-19 00:22:00 -08:00
md678685 a907dab432 Show tempban expiry on join. Fixes #1680
Outputs a different message with the expiry included.

Add unlocalised tempbanJoin to locale files

Outputs a different message with the expiry included.
2017-12-19 00:08:42 -08:00
CreedTheFreak 53c604c1b5 Merge pull request #14 from delbertina/mutes385
Fixed spacing
2017-12-18 18:53:57 -08:00
CreedTheFreak 2975118e5b Merge branch 'mutes385' of https://github.com/delbertina/Essentials into final_mute_reason_issue#385 2017-12-18 18:40:27 -08:00
delbertina e3ee9cb4c7 Fixed logic error in hasMuteReason and errors being thrown from seen and whois. 2017-12-18 20:37:34 -06:00
Francois Robinson 9a3b4db387 Added quotes to afk-list-name (#1696)
The custom text may not parse properly if the quotes are missing. By adding them to the default config, just like on lines `443` & `447`, it will discourage making the typo by mistake.
2017-12-18 16:40:59 +00:00
CreedTheFreak 297a616460 Merge branch 'mutes385' of https://github.com/delbertina/Essentials into final_mute_reason_issue#385 2017-12-16 23:48:27 -08:00
delbertina afe0ff0ca7 Added space before reason when a muted player tries to talk. 2017-12-17 01:46:43 -06:00
CreedTheFreak adf1bc291c Merge branch 'mutes385' of https://github.com/delbertina/Essentials into final_mute_reason_issue#385 2017-12-16 22:27:52 -08:00
delbertina 034ffbd0bc Added space when adding reason to string. 2017-12-17 00:16:06 -06:00
delbertina 127a7bb2ce Merge branch 'mutes385' of https://github.com/delbertina/Essentials into mutes385
Updated local copy
Conflicts:
	Essentials/src/com/earth2me/essentials/commands/Commandafk.java
	Essentials/src/com/earth2me/essentials/commands/Commandmail.java
	Essentials/src/com/earth2me/essentials/commands/Commandme.java
	Essentials/src/com/earth2me/essentials/commands/Commandr.java
	Essentials/src/com/earth2me/essentials/commands/Commandseen.java
	Essentials/src/com/earth2me/essentials/commands/Commandwhois.java
2017-12-17 00:02:52 -06:00
delbertina e8bfac0790 Added space when adding reason to string. Dirty :/ 2017-12-16 23:26:09 -06:00
CreedTheFreak 62d5dd3516 Merge remote-tracking branch 'magnarisa/final_mute_reason_issue#385' into final_mute_reason_issue#385
Updated my local repos for testing purposes
2017-12-16 19:43:56 -08:00
CreedTheFreak bcd66fec39 Merge pull request #12 from delbertina/mutes385
Address requested changes to formatting and logic
2017-12-16 19:40:27 -08:00
Trent Hensler cdabe4a46e Readme update 2017-12-14 12:30:13 -08:00
Trent Hensler 29bc7ca19e Update live support 2017-12-14 12:26:16 -08:00
Trent Hensler 36ee10a52b Add discord and update links in readme 2017-12-14 11:55:28 -08:00
Trent Hensler 1a820ad9b7 Initial removal of item IDs.
We do not rely on Bukkit's item ids anymore, though we still support them in commands via a mapping built off of the items.csv.
2017-12-12 22:06:25 -08:00
md678685 dcbc106e62 Fix powertools when clicking in air (#1657)
Should restore behaviour prior to #1534 and fix #1622.
2017-12-06 08:37:52 +00:00
Lax cdf777384e Add server logs to the issue template. (#1669) 2017-12-03 15:26:39 +00:00
delbertina 849b329213 Changed if else blocks to ternary operators. Not sure if way to avoid weird empty string usage. 2017-12-02 20:35:44 -06:00
delbertina d555c1b081 Added method hasMuteReason in UserData. 2017-12-02 19:46:46 -06:00
delbertina 43cbab37f0 Changed muteFormat to muteReason.
Removed space at beginning of muteReason.
2017-11-26 01:32:22 -06:00
delbertina 6f7af90488 Fixed easy style issues. 2017-11-26 00:55:05 -06:00
md678685 3a6f04e461 Fix Commandclearinventoryconfirmtoggle class 2017-11-15 18:17:29 +00:00
Marten d36f6e45de Added 4 messages to messages_NL (#1629)
Added 4 missing messages to the language file.
Only did those that were also found in the EN file.
2017-11-14 10:49:45 +00:00
Ali 'SupaHam' M f8ddb50140 Rename Commandclearconfirmtoggle.java to Commandclearinventoryconfirmtoggle.java 2017-11-13 12:46:15 +00:00
Ali 'SupaHam' M be076509f2 Implement clear confirmation (#1623)
Introduces:
- `clearinventoryconfirmtoggle` command with shorter aliases
- `confirmClear` boolean in UserData
2017-11-12 16:44:53 +00:00
Minecrell 73457453bb Avoid using reflection for things SnakeYAML supports directly now (#1634)
Fixes #1631 properly.

e7ebc94a9e added a workaround to the
SnakeYAML constructor to avoid errors when unknown properties are
used in the storage files. Back then, it was necessary to copy the
method to catch the exception thrown when an unknown property was
encountered.

However, SnakeYAML 1.12 (included in Spigot 1.6.2+) added a method
to ignore missing properties without overriding parts of the
SnakeYAML implementation.

Delete the old workaround and make use of
PropertyUtils.setSkipMissingProperties(true) to achieve the same
effect.
2017-11-10 18:01:29 +00:00
Ali Moghnieh 3091849ff8 Improve confirmPay documentation. 2017-11-04 11:41:26 +00:00
João Paulo 5136eb84f4 Update messages_pt_BR.properties (#1616) 2017-11-01 22:03:37 +00:00
Ali 'SupaHam' M c14d565b56 Support mail chat formatting via essentials.mail base permission. (#1611)
`essentials.mail.url`, `essentials.mail.color`, etc.
2017-10-29 01:16:04 +00:00
Ali 'SupaHam' M 57e87d9d4e Switch ci repository to ci.ender.zone. (#1610) 2017-10-29 01:11:28 +00:00
Ali 'SupaHam' M c1eccf499e Add Mirror link to README (#1598) 2017-10-22 18:11:43 +01:00
Ali 'SupaHam' M e5b76083b7 Change CI link to ci.ender.zone (#1597) 2017-10-22 18:04:39 +01:00
Azewilous a8d9139b6c [Feature] Added new property 'socialSpyMsgFormat'
This feature allows the user to alter the format in which a socialSpy direct messages is seen.
2017-10-22 14:32:17 +01:00
Jacek Maciejak 703186e931 Update messages_pl.properties (#1493) 2017-10-22 10:28:49 +01:00
Andronachi Marian e6fc459080 Update player activity on PlayerInteractEvent. 2017-10-22 10:25:49 +01:00
Francois Robinson 90feb9941f Fixed 'sumbol' typo in config.yml 2017-10-22 10:04:54 +01:00
Minecrell 2c4ff35796 Ensure LOGGER is not equal to plugin logger before setting parent (#1570) 2017-09-30 16:51:32 +01:00
Platinteufel 13ccabecf2 Update messages_de.properties (#1520)
* Update messages_de.properties

* Update messages_de.properties
2017-09-27 12:16:29 +01:00
CreedTheFreak fcda6c3b3b Merge pull request #11 from CreedTheFreak/final_mute_reason_issue#385
Update plugin.yml mute command usage
2017-09-17 15:39:01 -07:00
CreedTheFreak 910ef26c79 Update plugin.yml mute command usage 2017-09-17 15:36:06 -07:00
Taylor 1664da55a4 Merge pull request #10 from CreedTheFreak/commit_squashing
Final Implementation and the squasing of many commits
2017-09-17 16:55:14 -05:00
CreedTheFreak f8ea7f5e1f Implemented the ability to add a reason while muting a
player. The form of the mute is /mute [Player] [Time] [Reason] or /mute
[Player] [Reason] or /mute [Player] [Time] or /mute [Player]. These are
the various forms of the mute command and acts exactly like the old
command just with a reason.

The final adjustments to the MuteReason
2017-09-16 22:27:34 -07:00
md678685 ed5aa1f469 Alter config options for EssentialsX Spawn listeners (#1491)
* Add spawn-join-listener-priority setting
* Make "none" an option for priority settings
* Register each listener with separate priorities
* Add note to spawn-join-listener priority
    Warns about effect on spawn-on-join
2017-09-16 15:23:56 +01:00
Josh b34697040a Update spawner blockstates (#1536)
Fixes #1525.
2017-09-14 07:36:39 +01:00
delbertina b0205b9499 Added check to display mute reason when notifying 2017-09-03 23:02:56 -05:00
Taylor e05796f80e Merge pull request #4 from delbertina/msgs385
Added mute format to all msg files
2017-09-03 22:10:19 -05:00
delbertina a70fa78267 Added mute format to all msg files 2017-09-03 22:03:17 -05:00
CreedTheFreak e20693de60 Merge pull request #3 from CreedTheFreak/update_branch
Modifications Brought To you by Delbertina
2017-09-03 19:54:20 -07:00
CreedTheFreak f10a766442 fixed some wonky commit thing that happened, thus the following modifications are brought to you by Delbertina. 2017-09-03 19:49:57 -07:00
CreedTheFreak 86315fed8d Merge pull request #1 from CreedTheFreak/mute/jail_reason_issue#385
Mute reason issue#385
2017-09-03 14:46:40 -07:00
CreedTheFreak 4ff9fe8666 We have added the ability for the Mute to contain a reason, which is stored for the duration of the mute in the user's data file. Currently we need to add in the mute reason code into some other commands such as /afk and /me and /seen ect. We will also need to fix a problem with the reason when we dont add in a time frame for the mute, which should mute the player indefinatly rather then cancelling the mute and throwing a DataFormat exception. 2017-09-03 14:41:32 -07:00
CreedTheFreak 3512c4c8e6 Started work on implementing the mute reason, and decided to write it to the UserData just like the Ban and TempBan reasons 2017-09-02 20:04:25 -07:00
Luck 430f08b25f Add LuckPerms to "specialCasePlugins" in SuperpermsHandler (#1518) 2017-08-27 22:20:48 +01:00
md678685 f85170eea3 "1.7.10 is no longer supported" in README (#1512) 2017-08-24 12:34:01 +01:00
Lax 5a0ec91159 Link to new support IRC channel (#1511) 2017-08-24 12:33:43 +01:00
md678685 a049a03faa Catch NullPointerExceptions in SLPE (#1463)
* Catch NullPointerExceptions in SLPE
* Use the caught NPE's stacktrace
    Makes thrown exception actually useful
2017-08-21 10:40:23 +01:00
Ali Moghnieh 365ae356bd Format currency correctly by placing negative sign at beginning.
This is forcefully placed at the beginning of the formatted currency because of how `currency` message is customisable. Until a better solution arises this shall stay.
2017-08-19 20:11:21 +01:00
md678685 04755cee33 Fix version replacements and add version to config (#1492)
* Add version to newly created config files
* Fix version replacement in item map and messages
* Add EssX version number
2017-08-19 10:47:47 +01:00
md678685 e4fbe28f95 Add EssX version 2017-08-18 11:32:04 +01:00
md678685 1bc0768683 Fix version replacement in item map and messages 2017-08-18 11:24:29 +01:00
md678685 1f42e1e2c1 Add version to newly created config files 2017-08-18 11:24:04 +01:00
flcmc 91b2622ba2 Turn off god mode on login if player doesn't have the permission (closes #1445) (#1475) 2017-08-13 16:42:59 +01:00
flcmc eb341c0704 Make {player} referencing powertools activate only when the user has powertools enabled (#1474) 2017-08-13 16:03:46 +01:00
Leomixer17 09eecb1c3b Translated banJoin and banIpJoin (#1470) 2017-08-12 18:13:31 +01:00
flcmc 1562a8f3ca Implement tab completion for seen and whois. (#1440) 2017-08-12 14:42:57 +01:00
Ashazi 13fbd31124 Prevent flaming arrows damage from vanished and godmode players. (#1462) 2017-08-12 14:27:51 +01:00
Daniel Saukel 433ebe4a21 Fix a few GER translation issues (#1421) 2017-08-12 14:23:33 +01:00
Ali Moghnieh e5c7ba72e5 Add custom join ban messages. #420
blaze it
2017-08-12 13:46:27 +01:00
Ali Moghnieh 203d6561ac Allow unbreakable to not take any arguments, defaulting to true. Fixes #377 2017-08-07 14:05:20 +01:00
Florian CUNY 117704b0bc Added missing translations to messages_fr.properties (#1444)
Related to https://github.com/drtshock/Essentials/issues/1380
2017-08-07 13:25:03 +01:00
md678685 7958cd0b88 Add ability to click helmet slot to equip item. #960 2017-08-04 17:24:43 +01:00
Ali Moghnieh 51f2a04958 Fix import errors. 2017-08-04 16:26:57 +01:00
md678685 a27eb17684 Merge remote-tracking branch 'upstream/2.x' into 2.x-upstream 2017-08-04 12:09:03 +01:00
md678685 05d2b6ccda Fix 1.12.1+ NSME in /lightning 2017-08-04 12:08:55 +01:00
md678685 ec61ffcaad Fix 1.12.1+ NoSuchMethodError in /break (fixes #1438) 2017-08-04 12:08:40 +01:00
md678685 ed0ad87632 Use Paper's new ServerListPingEvent methods if present (#1436)
* Use Paper's new ServerListPingEvent methods if present
2017-08-04 12:00:25 +01:00
Adam Williams 4802744ce7 Spacing for antibuild place message in German (#1175)
#drtshock 2017-03-22 20:59:27 UTC
2017-08-04 00:47:06 +01:00
Uranusak adf7e22324 Update messages_cs.properties (#1216) 2017-08-04 00:43:07 +01:00
Esteban Juarez Rodriguez 09f63364dc Update of messages_es.properties (#1254)
Some of the current translations were modified and the new content was translated.
2017-08-04 00:41:50 +01:00
core.equip 8c256664b2 Fix escaping in german translation. (#1262) 2017-08-04 00:35:11 +01:00
EmanhMC 0354ffa4f8 Clarify java version requirements in README.md (#1299) 2017-08-04 00:28:41 +01:00
Leomixer17 d5f15b8283 Update messages_it.properties (#1316)
* Update messages_it.properties
2017-08-04 00:27:39 +01:00
NyanMeow c4009233a3 Update messages_zh.properties (#1330)
* Update messages_zh.properties
2017-08-04 00:25:09 +01:00
Leomixer17 e02bceaf5d Clarify mailClear deletion of mails (#1383)
* Update messages.properties
2017-08-04 00:11:47 +01:00
Kaleb M 8796dbeb56 [Fix] Essentials signs validity (#1402)
* [Fix] Essentials signs validity

Any sign in the format of &1[...] was a valid sign according to essentials, but 3rd party plugins with the same sign format would be treated equally (cancelling nearby explosions, etc)

Valid signs after this fix are:
- In the format of &1[...] as before
- Are essentials signs and enabled in the essentials config

* Revert "[Fix] Essentials signs validity"

This reverts commit 60d95b6585.

* [Fix - v2] Essentials signs validity

Any sign in the format of &1[...] was a valid sign according to essentials, but 3rd party plugins with the same sign format would be treated equally (cancelling nearby explosions, etc)
2017-08-04 00:09:12 +01:00
Florian CUNY fd63a7df4e [Feature] Added an option to spy chat messages from muted players (#1430)
Related to https://github.com/drtshock/Essentials/issues/1420
2017-08-04 00:04:42 +01:00
md678685 7fbc721db6 Fix usage of deprecated getTargetBlock (#1435) 2017-08-03 23:33:55 +01:00
Ali Moghnieh 210494d0d1 Support EntityPickupItemEvent. 2017-07-28 20:13:59 +01:00
Ali Moghnieh 9963476218 Write NMSVersion parsing special case for FakeServer. 2017-07-28 20:13:13 +01:00
md678685 50f2e7a95f Add a delay for sending the MOTD (#1396)
* Add delay-motd setting
* Move MOTD to Runnable
* Refactored according to comments
* Delay motd loading as well as sending
2017-07-28 19:20:44 +01:00
md678685 d7685dc1bc Add UUID to /whois (#1394)
* Add UUID to /whois

* Add untranslated English messages

I'm not sure whether "UUID" necessarily needs translating for most languages, but I've put it in all of them so that they can be translated if needed.

* Hi there o/
2017-07-15 18:38:09 +01:00
md678685 301a3a72df Check for essentials.warp.list permission on /warp tab complete (#1378) 2017-07-10 23:07:54 +01:00
CreedTheFreak 518a43db9c [Fix] Disallow muted players to use /r (#1375) 2017-07-09 15:17:07 +01:00
Ali Moghnieh 243e69649f Be more verbose in handleCrash(Throwable). 2017-07-03 14:24:43 +01:00
Ali Moghnieh 781204aa20 Trim comma separation in items.csv parsing. 2017-07-03 14:23:36 +01:00
md678685 9a714eb537 Add an issue template (#1362) 2017-07-03 04:14:58 +01:00
Ali Moghnieh d5cbfefc21 Set use-bukkit-permissions to true by default.
See #1356 for more information.

This change was made with the confident presumption that the use of built-in EssentialsX permissions is very very low compared to those who use feature-complete permission plugins.
2017-06-30 21:12:55 +01:00
Ali Moghnieh 12930cfce4 Return online players instead of nothing when tab completing. (Fixes #1331) 2017-06-29 03:41:13 +01:00
Ali Moghnieh 298c292ffb Amend items.csv to support potions in all items.
This commit makes use of 3fba6e9a which implements the ability to parse NBT in `items.csv`.
2017-06-29 03:30:35 +01:00
NJDaeger 341263b934 Removed null value from AbstractVaultHandler (#1327)
I'm in the process of writing a permissions plugin, and every time I try to talk it threw an error. The error was caused by this null value that was existing. I removed it and changed it to get the Player's world name. This should fix my error.
2017-06-24 15:41:51 +01:00
Ali Moghnieh 11a03bbce9 Add notify-player-of-mail-cooldown config option.
This feature allows for the ability to specify a cooldown for how often individual players are notified of their outstanding unread mails.
2017-06-22 22:54:51 +01:00
Ali Moghnieh 3831464665 Fix /condense functionality after 1.12. (#1298)
Prior to this commit `/condense` would return the first best item to condense an ItemStack into, with no consideration of better forms of condensation.

This commit adds a local variable `bestRecipes` which stores all the valid recipes and sorts through them for the best, then picks out the best. The best recipe is defined by a compare(o2, o1) where o1 and o2 are integers of the SimpleRecipe's input ItemStack amount.
2017-06-22 22:21:42 +01:00
Ali Moghnieh 2fe05b4ff4 Fix silent error when creating signs.
If the signFormatSuccess message is empty an error occurs silently that prevents the sign from being created from Essentials behalf. This commit tackles that issue by creating `getSuccessName(IEssentials)` and invoking it where possible to notify the console when this error occurs.
2017-06-19 05:18:33 +01:00
Ali Moghnieh ec3dc50e20 Fix typo in OfflinePlayer#setBanned(boolean). 2017-06-18 21:32:24 +01:00
Ali Moghnieh 171b2b6a37 Capitalise Parrot in Mob. 2017-06-18 21:00:02 +01:00
Ali Moghnieh 14a02c0602 Update to 1.12. :D
To the best of my knowledge ;)
2017-06-18 19:54:04 +01:00
Ali Moghnieh 34e3582557 Reorder items.csv based on item id (and date of creation). 2017-06-18 19:24:55 +01:00
Ali Moghnieh 01592e9770 Rename darkgreeysclay to darkgreysclay in items.csv. 2017-06-18 16:53:19 +01:00
Ali 'SupaHam' M 3fba6e9ad0 Add NBT support in items.csv (#1276)
This commit adds a new 4th column reading in `items.csv` to enable the ability to specify NBT data for newly constructed items.
2017-06-18 16:30:54 +01:00
Ali 'SupaHam' M bbe0ca9302 Implement tab completion for all commands. (#1282)
List of supported commands:
```
/afk
/balance
/balancetop
/ban
/banip
/bigtree
/book
/broadcastworld
/burn
/clearinventory
/condense
/delhome
/deljail
/delwarp
/eco
/enchant
/enderchest
/essentials
/exp
/ext
/feed
/fireball
/firework
/gamemode
/getpos
/give
/hat
/heal
/help
/helpop
/home
/ignore
/invsee
/item
/itemdb
/jump
/kick
/kill
/kit
/lightning
/list
/mail
/me
/msg
/mute
/near
/nick
/nuke
/pay
/potion
/powertool
/ptime
/pweather
/recipe
/remove
/repair
/sell
/showkit
/skull
/speed
/tempban
/thunder
/time
/togglejail
/tp
/tpa
/tpaall
/tpahere
/tpall
/tphere
/tpo
/tpohere
/tppos
/tree
/warp
/weather
/world
/worth```
2017-06-11 01:17:43 +01:00
Ali Moghnieh e572788a8c Disable /recipe for 1.12 until duplication bug can be fixed. #1289 2017-06-09 15:02:56 +01:00
Pokechu22 4c0857fbb5 Implement tab completion framework (#1203) 2017-06-06 01:31:41 +01:00
Pokechu22 44ed1e2d44 Add eclipse files to .gitignore 2017-06-06 01:08:34 +01:00
Ali Moghnieh 8fd532c648 Translate now instead of static "now" in DateUtil. 2017-06-04 20:57:06 +01:00
Ali Moghnieh 7c0fa46b4d Add playtime to /whois. #1212 Courtesy of @molor. 2017-06-03 09:31:53 +01:00
Ali Moghnieh 85d0644868 Readd messages from c28d749. 2017-05-31 14:19:18 +01:00
md678685 4bd3cffc4e Readd missing messages (#1271) 2017-05-31 14:05:18 +01:00
md678685 3ecebdc758 Add missing enable and disable functions to Metrics class (#1270)
* Replace mcstats with bStats

Won't show up on the bStats website, until @drtshock or someone else signs up and creates a Bukkit plugin named "EssentialsX" on the bStats website. If you want to test, you can change `pluginName` to `"EssXmdtest"`, or any other value as desired.

* Add missing enable and disable functions to Metrics class
2017-05-31 11:31:08 +01:00
md678685 f13e355010 Replace mcstats with bStats
Won't show up on the bStats website, until @drtshock or someone else signs up and creates a Bukkit plugin named "EssentialsX" on the bStats website. If you want to test, you can change `pluginName` to `"EssXmdtest"`, or any other value as desired.
2017-05-31 03:50:01 +01:00
Ali Moghnieh c28d749548 Create /tpacancel.
`/tpacancel` allows tp requesters to cancel sent requests before the target client can accept them. This aids in combatting long-lived tp requests in PvP environment.

`/tpacancel <player>` cancels all a tp request sent to <player> only.
2017-05-31 03:30:05 +01:00
Ali 'SupaHam' M d0760ddd04 Register SWEEPING_EDGE enchantment. Resolves #1263 2017-05-25 01:36:33 +01:00
Ali Moghnieh af5d2c2fca Remove Supervisor support.
This reverts commit 442d97a1b1, fcbd3deb6b, and 6231a25413.

Due to the lack of proper dependency deployment and availability users are unable to build EssentialsX without doing some manual installations. Until issue is resolved Supervisor support is dropped.
2017-05-04 13:55:18 +01:00
Ali Moghnieh 4bfabaa1d3 Check if getTeleportRequest() is null in /tpdeny. Fixes #1229. 2017-05-04 13:46:31 +01:00
Platinteufel 747420b4c8 Update messages_de.properties (#1091) 2017-02-12 09:52:20 -06:00
Maxetto 78b710dc22 Set PORTAL as an Unsafe Destination 2017-01-20 09:17:11 -06:00
vemacs 7973f544ff Revert "Fix broken add-prefix-in-playerlist behavior", as it seems to break more things for other users 2017-01-20 09:08:36 -06:00
vemacs 0b1e1676d0 Add iron nugget to items.csv (resolves #1049) 2017-01-17 21:55:35 -06:00
md_5 705c1c60c8 Fix erroneous usage of setAmount(0) on mirrored ItemStacks 2017-01-17 21:49:05 -06:00
vemacs abfec5a60f Revert "Fix getItemInMainHand behavior breaking /worth (#1053)" 2017-01-17 21:46:04 -06:00
vemacs ca28d8aa84 Fix getItemInMainHand behavior breaking /worth (#1053) 2017-01-05 12:13:08 -05:00
Maxetto 198d852995 Fix broken add-prefix-in-playerlist behavior 2017-01-04 11:48:01 -05:00
Ali Moghnieh 5f83766dc1 Implement player based toggle for pay confirmation prompts. Fixes #1032
This commit adds a new `/payconfirmtoggle` command with `/payconfirmon` and `/payconfirmoff` as well.
2016-12-25 18:08:16 +00:00
Ali Moghnieh 442d97a1b1 Add Supervisor to softdepend in plugin.yml.
Add SupaHam to authors list.
2016-12-18 15:58:58 +00:00
Ali Moghnieh fcbd3deb6b Exclude Spigot from Supervisor dependency. 2016-12-18 15:14:43 +00:00
Ali 'SupaHam' M dadc6b2d3a Implement confirmation dialogue for /pay. (#1002) 2016-12-18 15:03:03 +00:00
Ali Moghnieh 6231a25413 Initial implementation of Supervisor.
EssentialsReportContext provides all online players' userdata files if report level is 400 or higher, as well as config.yml if report level is over 200.
2016-12-18 15:00:22 +00:00
Ali Moghnieh bc08b11011 NOOP sendTitle in OfflinePlayer. 2016-12-18 14:17:16 +00:00
vemacs 36b08e9b1d Fix compile 2016-12-12 10:09:43 -06:00
vemacs d73ec779e0 Fix #1015 2016-12-09 19:11:04 -06:00
Ali Moghnieh 6bc9f2140c Catch Exception in Commandpay for payUser call. 2016-12-03 15:23:53 +00:00
Luke Anderson a6f1e305ef [Fix] When the minimum pay amount is zero, users are unable to pay zero. 2016-12-03 14:32:50 +00:00
Ali Moghnieh 5fda1d018b Add support for spawn_egg durability value in Minecraft 1.11. 2016-12-02 17:02:04 +00:00
vemacs c919eba206 Fix missing setVillager call 2016-11-28 17:25:29 -06:00
vemacs 61b3ca531c Fix build 2016-11-28 17:20:24 -06:00
vemacs 96164f5851 Restore basic pre-1.11 compat 2016-11-28 17:13:36 -06:00
Roy Curtis 4102b11f15 More items.csv fixes (#992)
* Adjust ID for beetroot soup from Pocket Edition ID (459) to Java ID (436)
* Fix two IDs for strength arrows
2016-11-27 17:53:39 +00:00
Ali Moghnieh 3c18efc4a6 Fix /tpaccept timing out requests too soon. 2016-11-23 13:41:11 +00:00
Roy Curtis cfc2b7ff2f Add 3rd column to Purpur Stairs items.csv entries
Purpur Stairs in items.csv are missing their data column. This breaks code that parses `items.csv` and expects a consistent number of columns.

For example, this breaks the Levitate command library: https://github.com/KennethWussmann/Levitate/blob/a8a57e95126ca62087a88a18c26ee7f1e846fe04/src/main/java/de/ketrwu/levitate/syntax/ItemStackSyntax.java#L94
2016-11-22 20:55:04 +00:00
Ali Moghnieh ad94cca95b Check for timeout in /tpa and /tpaccept. Fixes #818.
This commit adds a method called hasOutstandingTeleportRequest() in IUser - implemented fully in User.
2016-11-22 20:39:31 +00:00
Ali Moghnieh 6ade8132af Implement NOOP openMerchant(Merchant, boolean) in OfflinePlayer. 2016-11-21 18:11:40 +00:00
Ali Moghnieh e5b5994593 Disallow negative number input for /pay. 2016-11-21 18:05:17 +00:00
Ali Moghnieh 944ddf8d70 Further changes for 1.11 update.
- Dropped usage of deprecated methods for a cleaner future.
- Zombies no longer throw errors in SpawnMob due to setVillager(false).
- Removed MobData where they have been replaced with actual entities.
2016-11-20 20:23:01 +00:00
Ali Moghnieh 8b0659a2b4 Update to 1.11.
- Support new enchantments.
- Support new mobs.
- Rename MobData WHITHER_SKELETON to WITHER_SKELETON.
- implement NOOP methods of new API methods for fake classes.
- Amend item dictionary.
2016-11-20 16:03:56 +00:00
Ali Moghnieh 35388c3b19 Add spawn-on-join examples in config.yml. 2016-10-30 13:47:56 +00:00
Ali Moghnieh 27ab90ab2a Improve spawn-on-join with ability to specify groups. 2016-10-30 13:29:21 +00:00
vemacs d41af02ade Fix cache invalidation when resetting user 2016-10-14 08:25:53 -04:00
vemacs e0a578d06c Fix #857 2016-10-12 12:35:25 -05:00
Trent Hensler db47460a79 Too much http 2016-09-08 13:07:13 -07:00
Trent Hensler a1bcbdc181 Remove ess3 repo and use our own. 2016-09-08 12:58:39 -07:00
NDGAM3R d1dda6a166 Add normal fire resistance potion to items.csv (#875) 2016-09-05 22:28:51 -05:00
Trent Hensler 7290dbc5a5 Merge pull request #861 from Markersx/fix-version
[Fix] Versions
2016-08-31 10:28:44 -07:00
Mark 8bc47c45a4 Fix version EssentialsXMPP 2016-08-30 19:31:09 -07:00
Mark 1f5b659f2d Fix version EssentialsSpawn 2016-08-30 19:30:42 -07:00
Mark a591dba8ef Fix version EssentialsProtect 2016-08-30 19:30:13 -07:00
Mark 85d6c836a8 Fix version EssentialsGeoIP 2016-08-30 19:29:45 -07:00
Mark 7498a5f983 Fix version EssentialsChat 2016-08-30 19:29:07 -07:00
Mark 63b5068591 Fix version EssentialsAntiBuild 2016-08-30 19:28:37 -07:00
Trent Hensler c54da35a39 Fix version 2016-08-29 18:44:55 -07:00
Trent Hensler 6789e5c0de Merge pull request #850 from md678685/patch-1
Remove extraneous + from Commandfly
2016-08-29 18:15:50 -07:00
md678685 1fed66d652 Remove extraneous + in Commandfly 2016-08-27 10:01:26 +01:00
Faris Rehman f42904e5ae Add FlyStatusChangeEvent (#835) 2016-08-26 21:45:38 -05:00
Ryan 58828d7924 Don't force player out of vehicle on teleport. Fixes #582 (#833) 2016-08-26 21:29:22 -05:00
md678685 ee64f7c4ff [Fix] Remove vanished players from server list ping (#837) (#841)
Add listener for ServerListPingEvent and remove any vanished players.
Also refactored EssentialsPluginListener serverListener to
pluginListener
2016-08-26 21:27:52 -05:00
Nathan Guedes 3c0424226e Update messages_pt_BR.properties. (#778) 2016-08-20 21:16:13 -04:00
Ryan dd226dfdcf Implement MuteStatusChangeEvent. Fixes #819 (#832) 2016-08-20 21:13:26 -04:00
Ryan 16e05cc17b Remove double locale set call. (#826) 2016-08-19 09:23:44 -04:00
Blinky™ 13bceb9f5d Update Vault repo 2016-08-17 14:41:00 -06:00
Ali Moghnieh 03c652cd55 Fix command cooldowns command matching. 2016-08-07 15:58:34 +01:00
Ali Moghnieh 00301b26e6 Add debug for command cooldowns. 2016-08-06 17:53:24 +01:00
Ali Moghnieh 611429b6f6 Use afk player-list name in User#setDisplayName(). 2016-08-06 17:45:54 +01:00
Platinteufel 34979c8e84 Update messages_de.properties 2016-08-05 02:25:00 +02:00
Ali Moghnieh 3a6da5cd26 Add 1.10 blocks and Polar Bear egg entries in items.csv. 2016-08-04 17:41:14 +01:00
Ali Moghnieh 9c18b94ec8 Fix shulkeregg entries in items.csv 2016-08-04 17:19:39 +01:00
Ali Moghnieh 5187be5d02 Set default currency-symbol-format-locale to US locale. 2016-08-04 16:38:31 +01:00
Nathan Guedes 1c009e1ebc Update messages_pt_BR.properties.
Translate the last lines that was in english and a line in european portuguese.
2016-07-28 23:57:33 +01:00
Ali Moghnieh 8927fe9ea9 Remove isHidden() check for idling kick. Resolves #773 2016-07-28 19:58:04 +01:00
Ali Moghnieh 63b5cb9ec7 Add prefix/suffix toggle for playerlist. Resolves #771
This commit adds two new configurable options:
- `add-prefix-in-playerlist`: enable prefix in playerlist
- `add-suffix-in-playerlist`: enable suffix in playerlist

These were added to prevent very long names in the playerlist.
2016-07-28 17:17:26 +01:00
Ali Moghnieh 30d5fbdf8d Revert "Add mending enchantment to serializer."
This reverts commit 743ac51c4c.
2016-07-28 16:57:06 +01:00
Ali Moghnieh 5960f55339 Fix banner/shield deserializer with PatternType. 2016-07-26 22:03:33 +01:00
Ali Moghnieh 743ac51c4c Add mending enchantment to serializer. 2016-07-26 22:02:50 +01:00
Ali Moghnieh 2493c655f8 Create /paytoggle command. Resolves #413 2016-07-26 16:23:34 +01:00
Ali Moghnieh f1d9cda5eb Create allow-bulk-buy-sell config option. Resolves #765. 2016-07-26 12:25:20 +01:00
Ali Moghnieh a76b20f1b5 Display time since AFK in /whois. Resolves #761.
This commit adds a getAfkSince() method to IUser.

This commit adds a whoisAFKSince message which is sent when a player is AFK, it follows the same format as whoisAFK which is still used. whoisAFK remains unchanged but is sent only when the player is not AFK.
2016-07-26 01:36:29 +01:00
Ali Moghnieh 017082c07a Check recipient socialspy exempt during PMs. Resolves #166 2016-07-25 13:10:06 +01:00
Ali Moghnieh 352c92b880 Implement Shield item serialization. 2016-07-25 12:06:24 +01:00
Ali Moghnieh 948cce4ceb Remove whitespace before colon in SocialSpy broadcast. 2016-07-23 14:59:20 +01:00
Ali Moghnieh 6fe87184ae Add socialSpyPrefix message. 2016-07-23 00:30:49 +01:00
Ali Moghnieh c4c303dbfb Don't socialspy broadcast raw /msg and /r. 2016-07-23 00:09:18 +01:00
Ali Moghnieh 87adbb477d Allow bulk buy/sell when sneaking. Resolves #65 2016-07-22 23:56:26 +01:00
Ali Moghnieh 3245ce10ac Prevent multiple tpa requests in a row. Resolves #59 2016-07-22 20:51:47 +01:00
Ali Moghnieh 5540683013 Remove +180 on yaw in . 2016-07-22 16:26:56 +01:00
Ali Moghnieh 75d1254dda Implement better PM social spy. Resolves #27 2016-07-22 15:52:53 +01:00
Ali Moghnieh 83b944eb4b Use User#isAuthorized() instead of Player#hasPermission(). 2016-07-22 15:33:26 +01:00
Ali Moghnieh 6cbb8c846b Make old /createkit toggleable in config. 2016-07-13 23:25:20 +01:00
Ali Moghnieh e0d69d05eb Format {UNIQUE} in KeywordReplacer. 2016-07-13 22:54:52 +01:00
Ali Moghnieh 4f971ad8e5 Change /createkit functionality.
/createkit pastebins the current inventory into gist.github.com and returns a URL with the kit code.
2016-07-13 22:43:20 +01:00
Ali Moghnieh fa59a3f65c Fix up messages_pt_BR.properties. 2016-07-13 22:08:19 +01:00
Ali Moghnieh 8d921d78c5 AHHHH it's Hydra! 2016-07-13 22:04:44 +01:00
Ali Moghnieh 953e44c4a4 Remove the HEAD! 2016-07-13 21:53:46 +01:00
MisterSanglad b664159231 Update messages_fr 2016-07-13 14:32:17 +02:00
Ali Moghnieh 5867cd2e1b Merge branch '2.x' of github.com:drtshock/Essentials into 2.x 2016-07-12 20:39:09 +01:00
Ali Moghnieh 535fb43915 Format {UNIQUE} in custom join message. 2016-07-12 20:36:55 +01:00
Blinky™ 0952115776 Switch to transparent images for our dark mode users 2016-07-12 11:12:01 -06:00
Ali Moghnieh 79401c3cf7 There's a reason we test code. Thanks, hobbit! 2016-07-12 00:46:08 +01:00
Ali Moghnieh 0ab9f04ea4 Document no-god-in-worlds feature usage in code. 2016-07-12 00:03:08 +01:00
Ali Moghnieh 04f14285e7 Directly teleport Player in EssentialsSpawn when joining. 2016-07-11 15:12:47 +01:00
Ali Moghnieh 2a2aef53fb This is the real fix for MessagingTests. 2016-07-11 00:47:25 +01:00
Ali Moghnieh 3651e672d4 Fix MessagingTest units. 2016-07-11 00:43:43 +01:00
Ali Moghnieh 9dfa650d7e Merge branch 'create-afk-message' into 2.x 2016-07-10 22:47:54 +01:00
Blinky™ a0a166b553 Properly align logo 2016-07-10 14:38:21 -06:00
Blinky™ e7f4b46de8 Bold logo font 2016-07-10 14:25:02 -06:00
Blinky™ b5148cd0ec Update logo in readme 2016-07-10 14:23:36 -06:00
Ali Moghnieh e90b0c28c6 Disallow mute players and unauthorized players from setting AFK message. 2016-07-10 20:27:48 +01:00
Ali Moghnieh 3a439bcdb5 Merge branch '2.x' into create-afk-message 2016-07-10 19:56:23 +01:00
Ali Moghnieh 23e8498b47 Clear trailing whitespaces in ISettings and Settings. 2016-07-10 17:58:15 +01:00
Ali Moghnieh c9f1b0fdc5 Add the option to disable disabled-sign name protection. (#699)
This allows EssentialsX users to use other plugins that provide signs such as [Kit] and not have EssentialsX interfere with the final sign name.
2016-07-10 17:45:43 +01:00
Ali 'SupaHam' M 19f6510840 Create VanishStatusChangeEvent. (#661) 2016-07-10 09:09:53 -06:00
vemacs 0a1feaf044 Fix Vault-based permission logging (forgot after refactor) 2016-07-09 18:42:42 -06:00
Guilherme Penedo 890c32949d Updated and changed most of the pt translation 2016-07-08 13:53:49 +01:00
Dima Melikhov 8b37bb5bd7 Update messages_ru.properties 2016-07-07 20:52:43 +01:00
Guilherme Penedo 1aff0c2dcb Update messages_pt_BR.properties
Fixed special characters, spelling mistakes, (some) gramatical mistakes. Added invalidBanner and commandCooldown messages
2016-07-07 20:34:19 +01:00
Nathan Guedes a7f137d122 Update messages_pt_BR.properties with corrections in accents, spaces, commas and dots. 2016-07-07 19:12:06 +01:00
Benjozork 148fa7d6da Fixed french translations 2016-07-07 18:13:35 +01:00
Ali Moghnieh 20594d2523 Add essentials.commandcooldowns.bypass permission. 2016-07-07 17:24:28 +01:00
Ali Moghnieh 142315140e Implement NOOPs in OfflinePlayer instead of throwing exceptions.
This resolves issues like #721.
2016-07-07 16:58:44 +01:00
Ali Moghnieh 8d3d2ebd50 Enable longer display names/player list-names feature
For 1.8 servers and above.
2016-07-07 04:59:09 +01:00
Ali Moghnieh e674056b3a Create NMSVersion for better backwards compatibility. 2016-07-07 04:45:27 +01:00
Trent Hensler 785bd5bfcf Merge branch 'SupaHam-custom-currency-formatting' into 2.x 2016-07-06 15:44:37 -07:00
Ali Moghnieh fb72555e6b Merge branch '2.x' into custom-currency-formatting 2016-07-06 21:22:23 +01:00
Ali Moghnieh 42f4d43682 Make _isNpcsInBalanceRanking private. 2016-07-06 21:22:13 +01:00
Ali Moghnieh caeb59ede4 Merge branch '2.x' into custom-currency-formatting 2016-07-06 21:21:24 +01:00
Ali Moghnieh 992ef5dc91 Add npcs-in-balance-ranking configurable option. Resolves #716. 2016-07-06 19:34:25 +01:00
Ali Moghnieh d37433e81c Merge branch '2.x' into custom-currency-formatting 2016-07-05 18:46:01 +01:00
vemacs d75e0ce26e Use string comparison for gamemode, fixes #703 2016-07-02 12:00:31 -06:00
Ali Moghnieh 09acbcdb05 Implement Command Cooldowns. Resolves #110 2016-06-30 12:52:28 -07:00
Ali Moghnieh 864dadab80 Add debug message in EssentialsSign. 2016-06-27 21:46:32 +01:00
Ali Moghnieh d174cea42e Do not apply starting balance for NPCs. Resolves #191
NPC balances are usually banks e.g. Factions plugin depending on EssentialsEco to provide economy functionality for the Faction.
2016-06-27 21:45:31 +01:00
Ali Moghnieh e95fad0453 Don't list NPCs in /baltop output. 2016-06-26 22:10:36 +01:00
Ali Moghnieh ebe6abd885 Make /tp parse arguments as double instead of integer. 2016-06-26 15:25:52 +01:00
Ali Moghnieh 0a563b91a2 Create teleport-to-center configuration option.
This option toggles whether essentials should rounds all teleportations off to the center of the block.
2016-06-26 15:21:35 +01:00
vemacs 5cbcd7469b Nullcheck user iteration in EssentialsTimer (fixes #675) 2016-06-25 09:47:06 -06:00
Ali Moghnieh dabcb51034 Allow colour codes in nickname-prefix. 2016-06-24 11:24:54 +01:00
Ali Moghnieh 0237d485bf Merge branch '2.x' into custom-currency-formatting. 2016-06-20 12:55:31 +01:00
Ali Moghnieh b673630a7e Implement spawn-on-join configuration.
Admins can now specify whether all joining players should be teleported to the user's group spawn when joining the server. Players can be assigned the essentials.spawn-on-join.exempt permission to become exempt from this feature.
2016-06-19 21:07:45 +01:00
Ali Moghnieh 282ec81af1 Implement configurable currency formatting.
This commit enables users of different countries around the world to configure currency formatting displayed to users in a familiar manner.

Prior to this commit US formatting (symbols) was forced upon users. This is now configurable via locale values e.g. en-US, de, fr-ch.

This commit adds two new configurations:
- currency-format
- currency-symbol-format-locale

One method ISettings#getCurrencyFormat()
2016-06-19 20:03:54 +01:00
Ali Moghnieh a267fb16b8 Ignore flight check on spectator mode.
If a player is in Spectator mode, we should not interfere with their flight. This is an extension to the already existing creative mode check.
2016-06-19 03:33:48 +01:00
Ali Moghnieh 795ffec8b8 Remove trailing space. 2016-06-18 21:38:20 +01:00
Ali Moghnieh dba9dab985 Make UserBalanceUpdateEvent's new balance mutable.
This commit makes it reliable to modify user balance from within events.
2016-06-18 18:33:51 +01:00
Ali Moghnieh abfa815cf1 Add space in userAFKWithMessage in messages_nl. 2016-06-18 18:21:36 +01:00
Ali Moghnieh 872b25e0c5 Merge branch '2.x' into create-afk-message 2016-06-18 18:20:45 +01:00
Ali Moghnieh 3fa810e329 Add space in userAFK messages_nl.properties. 2016-06-18 18:14:59 +01:00
Ali Moghnieh 4951c4822e Rename userIsAwayWithReason and userAFKWithReason to userIsAwayWithMessage and userAFKWithMessage respectively. 2016-06-18 17:54:21 +01:00
Ali Moghnieh 5842b5f51d Implement AFK messages.
This commit makes it possible for players to set an afk message to detail their reasoning for being away to other players. This can be especially useful for the /msg command; instead of replying the user is afk, it will specify why they are afk so the sender can act further on that information.

Two methods have been added to IUser: getAfkMessage() and setAFKMessage(String).

All locale files have two new messages: userAFKWithReason and userIsAwayWithReason. They all use the messages that do not have the suffix WithReason, i.e. userAFK and userIsAway. Furthermore, the userIsAwayWithReason will not utilise the second parameter, the reason, to prevent spam and unnecessary text in global chat. However, the second parameter ({1}) is available for use in userIsAwayWithReason. userAFKWithReason, which is sent to /msg senders, does use the {1} as it controllable spam by the command sender themselves.

/afk usage is now: /afk [player/message...]
2016-06-18 17:44:17 +01:00
Ali Moghnieh ac4a1565a1 Implement empty OfflinePlayer methods instead of NSY exceptions. 2016-06-18 14:08:58 +01:00
Ali Moghnieh 203e8b0a75 Broadcast mute notify with mute duration if present.
This commit adds a new locale message code muteNotifyFor, which takes three parameters: muter, muted, duration.
2016-06-18 14:00:51 +01:00
Ali Moghnieh c75594f314 Fix piston bug with AntiBuild.
Prior to this commit, BlockPistonRetractEvent#getRetractLocation() was being used, which is now deprecated after 4 years of when this code was written.
2016-06-18 04:08:15 +01:00
vemacs 690dbea924 Fix compile 2016-06-12 09:25:14 -06:00
vemacs e7c81504a9 Force legacy spawn egg provider for 1.8.x due to client rendering bug 2016-06-12 09:23:25 -06:00
vemacs fdd5bc5a8e Use more cached methods 2016-06-10 07:44:16 -06:00
vemacs 91bebabc7f Add polar bear spawning support 2016-06-09 20:19:59 -06:00
vemacs 5eec83f726 Remove old spawn egg providers in favor of reflection-based implementation 2016-06-09 19:25:45 -06:00
vemacs 827891f10a Add reflection based spawn egg provider 2016-06-09 19:18:07 -06:00
Trent Hensler f4fa24cd7f Build against 1.10 2016-06-09 10:07:22 -07:00
vemacs 2bf1f24db2 Update spawn egg provider to 1.10 2016-06-08 20:33:03 -06:00
Blinky™ 34c6155fe9 Update build instructions 2016-05-21 14:46:49 -06:00
vemacs 3ead31ef14 Update human name 2016-05-21 14:43:36 -06:00
vemacs d0ea32dfa1 1.9.4 spawn egg support 2016-05-21 14:15:07 -06:00
Trent Hensler 7c1a0ed719 Fix elytra wing item id. Resolves #578 2016-04-17 12:41:51 -07:00
Taybosquee b050b13aa3 Add 1.9 entries to item.csv 2016-04-10 11:32:25 -06:00
vemacs 60548e4523 Cleanup 2016-04-01 20:52:20 -06:00
vemacs 8fe002f820 Fix giving normal water bottles for 1.9 2016-04-01 20:50:03 -06:00
vemacs 65a2e942c4 Attempt fixing kit/createkit for splash potions in 1.9 2016-03-31 11:54:19 -06:00
Trent Hensler 4adb59ab98 Don't make artifact for GM 2016-03-29 17:09:22 -07:00
Trent Hensler fa0bbde236 Not more distributing groupmanager. 2016-03-29 16:59:36 -07:00
vemacs e5b1e6c0ad Stick override annotation 2016-03-28 19:51:16 -06:00
vemacs 731455649e [Experimental] Attempt supporting lingering potion type by passing it through 2016-03-28 19:38:53 -06:00
vemacs ec1215b227 Restore 1.8 compatibility 2016-03-28 17:42:33 -06:00
vemacs dcb14170b9 Fix meta setting (works for 1.9) 2016-03-28 17:31:25 -06:00
vemacs c266778c1e [Likely breaks 1.8 compatibility, will be fixed] Use non-deprecated methods 2016-03-28 17:21:57 -06:00
vemacs 8116ce39d7 [Experimental] Attempt restoring potion effect ID compatibility to 1.9 2016-03-28 16:54:17 -06:00
vemacs 8167002092 Fix compile 2016-03-28 10:36:02 -06:00
Trent Hensler 5cddb84a58 Update travis 2016-03-27 11:16:54 -07:00
Literallie a9e41841e9 Fix that annoying extra "6" in German /mem
This has been bothering me and my staff forever, it's just that there's an extra number 6 in front of the word "entities" in the German translation of /mem. This commit fixes that issue by prepending that with a section sign so it gets correctly interpreted as color code.
2016-03-25 17:50:50 +01:00
Trent Hensler 37f6deab85 Add children for gamemode perms so super perms work correctly. Solves #156. 2016-03-23 18:08:22 -07:00
vemacs a4aa6a22b7 Fix compile 2016-03-18 10:19:16 -06:00
vemacs d57f7af453 Fix compile 2016-03-18 10:18:13 -06:00
vemacs 7f8c801c07 Throw some more unsupported ops 2016-03-11 17:44:14 -07:00
vemacs c627b26f49 Fix compile 2016-03-11 17:39:10 -07:00
vemacs 7c788dfa31 Switch back to CI 2016-03-11 07:58:29 -07:00
vemacs 3896b27c54 Update README 2016-03-10 16:20:17 -07:00
vemacs 97561667a0 Java 7-ize this class 2016-03-10 12:36:57 -07:00
vemacs bdb81123d6 Refactor spawn egg provider to separate classes 2016-03-10 09:28:08 -07:00
vemacs f1c57371a3 Refactor providers to a generic implementation in preparation for future spawn egg APIs 2016-03-10 08:54:07 -07:00
vemacs 873f9404bf Restore old inventory clear behavior for 1.9 2016-03-08 18:07:04 -07:00
vemacs 7eac272386 Fix clone(), formatting tweaks 2016-03-08 17:44:57 -07:00
Trent Hensler e6d177c09a Revert "Don't require extra argument to see armor with invsee. Resolves #472."
Handling this with armor and without NMS isn't clean. Advise using OpenInv if players want extended capability.

This reverts commit 6eb63fd3fd.
2016-03-08 15:38:50 -08:00
vemacs 65f2051e87 Add spawn egg NMS for 1.9 2016-03-08 12:28:23 -07:00
vemacs 767abe83f9 Fix giving spawn eggs in 1.9 (use SpawnEgg API) 2016-03-08 12:12:21 -07:00
Trent Hensler 6eb63fd3fd Don't require extra argument to see armor with invsee. Resolves #472.
Before, you had to do  to see armor. Now it just adds it if you have the permission.
2016-03-07 15:37:42 -08:00
Trent Hensler 03c59a9f17 Remove outdated netbeans styles. 2016-03-07 11:45:29 -08:00
Trent Hensler 3fd925c1fd Use proper AFK toggle to make test pass. 2016-03-07 11:19:16 -08:00
Trent Hensler 6ea8f7b621 Update vault version.
This solves the issue of trying to resolve old dependencies that led to 1m+ compile time for me.
2016-03-07 11:10:43 -08:00
vemacs 4e77fc0f0b Update potions to 1.9 2016-03-06 16:19:06 -07:00
vemacs 6d347881b7 Formatting 2016-03-06 11:14:08 -07:00
vemacs 73ad945101 Simplify copy operation 2016-03-06 11:02:05 -07:00
vemacs d39615d906 Try correcting overflow behavior for non-sign situations 2016-03-06 10:49:16 -07:00
vemacs dcc6e2f23f Correct overflow behavior after https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/c44c41ef02307f87bd978a6021a10d9b3d751d5e 2016-03-05 09:29:53 -07:00
vemacs 24e068b94d Send invalid message when attempting to spawn unavailable mob 2016-03-05 09:03:32 -07:00
vemacs 6b6cf41782 Also do a nullcheck on enchants 2016-03-05 09:01:15 -07:00
vemacs d17bd144a2 Add 1.9 Enchantments (FROST_WALKER, MENDING) 2016-03-05 08:49:46 -07:00
Trent Hensler a5686a17e2 Proper directory structure with this maven project. 2016-03-04 10:06:28 -08:00
Trent Hensler 2fab3b9957 EssentialsXGroupManager 2016-03-03 17:39:29 -08:00
Trent Hensler 9e2a9abee1 Have GM be consistent with other modules. 2016-03-03 17:38:29 -08:00
Trent Hensler 10eed23430 Add GroupManager
This doesn't mean we are actively supporting it, just means I wanted to appease people begging for a binary that works on 1.9.
2016-03-03 17:18:27 -08:00
vemacs 7967f62131 Deduplicate toggle argument handling code 2016-03-03 12:54:18 -07:00
vemacs 8102bab3ff Add our 1.9 changes to the readme 2016-03-03 08:45:06 -07:00
vemacs dd026700be Minor cleanup 2016-03-03 07:57:37 -07:00
vemacs 0001665ece Don't spam startup logs for PermissionsHandler 2016-03-03 07:44:49 -07:00
vemacs d0a7c5a0ec Remove PEX binary from repo, as we use Vault metadata now 2016-03-02 20:59:17 -07:00
vemacs ba97e5fff5 Don't allow double loads 2016-03-02 08:48:32 -07:00
vemacs e90455463f Better solution than synchronization 2016-03-02 08:46:29 -07:00
vemacs 72760096f5 Never write empty names file 2016-03-02 08:33:11 -07:00
vemacs 148cbd06e0 1.9 -> 1.9-R0.1 2016-03-01 19:11:49 -07:00
vemacs 62c2c57d4d [Experimental] Support Unbreakable meta tag 2016-03-01 18:16:13 -07:00
vemacs b8f7918a4a [Experimental] Rewrite UUIDMap to use one single ScheduledExecutorService 2016-03-01 17:52:39 -07:00
vemacs 526118e7d3 Update sounds to 1.9, fix compile 2016-03-01 17:05:57 -07:00
vemacs 37c20d5b6d Update API to 1.9-SNAPSHOT (note: compatibility is retained) 2016-03-01 16:53:08 -07:00
vemacs 5b60998b0a Use try-with-resources 2016-03-01 11:52:29 -07:00
vemacs 833713bee2 setAccessible(true) on legacy cache methods 2016-03-01 11:49:54 -07:00
vemacs cf1f2f8f03 Don't hardcode inv length 2016-03-01 10:21:04 -07:00
vemacs f6cbda0e04 Also limit maxYears in parser 2016-03-01 09:43:28 -07:00
vemacs 7d33814d5b Change to Vault Metadata API for PEX build perms 2016-03-01 09:29:45 -07:00
vemacs 7c59d61b32 Limit max time delta in years to 100k 2016-03-01 09:24:06 -07:00
vemacs 844a4a0574 Truncate contents length for 36 to playerInventory 2016-03-01 08:51:09 -07:00
vemacs 5968a6bc27 Run seen fallback code asynchronously, and clean it up 2016-03-01 08:36:41 -07:00
vemacs f94e242a75 Change spectator mode string matching to be consistent with other gamemodes 2016-03-01 08:05:00 -07:00
vemacs ddee7d1b94 Add 1.9 mobs (just one) to Mob 2016-02-29 20:52:02 -07:00
Blinky™ 30fce436dd Merge pull request #408 from AdamQpzm/2.x
Add fix for enchants & kits on 1.7
2016-02-06 07:35:56 -05:00
AdamQpzm dfdc6a52be Add fix for enchants & kits on 1.7 2016-02-06 11:24:36 +00:00
Ali Moghnieh ba5ce33464 Test for updateActivity all the time in PlayerCommandPreprocessEvent. 2016-01-30 16:07:14 +00:00
Ali Moghnieh 7809615896 Fix /time permissions to allow players to check time with just essentials.time. Remvoe timeSetAllPermission message as it is no longer used. 2016-01-25 01:17:47 +00:00
Ali Moghnieh 27a297a18d Move last-message-reply-recipient-timeout to a more appropriate position in the config.yml. 2016-01-20 16:02:41 +00:00
Ali Moghnieh bbf657e251 Add afk-list-name config property for changing the player list name of AFK players. 2016-01-20 14:15:53 +00:00
Ali Moghnieh c6d2746959 Add world-time-permissions configurable variable (false by default) that justifies whether /time should check for per world permissions. This was recommended by Khobbits as newbies might get confused by this feature. 2016-01-20 11:46:37 +00:00
vemacs d895d40fbf Move legacy field to class 2016-01-19 11:01:09 -07:00
Blinky™ a1d40f24a7 Update README.md 2016-01-19 08:57:03 -07:00
vemacs fd697aeb83 Restore spawnmob compatibility to 1.7.x, also provide framework for future version support 2016-01-19 08:45:52 -07:00
vemacs 6e05327934 Ship full Metrics (might help fix our graphing issues) 2016-01-19 08:09:44 -07:00
vemacs a4871cac36 [Experimental] Attempt to implement compatibility for 1.7 servers 2016-01-18 21:05:49 -07:00
vemacs b17f5d32c9 Add configuration option for toggling "fly mode enabled" message on login 2016-01-18 19:21:29 -07:00
vemacs 3896bcbd64 Allow skipping version check per request 2016-01-18 15:49:43 -07:00
vemacs 9c986aa25f Forcibly load OfflinePlayer class per @Byteflux's suggestions to prevent LinkageError 2016-01-18 15:02:20 -07:00
Ali Moghnieh 419d2d8282 Prettify currency display further. 2016-01-14 18:20:06 +00:00
Ali Moghnieh d570570394 In Commandtime:
- Make world name normalization lowercase the name as well.
- Permission checks will now always consider essentials.time.world.all for convenience.
2016-01-14 18:16:36 +00:00
Ali Moghnieh 0347badeda Update time world permissions prefix from essentials.time.set to essentials.time.world. 2016-01-14 17:56:41 +00:00
Ali Moghnieh eb924b9861 Add per world permission for setting world time.
Add two new locale messages: timeSetWorldPermission and timeSetAllPermission.
Add two new permissions essentials.time.set.all and essentials.time.set.<world>.
2016-01-14 12:32:48 +00:00
Ali Moghnieh 38c8a8e666 /Vanish no longer broadcasts user activity on PlayerCommandPreProcessEvent.
Implement more hard coded customizability with commands that shouldn't broadcast afk activity on PlayerCommandPreProcessEvent.
2016-01-12 23:53:09 +00:00
AdamQpzm 9f75f1aad3 Add bypass permission to nick command
This should allow users of wildcard permissions to be able to change their nicks as intended, without any changes to their current setup.
2016-01-04 21:32:19 +00:00
drtshock a669163196 Remove colour in permission checks.
As @supaham pointed out, this can cause issues with giving a player a wildcard permission and then negating the specific node if both nodes aren't negated.
2016-01-02 12:17:43 -08:00
Tux 87842a36ba Allow color-only nickname changes. 2016-01-02 12:11:17 -08:00
Ali Moghnieh 2d3691107d Create broadcastworld command for broadcasting to a world instead of the whole server. 2016-01-02 12:57:37 +00:00
Ali Moghnieh 134fbdf1df Fix Essentials Signs abuse using colours. Prior to this commit, the sign creation stage could be bypassed by typing &1&1[Test] assuming that was the success-name of the Essentials Sign. This commit prevents this by checking if the top line contains any of the success-name, without color. And so if anyone tries to type &1[repair] it will be displayed as [repair], but if someone tried &1[repairs] it will be displayed as §1[repairs], as repairs is not an Essentials Sign. It might be worth noting that all signs are checked including disabled signs to prevent abuse ahead of time. So even if [repair] is disabled all colours will still be stripped from [repair]. 2016-01-02 11:51:11 +00:00
Ali Moghnieh ab490cd588 Make 'Prevent sign destruction' message print on debug to prevent spam. 2016-01-02 11:36:48 +00:00
Ali Moghnieh 2e903acbaa Add support for using /seen with UUID. 2016-01-02 10:46:42 +00:00
Ali Moghnieh 06417910e2 Add 10 seconds of graceful time before doing first check to prevent misinterpretation of lack of activity. 2016-01-02 10:16:34 +00:00
Blinky™ c56dd6e302 Merge pull request #328 from AdamQpzm/2.x
Prevent extra colour codes from creating Essentials signs
2015-12-28 15:15:49 -07:00
AdamQpzm 19dcb33eb7 Prevent extra colour codes from creating...
...Essentials signs
2015-12-28 22:06:04 +00:00
Ali Moghnieh 540fa98a44 Ensure signsEnabled boolean is reset when reloading config. 2015-12-25 23:24:51 +00:00
drtshock 7428b7f981 Add groupmanager to gitignore. 2015-12-06 12:31:58 -08:00
drtshock 6fc19b92eb Turn off socialspy on login if player doesn't have the permission.
This fixes the case where players had socialspy enabled, lost the permission for it (got demoted) and then someone had to manually check and disable it for them as described in #299.
2015-12-06 12:30:55 -08:00
vemacs 1a701e69ca Add configuration option for the "#EasterEgg" regarding milk buckets and animals.
Requested by @prplz
2015-12-01 17:41:56 -07:00
vemacs 569c848764 Merge branch '2.x' of https://github.com/drtshock/Essentials into 2.x 2015-12-01 17:33:20 -07:00
vemacs ad93d15197 Only utilize usercache lookup for seen command 2015-12-01 17:32:53 -07:00
Ali Moghnieh 4a0507a838 Clone map of name->uuid when writing to file. Educated-guess for a fix for #213. 2015-11-30 19:51:22 +00:00
vemacs bc4737562d Use Essentials server instance instead of static Bukkit reference 2015-11-29 17:25:57 -07:00
vemacs 55f3a14343 Fix EconomyTest passing 2015-11-29 17:01:19 -07:00
vemacs 72e99a8833 Fall back to CraftBukkit userCache or Mojang for UUID lookups 2015-11-29 16:25:26 -07:00
Ali Moghnieh 0eb5063332 Duplicated code is so boring, ugh. Fixes #280. 2015-11-25 17:25:34 +00:00
Ali Moghnieh ca387687a5 Add last-message-reply-recipient-timeout setting for timing out reply-recipient in private messaging. 2015-11-24 22:48:18 +00:00
vemacs 2d376bc72f Restore LocationUtil compatibility with 1_8_R1 2015-11-15 07:59:19 -07:00
Blinky™ 58948b45b3 Merge pull request #273 from Fleodas/patch-1
Update messages_fr.properties
2015-11-10 17:33:29 -07:00
Fleodas 514f9b90f0 Update messages_fr.properties
Updated with last translations from crowdin, translation of the latest messages in French.
2015-11-11 01:20:32 +01:00
vemacs 0c41363914 Merge branch 'patch-2' of https://github.com/Androkai/Essentials into 2.x 2015-11-08 08:11:44 -07:00
vemacs 9bf0b65016 Merge branch 'issue-232' of https://github.com/sainttx/Essentials into 2.x 2015-11-08 07:59:47 -07:00
Ali 'SupaHam' M cdfe2b1487 Merge pull request #267 from EvilOlaf/patch-3
Fixes https://github.com/drtshock/Essentials/issues/265
2015-11-08 13:17:05 +00:00
Very Evil Olaf fe936a683f Fixes https://github.com/drtshock/Essentials/issues/265 2015-11-08 09:18:58 +01:00
Androkai e3cc5f2df8 add 4 missing strings
updated file with new strings from messages.properties
2015-11-07 22:36:31 +01:00
Blinky™ 3c0dc1e455 Merge pull request #263 from Androkai/patch-1
Translated missing strings and fixed some mistakes
2015-11-07 13:46:37 -07:00
Androkai d5b781fd60 Translated missing strings and fixed some mistakes
I downloaded a newer version from crowdin, compared it with this one, translated additional strings and fixed some old mistakes and inconsistencies in German word choice.
2015-11-07 21:45:22 +01:00
Ali Moghnieh 0a876c33a7 Add minimum-pay-amount setting to limit how little you can /pay someone.
Add 'minimumPayAmount' translatable message.
Create NumberUtil#displayCurrencyExactly(BigDecimal, IEssentials).
2015-11-07 17:23:40 +00:00
Ali Moghnieh fc8ee7f25f WHERE ARE THE BRAKES? Fix sending both UNREACHABLE and MESSAGES_IGNORED messages to /msg sender. 2015-11-03 23:39:18 +00:00
Ali Moghnieh cf448cd1cc Always set the message sender's reply-recipient when they send a message. 2015-11-03 00:40:56 +00:00
Ali Moghnieh 928f05ca8f Fix logic behind setting reply-recipient when receiving a message. 2015-10-31 23:28:05 +00:00
Ali Moghnieh 7b60552ec1 /tppos shouldn't add 180 to yaw. Fixes #225 2015-10-31 20:47:04 +00:00
Ali Moghnieh 26045e2ec0 Add isReachable API to IMessageRecipient.
Add translatable message recentlyForeverAlone.
Add behaviour that preserves reply-recipient only if they are reachable, and update reply-recipient if they are not reachable.
Fixes #248
2015-10-30 19:58:30 +00:00
Ali Moghnieh e5ebeaf724 Merge branch '2.x' of github.com:drtshock/Essentials into 2.x 2015-10-30 19:23:00 +00:00
Ali Moghnieh dc24bb53c2 Use recipient's display name instead of sender's name in messaging notifications. Fixes #249. 2015-10-30 19:22:39 +00:00
Matthew Steglinski 2175cb8a44 Group allowShortName check when checking if the short form version of 'splash' was used 2015-10-29 16:42:19 -04:00
Matthew Steglinski 756ea346e6 [Fix] Add option to not show one time use kits described in #188
* Adds toggleable config option 'skip-used-one-time-kits-from-kit-list' to exclude used kits with delay < 0 from displaying in the /kit list
2015-10-28 13:29:30 -06:00
Matthew Steglinski 23f3d69d38 [Fix] Call JailStatusChangeEvent when jailing and unjailing players. Fixes #161 2015-10-28 13:29:29 -06:00
Matthew Steglinski a134e99c8c [Fix] Listen to PortalCreateEvent to cancel portal creation by fire. Fixes #164 2015-10-28 11:35:29 -04:00
Matthew Steglinski 607f1980a1 [Fix] Adds splash potion persistence when serializing items. Fixes #232 2015-10-28 10:59:11 -04:00
Ali Moghnieh fb4af9fefc Rename and fix MessagingTest. 2015-10-28 13:37:17 +00:00
Ali Moghnieh 447b9db397 Rewrote messaging structure for more abstractness.
This commit adds a new boolean-configurable feature called last-message-reply-recipient, defaults to true for new installs and false for old installs, which states whether to use the new messaging functionality or not.
This commit deprecates Console#getCommandSender(Server) and provides Console#getInstance()#getCommandSender() for future usability.
2015-10-27 20:46:58 -06:00
Matthew Steglinski 77eb430b0b [Fix] Fixes drtshock/Essentials#189, adds toggleable config option 'ignore-colors-in-max-nick-length' to exclude ChatColors from nickname length 2015-10-27 22:37:33 -04:00
Ali Moghnieh d4ab25b200 Merge branch '2.x' of github.com:drtshock/Essentials into 2.x 2015-10-26 17:22:33 +00:00
Ali Moghnieh faaa4a4b1e Fix typo in German language file. Fixes #236 2015-10-26 17:22:10 +00:00
mickare a844e8b5ad Fix for offline player functionality (including /seen), implement automatic usermap repair 2015-10-17 08:20:33 -06:00
Taras 84143d06fa Revised config 2015-10-17 08:20:31 -06:00
Ali Moghnieh 9805f3f4d1 Add support for HEX RGB values. 2015-10-08 19:33:14 +01:00
Ali 'SupaHam' M bae6f89fa5 Merge pull request #221 from SupaHam/fix-item-color-deserialization
Add support for deserializing item color RGB values as integers.
2015-10-08 19:21:30 +01:00
Ali Moghnieh a721e04119 Add support for deserializing item color RGB values as integers. 2015-10-08 19:14:04 +01:00
Ali Moghnieh 6360c690cf Increment pendingDiskWrites every time we save please. 2015-10-08 18:47:10 +01:00
Ali Moghnieh aa75a3f20d Remove GroupManager from here! 2015-10-08 18:16:41 +01:00
Blinky™ 3edfec2491 Merge pull request #210 from ShadowRanger/2.x
[Fix] Properly apply damage causes
2015-09-27 20:37:47 -06:00
ShadowRanger c364adcf00 Updated & refactored LocationUtil 2015-09-28 12:25:46 +10:00
ShadowRanger 7d6714f713 Properly apply damage causes 2015-09-28 11:45:25 +10:00
drtshock 8485bd44f9 Correct check on bulk sell permission. 2015-09-23 15:02:44 -05:00
drtshock c0800afeeb Add configurable message for messaging someone with messages turned off. Adds #180
This message can also be removed to not send a message at all, keeping previous functionality.
2015-09-01 12:53:07 -05:00
Jikoo 046752f8c2 Fixes for graphical /recipe issues. Closes #134
- Fixed shaped recipe ItemStacks displaying 0s
- Fixed recipes supporting any data value of blocks missing textures
2015-08-19 10:42:16 -06:00
Blinky™ 9307f9b9c1 Update README.md 2015-08-19 10:42:15 -06:00
drtshock ee2018416e Add gamemode check when game moding self. 2015-08-10 09:58:20 -05:00
drtshock 6c38b6c6fb Hand sell message should be different from bulk sell. 2015-08-08 21:42:21 -05:00
drtshock cafb297594 Add essentials.chat.spy.exempt permission. Implements #83 2015-08-07 17:05:19 -05:00
drtshock 8bec43f7a2 New permission for changing all gamemodes. Fixes #79.
Need to give players essentials.gamemode.all or each gamemode permission on top of essentials.gamemode to be able to change.
2015-08-07 16:54:08 -05:00
drtshock fe1dd0d0f3 Add separate permission for bulk sell and hand sell. 2015-08-07 16:53:20 -05:00
drtshock b066d4dd83 Send emotes to yourself. 2015-08-01 19:24:23 -05:00
drtshock 792c7d5e91 Have me command respect chat radius. Implements #118.
Adds similar functionality to that of chat in essentials chat.
2015-08-01 16:38:09 -05:00
drtshock 76498e86f5 Add X naming to parent module. 2015-07-29 16:22:10 -05:00
vemacs 540a15160c Fix enable/disable message ordering in /msgtoggle 2015-07-29 11:26:36 -06:00
vemacs 6eb5aded38 Add msgtoggle to plugin.yml 2015-07-29 10:31:41 -06:00
vemacs 891605380f Add /msgtoggle command, untested (implements #89) 2015-07-28 20:29:17 -06:00
vemacs fe9348b3fb Add silent msg ignoring in msg command 2015-07-28 19:49:13 -06:00
vemacs c592a9d361 Add IgnoreMsg API 2015-07-28 19:45:33 -06:00
vemacs fae159cdbd Merge branch '2.x' of https://github.com/drtshock/Essentials into 2.x 2015-07-28 19:20:49 -06:00
vemacs d7b0f74a75 Give money back to sender if MaxMoneyException thrown (fixes #106) 2015-07-28 19:20:47 -06:00
drtshock d5301824fc Use Bukkit ChatColor instead of ess regex to strip colors. 2015-07-23 15:23:47 -05:00
vemacs 28607ce58c Fix compile 2015-07-23 15:23:47 -05:00
vemacs 9fb0ab57e6 Fix compile 2015-07-18 20:05:36 -06:00
Blinky™ 6143b088c3 Merge pull request #96 from CoolV1994/2.x
Fix Issue #91
2015-07-18 16:15:03 -06:00
CoolV1994 06e24b3bc2 [Fix]: tppos for Console
Use the correct arguments when using from Console
2015-07-18 18:02:21 -04:00
CoolV1994 3283b8c0a3 [Feature]: Add world argument to /tppos 2015-07-16 19:09:19 -04:00
CoolV1994 f43501e828 [Fix]: Relative Coordinates
Fixes the error when trying to do something like:
/tp ~ ~10 ~
2015-07-16 18:36:10 -04:00
vemacs 192ced4e4c Revert "Make disable-eco option visible in default config. Adds option requested multiple times."
This reverts commit dd65a1e76c.
2015-07-08 07:26:31 -06:00
drtshock dd65a1e76c Make disable-eco option visible in default config. Adds option requested multiple times.
This is apparently already in there but not visible. https://github.com/drtshock/Essentials/blob/cf9c9f707324826b0d1468a24ca42362ab2959bf/Essentials/src/com/earth2me/essentials/Settings.java#L644
2015-07-06 23:42:26 -05:00
drtshock 0b042dad43 Add separate permission for notifying ban ip. Resolves #60.
Permission is essentials.banip.notify and old one is essentials.ban.notify.
2015-07-06 16:19:32 -05:00
vemacs 14384f6bfa Put whole block into try-catch (just in case) 2015-07-05 09:41:11 -06:00
vemacs b9f293f8a7 Fix plugin startup 2015-07-05 09:37:17 -06:00
vemacs d03d85b52b Start metrics async 2015-07-05 09:27:53 -06:00
vemacs cf9c9f7073 Use metrics-lite, use global PluginMetrics config to control disable 2015-07-05 09:26:36 -06:00
vemacs 7fb263e75c Assign permissions in plugin.yml since they aren't assignable from player-commands 2015-07-05 09:10:04 -06:00
vemacs 1d20184f0b Implement #70 (untested), TODO assign default permissions 2015-07-03 13:07:25 -04:00
Blinky™ 500384abf3 Fix somehow removed drop-items-if-full option 2015-07-01 23:56:31 -05:00
Blinky™ d1b18da36e Clarify more 2015-07-01 23:53:52 -05:00
Blinky™ 3b3acbcfda Update README.md 2015-07-01 23:53:10 -05:00
Blinky™ 6c35dfcb3d Expose use-bukkit-permissions in config 2015-07-01 23:50:17 -05:00
vemacs 01ad006ca3 No magic numbers 2015-07-01 08:16:45 -05:00
Blinky™ 7e580920f6 Pig, not creeper 2015-06-30 17:20:11 -05:00
Blinky™ 5227824608 Default to pig spawner, fixes #67 2015-06-30 17:15:13 -05:00
vemacs 1c78f5cc3b Update metrics implementation, report to mcstats instead of Essentials metrics 2015-06-28 21:53:38 -05:00
vemacs 306aab0d8d Implement drop-items-if-full for /give command (default false) 2015-06-28 10:30:21 -05:00
vemacs e33c42e123 Optimizate imporst 2015-06-21 09:16:49 -04:00
vemacs 9ccfd4aac0 Fix compile, class definitions 2015-06-21 08:45:01 -04:00
vemacs 549da08f87 OCD message tweaking. Last thing. 2015-06-19 21:59:17 -04:00
vemacs b6c7799cc2 Fix compile, consider this stable 2015-06-19 21:48:11 -04:00
vemacs d063b5a894 Apply setUseSuperperms() to correct handler 2015-06-19 21:44:11 -04:00
vemacs cd78211cdf Remove redundant checkPermissions() call from poorly named listener 2015-06-19 21:39:42 -04:00
vemacs 4e9d6d22dd Actually fix no-Vault situation 2015-06-19 21:34:52 -04:00
vemacs 3a3d1a5981 Fix no-Vault situation 2015-06-19 21:30:27 -04:00
vemacs b15d868f77 Failing test? Delete it, not failing anymore 2015-06-19 20:56:55 -04:00
vemacs a6232b6bb6 [Untested] [Experimental] PermissionsHandler cleanup, add specific logging to detect Vault with no perms plugin 2015-06-19 15:47:58 -04:00
vemacs 6ca3712b79 Attempt PermissionsHandler cleanup, attempt to support Vault installed but no working perms/chat setup situations 2015-06-19 09:14:46 -04:00
vemacs db6724acdf Fix indentation, update getHumanName 2015-06-18 13:46:55 -04:00
vemacs 16c7bf2eb3 Add v1_8R2 to support 1.8.3 users not on the latest 1.8.3 build 2015-06-18 13:43:39 -04:00
vemacs 0331fafa77 Move common name setting stuff to superclass 2015-06-17 16:58:57 -04:00
vemacs 1d63209691 Rename this class to match the others 2015-06-17 15:22:00 -04:00
vemacs 140ece68d3 Cleanup dependencies, still waiting on build server to be fixed 2015-06-17 13:01:01 -04:00
vemacs e95ca8444e Simplify loadProvider method 2015-06-17 11:09:13 -04:00
vemacs dce381fb28 Advertise in readme 2015-06-17 11:00:23 -04:00
vemacs 121b262d1b Use returned value for setEntityType, attempt fixing name setting 2015-06-17 10:54:23 -04:00
vemacs 51b52ac343 [Experimental] Also catch provider instanciation exceptions 2015-06-17 10:38:25 -04:00
vemacs 8793add589 [Untested] [Experimental] [Need @drtshock to fix build server] Fully support all versions of Spigot and CraftBukkit from 1.8+ 2015-06-17 10:25:46 -04:00
vemacs e4f6bb363d Compile against Spigot's Bukkit maven repo 2015-06-17 09:02:28 -04:00
vemacs 6bd34f44ef Move downloads to top 2015-06-16 17:01:21 -04:00
vemacs be60e10ebd Bring back this? 2015-06-12 11:32:32 -06:00
vemacs 56cfffb2ef Fix double dependency, offlineplayer override 2015-06-12 11:28:41 -06:00
vemacs 20a59ddb6e Catch throwable for spawnerutil, move nasty warning to spawnerutil 2015-06-12 11:22:11 -06:00
vemacs bfa93cc189 Move initialization code to top 2015-06-05 16:49:05 -06:00
vemacs 480055b3d7 Give actually helpful error message for attempts to load on 1.7 2015-06-05 16:46:33 -06:00
drtshock 5e605f992a Reformat floatutil. 2015-06-05 10:38:06 -05:00
vemacs 3634cab1a5 Apply patch "Fixed exp for 1.8" from Spigot-Essentials, fixes #3 2015-06-04 20:44:02 -06:00
vemacs 8e2ffe08f8 Use items.csv from Spigot-Essentials (recommended to delete your current items.csv if you haven't made changes) 2015-06-04 20:41:32 -06:00
vemacs b6957db352 Apply patch "Fix float parsing issues" from Spigot-Essentials 2015-06-04 20:32:36 -06:00
vemacs ff3b1e810f Fix MetaItemStack canSpawn() method to try it on a clone, readd check to /give and /i 2015-06-04 11:18:47 -06:00
vemacs 14c4ed8379 Merge branch '2.x' of https://github.com/drtshock/Essentials into 2.x 2015-06-04 08:42:58 -06:00
vemacs a224894380 Fix inverted boolean value, fixes #53 2015-06-04 08:41:19 -06:00
vemacs f5a4c8f11e We require 1.8 2015-06-03 17:23:28 -06:00
vemacs 73ac6488ce Run IntelliJ IDEA inspections 2015-06-03 14:11:56 -06:00
vemacs c03765803c Move to switch statement (Java 7 sugar) 2015-06-03 14:03:26 -06:00
vemacs 65fc8a9c41 Don't spam fallback message 2015-06-03 13:20:42 -06:00
vemacs e8e15d2cd4 Merge branch '2.x' of https://github.com/drtshock/Essentials into 2.x 2015-06-03 13:12:22 -06:00
vemacs d7849f4120 Build against java 7 2015-06-03 13:11:43 -06:00
vemacs c48f68f0dc Update README.markdown 2015-06-03 10:06:29 -06:00
vemacs fe49e08340 Force superperms based permissions if a supported perms plugin is installed, but Vault isn't 2015-06-03 09:53:24 -06:00
vemacs 5051f3c4d7 Jungle -> SMALL_JUNGLE handling 2015-06-03 08:08:28 -06:00
vemacs 0c8695a888 Fix compile, avoid hardcoding tree values 2015-06-03 08:05:38 -06:00
vemacs d63e342f78 Remove version matching, it's pointless now 2015-06-03 07:44:18 -06:00
vemacs 9f4ccf9eaf Remove unused dependencies, add Vault softdepend 2015-06-03 07:08:21 -06:00
vemacs 1f14ac5c18 Copy logic from pre-refactor, should fix everything PermissionsHandler related, add Vault dependency to readme 2015-06-03 07:04:39 -06:00
vemacs 8f71261646 Fix issues relating to refactor 2015-06-02 18:08:44 -06:00
vemacs 1a9954428b Make Commandgive behavior more similar to Commanditem, fix shutdown spam 2015-06-02 17:57:20 -06:00
vemacs e43ae47a78 Simplify handler registration logic 2015-06-02 17:34:38 -06:00
vemacs 57213dd625 call setupProviders() for all handlers 2015-06-02 17:12:53 -06:00
vemacs ce5ffb9bd7 Call superclass constructor for GroupManager, fixes #48 2015-06-02 17:09:03 -06:00
vemacs 5375ff3790 Add reset color code before name (duplicate legacy vanilla behavior) 2015-06-02 14:02:08 -06:00
vemacs 37d4dc70e5 Set display name for given spawners 2015-06-02 13:56:54 -06:00
drtshock e7337d06b5 Merge branch '2.x' of https://github.com/drtshock/Essentials into 2.x 2015-06-02 14:47:53 -05:00
drtshock bcc76aff63 Build number in version. 2015-06-02 14:47:42 -05:00
vemacs 154d43819a Make permissions-plugin specific implementations extend Vault, fix build permission checks 2015-06-02 13:21:40 -06:00
vemacs 318e0eabea Make PermissionsEX handler use UUIDs 2015-06-02 13:20:34 -06:00
vemacs 0a2f1a3dfe Fix PrivilegesHandler 2015-06-02 13:09:54 -06:00
vemacs b19dbb1b8f Make permissions-plugin specific implementations extend Vault, fix build permission checks 2015-06-02 13:08:53 -06:00
vemacs 904a9700b2 Update README.markdown 2015-06-02 12:21:46 -06:00
vemacs f5daf7085e Add logo 2015-06-02 12:18:44 -06:00
vemacs f500e2ce9a Add wiki link to readme 2015-06-02 12:09:24 -06:00
drtshock e2a67365f9 Add CI link to readme. 2015-06-02 12:18:49 -05:00
vemacs 2273329e29 Add SpawnerUtil with primary Spigot 1.8.3+ EntityType setting, legacy data fallback. Fixes #22 2015-06-02 11:28:38 -05:00
vemacs be1acfdccd Don't override SuperpermsHandler hasPermission, fixes #45 2015-06-01 18:50:20 -06:00
vemacs 2f39811a46 Properly set default for force-disable-teleport-safety to false 2015-06-01 14:00:06 -05:00
vemacs f995676fad Add force-disable-teleport-safety option (default false). This option is useful for preventing "teleport-glitching" in Factions servers. 2015-06-01 14:00:06 -05:00
vemacs ea4c966003 Rename Vault setup method to be more descriptive, check if Chat class is available 2015-06-01 11:03:11 -06:00
vemacs fe5de8a854 Fix #35, implement prefix and suffix methods for VaultHandler 2015-06-01 10:19:11 -06:00
vemacs fa43f39015 Use UUID methods for zPermissions (merged from Spigot fork) 2015-06-01 09:11:41 -06:00
drtshock 4d0e6254dd Fix typo in Guardian. Fixes #40. 2015-06-01 08:44:49 -05:00
Paul Sauve e94e908bed Fix dependencies 2015-05-24 18:02:40 -05:00
drtshock 179dbe19fd Use separate config option for near radius.
We were using chat radius, which upset me when I wanted to change it but didn't want to start using local chat.
2015-05-16 19:36:57 -05:00
drtshock d6eb846488 Add blacklist of commands for muted players. Adds #30. 2015-05-12 21:44:36 -05:00
drtshock 6796d460dc Add option to put unique players in join message. 2015-05-08 15:55:02 -05:00
drtshock 4be2fc1a90 Update pom of EssentialsX 2015-05-03 15:09:22 -05:00
drtshock 20f79f117f Make sudo a loop command. Adds #23. 2015-05-03 15:08:32 -05:00
drtshock 4169996e7a Name the jars EssentialsX. 2015-04-24 15:32:50 -05:00
drtshock 667fc18abf Return at correct spot. 2015-04-24 12:35:29 -05:00
drtshock 4f72ff47bc More informative permission lag notices. 2015-04-22 11:26:41 -05:00
drtshock b7704a4ea8 Simplify a few things in EssentialsChat. 2015-04-22 10:58:04 -05:00
drtshock ac0858dcdb Add PermissionsHandler for Vault.
We'll use the VaultAPI if it's there for group checks.
This will also allow us to default to Player#hasPermission from Bukkit instead of going through each permission plugin.
2015-04-22 10:42:27 -05:00
drtshock 7439dc01a5 Update other info. 2015-04-20 18:26:03 -05:00
drtshock 090e0b6757 Add banner meta. Resolves #8. 2015-04-20 18:09:52 -05:00
drtshock effad664d5 Print stack trace if debug is enabled. 2015-04-20 17:49:23 -05:00
drtshock 01bf7d1389 Update readme 2015-04-20 14:51:56 -05:00
drtshock b7c7e4ad23 Add /showkit to view kit contents. 2015-04-20 14:33:36 -05:00
drtshock 5ca02e6596 Don't build groupmanager. 2015-04-20 13:09:56 -05:00
drtshock 6b2f87c5a9 Consistent versioning. 2015-04-20 12:51:51 -05:00
drtshock 9a265aac48 Add /createkit.
Allows you to create a kit in game using your inventory.
2015-04-20 12:51:22 -05:00
drtshock 5b052c170f Per gamemode permissions. Adds #16. 2015-04-17 16:54:25 -05:00
drtshock 555f151692 Allow commands in kits. Adds #15.
Syntax is /<command> with the ability to add {player} as an argument.
2015-04-17 14:48:23 -05:00
drtshock c22978c3f9 Add missing aliases to plugin.yml 2015-04-16 09:28:05 -05:00
drtshock 54b3a23ae2 Update items for 1.8.3 2015-04-16 09:25:40 -05:00
drtshock f5b40dba34 Add option to not send no new mail message on join. 2015-04-16 09:25:29 -05:00
drtshock f8160c6318 1.8.3 update. 2015-04-16 09:08:22 -05:00
drtshock b113bb59d4 Spectate gamemode. 2015-04-16 08:54:46 -05:00
drtshock 15bd41fefc Add new mobs. Update child to 1.8.3 2015-04-16 08:52:29 -05:00
drtshock 4e6aef3d24 Add Depth Strider enchantment. Resolves #4. 2015-04-16 08:50:43 -05:00
drtshock c798f995ca 1.8.3 2015-04-16 08:46:00 -05:00
drtshock 9bca2b44ab Update pom. 2015-04-16 08:32:04 -05:00
drtshock dde0b20775 Reformat 2015-04-14 23:06:16 -05:00
KHobbits ad13062117 Unrequired Dependacy 2014-09-06 17:22:25 +01:00
KHobbits d11a295ffd Merge branch '2.x' of github.com:essentials/Essentials into 2.x 2014-09-03 00:21:42 +01:00
KHobbits ffea359661 rework /seen to be a little stricter on argument matching. 2014-08-18 21:00:03 +01:00
md_5 037456c99d Fix missed cases from previous user iteration optimizations. 2014-08-16 19:04:13 +10:00
KHobbits 5125a137f4 Make sure we close any open inventories of players who leave. 2014-08-14 01:58:17 +01:00
KHobbits 3f1c996959 Use quicker ban lookup to reduce /seen lag. 2014-08-14 01:50:31 +01:00
KHobbits 53a7cd732f Add paging to mail.
Support aliases in rule and baltop output.
2014-08-11 19:03:24 +01:00
KHobbits 4fd026ff99 Add mailFormat TL key. 2014-08-11 18:46:04 +01:00
Necrodoom d9fbd68529 Misc clarification (socialspy and kit delay)
clarify allow-silent-join-quit
2014-08-11 00:12:43 +01:00
Necrodoom 49d80462d1 Remove outdated try-catches 2014-08-11 00:11:06 +01:00
Necrodoom 1d859e49ad Add /tempban missing syntax 2014-08-11 00:10:09 +01:00
FearFree a2c43d822c 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 7907565377 Formatting fixes. 2014-07-19 20:11:45 +01:00
SidShakal d1c014fe16 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 465041b98b 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 ed56afda26 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 23f14bc2d5 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 c829a32555 Clean up tempban messages to be a little clearer. 2014-07-14 21:23:56 +01:00
KHobbits ae984c2055 Update translations from Crowdin (http://translate2.ess3.net) 2014-07-12 22:12:51 +01:00
KHobbits 0c416c8366 Remove ban check from /ess cleanup, no longer required.
Fix ban upgrade script.
2014-07-12 19:13:23 +01:00
FearFree 51be2131f7 Update to new ban method. 2014-07-12 17:40:14 +01:00
KHobbits 575a8142ff Add ban reason to /banip 2014-07-12 17:23:11 +01:00
KHobbits 093a1f677b Still give 'nickNoMore' message when removing a nickname. 2014-07-12 16:48:01 +01:00
KHobbits 8311da2653 Allow for changing of username casing without adding 'nickname' prefix. 2014-07-12 16:43:57 +01:00
KHobbits b5976a52e0 Prevent users from setting unsafe homes when teleport safety is disabled. 2014-07-12 16:34:18 +01:00
KHobbits 4e6c98ac57 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 a2c692af39 Converge ban message translations, and add reason support to default tempban tl key. 2014-07-12 16:32:42 +01:00
KHobbits a131527a15 Switch sudo to command dispatch, this will allow vanilla commands to be executed. 2014-07-12 15:29:25 +01:00
KHobbits 0b925e6fc0 Don't cascade null usernames passed from eco api 2014-07-10 11:48:54 +01:00
KHobbits 97c8f5192e New permission :essentials.tp.position Required to use /tp [player] <x> <y> <z> 2014-07-06 18:41:12 +01:00
Necrodoom 7c372cd978 Add support for vanilla /tp <x> <y> <z> teleport syntax. 2014-07-06 18:41:01 +01:00
KHobbits 02fe58161c Allow forcing adult status on randomly generated /spawnmob mobs. 2014-07-06 18:25:00 +01:00
KHobbits 2ba2ebaa43 Update Bukkit
CB: 3092 B: 1938
2014-07-06 16:40:06 +01:00
KHobbits 549500eaf2 Show warp teleport status to teleport owner. 2014-06-28 18:10:32 +01:00
KHobbits 8e7589e450 Slightly reorder teleport messages to be less confusing. 2014-06-28 18:06:13 +01:00
KHobbits 9b69403ee1 Fix NPE with /list in console 2014-06-27 04:28:33 +01:00
KHobbits 6269ce9a3f Update essentials to support 3rd party vanish toggling. 2014-06-27 01:46:37 +01:00
KHobbits 0f6625aea9 Add some debugging to make it easier to diagnose kit errors. 2014-06-25 19:19:04 +01:00
KHobbits dbceccaa3e Kit cleanup and refactor. 2014-06-25 19:03:31 +01:00
KHobbits 6c7ba6a76f Allow multiple kits to be spawned per command. 2014-06-23 00:38:13 +01:00
KHobbits f76a517339 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 2c747ecf36 empty array is not null array 2014-06-19 16:22:38 +01:00
KHobbits 1f8b60081e Reduce a few nickname refresh calls. 2014-06-19 04:02:15 +01:00
KHobbits a800359e0b Force listener cleanup on plugin disable. 2014-06-19 02:59:08 +01:00
KHobbits 4854961901 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 50a815bdb9 Revert "Add spawn location cache to reduce blocking on player respawn."
This reverts commit 7804516793.
2014-06-17 23:27:46 +01:00
KHobbits 1690b9d83d If "sethome-multiple" config section is invalid, silently fallback to default config values. 2014-06-17 00:19:59 +01:00
KHobbits 7804516793 Add spawn location cache to reduce blocking on player respawn. 2014-06-16 19:55:34 +01:00
KHobbits c54e9b5dba Add default ban reason for tempban reason. 2014-06-14 22:06:26 +01:00
KHobbits 71936cfe22 Check for arraynull on pex group request. 2014-06-14 18:20:49 +01:00
KHobbits 27890e2b22 Only remove first date match from ban reason. 2014-06-14 16:27:34 +01:00
KHobbits da6df89126 Add optional {2} in 'tempBanned' TL key, for reason. 2014-06-14 16:21:05 +01:00
KHobbits 95ff197910 Show UUID in trackUUID debug message. 2014-06-07 18:21:10 +01:00
KHobbits 2215b0f53f 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 3887fdd47d 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 7e9328bd25 Try to use consistent UUIDs and not rely on Bukkit lookup while saving. 2014-06-07 15:45:57 +01:00
KHobbits 9d9af25c7f Add local echo of mail being sent on /mail send. 2014-06-05 00:07:27 +01:00
KHobbits 5a2fd19bcf Fix firework recipe in /recipe 2014-06-04 16:13:20 +01:00
KHobbits 3a50850734 Use strings for cachemap key, should prevent accidental key issues. 2014-06-01 21:50:24 +01:00
KHobbits 812de5c35c Add API logging to Eco API. 2014-05-31 20:37:44 +01:00
KHobbits bffea1d7c8 Extend getUser(Object) to match uuid and offline players. 2014-05-30 22:16:06 +01:00
KHobbits b00f458e67 Emulate player join for mocking. 2014-05-27 21:14:45 +01:00
KHobbits 80ef955eae Improve fakeServer model 2014-05-27 20:31:13 +01:00
KHobbits 44509ff6e4 Remove online player lookup in usermap.getUUIDMap(), throw log entry on failback. 2014-05-27 18:04:02 +01:00
KHobbits e1d4129869 Log takeMoney exception, even if we ignore it. 2014-05-27 10:46:25 +01:00
KHobbits 00655f724d Revert writecount reset, this could cause odd behavior. 2014-05-27 06:18:34 +01:00
KHobbits 4590e7ea26 Enforce userdata save on player dispose. 2014-05-27 04:52:52 +01:00
KHobbits 2ac1ce4f56 If we are modifying money, force transaction clear, this is important. 2014-05-27 03:41:18 +01:00
KHobbits f726035660 Don't check silentjoin.vanish if another plugin has hidden the join message. 2014-05-26 22:08:18 +01:00
KHobbits 57bb1ee475 New permission: essentials.silentjoin.vanish
The server needs silentjoin to be enabled first.
2014-05-25 19:31:55 +01:00
KHobbits 889dde7549 Abort transaction before updating funds on balance overflow. 2014-05-25 17:03:23 +01:00
KHobbits ada2fe01a2 Utilize write transactions for delaylogin task. 2014-05-25 01:38:37 +01:00
KHobbits cf29a0ba6a Rename listening methods to be a little more descriptive of their purpose. 2014-05-24 18:47:40 +01:00
KHobbits c929ebb89a Convert 9 anonymous scheduled tasks to named classes for better logging. 2014-05-18 21:32:07 +01:00
KHobbits 8159530906 Fix invalid TL key. 2014-05-18 19:47:18 +01:00
KHobbits 7e8ba9a256 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 b145ec59ea Tweak to player login event. 2014-05-18 13:26:27 +01:00
KHobbits 429a7275ee Update worth.yml to be more descriptive. 2014-05-17 04:31:44 +01:00
KHobbits 3bd0608b6e Update /condense syntax hint. 2014-05-17 04:21:51 +01:00
@ArkhamNetwork 9307e0cb71 Optimize PlayerLoginEvent 2014-05-17 04:05:51 +01:00
@ArkhamNetwork 4672e51806 Move the teleport timer to an async task. 2014-05-17 03:35:44 +01:00
KHobbits 18811122b3 Prevent near empty userdata file creation. 2014-05-17 03:06:48 +01:00
KHobbits cbaf126a25 Stop using old string player lookup. 2014-05-17 02:47:10 +01:00
KHobbits 8e7abe325e Prevent reading and writing the usermap at the same time. 2014-05-17 01:50:41 +01:00
Faris Rehman ed9e4ecd28 Add user messages. 2014-05-16 20:39:49 +01:00
KHobbits bd866de950 First draft of /condense 2014-05-16 20:30:06 +01:00
KHobbits 4ecb6b5fdb 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 0d6bca2080 Update English TL keys. 2014-05-10 17:49:37 +01:00
KHobbits 05ef05dcac Update translations from crowdin (http://translate2.ess3.net/) 2014-05-10 16:11:03 +01:00
Luke Anderson (stuntguy3000) 7ba097c640 Improve messages/formatting 2014-05-10 16:03:39 +01:00
Burke D 6adacbb357 Grammatical changes to config.yml 2014-05-10 15:46:08 +01:00
clou44 69f62574c4 Updated Items.csv: Added nemofish and fishnemo.
Added shorter aliases for salmon, pufferfish, and clownfish.
2014-05-10 15:38:29 +01:00
KHobbits b00c31730f 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 f09180659d Initialize TL Bundle on plugin start. 2014-05-06 07:00:57 +01:00
KHobbits c12373bf41 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 04666b66b4 Reload locale even if it is set to null. 2014-05-05 20:47:48 +01:00
KHobbits 363aee70d5 Better handle TL failover. 2014-05-05 14:48:25 +01:00
KHobbits 01d03d5d41 Update teleport timer to handle UUID rather than player names. 2014-05-05 13:01:20 +01:00
KHobbits 4575fc5aff Better handle corrupted chunks. 2014-05-04 19:39:35 +01:00
ElgarL 27e9e3aa88 Error in logic 2014-05-04 17:12:15 +01:00
ElgarL b0187698b9 Prevent players who have never logged in before from taking over existing accounts. 2014-05-04 16:22:58 +01:00
KHobbits 0364d4e0de 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 86b57804c6 Fix clones forgetting sub groups. 2014-05-04 12:50:22 +01:00
ElgarL 211dc220d8 Set a default mirror map if none is found in the config. 2014-05-04 12:50:21 +01:00
ElgarL aae586f79a 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 32f49350cf Fixup javadocs 2014-05-04 12:50:18 +01:00
ElgarL 9739784e75 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 a0e93af758 Do not override higher level permissions with negations. 2014-05-04 12:50:16 +01:00
Necrodoom 81c6291338 Fix a /mangcheckp message 2014-05-04 12:50:15 +01:00
ElgarL 24509d60be Update mangcheckp to understand Exception nodes. 2014-05-04 12:50:14 +01:00
ElgarL f0947e9a7c Fix manucheckp to understand and report correctly on Exception nodes. 2014-05-04 12:50:13 +01:00
ElgarL 92bb4e0e66 Allow Exceptions in any inherited group to override negation of permissions. 2014-05-04 12:50:12 +01:00
Necrodoom 8f810ad447 Cleanup plugin description 2014-05-04 12:50:11 +01:00
ElgarL 3f35a6b59c Prevent adding sub groups for ranks the granting player doesn't have access to. 2014-05-04 12:50:09 +01:00
ElgarL 427dd714c9 Allow Exception permission to override negations when in the same group. 2014-05-04 12:50:08 +01:00
ElgarL 9d7a2043f7 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 ff3ec84b0d Fix Cyclic mirroring test (silly me) 2014-05-04 12:50:06 +01:00
ElgarL 1f9e72c5e2 Tidy imports 2014-05-04 12:50:05 +01:00
Necrodoom 67be18566c Improve Javadocs, clean ' strip checks, update changelog. 2014-05-04 12:50:04 +01:00
Necrodoom 862e71bc85 add recursive permission adding/removing
also other minor fixes
2014-05-04 12:50:03 +01:00
ElgarL 395655ba19 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 1bb569fff2 Fix attempting to spawn invalid items. 2014-04-30 05:41:42 +01:00
KHobbits e66ad88451 Skip npc's when doing cleanup. 2014-04-29 04:42:55 +01:00
KHobbits 3bf3093177 Better handle a write locked usermap.csv 2014-04-29 01:44:28 +01:00
KHobbits 5eb82add06 Run user dispose on another thread. 2014-04-28 23:12:35 +01:00
Corin Simpson-Bryars 8bd1a9f3bc 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 145d24c34c Fix /home for offline players. 2014-04-27 17:09:44 +01:00
KHobbits 229ff9f0e4 Update UUID mapping, if uuid for a username changes. 2014-04-27 01:35:52 +01:00
KHobbits 0557aa58b0 Switch AFK check to use UUID. 2014-04-27 01:10:44 +01:00
KHobbits b40aa43872 Delay uuidconversion for 10s and show warning.
UUID conversion should now better handle offline conversion.
2014-04-26 23:50:12 +01:00
KHobbits a1cdfa19b0 Fix time command exit statuses. 2014-04-24 10:24:35 +01:00
KHobbits d62b401db8 Skip empty user names on uuid conversion. 2014-04-22 18:07:02 +01:00
KHobbits 887957756e [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 b6d6b24796 Only write to UUIDMap if the entry doesn't exist. 2014-04-18 06:48:14 +01:00
KHobbits b6c0871daa Format /seen account history list, optimize map loading. 2014-04-18 05:57:47 +01:00
KHobbits b080187808 Add previous account tracking to /seen 2014-04-18 04:48:34 +01:00
KHobbits 3c613fd59b Force CB 3050+ 2014-04-18 03:58:27 +01:00
KHobbits 547c6e4073 Fix offlineplayers with null names. 2014-04-17 06:09:08 +01:00
KHobbits 6098086a99 Optimize uuidmap writing, and use userConf write buffering. 2014-04-17 05:34:34 +01:00
KHobbits 87f90e9bdd Add progress status and /ess uuidconvert command for manual conversion. 2014-04-17 02:18:28 +01:00
KHobbits 65b1821196 Update Bukkit to 1.7.8-R0.1
Bukkit: 1922 CraftBukkit: 3050
2014-04-15 00:24:12 +01:00
KHobbits 756321d280 Add UUID mocking support, and fix tests. 2014-04-15 00:08:02 +01:00
KHobbits 3dbf69f163 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 e8ace54036 Make eco npc methods use proper user config creation and resets. 2014-04-15 00:06:29 +01:00
KHobbits 22e1c14e7e Stop delayed writes from reversing user reset. 2014-04-15 00:05:56 +01:00
KHobbits cd38aeb544 Remove Ess object from FakeServer. 2014-04-14 00:03:07 +01:00
KHobbits 9e9409da1e Essentials UUID conversion. 2014-04-13 21:40:15 +01:00
KHobbits 36e580474f Converted emulated player class calls to use base class. 2014-04-13 01:01:49 +01:00
clou44 e007331581 Update items.csv
Added additional aliases for various flowers.
2014-04-10 23:31:05 +01:00
clou44 8d435ec86e Update items.csv
Added additional aliases for coal blocks.
2014-04-10 23:30:58 +01:00
KHobbits 214d64e4ad Update config.yml to reflect vanilla fallback no longer works. 2014-04-07 14:09:09 +01:00
KHobbits 737fadc390 Update Bukkit 1.7.5-R0.1
Bukkit 1919 CB: 3039
No UUID update yet.
2014-04-06 15:57:37 +01:00
KHobbits 10de6ac929 Cleanup 2014-04-06 15:44:37 +01:00
KHobbits fe9fbf585f 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 af3f3fb4c7 Fix fly logic check (creative doesn't mean fly is enabled) 2014-03-31 03:26:48 +01:00
KHobbits 0e6a5240db Add chat configurables. 2014-03-30 15:50:32 +01:00
KHobbits f272a7ecd6 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 104caea3c9 Minor phrasing fixes. 2014-03-26 22:08:37 +00:00
Matt Anthony 44fbd05df7 Add colors to a few TL keys. 2014-03-26 21:58:36 +00:00
KHobbits 6cfb5084e1 Add local echo to tempban command. 2014-03-26 20:08:38 +00:00
KHobbits ae1804758a Helpop should use broadcast method
Add local echo's to helpop and mute commands.
2014-03-26 20:06:01 +00:00
Necrodoom 4b470b32c5 Add socialspy wildcard support 2014-03-26 19:09:00 +00:00
Necrodoom cfe89dde17 Match /clearinventory multiple permission to /msg 2014-03-26 19:07:48 +00:00
Necrodoom 30dae51ddf Some messages fixes, and information addition. 2014-03-26 19:07:41 +00:00
KHobbits 0b11abf8f4 Revert "Do not allow a block with an Essentials Sign attached to it to be pulled with a sticky piston"
This reverts commit b673882b2f.
2014-03-26 15:14:40 +00:00
Chris Ward b673882b2f 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 200dbda6d3 Merge branch '2.x' of github.com:essentials/Essentials into 2.x 2014-03-23 18:14:21 +00:00
KHobbits 3538728733 Fix null teleport costs. 2014-03-23 18:12:33 +00:00
FearFree 5724c0c8df Future Java versions may not support _ as identifier. 2014-03-22 16:08:11 +11:00
KHobbits 0b5718f7ff Cleanup warp charging, to properly handle warp sign costs. 2014-03-19 00:01:47 +00:00
ElgarL c6b0dfaa4c Merge pull request #668 from necrodoom/patch-91
Fix messages
2014-03-12 15:41:53 +00:00
KHobbits 8fecd44786 Fix some /home errors with invalid data. 2014-03-09 17:59:07 +00:00
Dabo Ross 2ee590d85c 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 b469439f7b Update translations from Crowdin
http://translate2.ess3.net/
2014-03-09 17:23:38 +00:00
Necrodoom a7d6e5440b Fix messages 2014-03-09 19:17:26 +02:00
Luke Anderson (stuntguy3000) 077074c855 Add missing language pointers 2014-03-09 17:14:09 +00:00
FearFree c59a204827 Remove op and replace with permission 2014-03-09 17:01:31 +00:00
KHobbits 1be30e4a0a Only enable teleport protection on plugin/command caused teleport events. 2014-03-09 01:13:41 +00:00
Dykam 28ec7c2d80 You can now access the old balance during the UserBalanceUpdateEvent Event 2014-03-04 19:44:55 +00:00
Kryptic Dot ee986768ce Cleaning up readme markdown 2014-03-04 19:29:47 +00:00
SkyBirdSoar de485b8d48 Fixed some grammatic errors, changed some sentences. 2014-03-04 19:26:16 +00:00
Zed Spencer-Milnes e443776dc1 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 859ffeaa0b Remove generated comments 2014-03-04 19:20:56 +00:00
KHobbits 545d706a70 Fix login death caused by built up fall damage using /fly. 2014-03-03 21:24:00 +00:00
KHobbits 9ec0ca25a5 User loading cleanup 2014-03-03 09:01:07 +00:00
KHobbits b0e165546e Round to gc output to 2 dp. 2014-03-03 08:34:43 +00:00
KHobbits 470f4c1b3e Constant user file casing. 2014-02-27 01:55:04 +00:00
KHobbits 3b35763fef Fix warp sign costs. 2014-02-25 07:09:32 +00:00
KHobbits 2d5c1fd51c Fix safety tp check above world height
Performance tweak to fly check
2014-02-23 17:41:25 +00:00
KHobbits 088c54e386 Fix customtext copy 2014-02-19 03:28:28 +00:00
KHobbits e409363426 Alternative implementation of unsafe enchant blocking for signs.
Permission: essentials.signs.enchant.allowunsafe - required to add unsafe enchants using enchant signs.
This reverts commit 3f2c2aadbb.
2014-02-19 01:18:40 +00:00
KHobbits 34599b7428 Fix projectiles compiling. 2014-02-19 00:58:20 +00:00
KHobbits 53c1c8a8b7 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 3f2c2aadbb Split unsafe enchantments in kits to a new config option 2014-02-18 23:47:18 +01:00
KHobbits a1a190bb02 Merge branch '2.x' of github.com:essentials/Essentials into 2.x 2014-02-16 01:15:25 +00:00
KHobbits 6744b652e6 Use the absolute radius value. 2014-02-16 01:15:01 +00:00
Chris Ward 11b308cc8c Update repository URLs 2014-02-15 14:23:30 +11:00
KHobbits c50f559512 Allow sending customtext chapters as a parameter instead of reading commandLabel 2014-02-13 22:52:14 +00:00
KHobbits 98bee40bf7 Fix Stripping/blocking of urls containing caps. 2014-02-12 01:20:54 +00:00
Iaccidentally 970d342a60 Merge pull request #657 from evonuts/2.x
Fix spelling error (atleast) in translation files.
2014-02-11 02:27:10 -05:00
evonuts 2500c9af90 Fix spelling error (atleast) in translation files. 2014-02-11 20:15:14 +13:00
KHobbits fa765d3077 Fix world argument to ignore radius, and allow for skipping radius param in syntax. 2014-02-09 22:26:54 +00:00
KHobbits 9bc8f287a4 Fix ghost items with /recipe 2014-02-09 21:54:04 +00:00
Necrodoom 5e6ce8aecb Reorder ID 376 2014-02-09 21:37:03 +00:00
KHobbits 6174e4a98b Code cleanup and remove remote skull edit. 2014-02-08 01:23:54 +00:00
Luke Anderson (stuntguy3000) 5c74af42a3 Add /skull command 2014-02-08 00:25:34 +00:00
coegho ce48f2f326 [Fix] fireball-fire=true now prevents fire spread from fireballs 2014-02-08 00:22:56 +00:00
Necrodoom 2affce875c Restore 2 aliases 2014-02-08 00:16:11 +00:00
Necrodoom 52c8ebc61f Fix duplicates, a few more aliases addition/remove 2014-02-08 00:16:11 +00:00
KHobbits a9249deea7 Reformat pom 2014-02-08 00:13:46 +00:00
KHobbits d99c35cc35 Add bow as a skeleton keyword 2014-02-06 02:35:27 +00:00
Iaccidentally 518650e842 Modifier order consistency 2014-02-04 11:11:43 -05:00
KHobbits 20ff61909f Readme tweak. 2014-02-04 01:17:06 +00:00
KHobbits f0e4e8c5ba Add support for vanilla item names from api. 2014-02-02 19:04:09 +00:00
KHobbits 63300866f9 Fixed argument count for meta parsing. 2014-02-02 18:56:45 +00:00
KHobbits c8212371ff Allow the Essentials module to compile again. 2014-02-02 18:19:29 +00:00
KHobbits 0a6a79115a 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 6798615507 Track UUID for future use. 2014-02-02 17:05:41 +00:00
KHobbits 016b39726c Restore teleporting to middle of block, when flying and unsafe is enabled. 2014-02-02 16:43:31 +00:00
KHobbits 882ebae257 [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 161862bc53 Make sure we leave any vehicles before teleporting. 2014-02-02 15:04:07 +00:00
Iaccidentally 18b31a7e50 [FIX] Print a proper error when using tpaccept with no requester 2014-02-01 16:49:54 -05:00
Chris Ward 5b5be164b6 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 466b4ae7c5 Restore Bukkit dependency to parent pom 2014-01-30 10:34:16 +11:00
KHobbits e7c468b20d Attempt to fix client issue with speed reset on world change. 2014-01-26 22:33:56 +00:00
KHobbits b9d09dd7b0 Make /speed persist on world change if permissions exist. 2014-01-26 20:00:41 +00:00
KHobbits 1c035457bb Force Bukkit version to match deps. 2014-01-25 23:29:48 +00:00
KHobbits 5070f15810 Use OSX character split on internal sign interface 2014-01-25 22:55:28 +00:00
Necrodoom c8faf03f5b Fix cauldron ID 2014-01-25 22:46:26 +00:00
Necrodoom 915cb51d1a Trim items.csv based on feedback 2014-01-25 22:46:25 +00:00
snowleo 52c3169a3c Read backup output async 2014-01-25 15:33:33 +01:00
Chris Ward 32b118d3c0 Add fullstops for @Necrodoom 2014-01-21 12:20:24 +11:00
Chris Ward 9ce1158aeb Add support for vanilla JSON metadata syntax (/give, /i, /kit, etc.) 2014-01-21 00:54:48 +11:00
Chris Ward 839bfe0c2e 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 f39ef36115 Fix hidden groups in /list 2014-01-14 21:55:30 +00:00
KHobbits eee18f40be Pass optional location parameters to teleport TL keys. 2014-01-12 01:23:12 +00:00
KHobbits 4084445b5b Config description cleanup. 2014-01-11 17:34:35 +00:00
Adam 8c882a5268 Reset Exhaustion on /feed 2014-01-08 01:07:38 +00:00
Chris Ward 3b0e86ae67 Add an upload-only pom file for GroupManager 2014-01-06 10:03:22 +11:00
KHobbits 3fecd3138d Check command cost, before running kit delay check, prevent accidentally delaying unran commands. 2014-01-03 08:16:17 +00:00
KHobbits d48c02021d Add and implement sign break/create/interact events to EssAPI
Implement AfkStatusChangeEvent
2013-12-31 17:47:52 +00:00
KHobbits 0b71b6e93d Remove redundant permission check. 2013-12-31 04:44:28 +00:00
KHobbits 99d25bfaea Fix NB parent compiling 2013-12-28 23:09:56 +00:00
KHobbits 46691871ad 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 58440dd594 Add deploy plugin 2013-12-29 03:04:36 +11:00
Chris Ward 12c96e21b9 Use the Essentials Maven repository 2013-12-29 00:21:26 +11:00
Chris Ward 1d791fb110 Remove Ant, migrate Netbeans code style to pom.xml 2013-12-27 03:47:13 +11:00
Chris Ward 0384ac5d42 Travis - use Maven to build 2013-12-26 01:19:51 +11:00
SkyBirdSoar def1569fcc 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 7d7e87e63a Pull geoip library from Maven 2013-12-26 01:12:04 +11:00
Chris Ward 8b26c7fc84 Use Ant to replace GroupManager's plugin.yml version 2013-12-22 19:21:19 +11:00
KHobbits 3017d2a7f4 Better matching of zombie and skeleton mobdata to avoid confusion. 2013-12-22 00:12:22 +00:00
KHobbits 23d2ffb134 Add {4} to homeSet TL key, this contains the name of the home being set. 2013-12-21 23:30:12 +00:00
KHobbits ad2f446602 Check command cost permissions prior to teleporting. Fixes ESS-4918 2013-12-21 23:19:58 +00:00
KHobbits bcd5350a4d Add extra /home message TL params
{1} = current home count
{2} = max home count
2013-12-21 17:42:55 +00:00
KHobbits b6b2ee61a4 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 6362dbd5b3 Restore CB to lib folder 2013-12-21 02:39:26 +00:00
Chris Ward ee55584117 Use Bukkit beta build 2013-12-18 17:26:01 +11:00
KHobbits e5b522ed14 Try changing the config file home language up a little bit. 2013-12-17 19:23:28 +00:00
Necrodoom df219db1a4 fix gcWorld in de locale 2013-12-15 12:49:06 -06:00
Necrodoom f8e273767e Add cobweb aliases 2013-12-13 09:23:29 -06:00
Chris Ward 1bfab68932 Change teleport safety checks to use less expensive methods. 2013-12-13 19:41:57 +11:00
KHobbits 901b835ae0 Alter teleport cancel message to reflect config option. 2013-12-13 08:15:28 +00:00
Joshua Popoff 7d8d9d8959 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 b70b58660f Remove Javadocs from the default compile, use the javadoc:javadoc goal to generate them. 2013-12-11 21:50:06 +11:00
Chris Ward 18a6d1761a Merge pull request #609 from Skylexia/patch-1
Fixed all the salmon.
2013-12-10 18:46:51 -08:00
Skylexia 9a197d65a3 Fixed all the salmon. 2013-12-10 20:42:56 -05:00
Iaccidentally b68e451c13 Merge pull request #607 from necrodoom/patch-67
Add new baked potato aliases - thanks clou44
2013-12-08 09:45:16 -08:00
Necrodoom 11949a4315 Add new baked potato aliases - thanks clou44 2013-12-08 19:44:14 +02:00
Chris Ward f52858d058 Strip all Mac OSX characters
Temporary workaround awaiting PR from Bukkit
2013-12-08 20:40:10 +11:00
md-5 90fc19cc7b Fix formatting from last commit 2013-12-08 17:00:53 +11:00
md_5 ddb1f76a26 Strip weird sign chars sent by OSX due to client bug 2013-12-08 16:57:44 +11:00
KHobbits 2584e0ab06 Update config.yml to reflect recent custom message settings. 2013-12-08 04:46:33 +00:00
KHobbits 5dbf4f5a00 Make it so both {world} and {worldname} work for both keyword parsers. 2013-12-07 23:58:47 +00:00
KHobbits af02a28ce5 Update Bukkit
Bukkit: #1859 CB: #2943
2013-12-07 22:26:41 +00:00
Necrodoom 5e9f5904fd Ignore empty chat events generated by plugins 2013-12-07 22:15:01 +00:00
KHobbits 946051de71 Add support for adding item meta to [free] signs.
Fix NPE on [sign] creation.
2013-12-07 20:25:23 +00:00
KHobbits 427b97433e Logger cleanup pt 1. 2013-12-07 20:03:05 +00:00
KHobbits f3b005e331 Cleanup /remove ingame syntax 2013-12-07 19:17:36 +00:00
KHobbits 5b64c31e86 Show warning when invalid mob type is specified for /remove 2013-12-07 19:03:29 +00:00
KHobbits 723e458a81 Remove requires at least one argument. 2013-12-07 18:46:25 +00:00
Chris Ward 309273dc6b 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 d40e331c8a Disable the login message hooks automatically 2013-12-07 14:20:51 +11:00
Chris Ward c57e902173 Fix login messages 2013-12-07 13:44:41 +11:00
Chris Ward e864696b00 Revert "Fixed bug when logging in silently"
This reverts commit 5fe19dbd83.
2013-12-07 13:24:48 +11:00
Iaccidentally fed250fd74 Merge pull request #605 from Phryxiil/2.x
Fixed bug when logging in silently
2013-12-06 18:17:06 -08:00
Zarubinator 5fe19dbd83 Fixed bug when logging in silently 2013-12-06 21:15:27 -05:00
Chris Ward b836b3c041 Who doesn't love a good ol' NPE 2013-12-06 19:01:37 +11:00
Necrodoom 9550ef2a0d Fix glass pane IDs
remove duplicates in items.csv (thanks .itemdbparse)
2013-12-05 23:09:35 +00:00
Chris Ward bac26f966c Cleanup join/quit messages. 2013-12-05 23:08:29 +00:00
Chris Ward 278bb98649 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 3839b6f1f5 Code cleanup 2013-12-05 23:06:04 +00:00
Necrodoom c0a58a5316 Update items.csv to 1.7.2 (beta file version) 2013-12-05 23:03:34 +00:00
KHobbits de7c2be960 Updated translations from crowdin 2013-12-05 23:03:34 +00:00
KHobbits c57c791e69 Cache join/quit messages. 2013-12-05 23:03:33 +00:00
Iaccidentally 1ae2b094f3 Add options to disable join/quit messages and custom join/quit messages 2013-12-05 23:03:33 +00:00
KHobbits dde8cd8f72 Merge remove and killall command, thanks to @Evonuts and @Iaccidentally. 2013-12-05 23:03:33 +00:00
Adam b3bad6a35a Add a title to [Disposal] and [Free] sign inventory 2013-12-05 23:03:33 +00:00
Chris Ward 25e4096a12 Update FakeServer - fixes compilation 2013-12-05 23:03:33 +00:00
KHobbits e411f61296 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 caa3ac88aa Add Balance Update Event. 2013-12-05 23:03:31 +00:00
KHobbits f677d6a411 Tidy up string manipulation in trade signs. 2013-12-05 23:03:31 +00:00
KHobbits 4232216f76 Try to be a little less confusing with non-command debug errors. 2013-12-05 23:03:31 +00:00
KHobbits beef371ae6 Adding saddles to horses should properly tame horses. 2013-12-05 23:03:31 +00:00
Necrodoom 872df26e9d Do not block user damaging self (ender eye) 2013-11-17 19:19:42 +02:00
Joseph Jenniges 8146858ee0 Fix logic error with /kickall in console 2013-11-17 10:04:36 -06:00
snowleo 9b4e6e5dc6 Fix fromIndex = -20 2013-11-15 20:06:16 +01:00
KHobbits 53b1526906 Throw meaningful warnings when wrong Essentials version is used with unsupported mod packs. 2013-11-15 00:22:10 +00:00
Iaccidentally 82be7546d5 Tidy up Commandremove a bit, thanks to Evonuts 2013-11-10 23:25:42 +00:00
Iaccidentally f400f81e4d 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 5d1ea4aa88 Allow ignore to block tpahere requests. 2013-11-09 04:08:25 +00:00
KHobbits 7f8d62be02 Add a couple more enchant aliases for blast protection 2013-11-09 03:40:51 +00:00
Iaccidentally 3e725ef060 Cleanup various aspects of code, fix some formatting, more netbeans 7.4 stuff 2013-11-06 21:22:32 -05:00
Iaccidentally d5196e31b2 Add ability to supress join/leave messages :: new permissions: essentials.silentjoin & essentials.silentquit 2013-11-06 18:05:02 -05:00
Iaccidentally 235f134514 netbeans 7.4 stuff 2013-11-06 18:03:46 -05:00
KHobbits 6af1b923cc Update Bukkit and Craftbukkit jar files for stable 1.6.4
Bukkit: 1848 Craftbukkit: 2912
2013-10-28 00:29:01 +00:00
KHobbits 365888a8f9 Update Translation files from Crowdin:
http://translate2.ess3.net/
2013-10-28 00:21:41 +00:00
FearFree b8f5c9a8e4 Update for consistency.
Signed-off-by: KHobbits <rob@khobbits.co.uk>
2013-10-28 00:10:35 +00:00
FearFree ae89c80d4e 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 7436009ea4 Clarify message when ignoring exempt players. 2013-10-27 23:53:24 +00:00
Chris Ward 84ce3d39d8 Fix automatic versioning when compiling with Maven 2013-10-21 13:50:17 +11:00
KHobbits 9aa88bdf8d Add a little more group based debugging. 2013-10-21 01:20:09 +01:00
KHobbits f36f5ec0ce Add debug log entry when checking permission groups. 2013-10-20 17:45:37 +01:00
KHobbits b1d422ba8f Round up Y position when standing on half blocks. This should address some safelogin bugs. 2013-10-20 02:25:11 +01:00
KHobbits 049577c97e Restore deleted craftbukkit jar 2013-10-20 01:36:22 +01:00
KHobbits 92a9673652 Restore original give/take Money API 2013-10-19 12:26:28 +01:00
Chris Ward 1164bbd90d [Fix] Allow someone to change their nick to different case of the same thing 2013-10-19 12:19:40 +01:00
Chris Ward 4ea629628d Use a player's real name in /balance if they are vanished 2013-10-19 12:19:40 +01:00
Chris Ward 3e9a2377a8 Call Ant from Maven (for GM) 2013-10-19 12:19:40 +01:00
Chris Ward 48261daf89 Fix null pointer exception on kits with meta 2013-10-19 12:19:39 +01:00
Chris Ward 97d176ea27 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 e25e02d154 Add Maven Support 2013-10-19 12:19:39 +01:00
Chris Ward 50a9b5718c Fix double messages in targeted commands 2013-10-19 12:19:37 +01:00
Chris Ward 2615468a08 Remove .idea and *.iml from git 2013-10-18 17:32:47 +11:00
Chris Ward 298e677373 Fix /r 2013-10-18 17:23:27 +11:00
KHobbits 64e089e15b Cleanup 2013-10-18 00:07:35 +01:00
KHobbits be31b1695d Restore getUser API 2013-10-18 00:07:34 +01:00
KHobbits 6f85761f7f Extract CommandSender to CommandSource, this should prevent Ess user object leaks. 2013-10-16 21:05:33 +01:00
KHobbits cf9d79d24c Strip nickname prefix when doing displayname comparison. 2013-10-16 20:54:23 +01:00
Iaccidentally f53240191f Cleanup XMPP PR 2013-10-16 20:53:30 +01:00
patjense 27ee587887 add delayed task for XMPP presence update 2013-10-16 20:52:50 +01:00
patjense 601bdbff46 add XMPP presence management stack 2013-10-16 20:52:50 +01:00
patjense 12bf4e9dcf add update for global presence handler 2013-10-16 20:52:50 +01:00
KHobbits 59b501b2b1 Clean Imports 2013-10-11 03:44:41 +01:00
KHobbits 9e20f556e1 Allow for event based test cases. 2013-10-11 03:34:41 +01:00
Iaccidentally 375caa6f9e implement GodStatusChangeEvent 2013-10-11 03:14:51 +01:00
KHobbits cc34c02623 Update README.markdown 2013-10-07 01:34:42 +01:00
KHobbits cfa367dfc3 Allow recolouring own name. 2013-10-05 05:34:33 +01:00
KHobbits e1ff3542ae Cleanup 2013-10-05 03:27:40 +01:00
KHobbits 4951c204d2 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 122232a0e7 Add more API template and implement nick change event. 2013-10-05 02:11:39 +01:00
KHobbits 03368e45df Extract user match looping 2013-09-28 21:33:22 +01:00
Luke GB e6b76cadbc Adds even more clarification to metrics opt-out 2013-09-25 00:22:11 +01:00
TheReverend403 06e3d33845 Adds clarification to metrics opt-out 2013-09-25 00:18:43 +01:00
drtshock e853199d90 Format to the format with the formatter. 2013-09-24 09:38:30 +01:00
drtshock f7f7c2a68b 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 99c73f3d67 Update to 1.6.4 2013-09-19 21:38:15 -04:00
Chris Ward 6094485992 Cleanup 2013-09-18 22:22:56 +10:00
GunfighterJ 503d39ee55 Update ItemStack reference to getTypeId() 2013-09-17 23:23:45 +10:00
Chris Ward bd5fd2980f Require latest Bukkit RB 2013-09-17 21:08:20 +10:00
GunfighterJ a49895278b Push latest Bukkit RB 2013-09-17 06:06:34 -05:00
GunfighterJ 8d739d6a76 Fix translation typo 2013-09-15 16:43:16 -05:00
KHobbits 3963a528b3 Fix handling max warp pages. 2013-09-10 01:42:11 +01:00
KHobbits 7c686b4b58 Fix case sensitivity on {PLAYERLIST:group} 2013-09-06 23:54:37 +01:00
KHobbits 0a17489c9c Clarify kit errors 2013-09-05 15:40:43 +01:00
KHobbits 0926da3782 Expose other plugins ban masks. 2013-09-04 07:19:30 +01:00
KHobbits c056ba0059 Properly handle negative /clear amounts. 2013-09-04 06:35:53 +01:00
KHobbits df5d9a4db8 Reimplement 'private' keywords. 2013-09-01 00:24:11 +01:00
KHobbits 36c61eaa06 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 9908eb0619 Use Tamed instead of horse/ocelot/wolf 2013-08-31 19:36:41 +01:00
KHobbits 64743ef428 Add support for coloured authors on books
Fixes ESS-4690
2013-08-31 13:20:36 +01:00
KHobbits 2973b1335c Add debug output to keyword replacer 2013-08-30 13:37:49 +01:00
KHobbits 52e9cc6ba1 This tp req cancel isn't needed anymore. 2013-08-30 11:05:27 +01:00
KHobbits 62b4348842 Don't waste cpu on /baltop if eco is disabled. 2013-08-28 18:00:27 +01:00
KHobbits eca3be5cf3 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 3fb4d1f3bf Don't allow buying partial item sets via trade signs. 2013-08-28 13:42:08 +01:00
KHobbits f96359e31c Add another customtext example (including one with multiple aliases) 2013-08-20 23:43:40 +01:00
KHobbits cf79daddde 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 ed007589f3 Add COORDS, UPTIME and TPS keywords 2013-08-20 22:14:29 +10:00
KHobbits b85aaea039 More colour. 2013-08-20 01:51:32 +01:00
KHobbits 3a4e4c59e4 Refresh default motd. 2013-08-19 22:00:30 +01:00
KHobbits 7f27de4bb7 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 a06a81c15d 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 a29e1bfe51 Add support for multiple bookmarks/chapter names
Clean up info file handling
2013-08-19 00:13:49 +01:00
KHobbits 3ccefb49c0 Fix tests 2013-08-18 22:48:13 +01:00
KHobbits 543672a2a8 Reset fall distance when toggling fly so fall damage is not accidentally applied. 2013-08-18 22:43:43 +01:00
KHobbits 8cba8da516 Fix a few issues with /list and group formatting. 2013-08-18 22:08:57 +01:00
KHobbits 3b8df2d18e Fix feed cooldown bypass permission:
Permission: essentials.feed.cooldown.bypass
2013-08-18 21:05:45 +01:00
KHobbits b8cdd7d1f7 Fix NPE in /kill when used from console. Thanks Necrodoom 2013-08-18 21:04:19 +01:00
KHobbits 92a2244650 Add muting offline players
Permission: essentials.mute.offline
2013-08-18 21:02:47 +01:00
KHobbits 75fe543579 Allow alternative command handler to also pass tab complete. 2013-08-15 21:58:23 +01:00
Necrodoom 7bc84d6cad 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 2928e8a99f Use essentials itemdb for charge messages. 2013-08-15 05:47:23 +01:00
KHobbits ffae86dd42 Use user object to send messages when possible. 2013-08-15 01:53:22 +01:00
KHobbits ff41588c3b Gracefully handle botched plugin starts 2013-08-13 23:41:54 +01:00
KHobbits 66eb9202ce Fix mail sendall from console skipping first param 2013-08-13 22:01:13 +01:00
Necrodoom f17ad2c4e7 fix config comment at heal-cooldown 2013-08-13 18:16:40 +01:00
Pocketkid2 794dd788a3 Update Commandremove.java
Fix class checking in /remove
2013-08-13 18:14:40 +01:00
Necrodoom b3cae17cab trim and replace spaces in chapter names to always work in commands 2013-08-13 18:07:27 +01:00
KHobbits 1ac5b4230e Teleport cleanup 2013-08-13 18:06:24 +01:00
GunfighterJ a3cae43f9f Fix NPE in /back when no previous location exists 2013-08-13 11:46:52 -05:00
KHobbits d329d27a4f Restore safe location for /top 2013-08-13 00:55:31 +01:00
KHobbits e9c0bd3bab Prevent inf loop when adding air to kits.
Should fix #4555
2013-08-12 00:26:51 +01:00
KHobbits c43574eab9 Fully support numerical worth yml data. 2013-08-11 23:43:45 +01:00
KHobbits 09e8b87650 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 ee05bf371d Update plugin.yml and add some aliases (Evonuts is going to hate me) 2013-08-11 22:10:56 +01:00
KHobbits fb9fc579d0 Allow toggling vanish for other players
Permission: essentials.vanish.others
2013-08-11 21:48:30 +01:00
KHobbits 8b11b870b1 General cleanup.
Add optional TL param for tempban/mute time in notify message
2013-08-11 21:34:26 +01:00
KHobbits 7401608cc5 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 4cfa3fc3a2 Update Mob.java 2013-08-09 04:38:57 +01:00
Necrodoom 0d9db22d81 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 cc1ae2c243 Update Bukkit for 1.6.2R0.1 beta
CB: 2838 Bukkit: 2252
2013-08-05 04:15:26 +01:00
KHobbits 53faf70d10 Update Translations from crowdin 2013-08-05 00:19:44 +01:00
KHobbits 4d87033771 Force space after group in /list 2013-08-04 23:39:56 +01:00
GunfighterJ b08aaec6c0 Remove duplicate key 2013-08-04 12:53:46 -05:00
Pocketkid2 152cf98a9d Update Potions.java
Add extra alias
2013-08-04 11:38:48 -05:00
KHobbits 12cd467277 More missing syntax. 2013-08-03 02:48:50 +01:00
KHobbits bb7c8c308d Add missing command syntax for /spawnmob 2013-08-03 02:25:42 +01:00
Pocketkid2 c15540862d Update Commandkillall.java
Add support for horses
2013-07-29 21:40:52 +10:00
KHobbits ddc8c07cd7 Restore vault compat 2013-07-26 00:11:37 +01:00
Iaccidentally 0ef4dfd453 Merge pull request #524 from necrodoom/patch-40
fix mobdata typo
2013-07-25 10:51:08 -07:00
Necrodoom f50feedabb fix mobdata typo 2013-07-25 16:44:48 +02:00
GunfighterJ eb22254564 Close inventories before opening any others 2013-07-24 16:01:17 -05:00
KHobbits 3cfde70ec6 Use the correct name in /sethome if you don't have sethome.others permission. 2013-07-23 23:39:44 +01:00
KHobbits f251c9e694 Restore deprecated trade api
Fixes #4500
2013-07-23 22:48:32 +01:00
KHobbits 298da19334 Fix max radius. 2013-07-21 00:04:04 +01:00
okamosy e3c83be37e Refactored and cleaned up SpawnMob. Added context-aware help /spawnmob <mob>: 2013-07-20 21:29:13 +01:00
KHobbits c1e39c7007 Show if a IP is ip-banned on /seen <ip> 2013-07-19 02:25:50 +01:00
KHobbits 59515aed94 Cleanup worth and sell messages 2013-07-19 00:55:21 +01:00
snowleo 4eef8b5e84 Can't sell negative amount of items. 2013-07-19 01:01:52 +02:00
okamosy 8aac502ab6 Added horse armor /spawnmob horse:armor<iron|gold|diamond> 2013-07-17 23:32:25 +01:00
okamosy 3aca9f793b Added saddles to pigs and horses /spawnmob pig:saddle /spawnmob horse:saddle 2013-07-17 23:31:37 +01:00
KHobbits 4483ff40b4 Log notice when chat ignore is blocked by another plugin. 2013-07-17 23:26:26 +01:00
KHobbits e8d9951ee8 Add scaling object cap for usermap, prevent huge memory usage, also config file configurable. 2013-07-17 01:56:27 +01:00
okamosy bf675b230e Added horses to SpawnMob /spawnmob horse:<color><variant><style><chest> 2013-07-16 23:36:11 +01:00
KHobbits ba6fd95247 Fix radius logic 2013-07-15 23:15:35 +01:00
Necrodoom 419f51636a Max near radius 2013-07-15 23:10:55 +01:00
KHobbits f6f71126a1 Add missing param in /remove 2013-07-15 02:43:23 +01:00
KHobbits 1f3e52a4b9 Better handle esschat/GM reloading during async events. 2013-07-15 00:47:17 +01:00
KHobbits 0bfe1ec1de Update Craftbukkit
CB: 2814 Bukkit: 1792
2013-07-14 22:27:57 +01:00
KHobbits 00463a7899 Try to restore basic api functionality 2013-07-14 13:00:03 +01:00
KHobbits 11f87eccb0 Tidy and slightly expand user API 2013-07-14 12:41:27 +01:00
KHobbits 0d2dea41e3 Fix worth display bug 2013-07-14 12:09:49 +01:00
KHobbits 8009c1539a Fix local chat spy tag order. 2013-07-14 01:20:36 +01:00
KHobbits 29ea24f715 Throw syntax error instead of "For input string" 2013-07-14 01:07:59 +01:00
KHobbits a14104c529 Add support for /worth all and /worth hand 2013-07-14 01:03:08 +01:00
KHobbits d044ba2fb9 Whoops, wrong event. 2013-07-13 18:56:18 +01:00
KHobbits 5eb3d9fa42 Wrap ItemDb accessors and move Item string matching to itemdb class. 2013-07-13 18:52:53 +01:00
KHobbits fc63f63de6 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 cd51d718ba [API] flip! (╯°□°)╯︵ ┻━┻ 2013-07-13 13:40:46 -04:00
Iaccidentally 200ad81862 [API] fix implementation? 2013-07-13 12:52:08 -04:00
Iaccidentally c05ad0458f Merge branch 'API' of https://github.com/essentials/Essentials into API 2013-07-13 12:41:31 -04:00
Iaccidentally ecd2484cb9 [API] fix other modules to use new packages 2013-07-13 12:40:50 -04:00
KHobbits 43c2c02336 Fix failing XMPP build. 2013-07-13 17:36:35 +01:00
KHobbits adb5189d42 Add 'No one listening' message stub, will be empty by default and thus not sent. 2013-07-13 17:31:14 +01:00
KHobbits ef3b052c64 Remove old chat hook
Use Bukkit API for local chat handling
Implement localChatSpy event
2013-07-13 17:25:58 +01:00
Iaccidentally f5624d4cb6 [API] remove setters 2013-07-13 11:53:52 -04:00
Iaccidentally 624f7ab9f6 [API] Event framework 2013-07-13 11:48:05 -04:00
Iaccidentally dad348d3d0 [API] Move 2.x API to new package, create dummy classes for compatibility 2013-07-13 11:14:39 -04:00
Iaccidentally 3d0f0062a9 Merge branch '2.x' of https://github.com/essentials/Essentials into API 2013-07-13 10:38:28 -04:00
Necrodoom ab359f678a fix mute message when chatting
deny /mail if muted
2013-07-12 15:22:48 +01:00
GunfighterJ 406c9e807e Add horse to entity spawn protection blacklist 2013-07-11 12:37:09 -05:00
KHobbits d858555263 Don't cast sender to User. 2013-07-11 09:20:52 +01:00
KHobbits 72fd893733 Prevent speed from hitting absolute zero. 2013-07-11 08:58:22 +01:00
KHobbits 9f015c1bda Update TL files from Crowdin, this commit resets untranslated English to new colour scheme. 2013-07-10 22:36:27 +01:00
KHobbits 61ed77b60c Remove unused TL Keys 2013-07-10 22:14:23 +01:00
Iaccidentally e57aa0e088 tweak default setting for max nick length 2013-07-10 11:01:49 -04:00
Iaccidentally 2ad346e84c [FEATURE] Add configurable max nick length 2013-07-10 10:48:14 -04:00
KHobbits aa65a2b349 Update CB to 2808 2013-07-10 00:09:48 +01:00
KHobbits 499a1aee7f Fix TL handling with escaped ' marks. 2013-07-10 00:03:14 +01:00
KHobbits 3377e3483d Fix user comparison. 2013-07-09 09:08:26 +01:00
GunfighterJ 427d8cc4e0 Implement abstract methods 2013-07-08 19:28:24 -05:00
GunfighterJ 4e9a42671f Update to 1.6.2, adds new potion effect types 2013-07-08 19:22:38 -05:00
KHobbits a369f9aabb Standardize translation formatting. 2013-07-07 15:01:00 +01:00
KHobbits 2f4a19a5b8 Update Polish and Swedish translations from crowdin 2013-07-07 14:54:38 +01:00
KHobbits 6d360421f8 Translation cleanup
Allow '' in non format keys
Update French translation from crowdin
2013-07-07 14:52:31 +01:00
Gabriel D 03a10e80b9 Update some new text 2013-07-07 14:13:43 +01:00
KHobbits 1abacf00df More cleanup 2013-07-07 13:02:40 +01:00
KHobbits 3d29248ace Misc cleanup 2013-07-07 12:38:01 +01:00
KHobbits 3f5e2ad85a Whoops, we shouldn't be leaking the user object. 2013-07-07 11:51:12 +01:00
mrarroyo 817174e18f Fix punctuation 2013-07-07 02:17:25 +01:00
Chris Ward df2ab974bc Merge pull request #509 from necrodoom/patch-31
add horse egg
2013-07-02 02:25:49 -07:00
Necrodoom 423a722152 add horse egg 2013-07-02 12:20:20 +03:00
KHobbits 34f6487ba2 Add carpet to safe teleport materials. 2013-07-02 08:02:01 +01:00
KHobbits 522c3e85b2 Add command logging for CommandBlocks and other console types. 2013-07-02 07:16:42 +01:00
Iaccidentally 188a214de9 Merge pull request #503 from necrodoom/patch-26
update items.csv to Minecraft 1.6
2013-07-01 19:48:11 -07:00
GunfighterJ d0795fc3e7 Update Essentials for Bukkit 1.6.1-R0.1-SNAPSHOT 2013-07-01 21:38:27 -05:00
Necrodoom 95a2fce9a6 update items.csv to Minecraft 1.6 2013-07-01 13:03:24 -05:00
GunfighterJ d6ef0e1e50 Close the reader 2013-06-30 07:47:33 -05:00
GunfighterJ f6fd0bdb32 Force reading in UTF-8 from .txt files 2013-06-30 07:40:24 -05:00
Tyler Blair cb052e690c Update Plugin Metrics to R7 2013-06-29 18:05:42 +01:00
Iaccidentally 6af622b6b1 [API] Fix package naming 2013-06-28 15:30:47 -04:00
Iaccidentally dded3cae14 [API] fix references 2013-06-28 15:26:23 -04:00
Iaccidentally 6a3c5694ac [API] Cleanup 2013-06-28 15:21:49 -04:00
Iaccidentally 90c1df7cc7 [API] Remove some unneeded dependencies 2013-06-28 14:58:45 -04:00
Iaccidentally ff8c7b3315 [API] A basic example of a custom event, more to come. 2013-06-28 14:22:18 -04:00
KHobbits 0e43233e46 Add {TEAMPREFIX} {TEAMSUFFIX} and {TEAMNAME} to chat formatting. 2013-06-28 17:12:01 +01:00
KHobbits db234b9837 Force repair inventory refresh. 2013-06-28 14:14:43 +01:00
KHobbits 42b77864cd Minor colour tweak 2013-06-28 13:05:56 +01:00
KHobbits f485cbc48b Make the paging logic even more complicated. 2013-06-28 01:05:56 +01:00
KHobbits 0292cb59cd Drop messageFormat for simple string replace, remove duped ' marks. 2013-06-27 09:33:35 +01:00
KHobbits 3e519f95d5 Don't drop oversized stacks on the ground if player doesn't have oversized permission. 2013-06-26 21:44:34 +01:00
KHobbits 18d0183364 [Fix] Fix toggle syntax in plugin.yml 2013-06-26 08:57:26 +01:00
KHobbits 96cf363567 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 cfc6ed9364 fix socialspy toggles 2013-06-26 09:56:56 +03:00
KHobbits 3de3f00b11 Let's make the default group colour orange. 2013-06-26 01:22:18 +01:00
KHobbits c69c78f15c Don't automatically convert {chatparms} to [chatparams] 2013-06-25 18:04:31 +01:00
Necrodoom 0fdd367098 update items.csv to Minecraft 1.6 2013-06-25 19:04:29 +03:00
KHobbits 1a49cdd140 Fix null values. 2013-06-25 16:34:17 +01:00
ZerothAngel cd4bdb83d4 Add group/prefix/suffix support for zPermissions. 2013-06-25 16:24:23 +01:00
Luuk Jacobs f6fc9777b5 Reword some things, minor fixes and add punctuation.
more tiny fixes
minor unicode fix
2013-06-25 16:20:21 +01:00
KHobbits 9edc68bb2b Merge branch '2.x' of github.com:essentials/Essentials into 2.9 2013-06-25 16:00:32 +01:00
KHobbits 8f1f68f2be Merge pull request #502 from afistofirony/patch-1
Changing a spawner should update its BlockState.
2013-06-25 07:58:46 -07:00
KHobbits c0ed8649d0 Add missing variable. 2013-06-25 15:09:50 +01:00
Sahir f26466831a Changing a spawner should update its BlockState. 2013-06-25 17:07:43 +04:00
KHobbits c92ae00f9f Update KeywordReplacer.java 2013-06-24 13:31:07 +02:00
KHobbits 66355f0ead Update info.txt 2013-06-24 13:29:28 +02:00
KHobbits eeb9c13276 Merge pull request #499 from mozoa/patch-1
Update messages_nl.properties
2013-06-23 15:41:51 -07:00
KHobbits 9300529113 Merge pull request #501 from theudis/patch-6
Update messages_fr.properties
2013-06-23 15:41:30 -07:00
theudis 19e4acfc97 Update messages_fr.properties 2013-06-24 00:18:58 +03:00
KHobbits 1cb9ddf9fe [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 c801bc0173 Update messages_nl.properties
Reworded some strings
and changed the order of words
2013-06-23 16:49:08 +02:00
KHobbits 88d025cd0f Merge pull request #498 from mozoa/patch-1
Added /ci lines
2013-06-22 16:49:48 -07:00
mozoa dc1469105b Update messages_nl.properties 2013-06-22 22:51:38 +03:00
mozoa d3e0966b3f Update messages_nl.properties
Added new CI lines
bit indifferent about line 543 and 544
2013-06-22 22:49:26 +03:00
KHobbits a15e0b3875 [Feature] Expand /ci to allow removing certain amounts, and breakdown on the items removed. 2013-06-22 17:36:35 +01:00
KHobbits 52ba151b81 Clean up exception types. 2013-06-22 16:33:22 +01:00
KHobbits aa6c6b4d48 Fix missing Unicode in NL TL 2013-06-21 11:23:01 +01:00
KHobbits 7648e38ec2 Reduce restrictions on same item trading, so only identical items are blocked. 2013-06-20 21:14:28 +01:00
mozoa a67520477b Update NL locale 2013-06-20 21:07:58 +01:00
KHobbits f8fb8935d7 [Fix] Don't throw the wrong error message when using group limited kit signs. 2013-06-19 21:20:58 +01:00
GunfighterJ 8ae0ea98a3 Merge pull request #489 from necrodoom/patch-23
fix permission check typo (thanks to #4365)
2013-06-18 11:01:17 -07:00
Necrodoom 5338f6b706 fix permission check typo (thanks to #4365) 2013-06-18 20:57:30 +03:00
KHobbits fdb5d85ba5 Merge pull request #488 from necrodoom/patch-21
fix typo in eco warning
2013-06-17 08:19:59 -07:00
Necrodoom 2b4b1520d3 fix typo in eco warning 2013-06-17 16:05:45 +03:00
KHobbits 07bcd17e0f Block external access to unsupported saveConfig() method. 2013-06-17 01:08:42 +01:00
KHobbits 8fb91c5a61 Allow new lines and add secure broadcast keywords. 2013-06-16 01:18:35 +01:00
KHobbits aa6d85eacc Cleanup broadcast, allow limited keywords in. 2013-06-16 01:07:16 +01:00
KHobbits f5986194aa Clarify 'permission-based-item-spawn' config setting. 2013-06-16 00:05:27 +01:00
KHobbits b646bda9d2 Update to 1.5.2 RB:
Bukkit #1776 CraftBukkit #2788
2013-06-15 11:53:47 +01:00
KHobbits fe86f3a01d Reset suffix on /nick even if op and prefix/suffix are disabled. 2013-06-13 09:18:47 +01:00
KHobbits ae2a03d80c 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 e4d7aacc5d no permissions is not an error, so dont output it as a warning 2013-06-12 12:41:15 +03:00
KHobbits 129fd53d5a Merge branch 'temp1' into 2.9 2013-06-11 20:50:24 +01:00
KHobbits 6bf57de64d Merge branch 'release' of github.com:essentials/Essentials into 2.9 2013-06-11 20:46:28 +01:00
Iaccidentally f1eae9be6f Cleanup imports 2013-06-11 20:45:12 +01:00
KHobbits a77c2d6d95 Restore support for replacing CAPITAL colour codes. 2013-06-11 16:38:24 +01:00
KHobbits c476471978 Don't look up valid looking IP's in the player database. 2013-06-09 23:10:02 +01:00
Iaccidentally 8755935fcb 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 9976cc847f Allow use of deprecated teleport function through interface. 2013-06-09 13:38:09 +01:00
theudis 56f86c9ae4 Update messages_fr.properties
Small changes in what I had done previously.
2013-06-09 03:09:20 +01:00
Necrodoom bdb5d095ca Fix arg length checks on /exp 2013-06-09 03:07:35 +01:00
cexikitin f38ed576c5 Alert give sender that the user was unable to receive all the items. 2013-06-09 03:05:40 +01:00
KHobbits 09f67c9723 Split util classes. 2013-06-08 22:31:19 +01:00
KHobbits 98e427e831 Cleanup ITarget 2013-06-08 21:43:42 +01:00
KHobbits ac6b74887f Turn Target into a real class. 2013-06-08 21:40:02 +01:00
KHobbits 7276bcccab Trapdoors should be treated as half blocks, not transparent blocks. 2013-06-08 21:26:11 +01:00
KHobbits a7b62c65b8 Teleport invulnerability should trigger on respawn as well as normal teleport. 2013-06-08 21:06:33 +01:00
KHobbits f48ed6988d Essentials API cleanup and teleport possession fixing. (UNSTABLE) 2013-06-08 19:34:14 +01:00
KHobbits b8300cc35a Throw a little testing on toggle logic. 2013-06-08 16:33:30 +01:00
KHobbits a3e6996ef9 Try and make toggles DRYer without loosing command flow.
Allow socialspy to match multiple players.
2013-06-08 15:13:51 +01:00
KHobbits 34daa5691c Allow spawning zombies without the trademark gold boots.
Also limit armor to zombies and skeletons.
2013-06-05 03:15:12 +01:00
KHobbits 0457705850 Fix unit tests. 2013-06-02 17:56:48 +01:00
KHobbits 5d5fee4612 Attempt to fix /seen times on vanish. 2013-06-02 17:45:56 +01:00
KHobbits 43f4a69760 Mute and sudo should check for essentials.vanish.interact permission. 2013-06-02 16:09:56 +01:00
KHobbits 55cee73a48 Allow spawning zombies with swords too. 2013-06-02 00:09:12 +01:00
KHobbits 51f554827c [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 d6756a2605 [Fix] Set some default mob data.
Fixes skeletons spawning without bows.
2013-06-01 23:33:31 +01:00
KHobbits b065f4a05a Update Essentials spawn to use new kit params. 2013-05-27 02:29:28 +01:00
KHobbits 867bfbf1b8 Better handle kit item casting. 2013-05-27 02:25:30 +01:00
KHobbits 7fe83dbd91 Ignore extra spaces in kit config. 2013-05-26 23:53:39 +01:00
KHobbits 1a4c2e8484 Exempt [repair] signs from 'essentials.repair.all' permissions check. 2013-05-26 22:00:35 +01:00
KHobbits 84874c9855 Update inventory when closing ghost-dupe-able inventory, to remove ghost items. 2013-05-26 18:21:19 +01:00
KHobbits 6512a53a3f Reduce duplicated broadcast code. 2013-05-26 17:58:04 +01:00
KHobbits 423c8c54dc Simplify player matching. 2013-05-26 17:37:11 +01:00
KHobbits 160a1a04eb Standardize /getpos and /whois to use essentials.vanish.interact like all other commands. 2013-05-26 17:20:03 +01:00
KHobbits 88c5b64694 GeoIP already has a perm, doesn't need hidden behind essentials.seen.extra as well. 2013-05-26 16:52:25 +01:00
KHobbits 19451c151e Show teleport cancel messages to tpa user. 2013-05-26 16:49:11 +01:00
KHobbits e4d041b9b0 Fix /helpop for console use. 2013-05-26 16:23:36 +01:00
KHobbits 3bcd3390fe [Fix] Fix vanished player matching in: /seen /give /burn /nuke /tpall /tpaall 2013-05-26 16:02:40 +01:00
KHobbits 35783ee429 Forgot to push Essentials spawn changes. 2013-05-24 00:10:39 +01:00
KHobbits 66911bb0a9 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 d48c342e37 Fixing feed messages. 2013-05-23 22:12:54 +01:00
KHobbits 5c05870490 Improve user matching 2013-05-20 18:50:14 +01:00
KHobbits d76fe946b7 Don't throw NPE on broken sign state, just allow block to break. 2013-05-19 01:21:21 +01:00
KHobbits a738e49e3c Default chat formatting should strip all format codes, not just colours. 2013-05-19 01:03:54 +01:00
KHobbits 9dc6e7ad1e Add indication of when kit's cannot be used yet, in the /kit output. 2013-05-18 23:27:41 +01:00
KHobbits 293406a603 Tidy up /gc's TPS output. 2013-05-18 21:42:02 +01:00
KHobbits 727c53eb2b [Feature] Add hunger level to /whois 2013-05-18 18:20:06 +01:00
KHobbits 274ad06665 Fix null when trying to tempban players in console for times longer than max ban. 2013-05-18 17:57:05 +01:00
KHobbits 5e6f6b2482 Tweak /baltop to not show displaynames on vanished players. 2013-05-12 21:19:54 +01:00
KHobbits 29c9a46c2f Tiny listener optimizations. 2013-05-12 20:59:07 +01:00
KHobbits 6d317fd26d 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 8ebe55a294 Make the lag warning configurable, useful to debug economy lag on larger servers. 2013-05-12 16:10:41 +01:00
KHobbits af2c514f2a Throw console warning on slow economy api call. 2013-05-12 04:12:34 +01:00
GunfighterJ 3042151fee [Fix] Check initial direction when looking for a safe teleport spot 2013-05-10 11:21:39 -05:00
KHobbits 59f67acfd0 Don't treat AFK players as god mode when dealing with food regen. 2013-05-09 17:44:10 +01:00
snowleo 7051801a85 Update ItemDb.java 2013-05-08 00:53:37 +03:00
snowleo 0d02b91506 Doesn't need this 2013-05-08 00:52:39 +03:00
KHobbits 5f6cca83ce [Feature] Withdraw from trade signs without dropping items as overflow. [EXPERIMENTAL] 2013-05-06 23:09:31 +01:00
KHobbits ed5743147b Add some sign debugging to /ess debug to help track down charging issues. 2013-05-05 22:37:28 +01:00
KHobbits 1bb7946e13 Couple more bits of Eco cleanup 2013-05-05 20:05:28 +01:00
KHobbits 9ec1a6b78f Fix /sell to handle zero priced items again. 2013-05-05 19:59:35 +01:00
snowleo 76a96d1004 Make it compatible with Factions again. 2013-05-05 19:00:21 +03:00
snowleo b49aaee66d Catch both exceptions in EssentialsConf and valueOf instead of new 2013-05-05 11:55:39 +02:00
snowleo 0d34b9ae9f Cleanup 2013-05-05 11:42:53 +02:00
snowleo 6044cca54f ECONOMY MADNESS? THIS IS … FIXED 2013-05-05 11:41:19 +02:00
snowleo aaebb6143e fix NPE in teleport code 2013-05-05 11:08:49 +03:00
KHobbits c4ac744d35 Further economy cleanup 2013-05-05 08:03:06 +01:00
KHobbits 162b67aaa6 Cleanup player argument matching in loops
Cleanup ess cleanup timestamp matching
2013-05-05 07:15:33 +01:00
KHobbits 2d70bb19f7 Economy Madness 2013-05-05 05:12:17 +01:00
KHobbits 801acbb004 Trim stored precision to below that of a double, to prevent rounding issues. 2013-05-05 01:23:07 +01:00
theudis aeb1b4601c Update messages_fr.properties 2013-05-04 21:56:32 +01:00
KHobbits f5b32f51aa Update CS translation with some extra TL keys from tommymortago 2013-05-04 19:34:55 +01:00
KHobbits 0b20055f60 Sorted TL files 2013-05-04 19:22:44 +01:00
pa001024 2f30064ab4 update zh-locate 2013-05-04 18:32:44 +01:00
Necrodoom a65d0db57d Throw invalid kit message on invalid delay 2013-05-04 18:26:34 +01:00
KHobbits 479dad9966 cleanup 2013-05-04 18:22:55 +01:00
KHobbits b7acccfc8b [Feature] Make /kit list kit costs if any are set. 2013-05-04 18:11:35 +01:00
KHobbits fbcfd4948b Merge pull request #465 from skmedix/patch-1
Update Polish translation
2013-05-04 08:55:18 -07:00
KHobbits cdbdb5e8e9 [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 6e20275cc7 [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 aac9e4884d Remove User instance from Teleport class 2013-05-03 01:53:54 +02:00
snowleo ddb3b13931 Don't trust File.length() 2013-05-03 01:26:51 +02:00
snowleo c62f762724 Do not keep hard references to User objects 2013-05-03 01:15:02 +02:00
snowleo 4bdeb1324d *angry eyes* 2013-05-03 00:25:07 +02:00
snowleo 555a300378 Fix cleanup to not hold Users in memory. 2013-05-03 00:12:40 +02:00
Iaccidentally ebc6b14284 Update libs for 1.5.2 :: Minimum CB version now 2763 2013-05-02 11:54:05 -04:00
SKmedix 041fa8537d 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 7bbceed491 Minor cleanup 2013-04-30 12:57:38 -04:00
Iaccidentally 7a46de6b02 Fix some tl keys :: update Portuguese translation 2013-04-30 12:26:09 -04:00
Iaccidentally 1ab2a51550 API & misc cleanup 2013-04-30 12:25:25 -04:00
Iaccidentally 42dc6a2e07 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 9ba9223632 Support /me in console 2013-04-30 02:24:30 +01:00
KHobbits c4173c0486 Allow powertool to be set from console. 2013-04-30 02:18:22 +01:00
KHobbits 049886797b Fix tests. 2013-04-30 01:50:02 +01:00
KHobbits a43cbe061a Move spawnmob.stack perm check to the right place. 2013-04-30 01:37:39 +01:00
KHobbits 9d2358ed4d [Fix] Stacked mobs count towards spawnmob-limit count. 2013-04-30 01:04:40 +01:00
KHobbits 7913cfdb3c Fix currency rounding up. 2013-04-30 00:35:39 +01:00
KHobbits 137d0df9dc Fix TL messages. 2013-04-30 00:18:53 +01:00
KHobbits d425ab5f93 Fix Eco take bug and fix NPE 2013-04-30 00:07:28 +01:00
KHobbits 012741fea6 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2013-04-29 23:50:49 +01:00
GunfighterJ 006f996283 Remove ArrayListInput
Formatting
2013-04-29 14:04:59 -05:00
main() 538a2425c5 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 79bdd8a212 Add keyword replacements in kits
Add SimpleTextInput constructor for lists
Variable refactoring for clarity.
2013-04-29 06:31:08 -05:00
Iaccidentally 28cbac6610 cleanup last commit a bit 2013-04-28 17:22:11 -04:00
Iaccidentally 0a03696983 [API] Add a warp api, with future 3.x support :: minor cleanup 2013-04-28 16:23:45 -04:00
KHobbits f0ab66c4c6 Fix ZH TL messages 2013-04-28 14:18:19 +01:00
pa001024 57184f01e9 Add China/Hong Kong/Taiwan Translations 2013-04-28 14:12:21 +01:00
Iaccidentally 02df03a4b1 [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 3396cf6e02 [Fix] Try singular and plural entity names in /remove. 2013-04-28 04:26:39 +01:00
Necrodoom e60f17bb53 Fix radius in /remove and add world.
Fix SocialSpy
Fix /killall world argument.
2013-04-28 04:20:28 +01:00
Necrodoom eb0c71984c [Feature] Add /socialspy other 2013-04-28 03:44:24 +01:00
KHobbits 865b581d06 Update Polish translation by skmedix 2013-04-28 03:31:18 +01:00
Necrodoom b093111920 [Fix] Output proper message if typo'd kit 2013-04-28 03:22:31 +01:00
snowleo c55e52539e Update Commandgc.java 2013-04-23 08:57:22 +03:00
snowleo 1dfad57c6f Derp, still need currentTime 2013-04-23 08:55:02 +03:00
snowleo 6148583fb2 Fix tps after Timer changes 2013-04-23 08:51:25 +03:00
snowleo 9160410a50 Allow to forceSave conf files 2013-04-23 00:47:45 +02:00
snowleo 2588e20140 Delayed write to file (experimental) 2013-04-22 23:31:11 +02:00
U-SFX\wardcg e291633ac8 Merge remote-tracking branch 'origin/groupmanager' into 2.9 2013-04-23 01:02:31 +10:00
KHobbits dfc62bca76 Minor TP and timer tweaks. 2013-04-22 00:11:13 +01:00
KHobbits f48871ff29 Attempt to smooth out timer usage.
Add extra sign metrics.
2013-04-21 23:39:50 +01:00
snowleo c2eb7b05b3 Restrict EssentialsTimer to 10ms execution time 2013-04-22 01:23:21 +03:00
Iaccidentally 547e262061 [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 62942bdb3d 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 e8c2a9792f Merge pull request #452 from evonuts/groupmanager
Minor grammatical changes to config.yml
2013-04-19 09:57:16 -07:00
Necrodoom f1bc7a305a [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 fd0134227c Fix NPE on invalid enchant 2013-04-19 10:06:43 -05:00
evonuts 59c833aa9e Minor grammatical changes to config.yml 2013-04-19 12:13:09 +12:00
Iaccidentally f6e2db1eda [Feature] Add a blacklist for what dispensers can dispense to antibuild 2013-04-16 17:01:01 -04:00
Iaccidentally eeb31e054f [UPDATE] Update to 1.5.1-r0.2 beta build 2013-04-16 16:59:36 -04:00
Iaccidentally 4629cad99b Clean up last commit 2013-04-16 16:16:07 -04:00
Iaccidentally 5e360995eb [FIX] Update user activity when shooting a bow 2013-04-16 15:58:13 -04:00
GunfighterJ a72777d043 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 39d66b1c43 Changing that name too, thanks jomp16 2013-04-14 12:30:30 +03:00
snowleo 9a3295439b Threading Fix 2013-04-14 04:44:16 +03:00
KHobbits 656a40abb2 Remove duplicate perm. 2013-04-13 23:50:17 +01:00
KHobbits 7e80f440ca Check threading on backup init. 2013-04-13 23:10:09 +01:00
GunfighterJ e353ec7f66 Merge pull request #438 from GunfighterJ/2.9
Add Romanian translation
2013-04-08 17:27:16 -07:00
GunfighterJ bacb84a943 Add Romanian translation 2013-04-06 17:13:59 -05:00
GunfighterJ bac2b3f878 [Feature] pweather command 2013-04-06 16:20:12 -05:00
snowleo 8f41cc07e3 Still need that check 2013-04-06 18:40:42 +03:00
snowleo 4f033d8073 Math fail 2013-04-06 18:38:49 +03:00
snowleo 284d7a23ca Fix § at end of line 2013-04-06 18:37:13 +03:00
KHobbits 8777410d30 Balance others message. 2013-04-06 05:54:44 +01:00
KHobbits 3356db080a Fix group name when using wildcard group definitions. 2013-04-06 05:05:28 +01:00
ementalo 55e8aa765b Remove GB from main build.xml 2013-04-04 20:49:55 +01:00
ementalo d2ee2e3646 [update] Remove GroupBridge 2013-04-04 20:45:09 +01:00
KHobbits d9a6974ae2 Missing file update. 2013-04-04 08:45:08 +01:00
KHobbits 641fbca40c Update Bukkit for 1.5.1-R0.1 Beta.
CB: 2735 Bukkit: 1741
2013-04-04 08:39:57 +01:00
Paul A. 11fafb5339 Merge pull request #435 from GunfighterJ/2.9
[Fix] NPE on ptime from console
2013-04-02 08:31:42 -07:00
GunfighterJ e4b04db412 [Fix] NPE on ptime from console 2013-04-02 10:21:20 -05:00
Iaccidentally 93b76446f5 Merge pull request #431 from GunfighterJ/2.9
Show Geolocation in /seen
2013-04-01 14:20:42 -07:00
GunfighterJ e3183e66df Show Geolocation in /seen
Refactor argument for clarity
2013-04-01 16:00:09 -05:00
KHobbits 9d1f25c455 Block sign interact if player is dead. 2013-04-01 05:23:04 +01:00
KHobbits 9fe226b79a Merge pull request #428 from necrodoom/patch-15
readd "forest" and "jungle"
2013-03-31 08:27:26 -07:00
Necrodoom 228ecd2a5c readd "forest" and "jungle" 2013-03-31 18:26:38 +03:00
KHobbits 4eb6c9b54f For group overflow, add a little colour. 2013-03-30 02:40:20 +00:00
KHobbits c093b6e7c2 Use original casing in config file group name. 2013-03-30 02:36:09 +00:00
Iaccidentally 757a41f890 [FIX] add itemframe support to remove 2013-03-29 22:20:54 -04:00
KHobbits 8427b41e30 Prevent sign healing when the player is recently dead. 2013-03-29 14:37:30 +00:00
SKmedix 159cbba809 Update messages_pl.properties
Update Polish translation.
2013-03-29 03:19:43 +00:00
Necrodoom 8604debc4e [Fix] Allow console to afk others 2013-03-29 03:16:18 +00:00
Necrodoom 22efa3e000 wipe too general log name aliases 2013-03-29 03:13:03 +00:00
Necrodoom 578576e317 [Fix] Sudo allowed on vanished players. 2013-03-29 03:10:45 +00:00
Necrodoom 98aa303ff5 prevent confusion at /ci code 2013-03-29 03:04:54 +00:00
KHobbits c857832759 Spacing. 2013-03-29 03:01:53 +00:00
KHobbits aab6af768d Fixing casing and formatting issues in /list 2013-03-29 02:59:55 +00:00
KHobbits 879560092f 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 411b4e2b8f another string fix. 2013-03-28 16:08:59 +00:00
ElgarL 519785d09f More Necrodoom fixes. 2013-03-28 15:38:18 +00:00
ElgarL 231f9d49c1 Fix loops. 2013-03-28 13:10:17 +00:00
ElgarL e15a8c50d6 Merge pull request #371 from necrodoom/patch-72
add new commands and others
2013-03-28 05:59:35 -07:00
Luuk Jacobs 386b73dbdb [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 c7f62700d5 Merge pull request #409 from GunfighterJ/2.9
[Feature] Stack more mobs with /spawnmob
2013-03-22 14:39:55 -07:00
GunfighterJ 85741288ce [Feature] Stack more mobs with /spawnmob
Uses same syntax, now supports more than 2 mobs
2013-03-22 16:35:01 -05:00
KHobbits 566a826cf1 Abort user login code, if user disconnects before it runs. 2013-03-21 22:30:02 +00:00
KHobbits 28e069eb6b Don't allow an empty list value. 2013-03-21 21:41:30 +00:00
KHobbits 44584b11c5 Tweak ess version 2013-03-21 21:12:58 +00:00
KHobbits b8e079ddcb Add the max-walk-speed config variable back to the default config file. 2013-03-20 23:24:45 +00:00
SKmedix 35792f9728 Update messages_pl.properties
Update Polish translation.
2013-03-20 08:53:00 +00:00
KHobbits 353423efec Use correct getPlayer method to not match offline users. 2013-03-20 01:29:54 +00:00
KHobbits 889157371c [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 896e14670f Add some missing hidden checks 2013-03-19 23:24:06 +00:00
KHobbits 8f6c61fa99 Try to unify player matching for hidden users:
kill, lightning and ptime still need cleanup
2013-03-19 23:17:34 +00:00
KHobbits 1d6ac42311 [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 61b115ceac Don't close inventories every plugin disable, just our own. 2013-03-19 21:05:12 +00:00
Necrodoom a5ec8b9cbb [Fix] Print correct sender name on /spawn player from console. 2013-03-19 20:59:02 +00:00
Necrodoom 5af1f50b65 Fix exception in /heal, "playernotfound" should be exception. 2013-03-19 20:56:50 +00:00
KHobbits 093611fb2a Use original case for default /list groups. 2013-03-19 18:34:28 +00:00
KHobbits 709ddae508 readmeupdate 2013-03-19 14:32:23 +00:00
Necrodoom cac53ab12e kittycannon should actually fire kittens 2013-03-19 14:31:34 +00:00
Necrodoom df55e162d4 console should be able to mute admins 2013-03-19 14:09:30 +00:00
Necrodoom ea9bf854cc [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 f5c17fc7c7 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 2dda15d47f Add Travis notifications 2013-03-18 23:48:01 +00:00
KHobbits d9485cea8d Try different ant command 2013-03-18 23:35:00 +00:00
KHobbits e728236dd3 Travis 2013-03-18 23:27:15 +00:00
KHobbits fe28faf79d Merge pull request #396 from GunfighterJ/2.9
Allow potion clear/apply commands to work
2013-03-18 16:20:45 -07:00
KHobbits 66e87bdd1c Minor code cleanup 2013-03-18 23:15:18 +00:00
KHobbits 4b5cc8cfd8 Cleanup: Run Kukes code through a dryer, add more comments. 2013-03-18 22:43:05 +00:00
GunfighterJ 8b97a84652 Allow potion clear/apply commands to work 2013-03-18 11:21:28 -05:00
KHobbits 16ca842929 Edit default config to not cause confusion. 2013-03-18 08:59:40 +00:00
KHobbits 984eca9723 Cleanup: Comment and simplify /list code - More to do. 2013-03-18 08:53:12 +00:00
KHobbits 5b55fd97e6 Cleanup - Split /list into methods 2013-03-18 08:16:34 +00:00
kukelekuuk00 0c82c61574 fixes and addition of '*' to match all unmatched users. 2013-03-18 06:16:02 +00:00
kukelekuuk00 32099a4109 Added /list [group] and some more detailed configuration regarding /list 2013-03-18 06:16:02 +00:00
GunfighterJ ce51a07bf1 Potion erroring and duration/power fix 2013-03-18 06:14:44 +00:00
Necrodoom 5e4659e6ae update IDs 27, 28, 66, 157
update rails aliases to match bukkit item names
2013-03-18 06:14:00 +00:00
GunfighterJ 2f96ef1e97 [Fix] Potion erroring and duration/power fix 2013-03-17 13:34:10 -05:00
KHobbits 5ea1bdec56 [Fix] Restore /speed command's ability to control walk speed. 2013-03-17 06:38:24 +00:00
KHobbits f338d3c135 Fixing TL edit error. 2013-03-16 12:17:13 +00:00
Necrodoom 20d019383f Update messages.properties
fix typos in new messages
2013-03-16 12:15:57 +00:00
KHobbits ee080e56c2 Fix raw bukkit itemdb lookup 2013-03-16 12:11:03 +00:00
KHobbits d9a238fb80 Cleanup open inventories 2013-03-16 11:01:56 +00:00
KHobbits 3ddf883d5d Import cleanup 2013-03-16 09:19:30 +00:00
KHobbits 1111254e46 Fix potion effect errors 2013-03-16 09:13:21 +00:00
KHobbits 6185581962 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 24a9a74fd5 We use tabs not spaces for indenting. 2013-03-16 08:43:52 +00:00
KHobbits 208d673c2b Check health is 0 after /suicide 2013-03-16 08:42:24 +00:00
KHobbits 2b0506de77 Fix missing /ci syntax update. 2013-03-16 08:32:21 +00:00
Alexander Schepp d63e259461 Merge pull request #388 from GunfighterJ/2.9
[Feature] Additional spawnable mob types
2013-03-15 13:44:43 -07:00
GunfighterJ c8a867be38 [Feature] Additional spawnable mob types 2013-03-15 15:41:23 -05:00
Alexander Schepp 734286e8d3 Merge pull request #387 from GunfighterJ/2.9
Initial 1.5 update
2013-03-15 12:59:50 -07:00
GunfighterJ 96c5bebdf2 Initial 1.5 update 2013-03-15 14:54:51 -05:00
Alexander Schepp fc96d7e0e9 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 fa445790e7 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 20b61a6147 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2013-03-14 18:01:50 +00:00
Iaccidentally c61abadd91 Merge pull request #385 from Skylexia/patch-1
[Fix] Fixing message (Tl key).
2013-03-13 17:41:10 -07:00
Skylexia 89c1cc5503 Fixing message. 2013-03-13 20:23:01 -03:00
KHobbits db86648b84 Fix missing console notifications on /unban and /unbanip 2013-03-12 22:26:24 +00:00
Necrodoom e68035cc7a [fix] trying to AFK others should work now 2013-03-11 15:36:12 +02:00
KHobbits 895c14430a Fixing ban ip broadcast notification. 2013-03-11 10:33:59 +00:00
KHobbits 664fe18bbe Fix Essentials version display 2013-03-11 02:01:57 +00:00
KHobbits e60c65cfc5 Fixed lost TL. 2013-03-10 23:43:13 +00:00
Skylexia-PC 6b70899484 Shows IP unbans to online staff. 2013-03-10 23:41:17 +00:00
Necrodoom 973e918d3a readd some checks 2013-03-10 14:42:03 +02:00
KHobbits 5cfb9326f6 Merge pull request #380 from Skylexia/2.9
[Feature] Broadcast unbans to online staff.
2013-03-10 00:38:09 -08:00
Skylexia-PC 16857da2b4 Update tl properties to remove unused properties. 2013-03-10 04:37:04 -04:00
Skylexia-PC ee7b50a014 [Feature] Broadcast unbans to online staff. 2013-03-10 03:22:35 -04:00
KHobbits 56bd973e94 Use lower locale. 2013-03-10 02:04:11 +00:00
KHobbits 9ff0571cea Protect us from npe. 2013-03-10 02:01:59 +00:00
Iaccidentally fc019af9f6 Merge pull request #379 from GunfighterJ/2.9
Allow potion meta to work
2013-03-09 16:46:59 -08:00
GunfighterJ 937ef0bb85 Allow potion meta to work
Instead of denying if they have perms
2013-03-09 18:38:59 -06:00
KHobbits 45fe5f2c02 Fix TL key casing. 2013-03-09 21:41:30 +00:00
KHobbits b1f427d52e [Fix] Allow /nick to change nickname case, without adding prefix character. 2013-03-09 14:24:19 +00:00
KHobbits 46e9471a63 [Fix] Move allowunsafe enchant perm to: essentials.enchantments.allowunsafe 2013-03-09 14:02:34 +00:00
KHobbits 4d9685e10d [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 fd3cdde354 fix alias 2013-03-09 15:12:15 +02:00
KHobbits d93719ebcf Merge pull request #378 from Skylexia/2.9
Fixing exp trading type.
2013-03-08 14:08:08 -08:00
Skylexia-PC 63b2766e2b Fixing exp trading type. 2013-03-08 17:04:54 -05:00
KHobbits 6d552281d4 Allow item/item trades still. 2013-03-08 12:34:11 +00:00
KHobbits 6436baf7a4 Merge pull request #370 from necrodoom/patch-71
[fix] EssentialsAntiBuild shouldn't run without Essentials
2013-03-08 04:01:08 -08:00
KHobbits 896298a9e8 Clean up meta error messages.
Add enchant perm checks back.
2013-03-07 03:17:58 +00:00
KHobbits 7d0fafd084 Don't check people for meta perms when using kits. 2013-03-07 02:57:25 +00:00
KHobbits 32d44eb13d Merge pull request #375 from GunfighterJ/patch-15
[Feature] Adds meta permissions
2013-03-06 18:46:55 -08:00
KHobbits c275626bee [Fix] Prevent same item type trades on signs, prevents amount confusion scams. 2013-03-07 02:42:47 +00:00
KHobbits 861b04b680 Fix cleanup comparison number base 2013-03-06 23:39:11 +00:00
KHobbits d8e4862e82 Add cleanup logging to debug mode. 2013-03-06 22:36:36 +00:00
GunfighterJ 4aaf0eda79 [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 2f9dcfee16 Fix a color code mistake. 2013-03-06 20:46:19 +00:00
KHobbits 292f8a8799 Sort TL files. 2013-03-06 17:44:05 +00:00
Necrodoom ec87104c57 add armor aliases since new leather names 2013-03-05 18:56:40 +02:00
KHobbits d7588e61bc [Fix] Unify item spawning permissions in /give 2013-03-03 20:33:23 +00:00
Necrodoom 061794e86d add mising isopoverride check 2013-03-03 18:35:05 +02:00
KHobbits b9285b2aeb Merge pull request #372 from skmedix/patch-21
Update messages_pl.properties
2013-03-02 09:43:35 -08:00
SKmedix 2187b7536e Update messages_pl.properties
Update Polish translations.
---
Date: 2.03.13

---
Added "playerBanIpAddress" (27)
2013-03-02 18:41:04 +01:00
KHobbits 86c0767833 Fix /banip so it compiles, also throw it through a DRYer. 2013-03-02 17:08:22 +00:00
Necrodoom 090c1f6f83 Include IP address when banning IP 2013-03-02 17:08:16 +00:00
Necrodoom 69c40a2f1a add new commands, add alias to listgroups 2013-03-02 10:03:45 +02:00
Necrodoom 42edd14939 Update GroupManagerPermissions.java 2013-03-02 09:56:38 +02:00
Necrodoom dba47cb44c 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 b020983471 messages fix, add /manuclearp and /mangclearp 2013-03-01 20:48:12 +02:00
ementalo 13efbb666d Remove reference to c3p0 from build.xml 2013-02-28 21:23:33 +00:00
ementalo 8d77a3f941 [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 8f785598b0 [fix] essantibuild shouldnt run without essentials 2013-02-28 19:04:05 +02:00
KHobbits 58b1b34e44 Merge pull request #369 from TheReverend403/2.9
Fix geoip messages
2013-02-28 05:32:42 -08:00
Lee Watson ffbc05144c Updated ALL local files 2013-02-28 13:23:28 +00:00
KHobbits 207a8d1b4f Merge pull request #364 from necrodoom/patch-69
deny empty warp name
2013-02-28 04:55:40 -08:00
KHobbits 919f3abe6d Merge pull request #357 from skmedix/patch-20
Update Essentials/src/messages_pl.properties
2013-02-28 04:53:58 -08:00
KHobbits c1f66fc817 [Fix] Charging players at wrong point in /spawn 2013-02-28 12:52:22 +00:00
KHobbits 8d2b10d783 Add extra trade log messages for sign charges. 2013-02-28 03:15:21 +00:00
Necrodoom 38b7fa64fa deny empty warp name 2013-02-26 19:07:10 +02:00
ElgarL f5ed4dd6cd 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 17dab04094 Merge pull request #362 from necrodoom/patch-67
fix a few groupmanager.java errors
2013-02-26 06:43:31 -08:00
Necrodoom 308f05b8bf change commandblock message 2013-02-26 13:05:45 +02:00
Necrodoom 48db088fb4 fix a few groupmanager.java errors 2013-02-26 12:27:05 +02:00
Necrodoom 9965e41567 add catches for the last 2 config settings 2013-02-26 12:17:26 +02:00
Iaccidentally 0ddcfafbc0 This is still needed. 2013-02-25 22:44:52 -05:00
KHobbits 6f55e4b316 Revert "[Spawn] Please join me in welcoming EssentialsSpawn to Java 1.6 and modern bukkit.
This reverts commit a11e8d4236.
If you don't understand the code, don't touch it.
2013-02-26 03:30:11 +00:00
Iaccidentally de91073dda Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-02-25 22:01:49 -05:00
Iaccidentally a11e8d4236 [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 bf8f0365d9 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 d5f702f2cb [Protect] Prevent creepers from breaking paintings if their explosions are disabled.
Backport from 3.0
2013-02-25 17:15:20 -06:00
ElgarL c1b4ed5920 Show the world a group change is made in when using notify. 2013-02-25 14:11:42 +00:00
ElgarL cc83553d72 Store worldSelection indexed on the senders name rather than the object
(fixes commandblocks using manselect).
2013-02-25 13:49:18 +00:00
ElgarL 643a9be985 Only prevent adding nodes with '/manuaddp' and '/mangaddp' if they are
exact matches (not wildcards).
2013-02-25 12:47:23 +00:00
ElgarL 9f13653be6 Warn when adding a node where an exception already exist. 2013-02-25 10:46:16 +00:00
ElgarL 5f5a9adf31 Don't allow adding a node with '/manuaddp' and '/mangaddp' which is
already negated.
2013-02-25 10:27:01 +00:00
ElgarL 29746df914 Fix setting of accessLevel on User level permission tests. 2013-02-25 10:11:44 +00:00
SKmedix c3b42993de 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 964bdc6d30 [Feature] Allow IP lookup in /seen command.
[Permission] essentials.seen.ipsearch - allows /seen <ip address>
2013-02-24 03:55:20 +00:00
KHobbits 3d5aa40965 Clarify vanish status a little. 2013-02-23 23:34:31 +00:00
Iaccidentally 26352ac6b6 Merge pull request #352 from GunfighterJ/patch-15
[Fix] Persist yaw and pitch on teleport
2013-02-23 11:57:15 -08:00
KHobbits 00ec717e7d Merge pull request #356 from skmedix/patch-19
Update Essentials/src/messages_pl.properties
2013-02-23 05:26:21 -08:00
skmedix f70015e8c5 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 399be38680 Merge pull request #355 from necrodoom/patch-63
add "all_unnamed_worlds" info
2013-02-22 12:47:12 -08:00
Necrodoom 3bceecdfb6 fix typo 2013-02-22 20:49:57 +02:00
Necrodoom 68b95c668d add "all_unnamed_worlds" info 2013-02-22 20:48:09 +02:00
ElgarL a7648c7c12 Only one error this time Necrodoom :) 2013-02-22 17:21:14 +00:00
ElgarL bda3c32370 Merge pull request #353 from necrodoom/patch-61
various messages fixes - This better work!!!!!!
2013-02-22 09:19:56 -08:00
ElgarL 9ce067a7fd Fix global mirroring of non main worlds. 2013-02-22 17:07:55 +00:00
Necrodoom ef7d323902 various messages fixes 2013-02-22 19:07:01 +02:00
GunfighterJ b83a8eccee [Fix] Persist yaw and pitch on teleport
Vanilla bukkit/MC persists yaw on teleport
2013-02-22 10:56:39 -06:00
ElgarL 51ddcdcf87 Merge pull request #351 from GunfighterJ/gm-patch-1
Receive was spelt wrong
2013-02-22 05:56:53 -08:00
GunfighterJ 8ca738a436 I before E except after C 2013-02-22 07:50:54 -06:00
ElgarL f9b5d74f6d Do not list "all_unnamed_worlds" as a selectable world. 2013-02-22 13:17:58 +00:00
ElgarL 8960417d56 Don't try to use the worldHolder before it's initialised. 2013-02-22 12:59:50 +00:00
ElgarL 90730f63d5 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 13e07f64ec '/manselect' will no longer list duplicate worlds. 2013-02-22 11:46:59 +00:00
KHobbits 6308b1ecf3 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 dff7e81b7f 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 bf0a11e4fe Cache teleport invulnerability time 2013-02-20 13:46:28 +00:00
Chris Ward c9efe14ad3 Final! 2013-02-20 12:46:47 +11:00
KHobbits 64ee6b7914 Readme cleanup. 2013-02-20 01:39:04 +00:00
KHobbits 6ae6c51dc0 Code cleanup 2013-02-19 23:06:04 +00:00
kukelekuuk00 8710a133ce 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 32b1ce9e39 add 1.5 new slab blocks 2013-02-19 19:47:49 +02:00
Necrodoom c982592674 update items.csv to minecraft 1.5
dont pull till 1.5 bukkit devbuild
2013-02-19 13:35:29 +02:00
Chris Ward ff02f0e270 Merge pull request #341 from necrodoom/patch-59
fix rest of "posion" aliases
2013-02-19 02:26:44 -08:00
Necrodoom 8f52908eed fix rest of "posion" aliases 2013-02-19 11:46:26 +02:00
GunfighterJ 8f8fc4a08d Fixes Necrodoom's code Needs more exception 2013-02-18 15:25:09 +00:00
Necrodoom e63276242c make sure player isnt dead before healing 2013-02-18 15:08:55 +00:00
KHobbits 3ddbeea45a Fix socialspy command list. 2013-02-17 18:05:07 +00:00
ElgarL 7f972801bf Fix Necrodooms code...again! 2013-02-17 17:24:52 +00:00
ElgarL 36e354388c Merge pull request #338 from necrodoom/patch-57
if variable is inside ' ', strip them
2013-02-17 09:22:36 -08:00
ElgarL bbd0021a8b Merge pull request #328 from necrodoom/patch-53
delete player command messages, bukkit does it
2013-02-17 09:21:12 -08:00
Necrodoom 880fb29b44 if variable is inside ' ', strip them 2013-02-17 19:09:04 +02:00
KHobbits 31f3662101 Clarify command disabling. 2013-02-17 16:30:05 +00:00
Necrodoom 5f2c759a8f fix auto afk description 2013-02-17 16:26:18 +00:00
KHobbits a91cfbf43a Merge pull request #334 from necrodoom/patch-54
add skull alias to head item
2013-02-17 08:17:10 -08:00
Necrodoom 33fa32cbff add skull alias to head item 2013-02-17 18:15:48 +02:00
snowleo 69e941670f why do we even remove the items?
derp
2013-02-17 15:34:49 +01:00
snowleo af10a2050a Revert the last 2 commits and actually fix the right one. 2013-02-17 15:17:47 +01:00
snowleo ce9e630072 Fix all removeItem()
This could fix some broken logging of selling items
2013-02-17 15:10:41 +01:00
snowleo ef063c255e Items can't be reused after the have been used in removeItem 2013-02-17 15:07:32 +01:00
KHobbits 0e7d64f9e7 Fix a couple of cosmetic errors in /seen 2013-02-17 01:18:50 +00:00
Skylexia 2a91f593de 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 9186ca2c9a 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 f1e4e49779 Adds optional argument to clear inventory and armor with /clear 2013-02-15 12:38:41 -06:00
ElgarL 3740f200f8 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 5840c02efc 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 f16907412d Add a method to write to the userdata to UserData.java and IUser.java. 2013-02-13 08:24:25 -06:00
Iaccidentally 44a6f4d562 Merge branch '2.9' of https://github.com/essentials/Essentials.git into 2.9 2013-02-12 18:38:35 -05:00
Iaccidentally ec8c778f68 Clean up protect :: transient is not needed :: remove unnecessary returns :: @Override all the things! 2013-02-12 18:37:40 -05:00
KHobbits 56df6b36a5 Fix /give|/item descriptions for itemmeta. 2013-02-12 22:56:17 +00:00
KHobbits 30b65a0bc7 Merge branch '2.9' of github.com:essentials/Essentials into patch-41 2013-02-12 22:46:35 +00:00
Necrodoom 0dc8980d32 remove color from bedNull 2013-02-12 22:45:54 +00:00
KHobbits fa8b8bec5a 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 63c7d4519a change bed spawn set message 2013-02-12 22:43:07 +00:00
Necrodoom 2a816cef7b try improve bed spawn handle
dont act as if bed doesnt exist if its missing
2013-02-12 22:43:06 +00:00
Iaccidentally c2d904ac7d Fix build :: This is what happens when you don't use an IDE 2013-02-12 17:42:04 -05:00
Necrodoom 911224dc64 fix typo 2013-02-12 22:26:02 +00:00
KHobbits 0ad765e1c8 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 9db040edd4 Update Essentials/src/config.yml 2013-02-12 17:17:48 -05:00
Skylexia c0f3e9073d Update Essentials/src/plugin.yml 2013-02-12 17:13:08 -05:00
Necrodoom e4565de717 delete player command messages, bukkit does it 2013-02-12 16:56:54 +02:00
ElgarL 33382f9940 Merge pull request #327 from necrodoom/patch-52
add missing return false in manudelp
2013-02-12 06:49:27 -08:00
Necrodoom 1d0c2f75dc add missing return false; 2013-02-12 16:47:39 +02:00
KHobbits c3f0d34293 Minor entity optimization. 2013-02-11 23:33:30 +00:00
KHobbits c298fb9332 Attempt to optimize Essentials login event. 2013-02-11 23:11:37 +00:00
KHobbits a1f1319990 Merge pull request #325 from Skylexia/patch-2
Fixed all "poison" typos; add ppotato alias.
2013-02-11 15:00:14 -08:00
Skylexia 2316bfbd28 Update Essentials/src/items.csv 2013-02-11 17:57:20 -05:00
KHobbits 96348a5e92 Merge pull request #324 from Skylexia/patch-1
Update Essentials/src/items.csv
2013-02-11 10:41:09 -08:00
Skylexia d9903efcf4 Update Essentials/src/items.csv 2013-02-11 13:38:11 -05:00
KHobbits bc90deb87d Merge pull request #322 from necrodoom/patch-50
add dye aliases to match bukkit
2013-02-11 09:22:56 -08:00
Necrodoom c35e5bf53a add dye aliases to match bukkit 2013-02-11 18:56:23 +02:00
KHobbits 8ea0a152d4 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 8e205768b3 Fix array index out of bounds on /firework fire 2013-02-11 10:35:55 -06:00
ElgarL fcfa3ce31d Merge pull request #298 from necrodoom/patch-37
Fix typo at groupmanager config.yml
2013-02-10 02:12:42 -08:00
Chris Ward 05aeba521f Merge pull request #317 from necrodoom/patch-47
update AFK documation
2013-02-10 01:54:37 -08:00
Necrodoom 8dff1155bf update AFK documation 2013-02-10 11:46:59 +02:00
Chris Ward b6648ad9bd Fix compilation, unreachable code. 2013-02-10 20:37:46 +11:00
Chris Ward 40f03295a1 Merge pull request #316 from necrodoom/patch-46
throw exception on banexempt
2013-02-10 01:34:53 -08:00
Necrodoom 5fdb10a5bf throw exception on banexempt
match rest of moderator commands
2013-02-10 11:04:55 +02:00
KHobbits e9bb2df87d Fix kit messages when giving kit to another player. 2013-02-10 00:07:40 +00:00
KHobbits be29e4da59 missing alias 2013-02-09 23:39:21 +00:00
GunfighterJ b2a0166c46 Proper TL 2013-02-09 16:27:54 -06:00
GunfighterJ 03b115d4c3 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-02-09 16:27:19 -06:00
KHobbits d522a4230f Make /god and /god <player> behave the same. 2013-02-09 19:31:31 +00:00
Chris Ward f17485b112 Merge remote-tracking branch 'origin/groupmanager' into 2.9 2013-02-09 21:55:20 +11:00
ElgarL 1f932434c2 Fix bad Git Merge 2013-02-09 10:51:16 +00:00
Chris Ward 92b0178ca7 Merge pull request #312 from necrodoom/patch-44
update kit link to the new one
2013-02-09 02:48:48 -08:00
Necrodoom d30c3ca2a6 update kit link to the new one 2013-02-09 12:47:36 +02:00
Chris Ward fb60272439 Merge pull request #311 from necrodoom/patch-43
fix itemmeta link on kit section
2013-02-09 02:41:01 -08:00
Necrodoom 80ad075f02 fix itemmeta link on kit section 2013-02-09 11:57:32 +02:00
GunfighterJ 37029e6b5d Un-deletes deleted things. 2013-02-08 17:14:46 -06:00
GunfighterJ 631e0bbd0a Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-02-08 16:05:48 -06:00
snowleo 3f31dc179b Fix /seen command 2013-02-08 22:26:21 +01:00
snowleo 5b975672e8 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 335d8b7f20 Check if player is still online 2013-02-08 21:18:00 +01:00
snowleo 379e75f3e6 Fix async access to bukkit code 2013-02-08 21:16:21 +01:00
Chris Ward 2ca171a3f4 Merge pull request #304 from necrodoom/patch-40
pull messages.properties changes to messages_en
2013-02-06 22:54:27 -08:00
Necrodoom 8036cc9924 pull messages.properties changes to messages_en 2013-02-06 16:15:18 +02:00
Chris Ward 6442e793a9 Merge pull request #300 from necrodoom/patch-39
add missing puncuation
2013-02-06 02:49:04 -08:00
KHobbits d745b866c0 Don't block food recovery in god mode. 2013-02-05 23:34:08 +00:00
KHobbits 4493d7d00c 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 631692d763 Prevents flying from being disabled on world teleport if player has essentials.fly 2013-02-05 13:16:27 -06:00
GunfighterJ ef341ae539 Adds potion meta
Some cleanup as well
2013-02-05 13:13:19 -06:00
Necrodoom d0e3c1d946 fix a few errors 2013-02-05 16:45:30 +02:00
Necrodoom 82137e0703 add missing puncuation
probably needs extra reading though before pulling.
2013-02-05 13:57:27 +02:00
KHobbits a3b2ffdeef Merge pull request #297 from necrodoom/patch-36
fix typo at ID 22
2013-02-05 03:26:19 -08:00
Necrodoom dd095e15cb Fix typo at groupmanager config.yml 2013-02-05 13:13:00 +02:00
Necrodoom 46fc6c192c fix typo at ID 22 2013-02-05 13:11:36 +02:00
ElgarL 6506c290c8 Revert Necro's change to mancheckw 2013-02-04 13:44:58 +00:00
ElgarL b1bc73f938 Fix Necrodooms errors for not using an IDE!!!!! 2013-02-04 13:33:06 +00:00
ElgarL 09851acd1b Merge pull request #291 from necrodoom/patch-32
display name instead of path for /mancheckw
2013-02-04 05:29:10 -08:00
ElgarL df42c9051b Merge pull request #290 from necrodoom/patch-30
Derp - revert incorrect modified line
2013-02-04 05:25:10 -08:00
KHobbits 24c93c11c0 Stylize 'bed' in /home list 2013-02-03 17:30:14 +00:00
Chris Ward 5a13e9bbe5 Merge pull request #294 from necrodoom/patch-35
add common cat type name aliases
2013-02-03 05:16:17 -08:00
Necrodoom 05f337c63c add common cat type name aliases 2013-02-03 15:13:36 +02:00
KHobbits eea0c9682c We don't need move events if afk interact is disabled. 2013-02-03 05:15:25 +00:00
KHobbits 2f567812d2 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 88c1b785af Adds toggle to disable AFK cancel on interactions 2013-02-02 23:06:09 -06:00
KHobbits 5225fb22f8 Minor comment updates. 2013-02-03 04:14:23 +00:00
Necrodoom fae5780e09 Update EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java 2013-02-01 16:39:18 +02:00
Necrodoom 7ec65bf213 Update EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java 2013-02-01 16:33:55 +02:00
Necrodoom d40484d016 Update EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java 2013-02-01 16:33:37 +02:00
Necrodoom 971902ae38 Update EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java 2013-02-01 16:31:58 +02:00
Necrodoom 844be04d75 Derp - revert incorrect modified line 2013-02-01 14:14:46 +02:00
KHobbits ef01332114 Fix missing 'bed' from home list. 2013-02-01 05:26:17 +00:00
KHobbits 705b193450 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 20b9111495 [GM] Catch all of the null. 2013-02-01 02:52:41 +00:00
KHobbits 1661eddc02 Make gm API lookup respect offlineperms toggle properly. 2013-02-01 00:01:57 +00:00
KHobbits 15be319d3e Updating groups example 2013-01-31 21:02:38 +00:00
KHobbits fddbd7a52a 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 360e3e8801 cleanup :: fix build 2013-01-31 14:40:33 -05:00
Iaccidentally 4edc39360a Refactor name of ScheduleAsyncDelayedTask to RunTaskAsynchronously 2013-01-31 14:16:09 -05:00
Iaccidentally cd126264e0 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 df0ccb5832 Fix Necrodooms broken code. 2013-01-30 19:55:38 +00:00
ElgarL 8afcd41ab2 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 b8a71761ec update changelog 2013-01-30 19:26:46 +02:00
Necrodoom 738ded7ae5 update commandblock usage deny message 2013-01-30 19:25:35 +02:00
Necrodoom 5535435215 update config description of allow_commmandblocks 2013-01-30 19:14:57 +02:00
Necrodoom 4167dd2590 add allow commandblock check 2013-01-30 18:53:40 +02:00
Necrodoom 623ff0f629 register new config setting 2013-01-30 18:47:19 +02:00
Necrodoom 6e4ba4302f update config.yml to include commandblock change 2013-01-30 18:15:58 +02:00
KHobbits 3d4d616414 What is less than less than one. 2013-01-29 23:59:31 +00:00
KHobbits d6c91d2d04 Might as well make it all safe. 2013-01-29 23:51:42 +00:00
snowleo cef8cf7b75 Don't run calls against bucket api in async login thread 2013-01-30 00:26:50 +01:00
snowleo 12786a260e Update /sell command to newer bukkit api 2013-01-29 20:29:03 +01:00
ElgarL 6ea956b11c Doh, actually find what world we want to check properly with mancheckw. 2013-01-29 16:56:03 +00:00
ElgarL 132aa0cc1d Update plugin.yml with the new command 2013-01-29 16:45:23 +00:00
ElgarL b5733d6597 grammaaahhhh!!! 2013-01-29 16:35:15 +00:00
ElgarL 7fc4a75d4d Added '/mancheckw <world>' to inspect what permission files a world is
referencing.
2013-01-29 16:33:20 +00:00
ElgarL e9e9efd2d7 Missed an S 2013-01-29 16:15:45 +00:00
ElgarL 9e4493fbb4 Prevent '*' permissions granting the 'groupmanager.noofflineperm'
permission.
2013-01-29 16:14:24 +00:00
ementalo a64cb31211 Revert "Merge pull request #286 from GunfighterJ/2.9"
This reverts commit 57de3f3ed2, reversing
changes made to 76d1ea5cab.
2013-01-29 10:25:01 +00:00
Iaccidentally 57de3f3ed2 Merge pull request #286 from GunfighterJ/2.9
Ignore itemmeta on selling
2013-01-28 21:13:41 -08:00
GunfighterJ 74b63a6f2d Ignore itemmeta on sell 2013-01-28 23:11:43 -06:00
ElgarL faad91849d Add support for BukkitForge using 'overworld' as the main world name. 2013-01-28 04:13:16 +00:00
GunfighterJ ce7d83adb6 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-27 14:20:59 -06:00
KHobbits 76d1ea5cab Minor /ci tweak. 2013-01-27 17:22:43 +00:00
KHobbits 9fb42375b8 Cleanup /ci addition. 2013-01-27 17:10:07 +00:00
GunfighterJ 2a7f3c6525 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-27 10:44:13 -06:00
KHobbits c65353350f Merge pull request #278 from GunfighterJ/2.9
Adds vanilla syntax for /clearinventory
2013-01-27 08:40:39 -08:00
KHobbits 1ae58d05b4 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 4f35a72174 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 addd55228b 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 bb29d48268 Make heal remove fire from players. 2013-01-26 17:16:48 -05:00
Iaccidentally d9ee9b036c Update heal to account for the fact that 20 is not always the max health 2013-01-26 17:12:17 -05:00
GunfighterJ 95e630de92 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-24 21:16:13 -06:00
KHobbits 2836c0862d Revert "Prevent replacement of { and } characters in chat.format"
This reverts commit 8fde5102b9.
2013-01-25 03:12:13 +00:00
KHobbits 286091cd32 Try command fallback 2013-01-25 03:06:53 +00:00
KHobbits 20786654a4 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 8fde5102b9 Prevent replacement of { and } characters in chat.format 2013-01-24 11:43:10 -05:00
GunfighterJ 133fdac343 Update /ci to support vanilla syntax 2013-01-23 16:47:21 -06:00
Chris Ward 2361b9e724 Add debug option to XMPP 2013-01-23 19:41:36 +11:00
Chris Ward 972d831d0d Remove references to earth2me in plugin.ymls 2013-01-23 02:56:18 +11:00
Chris Ward bfa34130a0 Merge pull request #280 from necrodoom/patch-28
update documation reference in config.yml
2013-01-22 00:13:07 -08:00
Necrodoom befe1fb39e Update Essentials/src/config.yml 2013-01-22 09:54:48 +02:00
KHobbits 378eaaaf1f Small patch to allow multiple firework effects to be defined in kits. 2013-01-21 23:38:03 +00:00
KHobbits 51a55318d0 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 4663c89dd6 Merge pull request #276 from necrodoom/patch-26
Update Essentials/src/plugin.yml
2013-01-21 06:41:32 -08:00
Necrodoom 2a1c3fb8e0 Update Essentials/src/plugin.yml 2013-01-21 16:40:45 +02:00
Necrodoom 0ac1a90b93 Update Essentials/src/messages_en.properties 2013-01-21 16:37:12 +02:00
Necrodoom ab6b3bff90 fix message 2013-01-21 16:35:40 +02:00
Necrodoom 2d00fd0c1e try make error message more informative 2013-01-21 16:32:49 +02:00
Necrodoom e5f4cb9a4d Update Essentials/src/plugin.yml 2013-01-21 16:29:26 +02:00
KHobbits 91701e8c2f Allow negative exp to be given 2013-01-21 14:15:53 +00:00
KHobbits 9cef107bc3 Fix a couple of param issues. 2013-01-21 13:40:45 +00:00
KHobbits 76fd829e8c Merge pull request #275 from DMarby/patch-1
Update Essentials/src/messages_se.properties
2013-01-20 15:31:34 -08:00
David Marby 6ea422015c Update Essentials/src/messages_se.properties 2013-01-21 00:26:38 +01:00
KHobbits 443a317184 Show afk warning when pm'ing afk players.
Fix vanished leak on player matching.
2013-01-20 22:05:44 +00:00
KHobbits 50dca9abf5 Add optional 2nd arg to broadcast format. 2013-01-20 20:58:05 +00:00
KHobbits f1e3d48248 Fix book meta error message. 2013-01-20 20:41:15 +00:00
KHobbits 63ce4a99b9 Trim long /gc output, add /gc all 2013-01-20 20:35:41 +00:00
KHobbits 1ccda52e9f Fix minor /book bug (Null author) 2013-01-20 20:06:27 +00:00
KHobbits 1679790157 Fix eco take derp. 2013-01-20 19:43:59 +00:00
KHobbits 6170540a24 Fix colour syntax message on coloured leather. 2013-01-20 01:44:03 +00:00
KHobbits 987b2ff4d5 Minor cleanup on /eco command. 2013-01-20 01:24:09 +00:00
KHobbits 23a15cb11a Merge pull request #274 from GunfighterJ/2.9
Cleanup /eco, fix reset broadcast
2013-01-19 17:12:07 -08:00
KHobbits 41547e3243 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 a586edfd0b Cleanup /eco, fix reset broadcast 2013-01-19 17:58:12 -06:00
KHobbits 762bb65677 Add example firework kit, and cleanup debug messages. 2013-01-19 23:43:40 +00:00
KHobbits 73c92bf742 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 2b8435342d Negate 'groupmanager.noofflineperms' by default in the owner group. 2013-01-19 22:22:42 +00:00
KHobbits 9566499a2f Merge pull request #272 from GunfighterJ/2.9
/eco overhaul, adds /eco set
2013-01-19 10:54:11 -08:00
GunfighterJ 343c3a1bdd /eco overhaul, adds /eco set 2013-01-19 12:50:35 -06:00
KHobbits 9aeb49f6c3 Reduce chance of self repeating powertool actions. 2013-01-19 15:19:39 +00:00
Chris Ward 7dae04759f Merge pull request #271 from necrodoom/patch-25
update /book description
2013-01-19 06:21:47 -08:00
Necrodoom e2f6e5a7fd update /book description 2013-01-19 16:16:35 +02:00
ElgarL d26fa6c5b8 Negate 'groupmanager.noofflineperms' by default in the owner group. 2013-01-19 12:40:40 +00:00
Chris Ward 82f9505a2e Touch of cleanup to Gunfighter's addition to exp 2013-01-19 18:22:22 +11:00
GunfighterJ f8ce80c18a Adds vanilla syntax to /exp command 2013-01-18 18:20:05 -06:00
Alexander Schepp 313fd30ce9 Fix bug with empty motd 2013-01-18 23:36:59 +01:00
Iaccidentally da216b05d9 Merge pull request #266 from GunfighterJ/2.9
Duplicate alias removed
2013-01-17 17:30:04 -08:00
GunfighterJ d8132548f6 Duplicate alias removed 2013-01-17 19:27:21 -06:00
snowleo 6fdeddd96b Merge remote-tracking branch 'origin/groupmanager' into 2.9 2013-01-18 01:01:23 +01:00
Iaccidentally 8082508db9 Merge pull request #265 from GunfighterJ/2.9
Adds essentials.mute.notify
2013-01-17 15:53:37 -08:00
GunfighterJ 78e6da9504 Adds essentials.mute.notify 2013-01-17 17:42:32 -06:00
Iaccidentally 0014d5cfcb Merge pull request #263 from GunfighterJ/2.9
Added /firework command
2013-01-17 14:59:01 -08:00
Iaccidentally 6aeba173b9 Update libs 2013-01-17 14:36:03 -05:00
Iaccidentally a2813358af Update Bukkit to 1.4.7-R0.1 2013-01-17 14:25:19 -05:00
GunfighterJ 8e663b53ce Now it adds the right firework command 2013-01-16 20:40:29 -06:00
GunfighterJ 214d9414da Adds the actual /firework command 2013-01-16 20:39:09 -06:00
GunfighterJ 6d7881f876 Added /firework command 2013-01-16 20:36:33 -06:00
Iaccidentally 19ccdf2193 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-16 21:23:17 -05:00
KHobbits 35036ecc18 Fix null args on /book 2013-01-16 16:56:27 +00:00
KHobbits b3cc4dbe09 Remove logger. 2013-01-16 16:30:30 +00:00
KHobbits 04bd9e8baf Remove broken firework meta. 2013-01-15 00:37:08 +00:00
KHobbits fdc262a205 Start work on firework effect - syntax in flux 2013-01-14 23:11:19 +00:00
Iaccidentally 32ea86bfd3 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-14 17:25:32 -05:00
KHobbits 4807fb39e5 Couple of extra /helpop aliases. 2013-01-14 21:40:25 +00:00
KHobbits 4ffe61a505 Add colour support to item meta. 2013-01-14 21:34:35 +00:00
KHobbits d74952927a Only show ban reason in the in-game display, not full banFormat. 2013-01-14 11:59:31 +00:00
KHobbits f8cf3be87f Better handle initial book.txt creation. 2013-01-14 08:21:03 +00:00
KHobbits ada266a0f9 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 115c4fa1d0 Merge remote-tracking branch 'remotes/origin/groupmanager' into 2.9 2013-01-14 07:37:11 +00:00
KHobbits 0c19b2feed All the better to kick you with
(Pipe format for linebreak)
2013-01-14 07:36:45 +00:00
ElgarL 04c833f648 Fix recursive loop when used on offline servers. 2013-01-14 06:47:50 +00:00
ElgarL 4533d09fc9 Update GlobalGroups (removing old permissions) as Towny handles it's own
perms now.
2013-01-14 05:48:48 +00:00
KHobbits 7337b86a16 Cleanup /book command. 2013-01-13 23:11:15 +00:00
Iaccidentally 3db015b1c1 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 659d602b57 Fixes /top command not carrying pitch and yaw 2013-01-13 17:02:46 -06:00
KHobbits f82d7e806f 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 a8088fb8c8 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 84c06fb746 Added more book arguments for editing author and title amend 2013-01-13 16:19:37 -06:00
KHobbits ffe2a283d2 Cleanup of book meta. 2013-01-13 22:18:08 +00:00
GunfighterJ 7e3fd48956 Added more book commands for editing author and title 2013-01-13 15:54:11 -06:00
KHobbits bd22aec38a Adding support for books made from /einfo 2013-01-13 21:08:24 +00:00
ElgarL 675c4b7897 typo in changelog. 2013-01-13 16:40:53 +00:00
ElgarL ad7009c77e 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 3f783bb43b Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2013-01-13 16:30:43 +00:00
KHobbits 9fe7712bd6 Clean up TextPager 2013-01-13 16:30:22 +00:00
ElgarL 24f56892ad Fix the logger so errors are reported again. 2013-01-13 16:20:38 +00:00
ElgarL b860e943f6 Synchronize pushing to Bukkit perms to prevent any
ConcurrentModificationException.
2013-01-13 16:20:09 +00:00
Chris Ward 5dc2665377 Merge pull request #258 from necrodoom/patch-22
update ID 397:3
2013-01-13 05:03:05 -08:00
Necrodoom dd9b7e0d3c update ID 397:3 2013-01-13 15:01:10 +02:00
KHobbits 18a15ca63c 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 ef1492a2a2 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 298ab846c1 Don't extend ItemStack 2013-01-12 17:05:05 +00:00
KHobbits 7fdb2ad7d3 Pull item meta from itemdb class 2013-01-12 14:12:12 +00:00
Iaccidentally 3afe8d18f4 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-11 12:56:18 -05:00
Iaccidentally 0b581580c7 Merge pull request #251 from necrodoom/patch-19
/me shakes fist at Khobbits
2013-01-11 09:17:44 -08:00
Necrodoom 01e78cd666 /me shakes fist at Khobbits
fixes e6aeefb12d whitespace
2013-01-11 19:10:32 +02:00
Chris Ward 29d28456aa Merge remote-tracking branch 'origin/groupmanager' into 2.9 2013-01-11 21:59:39 +11:00
Chris Ward f3812786d0 Fixes Item Frames being linked to Paintings when breaking 2013-01-11 21:54:52 +11:00
ElgarL 999d922fb9 Store a plugin and server reference. 2013-01-11 00:53:48 +00:00
KHobbits 2d4a07b95b 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 5c99eee0c0 Implement abstract methods 2013-01-10 22:57:08 +11:00
Chris Ward 1fc502a4ff Update bukkit/craftbukkit libs. Force latest beta version 2013-01-10 22:51:48 +11:00
KHobbits e73983649f Ban cleanup 2013-01-09 21:31:56 +00:00
KHobbits 465cdae989 Util commenting 2013-01-09 21:18:46 +00:00
KHobbits 341cb89bb7 Multiline kick messages and tempban countdown. 2013-01-09 21:04:58 +00:00
Chris Ward 79004c7098 Merge branch 'groupmanager' into 2.9 2013-01-10 04:57:10 +11:00
Joseph 2988db08ca Formatting 2013-01-10 03:25:58 +11:00
GunfighterJ b04fa82be2 Add more items to Fireball command. Add delay option to /spawner 2013-01-10 03:25:57 +11:00
Chris Ward 5d210d81dc 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 c14b32123f rewrite ID 43:6, 44:6, 113, 114 2013-01-09 16:46:37 +02:00
ElgarL f256930269 Synchronize the raising of GroupManager events to Bukkit.getServer()
(should prevent deadlocks).
2013-01-09 14:38:00 +00:00
ElgarL cde95d832e Merge pull request #241 from necrodoom/patch-15
fix typo
2013-01-09 02:50:30 -08:00
ElgarL b9af4fb35c Remove attachments BEFORE we clear them. 2013-01-09 04:27:10 +00:00
ElgarL 5056210a38 code tidy. 2013-01-09 04:13:40 +00:00
ElgarL eacb847305 Remove attachments before clearing 2013-01-09 04:04:59 +00:00
ElgarL 27ff43c0ac Clear our attachment map upon a manload so we correctly reconfigure a
players new permissions.
2013-01-09 03:55:26 +00:00
KHobbits 368c33a843 Expand plugin.yml fireball aliases. 2013-01-09 01:00:13 +00:00
KHobbits c210e8730b Fire a few extra entities from /fireball 2013-01-09 00:58:29 +00:00
KHobbits 6c48e02c14 Add a couple of extra entities to spawnmob 2013-01-09 00:41:24 +00:00
KHobbits c54d68a660 Cleanup 2013-01-08 23:59:31 +00:00
KHobbits 33d3123104 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 df0b1cedd8 Add missing import for EnchantmentStorageMeta 2013-01-08 11:46:08 -08:00
Chasing Code 2b57381fb8 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 67b9a82e51 Update Swedish translation with new messages. 2013-01-08 19:45:51 +11:00
Chris Ward c4e10da646 Store regex, use util method instead of another regex. Store variable 2013-01-08 02:26:09 +11:00
Chris Ward fbb1c1278c Fix multiple enchantments in kits 2013-01-08 02:25:35 +11:00
Chris Ward 9b49c5e0f4 Merge pull request #242 from necrodoom/patch-17
update ID 127
2013-01-07 07:00:41 -08:00
Necrodoom 186d4e2fd1 update ID 127 2013-01-07 16:52:51 +02:00
Chris Ward 437b01e371 Unnecessary RegEx is unnecessary. 2013-01-08 00:08:11 +11:00
KHobbits 3bf36fecf9 Enchantment and item spawning cleanup
Should make it a little easier to add itemmeta.
2013-01-06 18:28:24 +00:00
KHobbits c57332be63 Tell user that /mail sendall succeeded when used in console. 2013-01-06 16:27:20 +00:00
Necrodoom 292fb0cea1 fix typo 2013-01-05 19:05:02 +02:00
Necrodoom 3c4388f8be update IDs 368, 381, 399, 402 2013-01-05 19:27:56 +11:00
KHobbits f930ff48a2 Throw an error if user doesn't have permission to use kit sign. 2013-01-05 07:39:32 +00:00
KHobbits ef7b940e96 More user feedback on enchant sign. 2013-01-05 07:24:02 +00:00
KHobbits 6497db837d Allow unsafe enchants to be placed by [enchant] signs if enabled in the config file. 2013-01-05 07:05:25 +00:00
KHobbits 87cb6190eb Couple of extra enchant aliases 2013-01-05 06:59:37 +00:00
KHobbits 74c4c604da Merge branch 'release' into 2.9 2013-01-04 21:40:02 +00:00
KHobbits 0937a35470 Fix sign break bug 2013-01-04 13:05:57 +00:00
md_5 121f09caf0 Might be worth catching other occurances of the event too. 2013-01-04 13:53:01 +11:00
md_5 ef8bd3422a 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 2232d859fd Fix nl translation 2013-01-03 11:50:19 +01:00
Iaccidentally 0258abee29 Update AntiBuild to use HangingBreakByEntityEvent instead of deprecated PaintingBreakByEntityEvent 2013-01-02 18:25:40 -05:00
Iaccidentally 9b8991788b Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2013-01-02 18:24:34 -05:00
KHobbits 9a91c99391 Merge pull request #236 from gravypod/patch-1
Store ingredient map and recipe shape
2013-01-01 15:20:26 -08:00
KHobbits c6dd921f0c 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 63e622374d 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 ca25c71010 Cleanup cleanup. 2013-01-01 19:48:08 +00:00
KHobbits b5e559ff66 More cleanup 2013-01-01 19:34:32 +00:00
KHobbits 555bb76428 Cleanup 2013-01-01 18:39:23 +00:00
ElgarL f210f8e20b Merge pull request #235 from necrodoom/patch-10
fix isOpOverride checks
2012-12-31 07:59:27 -08:00
gravypod e572e7c94c Store ingredient map and recipe shape 2012-12-31 10:44:28 -05:00
Chris Ward 5c9d3c6b1a Fix recipe NPE/failed display in game 2013-01-01 02:26:04 +11:00
Necrodoom ccfc23d629 fix isOpOverride checks 2012-12-31 15:35:58 +02:00
KHobbits b5dd0fc671 Don't unregister all listeners. 2012-12-31 12:15:51 +00:00
KHobbits 8e3ee8576e Unregister unused events. 2012-12-31 05:44:20 +00:00
KHobbits 4cec7fe5c1 Use bukkit api for chat user list 2012-12-31 05:43:05 +00:00
KHobbits 6c3b2076ff Allow unbanning players who do not have valid userdata 2012-12-31 01:08:39 +00:00
KHobbits cbc1aeacbe Implement event toggle. 2012-12-30 04:32:43 +00:00
KHobbits a1b2773bf5 Reorganize entity listener 2012-12-30 03:32:32 +00:00
Alexander Schepp 9ecb501e00 Use the right formatter in XMPP 2012-12-30 00:23:04 +01:00
KHobbits 3dcdad2233 Hide a few more duplicate enchantments from /enchant 2012-12-29 09:00:42 +00:00
KHobbits 3725a5e6d4 Set default tpa timeout to 2 minutes. 2012-12-29 08:40:03 +00:00
KHobbits ed88f8aa06 Allow unsafe enchantments in /item /give /kit and /enchant
Needs enabled in config file manually.
2012-12-29 08:36:24 +00:00
KHobbits d551e8c6d2 Make /enchant only show valid enchantments for the item. 2012-12-29 07:58:28 +00:00
KHobbits 69ad186839 Add aliases for new thorns enchantment. 2012-12-29 07:47:07 +00:00
KHobbits fc89867e4a Ignore self damage in teleport entity protection. 2012-12-29 07:35:26 +00:00
KHobbits bbb478c51f Lets clean up the recipe window on player quit, just in case. 2012-12-29 06:55:48 +00:00
KHobbits 03445e5b9b Fix home functionality bugs:
/home not using bed when enabled
/home not giving teleport warning
2012-12-29 06:43:26 +00:00
KHobbits 0755fbf089 Update bukkit to 1.4.6-R0.1
bukkit: 1652 cb: 2561
2012-12-29 06:37:52 +00:00
KHobbits 3a789bdcfe Fix string match error on none existing user (/ban). 2012-12-29 02:00:48 +00:00
Chris Ward 93db8bc7c1 Add SimplyPerms to classpath 2012-12-29 11:26:44 +11:00
Xefir 62832ad43a Added SimplyPerms Handler 2012-12-29 10:41:15 +11:00
Alexander Schepp 52b104aca5 Merge pull request #229 from necrodoom/patch-9
fix tempban permission check
2012-12-28 09:37:40 -08:00
Necrodoom 1f98fe710f derp - fix tempban permission check 2012-12-28 19:05:54 +02:00
ElgarL a73986a358 Fix missing + from Necrodoom's pull request. 2012-12-28 13:46:22 +00:00
ElgarL 257165584e Merge pull request #228 from necrodoom/patch-8
Update EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManage...
2012-12-28 05:43:54 -08:00
Iaccidentally 8e92150cb7 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-12-26 09:48:38 -05:00
Chris Ward 4bb275e1b7 Revert 6b18259af6 - Adding permission node to speak, with config option to enable the node 2012-12-27 01:41:32 +11:00
Chris Ward e5fc579071 Add tpdeny message to /tpahere 2012-12-27 01:10:57 +11:00
Iaccidentally 26306f6fa3 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-12-25 18:12:42 -05:00
Necrodoom 0bfb079cbb Update EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java 2012-12-25 18:11:10 +02:00
Chris Ward 6b18259af6 Adding permission node to speak, with config option to enable the node 2012-12-24 01:55:53 +11:00
Chris Ward 99c750d18b Move max-tempban-time in config 2012-12-24 01:04:02 +11:00
Chris Ward bb64fa468a Fixing IUser 2012-12-23 21:29:26 +11:00
Chris Ward 66db3c6cfb Adding isAfk and setAfk to IUser API 2012-12-23 21:25:29 +11:00
KHobbits c97763c3c8 Make seen status's only show when true. 2012-12-22 03:36:56 +00:00
Chris Ward ad3e8a3aba 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 617959a11b Log target plugin in debug mode for altcmd 2012-12-21 06:38:51 +00:00
KHobbits a480091617 Final all the things - Recipe 2012-12-21 03:48:54 +00:00
KHobbits 13a847e0ab Fix recipe layout for small shapes 2012-12-21 03:35:48 +00:00
KHobbits a8a8b52977 Swap method order on recipe 2012-12-21 03:21:35 +00:00
KHobbits 226a75472c Adjust section matching. 2012-12-20 23:37:37 +00:00
KHobbits a1c88a140e Merge pull request #227 from Elvaron/2.9
FallBack for missing config property
2012-12-20 15:36:01 -08:00
Elvaron 2c3218b056 FallBack for missing config property 2012-12-21 00:16:18 +01:00
KHobbits 27db9e8c3b Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-12-20 22:58:00 +00:00
KHobbits cf0e36c973 Add support for whitelisting commands in /help by permission: essentials.help.<plugin>.<command> 2012-12-20 22:57:38 +00:00
KHobbits 1218a0b217 Reduce permissions checking when generating /help 2012-12-20 22:54:36 +00:00
KHobbits adb75b69c2 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 010df964a1 Merge pull request #226 from Elvaron/2.9
Made socialspy commands list configurable
2012-12-20 14:16:45 -08:00
Elvaron 0e2e8e16af Made socialspy commands list configurable 2012-12-20 23:07:22 +01:00
KHobbits 6f28540d59 Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-12-20 20:37:42 +00:00
KHobbits ce78125028 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 10b972bd07 Warn other party when teleport fails after tpaccept. 2012-12-20 20:24:07 +00:00
KHobbits 371a6437ae Redundant tpaccept cost check. 2012-12-20 20:23:51 +00:00
KHobbits 78666ade2b Fix max tempban length option. 2012-12-20 20:11:45 +00:00
KHobbits 8f00aa5542 Warn other party when teleport fails after tpaccept. 2012-12-20 20:01:43 +00:00
KHobbits b2d68fe213 Redundant tpaccept cost check. 2012-12-20 19:50:59 +00:00
KHobbits a6c13974c4 Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-12-20 17:03:48 +00:00
KHobbits fb0cd8fbf0 Remove command cost warnings from plugin matching. 2012-12-20 15:51:49 +00:00
Chris Ward 01d1ae442e Fix currency display in MOTD - display currency character, trim decimal places 2012-12-20 15:45:32 +00:00
snowleo dc13f46ff1 Don't use broken CB methods ... 2012-12-20 15:45:22 +00:00
snowleo f125ac3b4a Don't use broken CB methods ... 2012-12-20 16:07:40 +01:00
Chris Ward be29a373ab Useless import 2012-12-20 23:10:38 +11:00
Chris Ward b28db7e435 Fix currency display in MOTD - display currency character, trim decimal places 2012-12-20 23:07:49 +11:00
md_5 3ac6cc11e3 Fix nagging for overriden commands. 2012-12-20 09:56:30 +01:00
snowleo 9097bef728 Merge branch 'refs/heads/groupmanager' into 2.9 2012-12-20 09:55:26 +01:00
snowleo 68e401821f Fix gm builds
Change craftbukkit.jar -> bukkit,jar
2012-12-20 09:36:35 +01:00
md_5 7f9a52c3f7 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 79a44b919c) 2012-12-20 17:24:14 +11:00
md_5 79671d08e4 Fix nagging for overriden commands. 2012-12-20 17:11:05 +11:00
Chris Ward d01d6bcd1b Fix NPE in update (sorry again :P) 2012-12-20 15:45:09 +11:00
Chris Ward 79a44b919c Update home names to prepend "home" to numeric home names 2012-12-20 13:11:05 +11:00
snowleo 477e1a4f58 Force people to use latest CB version 2012-12-20 00:46:03 +01:00
snowleo c028c385b6 Fix Spawns / Jail loading 2012-12-20 00:46:03 +01:00
snowleo f9bcc3100c Update Inventory Workaround to the latest version
Still bugged in CB: maxAmount of items
2012-12-20 00:46:03 +01:00
snowleo 3ea3d18922 Force people to use latest CB version 2012-12-19 23:28:18 +01:00
snowleo 3faedec602 Fix Spawns / Jail loading 2012-12-19 23:26:29 +01:00
snowleo 2a88a314ce Update Inventory Workaround to the latest version
Still bugged in CB: maxAmount of items
2012-12-19 22:07:03 +01:00
ElgarL 38293560d7 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 f57b3595ed Fix recipe command 2012-12-20 01:35:55 +11:00
md_5 e2e6bb3876 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 4e399778b4 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-12-19 12:54:00 +00:00
KHobbits 9ba5f43315 Updating Bukkit to 1.4.5 RB
Bukkit: 1643 CB: 2543
2012-12-19 12:52:05 +00:00
Chris Ward 0bde364125 Merge pull request #223 from chrisgward/patch-1
Add /recipe command
2012-12-19 00:28:27 -08:00
md_5 87f5ec491e 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 1f8a0a811f Add /recipe command 2012-12-19 14:57:12 +11:00
KHobbits 74d5590d3b Remove CB from EssCore libs. 2012-12-18 22:58:55 +00:00
KHobbits 258fbdb0e8 Merge pull request #216 from chrisgward/patch-1
Add tempban limit (with override node)
2012-12-18 02:24:45 -08:00
KHobbits bd4a48c441 Fix command costs warnings. 2012-12-17 18:32:42 +00:00
KHobbits 00bd6a3e02 Support new skeleton and zombie types.
Also fix baby sheep colours.
2012-12-16 21:39:31 +00:00
KHobbits 28ad7b96d2 Log a few extra metrics. 2012-12-16 21:02:02 +00:00
KHobbits 97204c0e8c Merge pull request #217 from necrodoom/patch-7
add "w" alias
2012-12-16 11:07:10 -08:00
Necrodoom 46645cb39f Update Essentials/src/plugin.yml 2012-12-16 18:05:07 +02:00
Necrodoom dfd6fc78f0 add "w" alias 2012-12-16 18:03:04 +02:00
Chris Ward ecf5d47e97 Add tempban limit (with override node) and console override to exempt node. 2012-12-17 02:12:38 +11:00
Alexander Schepp 77df82eaff derp
That's why switch statements are bad.
2012-12-16 13:59:25 +01:00
Alexander Schepp 020f2c3ea5 Fix order of messages 2012-12-16 13:48:02 +01:00
KHobbits 5a855eede5 Update bukkit
Bukkit 1608 CraftBukkit 2488
2012-12-16 12:28:49 +00:00
KHobbits 8b4273cbd1 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-12-16 12:12:23 +00:00
Necrodoom 30bc597851 update items.csv to minecraft 1.4.6 2012-12-16 12:52:16 +02:00
Alexander Schepp 13efadbb65 Merge pull request #214 from necrodoom/patch-4
change add-prefix-suffix description
2012-12-15 06:17:22 -08:00
snowleo 6bc3d7f0f4 Fix the gap 2012-12-15 14:22:52 +01:00
snowleo e706614a3b Align /tp syntax with Minecraft /tp command 2012-12-15 14:12:34 +01:00
Necrodoom cf68031110 change add-prefix-suffic description
hopefully will keep newbies from changing it for no reason
2012-12-15 12:58:57 +02:00
Iaccidentally 5741cea3f5 Merge pull request #210 from Echo4190/patch-1
Update Essentials/src/config.yml
2012-12-11 04:06:10 -08:00
Echo419 7b879331db Update Essentials/src/config.yml
trillions => trillion
english => English
2012-12-11 12:03:21 +00:00
KHobbits 0a27a631e3 Merge pull request #209 from necrodoom/patch-2
update config.yml to reference wiki more
2012-12-10 09:46:31 -08:00
KHobbits d8c6587532 Add missing import. 2012-12-10 17:45:32 +00:00
KHobbits d600f160fe Update metrics to r6 2012-12-10 17:43:06 +00:00
KHobbits d23c324035 Metrics Diff 2012-12-10 17:40:15 +00:00
Necrodoom 52bfeff5b4 update config.yml to reference wiki more
also changed locale setting to be less confusing
2012-12-10 09:39:22 +02:00
KHobbits 3dcb2a828e Delay sending respawn event until we actually try to respawn user. 2012-12-09 17:32:02 +00:00
KHobbits 0b95a691a6 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 f7daa20be8.

This breaks compatibility with multiverse, and Essentials core.
2012-12-09 17:14:57 +00:00
KHobbits eba2bad113 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-12-09 17:10:31 +00:00
KHobbits 4f21490ec8 Move null bed check to teleport code 2012-12-09 17:10:12 +00:00
md_5 f7daa20be8 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 a9ace1163f Shorten local chat format. 2012-12-08 18:51:18 +00:00
KHobbits ba380e61ee Some nice friendly messages to help debugging command costs. 2012-12-08 15:51:33 +00:00
KHobbits bbc306970f Throw error when using /more on full stack 2012-12-07 00:46:13 +00:00
KHobbits 7b997634ef Remove unused variable 2012-12-06 23:27:43 +00:00
KHobbits 1efbc3856c Make BPerms sign group checking behave similarly to same as GM and PEX 2012-12-06 23:26:48 +00:00
KHobbits f769f96f74 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 3f69473072 Added a total profit message for /sell all|blocks 2012-12-05 15:40:17 +01:00
KHobbits d7bcf6508d Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-12-03 09:09:17 +00:00
KHobbits 61c4d8cb5e Update afk status on block interact 2012-12-03 09:08:56 +00:00
Iaccidentally f7361eed98 Merge pull request #205 from evonuts/patch-1
Spelling/Grammar fixes.
2012-12-01 02:43:20 -08:00
evonuts deaa72b05d Spelling/Grammar fixes. 2012-12-01 21:51:24 +13:00
Iaccidentally 92bdd51cd4 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-11-27 14:54:18 -05:00
snowleo 0ed29c029d 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 61903355cd Fix kit timers, kit times more than 25 years will be treated as single use. 2012-11-27 18:27:23 +00:00
KHobbits 889f60e58e Userdata cleanup 2012-11-27 17:47:08 +00:00
KHobbits c4f292f4ef Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-11-27 15:24:34 +00:00
Iaccidentally 36687e2659 Merge pull request #204 from necrodoom/patch-23
fix typo at config.yml
2012-11-25 09:30:13 -08:00
Necrodoom 948647926d fix typo at config.yml 2012-11-25 15:07:25 +02:00
Iaccidentally 4a4f443fee Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-11-24 14:55:54 -05:00
KHobbits 18d52821b7 Merge pull request #201 from necrodoom/patch-22
fix spacing at disabled-commands
2012-11-20 11:16:00 -08:00
Necrodoom ad7d751856 fix spacing at disabled-commands 2012-11-20 19:38:21 +02:00
ElgarL 1151f1a29c Fix recursive error detection when partial mirroring the main world 2012-11-20 14:55:06 +00:00
snowleo 0b1625f4c1 Better fix for last commit 2012-11-19 22:03:25 +01:00
snowleo 1363406b84 Fix for the plugin conflict with any plugin that contains a log4j library 2012-11-19 20:28:12 +01:00
KHobbits 4b875ed4d9 Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-11-19 14:28:28 +00:00
KHobbits 42872650d2 Add tptoggle others Essentials style. 2012-11-16 01:37:47 +00:00
Iaccidentally fd87933aa9 Merge remote-tracking branch 'remotes/origin/release' into 2.9 2012-11-13 22:57:14 -05:00
ElgarL 269cf85457 Update bukkit.jar to #1593 in lib so we can reference the new
interfaces.
2012-11-13 10:17:15 +00:00
Iaccidentally 5728f964a5 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 a7aa8be37a Prevent GM commands from being used on CommandBlocks. 2012-11-11 20:56:07 +00:00
ElgarL 237c896fff Add support for Rcon. 2012-11-11 20:39:03 +00:00
Iaccidentally fbb3d7344f update tptoggle to allow toggling other players :: new permission: essentials.tptoggle.others 2012-11-11 14:34:56 -05:00
KHobbits 8b660d32ac 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 98bccf6cec 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 936606ce7c Mob comment. 2012-11-11 17:04:16 +00:00
Necrodoom a63748ca3a Update Essentials/src/com/earth2me/essentials/Mob.java 2012-11-11 18:58:05 +02:00
Iaccidentally a1ce340ce0 Make playerFishEvent cancel AFK :: fixes #3192 2012-11-11 11:43:10 -05:00
KHobbits a8df79661a Merge branch '2.9' of github.com:essentials/Essentials into release 2012-11-11 14:55:00 +00:00
KHobbits f52e0ae7a8 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-11-11 14:54:19 +00:00
KHobbits 648a5ef8dd Merge branch '2.9' of github.com:essentials/Essentials into release 2012-11-11 14:53:42 +00:00
Iaccidentally 0d610f761b Merge pull request #196 from necrodoom/patch-20
update ID 101, by andrewkm request
2012-11-10 09:53:16 -08:00
Necrodoom e7afe4109e update ID 101, by andrewkm request 2012-11-10 19:12:25 +02:00
evonuts b11a1a7cf2 Fix fly specific settings for other players (eg. /fly evonuts on) 2012-11-10 22:17:39 +13:00
evonuts 6a8a2dd28b 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 a370a8e01c Merge pull request #194 from necrodoom/patch-19
correct spaces at plugin.yml
2012-11-09 05:51:52 -08:00
ElgarL 5e38a2180c Merge pull request #193 from necrodoom/patch-18
GroupManager typo fix
2012-11-09 05:51:15 -08:00
ElgarL f3bc94a547 Merge pull request #190 from necrodoom/patch-16
fix typos and update ingame error message
2012-11-09 05:50:39 -08:00
Necrodoom ba0db53c44 correct spaces at plugin.yml 2012-11-08 16:35:57 +02:00
Necrodoom ef98a6b54c GroupManager typo fix 2012-11-08 16:31:49 +02:00
KHobbits 8c9b755671 Extra perm check in /home 2012-11-08 11:53:26 +00:00
md_5 6c1da1d552 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 0df0be5762 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 83120f707f Allow for console based gamemode shortcuts. Fixes ticket #3173 2012-11-08 15:19:07 +13:00
Iaccidentally 9d98edb4ee fix build 2012-11-04 19:04:10 -05:00
Iaccidentally a50b0ac71d CB 2455 :: Bukkit 1593 2012-11-04 17:52:35 -05:00
KHobbits d674e65c11 Allow the 'userIsNotAway' and 'userIsAway' translation messages to be empty. 2012-11-04 22:41:35 +00:00
Alexander Schepp 4967279b8c Allow the noNewMail translation to be empty 2012-11-04 22:34:47 +01:00
KHobbits 4722e687fa Code comments. 2012-11-04 21:31:23 +00:00
Iaccidentally 332a59f3fc allow money to be put in kits using the currency symbol before the amount 2012-11-04 16:25:09 -05:00
KHobbits 587f532991 Use durability instead of itemdata for antibuild checks.
Fixes potion blocking using antibuild.
2012-11-04 18:02:36 +00:00
KHobbits 10244d5f90 Fix godmode pvp protection not blocking thrown pots and arrows. 2012-11-04 17:31:57 +00:00
KHobbits 6f1a70dc8b Fix missing mob target block 2012-11-04 16:45:02 +00:00
KHobbits 7369155166 Fix a few more errors in plugin.yml 2012-11-04 13:29:39 +00:00
KHobbits 28d4609c8c Fix plugin.yml typo. 2012-11-04 13:16:05 +00:00
KHobbits d2966b64eb Code comments 2012-11-04 02:24:54 +00:00
KHobbits c8f8680ce9 Limit tnt disable on /nuke to 10s 2012-11-04 02:18:51 +00:00
md_5 9fcb412774 Update Spanish translations thanks to nikooo14. 2012-11-03 11:47:39 +11:00
Necrodoom 296af1069e Update EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java 2012-11-02 18:21:26 +02:00
Alexander Schepp b22e97b3cf remove all L 2012-10-31 21:30:57 +01:00
Iaccidentally dcf90cbf5a Make /exp accept L before or after the amount, add extra checks 2012-10-31 16:25:13 -04:00
Alexander Schepp 4dc2e2e3fd Handle int overflow in SetExpFix 2012-10-31 21:06:30 +01:00
Alexander Schepp 4d4779ecdc 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 1c25d317dd Quickfix to prevent GM commands from being called by BlockCommandSender. 2012-10-31 19:44:13 +01:00
Iaccidentally 651a62890a fix minimum required bukkit version. 2012-10-29 14:26:51 -03:00
Iaccidentally 39b38f0619 CB 2420 :: Bukkit 1570 :: Update FakeServer and OfflinePlayer 2012-10-29 13:17:56 -04:00
KHobbits 4a194e8758 Merge pull request #185 from evonuts/patch-5
Update Essentials/src/config.yml
2012-10-29 02:21:24 -07:00
evonuts 5a35da53a0 Update Essentials/src/config.yml
'flase' typo in wither-spawnexplosion
2012-10-29 22:06:23 +13:00
ementalo 8d64c7c81b Fix mail 2012-10-28 20:09:25 +00:00
ementalo bea3583192 Fix mail 2012-10-28 20:00:15 +00:00
Iaccidentally 618d115233 typo fix 2012-10-28 15:03:45 -03:00
Iaccidentally 5e476f4d61 Update Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
2.9 too
2012-10-28 15:01:54 -03:00
Iaccidentally 5bc1b8df70 nothing to see here, move along (typo fix) 2012-10-28 13:09:19 -04:00
Iaccidentally 72e0ab2cb2 NOW with complete wither protection! 2012-10-28 13:05:08 -04:00
Iaccidentally e0d189a5e0 oops! :: fix wither spawn explosion blocking 2012-10-28 12:58:01 -04:00
Iaccidentally 91c193b773 Fully support wither blocking in protect 2012-10-28 12:53:12 -04:00
Iaccidentally 4a18130354 CB #2415 2012-10-28 12:23:47 -04:00
Iaccidentally 7c6268fe20 Merge branch '2.9' of https://github.com/essentials/Essentials into 2.9 2012-10-28 11:10:17 -04:00
Iaccidentally 6f213c23e2 update tppos to not accept coords over 30000000 2012-10-28 11:09:49 -04:00
Iaccidentally cc606fe1aa Merge pull request #184 from necrodoom/patch-15
add bat egg and witch egg
2012-10-28 07:40:52 -07:00
Necrodoom ee8638841d 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 9864a75c32 Protect updates :: ability to prevent wither damage :: block spawning of new mobs 2012-10-28 09:39:54 -04:00
Iaccidentally 520427239f CB #2406 Bukkit #1568 2012-10-28 09:11:50 -04:00
md-5 614a229ea7 Merge pull request #183 from evonuts/patch-4
Update Essentials/src/config.yml
2012-10-28 03:22:55 -07:00
evonuts 2a4d40020e Update Essentials/src/config.yml 2012-10-28 22:37:00 +13:00
md_5 d6efae202a Why the f*** do we depend on Bukkit too? 2012-10-28 20:09:26 +11:00
md-5 7b9c711486 Merge pull request #182 from evonuts/patch-3
Update Essentials/src/config.yml
2012-10-28 02:02:24 -07:00
md_5 e2bd22d984 No idea why this still refuses to compile locally. Stupid ant. 2012-10-28 20:01:27 +11:00
evonuts 2310b41b21 Update Essentials/src/config.yml 2012-10-28 21:55:20 +13:00
md-5 2ae9c577db Merge pull request #180 from Glyca/2.9
Added, fixed and improved French translations
2012-10-28 01:38:51 -07:00
md-5 7c9375ce2e Merge pull request #176 from necrodoom/patch-14
update files to minecraft 1.4
2012-10-28 01:37:22 -07:00
Glyca 9addc2ccd5 Added, fixed and improved French translations 2012-10-27 21:47:55 +02:00
Necrodoom e180f6e6b3 update ID 137 2012-10-27 10:41:50 +03:00
KHobbits f0e29552bc Merge branch '2.9' of github.com:essentials/Essentials into release 2012-10-26 21:41:49 +01:00
KHobbits 48d04216a7 Reduce calls to bukkit getPlayer(); 2012-10-26 21:34:36 +01:00
ementalo ff6221f1a8 2.9 Release 2012-10-26 09:48:45 +01:00
KHobbits 0bc33554f3 Fix tp delay message 2012-10-23 00:00:55 +01:00
KHobbits 7c480e88d6 Update EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java 2012-10-22 14:55:52 +02:00
KHobbits c357d19c56 Update listener comment 2012-10-22 12:27:01 +02:00
Alexander Schepp 86124b2705 Fix NPE in UserData on login
if no address is available
2012-10-21 23:17:08 +03:00
KHobbits 99cefb2d74 Fix perm check in /kill 2012-10-20 19:24:33 +01:00
KHobbits 600f99eb6b If the player is still alive, make sure he dies. (/kill) 2012-10-20 19:18:04 +01:00
KHobbits 8ba7a24fd2 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 ef608c7595 Remove extra home check. 2012-10-20 16:09:54 +01:00
Necrodoom 2ea453110a update mob.java to 1.4 2012-10-20 12:24:18 +03:00
Necrodoom a86efb5ebe update items.csv to 1.4
items.csv version 2.2_01
2012-10-20 12:11:27 +03:00
ementalo e61fa58d2b Fix test 2012-10-17 13:14:59 +01:00
ementalo ec5edf7bd2 CB #2396 B #1566 2012-10-17 13:09:03 +01:00
snowleo 8dbcebda53 Don't call plugin manager in Settings. 2012-10-15 20:30:52 +02:00
KHobbits 28d2a9ed2e Merge pull request #174 from necrodoom/patch-13
fix sandstone slab aliases
2012-10-14 09:44:26 -07:00
Necrodoom d47e9145f3 fix sandstone slab aliases 2012-10-14 19:40:57 +03:00
KHobbits ae7c64619c Allow kicking of hidden players 2012-10-14 13:04:00 +01:00
KHobbits bdef1780ac Warn when banning a player who has never connected to the server. 2012-10-14 13:03:54 +01:00
Iaccidentally ced192e8fd Update Essentials/src/items.csv
quick items.csv fix
2012-10-09 05:19:27 -03:00
KHobbits 0a9e9ca41d Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-10-07 22:40:18 +01:00
KHobbits 4982cc950e Add alt warp perm for others 2012-10-07 22:40:04 +01:00
snowleo 140a9100b7 Update AntiBuild for NB7.2 2012-10-07 23:00:09 +02:00
snowleo 0097f961b4 Prevent massive amount of mails being send.
Added new config: mails-per-minute, default 1000
2012-10-07 22:46:15 +02:00
KHobbits 98d657ec4b 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 63149d0b50 Change default action colour to be different to /say 2012-10-06 22:26:51 +01:00
KHobbits 7a410919a0 Code comments 2012-10-06 03:49:36 +01:00
KHobbits aa7a39d0b0 Comment for future sanity. 2012-10-05 02:06:23 +01:00
KHobbits 9b88107897 Fix gamemode other perm check 2012-10-02 21:06:28 +01:00
KHobbits 147a2fc227 Better handle invalid warp names 2012-10-02 00:19:42 +01:00
KHobbits 732dc3bf34 Cleanup sethome 2012-10-01 20:32:10 +01:00
Alexander Schepp 227cde75a7 Merge pull request #171 from chrisgward/patch-5
Adding console override to sudo chat
2012-10-01 10:31:48 -07:00
Chris Ward e670d0af45 Adding console override to sudo chat, changing say to c: 2012-10-02 03:30:13 +10:00
ElgarL cd0fde05b7 Merge remote-tracking branch 'remotes/origin/2.9' into groupmanager 2012-10-01 17:51:56 +01:00
ElgarL 8cf2ce7b73 Merge branch '2.9' of https://ElgarL@github.com/essentials/Essentials.git into 2.9 2012-10-01 17:50:08 +01:00
ElgarL 1ecf592893 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 0dd0dba338 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 678ae78767 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 d8b6742543 Blocking numeric home names, changing invalid home message 2012-10-02 02:32:52 +10:00
Chris Ward 2671f39951 Adding -c switch to sudo to fake chat 2012-10-02 02:31:15 +10:00
Alexander Schepp d7ddf3c828 Merge pull request #169 from chrisgward/patch-5
Adding console only overrides to exempts
2012-10-01 09:15:18 -07:00
Alexander Schepp 2b7cba936d Merge pull request #170 from chrisgward/2.9
Fixing storage of compiled regex
2012-10-01 09:12:35 -07:00
Chris Ward 2757c707bb Fixing storage of compiled regex 2012-10-02 02:11:05 +10:00
Chris Ward f50c5276e4 Adding console overrides to exempts 2012-10-02 01:57:29 +10:00
Iaccidentally a7e692fe37 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 02d273f15e Fixing bad file names in Windows (Fixes #2924) 2012-10-01 21:20:17 +10:00
ElgarL 778f5649c8 allWorldsDataList now returns fully mirrored worlds whihc are not
identical mirrors (fixes the /manselect list).
2012-10-01 12:05:49 +01:00
KHobbits d7829bef28 Merge pull request #163 from chrisgward/patch-1
Fixes #2933
2012-10-01 03:27:37 -07:00
Chris Ward d436d10b00 Typo (Ticket 2933) 2012-10-01 20:12:13 +10:00
KHobbits 2d9254eb28 Merge pull request #158 from necrodoom/patch-10
update potion aliases- add all unused potions
2012-09-30 13:55:20 -07:00
KHobbits 23393aea5f Merge pull request #162 from necrodoom/patch-12
small fixes to items.csv
2012-09-30 13:55:09 -07:00
KHobbits e1562e38bf Restore removed tp method, it is used in other plugins. 2012-09-30 18:15:46 +01:00
KHobbits 4dcce2544e Update Bukkit/CB to 1.3.2 R1
Bukkit: 1546 CB: 2377
2012-09-30 17:33:49 +01:00
Necrodoom 29fa2f0f19 small fixes to items.csv 2012-09-30 19:22:14 +03:00
KHobbits b850ae93e9 Merge branch 'release' of github.com:essentials/Essentials into 2.9 2012-09-30 17:21:09 +01:00
Necrodoom 21cb8efb90 update kit sign permission check 2012-09-30 17:16:03 +01:00
Necrodoom cd7be1bb86 update warp sign permission check 2012-09-30 17:15:57 +01:00
KHobbits 69cd17a1b1 Should fix tpaccept charge bug - needs testing 2012-09-30 17:15:40 +01:00
KHobbits 872bc4df4c New permission: essentials.teleport.timer.move - allow players to move during tp delay 2012-09-29 23:48:59 +01:00
KHobbits 3083ba2627 Little bit DRYer 2012-09-29 23:41:12 +01:00
KHobbits 35259892b8 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-29 23:35:09 +01:00
KHobbits fbc0f13b2b Properly handle tphere requests so the right user is in control/charged. 2012-09-29 23:34:46 +01:00
KHobbits aa7f49cb85 Tidy Teleport file 2012-09-29 23:33:32 +01:00
KHobbits 720676542e Merge pull request #161 from necrodoom/patch-11
update signs permission check
2012-09-29 13:52:07 -07:00
Necrodoom 1d7eb77f27 update kit sign permission check 2012-09-29 15:57:31 +03:00
Necrodoom 895f6269fc update warp sign permission check 2012-09-29 15:55:47 +03:00
KHobbits 4bf0d3ab24 Should fix tpaccept charge bug - needs testing 2012-09-29 03:59:31 +01:00
KHobbits afccda6350 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-09-28 23:01:32 +01:00
KHobbits c0a176825c Add potion effect clearing on /heal - Chris Ward 2012-09-28 20:56:03 +01:00
KHobbits db6512b702 Cleanup of god mode effects, suggested by gravypod. 2012-09-28 20:45:56 +01:00
KHobbits 46d3f0827a God mode cancel potion effects - Chris ward
Revert heal changes.
2012-09-28 20:35:13 +01:00
Necrodoom 838d7dd8f9 update potion aliases- add all unused potions
items.csv version 2.1_13
2012-09-28 17:02:43 +03:00
Paul A. b9e5c8827f Fix updating version on items.csv 2012-09-27 16:39:23 +02:00
Paul A. b8e000c7f9 Merge pull request #156 from evonuts/patch-1
Minor spelling/grammatical fixes
2012-09-27 05:47:31 -07:00
evonuts 5e7af93c77 Minor spelling/grammatical fixes 2012-09-28 00:42:25 +12:00
Paul A. 077ad8cd0f 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 0bf954e467 typo fix in config.yml 2012-09-27 15:19:14 +03:00
KHobbits 8a55afc4e1 Remove debug comments. 2012-09-25 22:37:58 +01:00
KHobbits 2bc9f2e386 Handle negated wildcard perms in generic superperms 2012-09-25 22:21:15 +01:00
ElgarL 920e1a3b1f Update users.yml to follow new ordering. 2012-09-25 20:41:16 +01:00
ElgarL 353253b9c5 No need for a new array. 2012-09-25 20:39:24 +01:00
ElgarL 1438230b70 Add alphabetically sorted user lists. 2012-09-25 13:23:19 +01:00
KHobbits 240aebde98 Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-09-25 13:16:41 +01:00
ElgarL d4e2ed782e Change order of data in Users.yml to [name, Group, SubGroup,
Permissions, Info nodes].
2012-09-25 13:09:26 +01:00
ElgarL f025cd9d2f Commenting 2012-09-25 11:27:36 +01:00
ElgarL 1ff7082892 Fix javadocs 2012-09-25 11:25:19 +01:00
ElgarL 15fa10dd29 Minor typo fix - Necrodoom 2012-09-25 11:15:28 +01:00
KHobbits 00b4bdadd4 Revert "Clean up imports"
This reverts commit d2546ebd36.
2012-09-24 23:04:33 +01:00
KHobbits 3055dd93a5 Improve fake sign check. 2012-09-24 23:01:58 +01:00
Paul A. 94dc29cc4d Merge pull request #151 from gravypod/patch-2
Clean up imports
2012-09-24 14:34:36 -07:00
KHobbits 22d1db5463 Envelope new drop/pickup/craft perms under 'essentials.build'. 2012-09-24 12:48:07 +01:00
KHobbits f2b4bb00b6 Minor cleanup 2012-09-24 03:16:15 +01:00
gravypod d2546ebd36 Clean up imports 2012-09-23 22:06:39 -03:00
KHobbits f1930e76d6 Fix and give better sign errors. 2012-09-24 00:19:39 +01:00
KHobbits d722e6a9f0 Less sign checking if certain signs aren't enabled. 2012-09-23 23:51:57 +01:00
KHobbits 8e6d4b1595 config typo. 2012-09-23 23:18:17 +01:00
KHobbits 72065c81f3 Minor colour change 2012-09-23 23:08:35 +01:00
KHobbits 2864d0186c Move wildcard perm check to superperms handler, rather than being PEX specific. 2012-09-23 23:01:14 +01:00
KHobbits 9c9b2be011 Lower reporting level of metrics errors. 2012-09-23 18:08:43 +01:00
KHobbits 2f40264c46 Support new lines in newbie welcome message. 2012-09-22 21:15:04 +01:00
KHobbits 5cc24827fc 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 da01bdc2b0 Cleanup delhome to match normal home cases properly. 2012-09-22 20:43:27 +01:00
ElgarL dfb81dd50f Update warning in GlobalGroups - Necrodoom. 2012-09-22 19:51:38 +01:00
ElgarL 567d52459b - 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 80a96e2a73 Reset colour code at start of default broadcast msg. 2012-09-22 15:00:00 +01:00
KHobbits c2f8467ca9 General demo txt formatting 2012-09-22 14:44:56 +01:00
KHobbits 155ca46fef Clean chat colours. 2012-09-22 14:40:56 +01:00
KHobbits 0952150235 Clean up the info.txt 2012-09-22 14:36:07 +01:00
KHobbits 30faa39070 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 3e367912ec 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 f8cff25bda fix info.txt colors and tags 2012-09-21 18:09:30 +03:00
md_5 3e80bf479e Check for explicit * permission when using PEX. 2012-09-21 19:53:20 +10:00
KHobbits 84afc80873 Update config.yml to show multiple enchantments for kits. 2012-09-21 02:10:39 +01:00
KHobbits 27a943217e Make sure we check for wildcards in PEX 2012-09-20 20:36:07 +01:00
KHobbits 16834d85c5 Switch pex permissions checks to use superperms rather than direct api call. 2012-09-20 20:21:45 +01:00
KHobbits 44d8c85450 ignoreCancelled events. 2012-09-19 21:07:50 +01:00
KHobbits 2a8e44dda8 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 00e3957190 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-19 19:48:14 +01:00
KHobbits a79b76e8d2 New Permission:
essentials.build.craft.<id>[:<datavalue>] - Allows crafting of an item
2012-09-19 19:47:47 +01:00
md_5 0a092ff5b3 Self indulgent commit. Door should be an alias for wood door. 2012-09-17 21:55:52 +10:00
KHobbits e6aeefb12d Hide Protection sign option. 2012-09-17 11:29:16 +01:00
KHobbits 924b6bd2ba Fix a few minor text formatting issues. 2012-09-16 20:45:33 +01:00
KHobbits f701090c89 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 b9195a561f Merge pull request #146 from necrodoom/patch-6
update dualbit, fix strength, add swift aliases
2012-09-16 08:48:16 -07:00
Necrodoom d94e4095da update dualbit, fix strength, add swift aliases
items.csv version 2.1_12
2012-09-16 18:46:46 +03:00
md_5 fd61cd1750 Merge remote-tracking branch 'origin/groupmanager' into 2.9 2012-09-16 23:02:56 +10:00
Iaccidentally e7ae8bcc47 Update Essentials/src/plugin.yml
updating SKYNET
2012-09-15 21:07:42 -03:00
KHobbits edc4d62004 Missing tl key. 2012-09-15 22:06:42 +01:00
KHobbits cdff690bb5 Add server uptime to /gc 2012-09-15 22:04:18 +01:00
KHobbits aa14cc39d9 Add missing TL key
Fixes #1363
2012-09-15 21:16:31 +01:00
KHobbits cdf2c8beed Allow bans on players who have never connected. 2012-09-15 20:57:44 +01:00
KHobbits 3e06c06827 Reduce the enchantment list some more. 2012-09-15 20:29:29 +01:00
KHobbits a2886d76d2 Fix Essentials /sethome to more strictly obey home limits. 2012-09-15 19:55:12 +01:00
KHobbits cc0a65bace /ess reset <player> - Clears stored data about a user. 2012-09-14 02:30:24 +01:00
KHobbits d988546ef3 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-14 01:11:04 +01:00
KHobbits b7f2add7b4 Fixed jail extend message - xGhOsTkiLLeRx 2012-09-14 01:10:22 +01:00
KHobbits b07f65c58b Update Essentials/nbproject/project.properties
Accidentally added unneeded line...
2012-09-14 02:01:02 +02:00
KHobbits 18e315a048 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-14 00:59:25 +01:00
KHobbits d3967297bb Don't create empty user files 2012-09-14 00:58:57 +01:00
KHobbits ea3631ddc2 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 992e473b72 Fix problems with async chat event not sending messages to xmpp chat spy 2012-09-13 14:57:02 +02:00
KHobbits 0296f4fcf1 remove users from bperm example, different yml file now. 2012-09-13 01:50:55 +01:00
KHobbits 2fc16250a3 Update bpermissions example 2012-09-13 01:46:23 +01:00
ElgarL 75f7b06a23 Remove unused imports. 2012-09-11 11:12:19 +01:00
KHobbits a7e834e5f9 Couple extra /info aliases. 2012-09-11 05:05:55 +01:00
KHobbits 59086932bd Less strict matching on /realname 2012-09-11 01:07:31 +01:00
KHobbits 5611acf12c Make /realname throw an error if no matches were found 2012-09-11 00:53:32 +01:00
snowleo 60142d872f Missing final 2012-09-10 20:53:25 +02:00
snowleo 1cf0ebbd7f Thread safety for GM 2012-09-10 20:49:07 +02:00
snowleo 736a6d273a Revert bad synchronization
This reverts commit 96ab1b4533.
2012-09-10 19:06:17 +02:00
ElgarL 71179e3dfd Synchronize the world data holder. 2012-09-10 17:46:01 +01:00
KHobbits 24cdc37987 Patch flight disable, to not effect creative mode.
Full world change config still needs coding.
2012-09-10 01:13:30 +01:00
KHobbits b606f153f4 Fixing map/ironore bug. 2012-09-10 01:10:32 +01:00
ElgarL 96ab1b4533 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 8718d59286 Little bit extra sanity checking. 2012-09-09 20:13:03 +01:00
KHobbits 5d372b8149 Move auto afk permission to 'essentials.afk.auto' 2012-09-09 19:09:35 +01:00
KHobbits 1d62de7e5e Fixing locale typo. 2012-09-09 18:35:20 +01:00
KHobbits 3691417848 Fix Missing TL key 2012-09-09 17:10:26 +01:00
KHobbits 029162bba7 Change default op colour 2012-09-09 16:55:43 +01:00
KHobbits 161a61e0c6 More message cleanup 2012-09-09 16:52:45 +01:00
KHobbits 587addb73f Manual merge necrodoom enchant changes. 2012-09-09 16:29:38 +01:00
KHobbits d71bd7fb71 Two sets of enchantment aliases. 2012-09-09 16:27:22 +01:00
KHobbits 699ec273dd More message cleanup 2012-09-09 16:15:12 +01:00
KHobbits c1eed8ebcd Missing TL keys 2012-09-09 15:50:22 +01:00
KHobbits b8d0cf4cc4 Few more message tweaks. 2012-09-09 15:27:25 +01:00
KHobbits ff0dd00d79 If chat event doesn't resolve to valid player, cancel and exit. 2012-09-09 06:36:14 +01:00
KHobbits e18d12f109 Message cleanup. 2012-09-09 05:41:06 +01:00
KHobbits 0a09b355b2 Update some of the example permissions files for the perm changes. 2012-09-08 23:00:57 +01:00
KHobbits f9659dae68 Move the per world permissions:
essentials.world.worldname is moved to essentials.worlds.worldname
2012-09-08 22:50:20 +01:00
KHobbits 78a580bc40 Log to console the effects of /sudo 2012-09-08 21:10:26 +01:00
KHobbits 8c4d6ad4df Remove dead setting.
Fixes #2465
2012-09-08 20:41:38 +01:00
KHobbits 9c9d4e1da5 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 ce50e1448b Look out for nulls. 2012-09-08 18:41:21 +01:00
KHobbits 8e885a3a6e 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 ecd96a81dd Fix /itemdb showing 'uses left' on none held items. 2012-09-08 16:33:00 +01:00
KHobbits 427108574e Fix compile error. 2012-09-08 16:03:54 +01:00
KHobbits 62381a7f52 Async EssentialsSpawn join event, like the others. 2012-09-08 14:55:37 +01:00
KHobbits b1b09ea542 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 e502a7e6fd Give user chance to get display name set before displaying geoip. 2012-09-08 14:40:19 +01:00
KHobbits acf4d0bcf5 Potential fix for teleporting issue. 2012-09-08 14:30:11 +01:00
KHobbits 6c3b13a7a4 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 cababcbfcf Fix ConcurrentModification bugs
This will probably slow down any access to config
2012-09-07 18:33:28 +02:00
Iaccidentally a032d0f19f Update Essentials/src/com/earth2me/essentials/commands/Commandburn.java
typo fix
2012-09-04 00:16:23 -03:00
KHobbits f808e6fa8e Catch null eco symbol. 2012-09-02 20:17:28 +01:00
KHobbits 842d9f73a4 More error on 'Permissions system error' in debug mode. 2012-09-02 18:30:59 +01:00
KHobbits c2893788e7 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-02 18:11:54 +01:00
KHobbits 0b8a6c45c6 Update /kit delay to use updated yaml code. 2012-09-02 18:11:29 +01:00
KHobbits 2049e630fb Merge pull request #136 from necrodoom/patch-3
update enchants with 3-1 letter aliases
2012-09-02 07:51:29 -07:00
KHobbits 6fd82480a3 Add support for /gamemode toggle | /gamemode t and /gmt to toggle between the 3 gamemodes. 2012-09-02 06:54:58 +01:00
KHobbits e919897f1b Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-09-02 01:57:10 +01:00
Iaccidentally 0fb5fc6bcc fix burn matching all players 2012-09-01 16:40:49 -04:00
Necrodoom a7d61b1b8d update enchants with 3-1 letter aliases 2012-09-01 10:33:20 +03:00
KHobbits be9a58457a Another Config tweak. 2012-08-31 22:31:56 +01:00
KHobbits b1cfc8a8ed Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-08-31 22:28:21 +01:00
KHobbits 6b9b6ba420 Config file tweaks 2012-08-31 22:26:26 +01:00
ElgarL 79c70b1f65 Include the GM version when logging errors. 2012-08-31 21:56:46 +01:00
ElgarL cfe634e8f7 Give a better error when a subgroup is null. 2012-08-31 21:47:35 +01:00
KHobbits 8c8c6fe73a Fix powertool command logging. 2012-08-31 18:52:40 +01:00
KHobbits a4353bc8f2 Don't need built in command logger anymore. 2012-08-31 18:44:14 +01:00
KHobbits 4015351c85 Sanity Check. 2012-08-31 17:57:57 +01:00
KHobbits e89f1d8a03 Add missing repair cost check on /repair hand 2012-08-31 17:54:10 +01:00
KHobbits ff461be45d Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-31 17:48:25 +01:00
KHobbits 93f5a05f17 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 3eba7fb90f Merge pull request #134 from necrodoom/patch-16
clear whitespace in globalgroups.yml
2012-08-31 06:48:07 -07:00
Necrodoom 25d51cd79e clear whitespace in globalgroups.yml 2012-08-31 16:40:25 +03:00
KHobbits a39824abb6 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-31 14:09:44 +01:00
KHobbits 2ac4c8e665 Fix metrics when kits are improperly configured. 2012-08-31 14:09:20 +01:00
Paul A. a84afbaa6e Update Essentials/src/config.yml
More grammar from Evonuts
2012-08-31 12:30:40 +02:00
Paul A. 41f7b4ec2d Update Essentials/src/config.yml
Grammar update thanks to Evonuts
2012-08-31 11:37:10 +02:00
KHobbits ce90e9710e Fix painting break in antibuild. 2012-08-31 06:06:33 +01:00
KHobbits 930eb7ae86 Fix IllegalStateException in sign click patch
Cleanup
2012-08-31 00:47:53 +01:00
KHobbits cf79a8fdca Fix min bukkit version warning. 2012-08-30 23:28:16 +01:00
KHobbits 1773a6060d 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 5755d647a3 Update chat formatting to use &r instead of &f 2012-08-30 20:43:33 +01:00
KHobbits 5032142a49 Clear up overriding comments on config file.
Closes #2725
2012-08-30 19:19:03 +01:00
KHobbits 15e996f485 Merge pull request #133 from necrodoom/patch-15
clarify some things on config
2012-08-30 10:08:38 -07:00
Necrodoom b37c08fd31 minor fix 2012-08-30 19:00:53 +03:00
Necrodoom eaca7f9c09 clarify some things on config 2012-08-30 18:58:43 +03:00
KHobbits 00072501c9 Merge pull request #131 from necrodoom/patch-14
update pork aliases
2012-08-29 08:22:04 -07:00
Necrodoom b50bb03814 update pork aliases
items.csv version 2.1_11
2012-08-29 16:51:38 +03:00
KHobbits f55316281c Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9 2012-08-28 03:12:16 +01:00
KHobbits 413a7beaa4 Fix CB. 2012-08-28 03:08:06 +01:00
KHobbits 88140f0610 Merge branch '2.9' into release 2012-08-28 03:05:13 +01:00
KHobbits 4996171b6e Update CB :: Bukkit 1536 || Craftbukkit 2352 (1.3.2-R0.1) 2012-08-28 03:01:49 +01:00
KHobbits d201286fc5 Merge branch '2.9' of github.com:essentials/Essentials into release 2012-08-28 02:55:02 +01:00
KHobbits 12b527be99 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 e666c27d96 Disable AFK when player damages entity. 2012-08-28 02:24:01 +01:00
KHobbits 56cfc47ef6 Manually merge Nickshelton80's alias change. 2012-08-28 02:08:58 +01:00
KHobbits c4e4235f30 Handle jail teleport locations slightly better. 2012-08-28 02:06:11 +01:00
KHobbits e045f9d983 Optimize AntiBuild a little
Support item name deny messages in antibuild.
2012-08-28 01:38:16 +01:00
KHobbits ba8d060927 Fix minor typo in plugin.yml
Remove 'essentials.interact' permission from antibuild - Not needed
2012-08-27 23:59:29 +01:00
KHobbits 5f73bf12d7 Remove max walk option to config, until its fixed in the client. 2012-08-27 03:09:56 +01:00
KHobbits 616f92c214 Missing [player] param syntax on /afk 2012-08-26 20:26:06 +01:00
KHobbits 298f3dc3b2 Comment out/remove the /speed walk code, until the client properly supports this function. 2012-08-26 19:53:58 +01:00
KHobbits 65741403e0 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 2b6d41ac5f More work on /fly command - Still incomplete
Updated and fixed messages files for missing keys.
2012-08-26 17:16:22 +01:00
KHobbits a4936355b5 Updated Spanish Translation 2012-08-26 00:36:35 +01:00
KHobbits 02d6eade28 Foundation for speed command - not yet implemented. 2012-08-25 19:23:41 +01:00
KHobbits 089fa8c19b Add AntiBuild to Metrics. 2012-08-25 16:57:36 +01:00
KHobbits 7c687831bc Don't check for loan permission is there is no cost. 2012-08-22 09:12:38 +01:00
KHobbits d43cb95d72 New perm: essentials.kit.exemptdelay
Allows you to exempt from kit delays.
2012-08-22 00:27:33 +01:00
ElgarL d588c3f271 iacc's anal 2012-08-21 21:28:26 +01:00
KHobbits eaa93d545d Remove debug messages. 2012-08-21 20:45:27 +01:00
KHobbits e324a21b60 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 b9cfd44588 Update CB
Bukkit 1533 || Craftbukkit 2345 (1.3.1-R2.1)
2012-08-21 19:56:14 +01:00
KHobbits 44e9c6ebfc Merge branch '2.9' into release 2012-08-21 19:34:26 +01:00
KHobbits a836576211 Reorder perm check in antibuild 2012-08-20 08:41:22 +01:00
KHobbits 1ad8c95e3e Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-19 23:42:05 +01:00
KHobbits 2dff343c10 Merge branch 'antibuild' into 2.9 2012-08-19 23:41:28 +01:00
KHobbits fa2a041102 Reduce permissions checks in antibuild.
Add a little debug logging for those with it enabled.
2012-08-19 21:20:55 +01:00
KHobbits 86f8f9c83f Merge pull request #124 from necrodoom/patch-11
patch ID 322 and update ID 260
2012-08-19 12:52:32 -07:00
KHobbits e359e8ab6e Correct antibuild perm check
(still need to abort interact/use checks on block place)
2012-08-19 16:08:36 +01:00
KHobbits 2f8f3aaa8d Attempt to add support for metadata permissions. 2012-08-19 15:25:40 +01:00
KHobbits f5bf5ed251 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 979da6e713 No more null errors from corrupt config.yml's. 2012-08-19 14:49:16 +01:00
necrodoom 6c86fe6117 patch ID 322 and update ID 260
items.csv version 2.1_10
2012-08-19 09:50:19 +03:00
KHobbits 9018fc8324 Add some command cost debugging messages to /ess debug 2012-08-19 03:38:09 +01:00
KHobbits 2f57961ce4 Slightly more realistic worth prices. 2012-08-19 02:49:32 +01:00
KHobbits 4478d438d6 Tidy the worth file formatting. 2012-08-19 02:25:30 +01:00
KHobbits 9261b259a9 Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-18 16:10:36 +01:00
Iaccidentally 3f3d8c58bc Merge pull request #123 from necrodoom/patch-9
fix ID 2259, pointed out by tanite
2012-08-18 07:59:16 -07:00
KHobbits e42f7e4ffa Removing EssentialsUpdate from 2.9 branch.
Development may be continued in 3.x branch.
2012-08-18 15:51:55 +01:00
KHobbits 8a9353fd09 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 7d5e0352d2 Fix /warp command matching in console. 2012-08-18 15:25:14 +01:00
necrodoom 05eef76134 fix ID 2259, pointed out by tanite
items.csv version 2.1_09
2012-08-18 10:22:12 +03:00
Iaccidentally e6ef67f7bf 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 bbd93f333d 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 84f7859ca9 Fix an error with Logging set to 'OFF' triggering a cast exception. 2012-08-14 13:26:02 +01:00
Iaccidentally 1c0dffa67c 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 5f3fb9b595 few extra fixes to several IDs
items.csv version 2.1_07
2012-08-13 10:03:39 +03:00
Iaccidentally 4ce1e2d9bf add spruce/pine tree to items.csv 2012-08-13 01:45:10 -04:00
KHobbits e40f364c1e Merge branch '2.9' of github.com:essentials/Essentials into 2.9 2012-08-13 02:33:09 +01:00
KHobbits 6bd2d2c4b9 Try and prevent 'corrupt' messages files from breaking essentials. 2012-08-13 02:32:45 +01:00
snowleo 47f06e5c1b Fix encoding of swedish locale 2012-08-13 01:36:39 +02:00
KHobbits 4c4df13c2f Update Essentials/src/items.csv 2012-08-13 01:19:10 +02:00
KHobbits 6ca037ae3e Update Essentials/src/items.csv 2012-08-13 01:15:53 +02:00
KHobbits 47c708fd33 Merge pull request #115 from necrodoom/patch-3
grammar check on plugin.yml
2012-08-11 18:08:50 -07:00
KHobbits c40b23d80e 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 f17a790d78 Improve player matching in /gamemode
Add extra aliases to /gamemode
2012-08-12 01:12:10 +01:00
Iaccidentally bdf67db6ed fix name length check in /kill 2012-08-10 07:17:05 -04:00
Iaccidentally 3e203d193c fix msg and pay to accept 2 character names 2012-08-10 06:54:42 -04:00
KHobbits a92eb4dee6 Throw warning when using /kill without valid player. 2012-08-10 02:40:05 +01:00
KHobbits ed411ee217 Add console log message when player is /kicked 2012-08-10 02:35:05 +01:00
KHobbits 368d3a4046 Add console log message when player is /banned 2012-08-10 02:27:10 +01:00
KHobbits 8aab57e86b Fix yaml issue with /kit 2012-08-10 02:26:23 +01:00
KHobbits e198b61eae Fix Chat Formatting so chat type is shown first. 2012-08-09 13:11:51 +01:00
Iaccidentally 9824cd75b6 Merge pull request #117 from necrodoom/patch-5
items.csv update with ticket #2559 suggestions
2012-08-09 02:07:13 -07:00
necrodoom 562274706b items.csv update with ticket #2559 suggestions
items.csv 2.1_06
2012-08-09 10:24:07 +03:00
necrodoom 8fdd32a210 sets, not setting 2012-08-08 11:32:21 +03:00
1157 changed files with 157182 additions and 102207 deletions

No files matched your search

+183
View File
@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!-- based on https://github.com/KyoriPowered/adventure/blob/master/.checkstyle/checkstyle.xml -->
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="fileExtensions" value="java, properties, xml"/>
<property name="severity" value="error"/>
<!-- https://checkstyle.org/config_filefilters.html#BeforeExecutionExclusionFileFilter -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<!-- https://checkstyle.org/config_whitespace.html#FileTabCharacter -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<!-- https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
<module name="NewlineAtEndOfFile"/>
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
<module name="SuppressionFilter">
<property name="file" value="${configDirectory}/suppressions.xml"/>
</module>
<!-- https://checkstyle.org/config_filters.html#SuppressWithPlainTextCommentFilter -->
<module name="SuppressWithPlainTextCommentFilter"/>
<module name="TreeWalker">
<!-- https://checkstyle.org/config_misc.html#ArrayTypeStyle -->
<module name="ArrayTypeStyle"/>
<!-- https://checkstyle.org/config_imports.html#AvoidStarImport -->
<module name="AvoidStarImport"/>
<!-- https://checkstyle.org/config_misc.html#AvoidEscapedUnicodeCharacters -->
<module name="AvoidEscapedUnicodeCharacters">
<property name="allowByTailComment" value="true"/>
<property name="allowEscapesForControlCharacters" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
<property name="severity" value="info"/>
</module>
<!-- https://checkstyle.org/config_misc.html#CommentsIndentation -->
<module name="CommentsIndentation"/>
<!-- https://checkstyle.org/config_whitespace.html#EmptyForInitializerPad -->
<module name="EmptyForInitializerPad"/>
<!-- https://checkstyle.org/config_whitespace.html#EmptyForIteratorPad -->
<module name="EmptyForIteratorPad"/>
<!-- https://checkstyle.org/config_whitespace.html#EmptyLineSeparator -->
<module name="EmptyLineSeparator">
<property name="allowMultipleEmptyLines" value="false"/>
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
<property name="allowNoEmptyLineBetweenFields" value="true"/>
<property name="tokens"
value="CLASS_DEF, CTOR_DEF, ENUM_DEF, IMPORT, INSTANCE_INIT, INTERFACE_DEF, METHOD_DEF, STATIC_IMPORT, STATIC_INIT, VARIABLE_DEF"/> <!-- remove PACKAGE_DEF, temporarily remove COMPACT_CTOR_DEF, RECORD_DEF -->
</module>
<!-- https://checkstyle.org/config_coding.html#FallThrough -->
<module name="FallThrough">
<property name="checkLastCaseGroup" value="true"/>
</module>
<!-- https://checkstyle.org/config_design.html#FinalClass -->
<module name="FinalClass"/>
<!-- https://checkstyle.org/config_coding.html#FinalLocalVariable -->
<module name="FinalLocalVariable"/>
<!-- https://checkstyle.org/config_whitespace.html#GenericWhitespace -->
<module name="GenericWhitespace"/>
<!-- https://checkstyle.org/config_design.html#HideUtilityClassConstructor -->
<module name="HideUtilityClassConstructor"/>
<!-- https://checkstyle.org/config_imports.html#IllegalImport -->
<module name="IllegalImport">
<property name="illegalPkgs" value="sun, jdk, com.sun"/>
</module>
<!-- https://checkstyle.org/config_coding.html#IllegalTokenText -->
<module name="IllegalTokenText">
<property name="format"
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
<property name="message"
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
<property name="tokens" value="CHAR_LITERAL, STRING_LITERAL"/>
</module>
<!-- https://checkstyle.org/config_misc.html#Indentation -->
<module name="Indentation"/>
<!-- https://checkstyle.org/config_blocks.html#LeftCurly -->
<module name="LeftCurly"/>
<!-- https://checkstyle.org/config_naming.html#MethodName -->
<module name="MethodName">
<property name="format" value="^[_]?[a-z][a-zA-Z0-9]*$"/>
</module>
<!-- https://checkstyle.org/config_whitespace.html#MethodParamPad -->
<module name="MethodParamPad"/>
<!-- https://checkstyle.org/config_javadoc.html#MissingJavadocMethod -->
<module name="MissingJavadocMethod">
<property name="allowMissingPropertyJavadoc" value="true"/>
<property name="tokens" value="METHOD_DEF, ANNOTATION_FIELD_DEF"/> <!-- remove CTOR_DEF, COMPACT_CTOR_DEF -->
</module>
<!-- https://checkstyle.org/config_javadoc.html#MissingJavadocType -->
<module name="MissingJavadocType"/>
<!-- https://checkstyle.org/config_coding.html#NoFinalizer -->
<module name="NoFinalizer"/>
<!-- https://checkstyle.org/config_whitespace.html#NoLineWrap -->
<module name="NoLineWrap"/>
<!-- https://checkstyle.org/config_whitespace.html#NoWhitespaceAfter -->
<module name="NoWhitespaceAfter">
<property name="allowLineBreaks" value="false"/>
</module>
<!-- https://checkstyle.org/config_whitespace.html#NoWhitespaceBefore -->
<module name="NoWhitespaceBefore">
<property name="allowLineBreaks" value="true"/>
</module>
<!-- https://checkstyle.org/config_coding.html#OneStatementPerLine -->
<module name="OneStatementPerLine"/>
<!-- https://checkstyle.org/config_misc.html#OuterTypeFilename -->
<module name="OuterTypeFilename"/>
<!-- https://checkstyle.org/config_imports.html#RedundantImport -->
<module name="RedundantImport"/>
<!-- https://checkstyle.org/config_modifier.html#RedundantModifier -->
<module name="RedundantModifier">
<property name="tokens"
value="ANNOTATION_FIELD_DEF, CLASS_DEF, CTOR_DEF, ENUM_DEF, INTERFACE_DEF, VARIABLE_DEF"/> <!-- remove METHOD_DEF and RESOURCE -->
</module>
<!-- https://checkstyle.org/config_coding.html#RequireThis -->
<module name="RequireThis"/>
<!-- https://checkstyle.org/config_blocks.html#RightCurly -->
<module name="RightCurly">
<property name="id" value="RightCurlyAlone"/>
<property name="option" value="alone"/>
<property name="tokens"
value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_DEF, INSTANCE_INIT, LITERAL_FOR, LITERAL_WHILE, METHOD_DEF, STATIC_INIT"/>
</module>
<module name="RightCurly">
<property name="id" value="RightCurlySame"/>
<property name="option" value="same"/>
<property name="tokens"
value="LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_IF, LITERAL_TRY"/> <!-- add LITERAL_DO -->
</module>
<!-- https://checkstyle.org/config_whitespace.html#SingleSpaceSeparator -->
<module name="SingleSpaceSeparator">
<property name="validateComments" value="true"/>
</module>
<!-- https://checkstyle.org/config_whitespace.html#TypecastParenPad -->
<module name="TypecastParenPad"/>
<!-- https://checkstyle.org/config_coding.html#UnnecessaryParentheses -->
<module name="UnnecessaryParentheses"/>
<!-- https://checkstyle.org/config_imports.html#UnusedImports -->
<module name="UnusedImports"/>
</module>
</module>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "http://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
<suppress files=".*[\\/]test[\\/]java[\\/].*" checks="RequireExplicitVisibilityModifier"/>
<!-- TODO: don't suppress I-prefixed API interfaces under com.earth2me.essentials -->
<suppress files="(com[\\/]earth2me[\\/]essentials[\\/]|net[\\/]ess3[\\/]|net[\\/]essentialsx[\\/])(?:[^\\/]+$|(?!api)[^\\/]+[\\/])" checks="MissingJavadoc(Method|Type)"/>
</suppressions>
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/bukkit-0.0.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/Permissions3.jar"/>
</classpath>
+13
View File
@@ -0,0 +1,13 @@
# Currently used
patreon: EssentialsX
ko_fi: essentialsx
github: EssentialsX
open_collective: EssentialsX
# Currently not used
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
#liberapay: # Replace with a single Liberapay username
#issuehunt: # Replace with a single IssueHunt username
#otechie: # Replace with a single Otechie username
#custom: # Replace with a single custom sponsorship URL
+20
View File
@@ -0,0 +1,20 @@
blank_issues_enabled: false
contact_links:
- name: View common issues
url: https://github.com/EssentialsX/Essentials/issues/3956
about: Check the list of known common issues to see if it solves your problem.
- name: Check past help requests
url: https://github.com/EssentialsX/Essentials/discussions/categories/q-a
about: Visit the Q&A forum to search for previous help requests.
- name: Check past feature suggestions
url: https://github.com/EssentialsX/Essentials/discussions/categories/ideas-and-feature-suggestions
about: Visit the Feature Suggestions forum to view and discuss existing feature suggestions.
- name: Create help request
url: https://github.com/EssentialsX/Essentials/discussions/new?category=q-a
about: Create a support ticket to get help from developers.
- name: Suggest a feature
url: https://github.com/EssentialsX/Essentials/discussions/new?category=ideas-and-feature-suggestions
about: Suggest new features for EssentialsX!
- name: Get help from the community on Discord
url: https://discord.gg/casfFyh
about: Join the MOSS Discord for community-powered EssentialsX support!
+79
View File
@@ -0,0 +1,79 @@
name: Report bug
description: Report a bug in EssentialsX.
labels: 'bug: unconfirmed'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report an EssentialsX bug! Fill out the form below to provide us with info to help fix the bug.
Only use this if you're 100% sure you've found a bug and can reproduce it. If you're looking for general help with EssentialsX, try the Q&A forum or MOSS Discord server.
- type: dropdown
attributes:
label: Type of bug
description: What type of bug is this? Choose all that apply.
multiple: true
options:
- Performance issue or memory leak
- Data loss
- Exploit
- Compatibility issue
- Error in console
- Other unexpected behaviour
validations:
required: true
- type: input
attributes:
label: "`/ess dump all` output"
description: Run `/ess dump all` in the console, then copy and paste the link from the output of the command into this box. (If this command doesn't work, you should [update EssentialsX](https://essentialsx.net/downloads.html) and try again.)
validations:
required: true
- type: input
attributes:
label: Error log (if applicable)
description: If you are reporting a console error, upload any relevant log excerpts to either https://paste.gg or https://gist.github.com, save and the paste the link in this box. If you included those files in the same paste as your startup log, paste the same link here.
placeholder: "Example: https://paste.gg/p/anonymous/109dd6a10a734a3aa430d5a351ea5210"
- type: textarea
attributes:
label: Bug description
description: Describe roughly what the bug is here.
placeholder: |
Example: "When running /nuke after putting everyone into adventure mode, there aren't any explosions..."
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: Provide an example of how to trigger the bug.
placeholder: |
Example:
1. Have at least 3 people online
2. Run `/gma *` to put everyone into adventure mode
3. Run `/nuke`
validations:
required: true
- type: textarea
attributes:
label: Expected behaviour
description: Explain what you should expect to happen.
placeholder: |
Example: "Everything should explode!"
validations:
required: true
- type: textarea
attributes:
label: Actual behaviour
description: Explain what actually happens.
placeholder: |
Example: "Everything doesn't explode :("
validations:
required: true
- type: markdown
attributes:
value: |
In the text box below, you can attach any relevant screenshots, files and links to Timings/spark profiler reports.
You can also include a link to a heapdump if necessary, but please make sure you don't include any private player data in the heapdump.
If you suspect this issue is related to a prior issue/PR/commit, please mention it here.
+94
View File
@@ -0,0 +1,94 @@
<!--
EssentialsX bug fix submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a bug fix, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original bug
report. If there isn't an existing bug report, we recommend opening a new
detailed bug report BEFORE opening your PR to fix it, else your PR may be
delayed or rejected without warning.
You can open a new bug report by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. When linking logs or config files, do not attach them to the post!
Copy and paste any logs into https://gist.github.com/, then paste a
link to them in the relevant parts of the template. Do not use Hastebin
or Pastebin, as this can cause issues with future reviews.
DO NOT drag logs directly into this text box, as we cannot read these!
3. If you are fixing a performance issue, please include a link to a
Timings and/or profiler report, both before and after your PR.
4. If you are fixing a visual bug, such as in commands, please include
screenshots so that we can more easily review the proposed fix.
(You can drag screenshots into the bottom of the editor.)
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR fixes
multiple issues, you should repeat the phrase "fixes #nnnn" for each issue.
-->
This PR fixes #nnnn.
### Details
**Proposed fix:**
<!-- Type a description of your proposed fix below this line. -->
**Environments tested:**
<!-- Type the OS you have used below. -->
OS:
<!-- Type the JDK version (from java -version) you have used below. -->
Java version:
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [ ] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after as
necessary. If you have created or used a test case plugin, please link to a
download of the plugin, source code and exact version used where possible.
-->
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: MOSS Discord Server
url: https://discord.gg/casfFyh
about: Need help with using EssentialsX? Join the MOSS Discord server for help.
- name: EssentialsX Development Discord Server
url: https://discord.gg/CUN7qVb
about: Got questions or want to discuss changes before opening your PR? Join the EssentialsX Development Discord server. (Need help? Join MOSS instead.)
@@ -0,0 +1,93 @@
<!--
EssentialsX feature submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a new feature, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original feature
request. If there isn't an existing feature request, we strongly
recommend opening a new feature request BEFORE opening your PR to
implement it, as this allows us to review whether we're likely to accept
your feature in advance, and also allows us to discuss possible
implementations for the feature. If there is no associated feature
request, your PR may be delayed or rejected without warning.
You can open a new feature request by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. If you are fixing a performance issue, please use the "Bug fix" PR template
instead. The "bug fix" template is better suited to performance issues.
3. Include a demonstration.
If you are adding commands, please provide screenshots and/or a video
demonstration of the feature. Similarly, if you are adding a new API,
please include a link to example code that takes advantage of your
proposed API. This will aid us in reviewing PRs and speed up the process
significantly.
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR implements
features from multiple issues, you should repeat the phrase "closes #nnnn"
for each issue.
-->
This PR closes #nnnn.
### Details
**Proposed feature:**
<!-- Type a description of your proposed feature below this line. -->
**Environments tested:**
<!-- Type the OS you have used below. -->
OS:
<!-- Type the JDK version (from java -version) you have used below. -->
Java version:
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [ ] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after as
necessary. If you have created or used a test case plugin, please link to a
download of the plugin, source code and exact version used where possible.
-->
+10
View File
@@ -0,0 +1,10 @@
You need to select a pull request template!
If you're adding a new feature, copy and paste the following parameter at the end of the URL:
?template=new-feature.md
If you're fixing a bug, copy and paste the following parameter at the end of the URL:
?template=bug-fix.md
For more information about contributing to EssentialsX, see CONTRIBUTING.md:
https://github.com/EssentialsX/Essentials/blob/2.x/CONTRIBUTING.md
+74
View File
@@ -0,0 +1,74 @@
name: Build EssentialsX
on:
push:
branches:
- 2.x
jobs:
build:
name: Build and upload
runs-on: ubuntu-latest
steps:
- name: Checkout Git repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Restore Gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 16
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew build --stacktrace
- name: Archive plugin jars on GitHub
uses: actions/upload-artifact@master
with:
name: EssentialsX plugin jars
path: jars/
- name: Deploy to Maven repo
if: ${{ success() && github.event_name == 'push' && github.repository == 'EssentialsX/Essentials' && github.ref == 'refs/heads/2.x' }}
env:
ORG_GRADLE_PROJECT_essxUsername: ${{ secrets.ESSENTIALSX_DEPLOY_USERNAME }}
ORG_GRADLE_PROJECT_essxPassword: ${{ secrets.ESSENTIALSX_DEPLOY_PASSWORD }}
run: |
./gradlew publish
- name: Prepare Javadocs
if: ${{ success() && github.event_name == 'push' && github.repository == 'EssentialsX/Essentials' && github.ref == 'refs/heads/2.x' }}
run: |
mv Essentials/build/docs/javadoc/ javadocs/
cp -r EssentialsAntiBuild/build/docs/javadoc/ javadocs/EssentialsAntiBuild/
cp -r EssentialsChat/build/docs/javadoc/ javadocs/EssentialsChat/
cp -r EssentialsDiscord/build/docs/javadoc/ javadocs/EssentialsDiscord/
cp -r EssentialsGeoIP/build/docs/javadoc/ javadocs/EssentialsGeoIP/
cp -r EssentialsProtect/build/docs/javadoc/ javadocs/EssentialsProtect/
cp -r EssentialsSpawn/build/docs/javadoc/ javadocs/EssentialsSpawn/
cp -r EssentialsXMPP/build/docs/javadoc/ javadocs/EssentialsXMPP/
- name: Deploy Javadocs
if: ${{ success() && github.event_name == 'push' && github.repository == 'EssentialsX/Essentials' && github.ref == 'refs/heads/2.x' }}
uses: netlify/actions/cli@master
with:
args: deploy --dir=javadocs/ --prod --message="GitHubActionsDeploy"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_JD_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_JD_2X_SITE_ID }}
+50
View File
@@ -0,0 +1,50 @@
name: Build Pull Request
on:
push:
branches:
- mc/* # MC version updates
- pr/* # PR rebases
pull_request:
branches:
- 2.x
- mc/*
jobs:
build:
name: Build and upload
runs-on: ubuntu-latest
steps:
- name: Checkout Git repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Restore Gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 16
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew build --stacktrace
- name: Archive plugin jars on GitHub
uses: actions/upload-artifact@master
with:
name: EssentialsX plugin jars
path: jars/
+27 -41
View File
@@ -1,42 +1,28 @@
# Other IDE files
*.classpath
*.project
*.settings/
.idea/*
*.iml
.DS_Store
/BuildAll/nbproject/private/
/EssentialsProtect/nbproject/private/
/EssentialsChat/nbproject/private/
/EssentialsGroupBridge/nbproject/private/
/EssentialsGeoIP/nbproject/private/
/EssentialsSpawn/nbproject/private/
/EssentialsXMPP/nbproject/private/
/EssentialsGroupManager/nbproject/private/
/BuildAll/build/
/EssentialsGroupBridge/dist/
/EssentialsGroupBridge/build/
/EssentialsGeoIP/dist/
/EssentialsGeoIP/build/
/EssentialsGroupManager/build/
/EssentialsGroupManager/dist/
/BuildAll/dist/
/EssentialsChat/build/
/EssentialsChat/dist/
/EssentialsSpawn/build/
/EssentialsSpawn/dist/
/EssentialsXMPP/dist/
/EssentialsXMPP/build/
/EssentialsProtect/dist/
/EssentialsProtect/build/
/EssentialsPermissionsCommands/nbproject/private/
/EssentialsPermissionsCommands/build/
/EssentialsPermissionsCommands/dist/
/Essentials/nbproject/private/
/Essentials/dist/
/Essentials/build/
/YamlAnnotations/
/EssentialsUpdate/nbproject/private/
/EssentialsRelease/
/EssentialsUpdate/dist/
/EssentialsUpdate/build/
/WebPush/apikey.php
/WebPush/nbproject/private
/.idea
*.iml
/EssentialsGroupManager/bin
/EssentialsGroupManager/.externalToolBuilders
# Checkstyle-IDEA config
!.idea/checkstyle-idea.xml
# Essentials files
/Essentials/userdata
/Essentials/config.yml
/Essentials/kits.yml
/Essentials/userdata/testplayer1.yml
/Essentials/usermap.csv
# Build files
.gradle/
/jars/
out/
build/
target/
*.class
# Run directory
/run/
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
<entry key="active-configuration" value="PROJECT_RELATIVE:$PROJECT_DIR$/.checkstyle/checkstyle.xml:EssentialsX" />
<entry key="checkstyle-version" value="8.36.2" />
<entry key="copy-libs" value="true" />
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
<entry key="location-2" value="PROJECT_RELATIVE:$PROJECT_DIR$/.checkstyle/checkstyle.xml:EssentialsX" />
<entry key="property-2.configDirectory" value=".checkstyle/" />
<entry key="scan-before-checkin" value="true" />
<entry key="scanscope" value="JavaOnly" />
<entry key="suppress-errors" value="false" />
</map>
</option>
</component>
</project>
-17
View File
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Essentials</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
-74
View File
@@ -1,74 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="BuildAll" default="default" basedir=".">
<description>Builds, tests, and runs the project BuildAll.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="BuildAll-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
File diff suppressed because it is too large. Load diff
-8
View File
@@ -1,8 +0,0 @@
build.xml.data.CRC32=51b33957
build.xml.script.CRC32=7a797370
build.xml.stylesheet.CRC32=28e38971@1.44.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=51b33957
nbproject/build-impl.xml.script.CRC32=2a17f1e9
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
-129
View File
@@ -1,129 +0,0 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=BuildAll
application.vendor=
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=2
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=2
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=2
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=120
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAnnotationArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineArrayInit=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAssignment=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineBinaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineCallArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineDisjunctiveCatchTypes=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineImplements=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineParenthesized=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTernaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineThrows=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader=0
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/BuildAll.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
includes=**
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
${reference.EssentialsChat.jar}:\
${reference.EssentialsProtect.jar}:\
${reference.EssentialsSpawn.jar}:\
${reference.EssentialsGeoIP.jar}:\
${reference.EssentialsGroupBridge.jar}:\
${reference.EssentialsXMPP.jar}:\
${reference.EssentialsGroupManager.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
project.Essentials=../Essentials
project.EssentialsChat=../EssentialsChat
project.EssentialsGeoIP=../EssentialsGeoIP
project.EssentialsGroupBridge=../EssentialsGroupBridge
project.EssentialsGroupManager=../EssentialsGroupManager
project.EssentialsProtect=../EssentialsProtect
project.EssentialsSpawn=../EssentialsSpawn
project.EssentialsXMPP=../EssentialsXMPP
reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
reference.EssentialsChat.jar=${project.EssentialsChat}/dist/EssentialsChat.jar
reference.EssentialsGeoIP.jar=${project.EssentialsGeoIP}/dist/EssentialsGeoIP.jar
reference.EssentialsGroupBridge.jar=${project.EssentialsGroupBridge}/dist/EssentialsGroupBridge.jar
reference.EssentialsGroupManager.jar=${project.EssentialsGroupManager}/dist/EssentialsGroupManager.jar
reference.EssentialsProtect.jar=${project.EssentialsProtect}/dist/EssentialsProtect.jar
reference.EssentialsSpawn.jar=${project.EssentialsSpawn}/dist/EssentialsSpawn.jar
reference.EssentialsXMPP.jar=${project.EssentialsXMPP}/dist/EssentialsXMPP.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
-84
View File
@@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>BuildAll</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
<libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
<definitions>..\lib\nblibraries.properties</definitions>
</libraries>
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
<reference>
<foreign-project>Essentials</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsChat</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsGeoIP</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsGroupBridge</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsGroupManager</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsProtect</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsSpawn</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsXMPP</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
</references>
</configuration>
</project>
+31
View File
@@ -0,0 +1,31 @@
Contributing to EssentialsX
===========================
Want to help improve EssentialsX? There are several ways you can support and contribute to the project.
If you'd like to make a financial contribution to the project, you can join our [Patreon](https://www.patreon.com/essentialsx/),
or to make a one-off donation you can visit our [Ko-fi page](https://ko-fi.com/essentialsx). If you can't make a
donation, don't worry! There are lots of other ways to contribute:
* Do you run a server? Take a look at our ["help wanted"](https://github.com/EssentialsX/Essentials/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22)
and ["bug: unconfirmed"](https://github.com/EssentialsX/Essentials/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22bug%3A+unconfirmed%22)
issues, where you can find issues that need extra testing and investigation.
* Do you speak multiple languages? If so, we always welcome contributions to our [Crowdin project](https://crowdin.com/project/essentialsx-official).
* Do you enjoy helping others? If so, why not contribute to the [EssentialsX documentation](https://github.com/EssentialsX/wiki)?
You can also join the [MOSS Discord community](https://discord.gg/casfFyh) and provide direct community support to
other EssentialsX users.
* If you're a developer, you could look through our ["open to PR"](https://github.com/EssentialsX/Essentials/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22status%3A+open+to+PR%22)
issues. We're always happy to receive bug fixes and feature additions as pull requests.
Submitting a PR
---------------
EssentialsX has extensive templates for PRs that detail how to submit your PR. To find out more, see the PR templates for:
* [Bug fixes](https://github.com/EssentialsX/Essentials/blob/2.x/.github/PULL_REQUEST_TEMPLATE/bug-fix.md)
* [New features](https://github.com/EssentialsX/Essentials/blob/2.x/.github/PULL_REQUEST_TEMPLATE/new-feature.md)
Want to discuss a feature before opening a PR? Join the [EssentialsX Development Discord server](https://discord.gg/CUN7qVb). Note that this server is **not for end-users** - if you need support with EssentialsX, you should join [MOSS](https://discord.gg/casfFyh) instead.
By contributing to EssentialsX, you agree to license your code under the [GNU General Public License version 3](https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE).
+58
View File
@@ -0,0 +1,58 @@
plugins {
id("essentials.shadow-module")
}
dependencies {
compileOnly('com.github.milkbowl:VaultAPI:1.7') {
exclude group: "org.bukkit", module: "bukkit"
}
compileOnly 'net.luckperms:api:5.0'
api 'io.papermc:paperlib:1.0.6'
api 'org.bstats:bstats-bukkit:2.2.1'
implementation 'org.spongepowered:configurate-yaml:4.1.2'
implementation 'org.checkerframework:checker-qual:3.14.0'
// Providers
api project(':providers:BaseProviders')
api project(':providers:PaperProvider')
api(project(':providers:NMSReflectionProvider')) {
exclude group: "org.bukkit", module: "bukkit"
}
api(project(':providers:1_8Provider')) {
exclude group: "org.spigotmc", module: "spigot"
}
api(project(':providers:1_12Provider')) {
exclude group: "org.bukkit", module: "bukkit"
}
}
shadowJar {
dependencies {
include (dependency('io.papermc:paperlib'))
include (dependency('org.bstats:bstats-bukkit'))
include (dependency('org.bstats:bstats-base'))
include (dependency('org.spongepowered:configurate-yaml'))
include (dependency('org.spongepowered:configurate-core'))
include (dependency('org.yaml:snakeyaml'))
include (dependency('io.leangen.geantyref:geantyref'))
include (dependency('org.checkerframework:checker-qual'))
include (project(':providers:BaseProviders'))
include (project(':providers:PaperProvider'))
include (project(':providers:NMSReflectionProvider'))
include (project(':providers:1_8Provider'))
include (project(':providers:1_12Provider'))
}
relocate 'io.papermc.lib', 'com.earth2me.essentials.paperlib'
relocate 'org.bstats', 'com.earth2me.essentials.libs.bstats'
relocate 'org.spongepowered.configurate', 'com.earth2me.essentials.libs.configurate'
relocate 'org.yaml.snakeyaml', 'com.earth2me.essentials.libs.snakeyaml'
relocate 'io.leangen.geantyref', 'com.earth2me.essentials.libs.geantyref'
relocate 'org.checkerframework', 'com.earth2me.essentials.libs.checkerframework'
minimize {
include(dependency('org.checkerframework:checker-qual'))
}
}
-84
View File
@@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="Essentials" default="default" basedir=".">
<description>Builds, tests, and runs the project Essentials.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="Essentials-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<!--target name="-post-jar">
<jar jarfile="${dist.dir}/Essentials.jar">
<zipfileset src="${dist.jar}" excludes="META-INF/*" />
<zipfileset src="${dist.dir}/lib/Register.jar" excludes="META-INF/*" />
<manifest>
<attribute name="Classpath" value="Essentials.jar"/>
</manifest>
</jar>
</target-->
</project>
File diff suppressed because it is too large. Load diff
-11
View File
@@ -1,11 +0,0 @@
build.xml.data.CRC32=7d758acf
build.xml.script.CRC32=3233ee78
build.xml.stylesheet.CRC32=28e38971@1.38.2.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=a830bc14
nbproject/build-impl.xml.script.CRC32=7c507372
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
nbproject/profiler-build-impl.xml.data.CRC32=ab78ce15
nbproject/profiler-build-impl.xml.script.CRC32=abda56ed
nbproject/profiler-build-impl.xml.stylesheet.CRC32=f10cf54c@1.11.1
-3
View File
@@ -1,3 +0,0 @@
DoNotUseThreads
LongVariable
SignatureDeclareThrowsException
-154
View File
@@ -1,154 +0,0 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=lombok.core.AnnotationProcessor
annotation.processing.run.all.processors=false
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=Essentials
application.vendor=
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=2
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=2
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=2
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=120
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAnnotationArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineArrayInit=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAssignment=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineBinaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineCallArgs=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineDisjunctiveCatchTypes=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineImplements=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineParenthesized=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTernaryOp=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineThrows=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader=0
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateImportGroups=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/Essentials.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.BOSEconomy7.jar=../lib/BOSEconomy7.jar
file.reference.bPermissions.jar=../lib/bPermissions.jar
file.reference.bpermissions2.jar=../lib/bpermissions2.jar
file.reference.bukkit.jar=../lib/bukkit.jar
file.reference.craftbukkit.jar=../lib/craftbukkit.jar
file.reference.iCo4.jar=../lib/iCo4.jar
file.reference.iCo5.jar=../lib/iCo5.jar
file.reference.iCo6.jar=../lib/iCo6.jar
file.reference.lombok.jar=../lib/lombok-0.10.8.jar
file.reference.MultiCurrency.jar=../lib/MultiCurrency.jar
file.reference.Permissions3.jar=../lib/Permissions3.jar
file.reference.PermissionsBukkit-1.2.jar=../lib/PermissionsBukkit-1.2.jar
file.reference.PermissionsEx.jar=../lib/PermissionsEx.jar
file.reference.Privileges.jar=..\\lib\\Privileges.jar
file.reference.Vault.jar=../lib/Vault.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.Permissions3.jar}:\
${file.reference.iCo4.jar}:\
${file.reference.iCo5.jar}:\
${file.reference.iCo6.jar}:\
${file.reference.MultiCurrency.jar}:\
${file.reference.BOSEconomy7.jar}:\
${file.reference.PermissionsEx.jar}:\
${file.reference.bPermissions.jar}:\
${file.reference.PermissionsBukkit-1.2.jar}:\
${file.reference.lombok.jar}:\
${reference.EssentialsGroupManager.jar}:\
${file.reference.bukkit.jar}:\
${file.reference.craftbukkit.jar}:\
${file.reference.Vault.jar}:\
${file.reference.Privileges.jar}:\
${file.reference.bpermissions2.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit_4.10.classpath}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.reference.PermissionsEx.jar=../lib/PermissionsEx-javadoc.jar
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jnlp.codebase.type=no.codebase
jnlp.descriptor=application
jnlp.enabled=false
jnlp.mixed.code=default
jnlp.offline-allowed=false
jnlp.signed=false
jnlp.signing=
jnlp.signing.alias=
jnlp.signing.keystore=
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=true
platform.active=default_platform
project.EssentialsGroupManager=../EssentialsGroupManager
reference.EssentialsGroupManager.jar=../EssentialsGroupManager/dist/EssentialsGroupManager.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=-Djline.terminal=jline.UnsupportedTerminal
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
-28
View File
@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>Essentials</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
<libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
<definitions>../lib/nblibraries.properties</definitions>
</libraries>
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
<reference>
<foreign-project>EssentialsGroupManager</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
</references>
</configuration>
</project>
@@ -1,137 +0,0 @@
package com.earth2me.essentials;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.command.Command;
import org.bukkit.command.PluginCommand;
import org.bukkit.command.PluginCommandYamlParser;
import org.bukkit.plugin.Plugin;
public class AlternativeCommandsHandler
{
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private final transient Map<String, List<PluginCommand>> altcommands = new HashMap<String, List<PluginCommand>>();
private final transient Map<String, String> disabledList = new HashMap<String, String>();
private final transient IEssentials ess;
public AlternativeCommandsHandler(final IEssentials ess)
{
this.ess = ess;
for (Plugin plugin : ess.getServer().getPluginManager().getPlugins())
{
if (plugin.isEnabled())
{
addPlugin(plugin);
}
}
}
public final void addPlugin(final Plugin plugin)
{
if (plugin.getDescription().getMain().contains("com.earth2me.essentials"))
{
return;
}
final List<Command> commands = PluginCommandYamlParser.parse(plugin);
final String pluginName = plugin.getDescription().getName().toLowerCase(Locale.ENGLISH);
for (Command command : commands)
{
final PluginCommand pc = (PluginCommand)command;
final List<String> labels = new ArrayList<String>(pc.getAliases());
labels.add(pc.getName());
PluginCommand reg = ess.getServer().getPluginCommand(pluginName + ":" + pc.getName().toLowerCase(Locale.ENGLISH));
if (reg == null)
{
reg = ess.getServer().getPluginCommand(pc.getName().toLowerCase(Locale.ENGLISH));
}
if (reg == null || !reg.getPlugin().equals(plugin))
{
continue;
}
for (String label : labels)
{
List<PluginCommand> plugincommands = altcommands.get(label.toLowerCase(Locale.ENGLISH));
if (plugincommands == null)
{
plugincommands = new ArrayList<PluginCommand>();
altcommands.put(label.toLowerCase(Locale.ENGLISH), plugincommands);
}
boolean found = false;
for (PluginCommand pc2 : plugincommands)
{
if (pc2.getPlugin().equals(plugin))
{
found = true;
}
}
if (!found)
{
plugincommands.add(reg);
}
}
}
}
public void removePlugin(final Plugin plugin)
{
final Iterator<Map.Entry<String, List<PluginCommand>>> iterator = altcommands.entrySet().iterator();
while (iterator.hasNext())
{
final Map.Entry<String, List<PluginCommand>> entry = iterator.next();
final Iterator<PluginCommand> pcIterator = entry.getValue().iterator();
while (pcIterator.hasNext())
{
final PluginCommand pc = pcIterator.next();
if (pc.getPlugin() == null || pc.getPlugin().equals(plugin))
{
pcIterator.remove();
}
}
if (entry.getValue().isEmpty())
{
iterator.remove();
}
}
}
public PluginCommand getAlternative(final String label)
{
final List<PluginCommand> commands = altcommands.get(label);
if (commands == null || commands.isEmpty())
{
return null;
}
if (commands.size() == 1)
{
return commands.get(0);
}
// return the first command that is not an alias
for (PluginCommand command : commands)
{
if (command.getName().equalsIgnoreCase(label))
{
return command;
}
}
// return the first alias
return commands.get(0);
}
public void executed(final String label, final String otherLabel)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, "Essentials: Alternative command " + label + " found, using " + otherLabel);
}
disabledList.put(label, otherLabel);
}
public Map<String, String> disabledCommands()
{
return disabledList;
}
}
@@ -1,140 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Backup implements Runnable
{
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private transient final Server server;
private transient final IEssentials ess;
private transient boolean running = false;
private transient int taskId = -1;
private transient boolean active = false;
public Backup(final IEssentials ess)
{
this.ess = ess;
server = ess.getServer();
if (server.getOnlinePlayers().length > 0)
{
startTask();
}
}
void onPlayerJoin()
{
startTask();
}
private void startTask()
{
if (!running)
{
final long interval = ess.getSettings().getBackupInterval() * 1200; // minutes -> ticks
if (interval < 1200)
{
return;
}
taskId = ess.scheduleSyncRepeatingTask(this, interval, interval);
running = true;
}
}
@Override
public void run()
{
if (active)
{
return;
}
active = true;
final String command = ess.getSettings().getBackupCommand();
if (command == null || "".equals(command))
{
return;
}
if ("save-all".equalsIgnoreCase(command)) {
final CommandSender cs = server.getConsoleSender();
server.dispatchCommand(cs, "save-all");
active = false;
return;
}
LOGGER.log(Level.INFO, _("backupStarted"));
final CommandSender cs = server.getConsoleSender();
server.dispatchCommand(cs, "save-all");
server.dispatchCommand(cs, "save-off");
ess.scheduleAsyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
try
{
final ProcessBuilder childBuilder = new ProcessBuilder(command);
childBuilder.redirectErrorStream(true);
childBuilder.directory(ess.getDataFolder().getParentFile().getParentFile());
final Process child = childBuilder.start();
final BufferedReader reader = new BufferedReader(new InputStreamReader(child.getInputStream()));
try
{
child.waitFor();
String line;
do
{
line = reader.readLine();
if (line != null)
{
LOGGER.log(Level.INFO, line);
}
}
while (line != null);
}
finally
{
reader.close();
}
}
catch (InterruptedException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
finally
{
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
server.dispatchCommand(cs, "save-on");
if (server.getOnlinePlayers().length == 0)
{
running = false;
if (taskId != -1)
{
server.getScheduler().cancelTask(taskId);
}
}
active = false;
LOGGER.log(Level.INFO, _("backupFinished"));
}
});
}
}
});
}
}
@@ -1,15 +0,0 @@
package com.earth2me.essentials;
public class ChargeException extends Exception
{
public ChargeException(final String message)
{
super(message);
}
public ChargeException(final String message, final Throwable throwable)
{
super(message, throwable);
}
}
@@ -1,38 +0,0 @@
package com.earth2me.essentials;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public final class Console implements IReplyTo
{
private static Console instance = new Console();
private CommandSender replyTo;
public final static String NAME = "Console";
private Console()
{
}
public static CommandSender getCommandSender(Server server) throws Exception
{
return server.getConsoleSender();
}
@Override
public void setReplyTo(CommandSender user)
{
replyTo = user;
}
@Override
public CommandSender getReplyTo()
{
return replyTo;
}
public static Console getConsoleReplyTo()
{
return instance;
}
}
@@ -1,298 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* This utility class is used for converting between the ingame time in ticks to ingame time as a friendly string. Note
* that the time is INGAME.
*
* http://www.minecraftwiki.net/wiki/Day/night_cycle
*
* @author Olof Larsson
*/
public final class DescParseTickFormat
{
// ============================================
// First some information vars. TODO: Should this be in a config file?
// --------------------------------------------
public static final Map<String, Integer> nameToTicks = new LinkedHashMap<String, Integer>();
public static final Set<String> resetAliases = new HashSet<String>();
public static final int ticksAtMidnight = 18000;
public static final int ticksPerDay = 24000;
public static final int ticksPerHour = 1000;
public static final double ticksPerMinute = 1000d / 60d;
public static final double ticksPerSecond = 1000d / 60d / 60d;
private static final SimpleDateFormat SDFTwentyFour = new SimpleDateFormat("HH:mm", Locale.ENGLISH);
private static final SimpleDateFormat SDFTwelve = new SimpleDateFormat("h:mmaa", Locale.ENGLISH);
static
{
SDFTwentyFour.setTimeZone(TimeZone.getTimeZone("GMT"));
SDFTwelve.setTimeZone(TimeZone.getTimeZone("GMT"));
nameToTicks.put("sunrise", 23000);
nameToTicks.put("dawn", 23000);
nameToTicks.put("daystart", 0);
nameToTicks.put("day", 0);
nameToTicks.put("morning", 1000);
nameToTicks.put("midday", 6000);
nameToTicks.put("noon", 6000);
nameToTicks.put("afternoon", 9000);
nameToTicks.put("sunset", 12000);
nameToTicks.put("dusk", 12000);
nameToTicks.put("sundown", 12000);
nameToTicks.put("nightfall", 12000);
nameToTicks.put("nightstart", 14000);
nameToTicks.put("night", 14000);
nameToTicks.put("midnight", 18000);
resetAliases.add("reset");
resetAliases.add("normal");
resetAliases.add("default");
}
private DescParseTickFormat()
{
}
// ============================================
// PARSE. From describing String to int
// --------------------------------------------
public static long parse(String desc) throws NumberFormatException
{
// Only look at alphanumeric and lowercase and : for 24:00
desc = desc.toLowerCase(Locale.ENGLISH).replaceAll("[^A-Za-z0-9:]", "");
// Detect ticks format
try
{
return parseTicks(desc);
}
catch (Exception e)
{
}
// Detect 24-hour format
try
{
return parse24(desc);
}
catch (Exception e)
{
}
// Detect 12-hour format
try
{
return parse12(desc);
}
catch (Exception e)
{
}
// Detect aliases
try
{
return parseAlias(desc);
}
catch (Exception e)
{
}
// Well we failed to understand...
throw new NumberFormatException();
}
public static long parseTicks(String desc) throws NumberFormatException
{
if (!desc.matches("^[0-9]+ti?c?k?s?$"))
{
throw new NumberFormatException();
}
desc = desc.replaceAll("[^0-9]", "");
return Long.parseLong(desc) % 24000;
}
public static long parse24(String desc) throws NumberFormatException
{
if (!desc.matches("^[0-9]{2}[^0-9]?[0-9]{2}$"))
{
throw new NumberFormatException();
}
desc = desc.toLowerCase(Locale.ENGLISH).replaceAll("[^0-9]", "");
if (desc.length() != 4)
{
throw new NumberFormatException();
}
final int hours = Integer.parseInt(desc.substring(0, 2));
final int minutes = Integer.parseInt(desc.substring(2, 4));
return hoursMinutesToTicks(hours, minutes);
}
public static long parse12(String desc) throws NumberFormatException
{
if (!desc.matches("^[0-9]{1,2}([^0-9]?[0-9]{2})?(pm|am)$"))
{
throw new NumberFormatException();
}
int hours = 0;
int minutes = 0;
desc = desc.toLowerCase(Locale.ENGLISH);
String parsetime = desc.replaceAll("[^0-9]", "");
if (parsetime.length() > 4)
{
throw new NumberFormatException();
}
if (parsetime.length() == 4)
{
hours += Integer.parseInt(parsetime.substring(0, 2));
minutes += Integer.parseInt(parsetime.substring(2, 4));
}
else if (parsetime.length() == 3)
{
hours += Integer.parseInt(parsetime.substring(0, 1));
minutes += Integer.parseInt(parsetime.substring(1, 3));
}
else if (parsetime.length() == 2)
{
hours += Integer.parseInt(parsetime.substring(0, 2));
}
else if (parsetime.length() == 1)
{
hours += Integer.parseInt(parsetime.substring(0, 1));
}
else
{
throw new NumberFormatException();
}
if (desc.endsWith("pm") && hours != 12)
{
hours += 12;
}
if (desc.endsWith("am") && hours == 12)
{
hours -= 12;
}
return hoursMinutesToTicks(hours, minutes);
}
public static long hoursMinutesToTicks(final int hours, final int minutes)
{
long ret = ticksAtMidnight;
ret += (hours) * ticksPerHour;
ret += (minutes / 60.0) * ticksPerHour;
ret %= ticksPerDay;
return ret;
}
public static long parseAlias(final String desc) throws NumberFormatException
{
final Integer ret = nameToTicks.get(desc);
if (ret == null)
{
throw new NumberFormatException();
}
return ret;
}
public static boolean meansReset(final String desc)
{
return resetAliases.contains(desc);
}
// ============================================
// FORMAT. From int to describing String
// --------------------------------------------
public static String format(final long ticks)
{
return _("timeFormat", format24(ticks), format12(ticks), formatTicks(ticks));
}
public static String formatTicks(final long ticks)
{
return (ticks % ticksPerDay) + "ticks";
}
public static String format24(final long ticks)
{
synchronized (SDFTwentyFour)
{
return formatDateFormat(ticks, SDFTwentyFour);
}
}
public static String format12(final long ticks)
{
synchronized (SDFTwelve)
{
return formatDateFormat(ticks, SDFTwelve);
}
}
public static String formatDateFormat(final long ticks, final SimpleDateFormat format)
{
final Date date = ticksToDate(ticks);
return format.format(date);
}
public static Date ticksToDate(long ticks)
{
// Assume the server time starts at 0. It would start on a day.
// But we will simulate that the server started with 0 at midnight.
ticks = ticks - ticksAtMidnight + ticksPerDay;
// How many ingame days have passed since the server start?
final long days = ticks / ticksPerDay;
ticks = ticks - days * ticksPerDay;
// How many hours on the last day?
final long hours = ticks / ticksPerHour;
ticks = ticks - hours * ticksPerHour;
// How many minutes on the last day?
final long minutes = (long)Math.floor(ticks / ticksPerMinute);
final double dticks = ticks - minutes * ticksPerMinute;
// How many seconds on the last day?
final long seconds = (long)Math.floor(dticks / ticksPerSecond);
// Now we create an english GMT calendar (We wan't no daylight savings)
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
cal.setLenient(true);
// And we set the time to 0! And append the time that passed!
cal.set(0, Calendar.JANUARY, 1, 0, 0, 0);
cal.add(Calendar.DAY_OF_YEAR, (int)days);
cal.add(Calendar.HOUR_OF_DAY, (int)hours);
cal.add(Calendar.MINUTE, (int)minutes);
cal.add(Calendar.SECOND, (int)seconds + 1); // To solve rounding errors.
return cal.getTime();
}
}
@@ -1,131 +0,0 @@
package com.earth2me.essentials;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.regex.Pattern;
import org.bukkit.enchantments.Enchantment;
public class Enchantments
{
private static final transient Pattern NUMPATTERN = Pattern.compile("\\d+");
private static final Map<String, Enchantment> ENCHANTMENTS = new HashMap<String, Enchantment>();
static
{
ENCHANTMENTS.put("alldamage", Enchantment.DAMAGE_ALL);
ENCHANTMENTS.put("alldmg", Enchantment.DAMAGE_ALL);
ENCHANTMENTS.put("sharpness", Enchantment.DAMAGE_ALL);
ENCHANTMENTS.put("sharp", Enchantment.DAMAGE_ALL);
ENCHANTMENTS.put("arthropodsdamage", Enchantment.DAMAGE_ARTHROPODS);
ENCHANTMENTS.put("ardmg", Enchantment.DAMAGE_ARTHROPODS);
ENCHANTMENTS.put("baneofarthropods", Enchantment.DAMAGE_ARTHROPODS);
ENCHANTMENTS.put("baneofarthropod", Enchantment.DAMAGE_ARTHROPODS);
ENCHANTMENTS.put("arthropod", Enchantment.DAMAGE_ARTHROPODS);
ENCHANTMENTS.put("undeaddamage", Enchantment.DAMAGE_UNDEAD);
ENCHANTMENTS.put("smite", Enchantment.DAMAGE_UNDEAD);
ENCHANTMENTS.put("digspeed", Enchantment.DIG_SPEED);
ENCHANTMENTS.put("efficiency", Enchantment.DIG_SPEED);
ENCHANTMENTS.put("minespeed", Enchantment.DIG_SPEED);
ENCHANTMENTS.put("cutspeed", Enchantment.DIG_SPEED);
ENCHANTMENTS.put("durability", Enchantment.DURABILITY);
ENCHANTMENTS.put("dura", Enchantment.DURABILITY);
ENCHANTMENTS.put("unbreaking", Enchantment.DURABILITY);
ENCHANTMENTS.put("fireaspect", Enchantment.FIRE_ASPECT);
ENCHANTMENTS.put("fire", Enchantment.FIRE_ASPECT);
ENCHANTMENTS.put("meleefire", Enchantment.FIRE_ASPECT);
ENCHANTMENTS.put("meleeflame", Enchantment.FIRE_ASPECT);
ENCHANTMENTS.put("knockback", Enchantment.KNOCKBACK);
ENCHANTMENTS.put("blockslootbonus", Enchantment.LOOT_BONUS_BLOCKS);
ENCHANTMENTS.put("fortune", Enchantment.LOOT_BONUS_BLOCKS);
ENCHANTMENTS.put("mobslootbonus", Enchantment.LOOT_BONUS_MOBS);
ENCHANTMENTS.put("mobloot", Enchantment.LOOT_BONUS_MOBS);
ENCHANTMENTS.put("looting", Enchantment.LOOT_BONUS_MOBS);
ENCHANTMENTS.put("oxygen", Enchantment.OXYGEN);
ENCHANTMENTS.put("respiration", Enchantment.OXYGEN);
ENCHANTMENTS.put("breathing", Enchantment.OXYGEN);
ENCHANTMENTS.put("breath", Enchantment.OXYGEN);
ENCHANTMENTS.put("protection", Enchantment.PROTECTION_ENVIRONMENTAL);
ENCHANTMENTS.put("prot", Enchantment.PROTECTION_ENVIRONMENTAL);
ENCHANTMENTS.put("protect", Enchantment.PROTECTION_ENVIRONMENTAL);
ENCHANTMENTS.put("explosionsprotection", Enchantment.PROTECTION_EXPLOSIONS);
ENCHANTMENTS.put("explosionprotection", Enchantment.PROTECTION_EXPLOSIONS);
ENCHANTMENTS.put("expprot", Enchantment.PROTECTION_EXPLOSIONS);
ENCHANTMENTS.put("blastprotection", Enchantment.PROTECTION_EXPLOSIONS);
ENCHANTMENTS.put("blastprotect", Enchantment.PROTECTION_EXPLOSIONS);
ENCHANTMENTS.put("fallprotection", Enchantment.PROTECTION_FALL);
ENCHANTMENTS.put("fallprot", Enchantment.PROTECTION_FALL);
ENCHANTMENTS.put("featherfall", Enchantment.PROTECTION_FALL);
ENCHANTMENTS.put("featherfalling", Enchantment.PROTECTION_FALL);
ENCHANTMENTS.put("fireprotection", Enchantment.PROTECTION_FIRE);
ENCHANTMENTS.put("flameprotection", Enchantment.PROTECTION_FIRE);
ENCHANTMENTS.put("fireprotect", Enchantment.PROTECTION_FIRE);
ENCHANTMENTS.put("flameprotect", Enchantment.PROTECTION_FIRE);
ENCHANTMENTS.put("fireprot", Enchantment.PROTECTION_FIRE);
ENCHANTMENTS.put("flameprot", Enchantment.PROTECTION_FIRE);
ENCHANTMENTS.put("projectileprotection", Enchantment.PROTECTION_PROJECTILE);
ENCHANTMENTS.put("projprot", Enchantment.PROTECTION_PROJECTILE);
ENCHANTMENTS.put("silktouch", Enchantment.SILK_TOUCH);
ENCHANTMENTS.put("softtouch", Enchantment.SILK_TOUCH);
ENCHANTMENTS.put("waterworker", Enchantment.WATER_WORKER);
ENCHANTMENTS.put("aquaaffinity", Enchantment.WATER_WORKER);
ENCHANTMENTS.put("firearrow", Enchantment.ARROW_FIRE);
ENCHANTMENTS.put("flame", Enchantment.ARROW_FIRE);
ENCHANTMENTS.put("flamearrow", Enchantment.ARROW_FIRE);
ENCHANTMENTS.put("arrowdamage", Enchantment.ARROW_DAMAGE);
ENCHANTMENTS.put("power", Enchantment.ARROW_DAMAGE);
ENCHANTMENTS.put("arrowpower", Enchantment.ARROW_DAMAGE);
ENCHANTMENTS.put("arrowknockback", Enchantment.ARROW_KNOCKBACK);
ENCHANTMENTS.put("arrowkb", Enchantment.ARROW_KNOCKBACK);
ENCHANTMENTS.put("punch", Enchantment.ARROW_KNOCKBACK);
ENCHANTMENTS.put("arrowpunch", Enchantment.ARROW_KNOCKBACK);
ENCHANTMENTS.put("infinitearrows", Enchantment.ARROW_INFINITE);
ENCHANTMENTS.put("infarrows", Enchantment.ARROW_INFINITE);
ENCHANTMENTS.put("infinity", Enchantment.ARROW_INFINITE);
ENCHANTMENTS.put("infinite", Enchantment.ARROW_INFINITE);
ENCHANTMENTS.put("unlimited", Enchantment.ARROW_INFINITE);
ENCHANTMENTS.put("unlimitedarrows", Enchantment.ARROW_INFINITE);
}
public static Enchantment getByName(String name) {
Enchantment enchantment;
if (NUMPATTERN.matcher(name).matches()) {
enchantment = Enchantment.getById(Integer.parseInt(name));
} else {
enchantment = Enchantment.getByName(name.toUpperCase(Locale.ENGLISH));
}
if (enchantment == null)
{
enchantment = ENCHANTMENTS.get(name.toLowerCase(Locale.ENGLISH));
}
return enchantment;
}
public static Set<Entry<String, Enchantment>> entrySet()
{
return ENCHANTMENTS.entrySet();
}
}
@@ -1,690 +0,0 @@
/*
* Essentials - a bukkit plugin
* Copyright (C) 2011 Essentials Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.api.Economy;
import com.earth2me.essentials.api.IJails;
import com.earth2me.essentials.commands.EssentialsCommand;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.commands.NoChargeException;
import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import com.earth2me.essentials.metrics.Metrics;
import com.earth2me.essentials.metrics.MetricsListener;
import com.earth2me.essentials.metrics.MetricsStarter;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import com.earth2me.essentials.signs.SignBlockListener;
import com.earth2me.essentials.signs.SignEntityListener;
import com.earth2me.essentials.signs.SignPlayerListener;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.world.WorldLoadEvent;
import org.bukkit.event.world.WorldUnloadEvent;
import org.bukkit.plugin.InvalidDescriptionException;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitScheduler;
import org.yaml.snakeyaml.error.YAMLException;
public class Essentials extends JavaPlugin implements IEssentials
{
public static final int BUKKIT_VERSION = 2317;
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private transient ISettings settings;
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
private transient Jails jails;
private transient Warps warps;
private transient Worth worth;
private transient List<IConf> confList;
private transient Backup backup;
private transient ItemDb itemDb;
private transient final Methods paymentMethod = new Methods();
private transient PermissionsHandler permissionsHandler;
private transient AlternativeCommandsHandler alternativeCommandsHandler;
private transient UserMap userMap;
private transient ExecuteTimer execTimer;
private transient I18n i18n;
private transient Metrics metrics;
private transient EssentialsTimer timer;
private transient List<String> vanishedPlayers = new ArrayList<String>();
@Override
public ISettings getSettings()
{
return settings;
}
public void setupForTesting(final Server server) throws IOException, InvalidDescriptionException
{
final File dataFolder = File.createTempFile("essentialstest", "");
if (!dataFolder.delete())
{
throw new IOException();
}
if (!dataFolder.mkdir())
{
throw new IOException();
}
i18n = new I18n(this);
i18n.onEnable();
LOGGER.log(Level.INFO, _("usingTempFolderForTesting"));
LOGGER.log(Level.INFO, dataFolder.toString());
this.initialize(null, server, new PluginDescriptionFile(new FileReader(new File("src" + File.separator + "plugin.yml"))), dataFolder, null, null);
settings = new Settings(this);
i18n.updateLocale("en");
userMap = new UserMap(this);
permissionsHandler = new PermissionsHandler(this, false);
Economy.setEss(this);
}
@Override
public void onEnable()
{
execTimer = new ExecuteTimer();
execTimer.start();
i18n = new I18n(this);
i18n.onEnable();
execTimer.mark("I18n1");
final PluginManager pm = getServer().getPluginManager();
for (Plugin plugin : pm.getPlugins())
{
if (plugin.getDescription().getName().startsWith("Essentials")
&& !plugin.getDescription().getVersion().equals(this.getDescription().getVersion())
&& !plugin.getDescription().getName().equals("EssentialsAntiCheat"))
{
LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName()));
}
}
final Matcher versionMatch = Pattern.compile("git-Bukkit-(?:(?:[0-9]+)\\.)+[0-9]+-R[\\.0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion());
if (versionMatch.matches())
{
final int versionNumber = Integer.parseInt(versionMatch.group(1));
if (versionNumber < BUKKIT_VERSION && versionNumber > 100)
{
LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *");
LOGGER.log(Level.SEVERE, _("notRecommendedBukkit"));
LOGGER.log(Level.SEVERE, _("requiredBukkit", Integer.toString(BUKKIT_VERSION)));
LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *");
this.setEnabled(false);
return;
}
}
else
{
LOGGER.log(Level.INFO, _("bukkitFormatChanged"));
LOGGER.log(Level.INFO, getServer().getVersion());
LOGGER.log(Level.INFO, getServer().getBukkitVersion());
}
execTimer.mark("BukkitCheck");
try
{
final EssentialsUpgrade upgrade = new EssentialsUpgrade(this);
upgrade.beforeSettings();
execTimer.mark("Upgrade");
confList = new ArrayList<IConf>();
settings = new Settings(this);
confList.add(settings);
execTimer.mark("Settings");
upgrade.afterSettings();
execTimer.mark("Upgrade2");
i18n.updateLocale(settings.getLocale());
userMap = new UserMap(this);
confList.add(userMap);
execTimer.mark("Init(Usermap)");
warps = new Warps(getServer(), this.getDataFolder());
confList.add(warps);
execTimer.mark("Init(Spawn/Warp)");
worth = new Worth(this.getDataFolder());
confList.add(worth);
itemDb = new ItemDb(this);
confList.add(itemDb);
execTimer.mark("Init(Worth/ItemDB)");
reload();
}
catch (YAMLException exception)
{
if (pm.getPlugin("EssentialsUpdate") != null)
{
LOGGER.log(Level.SEVERE, _("essentialsHelp2"));
}
else
{
LOGGER.log(Level.SEVERE, _("essentialsHelp1"));
}
LOGGER.log(Level.SEVERE, exception.toString());
pm.registerEvents(new Listener()
{
@EventHandler(priority = EventPriority.LOW)
public void onPlayerJoin(final PlayerJoinEvent event)
{
event.getPlayer().sendMessage("Essentials failed to load, read the log file.");
}
}, this);
for (Player player : getServer().getOnlinePlayers())
{
player.sendMessage("Essentials failed to load, read the log file.");
}
this.setEnabled(false);
return;
}
backup = new Backup(this);
permissionsHandler = new PermissionsHandler(this, settings.useBukkitPermissions());
alternativeCommandsHandler = new AlternativeCommandsHandler(this);
final EssentialsPluginListener serverListener = new EssentialsPluginListener(this);
pm.registerEvents(serverListener, this);
confList.add(serverListener);
final EssentialsPlayerListener playerListener = new EssentialsPlayerListener(this);
pm.registerEvents(playerListener, this);
final EssentialsBlockListener blockListener = new EssentialsBlockListener(this);
pm.registerEvents(blockListener, this);
final SignBlockListener signBlockListener = new SignBlockListener(this);
pm.registerEvents(signBlockListener, this);
final SignPlayerListener signPlayerListener = new SignPlayerListener(this);
pm.registerEvents(signPlayerListener, this);
final SignEntityListener signEntityListener = new SignEntityListener(this);
pm.registerEvents(signEntityListener, this);
final EssentialsEntityListener entityListener = new EssentialsEntityListener(this);
pm.registerEvents(entityListener, this);
final EssentialsWorldListener worldListener = new EssentialsWorldListener(this);
pm.registerEvents(worldListener, this);
//TODO: Check if this should be here, and not above before reload()
jails = new Jails(this);
confList.add(jails);
pm.registerEvents(tntListener, this);
timer = new EssentialsTimer(this);
getScheduler().scheduleSyncRepeatingTask(this, timer, 100, 100);
Economy.setEss(this);
execTimer.mark("RegListeners");
final MetricsStarter metricsStarter = new MetricsStarter(this);
if (metricsStarter.getStart() != null && metricsStarter.getStart() == true)
{
getScheduler().scheduleAsyncDelayedTask(this, metricsStarter, 1);
}
else if (metricsStarter.getStart() != null && metricsStarter.getStart() == false)
{
final MetricsListener metricsListener = new MetricsListener(this, metricsStarter);
pm.registerEvents(metricsListener, this);
}
final String timeroutput = execTimer.end();
if (getSettings().isDebug())
{
LOGGER.log(Level.INFO, "Essentials load " + timeroutput);
}
}
@Override
public void onDisable()
{
for (Player p : getServer().getOnlinePlayers())
{
User user = getUser(p);
if (user.isVanished())
{
user.toggleVanished();
p.sendMessage(_("unvanishedReload"));
}
}
i18n.onDisable();
Economy.setEss(null);
Trade.closeLog();
}
@Override
public void reload()
{
Trade.closeLog();
for (IConf iConf : confList)
{
iConf.reloadConfig();
execTimer.mark("Reload(" + iConf.getClass().getSimpleName() + ")");
}
i18n.updateLocale(settings.getLocale());
}
@Override
public boolean onCommand(final CommandSender sender, final Command command, final String commandLabel, final String[] args)
{
return onCommandEssentials(sender, command, commandLabel, args, Essentials.class.getClassLoader(), "com.earth2me.essentials.commands.Command", "essentials.", null);
}
@Override
public boolean onCommandEssentials(final CommandSender sender, final Command command, final String commandLabel, final String[] args, final ClassLoader classLoader, final String commandPath, final String permissionPrefix, final IEssentialsModule module)
{
// Allow plugins to override the command via onCommand
if (!getSettings().isCommandOverridden(command.getName()) && (!commandLabel.startsWith("e") || commandLabel.equalsIgnoreCase(command.getName())))
{
final PluginCommand pc = alternativeCommandsHandler.getAlternative(commandLabel);
if (pc != null)
{
alternativeCommandsHandler.executed(commandLabel, pc.getLabel());
try
{
return pc.execute(sender, commandLabel, args);
}
catch (final Exception ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
sender.sendMessage(ChatColor.RED + "An internal error occurred while attempting to perform this command");
return true;
}
}
}
try
{
User user = null;
if (sender instanceof Player)
{
user = getUser(sender);
LOGGER.log(Level.INFO, String.format("[PLAYER_COMMAND] %s: /%s %s ", ((Player)sender).getName(), commandLabel, EssentialsCommand.getFinalArg(args, 0)));
}
// New mail notification
if (user != null && !getSettings().isCommandDisabled("mail") && !commandLabel.equals("mail") && user.isAuthorized("essentials.mail"))
{
final List<String> mail = user.getMails();
if (mail != null && !mail.isEmpty())
{
user.sendMessage(_("youHaveNewMail", mail.size()));
}
}
// Check for disabled commands
if (getSettings().isCommandDisabled(commandLabel))
{
return true;
}
IEssentialsCommand cmd;
try
{
cmd = (IEssentialsCommand)classLoader.loadClass(commandPath + command.getName()).newInstance();
cmd.setEssentials(this);
cmd.setEssentialsModule(module);
}
catch (Exception ex)
{
sender.sendMessage(_("commandNotLoaded", commandLabel));
LOGGER.log(Level.SEVERE, _("commandNotLoaded", commandLabel), ex);
return true;
}
// Check authorization
if (user != null && !user.isAuthorized(cmd, permissionPrefix))
{
LOGGER.log(Level.WARNING, _("deniedAccessCommand", user.getName()));
user.sendMessage(_("noAccessCommand"));
return true;
}
// Run the command
try
{
if (user == null)
{
cmd.run(getServer(), sender, commandLabel, command, args);
}
else
{
cmd.run(getServer(), user, commandLabel, command, args);
}
return true;
}
catch (NoChargeException ex)
{
return true;
}
catch (NotEnoughArgumentsException ex)
{
sender.sendMessage(command.getDescription());
sender.sendMessage(command.getUsage().replaceAll("<command>", commandLabel));
if (!ex.getMessage().isEmpty())
{
sender.sendMessage(ex.getMessage());
}
return true;
}
catch (Throwable ex)
{
showError(sender, ex, commandLabel);
return true;
}
}
catch (Throwable ex)
{
LOGGER.log(Level.SEVERE, _("commandFailed", commandLabel), ex);
return true;
}
}
@Override
public void showError(final CommandSender sender, final Throwable exception, final String commandLabel)
{
sender.sendMessage(_("errorWithMessage", exception.getMessage()));
if (getSettings().isDebug())
{
LOGGER.log(Level.WARNING, _("errorCallingCommand", commandLabel), exception);
}
}
@Override
public BukkitScheduler getScheduler()
{
return this.getServer().getScheduler();
}
@Override
public IJails getJails()
{
return jails;
}
@Override
public Warps getWarps()
{
return warps;
}
@Override
public Worth getWorth()
{
return worth;
}
@Override
public Backup getBackup()
{
return backup;
}
public Metrics getMetrics()
{
return metrics;
}
public void setMetrics(Metrics metrics)
{
this.metrics = metrics;
}
@Override
public User getUser(final Object base)
{
if (base instanceof Player)
{
return getUser((Player)base);
}
if (base instanceof String)
{
final User user = userMap.getUser((String)base);
if (user != null && user.getBase() instanceof OfflinePlayer)
{
((OfflinePlayer)user.getBase()).setName((String)base);
}
return user;
}
return null;
}
private <T extends Player> User getUser(final T base)
{
if (base == null)
{
return null;
}
if (base instanceof User)
{
return (User)base;
}
if (userMap == null) {
LOGGER.log(Level.WARNING, "Essentials userMap not initialized");
return null;
}
User user = userMap.getUser(base.getName());
if (user == null)
{
user = new User(base, this);
}
else
{
user.update(base);
}
return user;
}
@Override
public User getOfflineUser(final String name)
{
final User user = userMap.getUser(name);
if (user != null && user.getBase() instanceof OfflinePlayer)
{
((OfflinePlayer)user.getBase()).setName(name);
}
return user;
}
@Override
public World getWorld(final String name)
{
if (name.matches("[0-9]+"))
{
final int worldId = Integer.parseInt(name);
if (worldId < getServer().getWorlds().size())
{
return getServer().getWorlds().get(worldId);
}
}
return getServer().getWorld(name);
}
@Override
public void addReloadListener(final IConf listener)
{
confList.add(listener);
}
@Override
public Methods getPaymentMethod()
{
return paymentMethod;
}
@Override
public int broadcastMessage(final IUser sender, final String message)
{
if (sender == null)
{
return getServer().broadcastMessage(message);
}
if (sender.isHidden())
{
return 0;
}
final Player[] players = getServer().getOnlinePlayers();
for (Player player : players)
{
final User user = getUser(player);
if (!user.isIgnoredPlayer(sender))
{
player.sendMessage(message);
}
}
return players.length;
}
@Override
public int scheduleAsyncDelayedTask(final Runnable run)
{
return this.getScheduler().scheduleAsyncDelayedTask(this, run);
}
@Override
public int scheduleSyncDelayedTask(final Runnable run)
{
return this.getScheduler().scheduleSyncDelayedTask(this, run);
}
@Override
public int scheduleSyncDelayedTask(final Runnable run, final long delay)
{
return this.getScheduler().scheduleSyncDelayedTask(this, run, delay);
}
@Override
public int scheduleSyncRepeatingTask(final Runnable run, final long delay, final long period)
{
return this.getScheduler().scheduleSyncRepeatingTask(this, run, delay, period);
}
@Override
public TNTExplodeListener getTNTListener()
{
return tntListener;
}
@Override
public PermissionsHandler getPermissionsHandler()
{
return permissionsHandler;
}
@Override
public AlternativeCommandsHandler getAlternativeCommandsHandler()
{
return alternativeCommandsHandler;
}
@Override
public ItemDb getItemDb()
{
return itemDb;
}
@Override
public UserMap getUserMap()
{
return userMap;
}
@Override
public I18n getI18n()
{
return i18n;
}
@Override
public EssentialsTimer getTimer()
{
return timer;
}
@Override
public List<String> getVanishedPlayers()
{
return vanishedPlayers;
}
private static class EssentialsWorldListener implements Listener, Runnable
{
private transient final IEssentials ess;
public EssentialsWorldListener(final IEssentials ess)
{
this.ess = ess;
}
@EventHandler(priority = EventPriority.LOW)
public void onWorldLoad(final WorldLoadEvent event)
{
ess.getJails().onReload();
ess.getWarps().reloadConfig();
for (IConf iConf : ((Essentials)ess).confList)
{
if (iConf instanceof IEssentialsModule)
{
iConf.reloadConfig();
}
}
}
@EventHandler(priority = EventPriority.LOW)
public void onWorldUnload(final WorldUnloadEvent event)
{
ess.getJails().onReload();
ess.getWarps().reloadConfig();
for (IConf iConf : ((Essentials)ess).confList)
{
if (iConf instanceof IEssentialsModule)
{
iConf.reloadConfig();
}
}
}
@Override
public void run()
{
ess.reload();
}
}
}
@@ -1,46 +0,0 @@
package com.earth2me.essentials;
import org.bukkit.GameMode;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.ItemStack;
public class EssentialsBlockListener implements Listener
{
private final transient IEssentials ess;
public EssentialsBlockListener(final IEssentials ess)
{
this.ess = ess;
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBlockPlace(final BlockPlaceEvent event)
{
// Do not rely on getItemInHand();
// http://leaky.bukkit.org/issues/663
final ItemStack is = Util.convertBlockToItem(event.getBlockPlaced());
if (is == null)
{
return;
}
final User user = ess.getUser(event.getPlayer());
final boolean unlimitedForUser = user.hasUnlimited(is);
if (unlimitedForUser && user.getGameMode() == GameMode.SURVIVAL)
{
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
user.getInventory().addItem(is);
user.updateInventory();
}
});
}
}
}
@@ -1,401 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.google.common.io.Files;
import java.io.*;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.channels.ClosedByInterruptException;
import java.nio.channels.FileChannel;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CoderResult;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.World;
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;
public class EssentialsConf extends YamlConfiguration
{
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private transient File configFile;
private transient String templateName = null;
private transient Class<?> resourceClass = EssentialsConf.class;
private static final Charset UTF8 = Charset.forName("UTF-8");
public EssentialsConf(final File configFile)
{
super();
this.configFile = configFile;
}
private final byte[] bytebuffer = new byte[1024];
public synchronized void load()
{
configFile = configFile.getAbsoluteFile();
if (!configFile.getParentFile().exists())
{
if (!configFile.getParentFile().mkdirs())
{
LOGGER.log(Level.SEVERE, _("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 (templateName != null)
{
LOGGER.log(Level.INFO, _("creatingConfigFromTemplate", configFile.toString()));
createFromTemplate();
}
else
{
try
{
LOGGER.log(Level.INFO, _("creatingEmptyConfig", configFile.toString()));
if (!configFile.createNewFile())
{
LOGGER.log(Level.SEVERE, _("failedToCreateConfig", configFile.toString()));
}
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, _("failedToCreateConfig", configFile.toString()), ex);
}
}
}
try
{
final FileInputStream inputStream = new FileInputStream(configFile);
try
{
final ByteBuffer buffer = ByteBuffer.allocate((int)configFile.length());
int length;
while ((length = inputStream.read(bytebuffer)) != -1)
{
buffer.put(bytebuffer, 0, length);
}
buffer.rewind();
final CharBuffer data = CharBuffer.allocate((int)configFile.length());
CharsetDecoder decoder = UTF8.newDecoder();
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());
}
}
private void createFromTemplate()
{
InputStream istr = null;
OutputStream ostr = null;
try
{
istr = resourceClass.getResourceAsStream(templateName);
if (istr == null)
{
LOGGER.log(Level.SEVERE, _("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, _("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, _("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 boolean hasProperty(final String path)
{
return isSet(path);
}
public Location getLocation(final String path, final Server server) throws Exception
{
final String worldName = getString((path == null ? "" : path + ".") + "world");
if (worldName == null || worldName.isEmpty())
{
return null;
}
final World world = server.getWorld(worldName);
if (world == null)
{
throw new Exception(_("invalidWorld"));
}
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 long getLong(final String path, final long def)
{
try
{
final Number num = (Number)get(path);
return num == null ? def : num.longValue();
}
catch (ClassCastException ex)
{
return def;
}
}
@Override
public double getDouble(final String path, final double def)
{
try
{
Number num = (Number)get(path);
return num == null ? def : num.doubleValue();
}
catch (ClassCastException ex)
{
return def;
}
}
public void save()
{
try
{
save(configFile);
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
}
}
@Override
public synchronized void save(final File file) throws IOException
{
if (file == null)
{
throw new IllegalArgumentException("File cannot be null");
}
Files.createParentDirs(file);
final String data = saveToString();
final OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), UTF8);
try
{
writer.write(data);
}
finally
{
writer.close();
}
}
public Object getProperty(String path)
{
return get(path);
}
public void setProperty(String path, Object object)
{
set(path, object);
}
public void removeProperty(String path)
{
set(path, null);
}
}
@@ -1,151 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.*;
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
import org.bukkit.inventory.ItemStack;
public class EssentialsEntityListener implements Listener
{
private final IEssentials ess;
public EssentialsEntityListener(IEssentials ess)
{
this.ess = ess;
}
@EventHandler(priority = EventPriority.LOW)
public void onEntityDamage(final EntityDamageByEntityEvent event)
{
final Entity eAttack = event.getDamager();
final Entity eDefend = event.getEntity();
if (eDefend instanceof Player && eAttack instanceof Player)
{
final User defender = ess.getUser(eDefend);
final User attacker = ess.getUser(eAttack);
if (ess.getSettings().getLoginAttackDelay() > 0 && !attacker.isAuthorized("essentials.pvpdelay.exempt")
&& (System.currentTimeMillis() < (attacker.getLastLogin() + ess.getSettings().getLoginAttackDelay())))
{
event.setCancelled(true);
}
if (attacker.hasInvulnerabilityAfterTeleport() || defender.hasInvulnerabilityAfterTeleport())
{
event.setCancelled(true);
}
attacker.updateActivity(true);
final List<String> commandList = attacker.getPowertool(attacker.getItemInHand());
if (commandList != null && !commandList.isEmpty())
{
for (final String command : commandList)
{
if (command != null && !command.isEmpty())
{
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
attacker.getServer().dispatchCommand(attacker.getBase(), command.replaceAll("\\{player\\}", defender.getName()));
}
});
event.setCancelled(true);
return;
}
}
}
}
else if (eDefend instanceof Ageable && eAttack instanceof Player)
{
final Player player = (Player)eAttack;
final ItemStack hand = player.getItemInHand();
if (hand != null && hand.getType() == Material.MILK_BUCKET)
{
((Ageable)eDefend).setBaby();
hand.setType(Material.BUCKET);
player.setItemInHand(hand);
player.updateInventory();
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityDamage(final EntityDamageEvent event)
{
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
{
final Player player = (Player)event.getEntity();
player.setFireTicks(0);
player.setRemainingAir(player.getMaximumAir());
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityCombust(final EntityCombustEvent event)
{
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerDeathEvent(final PlayerDeathEvent event)
{
final User user = ess.getUser(event.getEntity());
if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back"))
{
user.setLastLocation();
user.sendMessage(_("backAfterDeath"));
}
if (!ess.getSettings().areDeathMessagesEnabled())
{
event.setDeathMessage("");
}
}
@EventHandler(priority = EventPriority.LOW)
public void onPlayerDeathExpEvent(final PlayerDeathEvent event)
{
final User user = ess.getUser(event.getEntity());
if (user.isAuthorized("essentials.keepxp"))
{
event.setKeepLevel(true);
event.setDroppedExp(0);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onFoodLevelChange(final FoodLevelChangeEvent event)
{
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityRegainHealth(final EntityRegainHealthEvent event)
{
if (event.getRegainReason() == RegainReason.SATIATED && event.getEntity() instanceof Player
&& ess.getUser(event.getEntity()).isAfk() && ess.getSettings().getFreezeAfkPlayers())
{
event.setCancelled(true);
}
}
}
@@ -1,462 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.TextInput;
import com.earth2me.essentials.textreader.TextPager;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerLoginEvent.Result;
import org.bukkit.event.player.*;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
public class EssentialsPlayerListener implements Listener
{
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private final transient IEssentials ess;
private static final int AIR = Material.AIR.getId();
private static final int BED = Material.BED_BLOCK.getId();
public EssentialsPlayerListener(final IEssentials parent)
{
this.ess = parent;
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerRespawn(final PlayerRespawnEvent event)
{
final User user = ess.getUser(event.getPlayer());
updateCompass(user);
user.setDisplayNick();
}
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerChat(final AsyncPlayerChatEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isMuted())
{
event.setCancelled(true);
user.sendMessage(_("playerMuted"));
LOGGER.info(_("mutedUserSpeaks", user.getName()));
}
final Iterator<Player> it = event.getRecipients().iterator();
while (it.hasNext())
{
final User u = ess.getUser(it.next());
if (u.isIgnoredPlayer(user))
{
it.remove();
}
}
user.updateActivity(true);
user.setDisplayNick();
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerMove(final PlayerMoveEvent event)
{
if ((!ess.getSettings().cancelAfkOnMove() && !ess.getSettings().getFreezeAfkPlayers())
|| event.getFrom().getBlockX() == event.getTo().getBlockX()
&& event.getFrom().getBlockZ() == event.getTo().getBlockZ()
&& event.getFrom().getBlockY() == event.getTo().getBlockY())
{
return;
}
final User user = ess.getUser(event.getPlayer());
if (user.isAfk() && ess.getSettings().getFreezeAfkPlayers())
{
final Location from = event.getFrom();
final Location to = event.getTo().clone();
to.setX(from.getX());
to.setY(from.getY());
to.setZ(from.getZ());
try
{
event.setTo(Util.getSafeDestination(to));
}
catch (Exception ex)
{
event.setTo(to);
}
return;
}
final Location afk = user.getAfkPosition();
if (afk == null || !event.getTo().getWorld().equals(afk.getWorld()) || afk.distanceSquared(event.getTo()) > 9)
{
user.updateActivity(true);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerQuit(final PlayerQuitEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (ess.getSettings().removeGodOnDisconnect() && user.isGodModeEnabled())
{
user.setGodModeEnabled(false);
}
if (user.isVanished())
{
user.toggleVanished();
}
user.setLastLocation();
user.updateActivity(false);
user.dispose();
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(final PlayerJoinEvent event)
{
ess.scheduleAsyncDelayedTask(new Runnable()
{
@Override
public void run()
{
delayedJoin(event.getPlayer());
}
});
}
public void delayedJoin(final Player player)
{
if (!player.isOnline())
{
return;
}
ess.getBackup().onPlayerJoin();
final User user = ess.getUser(player);
user.setDisplayNick();
updateCompass(user);
user.setLastLogin(System.currentTimeMillis());
user.updateActivity(false);
for (String p : ess.getVanishedPlayers())
{
if (!user.isAuthorized("essentials.vanish.see"))
{
user.hidePlayer(ess.getUser(p).getBase());
}
}
if (user.isAuthorized("essentials.sleepingignored"))
{
user.setSleepingIgnored(true);
}
if (!ess.getSettings().isCommandDisabled("motd") && user.isAuthorized("essentials.motd"))
{
try
{
final IText input = new TextInput(user, "motd", true, ess);
final IText output = new KeywordReplacer(input, user, ess);
final TextPager pager = new TextPager(output, true);
pager.showPage("1", null, "motd", user);
}
catch (IOException ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.WARNING, ex.getMessage(), ex);
}
else
{
LOGGER.log(Level.WARNING, ex.getMessage());
}
}
}
if (!ess.getSettings().isCommandDisabled("mail") && user.isAuthorized("essentials.mail"))
{
final List<String> mail = user.getMails();
if (mail.isEmpty())
{
user.sendMessage(_("noNewMail"));
}
else
{
user.sendMessage(_("youHaveNewMail", mail.size()));
}
}
}
private void updateCompass(final User user)
{
Location loc = user.getHome(user.getLocation());
if (loc == null)
{
loc = user.getBedSpawnLocation();
}
if (loc != null)
{
final Location updateLoc = loc;
ess.scheduleSyncDelayedTask(new Runnable()
{
@Override
public void run()
{
user.setCompassTarget(updateLoc);
}
});
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerLogin(final PlayerLoginEvent event)
{
switch (event.getResult())
{
case ALLOWED:
case KICK_FULL:
case KICK_BANNED:
break;
default:
return;
}
final User user = ess.getUser(event.getPlayer());
if (user.isNPC())
{
user.setNPC(false);
}
final long currentTime = System.currentTimeMillis();
final boolean banExpired = user.checkBanTimeout(currentTime);
user.checkMuteTimeout(currentTime);
user.checkJailTimeout(currentTime);
if (!banExpired && (user.isBanned() || event.getResult() == Result.KICK_BANNED))
{
final String banReason = user.getBanReason();
event.disallow(Result.KICK_BANNED, banReason != null && !banReason.isEmpty() && !banReason.equalsIgnoreCase("ban") ? banReason : _("defaultBanReason"));
return;
}
if (event.getResult() == Result.KICK_FULL && !user.isAuthorized("essentials.joinfullserver"))
{
event.disallow(Result.KICK_FULL, _("serverFull"));
return;
}
event.allow();
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerTeleport(final PlayerTeleportEvent event)
{
final boolean backListener = ess.getSettings().registerBackInListener();
final boolean teleportInvulnerability = ess.getSettings().isTeleportInvulnerability();
if (backListener || teleportInvulnerability)
{
final User user = ess.getUser(event.getPlayer());
//There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports.
if (backListener && (event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND))
{
user.setLastLocation();
}
if (teleportInvulnerability)
{
user.enableInvulnerabilityAfterTeleport();
}
}
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerEggThrow(final PlayerEggThrowEvent event)
{
final User user = ess.getUser(event.getPlayer());
final ItemStack stack = new ItemStack(Material.EGG, 1);
if (user.hasUnlimited(stack))
{
user.getInventory().addItem(stack);
user.updateInventory();
}
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerBucketEmpty(final PlayerBucketEmptyEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.hasUnlimited(new ItemStack(event.getBucket())))
{
event.getItemStack().setType(event.getBucket());
ess.scheduleSyncDelayedTask(new Runnable()
{
@Override
public void run()
{
user.updateInventory();
}
});
}
}
private final static List<String> COMMANDS = Arrays.asList("msg", "r", "mail", "m", "t", "whisper", "emsg", "tell", "er", "reply", "ereply", "email", "action", "describe", "eme", "eaction", "edescribe", "etell", "ewhisper", "pm");
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event)
{
final Player player = event.getPlayer();
final String cmd = event.getMessage().toLowerCase(Locale.ENGLISH).split(" ")[0].replace("/", "").toLowerCase(Locale.ENGLISH);
if (COMMANDS.contains(cmd))
{
for (Player onlinePlayer : ess.getServer().getOnlinePlayers())
{
final User spyer = ess.getUser(onlinePlayer);
if (spyer.isSocialSpyEnabled() && !player.equals(onlinePlayer))
{
onlinePlayer.sendMessage(player.getDisplayName() + " : " + event.getMessage());
}
}
}
else if (!cmd.equalsIgnoreCase("afk"))
{
final User user = ess.getUser(player);
user.updateActivity(true);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerChangedWorld(final PlayerChangedWorldEvent event)
{
final User user = ess.getUser(event.getPlayer());
final String newWorld = event.getPlayer().getLocation().getWorld().getName();
user.setDisplayNick();
updateCompass(user);
if (ess.getSettings().getNoGodWorlds().contains(newWorld) && user.isGodModeEnabledRaw())
{
user.sendMessage(_("noGodWorldWarning"));
}
if (!event.getPlayer().getWorld().getName().equals(newWorld))
{
user.sendMessage(_("currentWorld", newWorld));
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerInteract(final PlayerInteractEvent event)
{
switch (event.getAction())
{
case RIGHT_CLICK_BLOCK:
if (!event.isCancelled() && event.getClickedBlock().getTypeId() == BED && ess.getSettings().getUpdateBedAtDaytime())
{
Player player = event.getPlayer();
player.setBedSpawnLocation(event.getClickedBlock().getLocation());
player.sendMessage(_("homeSet", player.getLocation().getWorld().getName(), player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()));
}
break;
case LEFT_CLICK_AIR:
case LEFT_CLICK_BLOCK:
if (event.getItem() != null && event.getItem().getTypeId() != AIR)
{
final User user = ess.getUser(event.getPlayer());
if (user.hasPowerTools() && user.arePowerToolsEnabled() && usePowertools(user, event.getItem().getTypeId()))
{
event.setCancelled(true);
}
}
break;
default:
break;
}
}
private boolean usePowertools(final User user, final int id)
{
final List<String> commandList = user.getPowertool(id);
if (commandList == null || commandList.isEmpty())
{
return false;
}
boolean used = false;
// We need to loop through each command and execute
for (final String command : commandList)
{
if (command.contains("{player}"))
{
continue;
}
else if (command.startsWith("c:"))
{
used = true;
user.chat(command.substring(2));
}
else
{
used = true;
ess.scheduleSyncDelayedTask(
new Runnable()
{
@Override
public void run()
{
user.getServer().dispatchCommand(user.getBase(), command);
}
});
}
}
return used;
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPlayerPickupItem(final PlayerPickupItemEvent event)
{
if (ess.getSettings().getDisableItemPickupWhileAfk())
{
if (ess.getUser(event.getPlayer()).isAfk())
{
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void onInventoryClickEvent(final InventoryClickEvent event)
{
if (event.getView().getTopInventory().getType() == InventoryType.PLAYER)
{
final User user = ess.getUser(event.getWhoClicked());
final InventoryHolder invHolder = event.getView().getTopInventory().getHolder();
if (invHolder != null && invHolder instanceof HumanEntity)
{
final User invOwner = ess.getUser((HumanEntity)invHolder);
if (user.isInvSee() && (!user.isAuthorized("essentials.invsee.modify")
|| invOwner.isAuthorized("essentials.invsee.preventmodify")
|| !invOwner.isOnline()))
{
event.setCancelled(true);
}
}
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onInventoryCloseEvent(final InventoryCloseEvent event)
{
if (event.getView().getTopInventory().getType() == InventoryType.PLAYER)
{
final User user = ess.getUser(event.getPlayer());
user.setInvSee(false);
}
}
}
@@ -1,50 +0,0 @@
package com.earth2me.essentials;
import java.util.logging.Level;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent;
public class EssentialsPluginListener implements Listener, IConf
{
private final transient IEssentials ess;
public EssentialsPluginListener(final IEssentials ess)
{
this.ess = ess;
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginEnable(final PluginEnableEvent event)
{
ess.getPermissionsHandler().checkPermissions();
ess.getAlternativeCommandsHandler().addPlugin(event.getPlugin());
if (!ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().setMethod(ess.getServer().getPluginManager()))
{
ess.getLogger().log(Level.INFO, "Payment method found (" + ess.getPaymentMethod().getMethod().getLongName() + " version: " + ess.getPaymentMethod().getMethod().getVersion() + ")");
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginDisable(final PluginDisableEvent event)
{
ess.getPermissionsHandler().checkPermissions();
ess.getAlternativeCommandsHandler().removePlugin(event.getPlugin());
// Check to see if the plugin thats being disabled is the one we are using
if (ess.getPaymentMethod() != null && ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().checkDisabled(event.getPlugin()))
{
ess.getPaymentMethod().reset();
ess.getLogger().log(Level.INFO, "Payment method was disabled. No longer accepting payments.");
}
}
@Override
public void reloadConfig()
{
ess.getPermissionsHandler().setUseSuperperms(ess.getSettings().useBukkitPermissions());
ess.getPermissionsHandler().checkPermissions();
}
}
@@ -1,85 +0,0 @@
package com.earth2me.essentials;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Set;
import java.util.logging.Level;
import org.bukkit.entity.Player;
public class EssentialsTimer implements Runnable
{
private final transient IEssentials ess;
private final transient Set<User> onlineUsers = new HashSet<User>();
private transient long lastPoll = System.currentTimeMillis();
private final transient LinkedList<Float> history = new LinkedList<Float>();
EssentialsTimer(final IEssentials ess)
{
this.ess = ess;
}
@Override
public void run()
{
final long currentTime = System.currentTimeMillis();
long timeSpent = (currentTime - lastPoll) / 1000;
if (timeSpent == 0)
{
timeSpent = 1;
}
if (history.size() > 10)
{
history.remove();
}
float tps = 100f / timeSpent;
if (tps <= 20)
{
history.add(tps);
}
lastPoll = currentTime;
for (Player player : ess.getServer().getOnlinePlayers())
{
try
{
final User user = ess.getUser(player);
onlineUsers.add(user);
user.setLastOnlineActivity(currentTime);
user.checkActivity();
}
catch (Exception e)
{
ess.getLogger().log(Level.WARNING, "EssentialsTimer Error:", e);
}
}
final Iterator<User> iterator = onlineUsers.iterator();
while (iterator.hasNext())
{
final User user = iterator.next();
if (user.getLastOnlineActivity() < currentTime && user.getLastOnlineActivity() > user.getLastLogout())
{
user.setLastLogout(user.getLastOnlineActivity());
iterator.remove();
continue;
}
user.checkMuteTimeout(currentTime);
user.checkJailTimeout(currentTime);
user.resetInvulnerabilityAfterTeleport();
}
}
public float getAverageTPS()
{
float avg = 0;
for (Float f : history)
{
if (f != null)
{
avg += f;
}
}
return avg / history.size();
}
}
@@ -1,816 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.craftbukkit.FakeWorld;
import com.earth2me.essentials.settings.Spawns;
import com.earth2me.essentials.storage.YamlStorageWriter;
import static com.earth2me.essentials.I18n._;
import java.io.*;
import java.math.BigInteger;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.inventory.ItemStack;
public class EssentialsUpgrade
{
private final static Logger LOGGER = Logger.getLogger("Minecraft");
private final transient IEssentials ess;
private final transient EssentialsConf doneFile;
EssentialsUpgrade(final IEssentials essentials)
{
ess = essentials;
if (!ess.getDataFolder().exists())
{
ess.getDataFolder().mkdirs();
}
doneFile = new EssentialsConf(new File(ess.getDataFolder(), "upgrades-done.yml"));
doneFile.load();
}
private void moveWorthValuesToWorthYml()
{
if (doneFile.getBoolean("moveWorthValuesToWorthYml", false))
{
return;
}
try
{
final File configFile = new File(ess.getDataFolder(), "config.yml");
if (!configFile.exists())
{
return;
}
final EssentialsConf conf = new EssentialsConf(configFile);
conf.load();
final Worth worth = new Worth(ess.getDataFolder());
boolean found = false;
for (Material mat : Material.values())
{
final int id = mat.getId();
final double value = conf.getDouble("worth-" + id, Double.NaN);
if (!Double.isNaN(value))
{
found = true;
worth.setPrice(new ItemStack(mat, 1, (short)0, (byte)0), value);
}
}
if (found)
{
removeLinesFromConfig(configFile, "\\s*#?\\s*worth-[0-9]+.*", "# Worth values have been moved to worth.yml");
}
doneFile.setProperty("moveWorthValuesToWorthYml", true);
doneFile.save();
}
catch (Throwable e)
{
LOGGER.log(Level.SEVERE, _("upgradingFilesError"), e);
}
}
private void moveMotdRulesToFile(String name)
{
if (doneFile.getBoolean("move" + name + "ToFile", false))
{
return;
}
try
{
final File file = new File(ess.getDataFolder(), name + ".txt");
if (file.exists())
{
return;
}
final File configFile = new File(ess.getDataFolder(), "config.yml");
if (!configFile.exists())
{
return;
}
final EssentialsConf conf = new EssentialsConf(configFile);
conf.load();
List<String> lines = conf.getStringList(name);
if (lines != null && !lines.isEmpty())
{
if (!file.createNewFile())
{
throw new IOException("Failed to create file " + file);
}
PrintWriter writer = new PrintWriter(file);
for (String line : lines)
{
writer.println(line);
}
writer.close();
}
doneFile.setProperty("move" + name + "ToFile", true);
doneFile.save();
}
catch (Throwable e)
{
LOGGER.log(Level.SEVERE, _("upgradingFilesError"), e);
}
}
private void removeLinesFromConfig(File file, String regex, String info) throws Exception
{
boolean needUpdate = false;
final BufferedReader bReader = new BufferedReader(new FileReader(file));
final File tempFile = File.createTempFile("essentialsupgrade", ".tmp.yml", ess.getDataFolder());
final BufferedWriter bWriter = new BufferedWriter(new FileWriter(tempFile));
do
{
final String line = bReader.readLine();
if (line == null)
{
break;
}
if (line.matches(regex))
{
if (!needUpdate && info != null)
{
bWriter.write(info, 0, info.length());
bWriter.newLine();
}
needUpdate = true;
}
else
{
if (line.endsWith("\r\n"))
{
bWriter.write(line, 0, line.length() - 2);
}
else if (line.endsWith("\r") || line.endsWith("\n"))
{
bWriter.write(line, 0, line.length() - 1);
}
else
{
bWriter.write(line, 0, line.length());
}
bWriter.newLine();
}
}
while (true);
bReader.close();
bWriter.close();
if (needUpdate)
{
if (!file.renameTo(new File(file.getParentFile(), file.getName().concat("." + System.currentTimeMillis() + ".upgradebackup"))))
{
throw new Exception(_("configFileMoveError"));
}
if (!tempFile.renameTo(file))
{
throw new Exception(_("configFileRenameError"));
}
}
else
{
tempFile.delete();
}
}
private void updateUsersToNewDefaultHome()
{
if (doneFile.getBoolean("updateUsersToNewDefaultHome", false))
{
return;
}
final File userdataFolder = new File(ess.getDataFolder(), "userdata");
if (!userdataFolder.exists() || !userdataFolder.isDirectory())
{
return;
}
final File[] userFiles = userdataFolder.listFiles();
for (File file : userFiles)
{
if (!file.isFile() || !file.getName().endsWith(".yml"))
{
continue;
}
final EssentialsConf config = new EssentialsConf(file);
try
{
config.load();
if (config.hasProperty("home") && !config.hasProperty("home.default"))
{
@SuppressWarnings("unchecked")
final List<Object> vals = (List<Object>)config.getProperty("home");
if (vals == null)
{
continue;
}
World world = ess.getServer().getWorlds().get(0);
if (vals.size() > 5)
{
world = ess.getServer().getWorld((String)vals.get(5));
}
if (world != null)
{
final Location loc = new Location(
world,
((Number)vals.get(0)).doubleValue(),
((Number)vals.get(1)).doubleValue(),
((Number)vals.get(2)).doubleValue(),
((Number)vals.get(3)).floatValue(),
((Number)vals.get(4)).floatValue());
final String worldName = world.getName().toLowerCase(Locale.ENGLISH);
if (worldName != null && !worldName.isEmpty())
{
config.removeProperty("home");
config.setProperty("home.default", worldName);
config.setProperty("home.worlds." + worldName, loc);
config.save();
}
}
}
}
catch (RuntimeException ex)
{
LOGGER.log(Level.INFO, "File: " + file.toString());
throw ex;
}
}
doneFile.setProperty("updateUsersToNewDefaultHome", true);
doneFile.save();
}
private void updateUsersPowerToolsFormat()
{
if (doneFile.getBoolean("updateUsersPowerToolsFormat", false))
{
return;
}
final File userdataFolder = new File(ess.getDataFolder(), "userdata");
if (!userdataFolder.exists() || !userdataFolder.isDirectory())
{
return;
}
final File[] userFiles = userdataFolder.listFiles();
for (File file : userFiles)
{
if (!file.isFile() || !file.getName().endsWith(".yml"))
{
continue;
}
final EssentialsConf config = new EssentialsConf(file);
try
{
config.load();
if (config.hasProperty("powertools"))
{
@SuppressWarnings("unchecked")
final Map<String, Object> powertools = config.getConfigurationSection("powertools").getValues(false);
if (powertools == null)
{
continue;
}
for (Map.Entry<String, Object> entry : powertools.entrySet())
{
if (entry.getValue() instanceof String)
{
List<String> temp = new ArrayList<String>();
temp.add((String)entry.getValue());
((Map<String, Object>)powertools).put(entry.getKey(), temp);
}
}
config.save();
}
}
catch (RuntimeException ex)
{
LOGGER.log(Level.INFO, "File: " + file.toString());
throw ex;
}
}
doneFile.setProperty("updateUsersPowerToolsFormat", true);
doneFile.save();
}
private void updateUsersHomesFormat()
{
if (doneFile.getBoolean("updateUsersHomesFormat", false))
{
return;
}
final File userdataFolder = new File(ess.getDataFolder(), "userdata");
if (!userdataFolder.exists() || !userdataFolder.isDirectory())
{
return;
}
final File[] userFiles = userdataFolder.listFiles();
for (File file : userFiles)
{
if (!file.isFile() || !file.getName().endsWith(".yml"))
{
continue;
}
final EssentialsConf config = new EssentialsConf(file);
try
{
config.load();
if (config.hasProperty("home") && config.hasProperty("home.default"))
{
@SuppressWarnings("unchecked")
final String defworld = (String)config.getProperty("home.default");
final Location defloc = getFakeLocation(config, "home.worlds." + defworld);
if (defloc != null)
{
config.setProperty("homes.home", defloc);
}
Set<String> worlds = config.getConfigurationSection("home.worlds").getKeys(false);
Location loc;
String worldName;
if (worlds == null)
{
continue;
}
for (String world : worlds)
{
if (defworld.equalsIgnoreCase(world))
{
continue;
}
loc = getFakeLocation(config, "home.worlds." + world);
if (loc == null)
{
continue;
}
worldName = loc.getWorld().getName().toLowerCase(Locale.ENGLISH);
if (worldName != null && !worldName.isEmpty())
{
config.setProperty("homes." + worldName, loc);
}
}
config.removeProperty("home");
config.save();
}
}
catch (RuntimeException ex)
{
LOGGER.log(Level.INFO, "File: " + file.toString());
throw ex;
}
}
doneFile.setProperty("updateUsersHomesFormat", true);
doneFile.save();
}
private void moveUsersDataToUserdataFolder()
{
final File usersFile = new File(ess.getDataFolder(), "users.yml");
if (!usersFile.exists())
{
return;
}
final EssentialsConf usersConfig = new EssentialsConf(usersFile);
usersConfig.load();
for (String username : usersConfig.getKeys(false))
{
final User user = new User(new OfflinePlayer(username, ess), ess);
final String nickname = usersConfig.getString(username + ".nickname");
if (nickname != null && !nickname.isEmpty() && !nickname.equals(username))
{
user.setNickname(nickname);
}
final List<String> mails = usersConfig.getStringList(username + ".mail");
if (mails != null && !mails.isEmpty())
{
user.setMails(mails);
}
if (!user.hasHome())
{
@SuppressWarnings("unchecked")
final List<Object> vals = (List<Object>)usersConfig.getProperty(username + ".home");
if (vals != null)
{
World world = ess.getServer().getWorlds().get(0);
if (vals.size() > 5)
{
world = getFakeWorld((String)vals.get(5));
}
if (world != null)
{
user.setHome("home", new Location(world,
((Number)vals.get(0)).doubleValue(),
((Number)vals.get(1)).doubleValue(),
((Number)vals.get(2)).doubleValue(),
((Number)vals.get(3)).floatValue(),
((Number)vals.get(4)).floatValue()));
}
}
}
}
usersFile.renameTo(new File(usersFile.getAbsolutePath() + ".old"));
}
private void convertWarps()
{
final File warpsFolder = new File(ess.getDataFolder(), "warps");
if (!warpsFolder.exists())
{
warpsFolder.mkdirs();
}
final File[] listOfFiles = warpsFolder.listFiles();
if (listOfFiles.length >= 1)
{
for (int i = 0; i < listOfFiles.length; i++)
{
final String filename = listOfFiles[i].getName();
if (listOfFiles[i].isFile() && filename.endsWith(".dat"))
{
try
{
final BufferedReader rx = new BufferedReader(new FileReader(listOfFiles[i]));
double x, y, z;
float yaw, pitch;
String worldName;
try
{
if (!rx.ready())
{
continue;
}
x = Double.parseDouble(rx.readLine().trim());
if (!rx.ready())
{
continue;
}
y = Double.parseDouble(rx.readLine().trim());
if (!rx.ready())
{
continue;
}
z = Double.parseDouble(rx.readLine().trim());
if (!rx.ready())
{
continue;
}
yaw = Float.parseFloat(rx.readLine().trim());
if (!rx.ready())
{
continue;
}
pitch = Float.parseFloat(rx.readLine().trim());
worldName = rx.readLine();
}
finally
{
rx.close();
}
World w = null;
for (World world : ess.getServer().getWorlds())
{
if (world.getEnvironment() != World.Environment.NETHER)
{
w = world;
break;
}
}
if (worldName != null)
{
worldName = worldName.trim();
World w1 = null;
w1 = getFakeWorld(worldName);
if (w1 != null)
{
w = w1;
}
}
final Location loc = new Location(w, x, y, z, yaw, pitch);
ess.getWarps().setWarp(filename.substring(0, filename.length() - 4), loc);
if (!listOfFiles[i].renameTo(new File(warpsFolder, filename + ".old")))
{
throw new Exception(_("fileRenameError", filename));
}
}
catch (Exception ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
}
}
}
final File warpFile = new File(ess.getDataFolder(), "warps.txt");
if (warpFile.exists())
{
try
{
final BufferedReader rx = new BufferedReader(new FileReader(warpFile));
try
{
for (String[] parts = new String[0]; rx.ready(); parts = rx.readLine().split(":"))
{
if (parts.length < 6)
{
continue;
}
final String name = parts[0];
final double x = Double.parseDouble(parts[1].trim());
final double y = Double.parseDouble(parts[2].trim());
final double z = Double.parseDouble(parts[3].trim());
final float yaw = Float.parseFloat(parts[4].trim());
final float pitch = Float.parseFloat(parts[5].trim());
if (name.isEmpty())
{
continue;
}
World w = null;
for (World world : ess.getServer().getWorlds())
{
if (world.getEnvironment() != World.Environment.NETHER)
{
w = world;
break;
}
}
final Location loc = new Location(w, x, y, z, yaw, pitch);
ess.getWarps().setWarp(name, loc);
if (!warpFile.renameTo(new File(ess.getDataFolder(), "warps.txt.old")))
{
throw new Exception(_("fileRenameError", "warps.txt"));
}
}
}
finally
{
rx.close();
}
}
catch (Exception ex)
{
LOGGER.log(Level.SEVERE, null, ex);
}
}
}
private void sanitizeAllUserFilenames()
{
if (doneFile.getBoolean("sanitizeAllUserFilenames", false))
{
return;
}
final File usersFolder = new File(ess.getDataFolder(), "userdata");
if (!usersFolder.exists())
{
return;
}
final File[] listOfFiles = usersFolder.listFiles();
for (int i = 0; i < listOfFiles.length; i++)
{
final String filename = listOfFiles[i].getName();
if (!listOfFiles[i].isFile() || !filename.endsWith(".yml"))
{
continue;
}
final String sanitizedFilename = Util.sanitizeFileName(filename.substring(0, filename.length() - 4)) + ".yml";
if (sanitizedFilename.equals(filename))
{
continue;
}
final File tmpFile = new File(listOfFiles[i].getParentFile(), sanitizedFilename + ".tmp");
final File newFile = new File(listOfFiles[i].getParentFile(), sanitizedFilename);
if (!listOfFiles[i].renameTo(tmpFile))
{
LOGGER.log(Level.WARNING, _("userdataMoveError", filename, sanitizedFilename));
continue;
}
if (newFile.exists())
{
LOGGER.log(Level.WARNING, _("duplicatedUserdata", filename, sanitizedFilename));
continue;
}
if (!tmpFile.renameTo(newFile))
{
LOGGER.log(Level.WARNING, _("userdataMoveBackError", sanitizedFilename, sanitizedFilename));
}
}
doneFile.setProperty("sanitizeAllUserFilenames", true);
doneFile.save();
}
private World getFakeWorld(final String name)
{
final File bukkitDirectory = ess.getDataFolder().getParentFile().getParentFile();
final File worldDirectory = new File(bukkitDirectory, name);
if (worldDirectory.exists() && worldDirectory.isDirectory())
{
return new FakeWorld(worldDirectory.getName(), World.Environment.NORMAL);
}
return null;
}
public Location getFakeLocation(EssentialsConf config, String path)
{
String worldName = config.getString((path != null ? path + "." : "") + "world");
if (worldName == null || worldName.isEmpty())
{
return null;
}
World world = getFakeWorld(worldName);
if (world == null)
{
return null;
}
return new Location(world,
config.getDouble((path != null ? path + "." : "") + "x", 0),
config.getDouble((path != null ? path + "." : "") + "y", 0),
config.getDouble((path != null ? path + "." : "") + "z", 0),
(float)config.getDouble((path != null ? path + "." : "") + "yaw", 0),
(float)config.getDouble((path != null ? path + "." : "") + "pitch", 0));
}
private void deleteOldItemsCsv()
{
if (doneFile.getBoolean("deleteOldItemsCsv", false))
{
return;
}
final File file = new File(ess.getDataFolder(), "items.csv");
if (file.exists())
{
try
{
final Set<BigInteger> oldconfigs = new HashSet<BigInteger>();
oldconfigs.add(new BigInteger("66ec40b09ac167079f558d1099e39f10", 16)); // sep 1
oldconfigs.add(new BigInteger("34284de1ead43b0bee2aae85e75c041d", 16)); // crlf
oldconfigs.add(new BigInteger("c33bc9b8ee003861611bbc2f48eb6f4f", 16)); // jul 24
oldconfigs.add(new BigInteger("6ff17925430735129fc2a02f830c1daa", 16)); // crlf
MessageDigest digest = ManagedFile.getDigest();
final BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
final DigestInputStream dis = new DigestInputStream(bis, digest);
final byte[] buffer = new byte[1024];
try
{
while (dis.read(buffer) != -1)
{
}
}
finally
{
dis.close();
}
BigInteger hash = new BigInteger(1, digest.digest());
if (oldconfigs.contains(hash) && !file.delete())
{
throw new IOException("Could not delete file " + file.toString());
}
doneFile.setProperty("deleteOldItemsCsv", true);
doneFile.save();
}
catch (IOException ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
}
private void updateSpawnsToNewSpawnsConfig()
{
if (doneFile.getBoolean("updateSpawnsToNewSpawnsConfig", false))
{
return;
}
final File configFile = new File(ess.getDataFolder(), "spawn.yml");
if (configFile.exists())
{
final EssentialsConf config = new EssentialsConf(configFile);
try
{
config.load();
if (!config.hasProperty("spawns"))
{
final Spawns spawns = new Spawns();
Set<String> keys = config.getKeys(false);
for (String group : keys)
{
Location loc = getFakeLocation(config, group);
spawns.getSpawns().put(group.toLowerCase(Locale.ENGLISH), loc);
}
if (!configFile.renameTo(new File(ess.getDataFolder(), "spawn.yml.old")))
{
throw new Exception(_("fileRenameError", "spawn.yml"));
}
PrintWriter writer = new PrintWriter(configFile);
try
{
new YamlStorageWriter(writer).save(spawns);
}
finally
{
writer.close();
}
}
}
catch (Exception ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
doneFile.setProperty("updateSpawnsToNewSpawnsConfig", true);
doneFile.save();
}
private void updateJailsToNewJailsConfig()
{
if (doneFile.getBoolean("updateJailsToNewJailsConfig", false))
{
return;
}
final File configFile = new File(ess.getDataFolder(), "jail.yml");
if (configFile.exists())
{
final EssentialsConf config = new EssentialsConf(configFile);
try
{
config.load();
if (!config.hasProperty("jails"))
{
final com.earth2me.essentials.settings.Jails jails = new com.earth2me.essentials.settings.Jails();
Set<String> keys = config.getKeys(false);
for (String jailName : keys)
{
Location loc = getFakeLocation(config, jailName);
jails.getJails().put(jailName.toLowerCase(Locale.ENGLISH), loc);
}
if (!configFile.renameTo(new File(ess.getDataFolder(), "jail.yml.old")))
{
throw new Exception(_("fileRenameError", "jail.yml"));
}
PrintWriter writer = new PrintWriter(configFile);
try
{
new YamlStorageWriter(writer).save(jails);
}
finally
{
writer.close();
}
}
}
catch (Exception ex)
{
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
doneFile.setProperty("updateJailsToNewJailsConfig", true);
doneFile.save();
}
private void warnMetrics()
{
if (doneFile.getBoolean("warnMetrics", false))
{
return;
}
ess.getSettings().setMetricsEnabled(false);
doneFile.setProperty("warnMetrics", true);
doneFile.save();
}
public void beforeSettings()
{
if (!ess.getDataFolder().exists())
{
ess.getDataFolder().mkdirs();
}
moveWorthValuesToWorthYml();
moveMotdRulesToFile("motd");
moveMotdRulesToFile("rules");
}
public void afterSettings()
{
sanitizeAllUserFilenames();
updateUsersToNewDefaultHome();
moveUsersDataToUserdataFolder();
convertWarps();
updateUsersPowerToolsFormat();
updateUsersHomesFormat();
deleteOldItemsCsv();
updateSpawnsToNewSpawnsConfig();
updateJailsToNewJailsConfig();
warnMetrics();
}
}
@@ -1,89 +0,0 @@
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();
}
static private 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;
}
}
}
@@ -1,176 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.api.II18n;
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;
public class I18n implements 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 final transient Map<String, MessageFormat> messageFormatCache = new HashMap<String, MessageFormat>();
private final transient IEssentials ess;
public I18n(final IEssentials ess)
{
this.ess = ess;
customBundle = ResourceBundle.getBundle(MESSAGES, defaultLocale, new FileResClassLoader(I18n.class.getClassLoader(), ess));
localeBundle = ResourceBundle.getBundle(MESSAGES, defaultLocale);
defaultBundle = ResourceBundle.getBundle(MESSAGES, Locale.ENGLISH);
}
public void onEnable()
{
instance = this;
}
public void onDisable()
{
instance = null;
}
public Locale getCurrentLocale()
{
return currentLocale;
}
public String translate(final String string)
{
try
{
try
{
return customBundle.getString(string);
}
catch (MissingResourceException ex)
{
return localeBundle.getString(string);
}
}
catch (MissingResourceException ex)
{
Logger.getLogger("Minecraft").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 _(final String string, final Object... objects)
{
if (instance == null) {
return "";
}
if (objects.length == 0)
{
return instance.translate(string);
}
else
{
return instance.format(string, objects);
}
}
public String format(final String string, final Object... objects)
{
final String format = translate(string);
MessageFormat messageFormat = messageFormatCache.get(format);
if (messageFormat == null)
{
messageFormat = new MessageFormat(format);
messageFormatCache.put(format, messageFormat);
}
return messageFormat.format(objects);
}
public void updateLocale(final String loc)
{
if (loc == null || loc.isEmpty())
{
return;
}
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();
Logger.getLogger("Minecraft").log(Level.INFO, String.format("Using locale %s", currentLocale.toString()));
customBundle = ResourceBundle.getBundle(MESSAGES, currentLocale, new FileResClassLoader(I18n.class.getClassLoader(), ess));
localeBundle = ResourceBundle.getBundle(MESSAGES, currentLocale);
}
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;
public 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 super.getResource(string);
}
@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 super.getResourceAsStream(string);
}
}
}
@@ -1,9 +0,0 @@
package com.earth2me.essentials;
/**
* @deprecated New interface will be IReload in api package
*/
@Deprecated
public interface IConf {
public void reloadConfig();
}
@@ -1,78 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.api.IJails;
import com.earth2me.essentials.metrics.Metrics;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import java.util.List;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitScheduler;
/**
* @deprecated This will be moved to the api package soon
*/
@Deprecated
public interface IEssentials extends Plugin
{
void addReloadListener(IConf listener);
void reload();
boolean onCommandEssentials(CommandSender sender, Command command, String commandLabel, String[] args, ClassLoader classLoader, String commandPath, String permissionPrefix, IEssentialsModule module);
User getUser(Object base);
I18n getI18n();
User getOfflineUser(String name);
World getWorld(String name);
int broadcastMessage(IUser sender, String message);
ISettings getSettings();
BukkitScheduler getScheduler();
IJails getJails();
Warps getWarps();
Worth getWorth();
Backup getBackup();
Methods getPaymentMethod();
int scheduleAsyncDelayedTask(Runnable run);
int scheduleSyncDelayedTask(Runnable run);
int scheduleSyncDelayedTask(Runnable run, long delay);
int scheduleSyncRepeatingTask(final Runnable run, long delay, long period);
TNTExplodeListener getTNTListener();
PermissionsHandler getPermissionsHandler();
AlternativeCommandsHandler getAlternativeCommandsHandler();
void showError(final CommandSender sender, final Throwable exception, final String commandLabel);
ItemDb getItemDb();
UserMap getUserMap();
Metrics getMetrics();
void setMetrics(Metrics metrics);
EssentialsTimer getTimer();
List<String> getVanishedPlayers();
}
@@ -1,6 +0,0 @@
package com.earth2me.essentials;
public interface IEssentialsModule
{
}
@@ -1,9 +0,0 @@
package com.earth2me.essentials;
import org.bukkit.command.CommandSender;
public interface IReplyTo {
public void setReplyTo(CommandSender user);
public CommandSender getReplyTo();
}
@@ -1,184 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.signs.EssentialsSign;
import com.earth2me.essentials.textreader.IText;
import java.text.MessageFormat;
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();
MessageFormat getChatFormat(String group);
int getChatRadius();
double getCommandCost(IEssentialsCommand cmd);
double getCommandCost(String label);
String getCurrencySymbol();
int getOversizedStackSize();
int getDefaultStackSize();
double getHealCooldown();
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);
boolean getSortListByGroups();
int getSpawnMobLimit();
int getStartingBalance();
double getTeleportCooldown();
double getTeleportDelay();
boolean hidePermissionlessHelp();
boolean isCommandDisabled(final IEssentialsCommand cmd);
boolean isCommandDisabled(String label);
boolean isCommandOverridden(String name);
boolean isCommandRestricted(IEssentialsCommand cmd);
boolean isCommandRestricted(String label);
boolean isDebug();
boolean isEcoDisabled();
boolean isTradeInStacks(int id);
List<Integer> itemSpawnBlacklist();
List<EssentialsSign> enabledSigns();
boolean permissionBasedItemSpawn();
boolean showNonEssCommandsInHelp();
boolean spawnIfNoHome();
boolean warnOnBuildDisallow();
boolean warnOnSmite();
double getMaxMoney();
double 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 areDeathMessagesEnabled();
public void setDebug(boolean debug);
Set<String> getNoGodWorlds();
boolean getUpdateBedAtDaytime();
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();
}
@@ -1,49 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.commands.IEssentialsCommand;
import org.bukkit.Location;
import org.bukkit.entity.Player;
/**
* @deprecated This will be moved to the api package soon
*/
@Deprecated
public interface IUser extends Player
{
long getLastTeleportTimestamp();
boolean isAuthorized(String node);
boolean isAuthorized(IEssentialsCommand cmd);
boolean isAuthorized(IEssentialsCommand cmd, String permissionPrefix);
void setLastTeleportTimestamp(long time);
Location getLastLocation();
Player getBase();
double getMoney();
void takeMoney(double value);
void giveMoney(double value);
boolean canAfford(double value);
String getGroup();
void setLastLocation();
Location getHome(String name) throws Exception;
Location getHome(Location loc) throws Exception;
boolean isHidden();
Teleport getTeleport();
void setJail(String jail);
}
@@ -1,122 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.api.IItemDb;
import static com.earth2me.essentials.I18n._;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
public class ItemDb implements IConf, IItemDb
{
private final transient IEssentials ess;
public ItemDb(final IEssentials ess)
{
this.ess = ess;
file = new ManagedFile("items.csv", ess);
}
private final transient Map<String, Integer> items = new HashMap<String, Integer>();
private final transient Map<String, Short> durabilities = new HashMap<String, Short>();
private final transient ManagedFile file;
@Override
public void reloadConfig()
{
final List<String> lines = file.getLines();
if (lines.isEmpty())
{
return;
}
durabilities.clear();
items.clear();
for (String line : lines)
{
line = line.trim().toLowerCase(Locale.ENGLISH);
if (line.length() > 0 && line.charAt(0) == '#')
{
continue;
}
final String[] parts = line.split("[^a-z0-9]");
if (parts.length < 2)
{
continue;
}
final int numeric = Integer.parseInt(parts[1]);
durabilities.put(parts[0].toLowerCase(Locale.ENGLISH), parts.length > 2 && !parts[2].equals("0") ? Short.parseShort(parts[2]) : 0);
items.put(parts[0].toLowerCase(Locale.ENGLISH), numeric);
}
}
public ItemStack get(final String id, final int quantity) throws Exception
{
final ItemStack retval = get(id.toLowerCase(Locale.ENGLISH));
retval.setAmount(quantity);
return retval;
}
public ItemStack get(final String id) throws Exception
{
int itemid = 0;
String itemname = null;
short metaData = 0;
if (id.matches("^\\d+[:+',;.]\\d+$"))
{
itemid = Integer.parseInt(id.split("[:+',;.]")[0]);
metaData = Short.parseShort(id.split("[:+',;.]")[1]);
}
else if (id.matches("^\\d+$"))
{
itemid = Integer.parseInt(id);
}
else if (id.matches("^[^:+',;.]+[:+',;.]\\d+$"))
{
itemname = id.split("[:+',;.]")[0].toLowerCase(Locale.ENGLISH);
metaData = Short.parseShort(id.split("[:+',;.]")[1]);
}
else
{
itemname = id.toLowerCase(Locale.ENGLISH);
}
if (itemname != null)
{
if (items.containsKey(itemname))
{
itemid = items.get(itemname);
if (durabilities.containsKey(itemname) && metaData == 0)
{
metaData = durabilities.get(itemname);
}
}
else if (Material.getMaterial(itemname) != null)
{
itemid = Material.getMaterial(itemname).getId();
metaData = 0;
}
else
{
throw new Exception(_("unknownItemName", id));
}
}
final Material mat = Material.getMaterial(itemid);
if (mat == null)
{
throw new Exception(_("unknownItemId", itemid));
}
final ItemStack retval = new ItemStack(mat);
retval.setAmount(mat.getMaxStackSize());
retval.setDurability(metaData);
return retval;
}
}
@@ -1,324 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.api.IJails;
import com.earth2me.essentials.storage.AsyncStorageObjectHolder;
import java.io.File;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.plugin.PluginManager;
public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.settings.Jails> implements IJails
{
private static final transient Logger LOGGER = Bukkit.getLogger();
private static transient boolean enabled = false;
public Jails(final IEssentials ess)
{
super(ess, com.earth2me.essentials.settings.Jails.class);
reloadConfig();
}
private void registerListeners()
{
enabled = true;
final PluginManager pluginManager = ess.getServer().getPluginManager();
final JailListener blockListener = new JailListener();
pluginManager.registerEvents(blockListener, ess);
}
@Override
public File getStorageFile()
{
return new File(ess.getDataFolder(), "jail.yml");
}
@Override
public void finishRead()
{
if (enabled == false && getCount() > 0)
{
registerListeners();
}
}
@Override
public void finishWrite()
{
if (enabled == false)
{
registerListeners();
}
}
@Override
public Location getJail(final String jailName) throws Exception
{
acquireReadLock();
try
{
if (getData().getJails() == null || jailName == null
|| !getData().getJails().containsKey(jailName.toLowerCase(Locale.ENGLISH)))
{
throw new Exception(_("jailNotExist"));
}
Location loc = getData().getJails().get(jailName.toLowerCase(Locale.ENGLISH));
if (loc == null || loc.getWorld() == null)
{
throw new Exception(_("jailNotExist"));
}
return loc;
}
finally
{
unlock();
}
}
@Override
public Collection<String> getList() throws Exception
{
acquireReadLock();
try
{
if (getData().getJails() == null)
{
return Collections.emptyList();
}
return new ArrayList<String>(getData().getJails().keySet());
}
finally
{
unlock();
}
}
@Override
public void removeJail(final String jail) throws Exception
{
acquireWriteLock();
try
{
if (getData().getJails() == null)
{
return;
}
getData().getJails().remove(jail.toLowerCase(Locale.ENGLISH));
}
finally
{
unlock();
}
}
@Override
public void sendToJail(final IUser user, final String jail) throws Exception
{
acquireReadLock();
try
{
if (user.isOnline())
{
Location loc = getJail(jail);
user.getTeleport().now(loc, false, TeleportCause.COMMAND);
}
user.setJail(jail);
}
finally
{
unlock();
}
}
@Override
public void setJail(final String jailName, final Location loc) throws Exception
{
acquireWriteLock();
try
{
if (getData().getJails() == null)
{
getData().setJails(new HashMap<String, Location>());
}
getData().getJails().put(jailName.toLowerCase(Locale.ENGLISH), loc);
}
finally
{
unlock();
}
}
@Override
public int getCount()
{
try
{
return getList().size();
}
catch (Exception ex)
{
return 0;
}
}
private class JailListener implements Listener
{
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBlockBreak(final BlockBreakEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBlockPlace(final BlockPlaceEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBlockDamage(final BlockDamageEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityDamageByEntity(final EntityDamageByEntityEvent event)
{
if (event.getCause() != DamageCause.ENTITY_ATTACK || event.getEntity().getType() != EntityType.PLAYER)
{
return;
}
final Entity damager = event.getDamager();
if (damager.getType() == EntityType.PLAYER)
{
final User user = ess.getUser(damager);
if (user != null && user.isJailed())
{
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPlayerInteract(final PlayerInteractEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (user.isJailed())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerRespawn(final PlayerRespawnEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (!user.isJailed() || user.getJail() == null || user.getJail().isEmpty())
{
return;
}
try
{
event.setRespawnLocation(getJail(user.getJail()));
}
catch (Exception ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerTeleport(final PlayerTeleportEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (!user.isJailed() || user.getJail() == null || user.getJail().isEmpty())
{
return;
}
try
{
event.setTo(getJail(user.getJail()));
}
catch (Exception ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
user.sendMessage(_("jailMessage"));
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerJoin(final PlayerJoinEvent event)
{
final User user = ess.getUser(event.getPlayer());
if (!user.isJailed() || user.getJail() == null || user.getJail().isEmpty())
{
return;
}
try
{
sendToJail(user, user.getJail());
}
catch (Exception ex)
{
if (ess.getSettings().isDebug())
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()), ex);
}
else
{
LOGGER.log(Level.INFO, _("returnPlayerToJailError", user.getName(), ex.getLocalizedMessage()));
}
}
user.sendMessage(_("jailMessage"));
}
}
}
@@ -1,176 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import static com.earth2me.essentials.I18n.capitalCase;
import com.earth2me.essentials.commands.NoChargeException;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import java.util.*;
import java.util.logging.Level;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
public class Kit
{
//TODO: Convert this to use one of the new text classes?
public static String listKits(final IEssentials ess, final User user) throws Exception
{
try
{
final ConfigurationSection kits = ess.getSettings().getKits();
final StringBuilder list = new StringBuilder();
for (String kiteItem : kits.getKeys(false))
{
if (user == null || user.isAuthorized("essentials.kit." + kiteItem.toLowerCase(Locale.ENGLISH)))
{
list.append(" ").append(capitalCase(kiteItem));
}
}
return list.toString().trim();
}
catch (Exception ex)
{
throw new Exception(_("kitError"), ex);
}
}
public static void checkTime(final User user, final String kitName, final Map<String, Object> els) throws NoChargeException
{
final Calendar time = new GregorianCalendar();
// Take the current time, and remove the delay from it.
final double delay = els.containsKey("delay") ? ((Number)els.get("delay")).doubleValue() : 0L;
final Calendar earliestTime = new GregorianCalendar();
earliestTime.add(Calendar.SECOND, -(int)delay);
earliestTime.add(Calendar.MILLISECOND, -(int)((delay * 1000.0) % 1000.0));
// This value contains the most recent time a kit could have been used that would allow another use.
final long earliestLong = earliestTime.getTimeInMillis();
// When was the last kit used?
final Long lastTime = user.getKitTimestamp(kitName);
if (lastTime == null || lastTime < earliestLong)
{
user.setKitTimestamp(kitName, time.getTimeInMillis());
}
else if (lastTime > time.getTimeInMillis())
{
// This is to make sure time didn't get messed up on last kit use.
// If this happens, let's give the user the benifit of the doubt.
user.setKitTimestamp(kitName, time.getTimeInMillis());
}
else
{
time.setTimeInMillis(lastTime);
time.add(Calendar.SECOND, (int)delay);
time.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
user.sendMessage(_("kitTimed", Util.formatDateDiff(time.getTimeInMillis())));
throw new NoChargeException();
}
}
public static List<String> getItems(final User user, final Map<String, Object> kit) throws Exception
{
if (kit == null)
{
throw new Exception(_("kitError2"));
}
try
{
return (List<String>)kit.get("items");
}
catch (Exception e)
{
user.sendMessage(_("kitError2"));
throw new Exception(_("kitErrorHelp"), e);
}
}
public static void expandItems(final IEssentials ess, final User user, final List<String> items) throws Exception
{
try
{
boolean spew = false;
for (String d : items)
{
final String[] parts = d.split(" ");
final String[] item = parts[0].split("[:+',;.]", 2);
final int id = Material.getMaterial(Integer.parseInt(item[0])).getId();
final short data = item.length > 1 ? Short.parseShort(item[1]) : 0;
final int amount = parts.length > 1 ? Integer.parseInt(parts[1]) : 1;
final ItemStack stack = new ItemStack(id, amount, data);
if (parts.length > 2)
{
for (int i = 2; i < parts.length; i++)
{
final String[] split = parts[i].split("[:+',;.]", 2);
if (split.length < 1)
{
continue;
}
final Enchantment enchantment = Enchantments.getByName(split[0]);
if (enchantment == null)
{
throw new Exception("Enchantment not found: " + split[0]);
}
int level;
if (split.length > 1)
{
level = Integer.parseInt(split[1]);
}
else
{
level = enchantment.getMaxLevel();
}
try
{
stack.addEnchantment(enchantment, level);
}
catch (Exception ex)
{
throw new Exception("Enchantment " + enchantment.getName() + ": " + ex.getMessage(), ex);
}
}
}
final Map<Integer, ItemStack> overfilled;
if (user.isAuthorized("essentials.oversizedstacks"))
{
overfilled = InventoryWorkaround.addItem(user.getInventory(), true, ess.getSettings().getOversizedStackSize(), stack);
}
else
{
overfilled = InventoryWorkaround.addItem(user.getInventory(), true, 0, stack);
}
for (ItemStack itemStack : overfilled.values())
{
user.getWorld().dropItemNaturally(user.getLocation(), itemStack);
spew = true;
}
}
user.updateInventory();
if (spew)
{
user.sendMessage(_("kitInvFull"));
}
}
catch (Exception e)
{
user.updateInventory();
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.WARNING, e.getMessage());
}
else
{
ess.getLogger().log(Level.WARNING, e.getMessage());
}
throw new Exception(_("kitError2"), e);
}
}
}
@@ -1,227 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
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 org.bukkit.Bukkit;
public class ManagedFile
{
private final static 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, _("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();
}
}
}
@@ -1,120 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
public enum Mob
{
CHICKEN("Chicken", Enemies.FRIENDLY, EntityType.CHICKEN),
COW("Cow", Enemies.FRIENDLY, EntityType.COW),
CREEPER("Creeper", Enemies.ENEMY, EntityType.CREEPER),
GHAST("Ghast", Enemies.ENEMY, EntityType.GHAST),
GIANT("Giant", Enemies.ENEMY, EntityType.GIANT),
PIG("Pig", Enemies.FRIENDLY, EntityType.PIG),
PIGZOMB("PigZombie", Enemies.NEUTRAL, EntityType.PIG_ZOMBIE),
SHEEP("Sheep", Enemies.FRIENDLY, "", EntityType.SHEEP),
SKELETON("Skeleton", Enemies.ENEMY, EntityType.SKELETON),
SLIME("Slime", Enemies.ENEMY, EntityType.SLIME),
SPIDER("Spider", Enemies.ENEMY, EntityType.SPIDER),
SQUID("Squid", Enemies.FRIENDLY, EntityType.SQUID),
ZOMBIE("Zombie", Enemies.ENEMY, EntityType.ZOMBIE),
WOLF("Wolf", Enemies.NEUTRAL, EntityType.WOLF),
CAVESPIDER("CaveSpider", Enemies.ENEMY, EntityType.CAVE_SPIDER),
ENDERMAN("Enderman", Enemies.ENEMY, "", EntityType.ENDERMAN),
SILVERFISH("Silverfish", Enemies.ENEMY, "", EntityType.SILVERFISH),
ENDERDRAGON("EnderDragon", Enemies.ENEMY, EntityType.ENDER_DRAGON),
VILLAGER("Villager", Enemies.FRIENDLY, EntityType.VILLAGER),
BLAZE("Blaze", Enemies.ENEMY, EntityType.BLAZE),
MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, EntityType.MUSHROOM_COW),
MAGMACUBE("MagmaCube", Enemies.ENEMY, EntityType.MAGMA_CUBE),
SNOWMAN("Snowman", Enemies.FRIENDLY, "", EntityType.SNOWMAN),
OCELOT("Ocelot", Enemies.NEUTRAL, EntityType.OCELOT),
IRONGOLEM("IronGolem", Enemies.NEUTRAL, EntityType.IRON_GOLEM);
public static final Logger logger = Logger.getLogger("Minecraft");
private Mob(String n, Enemies en, String s, EntityType type)
{
this.suffix = s;
this.name = n;
this.type = en;
this.bukkitType = type;
}
private Mob(String n, Enemies en, EntityType type)
{
this.name = n;
this.type = en;
this.bukkitType = type;
}
public String suffix = "s";
final public String name;
final public Enemies type;
final private EntityType bukkitType;
private static final Map<String, Mob> hashMap = new HashMap<String, Mob>();
static
{
for (Mob mob : Mob.values())
{
hashMap.put(mob.name.toLowerCase(Locale.ENGLISH), mob);
}
}
public static Set<String> getMobList() {
return Collections.unmodifiableSet(hashMap.keySet());
}
public LivingEntity spawn(final Player player, final Server server, final Location loc) throws MobException
{
final LivingEntity entity = player.getWorld().spawn(loc, (Class<? extends LivingEntity>)this.bukkitType.getEntityClass());
if (entity == null)
{
logger.log(Level.WARNING, _("unableToSpawnMob"));
throw new MobException();
}
return entity;
}
public enum Enemies
{
FRIENDLY("friendly"),
NEUTRAL("neutral"),
ENEMY("enemy");
private Enemies(final String type)
{
this.type = type;
}
final protected String type;
}
public EntityType getType()
{
return bukkitType;
}
public static Mob fromName(final String name)
{
return hashMap.get(name.toLowerCase(Locale.ENGLISH));
}
public static class MobException extends Exception
{
private static final long serialVersionUID = 1L;
}
}
File diff suppressed because it is too large. Load diff
@@ -1,38 +0,0 @@
package com.earth2me.essentials;
import lombok.Delegate;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.permissions.Permissible;
import org.bukkit.permissions.ServerOperator;
public class PlayerExtension implements Player
{
@Delegate(types =
{
Player.class, Entity.class, CommandSender.class, ServerOperator.class,
HumanEntity.class, ConfigurationSerializable.class, LivingEntity.class,
Permissible.class
})
protected Player base;
public PlayerExtension(final Player base)
{
this.base = base;
}
public final Player getBase()
{
return base;
}
public final Player setBase(final Player base)
{
return this.base = base;
}
}
@@ -1,915 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.signs.EssentialsSign;
import com.earth2me.essentials.signs.Signs;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.SimpleTextInput;
import java.io.File;
import java.text.MessageFormat;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.ChatColor;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.MemoryConfiguration;
import org.bukkit.event.EventPriority;
import org.bukkit.inventory.ItemStack;
public class Settings implements ISettings
{
private final transient EssentialsConf config;
private final static Logger logger = Logger.getLogger("Minecraft");
private final transient IEssentials ess;
private boolean metricsEnabled = true;
public Settings(IEssentials ess)
{
this.ess = ess;
config = new EssentialsConf(new File(ess.getDataFolder(), "config.yml"));
config.setTemplateName("/config.yml");
reloadConfig();
}
@Override
public boolean getRespawnAtHome()
{
return config.getBoolean("respawn-at-home", false);
}
@Override
public boolean getUpdateBedAtDaytime()
{
return config.getBoolean("update-bed-at-daytime", true);
}
@Override
public Set<String> getMultipleHomes()
{
return config.getConfigurationSection("sethome-multiple").getKeys(false);
}
@Override
public int getHomeLimit(final User user)
{
final Set<String> homeList = getMultipleHomes();
if (homeList == null)
{
//TODO: Replace this code to remove backwards compat, after settings are automatically updated
// return getHomeLimit("default");
return config.getInt("multiple-homes", 5);
}
int limit = getHomeLimit("default");
for (String set : homeList)
{
if (user.isAuthorized("essentials.sethome.multiple." + set) && (limit < getHomeLimit(set)))
{
limit = getHomeLimit(set);
}
}
return limit;
}
@Override
public int getHomeLimit(final String set)
{
return config.getInt("sethome-multiple." + set, config.getInt("sethome-multiple.default", 3));
}
private int chatRadius = 0;
private int _getChatRadius()
{
return config.getInt("chat.radius", config.getInt("chat-radius", 0));
}
@Override
public int getChatRadius()
{
return chatRadius;
}
@Override
public double getTeleportDelay()
{
return config.getDouble("teleport-delay", 0);
}
@Override
public int getOversizedStackSize()
{
return config.getInt("oversized-stacksize", 64);
}
@Override
public int getDefaultStackSize()
{
return config.getInt("default-stack-size", -1);
}
@Override
public int getStartingBalance()
{
return config.getInt("starting-balance", 0);
}
@Override
public boolean isCommandDisabled(final IEssentialsCommand cmd)
{
return isCommandDisabled(cmd.getName());
}
private Set<String> disabledCommands = new HashSet<String>();
@Override
public boolean isCommandDisabled(String label)
{
return disabledCommands.contains(label);
}
private Set<String> getDisabledCommands()
{
Set<String> disCommands = new HashSet<String>();
for (String c : config.getStringList("disabled-commands"))
{
disCommands.add(c.toLowerCase(Locale.ENGLISH));
}
for (String c : config.getKeys(false))
{
if (c.startsWith("disable-"))
{
disCommands.add(c.substring(8).toLowerCase(Locale.ENGLISH));
}
}
return disCommands;
}
@Override
public boolean isCommandRestricted(IEssentialsCommand cmd)
{
return isCommandRestricted(cmd.getName());
}
@Override
public boolean isCommandRestricted(String label)
{
for (String c : config.getStringList("restricted-commands"))
{
if (!c.equalsIgnoreCase(label))
{
continue;
}
return true;
}
return config.getBoolean("restrict-" + label.toLowerCase(Locale.ENGLISH), false);
}
@Override
public boolean isPlayerCommand(String label)
{
for (String c : config.getStringList("player-commands"))
{
if (!c.equalsIgnoreCase(label))
{
continue;
}
return true;
}
return false;
}
@Override
public boolean isCommandOverridden(String name)
{
for (String c : config.getStringList("overridden-commands"))
{
if (!c.equalsIgnoreCase(name))
{
continue;
}
return true;
}
return config.getBoolean("override-" + name.toLowerCase(Locale.ENGLISH), false);
}
@Override
public double getCommandCost(IEssentialsCommand cmd)
{
return getCommandCost(cmd.getName());
}
@Override
public double getCommandCost(String label)
{
double cost = config.getDouble("command-costs." + label, 0.0);
if (cost == 0.0)
{
cost = config.getDouble("cost-" + label, 0.0);
}
return cost;
}
private String nicknamePrefix = "~";
private String _getNicknamePrefix()
{
return config.getString("nickname-prefix", "~");
}
@Override
public String getNicknamePrefix()
{
return nicknamePrefix;
}
@Override
public double getTeleportCooldown()
{
return config.getDouble("teleport-cooldown", 0);
}
@Override
public double getHealCooldown()
{
return config.getDouble("heal-cooldown", 0);
}
private ConfigurationSection kits;
public ConfigurationSection _getKits()
{
if (config.isConfigurationSection("kits"))
{
final ConfigurationSection section = config.getConfigurationSection("kits");
final ConfigurationSection newSection = new MemoryConfiguration();
for (String kitItem : section.getKeys(false))
{
if (section.isConfigurationSection(kitItem))
{
newSection.set(kitItem.toLowerCase(Locale.ENGLISH), section.getConfigurationSection(kitItem));
}
}
return newSection;
}
return null;
}
@Override
public ConfigurationSection getKits()
{
return kits;
}
@Override
public Map<String, Object> getKit(String name)
{
name = name.replace('.', '_').replace('/', '_');
if (config.isConfigurationSection("kits"))
{
final ConfigurationSection kits = getKits();
if (kits.isConfigurationSection(name))
{
return kits.getConfigurationSection(name).getValues(true);
}
}
return null;
}
private ChatColor operatorColor = null;
@Override
public ChatColor getOperatorColor()
{
return operatorColor;
}
private ChatColor _getOperatorColor()
{
String colorName = config.getString("ops-name-color", null);
if (colorName == null)
{
return ChatColor.RED;
}
if ("none".equalsIgnoreCase(colorName) || colorName.isEmpty())
{
return null;
}
try
{
return ChatColor.valueOf(colorName.toUpperCase(Locale.ENGLISH));
}
catch (IllegalArgumentException ex)
{
}
return ChatColor.getByChar(colorName);
}
@Override
public int getSpawnMobLimit()
{
return config.getInt("spawnmob-limit", 10);
}
@Override
public boolean showNonEssCommandsInHelp()
{
return config.getBoolean("non-ess-in-help", true);
}
@Override
public boolean hidePermissionlessHelp()
{
return config.getBoolean("hide-permissionless-help", true);
}
@Override
public int getProtectCreeperMaxHeight()
{
return config.getInt("protect.creeper.max-height", -1);
}
@Override
public boolean areSignsDisabled()
{
return !signsEnabled;
}
@Override
public long getBackupInterval()
{
return config.getInt("backup.interval", 1440); // 1440 = 24 * 60
}
@Override
public String getBackupCommand()
{
return config.getString("backup.command", null);
}
private Map<String, MessageFormat> chatFormats = Collections.synchronizedMap(new HashMap<String, MessageFormat>());
@Override
public MessageFormat getChatFormat(String group)
{
MessageFormat mFormat = chatFormats.get(group);
if (mFormat == null)
{
String format = config.getString("chat.group-formats." + (group == null ? "Default" : group),
config.getString("chat.format", "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}"));
format = Util.replaceFormat(format);
format = format.replace("{DISPLAYNAME}", "%1$s");
format = format.replace("{GROUP}", "{0}");
format = format.replace("{MESSAGE}", "%2$s");
format = format.replace("{WORLDNAME}", "{1}");
format = format.replace("{SHORTWORLDNAME}", "{2}");
format = format.replaceAll("\\{(\\D*?)\\}", "\\[$1\\]");
mFormat = new MessageFormat(format);
chatFormats.put(group, mFormat);
}
return mFormat;
}
@Override
public boolean getAnnounceNewPlayers()
{
return !config.getString("newbies.announce-format", "-").isEmpty();
}
@Override
public IText getAnnounceNewPlayerFormat()
{
return new SimpleTextInput(Util.replaceFormat(config.getString("newbies.announce-format", "&dWelcome {DISPLAYNAME} to the server!")));
}
@Override
public String getNewPlayerKit()
{
return config.getString("newbies.kit", "");
}
@Override
public String getNewbieSpawn()
{
return config.getString("newbies.spawnpoint", "default");
}
@Override
public boolean getPerWarpPermission()
{
return config.getBoolean("per-warp-permission", false);
}
@Override
public boolean getSortListByGroups()
{
return config.getBoolean("sort-list-by-groups", true);
}
@Override
public void reloadConfig()
{
config.load();
noGodWorlds = new HashSet<String>(config.getStringList("no-god-in-worlds"));
enabledSigns = _getEnabledSigns();
teleportInvulnerability = _isTeleportInvulnerability();
disableItemPickupWhileAfk = _getDisableItemPickupWhileAfk();
registerBackInListener = _registerBackInListener();
cancelAfkOnMove = _cancelAfkOnMove();
getFreezeAfkPlayers = _getFreezeAfkPlayers();
itemSpawnBl = _getItemSpawnBlacklist();
loginAttackDelay = _getLoginAttackDelay();
signUsePerSecond = _getSignUsePerSecond();
kits = _getKits();
chatFormats.clear();
changeDisplayName = _changeDisplayName();
disabledCommands = getDisabledCommands();
nicknamePrefix = _getNicknamePrefix();
operatorColor = _getOperatorColor();
changePlayerListName = _changePlayerListName();
configDebug = _isDebug();
prefixsuffixconfigured = _isPrefixSuffixConfigured();
addprefixsuffix = _addPrefixSuffix();
disablePrefix = _disablePrefix();
disableSuffix = _disableSuffix();
chatRadius = _getChatRadius();
}
private List<Integer> itemSpawnBl = new ArrayList<Integer>();
@Override
public List<Integer> itemSpawnBlacklist()
{
return itemSpawnBl;
}
private List<Integer> _getItemSpawnBlacklist()
{
final List<Integer> epItemSpwn = new ArrayList<Integer>();
if (ess.getItemDb() == null)
{
logger.log(Level.FINE, "Aborting ItemSpawnBL read, itemDB not yet loaded.");
return epItemSpwn;
}
for (String itemName : config.getString("item-spawn-blacklist", "").split(","))
{
itemName = itemName.trim();
if (itemName.isEmpty())
{
continue;
}
try
{
final ItemStack iStack = ess.getItemDb().get(itemName);
epItemSpwn.add(iStack.getTypeId());
}
catch (Exception ex)
{
logger.log(Level.SEVERE, _("unknownItemInList", itemName, "item-spawn-blacklist"));
}
}
return epItemSpwn;
}
private List<EssentialsSign> enabledSigns = new ArrayList<EssentialsSign>();
private boolean signsEnabled = false;
@Override
public List<EssentialsSign> enabledSigns()
{
return enabledSigns;
}
private List<EssentialsSign> _getEnabledSigns()
{
List<EssentialsSign> newSigns = new ArrayList<EssentialsSign>();
for (String signName : config.getStringList("enabledSigns"))
{
signName = signName.trim().toUpperCase(Locale.ENGLISH);
if (signName.isEmpty())
{
continue;
}
if (signName.equals("COLOR") || signName.equals("COLOUR"))
{
signsEnabled = true;
continue;
}
try
{
newSigns.add(Signs.valueOf(signName).getSign());
}
catch (Exception ex)
{
logger.log(Level.SEVERE, _("unknownItemInList", signName, "enabledSigns"));
continue;
}
signsEnabled = true;
}
return newSigns;
}
@Override
public boolean spawnIfNoHome()
{
return config.getBoolean("spawn-if-no-home", false);
}
@Override
public boolean warnOnBuildDisallow()
{
return config.getBoolean("protect.disable.warn-on-build-disallow", false);
}
private boolean debug = false;
private boolean configDebug = false;
private boolean _isDebug()
{
return config.getBoolean("debug", false);
}
@Override
public boolean isDebug()
{
return debug || configDebug;
}
@Override
public boolean warnOnSmite()
{
return config.getBoolean("warn-on-smite", true);
}
@Override
public boolean permissionBasedItemSpawn()
{
return config.getBoolean("permission-based-item-spawn", false);
}
@Override
public String getLocale()
{
return config.getString("locale", "");
}
@Override
public String getCurrencySymbol()
{
return config.getString("currency-symbol", "$").substring(0, 1).replaceAll("[0-9]", "$");
}
@Override
public boolean isTradeInStacks(int id)
{
return config.getBoolean("trade-in-stacks-" + id, false);
}
@Override
public boolean isEcoDisabled()
{
return config.getBoolean("disable-eco", false);
}
@Override
public boolean getProtectPreventSpawn(final String creatureName)
{
return config.getBoolean("protect.prevent.spawn." + creatureName, false);
}
@Override
public List<Integer> getProtectList(final String configName)
{
final List<Integer> list = new ArrayList<Integer>();
for (String itemName : config.getString(configName, "").split(","))
{
itemName = itemName.trim();
if (itemName.isEmpty())
{
continue;
}
ItemStack itemStack;
try
{
itemStack = ess.getItemDb().get(itemName);
list.add(itemStack.getTypeId());
}
catch (Exception ex)
{
logger.log(Level.SEVERE, _("unknownItemInList", itemName, configName));
}
}
return list;
}
@Override
public String getProtectString(final String configName)
{
return config.getString(configName, null);
}
@Override
public boolean getProtectBoolean(final String configName, boolean def)
{
return config.getBoolean(configName, def);
}
private final static double MAXMONEY = 10000000000000.0;
@Override
public double getMaxMoney()
{
double max = config.getDouble("max-money", MAXMONEY);
if (Math.abs(max) > MAXMONEY)
{
max = max < 0 ? -MAXMONEY : MAXMONEY;
}
return max;
}
private final static double MINMONEY = -10000000000000.0;
@Override
public double getMinMoney()
{
double min = config.getDouble("min-money", MINMONEY);
if (min > 0)
{
min = -min;
}
if (min < MINMONEY)
{
min = MINMONEY;
}
return min;
}
@Override
public boolean isEcoLogEnabled()
{
return config.getBoolean("economy-log-enabled", false);
}
@Override
public boolean isEcoLogUpdateEnabled()
{
return config.getBoolean("economy-log-update-enabled", false);
}
@Override
public boolean removeGodOnDisconnect()
{
return config.getBoolean("remove-god-on-disconnect", false);
}
private boolean changeDisplayName = true;
private boolean _changeDisplayName()
{
return config.getBoolean("change-displayname", true);
}
@Override
public boolean changeDisplayName()
{
return changeDisplayName;
}
private boolean changePlayerListName = false;
private boolean _changePlayerListName()
{
return config.getBoolean("change-playerlist", false);
}
@Override
public boolean changePlayerListName()
{
return changePlayerListName;
}
@Override
public boolean useBukkitPermissions()
{
return config.getBoolean("use-bukkit-permissions", false);
}
private boolean prefixsuffixconfigured = false;
private boolean addprefixsuffix = false;
private boolean _addPrefixSuffix()
{
return config.getBoolean("add-prefix-suffix", false);
}
private boolean _isPrefixSuffixConfigured()
{
return config.hasProperty("add-prefix-suffix");
}
@Override
public boolean addPrefixSuffix()
{
return prefixsuffixconfigured ? addprefixsuffix : ess.getServer().getPluginManager().isPluginEnabled("EssentialsChat");
}
private boolean disablePrefix = false;
private boolean _disablePrefix()
{
return config.getBoolean("disablePrefix", false);
}
@Override
public boolean disablePrefix()
{
return disablePrefix;
}
private boolean disableSuffix = false;
private boolean _disableSuffix()
{
return config.getBoolean("disableSuffix", false);
}
@Override
public boolean disableSuffix()
{
return disableSuffix;
}
@Override
public long getAutoAfk()
{
return config.getLong("auto-afk", 300);
}
@Override
public long getAutoAfkKick()
{
return config.getLong("auto-afk-kick", -1);
}
private boolean getFreezeAfkPlayers;
@Override
public boolean getFreezeAfkPlayers()
{
return getFreezeAfkPlayers;
}
private boolean _getFreezeAfkPlayers()
{
return config.getBoolean("freeze-afk-players", false);
}
private boolean cancelAfkOnMove;
@Override
public boolean cancelAfkOnMove()
{
return cancelAfkOnMove;
}
private boolean _cancelAfkOnMove()
{
return config.getBoolean("cancel-afk-on-move", true);
}
@Override
public boolean areDeathMessagesEnabled()
{
return config.getBoolean("death-messages", true);
}
private Set<String> noGodWorlds = new HashSet<String>();
@Override
public Set<String> getNoGodWorlds()
{
return noGodWorlds;
}
@Override
public void setDebug(final boolean debug)
{
this.debug = debug;
}
@Override
public boolean getRepairEnchanted()
{
return config.getBoolean("repair-enchanted", true);
}
@Override
public boolean isWorldTeleportPermissions()
{
return config.getBoolean("world-teleport-permissions", false);
}
@Override
public boolean isWorldHomePermissions()
{
return config.getBoolean("world-home-permissions", false);
}
private boolean registerBackInListener;
@Override
public boolean registerBackInListener()
{
return registerBackInListener;
}
private boolean _registerBackInListener()
{
return config.getBoolean("register-back-in-listener", false);
}
private boolean disableItemPickupWhileAfk;
@Override
public boolean getDisableItemPickupWhileAfk()
{
return disableItemPickupWhileAfk;
}
private boolean _getDisableItemPickupWhileAfk()
{
return config.getBoolean("disable-item-pickup-while-afk", false);
}
@Override
public EventPriority getRespawnPriority()
{
String priority = config.getString("respawn-listener-priority", "normal").toLowerCase(Locale.ENGLISH);
if ("lowest".equals(priority))
{
return EventPriority.LOWEST;
}
if ("low".equals(priority))
{
return EventPriority.LOW;
}
if ("normal".equals(priority))
{
return EventPriority.NORMAL;
}
if ("high".equals(priority))
{
return EventPriority.HIGH;
}
if ("highest".equals(priority))
{
return EventPriority.HIGHEST;
}
return EventPriority.NORMAL;
}
@Override
public long getTpaAcceptCancellation()
{
return config.getLong("tpa-accept-cancellation", 0);
}
@Override
public boolean isMetricsEnabled()
{
return metricsEnabled;
}
@Override
public void setMetricsEnabled(boolean metricsEnabled)
{
this.metricsEnabled = metricsEnabled;
}
private boolean teleportInvulnerability;
@Override
public long getTeleportInvulnerability()
{
return config.getLong("teleport-invulnerability", 0) * 1000;
}
private boolean _isTeleportInvulnerability()
{
return (config.getLong("teleport-invulnerability", 0) > 0);
}
@Override
public boolean isTeleportInvulnerability()
{
return teleportInvulnerability;
}
private long loginAttackDelay;
private long _getLoginAttackDelay()
{
return config.getLong("login-attack-delay", 0) * 1000;
}
@Override
public long getLoginAttackDelay()
{
return loginAttackDelay;
}
private int signUsePerSecond;
private int _getSignUsePerSecond()
{
final int perSec = config.getInt("sign-use-per-second", 4);
return perSec > 0 ? perSec : 1;
}
@Override
public int getSignUsePerSecond()
{
return signUsePerSecond;
}
}
@@ -1,61 +0,0 @@
package com.earth2me.essentials;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityExplodeEvent;
public class TNTExplodeListener implements Listener, Runnable
{
private final transient IEssentials ess;
private transient boolean enabled = false;
private transient int timer = -1;
public TNTExplodeListener(final IEssentials ess)
{
super();
this.ess = ess;
}
public void enable()
{
if (!enabled)
{
enabled = true;
timer = ess.scheduleSyncDelayedTask(this, 1000);
return;
}
if (timer != -1)
{
ess.getScheduler().cancelTask(timer);
timer = ess.scheduleSyncDelayedTask(this, 1000);
}
}
@EventHandler(priority = EventPriority.LOW)
public void onEntityExplode(final EntityExplodeEvent event)
{
if (!enabled)
{
return;
}
if (event.getEntity() instanceof LivingEntity)
{
return;
}
if (event.blockList().size() < 1)
{
return;
}
event.setCancelled(true);
event.getLocation().getWorld().createExplosion(event.getLocation(), 0F);
}
@Override
public void run()
{
enabled = false;
}
}
@@ -1,300 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.api.ITeleport;
import static com.earth2me.essentials.I18n._;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public class Teleport implements Runnable, ITeleport
{
private static final double MOVE_CONSTANT = 0.3;
private static class Target
{
private final Location location;
private final Entity entity;
public Target(Location location)
{
this.location = location;
this.entity = null;
}
public Target(Entity entity)
{
this.entity = entity;
this.location = null;
}
public Location getLocation()
{
if (this.entity != null)
{
return this.entity.getLocation();
}
return location;
}
}
private IUser user;
private int teleTimer = -1;
private long started; // time this task was initiated
private long delay; // how long to delay the teleport
private int health;
// note that I initially stored a clone of the location for reference, but...
// when comparing locations, I got incorrect mismatches (rounding errors, looked like)
// so, the X/Y/Z values are stored instead and rounded off
private long initX;
private long initY;
private long initZ;
private Target teleportTarget;
private Trade chargeFor;
private final IEssentials ess;
private static final Logger logger = Logger.getLogger("Minecraft");
private TeleportCause cause;
private void initTimer(long delay, Target target, Trade chargeFor, TeleportCause cause)
{
this.started = System.currentTimeMillis();
this.delay = delay;
this.health = user.getHealth();
this.initX = Math.round(user.getLocation().getX() * MOVE_CONSTANT);
this.initY = Math.round(user.getLocation().getY() * MOVE_CONSTANT);
this.initZ = Math.round(user.getLocation().getZ() * MOVE_CONSTANT);
this.teleportTarget = target;
this.chargeFor = chargeFor;
this.cause = cause;
}
@Override
public void run()
{
if (user == null || !user.isOnline() || user.getLocation() == null)
{
cancel();
return;
}
if (Math.round(user.getLocation().getX() * MOVE_CONSTANT) != initX
|| Math.round(user.getLocation().getY() * MOVE_CONSTANT) != initY
|| Math.round(user.getLocation().getZ() * MOVE_CONSTANT) != initZ
|| user.getHealth() < health)
{ // user moved, cancel teleport
cancel(true);
return;
}
health = user.getHealth(); // in case user healed, then later gets injured
long now = System.currentTimeMillis();
if (now > started + delay)
{
try
{
cooldown(false);
user.sendMessage(_("teleportationCommencing"));
try
{
now(teleportTarget, cause);
if (chargeFor != null)
{
chargeFor.charge(user);
}
}
catch (Throwable ex)
{
ess.showError(user.getBase(), ex, "teleport");
}
}
catch (Exception ex)
{
user.sendMessage(_("cooldownWithMessage", ex.getMessage()));
}
}
}
public Teleport(IUser user, IEssentials ess)
{
this.user = user;
this.ess = ess;
}
public void respawn(final Trade chargeFor, TeleportCause cause) throws Exception
{
final Player player = user.getBase();
final Location bed = player.getBedSpawnLocation();
final PlayerRespawnEvent pre = new PlayerRespawnEvent(player, bed == null ? player.getWorld().getSpawnLocation() : bed, bed != null);
ess.getServer().getPluginManager().callEvent(pre);
teleport(new Target(pre.getRespawnLocation()), chargeFor, cause);
}
public void warp(String warp, Trade chargeFor, TeleportCause cause) throws Exception
{
Location loc = ess.getWarps().getWarp(warp);
teleport(new Target(loc), chargeFor, cause);
user.sendMessage(_("warpingTo", warp));
}
public void cooldown(boolean check) throws Exception
{
final Calendar time = new GregorianCalendar();
if (user.getLastTeleportTimestamp() > 0)
{
// Take the current time, and remove the delay from it.
final double cooldown = ess.getSettings().getTeleportCooldown();
final Calendar earliestTime = new GregorianCalendar();
earliestTime.add(Calendar.SECOND, -(int)cooldown);
earliestTime.add(Calendar.MILLISECOND, -(int)((cooldown * 1000.0) % 1000.0));
// This value contains the most recent time a teleport could have been used that would allow another use.
final long earliestLong = earliestTime.getTimeInMillis();
// When was the last teleport used?
final Long lastTime = user.getLastTeleportTimestamp();
if (lastTime > time.getTimeInMillis())
{
// This is to make sure time didn't get messed up on last kit use.
// If this happens, let's give the user the benifit of the doubt.
user.setLastTeleportTimestamp(time.getTimeInMillis());
return;
}
else if (lastTime > earliestLong && !user.isAuthorized("essentials.teleport.cooldown.bypass"))
{
time.setTimeInMillis(lastTime);
time.add(Calendar.SECOND, (int)cooldown);
time.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0));
throw new Exception(_("timeBeforeTeleport", Util.formatDateDiff(time.getTimeInMillis())));
}
}
// if justCheck is set, don't update lastTeleport; we're just checking
if (!check)
{
user.setLastTeleportTimestamp(time.getTimeInMillis());
}
}
public void cancel(boolean notifyUser)
{
if (teleTimer == -1)
{
return;
}
try
{
ess.getServer().getScheduler().cancelTask(teleTimer);
if (notifyUser)
{
user.sendMessage(_("pendingTeleportCancelled"));
}
}
finally
{
teleTimer = -1;
}
}
public void cancel()
{
cancel(false);
}
public void teleport(Location loc, Trade chargeFor) throws Exception
{
teleport(new Target(loc), chargeFor, TeleportCause.PLUGIN);
}
public void teleport(Location loc, Trade chargeFor, TeleportCause cause) throws Exception
{
teleport(new Target(loc), chargeFor, cause);
}
public void teleport(Entity entity, Trade chargeFor, TeleportCause cause) throws Exception
{
teleport(new Target(entity), chargeFor, cause);
}
private void teleport(Target target, Trade chargeFor, TeleportCause cause) throws Exception
{
double delay = ess.getSettings().getTeleportDelay();
if (chargeFor != null)
{
chargeFor.isAffordableFor(user);
}
cooldown(true);
if (delay <= 0 || user.isAuthorized("essentials.teleport.timer.bypass"))
{
cooldown(false);
now(target, cause);
if (chargeFor != null)
{
chargeFor.charge(user);
}
return;
}
cancel();
Calendar c = new GregorianCalendar();
c.add(Calendar.SECOND, (int)delay);
c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0));
user.sendMessage(_("dontMoveMessage", Util.formatDateDiff(c.getTimeInMillis())));
initTimer((long)(delay * 1000.0), target, chargeFor, cause);
teleTimer = ess.scheduleSyncRepeatingTask(this, 10, 10);
}
private void now(Target target, TeleportCause cause) throws Exception
{
cancel();
user.setLastLocation();
user.getBase().teleport(Util.getSafeDestination(target.getLocation()), cause);
}
public void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception
{
if (cooldown)
{
cooldown(false);
}
now(new Target(loc), cause);
}
public void now(Location loc, Trade chargeFor, TeleportCause cause) throws Exception
{
cooldown(false);
chargeFor.charge(user);
now(new Target(loc), cause);
}
public void now(Entity entity, boolean cooldown, TeleportCause cause) throws Exception
{
if (cooldown)
{
cooldown(false);
}
now(new Target(entity), cause);
}
public void back(Trade chargeFor) throws Exception
{
teleport(new Target(user.getLastLocation()), chargeFor, TeleportCause.COMMAND);
}
public void back() throws Exception
{
now(new Target(user.getLastLocation()), TeleportCause.COMMAND);
}
public void home(Location loc, Trade chargeFor) throws Exception
{
teleport(new Target(loc), chargeFor, TeleportCause.COMMAND);
}
}
@@ -1,338 +0,0 @@
package com.earth2me.essentials;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
import com.earth2me.essentials.craftbukkit.SetExpFix;
import static com.earth2me.essentials.I18n._;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
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 org.bukkit.Location;
import org.bukkit.entity.Item;
import org.bukkit.inventory.ItemStack;
public class Trade
{
private final transient String command;
private final transient String fallbackCommand;
private final transient Double money;
private final transient ItemStack itemStack;
private final transient Integer exp;
private final transient IEssentials ess;
public Trade(final String command, final IEssentials ess)
{
this(command, null, null, null, null, ess);
}
public Trade(final String command, final String fallback, final IEssentials ess)
{
this(command, fallback, null, null, null, ess);
}
public Trade(final double money, final IEssentials ess)
{
this(null, 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 String fallback, final Double money, final ItemStack item, final Integer exp, final IEssentials ess)
{
this.command = command;
this.fallbackCommand = fallback;
this.money = money;
this.itemStack = item;
this.exp = exp;
this.ess = ess;
}
public void isAffordableFor(final IUser user) throws ChargeException
{
if (getMoney() != null
&& getMoney() > 0
&& !user.canAfford(getMoney()))
{
throw new ChargeException(_("notEnoughMoney"));
}
if (getItemStack() != null
&& !InventoryWorkaround.containsItem(user.getInventory(), true, true, itemStack))
{
throw new ChargeException(_("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " ")));
}
double money;
if (command != null && !command.isEmpty()
&& 0 < (money = getCommandCost(user))
&& !user.canAfford(money))
{
throw new ChargeException(_("notEnoughMoney"));
}
if (exp != null && exp > 0
&& SetExpFix.getTotalExperience(user) < exp)
{
throw new ChargeException(_("notEnoughExperience"));
}
}
public void pay(final IUser user)
{
pay(user, true);
}
public boolean pay(final IUser user, final boolean dropItems)
{
boolean success = true;
if (getMoney() != null && getMoney() > 0)
{
user.giveMoney(getMoney());
}
if (getItemStack() != null)
{
if (dropItems)
{
final Map<Integer, ItemStack> leftOver = InventoryWorkaround.addItem(user.getInventory(), true, getItemStack());
final Location loc = user.getLocation();
for (ItemStack itemStack : leftOver.values())
{
final int maxStackSize = itemStack.getType().getMaxStackSize();
final int stacks = itemStack.getAmount() / maxStackSize;
final int leftover = itemStack.getAmount() % maxStackSize;
final Item[] itemStacks = new Item[stacks + (leftover > 0 ? 1 : 0)];
for (int i = 0; i < stacks; i++)
{
final ItemStack stack = itemStack.clone();
stack.setAmount(maxStackSize);
itemStacks[i] = loc.getWorld().dropItem(loc, stack);
}
if (leftover > 0)
{
final ItemStack stack = itemStack.clone();
stack.setAmount(leftover);
itemStacks[stacks] = loc.getWorld().dropItem(loc, stack);
}
}
}
else
{
success = InventoryWorkaround.addAllItems(user.getInventory(), true, getItemStack());
}
user.updateInventory();
}
if (getExperience() != null)
{
SetExpFix.setTotalExperience(user, SetExpFix.getTotalExperience(user) + getExperience());
}
return success;
}
public void charge(final IUser user) throws ChargeException
{
if (getMoney() != null)
{
if (!user.canAfford(getMoney()) && getMoney() > 0)
{
throw new ChargeException(_("notEnoughMoney"));
}
user.takeMoney(getMoney());
}
if (getItemStack() != null)
{
if (!InventoryWorkaround.containsItem(user.getInventory(), true, true, itemStack))
{
throw new ChargeException(_("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " ")));
}
InventoryWorkaround.removeItem(user.getInventory(), true, true, getItemStack());
user.updateInventory();
}
if (command != null)
{
final double cost = getCommandCost(user);
if (!user.canAfford(cost) && cost > 0)
{
throw new ChargeException(_("notEnoughMoney"));
}
user.takeMoney(cost);
}
if (getExperience() != null)
{
final int experience = SetExpFix.getTotalExperience(user);
if (experience < getExperience() && getExperience() > 0)
{
throw new ChargeException(_("notEnoughExperience"));
}
SetExpFix.setTotalExperience(user, experience - getExperience());
}
}
public Double getMoney()
{
return money;
}
public ItemStack getItemStack()
{
return itemStack;
}
public Integer getExperience()
{
return exp;
}
public Double getCommandCost(final IUser user)
{
double cost = 0d;
if (command != null && !command.isEmpty()
&& !user.isAuthorized("essentials.nocommandcost.all")
&& !user.isAuthorized("essentials.nocommandcost." + command))
{
cost = ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command);
if (cost == 0.0 && fallbackCommand != null && !fallbackCommand.isEmpty())
{
cost = ess.getSettings().getCommandCost(fallbackCommand.charAt(0) == '/' ? fallbackCommand.substring(1) : fallbackCommand);
}
}
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)
{
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("Minecraft").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("Minecraft").log(Level.SEVERE, null, ex);
}
}
public static void closeLog()
{
if (fw != null)
{
try
{
fw.close();
}
catch (IOException ex)
{
Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex);
}
fw = null;
}
}
}
@@ -1,697 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.register.payment.Method;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
private CommandSender replyTo = null;
private transient User teleportRequester;
private transient boolean teleportRequestHere;
private transient boolean vanished;
private transient final Teleport teleport;
private transient long teleportRequestTime;
private transient long lastOnlineActivity;
private transient long lastThrottledAction;
private transient long lastActivity = System.currentTimeMillis();
private boolean hidden = false;
private transient Location afkPosition = null;
private boolean invSee = false;
private static final Logger logger = Logger.getLogger("Minecraft");
User(final Player base, final IEssentials ess)
{
super(base, ess);
teleport = new Teleport(this, ess);
if (isAfk())
{
afkPosition = getLocation();
}
}
User update(final Player base)
{
setBase(base);
return this;
}
@Override
public boolean isAuthorized(final IEssentialsCommand cmd)
{
return isAuthorized(cmd, "essentials.");
}
@Override
public boolean isAuthorized(final IEssentialsCommand cmd, final String permissionPrefix)
{
return isAuthorized(permissionPrefix + (cmd.getName().equals("r") ? "msg" : cmd.getName()));
}
@Override
public boolean isAuthorized(final String node)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "checking if " + base.getName() + " has " + node);
}
if (base instanceof OfflinePlayer)
{
return false;
}
if (isOp())
{
return true;
}
if (isJailed())
{
return false;
}
try
{
return ess.getPermissionsHandler().hasPermission(base, node);
}
catch (Exception ex)
{
ess.getLogger().log(Level.SEVERE, "Permission System Error: " + ess.getPermissionsHandler().getName() + " returned: " + ex.getMessage());
return false;
}
}
public void healCooldown() throws Exception
{
final Calendar now = new GregorianCalendar();
if (getLastHealTimestamp() > 0)
{
final double cooldown = ess.getSettings().getHealCooldown();
final Calendar cooldownTime = new GregorianCalendar();
cooldownTime.setTimeInMillis(getLastHealTimestamp());
cooldownTime.add(Calendar.SECOND, (int)cooldown);
cooldownTime.add(Calendar.MILLISECOND, (int)((cooldown * 1000.0) % 1000.0));
if (cooldownTime.after(now) && !isAuthorized("essentials.heal.cooldown.bypass"))
{
throw new Exception(_("timeBeforeHeal", Util.formatDateDiff(cooldownTime.getTimeInMillis())));
}
}
setLastHealTimestamp(now.getTimeInMillis());
}
@Override
public void giveMoney(final double value)
{
giveMoney(value, null);
}
public void giveMoney(final double value, final CommandSender initiator)
{
if (value == 0)
{
return;
}
setMoney(getMoney() + value);
sendMessage(_("addedToAccount", Util.displayCurrency(value, ess)));
if (initiator != null)
{
initiator.sendMessage(_("addedToOthersAccount", Util.displayCurrency(value, ess), this.getDisplayName(), Util.displayCurrency(getMoney(), ess)));
}
}
public void payUser(final User reciever, final double value) throws Exception
{
if (value == 0)
{
return;
}
if (canAfford(value))
{
setMoney(getMoney() - value);
reciever.setMoney(reciever.getMoney() + value);
sendMessage(_("moneySentTo", Util.displayCurrency(value, ess), reciever.getDisplayName()));
reciever.sendMessage(_("moneyRecievedFrom", Util.displayCurrency(value, ess), getDisplayName()));
}
else
{
throw new Exception(_("notEnoughMoney"));
}
}
@Override
public void takeMoney(final double value)
{
takeMoney(value, null);
}
public void takeMoney(final double value, final CommandSender initiator)
{
if (value == 0)
{
return;
}
setMoney(getMoney() - value);
sendMessage(_("takenFromAccount", Util.displayCurrency(value, ess)));
if (initiator != null)
{
initiator.sendMessage(_("takenFromOthersAccount", Util.displayCurrency(value, ess), this.getDisplayName(), Util.displayCurrency(getMoney(), ess)));
}
}
@Override
public boolean canAfford(final double cost)
{
return canAfford(cost, true);
}
public boolean canAfford(final double cost, final boolean permcheck)
{
final double mon = getMoney();
if (!permcheck || isAuthorized("essentials.eco.loan"))
{
return (mon - cost) >= ess.getSettings().getMinMoney();
}
return cost <= mon;
}
public void dispose()
{
this.base = new OfflinePlayer(getName(), ess);
}
@Override
public void setReplyTo(final CommandSender user)
{
replyTo = user;
}
@Override
public CommandSender getReplyTo()
{
return replyTo;
}
@Override
public int compareTo(final User other)
{
return Util.stripFormat(this.getDisplayName()).compareToIgnoreCase(Util.stripFormat(other.getDisplayName()));
}
@Override
public boolean equals(final Object object)
{
if (!(object instanceof User))
{
return false;
}
return this.getName().equalsIgnoreCase(((User)object).getName());
}
@Override
public int hashCode()
{
return this.getName().hashCode();
}
public Boolean canSpawnItem(final int itemId)
{
return !ess.getSettings().itemSpawnBlacklist().contains(itemId);
}
public Location getHome() throws Exception
{
return getHome(getHomes().get(0));
}
public void setHome()
{
setHome("home", getLocation());
}
public void setHome(final String name)
{
setHome(name, getLocation());
}
@Override
public void setLastLocation()
{
setLastLocation(getLocation());
}
public void requestTeleport(final User player, final boolean here)
{
teleportRequestTime = System.currentTimeMillis();
teleportRequester = player;
teleportRequestHere = here;
}
public User getTeleportRequest()
{
return teleportRequester;
}
public boolean isTpRequestHere()
{
return teleportRequestHere;
}
public String getNick(final boolean longnick)
{
final StringBuilder prefix = new StringBuilder();
String nickname;
String suffix = "";
final String nick = getNickname();
if (ess.getSettings().isCommandDisabled("nick") || nick == null || nick.isEmpty() || nick.equals(getName()))
{
nickname = getName();
}
else
{
nickname = ess.getSettings().getNicknamePrefix() + nick;
}
if (isOp())
{
try
{
final ChatColor opPrefix = ess.getSettings().getOperatorColor();
if (opPrefix != null && opPrefix.toString().length() > 0)
{
prefix.insert(0, opPrefix.toString());
suffix = "§f";
}
}
catch (Exception e)
{
}
}
if (ess.getSettings().addPrefixSuffix())
{
if (!ess.getSettings().disablePrefix())
{
final String ptext = ess.getPermissionsHandler().getPrefix(base).replace('&', '§');
prefix.insert(0, ptext);
suffix = "§f";
}
if (!ess.getSettings().disableSuffix())
{
final String stext = ess.getPermissionsHandler().getSuffix(base).replace('&', '§');
suffix = stext + "§f";
suffix = suffix.replace("§f§f", "§f");
}
}
final String strPrefix = prefix.toString();
String output = strPrefix + nickname + suffix;
if (!longnick && output.length() > 16)
{
output = strPrefix + nickname;
}
if (!longnick && output.length() > 16)
{
output = Util.lastCode(strPrefix) + nickname;
}
if (!longnick && output.length() > 16)
{
output = Util.lastCode(strPrefix) + nickname.substring(0, 14);
}
if (output.charAt(output.length() - 1) == '§')
{
output = output.substring(0, output.length() - 1);
}
return output;
}
public void setDisplayNick()
{
if (base.isOnline() && ess.getSettings().changeDisplayName())
{
setDisplayName(getNick(true));
if (ess.getSettings().changePlayerListName())
{
String name = getNick(false);
try
{
setPlayerListName(name);
}
catch (IllegalArgumentException e)
{
if (ess.getSettings().isDebug())
{
logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player.");
}
}
}
}
}
@Override
public String getDisplayName()
{
return super.getDisplayName() == null ? super.getName() : super.getDisplayName();
}
@Override
public Teleport getTeleport()
{
return teleport;
}
public long getLastOnlineActivity()
{
return lastOnlineActivity;
}
public void setLastOnlineActivity(final long timestamp)
{
lastOnlineActivity = timestamp;
}
@Override
public double getMoney()
{
if (ess.getPaymentMethod().hasMethod())
{
try
{
final Method method = ess.getPaymentMethod().getMethod();
if (!method.hasAccount(this.getName()))
{
throw new Exception();
}
final Method.MethodAccount account = ess.getPaymentMethod().getMethod().getAccount(this.getName());
return account.balance();
}
catch (Throwable ex)
{
}
}
return super.getMoney();
}
@Override
public void setMoney(final double value)
{
if (ess.getPaymentMethod().hasMethod())
{
try
{
final Method method = ess.getPaymentMethod().getMethod();
if (!method.hasAccount(this.getName()))
{
throw new Exception();
}
final Method.MethodAccount account = ess.getPaymentMethod().getMethod().getAccount(this.getName());
account.set(value);
}
catch (Throwable ex)
{
}
}
super.setMoney(value);
Trade.log("Update", "Set", "API", getName(), new Trade(value, ess), null, null, null, ess);
}
public void updateMoneyCache(final double value)
{
if (ess.getPaymentMethod().hasMethod() && super.getMoney() != value)
{
super.setMoney(value);
}
}
@Override
public void setAfk(final boolean set)
{
this.setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : set);
if (set && !isAfk())
{
afkPosition = getLocation();
}
else if (!set && isAfk())
{
afkPosition = null;
}
super.setAfk(set);
}
@Override
public boolean toggleAfk()
{
final boolean now = super.toggleAfk();
this.setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : now);
return now;
}
@Override
public boolean isHidden()
{
return hidden;
}
public void setHidden(final boolean hidden)
{
this.hidden = hidden;
if (hidden == true)
{
setLastLogout(getLastOnlineActivity());
}
}
//Returns true if status expired during this check
public boolean checkJailTimeout(final long currentTime)
{
if (getJailTimeout() > 0 && getJailTimeout() < currentTime && isJailed())
{
setJailTimeout(0);
setJailed(false);
sendMessage(_("haveBeenReleased"));
setJail(null);
try
{
getTeleport().back();
}
catch (Exception ex)
{
}
return true;
}
return false;
}
//Returns true if status expired during this check
public boolean checkMuteTimeout(final long currentTime)
{
if (getMuteTimeout() > 0 && getMuteTimeout() < currentTime && isMuted())
{
setMuteTimeout(0);
sendMessage(_("canTalkAgain"));
setMuted(false);
return true;
}
return false;
}
//Returns true if status expired during this check
public boolean checkBanTimeout(final long currentTime)
{
if (getBanTimeout() > 0 && getBanTimeout() < currentTime && isBanned())
{
setBanTimeout(0);
setBanned(false);
return true;
}
return false;
}
public void updateActivity(final boolean broadcast)
{
if (isAfk())
{
setAfk(false);
if (broadcast && !isHidden())
{
setDisplayNick();
ess.broadcastMessage(this, _("userIsNotAway", getDisplayName()));
}
}
lastActivity = System.currentTimeMillis();
}
public void checkActivity()
{
final long autoafkkick = ess.getSettings().getAutoAfkKick();
if (autoafkkick > 0 && lastActivity > 0 && (lastActivity + (autoafkkick * 1000)) < System.currentTimeMillis()
&& !isHidden() && !isAuthorized("essentials.kick.exempt") && !isAuthorized("essentials.afk.kickexempt"))
{
final String kickReason = _("autoAfkKickReason", autoafkkick / 60.0);
lastActivity = 0;
kickPlayer(kickReason);
for (Player player : ess.getServer().getOnlinePlayers())
{
final User user = ess.getUser(player);
if (user.isAuthorized("essentials.kick.notify"))
{
player.sendMessage(_("playerKicked", Console.NAME, getName(), kickReason));
}
}
}
final long autoafk = ess.getSettings().getAutoAfk();
if (!isAfk() && autoafk > 0 && lastActivity + autoafk * 1000 < System.currentTimeMillis() && isAuthorized("essentials.afk"))
{
setAfk(true);
if (!isHidden())
{
setDisplayNick();
ess.broadcastMessage(this, _("userIsAway", getDisplayName()));
}
}
}
public Location getAfkPosition()
{
return afkPosition;
}
@Override
public boolean isGodModeEnabled()
{
return (super.isGodModeEnabled() && !ess.getSettings().getNoGodWorlds().contains(getLocation().getWorld().getName()))
|| (isAfk() && ess.getSettings().getFreezeAfkPlayers());
}
public boolean isGodModeEnabledRaw()
{
return super.isGodModeEnabled();
}
@Override
public String getGroup()
{
return ess.getPermissionsHandler().getGroup(base);
}
public boolean inGroup(final String group)
{
return ess.getPermissionsHandler().inGroup(base, group);
}
public boolean canBuild()
{
if (isOp())
{
return true;
}
return ess.getPermissionsHandler().canBuild(base, getGroup());
}
public long getTeleportRequestTime()
{
return teleportRequestTime;
}
public boolean isInvSee()
{
return invSee;
}
public void setInvSee(final boolean set)
{
invSee = set;
}
private transient long teleportInvulnerabilityTimestamp = 0;
public void enableInvulnerabilityAfterTeleport()
{
final long time = ess.getSettings().getTeleportInvulnerability();
if (time > 0)
{
teleportInvulnerabilityTimestamp = System.currentTimeMillis() + time;
}
}
public void resetInvulnerabilityAfterTeleport()
{
if (teleportInvulnerabilityTimestamp != 0
&& teleportInvulnerabilityTimestamp < System.currentTimeMillis())
{
teleportInvulnerabilityTimestamp = 0;
}
}
public boolean hasInvulnerabilityAfterTeleport()
{
return teleportInvulnerabilityTimestamp != 0 && teleportInvulnerabilityTimestamp >= System.currentTimeMillis();
}
public boolean isVanished()
{
return vanished;
}
public void setVanished(final boolean set)
{
vanished = set;
if (set)
{
for (Player p : ess.getServer().getOnlinePlayers())
{
if (!ess.getUser(p).isAuthorized("essentials.vanish.see"))
{
p.hidePlayer(getBase());
}
}
setHidden(true);
ess.getVanishedPlayers().add(getName());
}
else
{
for (Player p : ess.getServer().getOnlinePlayers())
{
p.showPlayer(getBase());
}
setHidden(false);
ess.getVanishedPlayers().remove(getName());
}
}
public void toggleVanished()
{
final boolean set = !vanished;
this.setVanished(set);
}
public boolean checkSignThrottle()
{
if (isSignThrottled())
{
return true;
}
updateThrottle();
return false;
}
public boolean isSignThrottled()
{
final long minTime = lastThrottledAction + (1000 / ess.getSettings().getSignUsePerSecond());
return (System.currentTimeMillis() < minTime);
}
public void updateThrottle()
{
lastThrottledAction = System.currentTimeMillis();;
}
}
@@ -1,809 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.io.File;
import java.util.*;
import org.bukkit.Location;
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 EssentialsConf config;
protected UserData(Player base, IEssentials ess)
{
super(base);
this.ess = ess;
File folder = new File(ess.getDataFolder(), "userdata");
if (!folder.exists())
{
folder.mkdirs();
}
config = new EssentialsConf(new File(folder, Util.sanitizeFileName(base.getName()) + ".yml"));
reloadConfig();
}
@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();
ignoredPlayers = getIgnoredPlayers();
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();
}
private double money;
private double _getMoney()
{
double money = ess.getSettings().getStartingBalance();
if (config.hasProperty("money"))
{
money = config.getDouble("money", money);
}
if (Math.abs(money) > ess.getSettings().getMaxMoney())
{
money = money < 0 ? -ess.getSettings().getMaxMoney() : ess.getSettings().getMaxMoney();
}
return money;
}
public double getMoney()
{
return money;
}
public void setMoney(double value)
{
money = value;
if (Math.abs(money) > ess.getSettings().getMaxMoney())
{
money = money < 0 ? -ess.getSettings().getMaxMoney() : ess.getSettings().getMaxMoney();
}
config.setProperty("money", value);
config.save();
}
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>();
}
public Location getHome(String name) throws Exception
{
Location loc = config.getLocation("homes." + name, getServer());
if (loc == null)
{
try
{
loc = config.getLocation("homes." + getHomes().get(Integer.parseInt(name) - 1), getServer());
}
catch (IndexOutOfBoundsException e)
{
return null;
}
catch (NumberFormatException e)
{
return null;
}
}
return loc;
}
public Location getHome(final Location world)
{
try
{
Location loc;
for (String home : getHomes())
{
loc = config.getLocation("homes." + home, getServer());
if (world.getWorld() == loc.getWorld())
{
return loc;
}
}
loc = config.getLocation("homes." + getHomes().get(0), getServer());
return loc;
}
catch (Exception 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 = Util.sanitizeFileName(name);
homes.put(name, loc);
config.setProperty("homes." + name, loc);
config.save();
}
public void delHome(String name) throws Exception
{
String search = name;
if (!homes.containsKey(search))
{
search = Util.sanitizeFileName(name);
}
if (homes.containsKey(search))
{
homes.remove(name);
config.removeProperty("homes." + name);
config.save();
}
else
{
throw new Exception(_("invalidHome", name));
}
}
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", getServer());
}
catch (Exception 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 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();
}
public boolean toggleTeleportEnabled()
{
boolean ret = !isTeleportEnabled();
setTeleportEnabled(ret);
return ret;
}
public boolean toggleSocialSpy()
{
boolean ret = !isSocialSpyEnabled();
setSocialSpyEnabled(ret);
return ret;
}
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.isOnline())
{
return false;
}
return isIgnoredPlayer(user);
}
public boolean isIgnoredPlayer(IUser user)
{
return (ignoredPlayers.contains(user.getName().toLowerCase(Locale.ENGLISH)) && !user.isAuthorized("essentials.chat.ignoreexempt"));
}
public void setIgnoredPlayer(IUser user, boolean set)
{
if (set)
{
ignoredPlayers.add(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 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();
}
public String getBanReason()
{
return config.getString("ban.reason");
}
public void setBanReason(String reason)
{
config.setProperty("ban.reason", Util.sanitizeString(reason));
config.save();
}
public long getBanTimeout()
{
return config.getLong("ban.timeout", 0);
}
public void setBanTimeout(long time)
{
config.setProperty("ban.timeout", 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);
_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();
}
public boolean toggleAfk()
{
boolean ret = !isAfk();
setAfk(ret);
return ret;
}
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;
}
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, Object> kitTimestamps;
private Map<String, Object> _getKitTimestamps()
{
if (config.isConfigurationSection("timestamps.kits"))
{
return config.getConfigurationSection("timestamps.kits").getValues(false);
}
return new HashMap<String, Object>();
}
public Long getKitTimestamp(final String name)
{
final Number num = (Number)kitTimestamps.get(name.toLowerCase(Locale.ENGLISH));
return num == null ? null : num.longValue();
}
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 save()
{
config.save();
}
}
@@ -1,142 +0,0 @@
package com.earth2me.essentials;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.util.concurrent.UncheckedExecutionException;
import java.io.File;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.ExecutionException;
import org.bukkit.entity.Player;
public class UserMap extends CacheLoader<String, User> implements IConf
{
private final transient IEssentials ess;
private final transient Cache<String, User> users = CacheBuilder.newBuilder().softValues().build(this);
private final transient ConcurrentSkipListSet<String> keys = new ConcurrentSkipListSet<String>();
public UserMap(final IEssentials ess)
{
super();
this.ess = ess;
loadAllUsersAsync(ess);
}
private void loadAllUsersAsync(final IEssentials ess)
{
ess.scheduleAsyncDelayedTask(new Runnable()
{
@Override
public void run()
{
final File userdir = new File(ess.getDataFolder(), "userdata");
if (!userdir.exists())
{
return;
}
keys.clear();
users.invalidateAll();
for (String string : userdir.list())
{
if (!string.endsWith(".yml"))
{
continue;
}
final String name = string.substring(0, string.length() - 4);
keys.add(Util.sanitizeFileName(name));
}
}
});
}
public boolean userExists(final String name)
{
return keys.contains(Util.sanitizeFileName(name));
}
public User getUser(final String name)
{
try
{
return users.get(name);
}
catch (ExecutionException ex)
{
return null;
}
catch (UncheckedExecutionException ex)
{
return null;
}
}
@Override
public User load(final String name) throws Exception
{
String sanitizedName = Util.sanitizeFileName(name);
if (!sanitizedName.equals(name))
{
User user = getUser(sanitizedName);
if (user == null)
{
throw new Exception("User not found!");
}
else
{
return user;
}
}
for (Player player : ess.getServer().getOnlinePlayers())
{
if (player.getName().equalsIgnoreCase(name))
{
keys.add(sanitizedName);
return new User(player, ess);
}
}
final File userFile = getUserFile2(sanitizedName);
if (userFile.exists())
{
keys.add(sanitizedName);
return new User(new OfflinePlayer(name, ess), ess);
}
throw new Exception("User not found!");
}
@Override
public void reloadConfig()
{
loadAllUsersAsync(ess);
}
public void removeUser(final String name)
{
keys.remove(Util.sanitizeFileName(name));
users.invalidate(Util.sanitizeFileName(name));
users.invalidate(name);
}
public Set<String> getAllUniqueUsers()
{
return Collections.unmodifiableSet(keys);
}
public int getUniqueUsers()
{
return keys.size();
}
public File getUserFile(final String name)
{
return getUserFile2(Util.sanitizeFileName(name));
}
private File getUserFile2(final String name)
{
final File userFolder = new File(ess.getDataFolder(), "userdata");
return new File(userFolder, name + ".yml");
}
}
@@ -1,688 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.*;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.ItemStack;
public class Util
{
private Util()
{
}
private final static Logger logger = Logger.getLogger("Minecraft");
private final static Pattern INVALIDFILECHARS = Pattern.compile("[^a-z0-9]");
private final static Pattern INVALIDCHARS = Pattern.compile("[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFC]");
public static String sanitizeFileName(final String name)
{
final String newName = INVALIDFILECHARS.matcher(name.toLowerCase(Locale.ENGLISH)).replaceAll("_");
return newName;
}
public static String sanitizeString(final String string)
{
return INVALIDCHARS.matcher(string).replaceAll("");
}
public static String formatDateDiff(long date)
{
Calendar c = new GregorianCalendar();
c.setTimeInMillis(date);
Calendar now = new GregorianCalendar();
return Util.formatDateDiff(now, c);
}
public static String formatDateDiff(Calendar fromDate, Calendar toDate)
{
boolean future = false;
if (toDate.equals(fromDate))
{
return _("now");
}
if (toDate.after(fromDate))
{
future = true;
}
StringBuilder sb = new StringBuilder();
int[] types = new int[]
{
Calendar.YEAR,
Calendar.MONTH,
Calendar.DAY_OF_MONTH,
Calendar.HOUR_OF_DAY,
Calendar.MINUTE,
Calendar.SECOND
};
String[] names = new String[]
{
_("year"),
_("years"),
_("month"),
_("months"),
_("day"),
_("days"),
_("hour"),
_("hours"),
_("minute"),
_("minutes"),
_("second"),
_("seconds")
};
int accuracy = 0;
for (int i = 0; i < types.length; i++)
{
if (accuracy > 2)
{
break;
}
int diff = dateDiff(types[i], fromDate, toDate, future);
if (diff > 0)
{
accuracy++;
sb.append(" ").append(diff).append(" ").append(names[i * 2 + (diff > 1 ? 1 : 0)]);
}
}
if (sb.length() == 0)
{
return "now";
}
return sb.toString().trim();
}
private static int dateDiff(int type, Calendar fromDate, Calendar toDate, boolean future)
{
int diff = 0;
long savedDate = fromDate.getTimeInMillis();
while ((future && !fromDate.after(toDate)) || (!future && !fromDate.before(toDate)))
{
savedDate = fromDate.getTimeInMillis();
fromDate.add(type, future ? 1 : -1);
diff++;
}
diff--;
fromDate.setTimeInMillis(savedDate);
return diff;
}
public static long parseDateDiff(String time, boolean future) throws Exception
{
Pattern timePattern = Pattern.compile(
"(?:([0-9]+)\\s*y[a-z]*[,\\s]*)?"
+ "(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?"
+ "(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?"
+ "(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?"
+ "(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?"
+ "(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?"
+ "(?:([0-9]+)\\s*(?:s[a-z]*)?)?", Pattern.CASE_INSENSITIVE);
Matcher m = timePattern.matcher(time);
int years = 0;
int months = 0;
int weeks = 0;
int days = 0;
int hours = 0;
int minutes = 0;
int seconds = 0;
boolean found = false;
while (m.find())
{
if (m.group() == null || m.group().isEmpty())
{
continue;
}
for (int i = 0; i < m.groupCount(); i++)
{
if (m.group(i) != null && !m.group(i).isEmpty())
{
found = true;
break;
}
}
if (found)
{
if (m.group(1) != null && !m.group(1).isEmpty())
{
years = Integer.parseInt(m.group(1));
}
if (m.group(2) != null && !m.group(2).isEmpty())
{
months = Integer.parseInt(m.group(2));
}
if (m.group(3) != null && !m.group(3).isEmpty())
{
weeks = Integer.parseInt(m.group(3));
}
if (m.group(4) != null && !m.group(4).isEmpty())
{
days = Integer.parseInt(m.group(4));
}
if (m.group(5) != null && !m.group(5).isEmpty())
{
hours = Integer.parseInt(m.group(5));
}
if (m.group(6) != null && !m.group(6).isEmpty())
{
minutes = Integer.parseInt(m.group(6));
}
if (m.group(7) != null && !m.group(7).isEmpty())
{
seconds = Integer.parseInt(m.group(7));
}
break;
}
}
if (!found)
{
throw new Exception(_("illegalDate"));
}
Calendar c = new GregorianCalendar();
if (years > 0)
{
c.add(Calendar.YEAR, years * (future ? 1 : -1));
}
if (months > 0)
{
c.add(Calendar.MONTH, months * (future ? 1 : -1));
}
if (weeks > 0)
{
c.add(Calendar.WEEK_OF_YEAR, weeks * (future ? 1 : -1));
}
if (days > 0)
{
c.add(Calendar.DAY_OF_MONTH, days * (future ? 1 : -1));
}
if (hours > 0)
{
c.add(Calendar.HOUR_OF_DAY, hours * (future ? 1 : -1));
}
if (minutes > 0)
{
c.add(Calendar.MINUTE, minutes * (future ? 1 : -1));
}
if (seconds > 0)
{
c.add(Calendar.SECOND, seconds * (future ? 1 : -1));
}
Calendar max = new GregorianCalendar();
max.add(Calendar.YEAR, 10);
if (c.after(max))
{
return max.getTimeInMillis();
}
return c.getTimeInMillis();
}
// The player can stand inside these materials
private static final Set<Integer> AIR_MATERIALS = new HashSet<Integer>();
private static final HashSet<Byte> AIR_MATERIALS_TARGET = new HashSet<Byte>();
static
{
AIR_MATERIALS.add(Material.AIR.getId());
AIR_MATERIALS.add(Material.SAPLING.getId());
AIR_MATERIALS.add(Material.POWERED_RAIL.getId());
AIR_MATERIALS.add(Material.DETECTOR_RAIL.getId());
AIR_MATERIALS.add(Material.LONG_GRASS.getId());
AIR_MATERIALS.add(Material.DEAD_BUSH.getId());
AIR_MATERIALS.add(Material.YELLOW_FLOWER.getId());
AIR_MATERIALS.add(Material.RED_ROSE.getId());
AIR_MATERIALS.add(Material.BROWN_MUSHROOM.getId());
AIR_MATERIALS.add(Material.RED_MUSHROOM.getId());
AIR_MATERIALS.add(Material.TORCH.getId());
AIR_MATERIALS.add(Material.REDSTONE_WIRE.getId());
AIR_MATERIALS.add(Material.SEEDS.getId());
AIR_MATERIALS.add(Material.SIGN_POST.getId());
AIR_MATERIALS.add(Material.WOODEN_DOOR.getId());
AIR_MATERIALS.add(Material.LADDER.getId());
AIR_MATERIALS.add(Material.RAILS.getId());
AIR_MATERIALS.add(Material.WALL_SIGN.getId());
AIR_MATERIALS.add(Material.LEVER.getId());
AIR_MATERIALS.add(Material.STONE_PLATE.getId());
AIR_MATERIALS.add(Material.IRON_DOOR_BLOCK.getId());
AIR_MATERIALS.add(Material.WOOD_PLATE.getId());
AIR_MATERIALS.add(Material.REDSTONE_TORCH_OFF.getId());
AIR_MATERIALS.add(Material.REDSTONE_TORCH_ON.getId());
AIR_MATERIALS.add(Material.STONE_BUTTON.getId());
AIR_MATERIALS.add(Material.SNOW.getId());
AIR_MATERIALS.add(Material.SUGAR_CANE_BLOCK.getId());
AIR_MATERIALS.add(Material.DIODE_BLOCK_OFF.getId());
AIR_MATERIALS.add(Material.DIODE_BLOCK_ON.getId());
AIR_MATERIALS.add(Material.TRAP_DOOR.getId());
AIR_MATERIALS.add(Material.PUMPKIN_STEM.getId());
AIR_MATERIALS.add(Material.MELON_STEM.getId());
AIR_MATERIALS.add(Material.VINE.getId());
AIR_MATERIALS.add(Material.FENCE_GATE.getId());
AIR_MATERIALS.add(Material.WATER_LILY.getId());
AIR_MATERIALS.add(Material.NETHER_FENCE.getId());
AIR_MATERIALS.add(Material.NETHER_WARTS.getId());
for (Integer integer : AIR_MATERIALS)
{
AIR_MATERIALS_TARGET.add(integer.byteValue());
}
AIR_MATERIALS_TARGET.add((byte)Material.WATER.getId());
AIR_MATERIALS_TARGET.add((byte)Material.STATIONARY_WATER.getId());
}
public static Location getTarget(final LivingEntity entity) throws Exception
{
final Block block = entity.getTargetBlock(AIR_MATERIALS_TARGET, 300);
if (block == null)
{
throw new Exception("Not targeting a block");
}
return block.getLocation();
}
public final static int RADIUS = 3;
public final static Vector3D[] VOLUME;
public static class Vector3D
{
public Vector3D(int x, int y, int z)
{
this.x = x;
this.y = y;
this.z = z;
}
public int x;
public int y;
public int z;
}
static
{
List<Vector3D> pos = new ArrayList<Vector3D>();
for (int x = -RADIUS; x <= RADIUS; x++)
{
for (int y = -RADIUS; y <= RADIUS; y++)
{
for (int z = -RADIUS; z <= RADIUS; z++)
{
pos.add(new Vector3D(x, y, z));
}
}
}
Collections.sort(pos, new Comparator<Vector3D>()
{
@Override
public int compare(Vector3D a, Vector3D b)
{
return (a.x * a.x + a.y * a.y + a.z * a.z) - (b.x * b.x + b.y * b.y + b.z * b.z);
}
});
VOLUME = pos.toArray(new Vector3D[0]);
}
public static Location getSafeDestination(final Location loc) throws Exception
{
if (loc == null || loc.getWorld() == null)
{
throw new Exception(_("destinationNotSet"));
}
final World world = loc.getWorld();
int x = loc.getBlockX();
int y = (int)Math.round(loc.getY());
int z = loc.getBlockZ();
final int origX = x;
final int origY = y;
final int origZ = z;
while (isBlockAboveAir(world, x, y, z))
{
y -= 1;
if (y < 0)
{
y = origY;
break;
}
}
int i = 0;
while (isBlockUnsafe(world, x, y, z))
{
i++;
if (i >= VOLUME.length)
{
x = origX;
y = origY + RADIUS;
z = origZ;
break;
}
x = origX + VOLUME[i].x;
y = origY + VOLUME[i].y;
z = origZ + VOLUME[i].z;
}
while (isBlockUnsafe(world, x, y, z))
{
y += 1;
if (y >= world.getMaxHeight())
{
x += 1;
break;
}
}
while (isBlockUnsafe(world, x, y, z))
{
y -= 1;
if (y <= 1)
{
x += 1;
y = world.getHighestBlockYAt(x, z);
if (x - 48 > loc.getBlockX())
{
throw new Exception(_("holeInFloor"));
}
}
}
return new Location(world, x + 0.5D, y, z + 0.5D, loc.getYaw(), loc.getPitch());
}
private static boolean isBlockAboveAir(final World world, final int x, final int y, final int z)
{
return AIR_MATERIALS.contains(world.getBlockAt(x, y - 1, z).getType().getId());
}
public static boolean isBlockUnsafe(final World world, final int x, final int y, final int z)
{
final Block below = world.getBlockAt(x, y - 1, z);
if (below.getType() == Material.LAVA || below.getType() == Material.STATIONARY_LAVA)
{
return true;
}
if (below.getType() == Material.FIRE)
{
return true;
}
if (below.getType() == Material.BED_BLOCK)
{
return true;
}
if ((!AIR_MATERIALS.contains(world.getBlockAt(x, y, z).getType().getId()))
|| (!AIR_MATERIALS.contains(world.getBlockAt(x, y + 1, z).getType().getId())))
{
return true;
}
return isBlockAboveAir(world, x, y, z);
}
public static ItemStack convertBlockToItem(final Block block)
{
final ItemStack is = new ItemStack(block.getType(), 1, (short)0, block.getData());
switch (is.getType())
{
case WOODEN_DOOR:
is.setType(Material.WOOD_DOOR);
is.setDurability((short)0);
break;
case IRON_DOOR_BLOCK:
is.setType(Material.IRON_DOOR);
is.setDurability((short)0);
break;
case SIGN_POST:
case WALL_SIGN:
is.setType(Material.SIGN);
is.setDurability((short)0);
break;
case CROPS:
is.setType(Material.SEEDS);
is.setDurability((short)0);
break;
case CAKE_BLOCK:
is.setType(Material.CAKE);
is.setDurability((short)0);
break;
case BED_BLOCK:
is.setType(Material.BED);
is.setDurability((short)0);
break;
case REDSTONE_WIRE:
is.setType(Material.REDSTONE);
is.setDurability((short)0);
break;
case REDSTONE_TORCH_OFF:
case REDSTONE_TORCH_ON:
is.setType(Material.REDSTONE_TORCH_ON);
is.setDurability((short)0);
break;
case DIODE_BLOCK_OFF:
case DIODE_BLOCK_ON:
is.setType(Material.DIODE);
is.setDurability((short)0);
break;
case DOUBLE_STEP:
is.setType(Material.STEP);
break;
case TORCH:
case RAILS:
case LADDER:
case WOOD_STAIRS:
case COBBLESTONE_STAIRS:
case LEVER:
case STONE_BUTTON:
case FURNACE:
case DISPENSER:
case PUMPKIN:
case JACK_O_LANTERN:
case WOOD_PLATE:
case STONE_PLATE:
case PISTON_STICKY_BASE:
case PISTON_BASE:
case IRON_FENCE:
case THIN_GLASS:
case TRAP_DOOR:
case FENCE:
case FENCE_GATE:
case NETHER_FENCE:
is.setDurability((short)0);
break;
case FIRE:
return null;
case PUMPKIN_STEM:
is.setType(Material.PUMPKIN_SEEDS);
break;
case MELON_STEM:
is.setType(Material.MELON_SEEDS);
break;
}
return is;
}
private static DecimalFormat dFormat = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US));
public static String formatAsCurrency(final double value)
{
String str = dFormat.format(value);
if (str.endsWith(".00"))
{
str = str.substring(0, str.length() - 3);
}
return str;
}
public static String displayCurrency(final double value, final IEssentials ess)
{
return _("currency", ess.getSettings().getCurrencySymbol(), formatAsCurrency(value));
}
public static String shortCurrency(final double value, final IEssentials ess)
{
return ess.getSettings().getCurrencySymbol() + formatAsCurrency(value);
}
public static double roundDouble(final double d)
{
return Math.round(d * 100.0) / 100.0;
}
public static boolean isInt(final String sInt)
{
try
{
Integer.parseInt(sInt);
}
catch (NumberFormatException e)
{
return false;
}
return true;
}
public static String joinList(Object... list)
{
return joinList(", ", list);
}
public static String joinList(String seperator, Object... list)
{
StringBuilder buf = new StringBuilder();
for (Object each : list)
{
if (buf.length() > 0)
{
buf.append(seperator);
}
if (each instanceof Collection)
{
buf.append(joinList(seperator, ((Collection)each).toArray()));
}
else
{
try
{
buf.append(each.toString());
}
catch (Exception e)
{
buf.append(each.toString());
}
}
}
return buf.toString();
}
public static String lastCode(final String input)
{
int pos = input.lastIndexOf("§");
if (pos == -1 || (pos + 1) == input.length())
{
return "";
}
return input.substring(pos, pos + 2);
}
private static transient final Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-z]{2,3}(?:/\\S+)?)");
private static transient final Pattern VANILLA_PATTERN = Pattern.compile("\u00A7+[0-9A-FK-ORa-fk-or]");
private static transient final Pattern REPLACE_PATTERN = Pattern.compile("&([0-9a-fk-or])");
private static transient final Pattern VANILLA_COLOR_PATTERN = Pattern.compile("\u00A7+[0-9A-Fa-f]");
private static transient final Pattern VANILLA_MAGIC_PATTERN = Pattern.compile("\u00A7+[Kk]");
private static transient final Pattern VANILLA_FORMAT_PATTERN = Pattern.compile("\u00A7+[L-ORl-or]");
private static transient final Pattern REPLACE_COLOR_PATTERN = Pattern.compile("&([0-9a-f])");
private static transient final Pattern REPLACE_MAGIC_PATTERN = Pattern.compile("&(k)");
private static transient final Pattern REPLACE_FORMAT_PATTERN = Pattern.compile("&([l-or])");
public static String stripFormat(final String input)
{
if (input == null)
{
return null;
}
return VANILLA_PATTERN.matcher(input).replaceAll("");
}
public static String replaceFormat(final String input)
{
if (input == null)
{
return null;
}
return REPLACE_PATTERN.matcher(input).replaceAll("\u00a7$1");
}
public static String blockURL(final String input)
{
if (input == null)
{
return null;
}
String text = URL_PATTERN.matcher(input).replaceAll("$1 $2");
while (URL_PATTERN.matcher(text).find())
{
text = URL_PATTERN.matcher(text).replaceAll("$1 $2");
}
return text;
}
public static String formatString(final IUser user, final String permBase, final String input)
{
if (input == null)
{
return null;
}
String message;
if (user.isAuthorized(permBase + ".color"))
{
message = Util.replaceColor(input, REPLACE_COLOR_PATTERN);
}
else
{
message = Util.stripColor(input, VANILLA_COLOR_PATTERN);
}
if (user.isAuthorized(permBase + ".magic"))
{
message = Util.replaceColor(message, REPLACE_MAGIC_PATTERN);
}
else
{
message = Util.stripColor(message, VANILLA_MAGIC_PATTERN);
}
if (user.isAuthorized(permBase + ".format"))
{
message = Util.replaceColor(message, REPLACE_FORMAT_PATTERN);
}
else
{
message = Util.stripColor(message, VANILLA_FORMAT_PATTERN);
}
return message;
}
public static String formatMessage(final IUser user, final String permBase, final String input)
{
if (input == null)
{
return null;
}
String message = formatString(user, permBase, input);
if (!user.isAuthorized(permBase + ".url"))
{
message = Util.blockURL(message);
}
return message;
}
private static String stripColor(final String input, final Pattern pattern)
{
return pattern.matcher(input).replaceAll("");
}
private static String replaceColor(final String input, final Pattern pattern)
{
return pattern.matcher(input).replaceAll("\u00a7$1");
}
}
@@ -1,152 +0,0 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.commands.WarpNotFoundException;
import java.io.File;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Server;
public class Warps implements IConf
{
private static final Logger logger = Logger.getLogger("Minecraft");
private final Map<StringIgnoreCase, EssentialsConf> warpPoints = new HashMap<StringIgnoreCase, EssentialsConf>();
private final File warpsFolder;
private final Server server;
public Warps(Server server, File dataFolder)
{
this.server = server;
warpsFolder = new File(dataFolder, "warps");
if (!warpsFolder.exists())
{
warpsFolder.mkdirs();
}
reloadConfig();
}
public boolean isEmpty()
{
return warpPoints.isEmpty();
}
public Collection<String> getWarpNames()
{
final List<String> keys = new ArrayList<String>();
for (StringIgnoreCase stringIgnoreCase : warpPoints.keySet())
{
keys.add(stringIgnoreCase.getString());
}
Collections.sort(keys, String.CASE_INSENSITIVE_ORDER);
return keys;
}
public Location getWarp(String warp) throws Exception
{
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(warp));
if (conf == null)
{
throw new WarpNotFoundException();
}
return conf.getLocation(null, server);
}
public void setWarp(String name, Location loc) throws Exception
{
String filename = Util.sanitizeFileName(name);
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name));
if (conf == null)
{
File confFile = new File(warpsFolder, filename + ".yml");
if (confFile.exists())
{
throw new Exception(_("similarWarpExist"));
}
conf = new EssentialsConf(confFile);
warpPoints.put(new StringIgnoreCase(name), conf);
}
conf.setProperty(null, loc);
conf.setProperty("name", name);
conf.save();
}
public void delWarp(String name) throws Exception
{
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name));
if (conf == null)
{
throw new Exception(_("warpNotExist"));
}
if (!conf.getFile().delete())
{
throw new Exception(_("warpDeleteError"));
}
warpPoints.remove(new StringIgnoreCase(name));
}
@Override
public final void reloadConfig()
{
warpPoints.clear();
File[] listOfFiles = warpsFolder.listFiles();
if (listOfFiles.length >= 1)
{
for (int i = 0; i < listOfFiles.length; i++)
{
String filename = listOfFiles[i].getName();
if (listOfFiles[i].isFile() && filename.endsWith(".yml"))
{
try
{
EssentialsConf conf = new EssentialsConf(listOfFiles[i]);
conf.load();
String name = conf.getString("name");
if (name != null)
{
warpPoints.put(new StringIgnoreCase(name), conf);
}
}
catch (Exception ex)
{
logger.log(Level.WARNING, _("loadWarpError", filename), ex);
}
}
}
}
}
private static class StringIgnoreCase
{
private final String string;
public StringIgnoreCase(String string)
{
this.string = string;
}
@Override
public int hashCode()
{
return getString().toLowerCase(Locale.ENGLISH).hashCode();
}
@Override
public boolean equals(Object o)
{
if (o instanceof StringIgnoreCase)
{
return getString().equalsIgnoreCase(((StringIgnoreCase)o).getString());
}
return false;
}
public String getString()
{
return string;
}
}
}
@@ -1,61 +0,0 @@
package com.earth2me.essentials;
import java.io.File;
import java.util.Locale;
import java.util.logging.Logger;
import org.bukkit.inventory.ItemStack;
public class Worth implements IConf
{
private static final Logger logger = Logger.getLogger("Minecraft");
private final EssentialsConf config;
public Worth(File dataFolder)
{
config = new EssentialsConf(new File(dataFolder, "worth.yml"));
config.setTemplateName("/worth.yml");
config.load();
}
public double getPrice(ItemStack itemStack)
{
String itemname = itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
double result;
result = config.getDouble("worth." + itemname + "." + itemStack.getDurability(), Double.NaN);
if (Double.isNaN(result))
{
result = config.getDouble("worth." + itemname + ".0", Double.NaN);
}
if (Double.isNaN(result))
{
result = config.getDouble("worth." + itemname, Double.NaN);
}
if (Double.isNaN(result))
{
result = config.getDouble("worth-" + itemStack.getTypeId(), Double.NaN);
}
return result;
}
public void setPrice(ItemStack itemStack, double price)
{
if (itemStack.getType().getData() == null)
{
config.setProperty("worth." + itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""), price);
}
else
{
// Bukkit-bug: getDurability still contains the correct value, while getData().getData() is 0.
config.setProperty("worth." + itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "") + "." + itemStack.getDurability(), price);
}
config.removeProperty("worth-" + itemStack.getTypeId());
config.save();
}
@Override
public void reloadConfig()
{
config.load();
}
}
@@ -1,311 +0,0 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.EssentialsConf;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.io.File;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.entity.Player;
/**
* Instead of using this api directly, we recommend to use the register plugin:
* http://bit.ly/RegisterMethod
*/
public final class Economy
{
private Economy()
{
}
private static final Logger logger = Logger.getLogger("Minecraft");
private static IEssentials ess;
private static final String noCallBeforeLoad = "Essentials API is called before Essentials is loaded.";
/**
* @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");
if (!folder.exists())
{
folder.mkdirs();
}
EssentialsConf npcConfig = new EssentialsConf(new File(folder, Util.sanitizeFileName(name) + ".yml"));
npcConfig.load();
npcConfig.setProperty("npc", true);
npcConfig.setProperty("money", ess.getSettings().getStartingBalance());
npcConfig.save();
}
private static void deleteNPC(String name)
{
File folder = new File(ess.getDataFolder(), "userdata");
if (!folder.exists())
{
folder.mkdirs();
}
File config = new File(folder, Util.sanitizeFileName(name) + ".yml");
EssentialsConf npcConfig = new EssentialsConf(config);
npcConfig.load();
if (npcConfig.hasProperty("npc") && npcConfig.getBoolean("npc", false))
{
if (!config.delete())
{
logger.log(Level.WARNING, _("deleteFileError", config));
}
ess.getUserMap().removeUser(name);
}
}
private static User getUserByName(String name)
{
if (ess == null)
{
throw new RuntimeException(noCallBeforeLoad);
}
User user;
Player player = ess.getServer().getPlayer(name);
if (player != null)
{
user = ess.getUser(player);
}
else
{
user = ess.getOfflineUser(name);
}
return user;
}
/**
* Returns the balance of a user
* @param name Name of the user
* @return balance
* @throws UserDoesNotExistException
*/
public static double getMoney(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
*/
public static void setMoney(String name, double balance) throws UserDoesNotExistException, NoLoanPermittedException
{
User user = getUserByName(name);
if (user == null)
{
throw new UserDoesNotExistException(name);
}
if (balance < ess.getSettings().getMinMoney())
{
throw new NoLoanPermittedException();
}
if (balance < 0.0 && !user.isAuthorized("essentials.eco.loan"))
{
throw new NoLoanPermittedException();
}
user.setMoney(balance);
}
/**
* 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
*/
public static void add(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException
{
double result = getMoney(name) + amount;
setMoney(name, result);
}
/**
* 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
*/
public static void subtract(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException
{
double result = getMoney(name) - amount;
setMoney(name, result);
}
/**
* 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
*/
public static void divide(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException
{
double result = getMoney(name) / value;
setMoney(name, result);
}
/**
* 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
*/
public static void multiply(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException
{
double result = getMoney(name) * value;
setMoney(name, result);
}
/**
* 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());
}
/**
* @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
*/
public static boolean hasEnough(String name, double amount) throws UserDoesNotExistException
{
return amount <= getMoney(name);
}
/**
* @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
*/
public static boolean hasMore(String name, double amount) throws UserDoesNotExistException
{
return amount < getMoney(name);
}
/**
* @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
*/
public static boolean hasLess(String name, double amount) throws UserDoesNotExistException
{
return amount > getMoney(name);
}
/**
* 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 getMoney(name) < 0.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
*/
public static String format(double amount)
{
if (ess == null)
{
throw new RuntimeException(noCallBeforeLoad);
}
return Util.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);
}
}
@@ -1,10 +0,0 @@
package com.earth2me.essentials.api;
import java.util.Map;
import org.bukkit.command.PluginCommand;
public interface IAlternativeCommandsHandler
{
Map<String, String> disabledCommands();
}
@@ -1,51 +0,0 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.perm.IPermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
public interface IEssentials extends Plugin, IReload
{
void addReloadListener(IReload listener);
IUser getUser(Object base);
int broadcastMessage(IUser sender, String message);
II18n getI18n();
ISettings getSettings();
IJails getJail();
IWarps getWarps();
IWorth getWorth();
IItemDb getItemDb();
IUserMap getUserMap();
IEssentialsEconomy getEconomy();
World getWorld(String name);
Methods getPaymentMethod();
int scheduleAsyncDelayedTask(Runnable run);
int scheduleSyncDelayedTask(Runnable run);
int scheduleSyncDelayedTask(Runnable run, long delay);
int scheduleSyncRepeatingTask(Runnable run, long delay, long period);
IPermissionsHandler getPermissionsHandler();
IAlternativeCommandsHandler getAlternativeCommandsHandler();
void showCommandError(CommandSender sender, String commandLabel, Throwable exception);
}
@@ -1,37 +0,0 @@
package com.earth2me.essentials.api;
public interface IEssentialsEconomy
{
double getMoney(String name) throws UserDoesNotExistException;
void setMoney(String name, double balance) throws UserDoesNotExistException, NoLoanPermittedException;
void add(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException;
void subtract(String name, double amount) throws UserDoesNotExistException, NoLoanPermittedException;
void divide(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException;
void multiply(String name, double value) throws UserDoesNotExistException, NoLoanPermittedException;
void resetBalance(String name) throws UserDoesNotExistException, NoLoanPermittedException;
boolean hasEnough(String name, double amount) throws UserDoesNotExistException;
boolean hasMore(String name, double amount) throws UserDoesNotExistException;
boolean hasLess(String name, double amount) throws UserDoesNotExistException;
boolean isNegative(String name) throws UserDoesNotExistException;
String format(double amount);
boolean playerExists(String name);
boolean isNPC(String name) throws UserDoesNotExistException;
boolean createNPC(String name);
void removeNPC(String name) throws UserDoesNotExistException;
}
@@ -1,9 +0,0 @@
package com.earth2me.essentials.api;
import java.util.Locale;
public interface II18n
{
Locale getCurrentLocale();
}
@@ -1,11 +0,0 @@
package com.earth2me.essentials.api;
import org.bukkit.inventory.ItemStack;
public interface IItemDb
{
ItemStack get(final String name, final int quantity) throws Exception;
ItemStack get(final String name) throws Exception;
}
@@ -1,20 +0,0 @@
package com.earth2me.essentials.api;
import java.util.Collection;
import org.bukkit.Location;
public interface IJails extends IReload
{
Location getJail(String jailName) throws Exception;
Collection<String> getList() throws Exception;
int getCount();
void removeJail(String jail) throws Exception;
void sendToJail(com.earth2me.essentials.IUser user, String jail) throws Exception;
void setJail(String jailName, Location loc) throws Exception;
}
@@ -1,7 +0,0 @@
package com.earth2me.essentials.api;
public interface IReload
{
void onReload();
}
@@ -1,10 +0,0 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.settings.Settings;
import com.earth2me.essentials.storage.IStorageObjectHolder;
public interface ISettings extends IStorageObjectHolder<Settings>
{
}
@@ -1,10 +0,0 @@
package com.earth2me.essentials.api;
import org.bukkit.Location;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public interface ITeleport
{
void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception;
}
@@ -1,43 +0,0 @@
package com.earth2me.essentials.api;
import com.earth2me.essentials.commands.IEssentialsCommand;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public interface IUser extends Player, IReload
{
long getLastTeleportTimestamp();
boolean isAuthorized(String node);
boolean isAuthorized(IEssentialsCommand cmd);
boolean isAuthorized(IEssentialsCommand cmd, String permissionPrefix);
void setLastTeleportTimestamp(long time);
Location getLastLocation();
Player getBase();
double getMoney();
void takeMoney(double value);
void giveMoney(double value);
String getGroup();
void setLastLocation();
Location getHome(String name) throws Exception;
Location getHome(Location loc) throws Exception;
boolean isHidden();
ITeleport getTeleport();
void setJail(String jail);
}
@@ -1,20 +0,0 @@
package com.earth2me.essentials.api;
import java.io.File;
import java.util.Set;
public interface IUserMap
{
boolean userExists(final String name);
IUser getUser(final String name);
void removeUser(final String name);
Set<String> getAllUniqueUsers();
int getUniqueUsers();
File getUserFile(final String name);
}
@@ -1,16 +0,0 @@
package com.earth2me.essentials.api;
import java.util.Collection;
import org.bukkit.Location;
public interface IWarps extends IReload
{
Location getWarp(String warp) throws Exception;
Collection<String> getWarps();
void removeWarp(String name) throws Exception;
void setWarp(String name, Location loc) throws Exception;
}
@@ -1,11 +0,0 @@
package com.earth2me.essentials.api;
import org.bukkit.inventory.ItemStack;
public interface IWorth extends IReload
{
double getPrice(ItemStack itemStack);
void setPrice(ItemStack itemStack, double price);
}
@@ -1,12 +0,0 @@
package com.earth2me.essentials.api;
import static com.earth2me.essentials.I18n._;
public class NoLoanPermittedException extends Exception
{
public NoLoanPermittedException()
{
super(_("negativeBalanceError"));
}
}
@@ -1,12 +0,0 @@
package com.earth2me.essentials.api;
import static com.earth2me.essentials.I18n._;
public class UserDoesNotExistException extends Exception
{
public UserDoesNotExistException(String name)
{
super(_("userDoesNotExist", name));
}
}
@@ -1,53 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commandafk extends EssentialsCommand
{
public Commandafk()
{
super("afk");
}
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.afk.others"))
{
User afkUser = ess.getUser(ess.getServer().matchPlayer(args[0]));
if (afkUser != null)
{
toggleAfk(afkUser);
}
}
else
{
toggleAfk(user);
}
}
private void toggleAfk(User user)
{
user.setDisplayNick();
if (!user.toggleAfk())
{
//user.sendMessage(_("markedAsNotAway"));
if (!user.isHidden())
{
ess.broadcastMessage(user, _("userIsNotAway", user.getDisplayName()));
}
user.updateActivity(false);
}
else
{
//user.sendMessage(_("markedAsAway"));
if (!user.isHidden())
{
ess.broadcastMessage(user, _("userIsAway", user.getDisplayName()));
}
}
}
}
@@ -1,29 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.entity.TNTPrimed;
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 = Util.getTarget(user);
loc.getWorld().spawn(loc, TNTPrimed.class);
}
}
@@ -1,30 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import org.bukkit.Server;
public class Commandback extends EssentialsCommand
{
public Commandback()
{
super("back");
}
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (user.getWorld() != user.getLastLocation().getWorld() && ess.getSettings().isWorldTeleportPermissions()
&& !user.isAuthorized("essentials.world." + user.getLastLocation().getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.world." + user.getLastLocation().getWorld().getName()));
}
final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.sendMessage(_("backUsageMsg"));
user.getTeleport().back(charge);
throw new NoChargeException();
}
}
@@ -1,32 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Backup;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandbackup extends EssentialsCommand
{
public Commandbackup()
{
super("backup");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
final Backup backup = ess.getBackup();
if (backup == null)
{
throw new Exception(_("backupDisabled"));
}
final String command = ess.getSettings().getBackupCommand();
if (command == null || "".equals(command) || "save-all".equalsIgnoreCase(command))
{
throw new Exception(_("backupDisabled"));
}
backup.run();
sender.sendMessage(_("backupStarted"));
}
}
@@ -1,37 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandbalance extends EssentialsCommand
{
public Commandbalance()
{
super("balance");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
sender.sendMessage(_("balance", Util.displayCurrency(getPlayer(server, args, 0, true).getMoney(), ess)));
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
final double bal = (args.length < 1
|| !(user.isAuthorized("essentials.balance.others")
|| user.isAuthorized("essentials.balance.other"))
? user
: getPlayer(server, args, 0, true)).getMoney();
user.sendMessage(_("balance", Util.displayCurrency(bal, ess)));
}
}
@@ -1,184 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Util;
import com.earth2me.essentials.textreader.ArrayListInput;
import com.earth2me.essentials.textreader.TextPager;
import java.text.DateFormat;
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
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 ArrayListInput cache = new ArrayListInput();
private static long cacheage = 0;
private static ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
@Override
protected void run(final Server server, final CommandSender 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.isOp())
{
force = true;
}
}
}
if (!force && lock.readLock().tryLock())
{
try
{
if (cacheage > System.currentTimeMillis() - CACHETIME)
{
outputCache(sender, page);
return;
}
if (ess.getUserMap().getUniqueUsers() > MINUSERS)
{
sender.sendMessage(_("orderBalances", ess.getUserMap().getUniqueUsers()));
}
}
finally
{
lock.readLock().unlock();
}
ess.scheduleAsyncDelayedTask(new Viewer(sender, page, force));
}
else
{
if (ess.getUserMap().getUniqueUsers() > MINUSERS)
{
sender.sendMessage(_("orderBalances", ess.getUserMap().getUniqueUsers()));
}
ess.scheduleAsyncDelayedTask(new Viewer(sender, page, force));
}
}
private static void outputCache(final CommandSender sender, int page)
{
final Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(cacheage);
final DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
sender.sendMessage(_("balanceTop", format.format(cal.getTime())));
new TextPager(cache).showPage(Integer.toString(page), "", "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, Double> balances = new HashMap<String, Double>();
double totalMoney = 0d;
for (String u : ess.getUserMap().getAllUniqueUsers())
{
final User user = ess.getUserMap().getUser(u);
if (user != null)
{
final double userMoney = user.getMoney();
user.updateMoneyCache(userMoney);
totalMoney += userMoney;
balances.put(user.getDisplayName(), userMoney);
}
}
final List<Map.Entry<String, Double>> sortedEntries = new ArrayList<Map.Entry<String, Double>>(balances.entrySet());
Collections.sort(sortedEntries, new Comparator<Map.Entry<String, Double>>()
{
@Override
public int compare(final Entry<String, Double> entry1, final Entry<String, Double> entry2)
{
return -entry1.getValue().compareTo(entry2.getValue());
}
});
cache.getLines().add(_("serverTotal", Util.displayCurrency(totalMoney, ess)));
int pos = 1;
for (Map.Entry<String, Double> entry : sortedEntries)
{
cache.getLines().add(pos + ". " + entry.getKey() + ", " + Util.displayCurrency(entry.getValue(), ess));
pos++;
}
cacheage = System.currentTimeMillis();
}
}
finally
{
lock.writeLock().unlock();
}
ess.scheduleAsyncDelayedTask(viewer);
}
}
private class Viewer implements Runnable
{
private final transient CommandSender sender;
private final transient int page;
private final transient boolean force;
public Viewer(final CommandSender sender, final int page, final boolean force)
{
this.sender = sender;
this.page = page;
this.force = force;
}
@Override
public void run()
{
lock.readLock().lock();
try
{
if (!force && cacheage > System.currentTimeMillis() - CACHETIME)
{
outputCache(sender, page);
return;
}
}
finally
{
lock.readLock().unlock();
}
ess.scheduleAsyncDelayedTask(new Calculator(new Viewer(sender, page, force), force));
}
}
}
@@ -1,68 +0,0 @@
package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandban extends EssentialsCommand
{
public Commandban()
{
super("ban");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
final User user = getPlayer(server, args, 0, true);
if (!user.isOnline())
{
if (sender instanceof Player
&& !ess.getUser(sender).isAuthorized("essentials.ban.offline"))
{
sender.sendMessage(_("banExempt"));
return;
}
}
else
{
if (user.isAuthorized("essentials.ban.exempt"))
{
sender.sendMessage(_("banExempt"));
return;
}
}
final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
String banReason;
if (args.length > 1)
{
banReason = _("banFormat", getFinalArg(args, 1), senderName);
}
else
{
banReason = _("banFormat", _("defaultBanReason"), senderName);
}
user.setBanReason(banReason);
user.setBanned(true);
user.kickPlayer(banReason);
for (Player onlinePlayer : server.getOnlinePlayers())
{
final User player = ess.getUser(onlinePlayer);
if (player.isAuthorized("essentials.ban.notify"))
{
onlinePlayer.sendMessage(_("playerBanned", senderName, user.getName(), banReason));
}
}
}
}
@@ -1,42 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandbanip extends EssentialsCommand
{
public Commandbanip()
{
super("banip");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
final User player = ess.getUser(args[0]);
if (player == null)
{
ess.getServer().banIP(args[0]);
sender.sendMessage(_("banIpAddress"));
}
else
{
final String ipAddress = player.getLastLoginAddress();
if (ipAddress.length() == 0)
{
throw new Exception(_("playerNotFound"));
}
ess.getServer().banIP(player.getLastLoginAddress());
sender.sendMessage(_("banIpAddress"));
}
}
}
@@ -1,51 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.TreeType;
public class Commandbigtree extends EssentialsCommand
{
public Commandbigtree()
{
super("bigtree");
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
TreeType tree;
if (args.length > 0 && args[0].equalsIgnoreCase("redwood"))
{
tree = TreeType.TALL_REDWOOD;
}
else if (args.length > 0 && args[0].equalsIgnoreCase("tree"))
{
tree = TreeType.BIG_TREE;
}
else if (args.length > 0 && args[0].equalsIgnoreCase("jungle"))
{
tree = TreeType.JUNGLE;
}
else
{
throw new NotEnoughArgumentsException();
}
final Location loc = Util.getTarget(user);
final Location safeLocation = Util.getSafeDestination(loc);
final boolean success = user.getWorld().generateTree(safeLocation, tree);
if (success)
{
user.sendMessage(_("bigTreeSuccess"));
}
else
{
throw new Exception(_("bigTreeFailure"));
}
}
}
@@ -1,51 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.inventory.ItemStack;
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.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(_("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);
}
}
}
@@ -1,26 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commandbroadcast extends EssentialsCommand
{
public Commandbroadcast()
{
super("broadcast");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
ess.broadcastMessage(null, _("broadcast", Util.replaceFormat(getFinalArg(args, 0))));
}
}
@@ -1,30 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandburn extends EssentialsCommand
{
public Commandburn()
{
super("burn");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
for (Player p : server.matchPlayer(args[0]))
{
p.setFireTicks(Integer.parseInt(args[1]) * 20);
sender.sendMessage(_("burnMsg", p.getDisplayName(), Integer.parseInt(args[1])));
}
}
}
@@ -1,98 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.List;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Commandclearinventory extends EssentialsCommand
{
public Commandclearinventory()
{
super("clearinventory");
}
//TODO: Cleanup
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.clearinventory.others"))
{
//TODO: Fix fringe user match case.
if (args[0].length() >= 3)
{
List<Player> online = server.matchPlayer(args[0]);
if (!online.isEmpty())
{
for (Player p : online)
{
p.getInventory().clear();
user.sendMessage(_("inventoryClearedOthers", p.getDisplayName()));
}
return;
}
throw new Exception(_("playerNotFound"));
}
else
{
Player p = server.getPlayer(args[0]);
if (p != null)
{
p.getInventory().clear();
user.sendMessage(_("inventoryClearedOthers", p.getDisplayName()));
}
else
{
throw new Exception(_("playerNotFound"));
}
}
}
else
{
user.getInventory().clear();
user.sendMessage(_("inventoryCleared"));
}
}
@Override
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
if (args[0].length() >= 3)
{
List<Player> online = server.matchPlayer(args[0]);
if (!online.isEmpty())
{
for (Player p : online)
{
p.getInventory().clear();
sender.sendMessage(_("inventoryClearedOthers", p.getDisplayName()));
}
return;
}
throw new Exception(_("playerNotFound"));
}
else
{
Player u = server.getPlayer(args[0]);
if (u != null)
{
u.getInventory().clear();
sender.sendMessage(_("inventoryClearedOthers", u.getDisplayName()));
}
else
{
throw new Exception(_("playerNotFound"));
}
}
}
}
@@ -1,58 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
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(_("compassBearing", dir, bearing));
}
}
@@ -1,60 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.Locale;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commanddelhome extends EssentialsCommand
{
public Commanddelhome()
{
super("delhome");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
User user = ess.getUser(sender);
String name;
String[] expandedArg;
//Allowing both formats /sethome khobbits house | /sethome khobbits:house
final String[] nameParts = args[0].split(":");
if (nameParts[0].length() != args[0].length())
{
expandedArg = nameParts;
}
else
{
expandedArg = args;
}
if (expandedArg.length > 1 && (user == null || user.isAuthorized("essentials.delhome.others")))
{
user = getPlayer(server, expandedArg, 0, true);
name = expandedArg[1];
}
else if (user == null)
{
throw new NotEnoughArgumentsException();
}
else
{
name = expandedArg[0];
}
//TODO: Think up a nice error message
/*
* if (name.equalsIgnoreCase("bed")) { throw new Exception("You cannot remove the vanilla home point"); }
*/
user.delHome(name.toLowerCase(Locale.ENGLISH));
sender.sendMessage(_("deleteHome", name));
}
}
@@ -1,25 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commanddeljail extends EssentialsCommand
{
public Commanddeljail()
{
super("deljail");
}
@Override
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
ess.getJails().removeJail(args[0]);
sender.sendMessage(_("deleteJail", args[0]));
}
}
@@ -1,25 +0,0 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
public class Commanddelwarp extends EssentialsCommand
{
public Commanddelwarp()
{
super("delwarp");
}
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
ess.getWarps().delWarp(args[0]);
sender.sendMessage(_("deleteWarp", args[0]));
}
}
Loaded 100 of 1157 files, more files were not shown because too many files have changed in this diff. Show more