This commit completely rewrites DisguiseManager, DisguisePlayer, and
PlayerDisguiseManager.
Changes to disguising means that much of the core was also changed,
primarily having to do with mapping by UUID versus player names.
Several new API classes were added, such as EntitySelector, Managers,
UtilTasks, and a brand new scoreboard API which is much more optimized and
allows for much longer lines
The new anticheat is hooked as well, with implementation for guardians
which follow the players around. Release two code is also included, but is
currently disabled via a boolean.
Lots of hacky NMS stuff. Ask me if you're confused
Basically, decorate the world async
Keep spawn chunks loaded
Make sure view distance is capped so no chunks are genned on teleport
Add regeneration and resistance on spawn to prevent damage
Set health objective score manually
Teleport player two times to ensure no block glitching
Disable kicking and NCP while teleporting
Freedom chests
Freedom Aura
Shock and Awe
Leap of Freedom
Price of Freedom
Uncle Sam Morph
Freedom Mount
Uncle Sam Hat
Persistence update:
Items will still be enabled after player leaves the server
Change UtilServer to return proper plugin instance
Remove /energyshop debug command
Add warning for opening chests while in vanish
Fix item maps being broken
Fix tutorials possibly wiping inventory
Make the project compile
PlayerKeyValueRepository<V> is a key/value store whose keys are Strings
and whose value type is parameterized by V. Each repository is backed by
a MySQL table in the Accounts database.
Access to PlayerKeyValueRepository's values is restricted via
CompletableFuture to enforce async database access.
BukkitFuture contains helpful utilities for producing, transforming, and
terminating CompletableFutures with actions on the main thread. A
typical PlayerKeyValueRepository action may look similar to the
following, where we retrieve all key/value pairs for a player and
perform an action with the result on the main thread:
PlayerKeyValueRepository<String> repo = [...]; // init repo
UUID uuid = [...]; // a player's UUID
repo.getAll(uuid).thenCompose(BukkitFuture.accept(values -> {
// this will be run on the main thread!
// `values` is of type `Map<String,String>`
}));