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 😄
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
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).
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).
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.
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.
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.
* 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)
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.
(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
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
* 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
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).
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.
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.
CustomItemResolver was fetching the custom item from the item database instead of the resolved custom item which caused a StackOverflowError.
Fixes#3018.
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
* 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)
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>
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
* 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
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.
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.
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
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.
# 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 #2457Fixes#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
* 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.
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.
* 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
* 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)
* 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).