See #4961 and EssentialsX/Website#71.
Adds `commands.yml`, the known command map and `AlternativeCommandHandler` handover information to `/ess dump`.
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
**Known issue: this inadvertently reformats `/minecraft:tell`. There's not much we can do about this in 2.19.x.**
This commit refactors EssentialsX Chat in order to support chat previews and signed chat messages in 1.19.1+.
`commons-lang3` is scheduled for removal by Spigot.
This commit reimplements the methods we use from StringUtils in StringUtil, and replaces NumberUtils.isDigits(String) with NumberUtil.isLong(String).
If a player uses `/tpa` to request a teleport to someone with `/tpauto` enabled, `/tpa` manually creates a charge for the teleportation.
This PR changes the subsequent code to throw a `NoChargeException` instead of returning, meaning only the `AsyncTeleport` charge is applied, not the standard command one.
Fixes#4854.
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#3769Closes#1550
Co-authored-by: Mariell Hoversholm <proximyst@proximy.st>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
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.
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.
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}*"
```
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
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
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.
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
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.
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.
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#4075Fixes#4304
* 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