If you try to load a world inresponse to another world loading,
a concurrent modification exception will throw.
This avoids that by making a defensive copy of the list for the server init stage.
you might want to do this if you want to guarantee your world loads
immediately after the vanilla worlds before another plugin has a chance
to load worlds during POST_WORLD plugin stage.
Minecraft moved worlds to a hashmap in 1.13.1.
This creates inconsistent order for iteration of the map.
This patch restores World management to be back as an Array.
.values() will allow us to iterate as it was pre 1.13.1 by
ArrayList, giving consistent ordering and effecient iteration performance.
KeySet and EntrySet iteration is proxied to the List iterator,
and should retain manipulation behavior but nothing should be doing that.
Getting a World by dimension ID is now back a constant time operation.
Hopefully no other plugins try to mess with this map, as we are only handling
known NMS used methods, but we can add more if naughty plugins are found later.
Multiverse was tested with this and no breakage.
Allows you to add to paper.yml
seed-overrides:
world_name: some seed value
This will ignore every where a seed is set/created/loaded and force
a world to use the specified seed.
This seed will end up being saved to the world data file, so it is
a permanent change in that it won't go back if you remove it from paper.yml
It's always been commonly said to 'ignore' that TPS was '19.X', that
it was fine.
I suspect that the inaccuracy of floating point math resulted in us
losing precision over time, making it difficult to actually get back to 20,
as you know the fun 0.1 + 0.1 ... 9 more times != 1 problem.
BigDecimal supports working with doubles with higher precision.
This change makes it so our RollingAverage class maintains all of the data
using BigDecimal and using BigDecimal arithematic operations.
This ensures we have extremely high precision, enabling us to
actually be able print '20 TPS' when TPS is perfect.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
4b9a93ec Add BatToggleSleepEvent
CraftBukkit Changes:
a222e4a2 Implement BatToggleSleepEvent
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
79ada744 SPIGOT-4382: Fix damage_absorbed statistic
computeIfAbsent would leak as the entry
was never registered into the ttl map
This fixes that ,as well as redesigns cleaning to
not run on every manipulation, and instead to run clean
once per tick per expiring map.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
94b8708a SPIGOT-4373: Item display colours are white by default
61668436 SPIGOT-4378: Fix mistakenly included code
When a mob was about to load a chunk to try to spawn in, we did not
increment the attempt counter, resulting in it being stuck in the mob
spawn loop for a long time and hanging servers.
Found some more unsafe operations in DataFixers.
Also replaced quite a few bad uses of Map.containsKey
containsKey is a common newbie mistake that "reads" cleaner, but
results in double the performance cost of all map operations as
containsKey in MOST cases where null values are not used is identical to get() == null
Considering how deep datafixers go in call stacks, with tons of map lookups,
this micro optimization could provide some gains.
Additionally, many of the containsKey/get/put style operations were
also a concurrency risk, resulting in multiple computation/insertions.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
47b9cf30 SPIGOT-4372: LightningStrikeEvent cause API
a9ceda75 Include the plugin channel name in the exception message
CraftBukkit Changes:
a4bdecff SPIGOT-4372: LightningStrikeEvent cause API
34caaf6d SPIGOT-4371: Trident damaged when event cancelled
97315374 SPIGOT-4369: Handle cancelled trident event
bf1c8273 SPIGOT-4370: Remove vehicle if its passenger spawn event was cancelled
Spigot Changes:
6b015b4b SPIGOT-4370: Remove vehicle if its passenger spawn event was cancelled
Modifying of permissions was only half protected, enabling concurrency
issues to occur if permissions were modified async.
While no plugin really should be doing that, modifying operations
are not heavily called, so they are safe to add synchronization to.
Now, all modification API's will be synchronized ensuring safety.
Additionally, hasPermission was victim to a common java newbie mistake
of calling if (containsKey(k)) return get(k), resulting in 2 map lookups.
Optimized it to simply be a single get call cutting permission map
lookups in half.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
381fba2c SPIGOT-4314: Ability to change item in frame without playing sound
CraftBukkit Changes:
1cead628 SPIGOT-4363: Bad colours in leather armor
953e1d60 SPIGOT-4314: Ability to change item in frame without playing sound
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
b6bf6aa3 Add option to suppress normal output of 'makePatches' so it only outputs when a patch is changed or created.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
7033f180 Hoist out synchronisation from ChunkRegionLoader
Spigot Changes:
500ff5d4 Rebuild patches
Additional Paper changes:
Fixed Versioned World Folders to not synchronize on ChunkRegionLoader
Optimized Save Queue even more to use a Long2ObjectOpenHashmap for save map
Add World#getXIfLoaded to IWorldReader to expose it to more places
Adds an API to allow plugins to instruct a Mob to Pathfind to a Location or Entity
This does not do anything to stop other AI rules from changing the location, so
it is still up to the plugin to control that or override after another goal changed
the location.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
022b8c35 SPIGOT-4361: BlockFadeEvent for regular coral
Fixes GH-1417, GH-1424 (probably).
There are other issues in this area, including just how much a mess it
is but we will get to those when we get to those.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
3e2858f6 SPIGOT-4352: MoistureChangeEvent
5466e281 Add BlockDispenseArmorEvent
CraftBukkit Changes:
3123a069 SPIGOT-4352: MoistureChangeEvent
226db0ea Add BlockDispenseArmorEvent
cd367fa4 Fix bad thread safety in ChunkRegionLoader
3f5ca5f2 SPIGOT-4355: Improve cancelling VehicleEnterEvent
Spigot Changes:
145a37ae Rebuild patches
3f2423cc Rebuild patches
Adds an API to allow plugins to instruct a Mob to Pathfind to a Location or Entity
This does not do anything to stop other AI rules from changing the location, so
it is still up to the plugin to control that or override after another goal changed
the location.
This restores vanilla behavior of allowing placed chests to retain any Block Entity Tag data.
Upstream added filtering to chests, breaking vanilla behavior, and preventing use of loot table chests as a reward mechanism.
Upon review, we can find no security risk in allowing players to place a chest with NBT data, as Spawn Eggs, Minecarts, command blocks etc all have their own checks.
Additionally, survival mode players, non op players can not create these items anyways. If a player has Creative or Op, they already have high levels of access.
Plus, Chests aren't the only inventory that could have free form items, so this filter was insufficient anyways.