This PR reduces the number of sync loads occurring on any teleport caused by essentials.
Fixes#2861Fixes#2287Fixes#3274Fixes#3201Fixes#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
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).
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.
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
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.
This will prevent players from moving between words using virtually all essentials commands.
ATM /warp is excepted, because we already have per warp permissions.
Ess3 may see warp permissions altered to: essentials.warp.<world>.<warpname>
- The behavior has been altered to match the vanilla server.
- Using a bed will no longer create a home in the users file, if config option bed-sethome is set
- The config option bed-sethome has been removed
- It's now possible to go to /home bed or /home playername:bed
- Bed locations stored before installing Essentials will be used
- Players respawn at their bed location (if set) instead of the spawn, if respawn-at-home is set to false
- The default value of spawn-if-no-home is set to true
- If spawn-if-no-home is set and the player has not set a home, he will be either teleported to his bed location (if set) or the spawn, when he uses the /home command