The essential plugin suite for Minecraft servers.
Go to file
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
.github Remove BuildTools script and update README 2020-06-05 15:22:40 +01:00
Essentials Reduce sync loads for teleporting (#3102) 2020-06-24 09:52:25 +01:00
EssentialsAntiBuild Protect Armor Stands + Item Frames (#3270) 2020-05-27 12:36:53 -07:00
EssentialsChat Player should not be able to send empty shout/question messages (#3341) 2020-05-28 11:45:05 -07:00
EssentialsGeoIP Fix zh-CN GeoIP locale issue 2020-03-05 01:08:55 -08:00
EssentialsProtect Add settings to protect items from explosions (#2504) 2020-06-15 13:54:16 +01:00
EssentialsSpawn Reduce sync loads for teleporting (#3102) 2020-06-24 09:52:25 +01:00
EssentialsXMPP Add a more helpful error message for xmpp module (#3247) 2020-05-09 13:21:02 +01:00
nms Clean up providers a bit (#3279) 2020-05-28 12:06:03 -07:00
.gitignore Remove BuildTools script and update README 2020-06-05 15:22:40 +01:00
LICENSE Added License info. Essentials is GPLv3 2011-05-13 19:58:30 +00:00
README.md Remove BuildTools script and update README 2020-06-05 15:22:40 +01:00
crowdin.yml Add Estonian alias to Crowdin config 2019-04-07 21:08:30 +01:00
pom.xml Add UTF8 support for .properties files (#3358) 2020-06-07 12:06:33 +01:00

README.md

EssentialsX

Jenkins

Discord

Patreon

This is a fork of Essentials called EssentialsX.

If you are using this, do NOT ask Essentials for support.

The official upstream repository is at https://github.com/Essentials/Essentials.

Why use EssentialsX?

EssentialsX is an unofficial continuation of Essentials, updated to support modern Minecraft and Spigot versions. It provides several performance enhancements and fixes that are currently not available in Essentials and Spigot-Essentials. For more details, see the wiki.

EssentialsX is almost a completely drop-in replacement for Essentials. However, it has different requirements:

  • EssentialsX requires Vault to enable chat prefix/suffixes and group support if you have a supported permissions plugin. We recommend using LuckPerms.

  • If you have an unsupported permissions plugin but still wish to use wildcards, enable use-bukkit-permissions in the configuration. Otherwise, the plugin will fall back to config-based permissions.

  • EssentialsX requires Java 8 or higher. On older versions, the plugin may not work properly.

  • EssentialsX supports Minecraft versions 1.8.8, 1.9.4, 1.10.2, 1.11.2, 1.12.2, 1.13.2, 1.14.4, and 1.15.2.

Support

Need help with using EssentialsX? Join the MOSS Discord community to ask for help and discuss EssentialsX.

If you need to report a bug or want to suggest a new feature, you can open an issue on GitHub.

Building

To build EssentialsX, you need JDK 8 or higher and Maven installed on your system. Then, run the following command:

mvn clean install

Each module's jar can be found in target/ inside each module's directory.

Using EssentialsX in your plugin

Do you want to integrate with EssentialsX in your plugin? EssentialsX is available on the ender.zone Maven repository at https://ci.ender.zone/plugin/repository/everything/, and the EssentialsX artifact is net.ess3:EssentialsX:2.17.2. More information at the wiki.

Contributing

Want to help improve EssentialsX? There are numerous ways you can contribute to the project.

If you'd like to make a financial contribution to the project, you can join our Patreon. If you can't make a donation, don't worry! There's lots of other ways to contribute:

  • Do you run a server? Take a look at our "help wanted" issues, where you can find issues that need extra testing and investigation. You can also join the MOSS Discord community and provide support to others.
  • Do you speak multiple languages? If so, we always welcome contributions to our Crowdin project.
  • If you're a developer, you could look through our "open to PR" issues. We're always happy to receive bug fixes and feature additions as pull requests.